/* =========================================================================
   MatchGrain — shared styles
   -------------------------------------------------------------------------
   Self-contained: no external fonts, icons, or CDNs.
   Based on the "Dark Analog" design. The Google Fonts from the original
   (DM Serif Display / DM Mono) are swapped for a system serif + mono stack
   so the page makes zero external requests. To re-skin, edit :root below.
   ========================================================================= */

:root {
  /* Colours (Dark Analog) */
  --bg:          #131109;
  --bg2:         #17130b;
  --surface:     #1e1b12;
  --surfaceAlt:  #2a2518;
  --border:      #332e1e;
  --border-soft: #28230f;
  --text:        #ecdfc5;
  --muted:       #8c7e5e;   /* nudged lighter than the original #7a6e52 for AA contrast */
  --muted-2:     #b6a784;   /* body copy */
  --accent:      #c8823a;
  --accent-deep: #a8692c;
  --ink:         #0f0d06;

  /* Type — system substitutes for DM Serif Display / DM Mono */
  --serif: 'Didot', 'Hoefler Text', 'Big Caslon', Georgia, 'Times New Roman', serif;
  --mono:  ui-monospace, 'SF Mono', 'SFMono-Regular', Menlo, Monaco, 'Cascadia Mono', Consolas, monospace;
}

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

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

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--accent); color: var(--ink); }
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }

/* page-wide film grain + lit vignette (self-contained SVG noise) */
.page::before {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 9000;
  opacity: 0.05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)'/%3E%3C/svg%3E");
}
.page::after {
  content: ''; position: fixed; inset: 0; pointer-events: none; z-index: -1;
  background:
    radial-gradient(120% 70% at 78% -8%, rgba(200,130,58,0.10), transparent 55%),
    radial-gradient(140% 90% at 50% 0%, var(--bg2), var(--bg) 60%);
}

/* ---- Accessibility helpers ------------------------------------------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 50%; top: -60px; transform: translateX(-50%);
  background: var(--accent); color: var(--ink); font-family: var(--mono);
  padding: 0.6rem 1rem; border-radius: 0 0 10px 10px; font-weight: 600;
  z-index: 9999; transition: top 0.15s ease; text-decoration: none;
}
.skip-link:focus { top: 0; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; border: 0; clip: rect(0 0 0 0);
  clip-path: inset(50%); overflow: hidden; white-space: nowrap;
}

/* ---- Layout ----------------------------------------------------------- */
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 32px; width: 100%; }
.narrow { max-width: 760px; }
.center { text-align: center; }

/* ---- Typography ------------------------------------------------------- */
.display {
  font-family: var(--serif); font-weight: 400; line-height: 1.04;
  letter-spacing: -0.01em; color: var(--text);
}
.eyebrow {
  font-family: var(--mono); font-size: 12px; letter-spacing: 0.28em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 22px;
}
.lede, .body-lg { font-family: var(--mono); color: var(--muted-2); line-height: 1.75; }

/* ---- Nav -------------------------------------------------------------- */
.nav {
  position: sticky; top: 0; z-index: 1000;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border-soft);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.wordmark {
  display: flex; align-items: center; gap: 11px; text-decoration: none;
  font-family: var(--serif); font-size: 22px; color: var(--text); letter-spacing: 0.01em;
}
.wm-mark { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); position: relative; flex-shrink: 0; }
.wm-mark::after { content: ''; position: absolute; inset: 3px; border-radius: 50%; background: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 8px; }
.nav-link {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  color: var(--muted-2); text-decoration: none; padding: 9px 14px; border-radius: 30px;
  transition: color 0.18s, background 0.18s;
}
.nav-link:hover { color: var(--text); background: var(--surface); }
.nav-cta {
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em;
  color: var(--text); text-decoration: none; padding: 9px 16px;
  border: 1px solid var(--border); border-radius: 30px; transition: all 0.18s;
}
.nav-cta:hover { border-color: var(--accent); color: var(--accent); }
.nav-cta .arr { margin-left: 4px; }

/* ---- Device frame (real iPhone 16 Pro, Desert Titanium PNG) ----------- */
.phone {
  position: relative; width: var(--phone-w, 260px); aspect-ratio: 1350 / 2760; flex-shrink: 0;
  filter: drop-shadow(0 34px 60px rgba(0,0,0,0.55));
}
.phone-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none;
}
.phone-screen {
  position: absolute; top: 2.5%; left: 5.333%; width: 89.26%; height: 94.964%;
  object-fit: cover; border-radius: 9%; z-index: 1; background: #000;
}

.device-glow {
  position: absolute; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(200,130,58,0.22), transparent 65%);
  filter: blur(20px); top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 0;
}
.device-glow.soft { background: radial-gradient(circle, rgba(200,130,58,0.14), transparent 65%); }

/* ---- Hero ------------------------------------------------------------- */
.hero { position: relative; padding-top: 96px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 40px; align-items: center; padding-bottom: 110px; }
.hero-title { font-size: 72px; margin: 4px 0 28px; }
.lede { font-size: 17px; max-width: 440px; margin-bottom: 38px; }
.hero-cta { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.req { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; color: var(--muted); text-transform: uppercase; }
.hero-device { display: flex; justify-content: center; position: relative; }
.hero-device .phone { --phone-w: clamp(224px, 60vw, 268px); }

/* ---- Sprocket divider ------------------------------------------------- */
.sprocket {
  height: 30px; width: 100%; background-color: #0c0a05;
  background-image: radial-gradient(circle at center, var(--surfaceAlt) 3.4px, transparent 3.9px);
  background-size: 26px 30px;
  border-top: 1px solid var(--border-soft); border-bottom: 1px solid var(--border-soft);
}

/* ---- Sections --------------------------------------------------------- */
.section { padding: 104px 0; position: relative; }
.problem { padding: 120px 0; }
.problem .display { font-size: 52px; margin: 6px 0 30px; }
.body-lg { font-size: 18px; }
.center .body-lg { margin: 0 auto; max-width: 600px; }
.section-head { max-width: 640px; margin-bottom: 64px; }
.section-head .display { font-size: 44px; }
.section-sub { font-family: var(--mono); color: var(--muted); font-size: 14px; margin-top: 18px; max-width: 520px; }

/* ---- Steps ------------------------------------------------------------ */
.steps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 36px; }
.step {
  background: linear-gradient(180deg, var(--surface), color-mix(in srgb, var(--surface) 60%, var(--bg)));
  border: 1px solid var(--border); border-radius: 20px;
  padding: 40px 30px 34px; display: flex; flex-direction: column; align-items: center; text-align: center;
}
.step-device { margin-bottom: 30px; }
.step-device .phone { --phone-w: 196px; }
.step-meta { display: flex; align-items: baseline; gap: 12px; margin-bottom: 12px; }
.step-n { font-family: var(--mono); font-size: 13px; color: var(--accent); letter-spacing: 0.1em; }
.step-t { font-family: var(--serif); font-size: 24px; font-weight: 400; color: var(--text); }
.step-d { font-family: var(--mono); font-size: 13.5px; color: var(--muted-2); line-height: 1.7; max-width: 280px; }

/* ---- Highlight band --------------------------------------------------- */
.highlight { padding: 90px 0; }
.highlight-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.hl-device { display: flex; justify-content: center; position: relative; }
.hl-device .phone { --phone-w: clamp(200px, 52vw, 232px); }
.hl-copy .display { font-size: 42px; margin: 6px 0 26px; }

/* ---- Features --------------------------------------------------------- */
.features-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border-soft); border: 1px solid var(--border-soft);
  border-radius: 18px; overflow: hidden;
}
.feature { background: var(--bg); padding: 38px 32px 40px; transition: background 0.2s; }
.feature:hover { background: var(--surface); }
.feature-k { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; color: var(--accent); margin-bottom: 22px; }
.feature-t { font-family: var(--serif); font-size: 23px; font-weight: 400; color: var(--text); margin-bottom: 12px; line-height: 1.15; }
.feature-d { font-family: var(--mono); font-size: 13.5px; color: var(--muted-2); line-height: 1.7; }

/* ---- Roadmap ---------------------------------------------------------- */
.roadmap { border-top: 1px solid var(--border); }
.exposure { display: flex; align-items: center; gap: 28px; padding: 26px 8px; border-bottom: 1px solid var(--border); }
.exp-num { font-family: var(--mono); font-size: 13px; color: var(--muted); letter-spacing: 0.1em; width: 28px; flex-shrink: 0; }
.exp-body { flex: 1; min-width: 0; }
.exp-t { font-family: var(--serif); font-size: 25px; font-weight: 400; color: var(--text); margin-bottom: 3px; }
.exp-d { font-family: var(--mono); font-size: 13.5px; color: var(--muted-2); }
.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 45%, transparent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  padding: 5px 11px; border-radius: 30px; flex-shrink: 0;
}

/* ---- CTA -------------------------------------------------------------- */
.cta { padding: 0 0 110px; }
.cta-inner { padding-top: 100px; }
.cta .display.big { font-size: 64px; margin: 6px 0 40px; }
.center-cta { justify-content: center; margin-bottom: 22px; }

/* ---- App Store badge -------------------------------------------------- */
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--text); color: var(--ink); text-decoration: none;
  border-radius: 14px; padding: 11px 22px 11px 18px;
  transition: transform 0.18s, box-shadow 0.18s; box-shadow: 0 8px 30px rgba(0,0,0,0.35);
}
.appstore:hover { transform: translateY(-2px); box-shadow: 0 14px 40px rgba(0,0,0,0.45); }
.appstore-apple { display: flex; align-items: center; }
.appstore-apple svg { width: 17px; height: 17px; }
.appstore-txt { display: flex; flex-direction: column; line-height: 1; }
.appstore-pre { font-family: var(--mono); font-size: 10px; letter-spacing: 0.06em; opacity: 0.7; margin-bottom: 3px; }
.appstore-name { font-family: var(--serif); font-size: 21px; line-height: 1; }
.appstore-lg { padding: 13px 26px 13px 20px; }

/* ---- Footer ----------------------------------------------------------- */
.footer { border-top: 1px solid var(--border-soft); padding: 40px 0; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer .wordmark { font-size: 19px; }
.foot-links { display: flex; gap: 22px; align-items: center; }
.foot-links a { font-family: var(--mono); font-size: 13px; color: var(--muted-2); text-decoration: none; }
.foot-links a:hover { color: var(--text); }
.foot-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); letter-spacing: 0.04em; }

/* ---- Legal / privacy page -------------------------------------------- */
.legal { max-width: 760px; }
.legal .display { font-size: 46px; margin-bottom: 14px; }
.legal .updated { font-family: var(--mono); color: var(--muted); font-size: 13px; margin-bottom: 40px; letter-spacing: 0.04em; }
.legal h2 { font-family: var(--serif); font-weight: 400; font-size: 26px; color: var(--text); margin: 40px 0 14px; }
.legal p { color: var(--muted-2); margin-bottom: 16px; }
.legal a { color: var(--accent); }
.placeholder-note { background: var(--surface); border: 1px dashed var(--border); border-radius: 16px; padding: 28px; color: var(--muted-2); }

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 10px; padding-bottom: 80px; }
  .hero-title { font-size: 56px; }
  .hero-copy { order: 1; }
  .hero-device { order: 2; margin-top: 30px; }
  .steps-grid { grid-template-columns: 1fr; gap: 24px; max-width: 420px; margin: 0 auto; }
  .highlight-grid { grid-template-columns: 1fr; gap: 40px; }
  .hl-device { order: 2; }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .wrap { padding: 0 22px; }
  .hero { padding-top: 60px; }
  .hero-title { font-size: 44px; }
  .problem .display { font-size: 36px; }
  .section-head .display, .hl-copy .display, .cta .display.big { font-size: 34px; }
  .section { padding: 72px 0; }
  .features-grid { grid-template-columns: 1fr; }
  .exposure { gap: 16px; padding: 22px 4px; flex-wrap: wrap; }
  .exp-t { font-size: 21px; }
  .tag { order: 3; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
