/*
 * Landing page styles.
 *
 * Hand-written CSS rather than anything from the app bundle: this page has to
 * render as HTML with no JavaScript, which is the entire reason it exists.
 * Tokens mirror src/theme so the page and the app look like one product.
 */

:root {
  /* Mirrors src/theme — coral brand, navy type, mint point, ivory ground.
     Both brand colours are light, so navy (--on-primary) labels every filled
     surface and each has a text-safe sibling for type. See src/theme/index.ts
     for the measured ratios. */
  --coral: #ff8a65;
  --coral-dark: #c0451c;
  --coral-soft: #ffede6;
  --coral-edge: #ffc7b4;
  --mint: #3dcea8;
  --mint-dark: #17795f;
  --mint-soft: #e3f7f0;
  --mint-edge: #a5e6d2;
  --navy: #1f3a5f;
  --on-primary: #1f3a5f;
  --bg: #fff9f4;
  --surface: #ffffff;
  --surface-alt: #f5ede6;
  --text: #1f3a5f;
  --text-muted: #5a6b80;
  --text-faint: #8a97a6;
  --border: #eadfd6;
  --radius: 14px;
  /* Matches WEB_MAX_WIDTH in src/theme — the landing page and the app are one
     column width, so moving between them does not feel like two sites. */
  --max: 768px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard',
    'Noto Sans KR', 'Malgun Gothic', system-ui, sans-serif;
  line-height: 1.6;
  word-break: keep-all; /* Korean wraps on phrase boundaries, not mid-word. */
}

h1, h2, h3 { line-height: 1.3; letter-spacing: -0.02em; margin: 0; }
p { margin: 0; }

/* --- header --------------------------------------------------------------- */

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--max);
  margin: 0 auto;
  padding: 16px 20px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
}

/* Placeholder until the real mark arrives — matches LogoSlot in the app. */
.logo-slot {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 24px;
  border: 1px dashed var(--text-faint);
  border-radius: 8px;
  background: var(--surface-alt);
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 1px;
}

.brand-name { font-weight: 700; font-size: 17px; }

/* --- buttons -------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 22px;
  border-radius: var(--radius);
  font-weight: 700;
  text-decoration: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

.btn:active { transform: scale(0.99); }
.btn:hover { opacity: 0.9; }
.btn-sm { padding: 9px 16px; font-size: 14px; }
.btn-primary { background: var(--coral); color: var(--on-primary); }
.btn-secondary { background: var(--bg); color: var(--text); border: 1px solid var(--border); }

/* --- sections ------------------------------------------------------------- */

main { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

section { padding: 64px 0; }
section + section { border-top: 1px solid var(--border); }

h2 { font-size: clamp(24px, 4vw, 32px); margin-bottom: 28px; }

.hero { padding-top: 40px; text-align: left; }
.eyebrow {
  color: var(--coral-dark);
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.hero h1 { font-size: clamp(34px, 7vw, 56px); margin-bottom: 20px; }
.lead { font-size: clamp(16px, 2.2vw, 19px); color: var(--text-muted); max-width: 46em; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.note { margin-top: 14px; font-size: 14px; color: var(--text-faint); }

/* --- example cards -------------------------------------------------------- */

.card-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.result-card {
  position: relative;
  border: 1px solid var(--mint-edge);
  background: var(--mint-soft);
  border-radius: var(--radius);
  padding: 20px;
}
.result-card.muted { border-color: var(--border); background: var(--surface-alt); }
.result-card h3 { font-size: 22px; margin: 8px 0 14px; }

.rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: var(--mint);
  color: var(--on-primary);
  font-size: 13px;
  font-weight: 700;
}
.result-card.muted .rank { background: var(--border); color: var(--text-muted); }

.result-card dl { display: flex; gap: 20px; margin: 0; flex-wrap: wrap; }
.result-card dt { font-size: 12px; color: var(--text-muted); }
.result-card dd { margin: 2px 0 0; font-size: 17px; font-weight: 700; }

.badge {
  position: absolute;
  top: 18px;
  right: 18px;
  background: var(--mint);
  color: var(--on-primary);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
}

.caption { margin-top: 20px; color: var(--text-muted); font-size: 15px; max-width: 52em; }

/* --- steps ---------------------------------------------------------------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: 28px; }
.steps li { counter-increment: step; padding-left: 48px; position: relative; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 2px;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  background: var(--coral-soft);
  border: 1px solid var(--coral-edge);
  color: var(--coral-dark);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}
.steps h3 { font-size: 18px; margin-bottom: 6px; }
.steps p { color: var(--text-muted); }

/* --- features ------------------------------------------------------------- */

.feature-grid {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}
.feature-grid li { border: 1px solid var(--border); border-radius: var(--radius); padding: 20px; }
.feature-grid h3 { font-size: 17px; margin-bottom: 6px; }
.feature-grid p { color: var(--text-muted); font-size: 15px; }

/* --- faq ------------------------------------------------------------------ */

.faq details {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.faq summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 16px;
  list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '＋'; float: right; color: var(--text-faint); }
.faq details[open] summary::after { content: '－'; }
.faq details p { margin-top: 10px; color: var(--text-muted); }

/* --- closing -------------------------------------------------------------- */

.closing { text-align: center; }
.closing p { color: var(--text-muted); margin-bottom: 24px; }

/* --- footer --------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 40px;
  padding: 36px 20px 56px;
  background: var(--surface-alt);
}
.site-footer > * { max-width: var(--max); margin-left: auto; margin-right: auto; }

.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer nav a { color: var(--text-muted); font-size: 14px; text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }

.business {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  margin-top: 20px;
  font-style: normal;
  font-size: 13px;
  color: var(--text-faint);
}

/* The separator is decoration, so it is generated rather than typed into the
   markup — a screen reader announcing "pipe" six times is noise.
   ::after on all but the last, not ::before on all but the first: the pipe has
   to stay attached to the item it follows, or a wrap drops it onto the start of
   the next line. */
.business span:not(:last-child)::after {
  content: '|';
  margin-left: 18px;
  color: var(--border);
}

.copyright { margin-top: 20px; font-size: 13px; color: var(--text-faint); }

/* --- narrow --------------------------------------------------------------- */

@media (max-width: 640px) {
  .card-row { grid-template-columns: 1fr; }
  section { padding: 44px 0; }
  .cta-row .btn { flex: 1 1 100%; }
}
