/* Citely landing — shared styles. Ink on paper. No animations except the one signature. */

:root {
  --ink: #0A0A0A;
  --paper: #FAFAF7;
  --g100: #F2F1EC;
  --g200: #E8E6E0;
  --g300: #D4D2CC;
  --g400: #A8A69F;
  --g500: #7A7872;
  --g600: #504E49;
  --g700: #2E2D29;
  --g800: #1A1917;
  --accent: #D94F2A;
  --hairline: #E8E6E0;
  --muted: rgba(10,10,10,0.55);
  --sans: "Pretendard Variable", Pretendard, "Inter Tight", -apple-system, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

.site, .site * { box-sizing: border-box; }
.site {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
  position: relative;
  overflow: hidden; /* artboard */
  /* Korean word-based line breaking — quality critical.
     keep-all prevents mid-word breaks of Hangul syllables/eojeol.
     overflow-wrap: break-word keeps long Latin URLs/identifiers
     from overflowing their container. */
  word-break: keep-all;
  overflow-wrap: break-word;
  -ms-word-break: keep-all;
}

/* Headings, paragraphs, buttons, inputs all inherit the above via .site;
   but buttons/inputs don't inherit word-break in some engines — force it. */
.site h1, .site h2, .site h3, .site p, .site button, .site a, .site li, .site label, .site input, .site textarea {
  word-break: keep-all;
  overflow-wrap: break-word;
}

/* Pretty wrap for display text (Chromium/Safari) — orphan/widow control */
.site h1, .site h2, .site h3 { text-wrap: balance; }
.site p, .site .lede { text-wrap: pretty; }

/* Standalone deploy variant — no artboard clipping */
.site.site-standalone { overflow: visible; }
html.standalone, html.standalone body {
  background: var(--paper);
  margin: 0; padding: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
  -ms-word-break: keep-all;
}

/* Typographic primitives */
.site h1, .site h2, .site h3 { margin: 0; font-weight: 500; text-wrap: balance; }
.site p { margin: 0; }

/* Citation tick — the one signature */
.tick {
  display: inline-block;
  width: 0.34em; height: 0.34em;
  background: var(--accent);
  transform: rotate(45deg);
  margin-left: 0.12em;
  vertical-align: 0.18em;
}

/* Wordmark — D2 Mark */
.wm {
  font-family: "Inter Tight", var(--sans);
  font-weight: 500;
  letter-spacing: -0.035em;
  line-height: 1;
  display: inline-flex;
  align-items: baseline;
  color: var(--ink);
}
.wm .wi { position: relative; display: inline-block; }
.wm .wi .wt {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 0) rotate(45deg);
  background: var(--accent);
  border-radius: 1px;
}

/* Monospace eyebrow / section numbers */
.eyebrow {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  gap: 10px;
  align-items: baseline;
}
.eyebrow .sep { opacity: 0.5; }

/* CTA */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px 14px 22px;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 150ms var(--ease), background 150ms var(--ease);
}
.btn-primary:hover { transform: translateY(-1px); background: var(--g800); }
.btn-primary .arr { display: inline-block; width: 14px; height: 1px; background: currentColor; position: relative; }
.btn-primary .arr::after {
  content: "";
  position: absolute; right: 0; top: 50%;
  width: 7px; height: 1px; background: currentColor;
  transform: translate(0, -50%) rotate(45deg);
  transform-origin: right center;
}
.btn-primary .arr::before {
  content: "";
  position: absolute; right: 0; top: 50%;
  width: 7px; height: 1px; background: currentColor;
  transform: translate(0, -50%) rotate(-45deg);
  transform-origin: right center;
}

.btn-underline {
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 1px solid var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: color 150ms var(--ease);
}

/* Hairline divider */
.hr { height: 1px; background: var(--hairline); width: 100%; }

/* Dotted column guides (Structured direction) */
.site.structured .grid-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.55;
  z-index: 0;
}

/* Accessibility helpers */
.sr-only {
  position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden;
}

/* Scroll-linked tick reveal */
.reveal-tick {
  opacity: 0;
  transition: opacity 220ms var(--ease), transform 220ms var(--ease);
  transform: rotate(45deg) scale(0.4);
}
.reveal-tick.on {
  opacity: 1;
  transform: rotate(45deg) scale(1);
}

/* FAQ accordion */
.faq-item { border-top: 1px solid var(--hairline); }
.faq-item:last-child { border-bottom: 1px solid var(--hairline); }
.faq-q {
  width: 100%;
  background: transparent;
  border: none;
  padding: 24px 0;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
  cursor: pointer;
  font-family: var(--sans);
  color: var(--ink);
  font-size: 17px;
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.45;
}
.faq-q .plus {
  width: 14px; height: 14px; position: relative; flex-shrink: 0; margin-top: 6px;
}
.faq-q .plus::before, .faq-q .plus::after {
  content: ""; position: absolute; background: var(--ink);
  transition: transform 180ms var(--ease);
}
.faq-q .plus::before { left: 0; right: 0; top: 50%; height: 1px; }
.faq-q .plus::after { top: 0; bottom: 0; left: 50%; width: 1px; }
.faq-item.open .faq-q .plus::after { transform: rotate(90deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 220ms var(--ease);
}
.faq-a-inner {
  padding: 0 0 24px 0;
  max-width: 640px;
  color: var(--g600);
  font-size: 14.5px;
  line-height: 1.65;
}

/* Trust bar placeholder logos */
.trust-logo {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g400);
  padding: 8px 0;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  text-align: center;
}

/* Answer-engine mock (the one place the signature motion triggers) */
.ae-mock {
  background: var(--paper);
  border: 1px solid var(--hairline);
  padding: 28px 32px;
  font-family: var(--sans);
  position: relative;
}
.ae-mock .ae-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 20px;
}
.ae-mock .ae-head .engine {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}
.ae-mock .ae-head .dots { display: flex; gap: 5px; }
.ae-mock .ae-head .dots span {
  width: 6px; height: 6px; background: var(--g200);
}
.ae-mock .ae-query {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--g600);
  margin-bottom: 18px;
  letter-spacing: 0.005em;
}
.ae-mock .ae-query::before {
  content: "› ";
  color: var(--g400);
}
.ae-mock .ae-answer {
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink);
  letter-spacing: -0.005em;
}
.ae-mock .ae-answer .cite {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.04em;
  vertical-align: super;
  color: var(--muted);
  padding: 0 2px;
}
.ae-mock .ae-answer .cite.hl {
  color: var(--ink);
  background: transparent;
  position: relative;
  padding-right: 10px;
}
.ae-mock .ae-answer .cite.hl .tmark {
  position: absolute;
  right: 0; top: 2px;
  width: 6px; height: 6px;
  background: var(--accent);
  transform: rotate(45deg);
  transform-origin: center;
}
.ae-mock .ae-sources {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--hairline);
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.ae-mock .ae-source-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  color: var(--g600);
  text-transform: none;
  letter-spacing: 0.01em;
  font-size: 11.5px;
}
.ae-mock .ae-source-row .idx {
  font-family: var(--mono);
  color: var(--muted);
  width: 18px;
  font-size: 10px;
  letter-spacing: 0.04em;
}
.ae-mock .ae-source-row.hl { color: var(--ink); font-weight: 500; }
.ae-mock .ae-source-row.hl .idx { color: var(--ink); }
.ae-mock .ae-source-row.hl .mark {
  width: 7px; height: 7px; background: var(--accent);
  transform: rotate(45deg);
  margin-left: auto;
  opacity: 0;
  transition: opacity 250ms var(--ease);
}
.ae-mock.revealed .ae-source-row.hl .mark { opacity: 1; }
.ae-mock.revealed .ae-answer .cite.hl .tmark { opacity: 1; }
.ae-mock .ae-answer .cite.hl .tmark {
  opacity: 0;
  transition: opacity 250ms var(--ease);
}

/* Pillars — three columns */
.pillar-num {
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  letter-spacing: 0.1em;
}
.pillar-kr {
  font-size: 36px;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 8px;
}
.pillar-en {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 20px;
}

/* Mode cards */
.mode-card {
  border: 1px solid var(--hairline);
  padding: 36px 32px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 320px;
}
.mode-kind {
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  color: var(--muted);
  text-transform: uppercase;
}
.mode-title { font-size: 26px; font-weight: 500; letter-spacing: -0.025em; line-height: 1.15; }
.mode-sub { font-family: var(--mono); font-size: 11.5px; color: var(--muted); letter-spacing: 0.04em; }
.mode-meta {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  display: flex;
  gap: 20px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g600);
  flex-wrap: wrap;
}

/* Method rows */
.method-row {
  display: grid;
  grid-template-columns: 60px 180px 1fr;
  gap: 32px;
  padding: 24px 0;
  border-top: 1px solid var(--hairline);
  align-items: baseline;
}
.method-row:last-child { border-bottom: 1px solid var(--hairline); }
.method-n { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--muted); }
.method-t { font-size: 20px; font-weight: 500; letter-spacing: -0.02em; }
.method-b { color: var(--g600); font-size: 15px; line-height: 1.55; max-width: 540px; }

/* Case strip */
.case {
  display: grid;
  grid-template-columns: 1fr;
  padding: 40px 0;
  border-top: 1px solid var(--hairline);
}
.case:last-child { border-bottom: 1px solid var(--hairline); }
.case-metric {
  font-family: "Inter Tight", var(--sans);
  font-size: 96px;
  font-weight: 400;
  letter-spacing: -0.04em;
  line-height: 0.92;
  margin-bottom: 12px;
  font-variant-numeric: tabular-nums;
}
.case-unit {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.case-who {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 10px;
  text-transform: uppercase;
}
.case-body {
  font-size: 17px;
  color: var(--ink);
  max-width: 480px;
  letter-spacing: -0.01em;
  line-height: 1.5;
}

/* Shift chart */
.shift-chart {
  position: relative;
  height: 320px;
  width: 100%;
  border-bottom: 1px solid var(--ink);
  border-left: 1px solid var(--ink);
}
.shift-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.shift-ylabels, .shift-xlabels {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  color: var(--muted);
}
