/* Matcha Fix — landing styles. Apple product-page architecture, matcha brand. */
:root {
  /* Apple palette — neutral surfaces, graphite darks, one blue action accent.
     (matcha-* names kept as aliases → point at the accent, so the many existing
     rules that reference them stay valid without a sweep.) */
  --accent: #0071E3;            /* Apple action blue */
  --accent-deep: #0066CC;
  --matcha: #0071E3;            /* alias → accent */
  --matcha-deep: #0071E3;       /* alias → accent (links, kickers, brand) */
  --matcha-dark: #0066CC;       /* alias → accent hover */
  --cream: #f5f5f7;             /* neutral, was warm cream */
  --coral: #E8907C;
  --ink: #1d1d1f;               /* Apple near-black text */
  --ink-soft: #6e6e73;          /* Apple secondary label */
  --line: #e8e8ed;              /* cool hairline */
  --gray: #f5f5f7;              /* Apple's signature neutral surface */
  --gray-2: #fbfbfd;
  --dark: #0b0b0c;              /* Apple graphite-black for dramatic sections */
  --white: #ffffff;
  --radius: 22px;
  --radius-lg: 30px;
  /* Layered, low-opacity soft shadows — the Apple depth signature (§12) */
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04);
  --shadow: 0 2px 6px rgba(0,0,0,.04), 0 12px 32px -12px rgba(0,0,0,.14);
  --shadow-lg: 0 4px 12px rgba(0,0,0,.05), 0 30px 60px -24px rgba(31,31,31,.28);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* Entrances decelerate (ease-out); reversible transitions mirror it */
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-emphasized: cubic-bezier(0.4, 0, 0.2, 1);

  /* ---- Liquid Glass material (from apple.com/os/ios taste map) ----
     Floating chrome is translucent, refracts content under it, and carries a
     specular top edge (light catching the lens) + a faint dark bottom edge for
     thickness. Tint is matcha, not Apple blue — iOS 26's "adjustable tint". */
  --glass-blur: blur(20px) saturate(180%);
  --glass-fill: rgba(255, 255, 255, 0.55);
  /* Specular rim: bright top inset + hairline body + darker underside */
  --glass-edge: inset 0 1px 0 rgba(255, 255, 255, 0.72),
                inset 0 0 0 1px rgba(255, 255, 255, 0.18),
                inset 0 -1px 1px rgba(31, 31, 31, 0.06);
  --glass-lift: 0 8px 30px -14px rgba(31, 31, 31, 0.26);
  /* Apple-blue-tinted glass for interactive pills (iOS 26 tinted glass) */
  --glass-matcha: linear-gradient(180deg, rgba(255,255,255,.28), rgba(255,255,255,.04)), rgba(0, 113, 227, 0.72);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  letter-spacing: 0;            /* body tracking near 0 (§15) */
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* ---------- Header — slim, translucent (Apple nav) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.6);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  /* Specular top edge — light catching the glass — instead of a hard divider */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: box-shadow .3s var(--ease-out), background .3s var(--ease-out);
}
.site-header.is-scrolled {
  background: rgba(255, 255, 255, 0.72);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6),
              0 1px 0 rgba(0, 0, 0, .06),
              0 8px 24px -18px rgba(0, 0, 0, .3);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 52px; }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand img { width: 28px; height: 28px; border-radius: 8px; }
.nav-links { display: flex; align-items: center; gap: 26px; }
.nav-links a { color: var(--ink-soft); font-weight: 500; font-size: 14px; letter-spacing: -0.01em; transition: color .15s ease; }
.nav-links a:hover { color: var(--matcha-deep); }
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  /* Matcha-tinted Liquid Glass pill with a specular rim */
  background: var(--glass-matcha);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  color: #fff; font-weight: 600; font-size: 13px;
  padding: 7px 16px; border-radius: 999px; border: none; cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.5),
              inset 0 -1px 1px rgba(0,0,0,.14),
              0 6px 18px -8px rgba(0, 113, 227, .55);
  transition: transform .12s var(--ease-out), box-shadow .12s var(--ease-out);
  will-change: transform;
}
.btn:hover { color: #fff; box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -1px 1px rgba(0,0,0,.16), 0 10px 24px -8px rgba(0, 113, 227, .65); }
.btn:active { transform: scale(.96); transition-duration: .06s; }
@media (max-width: 720px) { .nav-links a:not(.btn) { display: none; } }

/* ---------- Hero — centered product moment ---------- */
.hero {
  position: relative; overflow: hidden; text-align: center;
  padding: 88px 0 0;
  /* Apple neutral light stage — cool off-white settling to white, no color wash */
  background:
    radial-gradient(70% 50% at 50% 0%, rgba(0,0,0,.05), transparent 60%),
    linear-gradient(180deg, #f5f5f7 0%, #fbfbfd 40%, #fff 100%);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--glass-fill);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-edge), var(--glass-lift);
  color: var(--matcha-deep);
  font-weight: 600; font-size: 13px; letter-spacing: 0;
  padding: 8px 15px; border-radius: 999px; margin-bottom: 22px;
}
.hero h1 {
  font-size: clamp(46px, 8vw, 88px); line-height: 0.98; letter-spacing: -0.045em;
  font-weight: 900; text-wrap: balance; max-width: 14ch;
}
.hero h1 .hl { color: var(--matcha-deep); }
.hero .lead {
  font-size: clamp(18px, 2.3vw, 24px); color: var(--ink-soft);
  margin: 22px auto 30px; max-width: 30em; line-height: 1.42; font-weight: 400; text-wrap: balance;
}
.cta-row { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.appstore {
  display: inline-flex; align-items: center; gap: 12px;
  background: var(--ink); color: #fff; padding: 12px 22px; border-radius: 14px; font-weight: 600;
  transition: transform .12s var(--ease-out); will-change: transform;
}
.appstore small { display: block; font-size: 11px; opacity: .8; font-weight: 500; }
.appstore b { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.appstore:hover { transform: translateY(-1px); }
.appstore:active { transform: scale(.97); transition-duration: .06s; }
.text-link {
  color: var(--matcha-deep); font-weight: 500; font-size: 17px; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: 3px;
}
.text-link span { transition: transform .2s var(--ease-out); }
.text-link:hover span { transform: translateX(3px); }
.hint { font-size: 13px; color: var(--ink-soft); margin-top: 16px; }

.hero-device { position: relative; margin-top: 44px; display: flex; justify-content: center; }
.hero-device img {
  position: relative; z-index: 1;
  width: 100%; max-width: 470px;   /* natural before/after crop — no baked text to hide */
  border-radius: 28px;
  box-shadow:
    0 2px 8px rgba(0,0,0,.05),
    0 60px 90px -34px rgba(31,31,31,.42),
    0 24px 48px -28px rgba(31,31,31,.24);
}
.hero-glow {
  position: absolute; z-index: 0; width: 520px; height: 520px; border-radius: 50%;
  background: radial-gradient(circle, rgba(0,0,0,.06), transparent 66%);
  top: 44%; left: 50%; transform: translate(-50%,-50%); filter: blur(12px);
}

/* ---------- Feature rows — one story per section, alternating (Apple pattern) ---------- */
.feature-row { padding: 108px 0; }
.feature-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center;
}
.feature-row.reverse .feature-text { order: 2; }
.feature-row.reverse .feature-media { order: 1; }
.kicker {
  display: inline-block; font-size: 15px; font-weight: 600; letter-spacing: -0.01em;
  color: var(--matcha-deep); margin-bottom: 14px;
}
.feature-text h2 {
  font-size: clamp(34px, 5vw, 56px); line-height: 1.04; letter-spacing: -0.035em;
  font-weight: 850; text-wrap: balance;
}
.feature-text p {
  color: var(--ink-soft); font-size: clamp(17px, 1.8vw, 20px); line-height: 1.5;
  margin-top: 20px; max-width: 30em;
}
.feature-media { display: flex; justify-content: center; }
.feature-media img {
  width: 100%; max-width: 300px; border-radius: 38px;
  box-shadow: 0 2px 8px rgba(0,0,0,.05), 0 44px 70px -30px rgba(31,31,31,.4);
}

/* Tonal rhythm between sections */
.feature-row.gray { background: var(--gray); }
.feature-row.dark {
  color: #fff;
  /* Apple graphite section — near-black with a soft cool spotlight, no green */
  background:
    radial-gradient(60% 80% at 78% 10%, rgba(255,255,255,.08), transparent 60%),
    linear-gradient(165deg, #1d1d1f 0%, var(--dark) 100%);
}
.feature-row.dark .kicker { color: #2997ff; }   /* Apple's on-dark blue */
.feature-row.dark .feature-text p { color: rgba(255,255,255,.72); }
.feature-row.dark .feature-media img {
  box-shadow: 0 2px 8px rgba(0,0,0,.4), 0 50px 80px -30px rgba(0,0,0,.7);
}

/* ---------- Section shared ---------- */
.section { padding: 104px 0; }
.section-head { text-align: center; max-width: 660px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -0.03em; line-height: 1.05; font-weight: 860; text-wrap: balance; }
.section-head p { color: var(--ink-soft); font-size: clamp(17px, 2vw, 20px); margin-top: 14px; line-height: 1.5; text-wrap: balance; }

/* ---------- CTA band — dark dramatic moment ---------- */
.cta-band {
  position: relative; color: #fff; text-align: center; overflow: hidden;
  /* Apple black closing moment — graphite with a faint cool top glow */
  background:
    radial-gradient(60% 90% at 50% -10%, rgba(41,151,255,.22), transparent 60%),
    linear-gradient(165deg, #1d1d1f 0%, #0b0b0c 100%);
}
.cta-band .wrap { position: relative; z-index: 1; padding-top: 104px; padding-bottom: 104px; display: flex; flex-direction: column; align-items: center; }
.cta-band img.mascot { width: 148px; margin: 0 auto 24px; filter: drop-shadow(0 18px 30px rgba(0,0,0,.28)); }
.cta-band h2 { font-size: clamp(32px, 5vw, 56px); letter-spacing: -0.035em; line-height: 1.02; font-weight: 880; text-wrap: balance; }
.cta-band p { opacity: .92; font-size: clamp(17px, 2vw, 20px); margin: 18px auto 32px; max-width: 30em; line-height: 1.5; }
.cta-band .appstore { background: #fff; color: var(--ink); box-shadow: 0 10px 30px -8px rgba(0,0,0,.35); }

/* ---------- Support ---------- */
.support-card {
  background: linear-gradient(180deg, #fff, var(--gray-2));
  border: 1px solid rgba(0,0,0,.05); border-radius: var(--radius-lg);
  /* Specular top rim + layered ambient shadow (glass-material craft) */
  box-shadow: inset 0 1px 0 rgba(255,255,255,.9), var(--shadow);
  padding: 48px; text-align: center; max-width: 640px; margin: 0 auto;
}
.support-card a.mail { color: var(--matcha-deep); font-weight: 600; letter-spacing: -0.01em; }
.support-card a.mail:hover { text-decoration: underline; }

/* ---------- Footer — Apple-style dense ---------- */
.site-footer { background: var(--gray); border-top: 1px solid var(--line); padding: 34px 0; }
.site-footer .foot-note {
  color: var(--ink-soft); font-size: 12px; line-height: 1.5; max-width: 100%;
  padding-bottom: 20px; margin-bottom: 20px; border-bottom: 1px solid var(--line);
}
.foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot .brand { font-size: 15px; }
.foot-links { display: flex; gap: 22px; flex-wrap: wrap; }
.foot-links a { color: var(--ink-soft); font-weight: 500; font-size: 13px; transition: color .15s ease; }
.foot-links a:hover { color: var(--matcha-deep); }
.foot .copy { color: var(--ink-soft); font-size: 12px; width: 100%; padding-top: 14px; }

/* ---------- Legal pages ---------- */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; }
.legal h1 { font-size: clamp(30px, 5vw, 44px); letter-spacing: -0.02em; margin-bottom: 8px; }
.legal .updated { color: var(--ink-soft); font-size: 14px; margin-bottom: 36px; }
.legal h2 { font-size: 22px; margin: 34px 0 10px; letter-spacing: -0.01em; }
.legal p, .legal li { color: #333; font-size: 16px; margin-bottom: 12px; }
.legal ul { padding-left: 22px; margin-bottom: 12px; }
.legal a { color: var(--matcha-deep); font-weight: 600; }
.legal .back { display: inline-block; margin-bottom: 28px; color: var(--matcha-deep); font-weight: 600; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero { padding: 60px 0 0; }
  .hero .lead { max-width: 24em; }
  .hero-device { margin-top: 36px; }
  .hero-device img { max-width: 260px; }
  .feature-row { padding: 72px 0; }
  .feature-grid { grid-template-columns: 1fr; gap: 36px; text-align: center; }
  /* Keep image below text on every row when stacked, regardless of reverse */
  .feature-row.reverse .feature-text,
  .feature-text { order: 1; }
  .feature-row.reverse .feature-media,
  .feature-media { order: 2; }
  .feature-text p { margin-left: auto; margin-right: auto; }
  .feature-media img { max-width: 260px; }
  .section { padding: 72px 0; }
  .cta-band .wrap { padding-top: 76px; padding-bottom: 76px; }
  .support-card { padding: 36px 24px; }
}

/* ---------- Scroll reveal (§11 — compositor-only transform/opacity, ease-out entrance) ---------- */
.reveal {
  opacity: 0; transform: translateY(18px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  will-change: transform, opacity;
}
.reveal.in { opacity: 1; transform: none; }
/* Materialize the hero device: scales up slightly as it fades in (§12) */
.hero-device { opacity: 0; transform: scale(.95) translateY(20px); transition: opacity .8s var(--ease-out), transform .8s var(--ease-out); }
.hero-device.in { opacity: 1; transform: none; }

/* ---------- Accessibility (§14) ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
  .reveal, .hero-device { transform: none !important; transition: opacity .2s ease !important; }
  .btn:hover, .appstore:hover, .text-link:hover span { transform: none !important; }
}
@media (prefers-reduced-transparency: reduce) {
  .site-header, .site-header.is-scrolled { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; border-bottom: 1px solid var(--line); }
  .eyebrow { background: var(--gray); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.1); }
  /* Glass pill falls back to a solid matcha fill when transparency is reduced */
  .btn { background: var(--matcha-deep); backdrop-filter: none; -webkit-backdrop-filter: none; }
  .btn:hover { background: var(--matcha-dark); }
}
@media (prefers-contrast: more) {
  :root { --ink-soft: #3a3a3a; --line: #b9b6ac; }
  .site-header { background: #fff; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; border-bottom: 1px solid var(--ink); }
  .btn { background: var(--matcha-deep); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
  .eyebrow { background: var(--gray); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: inset 0 0 0 1px var(--matcha-deep); }
  .support-card { border-color: var(--ink-soft); }
}
