/* ==========================================================================
   StrainX landing page styles.
   Palette taken from the app itself (apps/kiosk/src/lib/theme.ts and the
   band colours in apps/web/tailwind.config.ts) so the site and the product
   look like the same thing.

   Senior-first habits carried over from the app: large body text, generous
   line height, high contrast, big tap targets.
   ========================================================================== */

:root {
  --bg:        #fffdf8;   /* warm off-white, same as the kiosk */
  --bg-tint:   #f8f4ea;
  --card:      #ffffff;
  --ink:       #1a1a1a;
  --sub:       #5d5b52;
  --rule:      #e7e2d6;
  --amber:     #b45309;
  --amber-lt:  #d97706;
  --calm:      #2f7d32;
  --load:      #b26a00;
  --rest:      #8e3b46;
  --dark:      #1f2a24;
  --dark-ink:  #f2efe6;
  --dark-sub:  #b8bfb6;
  --shadow:    0 1px 2px rgba(26,26,26,.05), 0 8px 24px -12px rgba(26,26,26,.18);
  --radius:    14px;
  --wrap:      1120px;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg:       #14181a;
    --bg-tint:  #1a2022;
    --card:     #1e2528;
    --ink:      #eceae3;
    --sub:      #a8b0ac;
    --rule:     #2e3639;
    --amber:    #e0a05a;
    --amber-lt: #e0a05a;
    --calm:     #7fd3a0;
    --load:     #e5b567;
    --rest:     #f2919e;
    --dark:     #0f1416;
    --dark-ink: #eceae3;
    --dark-sub: #a8b0ac;
    --shadow:   0 1px 2px rgba(0,0,0,.4), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 86px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 19px/1.7 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, "Apple SD Gothic Neo", "Malgun Gothic",
        "Noto Sans KR", "Nanum Gothic", sans-serif;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { line-height: 1.22; letter-spacing: -.015em; margin: 0; }
h1 { font-size: clamp(34px, 5.2vw, 56px); font-weight: 800; }
h2 { font-size: clamp(27px, 3.4vw, 38px); font-weight: 750; }
h3 { font-size: 20px; font-weight: 700; }
p  { margin: 0; }

a { color: inherit; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 780px; }
.center { text-align: center; }

.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--ink); color: var(--bg); padding: 12px 18px;
}
.skip:focus { left: 8px; top: 8px; }

:focus-visible { outline: 3px solid var(--amber-lt); outline-offset: 3px; }

/* ---------------------------------------------------------------- header */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--rule);
}
.head-inner {
  display: flex; align-items: center; gap: 20px;
  min-height: 72px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand-mark { color: var(--amber); display: flex; }
.brand-name { font-size: 22px; font-weight: 800; letter-spacing: -.02em; }

.site-nav { display: flex; align-items: center; gap: 26px; }
.site-nav ul { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.site-nav a { text-decoration: none; font-size: 17px; color: var(--sub); padding: 6px 0; }
.site-nav a:hover { color: var(--ink); }
.site-nav .btn { color: #fff; }

.nav-toggle {
  display: none; align-items: center; gap: 9px;
  background: none; border: 1px solid var(--rule); border-radius: 10px;
  color: var(--ink); font: inherit; font-size: 16px;
  min-height: 44px; padding: 0 14px; cursor: pointer;
}
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; content: "";
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before { position: absolute; top: -6px; }
.nav-toggle-bars::after  { position: absolute; top: 6px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 26px;
  background: var(--amber); color: #fff;
  border: 1px solid transparent; border-radius: 12px;
  font-size: 18px; font-weight: 650; text-decoration: none;
  transition: transform .12s ease, background .12s ease;
}
.btn:hover { background: var(--amber-lt); }
.btn:active { transform: translateY(1px); }
.btn-small { min-height: 44px; padding: 0 18px; font-size: 16px; }
.btn-lg { min-height: 60px; padding: 0 34px; font-size: 20px; }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-ghost:hover { background: var(--bg-tint); border-color: var(--ink); }

.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 30px; }
.center-row { justify-content: center; }

/* ------------------------------------------------------------------- hero */
.hero { padding: 76px 0 10px; }
.hero-grid {
  display: grid; grid-template-columns: 1.15fr .85fr;
  gap: 56px; align-items: center;
}
.eyebrow {
  font-size: 15px; font-weight: 700; letter-spacing: .09em;
  text-transform: uppercase; color: var(--amber); margin-bottom: 18px;
}
.lede { font-size: 21px; color: var(--sub); margin-top: 22px; max-width: 40em; }
.hero-note { margin-top: 22px; font-size: 16.5px; color: var(--sub); }

/* the little illustrated phone */
.hero-art { display: flex; justify-content: center; }
.phone {
  width: 276px; padding: 14px;
  background: var(--card); border: 1px solid var(--rule);
  border-radius: 34px; box-shadow: var(--shadow);
}
.phone-screen {
  background: var(--bg-tint); border-radius: 24px; padding: 24px 20px 26px;
  text-align: center;
}
.ps-title { font-size: 15px; font-weight: 700; color: var(--sub); letter-spacing: .02em; }
.ps-faces { display: flex; justify-content: center; gap: 10px; margin: 22px 0 14px; }
.ps-faces span {
  width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--rule); background: var(--card);
}
.ps-faces .on { border-color: var(--calm); background: color-mix(in srgb, var(--calm) 18%, var(--card)); }
.ps-label { font-size: 15px; color: var(--sub); }
.ps-pulse { color: var(--rest); margin: 20px 0 16px; }
.ps-pulse svg { width: 100%; height: 46px; display: block; }
.ps-chip {
  display: inline-block; padding: 8px 18px; border-radius: 999px;
  background: color-mix(in srgb, var(--calm) 15%, var(--card));
  color: var(--calm); border: 1px solid color-mix(in srgb, var(--calm) 40%, transparent);
  font-weight: 700; font-size: 16px;
}

/* -------------------------------------------------------------- facts bar */
.facts {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 18px; list-style: none; margin: 66px 0 0; padding: 26px 0 0;
  border-top: 1px solid var(--rule);
}
.facts li { display: flex; align-items: center; gap: 12px; font-size: 16.5px; color: var(--sub); }
.fact-icon { color: var(--amber); display: flex; flex: none; }
.fact-icon svg { width: 22px; height: 22px; }

/* ------------------------------------------------------------------ bands */
.band { padding: 84px 0; }
.band-tint { background: var(--bg-tint); }
.band-dark { background: var(--dark); color: var(--dark-ink); }
.band-dark .section-lede { color: var(--dark-sub); }
.band-cta { background: var(--bg-tint); border-top: 1px solid var(--rule); }

.section-lede { font-size: 19.5px; color: var(--sub); margin-top: 18px; max-width: 62ch; }
.center .section-lede { margin-left: auto; margin-right: auto; }
.caption { margin-top: 30px; font-size: 16.5px; color: var(--sub); }

/* ------------------------------------------------------------------ cards */
.cards { display: grid; gap: 22px; list-style: none; margin: 46px 0 0; padding: 0; }
.cards-3 { grid-template-columns: repeat(3, 1fr); }
.cards-4 { grid-template-columns: repeat(4, 1fr); }
.card {
  background: var(--card); border: 1px solid var(--rule);
  border-radius: var(--radius); padding: 28px 26px; box-shadow: var(--shadow);
}
.card-plain { background: transparent; box-shadow: none; }
.card-icon { display: flex; color: var(--amber); margin-bottom: 16px; }
.card-icon svg { width: 28px; height: 28px; }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--sub); font-size: 17.5px; }

/* ------------------------------------------------------------------ steps */
.steps { list-style: none; margin: 46px 0 0; padding: 0; display: grid; gap: 34px; }
.step { display: flex; gap: 24px; align-items: flex-start; }
.step-n {
  flex: none; width: 48px; height: 48px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: var(--amber); color: #fff; font-weight: 800; font-size: 20px;
}
.step-body h3 { margin-bottom: 8px; font-size: 22px; }
.step-body p { color: var(--sub); max-width: 68ch; }

.bands-block {
  margin-top: 62px; padding: 34px 32px;
  background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius);
}
.bands-title { font-size: 22px; }
.bands-lede { margin-top: 12px; color: var(--sub); max-width: 68ch; }
.bandcards {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px;
  list-style: none; margin: 28px 0 0; padding: 0;
}
.bandcard {
  border: 1px solid var(--rule); border-left: 5px solid var(--rule);
  border-radius: 10px; padding: 18px 20px;
}
.bandcard strong { display: block; font-size: 19px; margin-bottom: 6px; }
.bandcard span:last-child { color: var(--sub); font-size: 17px; }
.bandcard-dot { display: none; }
.bandcard[data-band-value="calm"] { border-left-color: var(--calm); }
.bandcard[data-band-value="calm"] strong { color: var(--calm); }
.bandcard[data-band-value="load"] { border-left-color: var(--load); }
.bandcard[data-band-value="load"] strong { color: var(--load); }
.bandcard[data-band-value="rest"] { border-left-color: var(--rest); }
.bandcard[data-band-value="rest"] strong { color: var(--rest); }

/* --------------------------------------------------------------- promises */
.promises {
  list-style: none; margin: 46px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 30px 44px;
}
.promises li { display: flex; gap: 16px; align-items: flex-start; }
.tick {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--calm) 22%, transparent); color: var(--calm);
}
.promises h3 { margin-bottom: 7px; }
.promises p { color: var(--dark-sub); font-size: 17.5px; }

/* ------------------------------------------------------------------ notes */
.notes { list-style: none; margin: 46px 0 0; padding: 0; display: grid; gap: 26px; }
.note {
  border-left: 4px solid var(--amber); padding: 4px 0 4px 22px;
}
.note h3 { margin-bottom: 8px; }
.note p { color: var(--sub); font-size: 17.5px; }

/* -------------------------------------------------------------------- faq */
.faq { margin-top: 40px; border-top: 1px solid var(--rule); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  list-style: none; cursor: pointer; padding: 22px 44px 22px 0;
  font-size: 19.5px; font-weight: 650; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 8px; top: 30px;
  width: 12px; height: 12px; border-right: 2.5px solid var(--amber);
  border-bottom: 2.5px solid var(--amber); transform: rotate(45deg);
  transition: transform .18s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 34px; }
.faq-a { padding: 0 44px 24px 0; }
.faq-a p { color: var(--sub); font-size: 18px; }

/* ---------------------------------------------------------------- contact */
.contact-line { margin-top: 16px; font-size: 18px; }
.contact-line a { color: var(--amber); }

/* ----------------------------------------------------------------- footer */
.site-foot { padding: 44px 0 60px; border-top: 1px solid var(--rule); }
.disclaimer { font-size: 16px; color: var(--sub); }
.copyright { margin-top: 16px; font-size: 15px; color: var(--sub); }

/* ------------------------------------------------------------ responsive */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; gap: 44px; }
  .hero-art { order: -1; }
  .cards-4 { grid-template-columns: repeat(2, 1fr); }
  .facts { grid-template-columns: repeat(2, 1fr); gap: 22px; }
}

@media (max-width: 820px) {
  .nav-toggle { display: inline-flex; }
  .site-nav {
    display: none; width: 100%; flex-direction: column;
    align-items: stretch; gap: 4px; padding: 8px 0 20px;
  }
  .site-nav.open { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav ul a { display: block; padding: 14px 0; border-bottom: 1px solid var(--rule); font-size: 18px; }
  .site-nav .btn { margin-top: 14px; }
  .langswitch { margin-top: 12px; align-self: flex-start; }
}

@media (max-width: 720px) {
  body { font-size: 18px; }
  .band { padding: 60px 0; }
  .hero { padding: 48px 0 10px; }
  .cards-3, .cards-4, .bandcards, .promises { grid-template-columns: 1fr; }
  .promises { gap: 26px; }
  .facts { grid-template-columns: 1fr; margin-top: 46px; }
  .bands-block { padding: 26px 22px; }
  .cta-row .btn { width: 100%; }
}


/* ==========================================================================
   KOREAN
   Hangul needs different typographic defaults from Latin: it must not break
   mid-word, and the negative tracking that tightens Latin headlines makes
   Hangul harder to read. These apply only while the Korean copy is showing.
   ========================================================================== */
html[lang="ko"] body {
  word-break: keep-all;       /* break between words, never inside one */
  overflow-wrap: break-word;  /* except for a word too long for the line */
  line-height: 1.78;
}
html[lang="ko"] h1,
html[lang="ko"] h2,
html[lang="ko"] h3 { letter-spacing: 0; line-height: 1.4; }
html[lang="ko"] h1 { font-size: clamp(30px, 4.4vw, 47px); }
html[lang="ko"] h2 { font-size: clamp(25px, 3vw, 34px); }
html[lang="ko"] .eyebrow { letter-spacing: .04em; }
html[lang="ko"] .lede { line-height: 1.75; }
/* The uppercase transform does nothing to Hangul but does affect any Latin
   mixed into it, so keep the eyebrow as written. */
html[lang="ko"] .eyebrow { text-transform: none; }

/* ---------------------------------------------------- language switch */
.langswitch {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
}
.langswitch button {
  font: inherit;
  font-size: 15px;
  min-height: 44px;
  padding: 0 13px;
  background: transparent;
  color: var(--sub);
  border: 0;
  cursor: pointer;
  white-space: nowrap;
}
.langswitch button + button { border-left: 1px solid var(--rule); }
.langswitch button:hover { background: var(--bg-tint); color: var(--ink); }
.langswitch button.on {
  background: var(--ink);
  color: var(--bg);
  font-weight: 650;
  cursor: default;
}

/* ====================================================================
   EDIT MODE — only visible when the address ends in ?edit
   ==================================================================== */
body.editing [data-editable] {
  outline: 2px dashed color-mix(in srgb, var(--amber) 55%, transparent);
  outline-offset: 3px; border-radius: 4px; min-width: 24px; min-height: 1em;
}
body.editing [data-editable]:focus {
  outline: 2px solid var(--amber); background: color-mix(in srgb, var(--amber) 8%, transparent);
}
body.editing { padding-bottom: 96px; }

#editbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 14px 22px; background: var(--dark); color: var(--dark-ink);
  box-shadow: 0 -6px 24px -12px rgba(0,0,0,.5);
  font-size: 16px;
}
#editbar .grow { flex: 1 1 auto; min-width: 180px; color: var(--dark-sub); }
#editbar .btn { min-height: 46px; font-size: 16px; }
#editbar .btn-ghost { color: var(--dark-ink); border-color: #45524b; background: transparent; }
#editbar .btn-ghost:hover { background: #2a3730; }
#editbar strong { color: var(--dark-ink); }
