/* Tokens mirror sm-viewer app/src/main/java/com/smviewer/ui/theme/Theme.kt (Palette, PageTints). */
:root {
  --paper: #F7F4EC;
  --surround: #E7E4DB;
  --card: #FFFDF8;
  --ink: #1F1D1A;
  --ink-muted: #6B665C;
  --accent: #7A1F2E;
  --accent-soft: #F1E1E0;
  --line: #D9D4C8;
  --font: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", Roboto, sans-serif;
  --pad: max(20px, env(safe-area-inset-left));
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1E1C19;
    --surround: #121110;
    --card: #26231F;
    --ink: #E6E0D4;
    --ink-muted: #A39C8F;
    --accent: #D4808E;
    --accent-soft: #3A2226;
    --line: #3A362F;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(10px + env(safe-area-inset-top)) var(--pad) 10px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 650;
  font-size: 18px;
  text-decoration: none;
  letter-spacing: -0.01em;
}
.brand img { border-radius: 8px; }
.topbar-link {
  font-size: 15px;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 8px 4px;        /* 44px-ish tap target with the line height */
}

/* ---------- hero ---------- */
.hero {
  padding: 40px var(--pad) 24px;
  max-width: 1080px;
  margin: 0 auto;
}
.eyebrow {
  margin: 0 0 12px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.02em;
}
h1 {
  margin: 0;
  font-size: clamp(32px, 9vw, 54px);
  line-height: 1.22;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.lead {
  margin: 18px 0 0;
  color: var(--ink-muted);
  font-size: 17px;
  max-width: 34em;
}
.cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  margin-top: 28px;
}
.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--paper);
  font-weight: 600;
  font-size: 16px;
  cursor: default;
}
.store-pill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: currentColor;
  opacity: .75;
  animation: pulse 2.4s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .store-pill .dot { animation: none; } }

.text-link {
  display: inline-block;
  padding: 10px 0;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}
.text-link:hover { text-decoration: underline; text-underline-offset: 4px; }

.hero-art {
  margin: 36px auto 0;
  max-width: 340px;
}

@media (min-width: 860px) {
  .hero {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
    gap: 56px;
    padding-top: 80px;
    padding-bottom: 56px;
  }
  .hero-art { margin: 0 0 0 auto; max-width: 380px; }
}

/* ---------- features ---------- */
.features {
  max-width: 1080px;
  margin: 0 auto;
  padding: 40px var(--pad) 48px;
}
h2 {
  margin: 0 0 24px;
  font-size: clamp(24px, 6vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.02em;
}
.feature-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}
.feature-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 22px 22px 20px;
}
.feature-list .num {
  display: block;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}
.feature-list h3 {
  margin: 6px 0 8px;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.feature-list p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 16px;
}
@media (min-width: 640px)  { .feature-list { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .feature-list { grid-template-columns: repeat(3, 1fr); } }

/* ---------- promise ---------- */
.promise {
  margin: 0 auto;
  max-width: 1080px;
  padding: 40px var(--pad) 56px;
  border-top: 1px solid var(--line);
}
.promise ul {
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.promise li {
  position: relative;
  padding-left: 22px;
  color: var(--ink-muted);
}
.promise li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.62em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--accent);
  transform: rotate(45deg);
}
.promise strong { color: var(--ink); font-weight: 650; }
@media (min-width: 640px) { .promise ul { grid-template-columns: 1fr 1fr; gap: 14px 32px; } }

/* ---------- footer ---------- */
.footer {
  background: var(--surround);
  padding: 28px var(--pad) calc(28px + env(safe-area-inset-bottom));
  font-size: 13px;
  color: var(--ink-muted);
}
.footer > * { max-width: 1080px; margin-left: auto; margin-right: auto; }
.footer-links a {
  display: inline-block;
  padding: 6px 0;
  color: var(--ink);
  font-weight: 600;
  font-size: 15px;
}
.credits { margin: 12px auto 6px; line-height: 1.6; }
.copy { margin: 0 auto; }

/* ---------- document pages (privacy) ---------- */
.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 40px var(--pad) 64px;
}
.doc h1 { font-size: clamp(28px, 7.5vw, 40px); }
.doc .meta { margin: 10px 0 32px; color: var(--ink-muted); font-size: 15px; }
.doc h2 { font-size: 20px; margin: 36px 0 10px; }
.doc p, .doc li { font-size: 16px; }
.doc ul { padding-left: 1.2em; }
.doc li { margin: 6px 0; }
.doc .summary {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 4px solid var(--accent);
  border-radius: 12px;
  padding: 16px 18px;
}
.doc .summary p { margin: 0; }
.doc table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 8px 0;
}
.doc th, .doc td {
  text-align: left;
  vertical-align: top;
  padding: 10px 8px;
  border-bottom: 1px solid var(--line);
}
.doc th { color: var(--ink-muted); font-weight: 600; white-space: nowrap; }
