/* base.css — shared chrome for both sites (A sales page, B author example). Tokens only; no literal colours.
   Two families per page, role-split (see tokens.css). Form controls inherit --font
   on purpose: without it the UA default (Arial) counts as a third family. */

*,*::before,*::after{box-sizing:border-box}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth}
/* Anchor landing. Only ONE of scroll-padding (container) and scroll-margin (target) — they add
   up, which pushed the heading 280px down. A section already carries --sp-section of top
   padding, so the sticky header can overlap that empty band; 8px is all the target needs. */
.sec[id]{scroll-margin-top:var(--sp-2)}
[id]:not(.sec){scroll-margin-top:calc(var(--head-h, 68px) + var(--sp-5))}
body{margin:0;background:var(--bg);color:var(--ink);font-family:var(--font);
  font-size:16px;line-height:var(--lh-body);letter-spacing:var(--ls-body);word-break:keep-all;
  -webkit-font-smoothing:antialiased}
/* reduced motion: swap the movement tokens and keep colour feedback (motion.md 6장). The old
   `*{…!important}` kill switch also froze informational transitions; GSAP never loads here. */
@media (prefers-reduced-motion:reduce){
  html{scroll-behavior:auto}
  :root{--dur-in:0s;--dur-out:0s;--dur-panel:0s;--dur-panel-out:0s;--dur-page:0s;--dur-enter:0s}
}
button,input,select,textarea{font:inherit;color:inherit}
img{max-width:100%;height:auto;display:block}
h1,h2,h3,p,ul,ol,dl,dd,figure{margin:0}
ul,ol{padding:0;list-style:none}
a{color:inherit}
.num{font-variant-numeric:tabular-nums;font-weight:var(--w-num)}
/* line breaking: headings even out their lines, paragraphs avoid a lonely last word.
   .nb holds one meaning unit together — a line may only wrap between units. */
h1,h2,h3{text-wrap:balance}
p,li,dd,dt,summary,figcaption{text-wrap:pretty}
.nb{white-space:nowrap}
/* line icons (_partials/icons.html): one stroke for all, inherited by every <use> */
.sprite{position:absolute;width:0;height:0;overflow:hidden}
.ic{width:24px;height:24px;flex:none;fill:none;stroke:currentColor;stroke-width:1.75;
  stroke-linecap:round;stroke-linejoin:round}
@media (max-width:359px){.nb{white-space:normal}}

/* ---- layout ---- */
.wrap{width:100%;max-width:var(--w-content);margin:0 auto;padding:0 24px}
.wrap.narrow{max-width:780px}
.sec{padding:var(--sp-section) 0}
.sec.band{background:var(--bg-2)}

/* ---- type ---- */
/* Display weight is 600, not the 700+ that type.md asks for. Reason: MaruBuri's 부리
   (brush entry strokes) flatten out at 700 and it reads as a rounded gothic — the one
   thing we picked it for disappears. The rule guards against display blurring into body
   copy; here the display family differs from body AND runs 2-3x its size, so that risk
   does not apply. Verified on render/_specimen.png (2026-10-03). */
h1{font-family:var(--font-display);font-weight:600;font-size:clamp(32px,5.4vw,56px);
  line-height:var(--lh-display);letter-spacing:var(--ls-display);margin:0 0 var(--sp-6)}
h2{font-family:var(--font-display);font-weight:600;font-size:clamp(24px,3.4vw,38px);
  line-height:var(--lh-display);letter-spacing:var(--ls-title);white-space:pre-line;margin:0 0 var(--sp-6)}
h3{font-size:var(--fs-h3);font-weight:700;line-height:var(--lh-title);margin:0 0 var(--sp-2)}
.eyebrow,.kicker{font-size:13px;font-weight:700;letter-spacing:.06em;color:var(--brand);
  margin:0 0 var(--sp-4)}
.lead{font-size:clamp(16px,1.5vw,18px);color:var(--ink-2);max-width:var(--w-prose-ko);margin:0 0 var(--sp-8)}
.body{color:var(--ink-2);max-width:var(--w-prose-ko);margin:0 0 var(--sp-8)}
.note{font-size:14px;color:var(--ink-2);margin-top:var(--sp-8);padding-left:var(--sp-4);
  border-left:2px solid var(--line-strong);max-width:var(--w-prose-ko)}
.caveat{font-size:14px;color:var(--ink-2);margin-top:var(--sp-4)}

/* ---- buttons: one filled primary per screen ---- */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;
  min-height:44px;padding:0 var(--sp-6);border-radius:var(--r-1);border:1px solid var(--brand);
  background:var(--brand);color:var(--on-brand);font-weight:700;text-decoration:none;
  transition:background var(--dur-ui) var(--ease-out)}
.btn:hover{background:var(--brand-hover);border-color:var(--brand-hover)}
.btn-lg{min-height:52px;padding:0 var(--sp-8);font-size:17px}
.btn-sm{min-height:44px;padding:0 var(--sp-5);font-size:14px}
.btn-ghost{background:transparent;color:var(--brand);border-color:var(--line-strong)}
.btn-ghost:hover{background:var(--brand-soft);border-color:var(--brand);color:var(--brand)}

/* ---- header ---- */
.site{position:sticky;top:0;z-index:20;background:var(--bg);border-bottom:1px solid var(--line)}
.site .row{display:flex;align-items:center;gap:var(--sp-6);min-height:68px;
  transition:min-height var(--dur-ui) var(--ease-out)}
.site.is-stuck .row{min-height:56px}
.mark{font-family:var(--font-display);font-weight:600;font-size:19px;letter-spacing:-.02em;
  text-decoration:none;white-space:nowrap;display:inline-flex;align-items:center;min-height:44px}

.nav{display:flex;align-items:center;gap:var(--sp-1);margin-left:auto;font-size:14px}
.nav a{position:relative;min-height:44px;padding:0 var(--sp-4);display:inline-flex;
  align-items:center;color:var(--ink-2);text-decoration:none;border-radius:var(--r-1);
  transition:color var(--dur-ui) var(--ease-out),background var(--dur-ui) var(--ease-out)}
.nav a:hover{color:var(--ink);background:var(--bg-2)}
.nav a[aria-current="page"],.nav a.is-here{color:var(--ink);font-weight:700}
.nav a[aria-current="page"]::after,.nav a.is-here::after{content:"";position:absolute;
  left:var(--sp-4);right:var(--sp-4);bottom:9px;height:2px;background:var(--brand);border-radius:1px}
/* phone menu: the button only shows at <=860px; the scrim dims the page behind the panel */
.menu-btn{display:none}
.scrim{position:fixed;inset:0;z-index:19;background:color-mix(in srgb,var(--ink) 30%,transparent)}
.scrim[hidden]{display:none}
@keyframes menu-in{from{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:none}}
/* reading progress — a 2px line on the header's own bottom edge */
.readbar{position:absolute;left:0;bottom:-1px;height:2px;background:var(--brand);
  width:100%;transform:scaleX(0);transform-origin:left;pointer-events:none}

/* ---- footer ---- */
.site-foot{border-top:1px solid var(--line);padding:var(--sp-12) 0 112px;background:var(--bg)}
.foot-top{display:flex;flex-wrap:wrap;gap:var(--sp-6) var(--sp-12);align-items:baseline}
.biz{display:flex;flex-wrap:wrap;gap:var(--sp-2) var(--sp-6);font-size:14px;color:var(--ink-2)}
.biz div{display:flex;gap:8px}
.biz dt{color:var(--ink-2)}
.foot-note,.foot-credit{font-size:13px;color:var(--ink-2);margin-top:var(--sp-6)}
.foot-credit{color:var(--ink-2)}

/* ---- mobile fixed CTA ---- */
.mobile-cta{display:none;position:fixed;left:16px;right:16px;bottom:16px;z-index:30;
  min-height:52px;align-items:center;justify-content:center;border-radius:var(--r-1);
  background:var(--brand);color:var(--on-brand);font-weight:700;text-decoration:none;
  box-shadow:var(--shadow-2);transition:opacity var(--dur-ui) var(--ease-out),visibility var(--dur-ui)}
/* motion.js sets this while the closing CTA or the footer is on screen. A class, not [hidden]:
   the display:flex above would win over the attribute */
.mobile-cta.is-off{opacity:0;visibility:hidden;pointer-events:none}

/* ---- forms ---- */
.form{display:grid;gap:var(--sp-5);max-width:520px}
.field label{display:block;font-weight:700;font-size:15px;margin-bottom:var(--sp-2)}
.req{font-size:13px;font-weight:700;color:var(--brand);margin-left:4px}
.hint{font-size:13px;color:var(--ink-2);margin:0 0 var(--sp-2)}
.field input,.field textarea{width:100%;min-height:48px;padding:12px 16px;
  border:1px solid var(--line-strong);border-radius:var(--r-1);background:var(--bg)}
.field textarea{min-height:96px;resize:vertical}
.field input:focus-visible,.field textarea:focus-visible{outline:2px solid var(--brand);outline-offset:1px}
.check{display:flex;gap:var(--sp-3);align-items:flex-start;font-size:14px;color:var(--ink-2);line-height:1.5}
.check input{width:20px;height:20px;margin:0;accent-color:var(--brand);flex:none}
.form-done{font-size:14px;color:var(--ok);font-weight:700}
.fieldcount{margin:var(--sp-2) 0 0;font-size:13px;color:var(--ink-2);text-align:right;
  font-variant-numeric:tabular-nums}
.field input::placeholder,.field textarea::placeholder{color:var(--ink-3)}

/* ---- faq (both sites) ---- */
.faq{margin-top:var(--sp-8);border-top:1px solid var(--line)}
.faq details{border-bottom:1px solid var(--line)}
.faq .ans{overflow:hidden}
.faq summary::after{transition:transform var(--dur-ui) var(--ease-out)}
.faq details[open] summary::after{transform:rotate(180deg)}
.faq summary{cursor:pointer;list-style:none;min-height:56px;display:flex;align-items:center;
  gap:var(--sp-4);font-weight:700;font-size:16px;padding:var(--sp-3) 0}
.faq summary::-webkit-details-marker{display:none}
.faq summary::after{content:"+";margin-left:auto;color:var(--brand);font-size:20px;font-weight:400;
  line-height:1;transition:transform var(--dur-ui) var(--ease-out)}
.faq details[open] summary::after{content:"+";transform:rotate(45deg)}
.faq p{padding:0 0 var(--sp-6);color:var(--ink-2);max-width:var(--w-prose-ko)}


/* ---- responsive ---- */
@media (max-width:860px){
  .wrap{padding:0 16px}
  .site .btn{display:none}
  .mobile-cta{display:flex}
  /* phones: one quiet row (mark · phone · menu) and the links in a drop-down panel.
     The wrapped, sideways-scrolling second row read as a stray toolbar. */
  .site .row,.site.is-stuck .row{min-height:56px;gap:var(--sp-3)}
  .menu-btn{display:inline-grid;place-items:center;order:9;width:44px;height:44px;flex:none;
    margin:0 -10px 0 auto;padding:0;border:0;border-radius:var(--r-1);background:none;
    color:var(--ink);cursor:pointer}
  .menu-btn:focus-visible{outline:2px solid var(--brand);outline-offset:-2px}
  .menu-btn path{transform-box:fill-box;transform-origin:center;
    transition:transform var(--dur-ui) var(--ease-out),opacity var(--dur-ui) var(--ease-out)}
  .menu-btn[aria-expanded="true"] .l1{transform:translateY(5px) rotate(45deg)}
  .menu-btn[aria-expanded="true"] .l2{opacity:0}
  .menu-btn[aria-expanded="true"] .l3{transform:translateY(-5px) rotate(-45deg)}
  .site .nav{position:absolute;top:100%;left:0;right:0;display:none;flex-direction:column;
    align-items:stretch;gap:0;margin:0;padding:var(--sp-2) 16px var(--sp-4);font-size:17px;
    background:var(--bg);border-bottom:1px solid var(--line);box-shadow:var(--shadow-2)}
  .site.is-open .nav{display:flex;animation:menu-in var(--dur-in) var(--ease-out)}
  .site .nav a{min-height:52px;padding:0 var(--sp-2) 0 var(--sp-4);border-radius:0;color:var(--ink);
    border-bottom:1px solid var(--line)}
  .site .nav a:last-child{border-bottom:0}
  .site .nav a:hover{background:none;color:var(--brand)}
  /* where you are: a bar on the leading edge instead of the desktop underline */
  .site .nav a[aria-current="page"]::after,.site .nav a.is-here::after{left:0;right:auto;
    top:16px;bottom:16px;width:3px;height:auto}
  .site .nav a[aria-current="page"],.site .nav a.is-here{color:var(--brand)}
  .tel{margin-left:auto}
  .tel span{display:none}
  /* anchor landing on phones: --sp-section drops to 48px, less than the 56px header, so the
     8px desktop margin parked the kicker under the header. 32px leaves ~24px of air. */
  .sec[id]{scroll-margin-top:var(--sp-8)}
}
