/* ==========================================================================
   Wedge Timer — wedgetimer.com
   System: "precision instrument on paper". The app is a software rendering of
   a physical classroom object, so the site is laid out like the object's own
   documentation: paper canvas, one decisive red, mono for anything that is a
   measurement.

   Every colour below is lifted from WedgeTimer/Views/Theme.swift, not invented:
     --red    WedgeColor.classic  rgb(0.847, 0.137, 0.169)
     --paper  AppBackground light rgb(0.973, 0.973, 0.965)
     --ink-d  AppBackground dark  Color(white: 0.055)
   The seven chips in .chips are the seven real WedgeColor cases.

   Motion contract: one sweep of the hero dial on load, nothing else. The dial
   sweeping IS the product; anything beyond it would be decoration. All of it
   is disabled under prefers-reduced-motion.
   ========================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --red: #d8232b;
  --red-dark: #ae161d;
  --red-wash: rgba(216, 35, 43, 0.08);

  --paper: #f8f8f6;
  --band: #efeeea;
  --card: #ffffff;
  --line: #e0ded6;
  --line-2: #c9c6bc;

  --ink: #17160f;
  --ink-2: #55524a;
  --ink-3: #837f75;

  --f-display: "Clash Display", "Avenir Next", "Helvetica Neue", sans-serif;
  --f-body: "Switzer", -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, sans-serif;
  --f-mono: "Fragment Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --f-round: ui-rounded, "SF Pro Rounded", "Nunito", var(--f-body);

  --w: 1140px;
  --pad: clamp(20px, 5vw, 40px);
  --r: 14px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.reduce { scroll-behavior: auto; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-wrap: pretty;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: var(--f-display);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.018em;
  text-wrap: balance;
}

a { color: var(--red); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--red-dark); }
img { display: block; max-width: 100%; height: auto; }
ul { list-style: none; }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; border-radius: 4px; }

.wrap { max-width: var(--w); margin: 0 auto; padding-inline: var(--pad); }
.narrow { max-width: 700px; }

/* A measurement label. Used anywhere the page is stating a fact about the
   instrument rather than talking to the reader. */
.tag {
  font-family: var(--f-mono);
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -100%; left: 16px; z-index: 300;
  background: var(--red); color: #fff; padding: 10px 18px;
  border-radius: 10px; font-weight: 600; font-size: 14px; text-decoration: none;
}
.skip-link:focus { top: 14px; color: #fff; }

/* ==========================  nav  ========================== */
.nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  height: 68px;
  padding-inline: var(--pad);
  background: color-mix(in srgb, var(--paper) 82%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(150%);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}
.nav.scrolled { border-bottom-color: var(--line); }
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  color: var(--ink); text-decoration: none;
  font-family: var(--f-display); font-weight: 600; font-size: 18px;
  letter-spacing: -0.01em;
}
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.nav-right { display: flex; align-items: center; gap: clamp(14px, 2.5vw, 26px); }
.nav-right a:not(.btn) {
  color: var(--ink-2); font-size: 15px; font-weight: 500; text-decoration: none;
  transition: color 0.2s;
}
.nav-right a:not(.btn):hover { color: var(--ink); }
@media (max-width: 760px) { .nav-link-hide { display: none; } }

/* ==========================  buttons  ========================== */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--red); color: #fff;
  font-weight: 600; font-size: 16px;
  padding: 14px 26px; border-radius: 999px;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 6px 20px -6px rgba(216, 35, 43, 0.5);
  transition: background 0.2s, transform 0.2s var(--ease), box-shadow 0.2s;
}
.btn:hover {
  background: var(--red-dark); color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -8px rgba(216, 35, 43, 0.55);
}
.btn-sm { padding: 10px 18px; font-size: 14.5px; }
.badge img { height: 46px; width: auto; }

/* ==========================  hero  ========================== */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: clamp(28px, 5vw, 64px);
  align-items: center;
  padding: clamp(44px, 7vw, 88px) 0 clamp(40px, 6vw, 72px);
}
.hero h1 {
  font-size: clamp(2.6rem, 6.4vw, 4.3rem);
  margin: 16px 0 18px;
}
.hero h1 em { font-style: normal; color: var(--red); }
.hero .lede {
  font-size: clamp(1.06rem, 1.9vw, 1.24rem);
  color: var(--ink-2);
  max-width: 34ch;
}
.hero-cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 30px; }
.hero-note { margin-top: 14px; font-size: 14.5px; color: var(--ink-3); }
.hero-note b { color: var(--ink-2); font-weight: 600; }

@media (max-width: 880px) {
  .hero { grid-template-columns: 1fr; text-align: left; padding-top: 34px; }
  .hero-art { order: -1; }
}

/* The live dial. Real geometry, taken from DiscView.swift's DialGeometry:
   ticks at r=0.935, numerals at r=0.815, wedge outer at r=0.735 of the face. */
.dial-wrap { display: grid; place-items: center; }
.dial {
  width: min(100%, 420px); height: auto;
  filter: drop-shadow(0 18px 40px rgba(23, 22, 15, 0.13));
}
.dial-face { fill: var(--card); stroke: var(--line); stroke-width: 1; }
.dial-tick { stroke: var(--ink-3); stroke-linecap: round; }
.dial-tick-major { stroke: var(--ink); stroke-width: 3.4; }
.dial-tick-minor { stroke: var(--line-2); stroke-width: 1.6; }
.dial-num {
  font-family: var(--f-round);
  font-weight: 600; font-size: 20px;
  fill: var(--ink-2);
  text-anchor: middle; dominant-baseline: central;
}
.dial-wedge { fill: var(--red); }
/* Hub and end-cap. The app draws both: a dot at the centre and a dot riding the
   wedge's trailing edge, so the slice reads as a hand rather than a shape. */
.dial-hub,
.dial-cap { fill: var(--card); stroke: rgba(23, 22, 15, 0.14); stroke-width: 1.2; }

/* The sweep is driven from index.html by rewriting the path's d attribute —
   a dash-offset fake cannot produce a true pie slice, and the slice is the
   whole point of the product. Rests at 17 minutes rather than empty, because
   an empty dial is a dead final frame. Reduced motion skips straight to it. */

/* ==========================  claim strip  ========================== */
.strip {
  border-block: 1px solid var(--line);
  background: var(--band);
}
.strip-inner {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}
.strip-item {
  padding: 26px 0;
  border-left: 1px solid var(--line);
  padding-left: 24px;
}
.strip-item:first-child { border-left: 0; padding-left: 0; }
.strip-item b {
  display: block;
  font-family: var(--f-display); font-weight: 600;
  font-size: 1.22rem; letter-spacing: -0.01em;
  margin: 7px 0 3px;
}
.strip-item span { font-size: 14.5px; color: var(--ink-2); }
@media (max-width: 620px) {
  .strip-item { border-left: 0; padding-left: 0; padding-block: 18px; border-top: 1px solid var(--line); }
  .strip-item:first-child { border-top: 0; }
}

/* ==========================  sections  ========================== */
section { padding: clamp(56px, 8vw, 104px) 0; }
section.band { background: var(--band); border-block: 1px solid var(--line); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); margin-bottom: 16px; }
h3 { font-size: 1.16rem; letter-spacing: -0.008em; }
.sec-head { max-width: 620px; margin-bottom: clamp(30px, 4.5vw, 52px); }
.sec-head p { color: var(--ink-2); font-size: 1.06rem; margin-top: 12px; }
p + p { margin-top: 14px; }
.muted { color: var(--ink-2); }

/* Split feature row. Alternates side so the page has a rhythm rather than a
   single centred column. */
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(30px, 6vw, 76px);
  align-items: center;
}
.split + .split { margin-top: clamp(52px, 8vw, 104px); }
.split.flip .split-art { order: -1; }
.split-text h2 { font-size: clamp(1.6rem, 3vw, 2.15rem); }
.split-text p { color: var(--ink-2); margin-top: 14px; }
@media (max-width: 820px) {
  .split { grid-template-columns: 1fr; }
  .split.flip .split-art { order: 0; }
}

/* ==========================  device frame  ========================== */
/* The screenshots are real captures, so the status bar and Dynamic Island are
   real pixels — this frame only supplies the bezel around them. */
.phone {
  position: relative;
  width: min(100%, 300px);
  margin-inline: auto;
  border-radius: 40px;
  padding: 9px;
  background: linear-gradient(160deg, #2c2b28, #16151300 45%, #0d0d0c);
  background-color: #1d1c1a;
  box-shadow:
    0 2px 3px rgba(255, 255, 255, 0.28) inset,
    0 30px 60px -24px rgba(23, 22, 15, 0.42),
    0 8px 18px -10px rgba(23, 22, 15, 0.3);
}
.phone img { border-radius: 32px; width: 100%; }
.phone-lg { width: min(100%, 340px); }

/* ==========================  live reveal screen  ========================== */
/* A recreation of the running app screen rather than a screenshot, so the
   reveal can actually play. Real assets and real geometry; proportions are the
   iPhone 16 Pro's 402×874pt, and every size below is a fraction of the frame
   width so it scales with the phone. */
.live {
  position: relative;
  aspect-ratio: 402 / 874;
  border-radius: 32px;
  overflow: hidden;
  container-type: inline-size;
  background: var(--paper);
  color: #17160f;
  font-family: var(--f-round);
  isolation: isolate;
}
.live-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  z-index: 0;
}
/* SceneBackground.veil — meadow is 0.34, faded toward the app's page colour so
   the white disc keeps separating from the scene across a room. */
.live-veil { position: absolute; inset: 0; background: #f8f8f6; opacity: 0.34; z-index: 1; }

.live > :not(.live-bg):not(.live-veil) { position: relative; z-index: 2; }

.live-status {
  display: flex; align-items: center; justify-content: space-between;
  padding: 3.2cqw 6cqw 0;
  height: 12cqw;
}
.live-time { font-weight: 600; font-size: 4.4cqw; letter-spacing: -0.01em; }
.live-island {
  width: 31cqw; height: 8.9cqw; border-radius: 999px; background: #000;
  position: absolute; left: 50%; top: 3cqw; transform: translateX(-50%);
}
.live-icons { display: inline-flex; align-items: center; gap: 1.6cqw; color: #17160f; }

.live-head {
  display: flex; align-items: center; gap: 2.4cqw;
  padding: 3.4cqw 5.6cqw 0;
}
.live-title { font-weight: 600; font-size: 4.6cqw; color: #7a776f; margin-right: auto; }
.live-glass {
  display: grid; place-items: center;
  width: 9.4cqw; height: 9.4cqw; border-radius: 50%;
  background: rgba(255, 255, 255, 0.62);
  box-shadow: 0 1px 3px rgba(23, 22, 15, 0.1);
  color: #3b3831;
}

.live-disc { padding: 4.5cqw 5.5cqw 0; }
.live-disc svg { width: 100%; height: auto; display: block; overflow: visible; }

.live-readout {
  text-align: center;
  font-size: 16cqw; font-weight: 500;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  margin-top: 3.4cqw;
}

.live-actions {
  display: grid; grid-template-columns: 1fr 1.25fr;
  gap: 3cqw; padding: 3.4cqw 6cqw 0;
}
.live-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 2cqw;
  height: 12.4cqw; border-radius: 999px;
  font-size: 4.3cqw; font-weight: 600;
}
.live-btn-ghost {
  background: rgba(255, 255, 255, 0.66);
  box-shadow: inset 0 0 0 0.35cqw rgba(23, 22, 15, 0.08);
  color: #17160f;
}
.live-btn-red { background: #d8232b; color: #fff; }

.live-presets { display: flex; gap: 2.2cqw; padding: 3cqw 5cqw 0; }
.live-chip {
  flex: 1;
  display: grid; grid-template-columns: auto 1fr; align-items: center;
  column-gap: 1.6cqw; row-gap: 0;
  padding: 2.4cqw 2.6cqw;
  border-radius: 4cqw;
  background: rgba(255, 255, 255, 0.66);
  font-size: 3.4cqw;
}
.live-chip i { width: 2.4cqw; height: 2.4cqw; border-radius: 50%; grid-row: 1 / 3; }
.live-chip b { font-weight: 600; }
.live-chip em { font-style: normal; color: #6d6a62; font-size: 3.1cqw; }

.live-free {
  text-align: center; font-size: 3.3cqw; color: #7a776f;
  margin-top: 4cqw; font-style: italic;
}
.live-home {
  position: absolute; left: 50%; bottom: 2.2cqw; transform: translateX(-50%);
  width: 35cqw; height: 1.3cqw; border-radius: 999px; background: rgba(23, 22, 15, 0.55);
}

/* The finish payoff, matching the app's spring: the uncovered picture gets a
   beat of its own rather than the wedge simply vanishing. */
#liveArt { transform-origin: 200px 200px; transition: transform 0.5s cubic-bezier(0.2, 1.5, 0.4, 1); }
.live.finished #liveArt { transform: scale(1.04) rotate(3deg); }
@media (prefers-reduced-motion: reduce) {
  #liveArt { transition: none; }
  .live.finished #liveArt { transform: none; }
}

.shots {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: clamp(26px, 4vw, 46px);
  align-items: start;
}
.shot figcaption { margin-top: 18px; font-size: 15px; color: var(--ink-2); }
.shot figcaption b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 3px; }

/* ==========================  colour chips  ========================== */
/* The seven real WedgeColor cases. Data, not decoration. */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 20px; }
.chip {
  width: 30px; height: 30px; border-radius: 50%;
  box-shadow: 0 1px 3px rgba(23, 22, 15, 0.22), 0 0 0 1px rgba(23, 22, 15, 0.06) inset;
}

/* ==========================  spec table  ========================== */
.spec { border-top: 1px solid var(--line); }
.spec-row {
  display: grid;
  grid-template-columns: minmax(120px, 200px) minmax(0, 1fr);
  gap: 16px clamp(20px, 4vw, 48px);
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: baseline;
}
.spec-row dd { color: var(--ink-2); font-size: 16px; }
@media (max-width: 560px) {
  .spec-row { grid-template-columns: 1fr; gap: 4px; padding: 15px 0; }
}

/* ==========================  reasons  ========================== */
.reasons {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: clamp(26px, 3.6vw, 44px);
}
.reason { border-top: 2px solid var(--ink); padding-top: 18px; }
.reason:nth-child(1) { border-top-color: var(--red); }
.reason h3 { margin-bottom: 8px; }
.reason p { color: var(--ink-2); font-size: 15.5px; }

/* ==========================  faq  ========================== */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  padding: 20px 40px 20px 0;
  position: relative;
  font-family: var(--f-display); font-weight: 600;
  font-size: 1.06rem; letter-spacing: -0.008em;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 50%;
  width: 11px; height: 11px;
  border-right: 2px solid var(--ink-3); border-bottom: 2px solid var(--ink-3);
  transform: translateY(-70%) rotate(45deg);
  transition: transform 0.25s var(--ease);
}
.faq details[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq details p { color: var(--ink-2); padding-bottom: 20px; max-width: 66ch; font-size: 16px; }

/* ==========================  closing cta  ========================== */
.close-cta { text-align: center; }
.close-cta .btn { margin-top: 8px; }
.close-cta .icon-lg {
  width: 82px; height: 82px; border-radius: 19px; margin: 0 auto 22px;
  box-shadow: 0 12px 30px -10px rgba(23, 22, 15, 0.32);
}

/* ==========================  footer  ========================== */
footer {
  border-top: 1px solid var(--line);
  padding: 44px 0 60px;
  font-size: 15px; color: var(--ink-2);
}
.foot-grid {
  display: flex; flex-wrap: wrap; gap: 20px 40px;
  justify-content: space-between; align-items: flex-start;
}
footer nav { display: flex; flex-wrap: wrap; gap: 12px 26px; }
footer nav a { color: var(--ink-2); text-decoration: none; }
footer nav a:hover { color: var(--red); }
.foot-legal { margin-top: 26px; font-size: 13.5px; color: var(--ink-3); max-width: 60ch; }

/* ==========================  long-form docs  ========================== */
.doc { padding: clamp(38px, 6vw, 66px) 0 clamp(50px, 7vw, 80px); }
.doc h1 { font-size: clamp(2rem, 4.6vw, 2.7rem); margin-bottom: 10px; }
.doc .updated { font-family: var(--f-mono); font-size: 12.5px; color: var(--ink-3); margin-bottom: 34px; letter-spacing: 0.03em; }
.doc h2 { font-size: 1.5rem; margin: 44px 0 14px; }
.doc h3 { font-size: 1.1rem; margin: 30px 0 8px; }
.doc p, .doc li { color: var(--ink-2); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul { padding-left: 20px; list-style: disc; }
.doc li { margin-bottom: 8px; }
.doc .callout {
  background: var(--card);
  border-left: 3px solid var(--red);
  border-radius: 0 var(--r) var(--r) 0;
  padding: 20px 24px;
  margin: 26px 0;
}
.doc .callout p { color: var(--ink); }

/* ==========================  dark  ========================== */
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0e0e0e;      /* AppBackground dark, Color(white: 0.055) */
    --band: #161614;
    --card: #1b1b19;
    --line: #2c2b28;
    --line-2: #3d3c37;
    --ink: #f3f1ea;
    --ink-2: #b0aca2;
    --ink-3: #85817a;
    --red: #f0484f;
    --red-dark: #ff6a70;
    --red-wash: rgba(240, 72, 79, 0.12);
  }
  .dial { filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5)); }
  .dial-face { fill: #fbfaf7; stroke: #2c2b28; }
  .dial-num { fill: #55524a; }
  .dial-tick-major { stroke: #17160f; }
  .dial-tick-minor { stroke: #c9c6bc; }
  .dial-wedge { fill: #d8232b; }   /* the dial face stays white in dark mode,
                                      so the wedge keeps the app's exact red */
  .dial-hub,
  .dial-cap { fill: #fbfaf7; stroke: rgba(23, 22, 15, 0.16); }
  .btn { box-shadow: 0 6px 20px -8px rgba(240, 72, 79, 0.4); }
  .btn:hover { color: #17160f; }
  .btn { color: #17160f; }
  .badge img { filter: invert(1); }
  .reason { border-top-color: var(--ink-2); }
  .reason:nth-child(1) { border-top-color: var(--red); }
}
