/* ============================================================
   Deckly - landing page
   Phone mockups mirror the real app exactly:
   planner home = D logo (left) · date (center) · + (right),
   a progress ring in the middle, and a stacked colored card
   deck at the bottom. Plus the GitHub-style green heatmap.
   ============================================================ */

:root {
  --purple: #2D004F;
  --purple-700: #3D0B66;
  --purple-400: #6A2C9E;

  --bg: #F0F2F5;
  --surface: #FFFFFF;
  --surface-2: #F7F8FA;

  --text: #1A1A2E;
  --muted: #6B7280;
  --tertiary: #9CA3AF;
  --border: #E5E7EB;

  --c-orange: #E87F24;
  --c-blue: #73A5CA;
  --c-yellow: #FFC84E;
  --c-navy: #1A3263;
  --c-green: #237227;
  --c-rose: #B02A5B;
  --c-red: #D62828;
  --success: #10B981;

  --hm0: #EBEDF0;
  --hm1: #9BE9A8;
  --hm2: #40C463;
  --hm3: #30A14E;
  --hm4: #216E39;

  --shadow-sm: 0 4px 14px rgba(16, 16, 40, 0.06);
  --shadow-md: 0 18px 50px rgba(16, 16, 40, 0.10);
  --shadow-lg: 0 40px 90px rgba(45, 0, 79, 0.28);

  --radius: 20px;
  --maxw: 1120px;

  --rocket-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M14 2c-3 1-6 4-7 7l-3 1 2 2-1 3 3-1 2 2 1-3c3-1 6-4 7-7l1-5-5 1zm1 6a2 2 0 110-4 2 2 0 010 4z'/%3E%3C/svg%3E");
  --check-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M9 16.2l-3.5-3.5L4 14.2 9 19.2 20 8.2l-1.5-1.5z'/%3E%3C/svg%3E");
  --trash-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M6 7h12l-1 14H7L6 7zm3-3h6l1 2H8l1-2z'/%3E%3C/svg%3E");
  --moon-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 3a9 9 0 109 9c0-.46-.04-.92-.1-1.36A6.5 6.5 0 0113.36 3.1 9.1 9.1 0 0012 3z'/%3E%3C/svg%3E");
  --bell-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M12 22a2.5 2.5 0 002.45-2h-4.9A2.5 2.5 0 0012 22zm7-5l-2-2v-4a5 5 0 00-4-4.9V5a1 1 0 10-2 0v1.1A5 5 0 007 11v4l-2 2v1h14v-1z'/%3E%3C/svg%3E");
  --note-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23fff' d='M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04a1 1 0 000-1.41l-2.34-2.34a1 1 0 00-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z'/%3E%3C/svg%3E");
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
h1, h2 { letter-spacing: -0.03em; line-height: 1.05; margin: 0; }

/* ───────────────────────── NAV ───────────────────────── */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  background: rgba(240, 242, 245, 0.72);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.nav.scrolled { border-bottom-color: var(--border); background: rgba(240, 242, 245, 0.9); }
.nav-inner {
  max-width: var(--maxw); margin: 0 auto; padding: 16px 24px;
  display: flex; align-items: center; justify-content: space-between;
}
.wordmark { font-weight: 800; font-size: 22px; color: var(--purple); letter-spacing: -0.02em; }
.wordmark.sm { font-size: 18px; }
.nav-links { display: flex; gap: 26px; align-items: center; }
.nav-links a { font-size: 14.5px; font-weight: 600; color: var(--muted); transition: color .2s ease; }
.nav-links a:hover { color: var(--purple); }
.nav-links a[href="#features"] { color: var(--text); }
.lang-link {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px 11px;
  font-size: 13px !important;
  line-height: 1.4;
}
.lang-link:hover { border-color: var(--purple); }
.foot-links .lang-link { font-size: 12.5px; }

/* ───────────────────────── HERO ───────────────────────── */
.hero { position: relative; overflow: hidden; padding: 72px 24px 40px; }
.hero-glow {
  position: absolute; inset: -30% -10% auto -10%; height: 760px;
  background:
    radial-gradient(60% 60% at 75% 25%, rgba(106, 44, 158, 0.20), transparent 70%),
    radial-gradient(50% 50% at 20% 10%, rgba(45, 0, 79, 0.14), transparent 70%);
  pointer-events: none; z-index: 0;
}
.hero-grid {
  position: relative; z-index: 1; max-width: var(--maxw); margin: 0 auto;
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center;
}
.hero-copy { padding: 24px 0; }
.kicker {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--purple-400);
  background: rgba(106, 44, 158, 0.10); padding: 7px 13px; border-radius: 999px;
}
.hero h1 { font-size: clamp(40px, 6vw, 68px); font-weight: 800; color: var(--purple); margin: 22px 0 18px; }
.lead { font-size: 19px; color: var(--muted); max-width: 480px; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }

.btn-store {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--purple); color: #fff; padding: 13px 20px; border-radius: 14px;
  font-weight: 600; box-shadow: 0 10px 26px rgba(45, 0, 79, 0.28);
  transition: transform .2s ease, box-shadow .2s ease;
}
.btn-store:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(45, 0, 79, 0.34); }
.btn-store span { display: flex; flex-direction: column; line-height: 1.1; text-align: left; }
.btn-store small { font-size: 11px; opacity: .85; font-weight: 500; }
.btn-store strong { font-size: 17px; font-weight: 700; }
.btn-store.light { background: #fff; color: var(--purple); box-shadow: 0 14px 34px rgba(0,0,0,0.18); }

.btn-ghost {
  display: inline-flex; align-items: center; padding: 13px 20px; border-radius: 14px;
  font-weight: 700; color: var(--purple); border: 1.5px solid rgba(45, 0, 79, 0.18);
  transition: background .2s ease, border-color .2s ease;
}
.btn-ghost:hover { background: rgba(45, 0, 79, 0.05); border-color: rgba(45,0,79,.3); }

.hero-phone { display: flex; justify-content: center; }

.scroll-hint {
  position: relative; z-index: 1; display: block; width: 26px; height: 42px;
  margin: 44px auto 4px; border: 2px solid rgba(45, 0, 79, 0.25); border-radius: 14px;
}
.scroll-hint span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: var(--purple-400); animation: scrolldot 1.6s ease-in-out infinite;
}
@keyframes scrolldot { 0%,100% { transform: translateY(0); opacity: 1; } 60% { transform: translateY(14px); opacity: 0; } }

/* ───────────────────────── PHONE FRAME (iPhone 17) ───────────────────────── */
.phone {
  position: relative; width: 300px; aspect-ratio: 300 / 620;
  background: #0b0b14; border-radius: 54px; padding: 9px; box-shadow: var(--shadow-lg);
}
/* titanium-style rim highlight */
.phone::before {
  content: ""; position: absolute; inset: 0; border-radius: 54px; pointer-events: none;
  box-shadow: inset 0 0 0 1.5px rgba(255,255,255,0.10), inset 0 1px 2px rgba(255,255,255,0.18);
}
/* Dynamic Island - a floating black pill with a camera lens */
.phone::after {
  content: ""; position: absolute; top: 20px; left: 50%; transform: translateX(-50%);
  width: 86px; height: 25px; background: #000; border-radius: 999px; z-index: 4;
  box-shadow: 0 1px 2px rgba(0,0,0,0.4);
  background-image: radial-gradient(circle at 73px 50%, #11202e 2.6px, transparent 3.2px);
}
.phone-sm { width: 280px; }
.phone-sm::after { width: 80px; height: 23px; top: 19px; }
.phone-screen {
  position: relative; height: 100%; background: var(--bg); border-radius: 46px;
  overflow: hidden; padding: 14px 14px 16px; display: flex; flex-direction: column;
}

.app-statusbar {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 12px; font-weight: 700; color: var(--text); padding: 8px 12px 10px;
}
.sb-icons {
  width: 42px; height: 11px;
  background:
    radial-gradient(circle at 6px 6px, var(--text) 2.5px, transparent 3px),
    radial-gradient(circle at 16px 6px, var(--text) 2.5px, transparent 3px);
  border-radius: 2px;
}
.app-section {
  margin: 16px 6px 8px; font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--tertiary);
}
.app-section.pad { margin-top: 20px; }

/* ── Planner header: D logo · date · + (exact app layout) ── */
.pl-header { display: flex; align-items: center; gap: 10px; padding: 6px 4px 2px; }
.pl-logo {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: var(--purple); color: #fff; font-weight: 900; font-size: 18px;
  display: grid; place-items: center; box-shadow: inset 0 0 0 1px rgba(255,255,255,.35);
}
.pl-date {
  flex: 1; text-align: center; font-size: 16px; font-weight: 800; color: var(--text);
  letter-spacing: -0.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.pl-add {
  width: 36px; height: 36px; flex-shrink: 0; border: none; border-radius: 14px;
  background: rgba(45, 0, 79, 0.08); color: var(--purple);
  display: grid; place-items: center; cursor: pointer;
}

/* ── Progress ring (center) ── */
.pl-center { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.ring {
  position: relative; width: 128px; height: 128px; border-radius: 50%;
  background: conic-gradient(var(--purple) calc(var(--p) * 360deg), var(--border) 0deg);
  display: grid; place-items: center;
}
.ring::before { content: ""; position: absolute; inset: 11px; background: var(--bg); border-radius: 50%; }
.ring-mid { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; }
.ring-num { font-size: 30px; font-weight: 800; color: var(--text); line-height: 1; }
.ring-label { font-size: 12px; color: var(--tertiary); margin-top: 3px; }
.pl-caption { margin: 0; font-size: 14px; color: var(--muted); }

/* ── Collapsed card deck at the bottom (continuously animated) ── */
.pl-tray { position: relative; height: 152px; margin-top: 4px; }
.dcard {
  position: absolute; height: 64px; border-radius: 20px; background: var(--c);
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 9px 22px color-mix(in srgb, var(--c) 40%, transparent);
  background-image: linear-gradient(135deg, rgba(255,255,255,.20), rgba(255,255,255,0) 55%);
  animation: deckBob 3.6s ease-in-out infinite;
}
.dcard[data-i="0"] { bottom: 0;  left: 14px; right: 14px; z-index: 4; }
.dcard[data-i="1"] { bottom: 16px; left: 21px; right: 21px; z-index: 3; animation-delay: .12s; }
.dcard[data-i="2"] { bottom: 32px; left: 28px; right: 28px; z-index: 2; animation-delay: .24s; }
.dcard[data-i="3"] { bottom: 48px; left: 35px; right: 35px; z-index: 1; animation-delay: .36s; }
@keyframes deckBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
.dnum {
  position: absolute; top: 9px; left: 14px; font-size: 13px; font-weight: 900;
  color: rgba(255, 255, 255, 0.96); text-shadow: 0 1px 6px rgba(0,0,0,.25);
}
.dnum.dark { color: rgba(26, 26, 46, 0.75); text-shadow: none; }
.dtitle {
  position: absolute; inset: 0; display: grid; place-items: center;
  color: #fff; font-size: 19px; font-weight: 900; letter-spacing: .2px;
}

/* ───────────────────────── GESTURES (one choreographed loop) ─────────────────────────
   JS drives a sequence: swipe-to-delete → cards shift up & renumber →
   hold-to-reorder swap → a note appears. Cards are absolutely placed and
   transition smoothly between slots. */
.gstage { position: relative; height: 272px; margin-top: 10px; padding: 0 2px; }
.gcard {
  position: absolute; left: 2px; right: 2px; height: 80px;
  border-radius: 20px; background: var(--c); color: #fff;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.38);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--c) 30%, transparent);
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,0) 55%),
    repeating-linear-gradient(45deg, rgba(255,255,255,.07) 0 6px, transparent 6px 14px);
  transition: transform .55s cubic-bezier(.2,.8,.2,1), opacity .4s ease, box-shadow .35s ease;
  will-change: transform;
}
.gcard.lift { box-shadow: 0 20px 34px color-mix(in srgb, var(--c) 46%, transparent); z-index: 6; }
.gcard.removed { opacity: 0; }
.gnum {
  position: absolute; top: 11px; left: 14px; font-size: 13px; font-weight: 900;
  color: rgba(255, 255, 255, 0.96); text-shadow: 0 1px 6px rgba(0,0,0,.22);
}
.gcol { display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 0 18px; }
.gtitle { font-size: 19px; font-weight: 900; letter-spacing: .2px; }
.gnote {
  font-size: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.85);
  display: inline-flex; align-items: center; gap: 5px;
  max-height: 0; opacity: 0; overflow: hidden;
  transition: max-height .4s ease, opacity .35s ease;
}
.gnote::before {
  content: ""; width: 11px; height: 11px; flex-shrink: 0; background: rgba(255,255,255,.85);
  -webkit-mask: var(--note-mask) center/contain no-repeat; mask: var(--note-mask) center/contain no-repeat;
}
.gcard.has-note .gnote { max-height: 18px; opacity: 1; }
.gdel {
  position: absolute; left: 2px; right: 2px; top: 0; height: 80px; border-radius: 20px; z-index: 0;
  background: rgba(239, 68, 68, .14);
  display: flex; align-items: center; justify-content: flex-end; gap: 6px; padding-right: 22px;
  color: #EF4444; font-size: 11px; font-weight: 700;
  opacity: 0; transition: opacity .3s ease;
}
.gdel.show { opacity: 1; }
.gdel .trash {
  width: 18px; height: 18px; background: #EF4444;
  -webkit-mask: var(--trash-mask) center/contain no-repeat; mask: var(--trash-mask) center/contain no-repeat;
}

/* ───────────────────────── BANDS / SPLIT LAYOUT ───────────────────────── */
.band { padding: 96px 24px; }
.band.alt { background: var(--surface); }
.split { max-width: var(--maxw); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.split-media { display: flex; justify-content: center; }
.split-copy .tag {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--purple-400); margin-bottom: 16px;
}
.split-copy h2 { font-size: clamp(30px, 4vw, 46px); font-weight: 800; color: var(--text); margin-bottom: 18px; }
.split-copy p { font-size: 18px; color: var(--muted); max-width: 440px; }
.split-copy .hint { margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--purple-400); }
@media (min-width: 901px) { .split.reverse .split-media { order: 2; } }

/* ───────────────────────── CONCEPT DECK ─────────────────────────
   Cards fan open and close on a loop - flat (no rotation), same width,
   squarely aligned, neutral shadow. */
.deck { position: relative; width: 240px; height: 320px; }
.deck-card {
  position: absolute; left: 50%; top: 50%; width: 210px; height: 64px; margin: -32px 0 0 -105px;
  border-radius: 18px; background: var(--c);
  box-shadow: 0 8px 20px rgba(20, 18, 40, 0.16);
  background-image: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,0) 60%);
}
.deck-card:nth-child(1) { z-index: 4; animation: fan1 5.2s ease-in-out infinite; }
.deck-card:nth-child(2) { z-index: 3; animation: fan2 5.2s ease-in-out infinite; }
.deck-card:nth-child(3) { z-index: 2; animation: fan3 5.2s ease-in-out infinite; }
.deck-card:nth-child(4) { z-index: 1; animation: fan4 5.2s ease-in-out infinite; }
@keyframes fan1 { 0%,14% { transform: translateY(-24px); } 48%,62% { transform: translateY(-117px); } 96%,100% { transform: translateY(-24px); } }
@keyframes fan2 { 0%,14% { transform: translateY(-8px); }  48%,62% { transform: translateY(-39px); }  96%,100% { transform: translateY(-8px); } }
@keyframes fan3 { 0%,14% { transform: translateY(8px); }   48%,62% { transform: translateY(39px); }   96%,100% { transform: translateY(8px); } }
@keyframes fan4 { 0%,14% { transform: translateY(24px); }  48%,62% { transform: translateY(117px); }  96%,100% { transform: translateY(24px); } }

/* ───────────────────────── PROJECT DETAIL (mirrors the app) ───────────────────────── */
.pj-body { transition: opacity .4s ease; }
.pj-body.swap { opacity: 0; }
.pj-appbar { display: flex; align-items: center; gap: 6px; padding: 4px 2px 12px; }
.pj-back { color: var(--text); display: grid; place-items: center; }
.pj-apptitle { font-size: 16px; font-weight: 800; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.pj-header {
  border-radius: 20px; padding: 16px; color: #fff;
  background: linear-gradient(135deg, var(--c-red), #b81f1f);
  box-shadow: 0 10px 24px rgba(214, 40, 40, 0.30);
}
.pj-htop { display: flex; align-items: center; gap: 10px; }
.pj-rocket {
  width: 26px; height: 26px; background: #fff;
  -webkit-mask: var(--rocket-mask) center/contain no-repeat; mask: var(--rocket-mask) center/contain no-repeat;
}
.pj-hname { font-size: 18px; font-weight: 800; }
.pj-dates { display: flex; align-items: center; justify-content: center; gap: 5px; margin: 12px 0; }
.pj-chip {
  display: inline-flex; align-items: center; gap: 3px; white-space: nowrap;
  background: rgba(255, 255, 255, .22); border-radius: 7px; padding: 3px 7px;
  font-size: 10px; font-weight: 600;
}
.pj-chip svg { flex-shrink: 0; width: 11px; height: 11px; }
.pj-arrow { opacity: .85; display: grid; place-items: center; flex-shrink: 0; }
.pj-arrow svg { width: 12px; height: 12px; }
.pj-prog { display: flex; align-items: center; gap: 10px; }
.pj-bar { flex: 1; height: 6px; border-radius: 4px; background: rgba(255, 255, 255, .28); overflow: hidden; }
.pj-bar span { display: block; height: 100%; width: 0; background: #fff; border-radius: 4px; transition: width 1s cubic-bezier(.2,.8,.2,1); }
.pj-count { font-size: 13px; font-weight: 800; }

.pj-section { margin: 16px 4px 10px; font-size: 15px; font-weight: 800; color: var(--text); }
.pj-stages { display: flex; flex-direction: column; gap: 8px; }
.pj-stage {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border-radius: 14px; padding: 11px 13px;
  border: 1.5px solid color-mix(in srgb, var(--c-red) 12%, transparent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .03);
}
.pj-stage.done { border-color: color-mix(in srgb, var(--success) 30%, transparent); }
.pj-num {
  width: 28px; height: 28px; flex-shrink: 0; border-radius: 8px;
  background: color-mix(in srgb, var(--c-red) 10%, transparent);
  color: var(--c-red); font-size: 13px; font-weight: 800;
  display: grid; place-items: center;
}
.pj-num.check { background: var(--success); position: relative; }
.pj-num.check::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px; background: #fff;
  -webkit-mask: var(--check-mask) center/16px no-repeat; mask: var(--check-mask) center/16px no-repeat;
}
.pj-sname { flex: 1; font-size: 14.5px; font-weight: 500; color: var(--text); }
.pj-stage.done .pj-sname { color: var(--tertiary); text-decoration: line-through; }
.pj-tag { font-size: 11.5px; font-weight: 700; color: var(--success); }
.pj-edit {
  width: 18px; height: 18px; flex-shrink: 0; opacity: .5; background: var(--tertiary);
  -webkit-mask: var(--note-mask) center/contain no-repeat; mask: var(--note-mask) center/contain no-repeat;
}

/* ───────────────────────── HEATMAP (larger standalone card) ───────────────────────── */
.hm-wrap { position: relative; width: 380px; max-width: 100%; margin: 0 auto; }
.heatmap { background: #fff; border-radius: 22px; box-shadow: var(--shadow-md); padding: 22px; }
.hm-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.hm-month { font-size: 18px; font-weight: 800; color: var(--text); }
.hm-arrow { color: var(--muted); font-size: 24px; line-height: 1; }
.hm-arrow.off { color: var(--border); }
.hm-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 8px; }
.hm-week span { text-align: center; font-size: 11px; font-weight: 700; color: var(--tertiary); }
.hm-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.hm-cell {
  aspect-ratio: 1; border-radius: 9px; background: var(--hm0); display: grid; place-items: center;
  font-size: 13px; color: var(--muted); transition: background .35s ease, transform .25s ease, box-shadow .25s ease;
}
.hm-cell.empty { background: transparent; }
.hm-cell.future { background: var(--surface-2); color: rgba(156,163,175,.5); }
.hm-cell[data-lvl="1"] { background: var(--hm1); }
.hm-cell[data-lvl="2"] { background: var(--hm2); color: #fff; }
.hm-cell[data-lvl="3"] { background: var(--hm3); color: #fff; }
.hm-cell[data-lvl="4"] { background: var(--hm4); color: #fff; }
.hm-cell.today { box-shadow: inset 0 0 0 2.5px var(--purple); font-weight: 800; color: var(--text); }
.hm-cell.today[data-lvl] { color: #fff; }
.hm-legend { display: flex; align-items: center; justify-content: center; gap: 4px; margin-top: 16px; }
.hm-legend i { width: 16px; height: 16px; border-radius: 4px; display: inline-block; }
.hm-label { font-size: 12px; color: var(--tertiary); margin: 0 6px; }

/* ── close-the-day button (navy, like the app) ── */
.app-closeday {
  margin: 14px 4px 2px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--c-navy); color: #fff; border: none; border-radius: 16px; padding: 13px 16px;
  font-size: 14px; font-weight: 800; cursor: pointer; box-shadow: 0 8px 18px rgba(26, 50, 99, .35);
  transition: transform .15s ease, opacity .2s ease;
}
.app-closeday:active { transform: scale(.97); }
.app-closeday.fired { opacity: .55; }
.app-closeday .moon { width: 16px; height: 16px; background: #fff; -webkit-mask: var(--moon-mask) center/contain no-repeat; mask: var(--moon-mask) center/contain no-repeat; }

/* ── Day recap modal (mirrors the in-app blurred recap) ── */
.hm-cell:not(.empty):not(.future) { cursor: pointer; }
.hm-cell:not(.empty):not(.future):hover { transform: scale(1.12); }

.recap {
  position: absolute; inset: 0; z-index: 9;
  display: grid; place-items: center; padding: 12px;
  background: rgba(16, 16, 40, 0.22);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px);
  opacity: 0; pointer-events: none; transition: opacity .24s ease;
}
.recap.show { opacity: 1; pointer-events: auto; }
.recap-card {
  position: relative; width: 100%; max-height: 100%; overflow-y: auto;
  background: var(--bg); border-radius: 22px; padding: 13px;
  box-shadow: 0 30px 60px rgba(16, 16, 40, 0.34);
  transform: scale(.94); transition: transform .26s cubic-bezier(.2, .8, .2, 1);
  scrollbar-width: none;
}
.recap-card::-webkit-scrollbar { display: none; }
.recap.show .recap-card { transform: scale(1); }
.recap-x {
  position: absolute; top: 9px; right: 9px; width: 26px; height: 26px;
  border: none; border-radius: 50%; background: #fff; color: var(--muted);
  font-size: 17px; line-height: 24px; cursor: pointer; box-shadow: var(--shadow-sm);
}

.recap-date { margin: 0 2px 9px; font-size: 15px; font-weight: 800; color: var(--text); }

.recap-head {
  display: flex; align-items: center; gap: 12px; margin-bottom: 9px;
  background: #fff; border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow-sm);
}
.recap-ring {
  position: relative; width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: conic-gradient(var(--hm3) calc(var(--p) * 360deg), var(--surface-2) 0);
  display: grid; place-items: center;
}
.recap-ring::before { content: ""; position: absolute; inset: 5px; background: #fff; border-radius: 50%; }
.recap-ring span { position: relative; z-index: 1; font-size: 11px; font-weight: 800; color: var(--text); }
.recap-htxt { display: flex; flex-direction: column; }
.recap-htxt strong { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.1; }
.recap-htxt small { font-size: 12px; color: var(--muted); }

.recap-group { background: #fff; border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.recap-ghead { display: flex; align-items: center; gap: 8px; padding: 10px 12px 7px; }
.recap-gic {
  width: 16px; height: 16px; background: var(--purple-400);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 7h10v3l4-4-4-4v3H5v6h2V7zm10 10H7v-3l-4 4 4 4v-3h12v-6h-2v4z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.recap-gname { font-size: 13px; font-weight: 800; color: var(--text); }
.recap-gpill {
  margin-left: auto; font-size: 11px; font-weight: 800; color: var(--purple-400);
  background: color-mix(in srgb, var(--purple-400) 12%, #fff); padding: 3px 10px; border-radius: 20px;
}
.recap-row { display: flex; align-items: flex-start; gap: 11px; padding: 8px 12px; }
.recap-row + .recap-row { border-top: 1px solid var(--surface-2); }
.recap-chk {
  position: relative; width: 24px; height: 24px; border-radius: 7px; flex-shrink: 0;
  background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--border);
}
.recap-chk.on { background: color-mix(in srgb, var(--success) 16%, #fff); box-shadow: none; }
.recap-chk.on::after {
  content: ""; position: absolute; inset: 0; background: var(--success);
  -webkit-mask: var(--check-mask) center/15px no-repeat; mask: var(--check-mask) center/15px no-repeat;
}
.recap-col { display: flex; flex-direction: column; min-width: 0; }
.recap-name { font-size: 13.5px; font-weight: 600; color: var(--text); padding-top: 3px; }
.recap-name.done { color: var(--tertiary); text-decoration: line-through; }

.recap-note {
  margin-top: 6px; padding: 8px 10px 9px; border-radius: 12px;
  background: linear-gradient(135deg,
    color-mix(in srgb, var(--acc) 12%, #fff),
    color-mix(in srgb, var(--acc) 4%, #fff));
  border: 1px solid color-mix(in srgb, var(--acc) 20%, transparent);
}
.recap-badge {
  display: inline-flex; align-items: center; gap: 4px;
  background: color-mix(in srgb, var(--acc) 16%, #fff); color: var(--acc);
  font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 9px; border-radius: 20px;
}
.recap-badge i { width: 11px; height: 11px; background: var(--acc); display: inline-block; }
.ic-pin {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M16 9V4h1V2H7v2h1v5l-2 2v2h5v5l1 1 1-1v-5h5v-2l-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M16 9V4h1V2H7v2h1v5l-2 2v2h5v5l1 1 1-1v-5h5v-2l-2-2z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.ic-day {
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2v2H5a2 2 0 00-2 2v13a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2h-2V2h-2v2H9V2H7zm12 7v10H5V9h14z'/%3E%3C/svg%3E") center/contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23000' d='M7 2v2H5a2 2 0 00-2 2v13a2 2 0 002 2h14a2 2 0 002-2V6a2 2 0 00-2-2h-2V2h-2v2H9V2H7zm12 7v10H5V9h14z'/%3E%3C/svg%3E") center/contain no-repeat;
}
.recap-note p { margin: 8px 0 0; font-size: 12.5px; font-weight: 500; color: var(--text); line-height: 1.35; }
.recap-note p::before { content: "\201C "; font-weight: 800; color: color-mix(in srgb, var(--acc) 55%, transparent); }

/* ───────────────────────── NOTIFICATIONS ───────────────────────── */
.notif-stack { display: flex; flex-direction: column; gap: 14px; width: 340px; max-width: 100%; }
.notif {
  display: flex; align-items: center; gap: 12px; background: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(10px); border: 1px solid var(--border); border-radius: 18px;
  padding: 14px 16px; box-shadow: var(--shadow-md);
}
.notif-ic { width: 38px; height: 38px; border-radius: 10px; background: var(--purple); flex-shrink: 0; position: relative; }
.notif-ic.dark { background: var(--c-navy); }
.notif-ic::after {
  content: ""; position: absolute; inset: 0; margin: auto; width: 20px; height: 20px; background: #fff;
  -webkit-mask: var(--bell-mask) center/contain no-repeat; mask: var(--bell-mask) center/contain no-repeat;
}
.notif-t { margin: 0; font-size: 13px; font-weight: 700; color: var(--text); }
.notif-b { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.notif-time { margin-left: auto; align-self: flex-start; font-size: 11px; color: var(--tertiary); }

/* toast variant: fixed top-right, slides in/out, stacked vertically */
.notif-toasts {
  position: fixed; top: 16px; right: 16px; z-index: 200;
  display: flex; flex-direction: column; gap: 12px;
  width: 340px; max-width: calc(100vw - 32px); pointer-events: none;
}
.notif.toast {
  opacity: 0; transform: translateX(120%);
  transition: transform .5s cubic-bezier(.22,1,.36,1), opacity .5s ease;
  will-change: transform, opacity;
}
.notif.toast.in { opacity: 1; transform: translateX(0); }
.notif.toast.out { opacity: 0; transform: translateX(120%); }
@media (max-width: 540px) {
  .notif-toasts { left: 16px; right: 16px; width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  .notif.toast { transition: opacity .3s ease; transform: none; }
}

/* ───────────────────────── FINAL CTA ───────────────────────── */
.cta-final {
  position: relative; overflow: hidden; text-align: center; padding: 110px 24px;
  background: linear-gradient(160deg, var(--purple) 0%, var(--purple-700) 60%, #1c0033 100%); color: #fff;
}
.cta-glow { position: absolute; inset: 0; background: radial-gradient(50% 60% at 50% 0%, rgba(176, 42, 91, .35), transparent 70%); pointer-events: none; }
.cta-final h2 { font-size: clamp(32px, 5vw, 54px); font-weight: 800; position: relative; }
.cta-final p { font-size: 19px; color: rgba(255,255,255,.78); margin: 14px 0 30px; position: relative; }
.cta-final .btn-store { position: relative; }

/* ───────────────────────── LEGAL PAGES (privacy / terms) ─────────────────────────
   Privacy & Terms share the landing design language: same nav, footer,
   brand purple, type scale and glow - only the body is a readable article. */
.legal { position: relative; overflow: hidden; padding: 72px 24px 96px; }
.legal-glow {
  position: absolute; inset: -30% -10% auto -10%; height: 560px;
  background:
    radial-gradient(60% 60% at 75% 20%, rgba(106, 44, 158, 0.16), transparent 70%),
    radial-gradient(50% 50% at 20% 0%, rgba(45, 0, 79, 0.10), transparent 70%);
  pointer-events: none; z-index: 0;
}
.legal-inner { position: relative; z-index: 1; max-width: 760px; margin: 0 auto; }
.legal h1 {
  font-size: clamp(34px, 5vw, 52px); font-weight: 800; color: var(--purple);
  margin: 0 0 14px;
}
.legal-date {
  display: inline-block; font-size: 13px; font-weight: 700; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--purple-400);
  background: rgba(106, 44, 158, 0.10); padding: 7px 13px; border-radius: 999px;
  margin-bottom: 30px;
}
.legal h2 {
  font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; color: var(--text);
  letter-spacing: -0.02em; margin: 42px 0 12px;
}
.legal p { font-size: 17px; color: var(--muted); margin: 0 0 16px; }
.legal ul { padding-left: 22px; margin: 0 0 16px; }
.legal li { font-size: 17px; color: var(--muted); margin-bottom: 9px; }
.legal strong { color: var(--text); font-weight: 700; }
.legal em { color: var(--text); }
.legal a { color: var(--purple-400); font-weight: 600; }
.legal a:hover { text-decoration: underline; }

/* ───────────────────────── FOOTER ───────────────────────── */
.foot { background: var(--surface); border-top: 1px solid var(--border); }
.foot-inner { max-width: var(--maxw); margin: 0 auto; padding: 28px 24px; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.foot-links { display: flex; gap: 22px; }
.foot-links a { font-size: 14px; color: var(--muted); font-weight: 600; }
.foot-links a:hover { color: var(--purple); }
.foot-copy { margin-left: auto; font-size: 13px; color: var(--tertiary); }

/* ───────────────────────── REVEAL ANIMATION ───────────────────────── */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s cubic-bezier(.2,.8,.2,1), transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ───────────────────────── RESPONSIVE ───────────────────────── */
@media (max-width: 900px) {
  body { font-size: 16px; }
  .hero-grid { grid-template-columns: 1fr; gap: 12px; text-align: center; }
  .hero-copy { padding-top: 8px; }
  .lead { margin-left: auto; margin-right: auto; }
  .hero-cta { justify-content: center; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-copy { text-align: center; }
  .split-copy p, .split-copy .lead { margin-left: auto; margin-right: auto; }
  .band { padding: 72px 24px; }
}
@media (max-width: 520px) {
  .nav-links { gap: 16px; }
  .nav-links a[href="#features"] { display: none; }
  .phone { width: 270px; }
  .foot-inner { justify-content: center; text-align: center; }
  .foot-copy { margin-left: 0; width: 100%; }
}
