/* Shared chrome for the public pages (about, support, terms, privacy,
   consent). Greenhouse design language — mirrors the 01 · Greenhouse
   direction on the SEE-AT Redesign canvas: linen ground, white cards with
   a 2-layer soft shadow, sage accents, Bricolage Grotesque for numbers and
   Latin display, Gothic A1 for Korean text. Page-specific layout lives in
   each page (about.html, support.html) or policy.css. */

:root {
  --canvas:      #E4E3DB;
  --linen:       #F3F2EC;
  --surface:     #FFFFFF;
  --chip:        #F1F0EA;
  --ink:         #1B1F1A;
  --ink-sub:     #5C615A;
  --ink-mute:    #6F746C;
  --line:        #E0DDD4;
  --line-soft:   #EFEEE7;
  --sage:        #4F6B45;
  --sage-tint:   #E6ECDD;
  --sage-soft:   #C9D8BE;
  --leaf:        #9DB58C;
  --deep:        #2F4429;
  --income:      #2F8A5B;
  --expense:     #B04A36;
  --expense-tint:#F5E4DF;
  --warn:        #C7841F;
  --warn-ink:    #94600F;
  --soil:        #DCCFB8;
  --petal:       #C97A6E;
  --wheat:       #C2A878;

  --r-xl: 32px;
  --r-lg: 26px;
  --r-md: 22px;
  --r-sm: 16px;

  --shadow-card:  0 1px 2px rgba(20,24,18,0.05), 0 14px 34px rgba(20,24,18,0.07);
  --shadow-soft:  0 1px 2px rgba(20,24,18,0.05), 0 8px 20px rgba(20,24,18,0.05);
  --shadow-phone: 0 30px 70px rgba(32,38,28,0.16), 0 0 0 1px rgba(27,31,26,0.06);
  --shadow-float: 0 12px 32px rgba(32,38,28,0.14);

  --font-ko:  "Gothic A1", "Apple SD Gothic Neo", "Noto Sans KR", system-ui, sans-serif;
  --font-num: "Bricolage Grotesque", "Gothic A1", system-ui, sans-serif;

  --gutter: 20px;
  --max: 1160px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 88px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font-ko);
  background: var(--linen);
  color: var(--ink);
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: var(--deep); }
a:hover { color: var(--ink); }
button { font-family: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
:focus-visible { outline: 2.5px solid var(--sage); outline-offset: 3px; border-radius: 8px; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  padding: 10px 16px; border-radius: 999px; background: var(--deep); color: #fff;
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; color: #fff; }

.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; }
.container { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.num { font-family: var(--font-num); font-variant-numeric: tabular-nums; }
.icon { width: 20px; height: 20px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 52px; padding: 0 24px; border: 0; border-radius: 18px;
  font-size: 16px; font-weight: 800; letter-spacing: -0.2px;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.btn:active { transform: translateY(1px); }
.btn-deep { background: var(--deep); color: #fff; box-shadow: 0 10px 22px rgba(47,68,41,0.22); }
.btn-deep:hover { background: #24361f; color: #fff; }
.btn-sage { background: var(--sage); color: #fff; }
.btn-sage:hover { background: var(--deep); color: #fff; }
.btn-ghost { background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line); }
.btn-ghost:hover { background: var(--chip); color: var(--ink); }
.btn-light { background: var(--linen); color: var(--deep); }
.btn-light:hover { background: #fff; color: var(--deep); }
.btn .icon { width: 18px; height: 18px; }

.pill {
  display: inline-flex; align-items: center; gap: 6px;
  height: 34px; padding: 0 14px 0 10px; border-radius: 999px;
  background: var(--sage-tint); color: var(--deep);
  font-size: 13px; font-weight: 700;
}
.pill .icon { width: 16px; height: 16px; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 800; color: var(--ink-sub);
}
.eyebrow b { font-family: var(--font-num); font-size: 13px; font-weight: 800; letter-spacing: 0.08em; color: var(--sage); }

/* ── Site header ─────────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(243,242,236,0.86);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease;
}
.site-header.scrolled { border-bottom-color: rgba(27,31,26,0.07); }
.site-header .bar {
  max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter);
  height: 68px; display: flex; align-items: center; gap: 20px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none; margin-right: auto;
}
.brand:hover { color: var(--ink); }
/* the app icon (public/images/icon.png, from resources/icon-only.png), with a
   hairline so its off-white tile reads on the linen header */
.brand .mark { width: 34px; height: 34px; flex-shrink: 0; border-radius: 9px; overflow: hidden; box-shadow: 0 0 0 1px rgba(27,31,26,0.1); }
.brand .mark img { display: block; width: 100%; height: 100%; }
.brand .ko { font-size: 19px; font-weight: 800; letter-spacing: -0.4px; }
.brand .en { font-family: var(--font-num); font-size: 12px; font-weight: 700; letter-spacing: 0.14em; color: var(--ink-mute); }

.site-nav { display: flex; align-items: center; gap: 2px; }
.site-nav a {
  padding: 8px 12px; border-radius: 12px;
  color: var(--ink-sub); font-size: 14px; font-weight: 700; text-decoration: none;
}
.site-nav a:hover { color: var(--ink); background: rgba(27,31,26,0.05); }
.site-nav a[aria-current="page"] { color: var(--deep); background: var(--sage-tint); }
.header-cta { min-height: 40px; padding: 0 16px; border-radius: 999px; font-size: 14px; }

.menu-btn {
  display: none; width: 44px; height: 44px; border: 0; border-radius: 14px;
  background: transparent; color: var(--ink); cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-btn .icon { width: 24px; height: 24px; }
.menu-btn .close { display: none; }
.menu-open .menu-btn .open { display: none; }
.menu-open .menu-btn .close { display: block; }

@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .site-nav {
    position: absolute; left: 12px; right: 12px; top: 64px;
    display: none; flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px; border-radius: var(--r-md);
    background: var(--surface); box-shadow: var(--shadow-float), 0 0 0 1px rgba(27,31,26,0.05);
  }
  .site-nav a { padding: 13px 14px; font-size: 16px; }
  .menu-open .site-nav { display: flex; }
}
@media (max-width: 420px) {
  .brand .en { display: none; }
  .header-cta { padding: 0 14px; }
}

/* ── Footer ──────────────────────────────────────────────── */
.site-footer { background: var(--canvas); color: var(--ink-sub); margin-top: 0; }
.site-footer .inner {
  max-width: var(--max); margin: 0 auto; padding: 56px var(--gutter) 40px;
  display: grid; gap: 36px; grid-template-columns: 1.4fr repeat(3, 1fr);
}
.site-footer .about p { margin: 14px 0 0; font-size: 14px; line-height: 1.7; max-width: 300px; }
.site-footer h2 { margin: 0 0 12px; font-size: 13px; font-weight: 800; color: var(--ink-sub); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer li a { color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.site-footer li a:hover { color: var(--sage); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .legal {
  width: min(calc(var(--max) - 2 * var(--gutter)), calc(100% - 2 * var(--gutter))); margin: 0 auto; padding: 18px 0 32px;
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 20px;
  border-top: 1px solid rgba(27,31,26,0.08);
  font-size: 13px; color: var(--ink-sub);
}
.site-footer .legal a { color: var(--ink-sub); }
@media (max-width: 800px) {
  .site-footer .inner { grid-template-columns: 1fr 1fr; }
  .site-footer .about { grid-column: 1 / -1; }
}

/* ── Scroll reveal (only when JS is on; motion-safe) ─────── */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}
