/*
 * NoGuri marketing site — "Calm Slate" on the web.
 *
 * Tokens are lifted from the app, not re-picked: colours from AppColorsLight in
 * lib/shared/colors.dart, spacing/radius/type/motion from lib/shared/tokens.dart.
 * The one thing worth stating out loud, because it is the easiest mistake to
 * make here: the brand teal has two values. #55A8BA is the DARK theme's primary
 * and measures 2.73:1 on white; light surfaces use #177E93 (4.73:1). The build's
 * --check fails on #55A8BA appearing in this file at all.
 *
 * The hero backdrop is a port, not a redraw: the gradient endpoints, the four
 * under-glass blobs and the five cloud placements are the constants in
 * tool/gen_marketing_screenshots.py, so the page and the store screenshots are
 * the same surface by construction.
 */

:root {
  /* AppColorsLight */
  --bg: #F6FAFC;
  --bg-sub: #EFF6F9;
  --surface: #FFFFFF;
  --surface-light: #EDF4F8;
  --primary: #177E93;
  --primary-light: #2A9DB4;
  --primary-dark: #0F5D6E;
  --on-primary: #FFFFFF;
  --border: #DCE7EC;
  --border-sub: #C7D7DF;
  --text: #0F212A;
  --text-2: #475E69;
  --text-3: #94ACB8;  /* 2.37:1 on white — decorative only, never a `color:` */

  /* The hero ramp, from gen_marketing_screenshots.py */
  --teal-inner: #62AFBF;
  --teal-outer: #489EB0;
  --ink: #06222A;

  /* AppSpacing */
  --sp-xs: 4px; --sp-sm: 8px; --sp-md: 16px;
  --sp-lg: 24px; --sp-xl: 32px; --sp-xxl: 48px;

  /* AppRadius */
  --r-sm: 10px; --r-md: 14px; --r-lg: 18px; --r-xl: 24px; --r-full: 9999px;

  /* AppMotion */
  --t-fast: 150ms; --t-normal: 250ms;

  --wrap: 1120px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  /* No webfont on purpose: the app has no `fonts:` section in pubspec.yaml and
     runs on the platform family, so matching it means the system stack. A Korean
     webfont subset would also cost 1-2 MB for typography the device already has. */
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo",
               "Noto Sans KR", "Malgun Gothic", Pretendard, Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* Korean breaks mid-어절 without this, which reads as broken text to a Korean
   speaker — the single highest-value bilingual typography fix on the page. */
.lang-ko { word-break: keep-all; overflow-wrap: anywhere; line-height: 1.7; }

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 700; }
h1 { font-size: clamp(2.25rem, 7vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 4.5vw, 2.5rem); }
h3 { font-size: clamp(1.125rem, 2.4vw, 1.5rem); }
p { margin: 0; }

a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--primary-dark); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--r-sm);
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--sp-md); }

/* The header is sticky, so a jump to #marks lands with the heading underneath it.
   Every anchored target has to clear the bar's own height. */
[id] { scroll-margin-top: 88px; }

.skip-link {
  position: absolute; left: var(--sp-md); top: calc(-1 * var(--sp-xxl));
  z-index: 100; padding: var(--sp-sm) var(--sp-md);
  background: var(--surface); border-radius: var(--r-sm);
  box-shadow: 0 4px 16px rgba(15, 33, 42, 0.18);
  transition: top var(--t-fast) var(--ease);
}
.skip-link:focus { top: var(--sp-md); }

.kicker {
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--primary-dark);
  margin-bottom: var(--sp-sm);
}
.lang-ko .kicker { letter-spacing: 0.04em; text-transform: none; }

.section-lead {
  font-size: clamp(1rem, 2vw, 1.125rem); color: var(--text-2);
  max-width: 58ch; margin-top: var(--sp-md);
}

/* ─────────────────────────── header ─────────────────────────── */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 250, 252, 0.82);
  border-bottom: 1px solid var(--border);
}
@supports (backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px)) {
  .site-header { -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-md); min-height: 64px;
}

.brand {
  display: inline-flex; align-items: center; gap: var(--sp-sm);
  font-weight: 700; font-size: 1.0625rem; color: var(--text); text-decoration: none;
}
.brand img { border-radius: 8px; }

.site-nav { display: flex; align-items: center; gap: var(--sp-lg); }
.site-nav a {
  color: var(--text-2); text-decoration: none; font-size: 0.9375rem; font-weight: 500;
}
.site-nav a:hover { color: var(--primary-dark); }
.site-nav .lang-switch {
  padding: 6px 14px; border: 1px solid var(--border-sub);
  border-radius: var(--r-full); color: var(--primary-dark); font-weight: 600;
}
.site-nav .lang-switch:hover { background: var(--surface-light); }

/* The three section links are a convenience, not the navigation — the page is
   one scroll. Below 720px they cost more width than they return, and the lang
   switch is the one control that has to survive. */
@media (max-width: 720px) {
  .site-nav a:not(.lang-switch) { display: none; }
}

/* ─────────────────────────── language suggestion ─────────────────────────── */

.lang-suggest {
  position: fixed; inset: auto var(--sp-md) var(--sp-md) var(--sp-md);
  z-index: 60; display: flex; align-items: center; gap: var(--sp-md);
  max-width: 420px; margin-inline: auto;
  padding: var(--sp-md); border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--border);
  box-shadow: 0 12px 32px rgba(15, 33, 42, 0.16);
  font-size: 0.9375rem;
}
.lang-suggest[hidden] { display: none; }
.lang-suggest p { flex: 1; margin: 0; }
.lang-suggest .btn-text {
  background: none; border: 0; padding: var(--sp-xs) var(--sp-sm);
  color: var(--text-2); font: inherit; cursor: pointer; border-radius: var(--r-sm);
}
.lang-suggest .btn-text:hover { color: var(--text-2); }

/* ─────────────────────────── buttons ─────────────────────────── */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 2px;
  min-height: 52px; padding: var(--sp-md) var(--sp-lg);
  border-radius: var(--r-lg); border: 1px solid transparent;
  font-size: 1rem; font-weight: 600; text-decoration: none;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast) var(--ease);
}
.btn:active { transform: scale(0.98); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:active { transform: none; } }

.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-dark); color: var(--on-primary); }

/* On the hero the button sits on teal, so it borrows the app's own answer:
   ink on light, never white on teal. */
.hero .btn-primary { background: var(--ink); color: #F8FBFC; }
.hero .btn-primary:hover { background: #041A20; color: #F8FBFC; }
.hero .btn-ghost {
  background: rgba(255, 255, 255, 0.22); color: var(--ink);
  border-color: rgba(6, 34, 42, 0.22);
}
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.38); color: var(--ink); }

.btn-ghost { background: var(--surface); color: var(--text); border-color: var(--border-sub); }
.btn-ghost:hover { background: var(--surface-light); color: var(--text); }

.btn-store { background: var(--primary); color: var(--on-primary); }
.btn-store.is-disabled {
  background: var(--surface-light); color: var(--text-2);
  border-color: var(--border-sub); cursor: not-allowed;
}
.btn-note {
  font-size: 0.75rem; font-weight: 500; color: var(--text-2);
  letter-spacing: 0.02em;
}

/* ─────────────────────────── hero ─────────────────────────── */

.hero { position: relative; overflow: hidden; isolation: isolate; }

.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  /* INNER/OUTER/CENTER_Y/RADIUS from gen_marketing_screenshots.py. The radius is
     expressed in viewport widths because the Python solves it in width units. */
  background: radial-gradient(circle 105vw at 50% 38%,
              var(--teal-inner) 0%, var(--teal-outer) 100%);
}

.blob {
  position: absolute; border-radius: 50%;
  transform: translate(-50%, -50%); filter: blur(60px);
}
/* BLOBS: centre (fraction of width/height), radius (fraction of width), rgba */
.blob-1 { left: 16%; top: 10%; width: 104%; aspect-ratio: 1; background: rgba(34, 211, 238, 0.19); }
.blob-2 { left: 88%; top: 24%; width: 92%;  aspect-ratio: 1; background: rgba(143, 214, 226, 0.17); }
.blob-3 { left: 62%; top: 86%; width: 120%; aspect-ratio: 1; background: rgba(59, 130, 246, 0.13); }
.blob-4 { left: 6%;  top: 72%; width: 84%;  aspect-ratio: 1; background: rgba(17, 94, 112, 0.15); }

.cloud-defs { position: absolute; width: 0; height: 0; overflow: hidden; }
/* Placement (left/top/width/opacity per cloud) is appended by build.mjs from
   the CLOUDS table, so this file holds only what is the same for all five. */
.cloud {
  position: absolute; height: auto; color: #fff;
  transform: translate(-50%, -50%);
}

.hero-inner {
  display: grid; gap: var(--sp-xl);
  padding-top: var(--sp-xxl); padding-bottom: var(--sp-xxl);
  color: var(--ink);
}

.hero .eyebrow {
  font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--ink);
  margin-bottom: var(--sp-md);
}
.lang-ko .hero .eyebrow { letter-spacing: 0.04em; text-transform: none; }

.hero-sub { font-size: clamp(1.125rem, 2.6vw, 1.375rem); font-weight: 600; margin-top: var(--sp-md); }
.hero-support { font-size: 1rem; color: var(--ink); margin-top: var(--sp-sm); max-width: 44ch; }

.hero-cta { display: flex; flex-wrap: wrap; gap: var(--sp-md); margin-top: var(--sp-xl); }

.badges {
  display: flex; flex-wrap: wrap; gap: var(--sp-sm);
  list-style: none; margin: var(--sp-lg) 0 0; padding: 0;
}
.badges li {
  padding: 6px 14px; border-radius: var(--r-full);
  background: rgba(255, 255, 255, 0.3); border: 1px solid rgba(6, 34, 42, 0.14);
  font-size: 0.8125rem; font-weight: 600; color: var(--ink);
}

.hero-art { position: relative; display: flex; justify-content: center; }

.mascot {
  width: clamp(120px, 24vw, 190px);
  filter: drop-shadow(0 12px 28px rgba(6, 34, 42, 0.28));
}
.hero-art .mascot {
  position: absolute; left: 0; bottom: -8px; z-index: 2;
  transform: scaleX(-1);
}

/* ─────────────────────────── phone frame ─────────────────────────── */

.phone {
  position: relative; width: min(300px, 78vw);
  padding: 8px; border-radius: 34px;
  background: linear-gradient(160deg, #F8FBFC 0%, #DCE7EC 100%);
  box-shadow: 0 18px 44px rgba(6, 34, 42, 0.22), 0 2px 6px rgba(6, 34, 42, 0.12);
}
.phone img { border-radius: 26px; }
.phone-hero { width: min(320px, 74vw); }

/* ─────────────────────────── identity ─────────────────────────── */

.identity { padding: var(--sp-xxl) 0 0; }
.identity-card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); padding: clamp(var(--sp-lg), 4vw, var(--sp-xxl));
  max-width: 76ch; margin: 0 auto;
}
.identity-lead { font-size: clamp(1.125rem, 2.4vw, 1.375rem); font-weight: 600; }
.identity-guard {
  margin-top: var(--sp-lg); padding-top: var(--sp-lg);
  border-top: 1px solid var(--border);
  color: var(--text-2);
}

/* ─────────────────────────── features ─────────────────────────── */

.features { padding: var(--sp-xxl) 0; }
.feature-list { display: grid; gap: var(--sp-xxl); margin-top: var(--sp-xxl); }

.feature { display: grid; gap: var(--sp-lg); align-items: center; }
.feature-art { display: flex; justify-content: center; }
.feature-copy h3 { margin-bottom: var(--sp-md); }
.feature-copy p { color: var(--text-2); max-width: 52ch; }

.route-diagram {
  width: min(360px, 100%); height: auto;
  border-radius: var(--r-xl);
}
.rd-bg { fill: var(--surface-light); }
.rd-fast, .rd-clean { fill: none; stroke-linecap: round; stroke-width: 5; }
.rd-fast { stroke: var(--border-sub); stroke-dasharray: 2 9; }
.rd-clean { stroke: var(--primary); }
.rd-mark { stroke: var(--surface-light); stroke-width: 3; }
.rd-mark-a { fill: #FF6B6B; }
.rd-mark-b { fill: #FFA94D; }
.rd-mark-c { fill: #FF6B6B; }
.rd-node { fill: var(--primary-dark); }

/* ─────────────────────────── marks ─────────────────────────── */

.marks { padding: var(--sp-xxl) 0; background: var(--bg-sub); }
.mark-list {
  list-style: none; margin: var(--sp-xl) 0 0; padding: 0;
  display: grid; gap: var(--sp-md);
}
.mark {
  display: flex; gap: var(--sp-md); align-items: flex-start;
  padding: var(--sp-lg); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
}
.mark h3 { font-size: 1.0625rem; }
.mark p { color: var(--text-2); margin-top: var(--sp-xs); font-size: 0.9375rem; }
.mark .ttl {
  margin-top: var(--sp-sm); font-size: 0.8125rem; font-weight: 600;
  color: var(--primary-dark);
}
/* The mark colours are marker fills, not text tokens — #FFD93D as text on white
   is about 1.4:1. They only ever appear as a swatch with ink beside it. */
.swatch {
  flex: 0 0 auto; width: 20px; height: 20px; margin-top: 3px;
  border-radius: var(--r-full); background: var(--swatch);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--swatch) 24%, transparent);
}

/* ─────────────────────────── audience ─────────────────────────── */

.audience { padding: var(--sp-xxl) 0; }
.audience-list {
  list-style: none; margin: var(--sp-xl) 0 0; padding: 0;
  display: grid; gap: var(--sp-md);
}
.audience-list li {
  display: flex; align-items: flex-start; gap: var(--sp-md);
  padding: var(--sp-md) var(--sp-lg);
  border: 1px solid var(--border); border-radius: var(--r-lg);
  background: var(--surface); color: var(--text-2);
  font-weight: 500;
}
.audience-list li::before {
  content: ""; flex: 0 0 auto; width: 10px; height: 10px; margin-top: 9px;
  border-radius: var(--r-full); background: var(--primary);
}

/* ─────────────────────────── privacy ─────────────────────────── */

.privacy { padding: var(--sp-xxl) 0; background: var(--bg-sub); }
.privacy-inner { display: grid; gap: var(--sp-xl); }
.age-note { margin-top: var(--sp-lg); font-weight: 600; color: var(--text-2); }
.privacy-links { display: flex; flex-wrap: wrap; gap: var(--sp-lg); margin-top: var(--sp-md); }

.privacy-points { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--sp-md); }
.privacy-points li {
  padding: var(--sp-lg); background: var(--surface);
  border: 1px solid var(--border); border-radius: var(--r-lg);
}
.privacy-points h3 { font-size: 1rem; }
.privacy-points p { margin-top: var(--sp-sm); color: var(--text-2); font-size: 0.9375rem; }

/* ─────────────────────────── download ─────────────────────────── */

.download { padding: var(--sp-xxl) 0; }
.download-inner {
  display: grid; gap: var(--sp-lg); align-items: center; justify-items: center;
  text-align: center;
  padding: clamp(var(--sp-lg), 5vw, var(--sp-xxl));
  border-radius: var(--r-xl);
  background: linear-gradient(165deg, #E3EEF3 0%, #F6FAFC 100%);
  border: 1px solid var(--border);
}
.mascot-hit { transform: rotate(-8deg); }
.store-buttons { display: flex; flex-wrap: wrap; gap: var(--sp-md); justify-content: center; margin-top: var(--sp-xl); }
.notify { margin-top: var(--sp-lg); color: var(--text-2); font-size: 0.9375rem; }

/* ─────────────────────────── footer ─────────────────────────── */

.site-footer {
  padding: var(--sp-xl) 0; border-top: 1px solid var(--border);
  background: var(--surface);
}
.footer-inner { display: grid; gap: var(--sp-lg); }
.footer-tagline { font-weight: 600; }
.footer-operator { color: var(--text-2); font-size: 0.875rem; margin-top: var(--sp-xs); }
.footer-links { display: flex; flex-wrap: wrap; gap: var(--sp-md) var(--sp-lg); }
.footer-links a { color: var(--text-2); text-decoration: none; font-size: 0.9375rem; }
.footer-links a:hover { color: var(--primary-dark); text-decoration: underline; }

/* ─────────────────────────── legal pages ─────────────────────────── */

.legal { padding: var(--sp-xl) 0 var(--sp-xxl); }
.legal-wrap { max-width: 760px; }

.legal-back { margin: 0 0 var(--sp-lg); font-size: 0.9375rem; }

/* Standalone navigation, not a link inside a sentence, so it gets a comfortable
   tap target. Negative margin absorbs the padding, so the hit area grows to
   ~44px without moving anything around it. */
.legal-back a { display: inline-block; padding: 11px 4px; margin: -11px -4px; }

.legal-doc { color: var(--text); }
.legal-doc h1 { font-size: clamp(2rem, 5vw, 2.75rem); margin-bottom: var(--sp-md); }
.legal-doc h2 {
  font-size: clamp(1.25rem, 3vw, 1.625rem);
  margin-top: var(--sp-xxl); margin-bottom: var(--sp-md);
  scroll-margin-top: 88px;
}
.legal-doc h3 {
  font-size: 1.0625rem; margin-top: var(--sp-xl); margin-bottom: var(--sp-sm);
  color: var(--primary-dark); scroll-margin-top: 88px;
}
.legal-doc p { margin-top: var(--sp-md); color: var(--text-2); }
.legal-doc ul, .legal-doc ol { margin: var(--sp-md) 0 0; padding-left: 1.25em; color: var(--text-2); }
.legal-doc li + li { margin-top: var(--sp-sm); }
.legal-doc strong { color: var(--text); font-weight: 600; }
.legal-doc em { color: var(--text-2); font-style: normal; font-size: 0.9375rem; }
.legal-doc hr { margin: var(--sp-xl) 0 0; border: 0; border-top: 1px solid var(--border); }
.legal-doc h1 + p em { display: block; }

/* ─────────────────────────── responsive ─────────────────────────── */

@media (min-width: 560px) {
  .audience-list { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 760px) {
  .mark-list { grid-template-columns: repeat(2, 1fr); }
  .privacy-points { grid-template-columns: repeat(3, 1fr); }
  .download-inner { grid-template-columns: auto 1fr; text-align: left; justify-items: start; }
  .download-inner .store-buttons, .download-inner h2 { justify-content: flex-start; }
}

@media (min-width: 900px) {
  .hero-inner {
    grid-template-columns: 1fr minmax(320px, 42%);
    align-items: center; gap: var(--sp-xxl);
    padding-top: clamp(var(--sp-xxl), 7vw, 104px);
    padding-bottom: clamp(var(--sp-xxl), 7vw, 104px);
  }
  .hero-art { justify-content: flex-end; }
  .hero-art .mascot { left: -32px; bottom: 16px; }

  .feature { grid-template-columns: 1fr 1fr; gap: var(--sp-xxl); }
  .feature-flip .feature-copy { order: 2; }
  .feature-flip .feature-art { order: 1; }

  .privacy-inner { grid-template-columns: minmax(0, 40%) 1fr; align-items: start; }
  .privacy-points { grid-template-columns: 1fr; }

  .footer-inner { grid-template-columns: 1fr auto; align-items: center; }
  .footer-links { justify-content: flex-end; }
}

@media (min-width: 1100px) {
  .privacy-points { grid-template-columns: repeat(2, 1fr); }
}

/* Large text stays legible when a reader zooms the page rather than the browser. */
@media (min-width: 900px) and (min-height: 900px) {
  .hero-inner { padding-top: 120px; padding-bottom: 120px; }
}

@media print {
  .site-header, .site-footer, .legal-back, .lang-suggest { display: none; }
  body { background: #fff; }
  .legal-doc p, .legal-doc ul, .legal-doc ol { color: #000; }
}

/* generated by build.mjs — see cssExtras() */
.cloud-1{left:11.0%;top:10.0%;width:32.0%;opacity:0.149}
.cloud-2{left:90.0%;top:16.5%;width:28.0%;opacity:0.118}
.cloud-3{left:50.0%;top:4.5%;width:22.0%;opacity:0.078}
.cloud-4{left:20.0%;top:60.0%;width:36.0%;opacity:0.125}
.cloud-5{left:88.0%;top:78.0%;width:26.0%;opacity:0.102}
.swatch-ff6b6b{--swatch:#FF6B6B}
.swatch-ffa94d{--swatch:#FFA94D}
.swatch-ffd93d{--swatch:#FFD93D}
.swatch-3c8da4{--swatch:#3C8DA4}
