/* ==========================================================================
   Adesse — sales site stylesheet
   Derived exactly from docs/website-design.md ("Look up" direction, approved
   2026-07-07). Tokens §3, type §4, motion §6. Grayscale belongs to the phone;
   warm color belongs to life. No gradients. Sentence case everywhere.
   ========================================================================== */

:root {
  /* §3 color tokens */
  --paper: #FAF6EF;        /* Morning Paper — page background */
  --card: #FFFDF8;         /* Card White — raised surfaces */
  --ink: #26221E;          /* Graphite — text, filled buttons */
  --taupe: #5B5348;        /* Warm Taupe — secondary text */
  --marigold: #E8A13C;     /* Marigold — the life color, non-text only */
  --amber-ink: #8A5410;    /* Amber Ink — links, text-level accent */
  --night: #211D19;        /* Nightstand — dark bands */
  --hairline: #E9E2D6;

  /* Derived, non-token tints (Marigold over Paper — the "warm field") */
  --warm-field: #F5E2C2;
  --gray-field: #ECEAE6;   /* the pre-warm state of the signature moment */
  --ink-hover: #3A342E;    /* Graphite, lifted — button/nav hover */
  --muted-on-night: #B7AFA4; /* secondary text on Nightstand (AA 7.6:1) */

  /* §4 type */
  --serif: "Literata", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", system-ui, "Segoe UI", sans-serif;

  --measure: 65ch;
  --container: 72rem;
}

/* ---- Reset-adjacent ---- */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.1875rem;             /* 19px body — accessibility floor */
  font-weight: 400;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

/* Visible keyboard focus — 2px Amber Ink, offset 2 (plan §4) */
:focus-visible {
  outline: 2px solid var(--amber-ink);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  z-index: 99;
  font-family: var(--sans);
}
.skip-link:focus { left: 0.5rem; top: 0.5rem; }

/* ---- Type scale (§4) ---- */
h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.75rem, 6.5vw, 5rem); }
h2 { font-size: clamp(2.125rem, 4vw, 3rem); line-height: 1.12; }
h3 { font-size: clamp(1.375rem, 2vw, 1.75rem); line-height: 1.25; }

/* One italic emphasis word per key headline — Amber Ink, the small delight */
h1 em, h2 em {
  font-style: italic;
  color: var(--amber-ink);
}

p { max-width: var(--measure); }
p + p { margin-top: 1rem; }

a { color: var(--amber-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }

.eyebrow {
  font-family: var(--sans);
  font-size: 0.9375rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--amber-ink);
  margin-bottom: 0.875rem;
}

.lede { font-size: 1.25rem; }
.muted { color: var(--taupe); }
.small {
  font-family: var(--sans);
  font-size: 0.9375rem;
  color: var(--taupe);
}

/* ---- Layout ---- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }
.section h2 { margin-bottom: 1.25rem; }

.section--hairline { border-top: 1px solid var(--hairline); }

.section--night {
  background: var(--night);
  color: var(--paper);
}
.section--night .eyebrow { color: var(--marigold); }
.section--night .muted,
.section--night .small { color: var(--muted-on-night); }
.section--night h2 em { color: var(--marigold); }

/* Focus indicators on dark bands: Amber Ink fails 3:1 there; Marigold passes */
.section--night :focus-visible,
.site-footer :focus-visible { outline-color: var(--marigold); }

/* ---- Header / nav ---- */
.site-header {
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.375rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.01em;
}
/* The mark ("Beyond the phone"): grayscale phone silhouette, marigold sun
   rising behind it. Phone body uses currentColor so it inverts on dark
   surfaces; the sun stays Marigold everywhere. */
.wordmark-mark { display: block; flex: none; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  font-family: var(--sans);
  font-size: 1rem;
}
.site-nav a { color: var(--ink); text-decoration: none; }
.site-nav a:hover { color: var(--amber-ink); }
.site-nav .nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 0.5rem 1.1rem;
  border-radius: 12px;
}
.site-nav .nav-cta:hover { color: var(--paper); background: var(--ink-hover); }

/* ---- Buttons ---- */
.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 1.0625rem;
  font-weight: 600;
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  padding: 0.9rem 1.75rem;
  border-radius: 12px;
  transition: background-color 200ms ease, transform 200ms ease;
}
.btn:hover { background: var(--ink-hover); transform: translateY(-1px); }
.section--night .btn { background: var(--paper); color: var(--ink); }
.section--night .btn:hover { background: var(--card); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  margin-top: 1.75rem;
}

/* ---- Waitlist form (pre-launch CTA) ---- */
.waitlist-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1.75rem;
  max-width: 34rem;
}
.waitlist-form input[type="email"] {
  flex: 1 1 14rem;
  font-family: var(--sans);
  font-size: 1.0625rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--taupe);   /* ≥3:1 boundary on Paper (WCAG 1.4.11) */
  border-radius: 12px;
  padding: 0.85rem 1rem;
}
.waitlist-form input[type="email"]::placeholder { color: var(--taupe); }
button.btn { border: 0; cursor: pointer; }
button.btn:disabled { opacity: 0.7; cursor: default; transform: none; }
.waitlist-form .form-note,
.waitlist-form .form-msg { flex-basis: 100%; margin: 0; }
.form-msg:empty { display: none; }
.form-msg[data-state="error"] { color: var(--amber-ink); }
.section--night .form-msg[data-state="error"] { color: var(--marigold); }

.trust-line { margin-top: 1rem; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
/* Honeypot: offscreen, never display:none (bots skip that) */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

/* ==========================================================================
   Hero — the signature color-return moment (§2 of the plan).
   The scene warms into color while the phone in it stays grayscale.
   ========================================================================== */
.hero { padding-block: clamp(3rem, 7vw, 5.5rem); }
.hero .container {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-copy .lede { margin-top: 1.5rem; }

.hero-scene {
  background: var(--warm-field);
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 3.5rem) clamp(1.5rem, 3vw, 3rem);
  display: flex;
  justify-content: center;
  animation: warm-in 2000ms ease-out 300ms both;
}
@keyframes warm-in {
  from { background-color: var(--gray-field); }
  to   { background-color: var(--warm-field); }
}

/* Mid-page echo of the signature (§3 "the turn") — warms on scroll */
.warm-echo {
  background: var(--gray-field);
  border-radius: 24px;
  padding: clamp(2rem, 4vw, 3rem);
  transition: background-color 1600ms ease-out;
}
.warm-echo.in-view { background: var(--warm-field); }

@media (prefers-reduced-motion: reduce) {
  .hero-scene { animation: none; background: var(--warm-field); }
  .warm-echo { transition: none; background: var(--warm-field); }
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* ---- The phone: grayscale by design, drawn honestly (real launcher look,
       real hardware cues: punch-hole camera, power + volume on the right).
       Everything inside .phone is PURE gray — no warm cast. ---- */
.phone {
  position: relative;
  width: min(272px, 70vw);
  aspect-ratio: 9 / 19;
  background: #2A2A2A;                 /* neutral gray bezel, not warm */
  border-radius: 36px;
  padding: 12px;
  box-shadow: 0 24px 48px rgba(38, 34, 30, 0.18);
}
/* Side buttons, frame-colored like the real device: power above, volume rocker below. */
.phone::before,
.phone::after {
  content: "";
  position: absolute;
  left: 100%;
  width: 3px;
  border-radius: 0 2px 2px 0;
  background: #2A2A2A;
}
.phone::before { top: 26%; height: 7.5%; }   /* power */
.phone::after  { top: 35.5%; height: 14%; }  /* volume */
.phone-screen {
  position: relative;
  background: #FCFCFC;
  border-radius: 26px;
  height: 100%;
  padding: 1.5rem 1.375rem;
  display: flex;
  flex-direction: column;
  font-family: var(--sans);
  color: #1B1B1B;
}
/* Centered punch-hole front camera in the status-bar strip, above the clock. */
.phone-screen::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #1B1B1B;                 /* flat dot — no bevel, no highlight */
}
.phone-time {
  font-size: 2.25rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  color: #1B1B1B;
}
.phone-date {
  font-size: 0.8125rem;
  color: #8A8A8A;
  margin-bottom: 1.75rem;
}
.phone-apps { list-style: none; }
.phone-apps li {
  font-size: 1.0625rem;
  font-weight: 500;
  padding-block: 0.55rem;
  border-bottom: 1px solid #EFEFEF;
}
.phone-apps li:last-child { border-bottom: 0; }
.phone-settings {
  margin-top: auto;
  font-size: 0.8125rem;
  color: #8A8A8A;
}

/* ==========================================================================
   Section 2 — self-recognition: the flat stat, modest size (never a hero)
   ========================================================================== */
.stat-line {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  font-weight: 500;
  max-width: 28ch;
  line-height: 1.3;
}

/* ==========================================================================
   Section 4 — "does it end?" stays/goes columns
   ========================================================================== */
.rule-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  margin-top: 2.5rem;
  max-width: 56rem;
}
.rule-col {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 1.75rem 1.75rem 1.5rem;
}
.rule-col h3 { margin-bottom: 0.375rem; }
.rule-col .small { margin-bottom: 1rem; }
.rule-col ul { list-style: none; font-family: var(--sans); font-size: 1.0625rem; }
.rule-col li { padding-block: 0.4rem; display: flex; gap: 0.625rem; align-items: baseline; }
.rule-col li::before { font-weight: 600; }
.rule-col--stays li::before { content: "✓"; color: var(--amber-ink); }
.rule-col--goes li::before { content: "—"; color: var(--taupe); }
.rule-col--goes { color: var(--taupe); }

/* ==========================================================================
   Section 5 — app categories + honest notes
   ========================================================================== */
/* Mobile-first: a simple vertical stack of full-width cards (plenty of room to
   scroll down — no need to hide any of the five behind a swipe). */
.category-grid {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin-top: 2.5rem;
}
.category-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 200ms ease;
}
.category-card:hover { transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) {
  .category-card { transition: none; }
  .category-card:hover { transform: none; }
}
.category-card h3 { font-size: 1.1875rem; margin-bottom: 0.5rem; }
.category-card p { font-family: var(--sans); font-size: 1rem; color: var(--taupe); }

/* Desktop: the five equal cards become one row you drag or scroll through — no
   orphaned fifth card, no full-width band. A manual carousel: user-driven only,
   never autoplays (the anti-hijack promise applies to our own site, §6). ~Four
   show with the next peeking. Grab-and-drag the cards (see the script) or use
   the pill scrollbar below. */
@media (min-width: 860px) {
  .category-grid {
    flex-direction: row;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 1rem;                  /* room for the scrollbar below the cards */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;                 /* Firefox */
    scrollbar-color: var(--taupe) var(--hairline);
  }
  .category-grid:focus-visible { outline: 2px solid var(--amber-ink); outline-offset: 4px; }
  .category-grid.is-draggable { cursor: grab; }
  .category-grid.dragging { cursor: grabbing; scroll-snap-type: none; user-select: none; }
  /* A soft pill scrollbar (WebKit) — a clear, on-brand scroll affordance. */
  .category-grid::-webkit-scrollbar { height: 10px; }
  .category-grid::-webkit-scrollbar-track {
    background: var(--hairline);
    border-radius: 999px;
    margin: 0 2px;
  }
  .category-grid::-webkit-scrollbar-thumb {
    background: var(--taupe);
    border-radius: 999px;
  }
  .category-grid::-webkit-scrollbar-thumb:hover { background: var(--amber-ink); }
  .category-card {
    flex: 0 0 clamp(240px, 30%, 300px);    /* fixed width → the row overflows into a carousel */
    scroll-snap-align: start;
  }
}

.honest-notes {
  margin-top: 2.5rem;
  background: var(--card);
  border: 1px solid var(--hairline);
  border-left: 3px solid var(--marigold);   /* Marigold as accent, non-text */
  border-radius: 16px;
  padding: 1.75rem 2rem;
  max-width: 56rem;
}
.honest-notes h3 { margin-bottom: 1rem; }
.honest-notes ul { list-style: none; }
.honest-notes li + li { margin-top: 1rem; }
.honest-notes strong { font-family: var(--sans); font-size: 1.0625rem; }
.honest-notes li p { font-family: var(--sans); font-size: 1.0625rem; color: var(--taupe); margin-top: 0.2rem; }

/* ==========================================================================
   Section 7 — the object: condition tiers as finishes
   ========================================================================== */
.tier-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.25rem;
  margin-top: 2.5rem;
  max-width: 60rem;
}
.tier-card {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: 1.75rem;
}
.tier-card h3 { margin-bottom: 0.625rem; }
.tier-card p { font-family: var(--sans); font-size: 1.0625rem; color: var(--taupe); }
.spec-note { margin-top: 2rem; }

/* ==========================================================================
   Section 9 — founder note
   ========================================================================== */
.founder-note {
  background: var(--card);
  border: 1px solid var(--hairline);
  border-radius: 16px;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  max-width: 46rem;
}
.founder-note blockquote p { font-size: 1.1875rem; }
.founder-sig { margin-top: 1.25rem; }

/* ==========================================================================
   Section 11 — FAQ (native details/summary)
   ========================================================================== */
.faq-list { margin-top: 2rem; max-width: 56rem; }
.faq-list details {
  border-top: 1px solid var(--hairline);
  padding-block: 1.125rem;
}
.faq-list details:last-child { border-bottom: 1px solid var(--hairline); }
.faq-list summary {
  font-family: var(--sans);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;              /* replace the browser triangle... */
  position: relative;
  padding-left: 1.6rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::before {      /* ...with a calm +/− inside the padding */
  content: "+";
  position: absolute;
  left: 0;
  color: var(--amber-ink);
}
.faq-list details[open] summary::before { content: "−"; }
.faq-list summary:hover { color: var(--amber-ink); }
.faq-list details p {
  margin-top: 0.75rem;
  padding-left: 1.6rem;
  color: var(--taupe);
}

/* ==========================================================================
   Section 12 + footer
   ========================================================================== */
.final-cta h2 { max-width: 22ch; }
.closing-line {
  margin-top: 2.5rem;
  font-style: italic;
  font-size: 1.25rem;
}

.site-footer {
  background: var(--night);
  color: var(--muted-on-night);
  font-family: var(--sans);
  font-size: 0.9375rem;
  padding-block: 2.5rem;
}
.site-footer .container { display: grid; gap: 0.625rem; }
.site-footer .no-feed { color: var(--paper); font-family: var(--serif); font-style: italic; font-size: 1.0625rem; }
.site-footer a { color: var(--muted-on-night); }

/* ---- Reveal-on-scroll (gentle, gated by reduced-motion in JS too) ---- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 500ms ease, transform 500ms ease; }
.reveal.in-view { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  /* Peek crop: show the top of the phone (time + Phone/Messages/Maps rows) and
     clip after Maps, so the headline and waitlist form land within the first
     scroll. 332px (not 300px) so "Maps" isn't cut off mid-line. The rest of the
     list (Music, Camera, Bank, Settings) reveals as you scroll the first screen
     — driven by the reveal script below, then it STOPS at the phone's bottom.
     A finite list, not a feed. Static (this crop) if JS off / reduced-motion. */
  .hero-scene {
    order: -1;
    height: 332px;
    overflow: hidden;
    align-items: flex-start;
    padding-block: 2rem 0;
  }
  .phone { width: min(230px, 60vw); will-change: transform; }
  .rule-columns { grid-template-columns: 1fr; }
  /* Nav stays fully reachable: wrap under the wordmark, never hide links */
  .site-header .container { flex-wrap: wrap; row-gap: 0.75rem; }
  .site-nav { flex-wrap: wrap; gap: 1.1rem; font-size: 0.9375rem; }
}
