/*
 * logyour.life landing page. One deliberate look: the Dial, dark, with glass.
 * Layout idea: a scroll-driven story where each chapter pins a stage and a --p variable (0 to 1)
 * scrubs its animation. Everything is readable at --p: 0, so the first frame is complete.
 */
:root {
  --night: #070d18;
  --night-2: #0c1526;
  --ink: #f2f5fa;
  --muted: #a2aec2;
  --faint: #7d8aa0;
  --signal: #5ee6c8;
  --on-signal: #04201b;
  --now: #ff6b4a;
  --blue: #6c9bff;
  --amber: #ffc247;
  --rose: #ff7a90;
  --violet: #b79bff;
  --slate: #8fa3b8;
  --glass: rgba(255, 255, 255, 0.07);
  --glass-strong: rgba(14, 22, 38, 0.62);
  --edge: rgba(255, 255, 255, 0.14);
  --highlight: rgba(255, 255, 255, 0.2);
  --display: 'Bricolage Grotesque', 'Avenir Next', 'Segoe UI', sans-serif;
  --text: 'Instrument Sans', 'Avenir Next', 'Segoe UI', sans-serif;
  --gutter: clamp(16px, 4vw, 40px);
  --max: 1160px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--text);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* Type */
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.03em; line-height: 1.04; margin: 0; text-wrap: balance; }
h1 { font-size: clamp(2.7rem, 7.4vw, 5.6rem); letter-spacing: -0.045em; }
h2 { font-size: clamp(2rem, 4.6vw, 3.5rem); }
h3 { font-size: 1.25rem; letter-spacing: -0.02em; }
p { margin: 0; text-wrap: pretty; }
.lede { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--muted); max-width: 34ch; }
.copy { color: var(--muted); max-width: 44ch; }
.eyebrow { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--signal); }
.small { font-size: 0.86rem; color: var(--faint); }
.num { font-variant-numeric: tabular-nums; }

/* Glass */
.glass {
  position: relative;
  background: var(--glass);
  -webkit-backdrop-filter: blur(24px) saturate(170%);
  backdrop-filter: blur(24px) saturate(170%);
  border: 1px solid var(--edge);
  box-shadow: inset 0 1px 0 var(--highlight), 0 18px 48px rgba(0, 0, 0, 0.35);
  border-radius: 24px;
}
.glass.strong { background: var(--glass-strong); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; font: 700 1rem var(--text);
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
}
.btn.primary { background: var(--signal); color: var(--on-signal); box-shadow: 0 0 40px rgba(94, 230, 200, 0.35); }
.btn.primary:hover { filter: brightness(1.06); }
.btn.ghost { background: var(--glass); border-color: var(--edge); color: var(--ink); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.btn.ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

/* Nav */
.nav { position: fixed; z-index: 20; top: 12px; left: 0; right: 0; padding-inline: var(--gutter); pointer-events: none; }
.nav-bar { max-width: var(--max); margin-inline: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 8px 10px 8px 16px; border-radius: 999px; pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font: 700 1.05rem var(--display); letter-spacing: -0.02em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 6px; }
.nav-links a { text-decoration: none; padding: 9px 14px; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.nav-links a:hover { color: var(--ink); }
.nav-links .btn { min-height: 40px; padding: 0 18px; font-size: 0.95rem; color: var(--on-signal); }
@media (max-width: 640px) { .nav-links a:not(.btn) { display: none; } }

/* Hero */
.hero { position: relative; padding-block: clamp(120px, 16vw, 168px) clamp(48px, 8vw, 96px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(24px, 5vw, 64px); align-items: center; }
.hero-copy { display: flex; flex-direction: column; gap: 22px; min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-glow { position: absolute; inset: -20% -10% auto auto; width: 70vw; max-width: 900px; aspect-ratio: 1; pointer-events: none; opacity: 0.9; }
.hero-glow svg { width: 100%; height: 100%; transform: rotate(calc(var(--hp, 0) * 70deg)); }
.phone { position: relative; width: min(100%, 330px); margin-inline: auto; aspect-ratio: 390 / 844; border-radius: 52px; padding: 10px; background: linear-gradient(160deg, #2a3548, #0c1220 55%); box-shadow: 0 0 0 1px rgba(255,255,255,0.18), 0 40px 90px rgba(0, 0, 0, 0.6), 0 0 120px rgba(94, 230, 200, 0.18); transform: translateY(calc(var(--hp, 0) * -36px)); }
.phone-screen { width: 100%; height: 100%; border-radius: 42px; overflow: hidden; background: var(--night-2); }
.phone-screen img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.island { position: absolute; top: 20px; left: 50%; width: 92px; height: 26px; margin-left: -46px; border-radius: 99px; background: #000; z-index: 2; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .phone { width: min(78vw, 300px); } }

/* Chapters: a tall track with a pinned stage. --p is set by site.js. */
.chapter { position: relative; height: var(--len, 240vh); --p: 0; }
.stage { position: sticky; top: 0; height: 100svh; display: flex; align-items: center; }
.stage-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 5vw, 72px); align-items: center; width: 100%; }
.stage-copy { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.flip .stage-grid { grid-template-columns: 1.1fr 0.9fr; }
.flip .stage-copy { order: 2; }
@media (max-width: 860px) {
  .stage-grid, .flip .stage-grid { grid-template-columns: 1fr; gap: 20px; }
  .flip .stage-copy { order: 0; }
  .stage { align-items: flex-start; padding-top: 92px; }
  .chapter h2 { font-size: clamp(1.8rem, 8vw, 2.4rem); }
}

/* Chapter 1: calendars merge */
.merge { position: relative; aspect-ratio: 16 / 9; border-radius: 28px; overflow: hidden; background: #050a14 url('assets/merge.webp') center / cover; border: 1px solid var(--edge); }
.merge .ring-glow { position: absolute; left: 50%; top: 50%; width: 22%; aspect-ratio: 1; margin: -11% 0 0 -11%; border-radius: 50%; box-shadow: 0 0 calc(30px + var(--p) * 60px) rgba(94, 230, 200, calc(0.25 + var(--p) * 0.55)); }
.cal { position: absolute; left: calc(3% + var(--p) * 44%); top: calc(50% + var(--y) * (1 - var(--p))); transform: translateY(-50%) scale(calc(1 - var(--p) * 0.25)); display: inline-flex; align-items: center; gap: 8px; padding: 7px 13px; border-radius: 999px; font-weight: 700; font-size: 0.86rem; opacity: calc(1 - clamp(0, (var(--p) - 0.78) * 5, 1)); white-space: nowrap; }
.cal i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); box-shadow: 0 0 10px var(--c); }
.merge-count { position: absolute; right: 5%; bottom: 7%; font: 700 clamp(1rem, 2.4vw, 1.6rem) var(--display); letter-spacing: -0.02em; }
.merge-count span { display: inline-block; transition: opacity 0.2s; }
.merge-count .after { opacity: clamp(0, (var(--p) - 0.6) * 4, 1); color: var(--signal); }
.merge-count .before { opacity: calc(1 - clamp(0, (var(--p) - 0.5) * 4, 1)); position: absolute; right: 0; bottom: 0; color: var(--muted); }
.merge-count { min-width: 6.5em; text-align: right; height: 1.3em; }
.day-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px; background: var(--glass); border: 1px solid var(--edge); font-size: 0.86rem; font-weight: 600; color: var(--ink); }
.chip.signal { color: var(--signal); background: rgba(94, 230, 200, 0.12); border-color: rgba(94, 230, 200, 0.3); }
.chip.warn { color: #ffb4a3; background: rgba(255, 107, 74, 0.12); border-color: rgba(255, 107, 74, 0.4); }
.hatched { background-image: repeating-linear-gradient(135deg, rgba(255, 107, 74, 0.22) 0 5px, transparent 5px 10px); }

/* Chapter 2: voice */
.voice { padding: clamp(18px, 3vw, 30px); display: flex; flex-direction: column; gap: 18px; max-width: 520px; }
.voice-top { display: flex; align-items: center; gap: 16px; }
.mic { width: 64px; height: 64px; border-radius: 50%; background: var(--signal); color: var(--on-signal); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(94, 230, 200, 0.14), 0 0 0 22px rgba(94, 230, 200, 0.07), 0 0 50px rgba(94, 230, 200, 0.5); flex: none; margin: 10px; }
.wave { display: flex; align-items: center; gap: 4px; height: 40px; flex: 1; min-width: 0; }
.wave b { flex: 1; max-width: 6px; min-width: 3px; border-radius: 3px; background: var(--signal); height: var(--h); animation: wave 1.6s ease-in-out infinite; animation-delay: calc(var(--i) * -0.09s); transform-origin: center; }
@keyframes wave { 0%, 100% { transform: scaleY(0.45); } 50% { transform: scaleY(1); } }
.transcript { font: 600 clamp(1.25rem, 2.6vw, 1.75rem) / 1.2 var(--display); letter-spacing: -0.02em; min-height: 6.2em; }
.transcript .hl { color: var(--signal); }
.caret { display: inline-block; width: 3px; height: 1.05em; margin-left: 3px; background: var(--signal); vertical-align: -0.15em; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.found { display: flex; flex-direction: column; gap: 8px; }
.found .item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); opacity: calc(0.25 + clamp(0, (var(--p) - var(--at)) * 6, 1) * 0.75); transform: translateY(calc((1 - clamp(0, (var(--p) - var(--at)) * 6, 1)) * 10px)); }
.found .item strong { display: block; font-size: 0.98rem; }
.found .item span { font-size: 0.84rem; color: var(--muted); }
.tick { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--faint); flex: none; }
.tick.on { background: var(--signal); border-color: var(--signal); }

/* Chapter 3: summary */
.summary { padding: clamp(18px, 3vw, 28px); display: flex; flex-direction: column; gap: 14px; max-width: 560px; margin-left: auto; }
.summary header { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.summary h3 { font-size: 1.4rem; }
.reveal { opacity: calc(0.3 + clamp(0, (var(--p) - var(--at)) * 6, 1) * 0.7); transform: translateY(calc((1 - clamp(0, (var(--p) - var(--at)) * 6, 1)) * 8px)); }
.label { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--faint); margin-bottom: 6px; }
.row { display: flex; align-items: center; gap: 10px; padding: 7px 0; font-size: 0.98rem; }
.row .grow { flex: 1; min-width: 0; }
.stamp { padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); font-size: 0.76rem; font-weight: 700; color: var(--muted); }
.ok { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; background: rgba(94, 230, 200, 0.18); color: var(--signal); font-size: 0.78rem; font-weight: 800; flex: none; }
.ok.maybe { background: rgba(255, 194, 71, 0.18); color: var(--amber); }
.maybe-text { color: var(--amber); font-weight: 700; font-size: 0.82rem; }
.review { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 194, 71, 0.1); border: 1px solid rgba(255, 194, 71, 0.35); font-size: 0.88rem; color: #e8d8b0; }
.review b { background: var(--amber); color: #1c1300; padding: 6px 12px; border-radius: 999px; font-size: 0.82rem; white-space: nowrap; }

/* Chapter 4: timeline (parallax, not pinned) */
.timeline { position: relative; padding-block: clamp(72px, 10vw, 140px); --p: 0; }
.tl-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: clamp(24px, 5vw, 72px); align-items: center; }
.tl-copy { display: flex; flex-direction: column; gap: 18px; }
.tl-photos { position: relative; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; align-items: start; }
.tl-photo { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 4 / 5; border: 1px solid var(--edge); transform: translateY(calc((0.5 - var(--p)) * var(--s) * 240px)); }
.tl-photo img { width: 100%; height: 100%; object-fit: cover; }
.tl-photo figcaption { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 8px 10px; border-radius: 14px; font-size: 0.8rem; font-weight: 600; line-height: 1.25; }
.tl-photo figcaption small { display: block; color: var(--muted); font-weight: 500; }
.tl-photo { margin: 0; }
@media (max-width: 860px) { .tl-grid { grid-template-columns: 1fr; } .tl-photos { gap: 8px; } .tl-photo figcaption { font-size: 0.7rem; padding: 6px 7px; } }

/* Chapter 5: balance */
.gauge-card { padding: clamp(18px, 3vw, 30px); display: grid; gap: 18px; max-width: 520px; }
.gauge-wrap { position: relative; width: min(100%, 250px); margin-inline: auto; aspect-ratio: 1; }
.gauge-wrap svg { width: 100%; height: 100%; }
.gauge-num { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.gauge-num strong { font: 800 clamp(3.4rem, 8vw, 4.6rem) / 1 var(--display); letter-spacing: -0.06em; }
.gauge-num span { color: var(--muted); font-weight: 600; margin-top: 2px; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.metric { padding: 10px 12px; border-radius: 16px; background: var(--glass); border: 1px solid var(--edge); }
.metric small { display: block; color: var(--muted); font-weight: 600; font-size: 0.76rem; }
.metric strong { font: 700 1.3rem var(--display); letter-spacing: -0.02em; }
.metric em { display: block; font-style: normal; font-size: 0.74rem; font-weight: 700; margin-top: 2px; }
.metric .low { color: #ff9a80; } .metric .good { color: var(--signal); }
.nudge { padding: 14px 16px; border-radius: 18px; background: rgba(94, 230, 200, 0.1); border: 1px solid rgba(94, 230, 200, 0.3); }
.nudge strong { font: 700 1.1rem var(--display); display: block; }
.nudge span { color: var(--muted); font-size: 0.9rem; }
@media (max-width: 480px) { .metrics { grid-template-columns: 1fr 1fr 1fr; } .metric { padding: 8px; } .metric strong { font-size: 1.05rem; } }

/* Private by design */
.section { padding-block: clamp(64px, 9vw, 128px); }
.section-head { display: flex; flex-direction: column; gap: 14px; margin-bottom: 36px; max-width: 640px; }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.card { padding: 22px; display: flex; flex-direction: column; gap: 12px; }
.card p { color: var(--muted); font-size: 0.96rem; }
.status { align-self: flex-start; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; padding: 4px 10px; border-radius: 999px; }
.status.now { background: rgba(94, 230, 200, 0.14); color: var(--signal); }
.status.promise { background: rgba(108, 155, 255, 0.16); color: #a9c2ff; }
.status.soon { background: rgba(255, 194, 71, 0.14); color: var(--amber); }
@media (max-width: 960px) { .cards { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

/* Pricing + final */
.price { padding: clamp(24px, 4vw, 44px); display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; }
.price .big { font: 800 clamp(2.4rem, 6vw, 4rem) / 1 var(--display); letter-spacing: -0.05em; }
@media (max-width: 720px) { .price { grid-template-columns: 1fr; } }
.final { position: relative; text-align: center; padding-block: clamp(80px, 12vw, 160px); overflow: hidden; }
.final .wrap { display: flex; flex-direction: column; align-items: center; gap: 24px; position: relative; z-index: 1; }
.final-art { position: absolute; inset: 0; background: url('assets/dial.webp') center / cover; opacity: 0.55; }
.final::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, var(--night) 0%, rgba(7, 13, 24, 0.2) 45%, var(--night) 100%); }
footer { border-top: 1px solid var(--edge); padding-block: 36px; }
.foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.foot nav { display: flex; gap: 22px; flex-wrap: wrap; }
.foot a { text-decoration: none; color: var(--muted); font-weight: 600; }
.foot a:hover { color: var(--ink); }

/* Forms (login) */
.auth { min-height: 100svh; display: grid; place-items: center; padding: 96px var(--gutter) 48px; position: relative; overflow: hidden; }
.auth-art { position: absolute; inset: 0; background: url('../assets/dial.webp') center / cover; opacity: 0.4; }
.auth::after { content: ''; position: absolute; inset: 0; background: radial-gradient(60% 60% at 50% 45%, rgba(7, 13, 24, 0) 0%, var(--night) 100%); }
.auth-card { position: relative; z-index: 1; width: 100%; max-width: 440px; padding: clamp(24px, 4vw, 36px); display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label { font-weight: 700; font-size: 0.92rem; }
.field input { height: 54px; border-radius: 16px; border: 1px solid var(--edge); background: rgba(255, 255, 255, 0.06); color: var(--ink); font: 500 1.05rem var(--text); padding: 0 16px; }
.field input::placeholder { color: var(--faint); }
.status-line { min-height: 1.6em; font-size: 0.95rem; }
.status-line.ok-msg { color: var(--signal); }
.status-line.err { color: #ffb4a3; }
.notice { padding: 12px 14px; border-radius: 14px; background: rgba(255, 194, 71, 0.1); border: 1px solid rgba(255, 194, 71, 0.35); color: #e8d8b0; font-size: 0.92rem; }
.prose { max-width: 70ch; padding-block: 120px 80px; }
.prose h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin-bottom: 20px; }
.prose h2 { font-size: 1.5rem; margin: 32px 0 10px; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.2em; display: grid; gap: 6px; }

/* Small screens: stages are taller than the viewport, so chapters flow normally in their finished state. */
@media (max-width: 760px) {
  .chapter { height: auto; --p: 1; }
  .stage { position: static; height: auto; padding-block: 64px; }
}

/* Reduced motion: show every chapter in normal flow, finished. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .chapter { height: auto; --p: 1; }
  .stage { position: static; height: auto; padding-block: 64px; }
  .wave b, .caret { animation: none; }
  .phone, .hero-glow svg, .tl-photo { transform: none; }
}
