/* CoEcho — site vitrine. Same language as the app: warm night, gilt, Baskerville italic titles. */

:root {
  --bg: #0b0a09;
  --bg-2: #13110e;
  --surface: rgba(255, 248, 235, 0.045);
  --surface-strong: rgba(255, 248, 235, 0.08);
  --line: rgba(255, 240, 210, 0.12);
  --text: #f4efe6;
  --muted: #a8a093;
  --faint: #6f685e;
  --gold: #d9b35c;
  --gold-hi: #f3d790;
  --gold-lo: #a8792c;
  --silver: #e9e6e1;
  --serif: "Baskerville", "Libre Baskerville", "Baskerville Old Face", Georgia, "Times New Roman", serif;
  --sans: "Avenir Next", "Avenir", "Segoe UI", system-ui, -apple-system, Roboto, Helvetica, Arial, sans-serif;
  --radius: 22px;
  --shell: min(1120px, calc(100vw - 48px));
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, video { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: rgba(217, 179, 92, .35); }

.shell { width: var(--shell); margin-inline: auto; }

/* ---------- Brand & navigation ---------- */
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; font-family: var(--sans); font-weight: 600;
  letter-spacing: .01em; font-size: 19px;
}
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 6px 18px rgba(0,0,0,.45); }
.brand span b { font-weight: 600; color: var(--gold-hi); }

.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 30;
  padding: 18px 0;
  transition: background .35s var(--ease), padding .35s var(--ease), border-color .35s;
  border-bottom: 1px solid transparent;
}
.topbar.is-solid {
  background: rgba(11, 10, 9, .78);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  backdrop-filter: blur(18px) saturate(140%);
  border-bottom-color: var(--line);
  padding: 12px 0;
}
.topbar .shell { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topbar nav { display: flex; align-items: center; gap: 26px; font-size: 15px; }
.topbar nav a { text-decoration: none; color: var(--muted); transition: color .2s; }
.topbar nav a:hover { color: var(--text); }
.lang {
  border: 1px solid var(--line); background: transparent; color: var(--muted);
  border-radius: 999px; padding: 6px 12px; font: inherit; font-size: 13px; letter-spacing: .08em;
  cursor: pointer;
}
.lang:hover { color: var(--text); border-color: rgba(255,240,210,.3); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px;
  font: 600 16px/1 var(--sans); letter-spacing: .01em; text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.98); }
.btn-gold {
  color: #1a1206;
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: 0 10px 30px rgba(217, 179, 92, .25), inset 0 1px 0 rgba(255,255,255,.5);
}
.btn-gold:hover { box-shadow: 0 14px 40px rgba(217, 179, 92, .38), inset 0 1px 0 rgba(255,255,255,.5); }
.btn-ghost { color: var(--text); border: 1px solid rgba(255,240,210,.22); background: rgba(255,255,255,.03); }
.btn-ghost:hover { background: rgba(255,255,255,.07); }
.btn[aria-disabled="true"] { opacity: .55; pointer-events: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; min-height: 100svh; display: grid; align-items: end;
  overflow: hidden; isolation: isolate;
}
.hero-media, .hero-media video, .hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
}
.hero-media video { filter: saturate(.85) contrast(1.05) brightness(.8); }
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(60% 55% at 50% 58%, rgba(11,10,9,.55), transparent 75%),
    linear-gradient(180deg, rgba(11,10,9,.6) 0%, rgba(11,10,9,.3) 30%, rgba(11,10,9,.55) 62%, var(--bg) 100%);
}
.hero .display, .hero .lede { text-shadow: 0 2px 24px rgba(0,0,0,.55); }
.hero .lede { color: #ece6da; }
.hero-inner { padding: 140px 0 72px; display: grid; gap: 28px; justify-items: center; text-align: center; }
.eyebrow {
  font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--gold);
}
.display {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(46px, 8.4vw, 108px); line-height: .98; letter-spacing: -.01em;
  text-wrap: balance;
}
.display em { font-style: italic; color: var(--gold-hi); }
.lede { margin: 0; max-width: 600px; color: #d9d2c5; font-size: clamp(17px, 1.6vw, 20px); text-wrap: pretty; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 6px; }
.hero-note { font-size: 13px; color: var(--muted); }

/* Notification card, like the app's scene card */
.scene-card {
  width: min(420px, 100%); text-align: left;
  border-radius: 24px; padding: 16px 18px 18px;
  background: rgba(28, 26, 23, .62);
  border: 1px solid rgba(255, 240, 210, .14);
  -webkit-backdrop-filter: blur(22px) saturate(150%);
  backdrop-filter: blur(22px) saturate(150%);
  box-shadow: 0 30px 60px rgba(0,0,0,.45);
}
.scene-card .head { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--muted); }
.scene-card .head img { width: 22px; height: 22px; border-radius: 6px; }
.scene-card .head b { color: var(--text); font-weight: 600; }
.scene-card .head time { margin-left: auto; }
.scene-card p { margin: 8px 0 0; font-size: 16.5px; line-height: 1.45; }
.scene-card .actions { display: flex; gap: 8px; margin-top: 14px; }
.scene-card .actions span {
  flex: 1; text-align: center; padding: 9px 0; border-radius: 12px; font-size: 14px; font-weight: 600;
  background: rgba(255,255,255,.08); color: var(--text);
}
.scene-card .actions span:first-child { background: rgba(217,179,92,.18); color: var(--gold-hi); }
.scene-swap { transition: opacity .45s var(--ease), transform .45s var(--ease); }
.scene-swap.is-out { opacity: 0; transform: translateY(-10px); }

/* ---------- Sections ---------- */
section { position: relative; }
.section { padding: clamp(84px, 11vw, 150px) 0; }
.section-head { display: grid; gap: 16px; max-width: 720px; margin-bottom: clamp(40px, 6vw, 72px); }
.section-head.center { margin-inline: auto; text-align: center; justify-items: center; }
.title {
  margin: 0; font-family: var(--serif); font-style: italic; font-weight: 400;
  font-size: clamp(36px, 5vw, 64px); line-height: 1.04; text-wrap: balance;
}
.title em { color: var(--gold-hi); }
.sub { margin: 0; color: var(--muted); font-size: 18px; text-wrap: pretty; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step {
  position: relative; padding: 30px 28px 32px; border-radius: var(--radius);
  background: var(--surface); border: 1px solid var(--line);
}
.step::before {
  counter-increment: step; content: counter(step, upper-roman);
  display: block; font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 26px; margin-bottom: 18px;
}
.step h3 { margin: 0 0 10px; font-size: 21px; font-weight: 600; letter-spacing: -.005em; }
.step p { margin: 0; color: var(--muted); font-size: 16px; }

/* Companions */
.companions-wrap { overflow: hidden; }
.companions {
  display: flex; gap: 16px; width: max-content;
  animation: drift 60s linear infinite;
}
.companions:hover { animation-play-state: paused; }
@keyframes drift { to { transform: translateX(-50%); } }
.companion {
  position: relative; width: 230px; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; flex: none;
  border: 1px solid var(--line); background: var(--bg-2);
}
.companion img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.02); transition: transform .8s var(--ease); }
.companion:hover img { transform: scale(1.07); }
.companion figcaption {
  position: absolute; inset: auto 0 0 0; padding: 40px 16px 14px;
  background: linear-gradient(transparent, rgba(8,7,6,.92));
  font-family: var(--serif); font-style: italic; font-size: 20px;
}
.companion figcaption small { display: block; font-family: var(--sans); font-style: normal; font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold); margin-bottom: 2px; }
.companions-note { text-align: center; color: var(--muted); margin-top: 28px; font-family: var(--serif); font-style: italic; font-size: 22px; }

/* Day timeline */
.day {
  display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: center;
}
.day-visual {
  position: relative; border-radius: 28px; overflow: hidden; min-height: 520px;
  border: 1px solid var(--line);
  background: url("../img/dawn.jpg") center / cover no-repeat;
}
.day-visual::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,10,9,.15), rgba(11,10,9,.75)); }
.day-visual .stack { position: absolute; inset: auto 22px 22px 22px; display: grid; gap: 12px; z-index: 1; }
.day-visual .scene-card { width: 100%; }
.timeline { list-style: none; margin: 0; padding: 0; display: grid; gap: 26px; }
.timeline li { display: grid; grid-template-columns: 74px 1fr; gap: 18px; }
.timeline time { font-family: var(--serif); font-style: italic; color: var(--gold); font-size: 22px; line-height: 1.3; }
.timeline h3 { margin: 0 0 4px; font-size: 19px; font-weight: 600; }
.timeline p { margin: 0; color: var(--muted); font-size: 16px; }

/* Mood band */
.moods { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 34px; }
.mood {
  padding: 10px 18px; border-radius: 999px; font-size: 15px; font-weight: 600;
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.04);
}
.mood i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 9px; vertical-align: 1px; }

/* Friends */
.friends { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.friend {
  padding: 28px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line);
  display: grid; gap: 10px; align-content: start;
}
.friend .ico { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(217,179,92,.12); color: var(--gold-hi); }
.friend .ico svg { width: 22px; height: 22px; }
.friend h3 { margin: 6px 0 0; font-size: 20px; font-weight: 600; }
.friend p { margin: 0; color: var(--muted); font-size: 16px; }

/* Final call */
.final {
  text-align: center; padding: clamp(90px, 12vw, 160px) 0;
  background:
    radial-gradient(60% 60% at 50% 40%, rgba(217,179,92,.14), transparent 70%),
    var(--bg);
}
.final img.mark { width: 108px; height: 108px; border-radius: 26px; margin: 0 auto 30px; box-shadow: 0 24px 60px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.06); }
.final .display { font-size: clamp(40px, 6.4vw, 84px); }
.final .lede { margin: 22px auto 0; }
.final .hero-cta { margin-top: 34px; }

/* Footer */
.footer { border-top: 1px solid var(--line); padding: 44px 0 56px; color: var(--muted); font-size: 14px; }
.footer .shell { display: grid; grid-template-columns: 1fr auto; gap: 26px 40px; align-items: start; }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 22px; justify-content: flex-end; }
.footer nav a { text-decoration: none; }
.footer nav a:hover { color: var(--text); }
.footer .legal-line { grid-column: 1 / -1; color: var(--faint); font-size: 13px; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* ---------- Document pages (privacy, terms, support…) ---------- */
.doc-header { border-bottom: 1px solid var(--line); padding: 20px 0; position: sticky; top: 0; z-index: 10; background: rgba(11,10,9,.86); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); }
.doc-header .shell { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.doc-header .back { color: var(--muted); text-decoration: none; font-size: 15px; }
.doc-header .back:hover { color: var(--text); }
.doc { padding: 64px 0 96px; }
.doc .shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 56px; align-items: start; }
.doc-nav { position: sticky; top: 100px; display: grid; gap: 4px; font-size: 14.5px; }
.doc-nav a { color: var(--muted); text-decoration: none; padding: 7px 12px; border-radius: 10px; }
.doc-nav a:hover { color: var(--text); background: var(--surface); }
.doc-nav a[aria-current="page"] { color: var(--gold-hi); background: rgba(217,179,92,.1); }
.prose { max-width: 760px; }
.prose h1 { margin: 0 0 10px; font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(38px, 5vw, 56px); line-height: 1.05; }
.prose .meta { color: var(--muted); font-size: 14px; margin: 0 0 34px; }
.prose .intro { font-size: 19px; color: #ddd6c9; }
.prose h2 { margin: 48px 0 12px; font-size: 24px; font-weight: 600; letter-spacing: -.01em; scroll-margin-top: 100px; }
.prose h3 { margin: 28px 0 8px; font-size: 18px; font-weight: 600; }
.prose p, .prose li { color: #d3ccbf; font-size: 16.5px; }
.prose ul, .prose ol { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose a { color: var(--gold-hi); text-underline-offset: 3px; }
.prose strong { color: var(--text); }
.prose .table-wrap { overflow-x: auto; margin: 18px 0; border: 1px solid var(--line); border-radius: 16px; }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 12px 14px; border-bottom: 1px solid var(--line); color: #d3ccbf; }
.prose th { color: var(--text); font-weight: 600; background: var(--surface); }
.prose tr:last-child td { border-bottom: 0; }
.prose .callout { padding: 18px 20px; border-radius: 16px; background: rgba(217,179,92,.08); border: 1px solid rgba(217,179,92,.22); margin: 20px 0; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .steps, .friends { grid-template-columns: 1fr; }
  .day { grid-template-columns: 1fr; }
  .day-visual { min-height: 440px; }
  .topbar nav a:not(.keep) { display: none; }
  .doc .shell { grid-template-columns: 1fr; gap: 28px; }
  .doc-nav { position: static; display: flex; flex-wrap: wrap; gap: 6px; }
  .doc-nav a { border: 1px solid var(--line); }
  .footer .shell { grid-template-columns: 1fr; }
  .footer nav { justify-content: flex-start; }
}
@media (max-width: 520px) {
  :root { --shell: calc(100vw - 32px); }
  .hero-inner { padding-bottom: 48px; }
  .companion { width: 180px; }
  .timeline li { grid-template-columns: 1fr; gap: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .companions { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .scene-swap { transition: none; }
}

#day { padding-top: clamp(48px, 7vw, 110px); }
