/* 우리동네안경원 — 사장님/소비자용 서비스 안내 사이트
   토큰: 앱(theme.js)의 컬러를 기반으로 웹용으로 확장 */

:root {
  --bg: #f2f1ee;
  --surface: #fcfcfb;
  --surface-alt: #ffffff;
  --text: #100f0c;
  --text-secondary: #52514e;
  --muted: #8a8880;
  --border: #e1e0d9;

  --accent: #2a78d6;
  --accent-strong: #184f95;
  --accent-soft: #dce9fb;

  --token: #1baf7a;
  --token-soft: rgba(27, 175, 122, 0.12);

  --warn: #c97a00;
  --warn-soft: rgba(237, 161, 0, 0.14);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;
  --radius-pill: 999px;

  --shadow-card: 0 1px 2px rgba(16, 15, 12, 0.04), 0 8px 24px -12px rgba(16, 15, 12, 0.14);

  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #15140f;
    --surface: #201f18;
    --surface-alt: #262419;
    --text: #f3f1ea;
    --text-secondary: #c9c6ba;
    --muted: #948f80;
    --border: #35331f;

    --accent: #6fa6ea;
    --accent-strong: #9bc4f2;
    --accent-soft: rgba(111, 166, 234, 0.16);

    --token: #3fd39c;
    --token-soft: rgba(63, 211, 156, 0.16);

    --warn: #f2b747;
    --warn-soft: rgba(242, 183, 71, 0.16);

    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
    color-scheme: dark;
  }
}

:root[data-theme="dark"] {
  --bg: #15140f;
  --surface: #201f18;
  --surface-alt: #262419;
  --text: #f3f1ea;
  --text-secondary: #c9c6ba;
  --muted: #948f80;
  --border: #35331f;

  --accent: #6fa6ea;
  --accent-strong: #9bc4f2;
  --accent-soft: rgba(111, 166, 234, 0.16);

  --token: #3fd39c;
  --token-soft: rgba(63, 211, 156, 0.16);

  --warn: #f2b747;
  --warn-soft: rgba(242, 183, 71, 0.16);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px -12px rgba(0, 0, 0, 0.5);
  color-scheme: dark;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  font-size: 15px;
  line-height: 1.65;
  padding-inline: max(16px, env(safe-area-inset-left));
}

h1, h2, h3 {
  font-family: "Gothic A1", "Noto Sans KR", sans-serif;
  font-weight: 800;
  line-height: 1.3;
  text-wrap: balance;
  margin: 0;
  color: var(--text);
}

a { color: inherit; }

.mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  font-variant-numeric: tabular-nums;
}

.wrap {
  max-width: 1040px;
  margin-inline: auto;
  padding-inline: 8px;
}

.doc-wrap {
  max-width: 680px;
  margin-inline: auto;
  padding-inline: 8px;
}

/* ---- nav ---- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-nav .wrap, .site-nav .doc-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}
.brand {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-family: "Gothic A1", sans-serif;
  font-weight: 900;
  font-size: 17px;
  text-decoration: none;
  color: var(--text);
  white-space: nowrap;
}
.brand .dot { color: var(--token); }
.nav-links {
  display: flex;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.nav-links a {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
}
.nav-links a:hover { color: var(--accent); }

/* ---- buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--radius-md);
  padding: 13px 22px;
  font-weight: 800;
  font-size: 14px;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-ghost {
  background: transparent;
  border-color: var(--accent);
  color: var(--accent);
}

/* ---- hero ---- */
.hero {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 48px;
  align-items: center;
  padding-block: 56px 40px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--token);
  background: var(--token-soft);
  border-radius: var(--radius-pill);
  padding: 5px 12px;
  margin-bottom: 16px;
}
.hero h1 { font-size: 34px; margin-bottom: 16px; }
.hero p.lead {
  font-size: 15.5px;
  color: var(--text-secondary);
  max-width: 46ch;
  margin-bottom: 26px;
}
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-visual {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius-xl);
  background: linear-gradient(155deg, var(--accent-soft), var(--token-soft));
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.frame-demo { width: 62%; }
.frame-demo svg { width: 100%; height: auto; display: block; }
.frame-demo .rim { fill: none; stroke: var(--accent-strong); stroke-width: 5; }
.frame-demo .lens { fill: color-mix(in srgb, var(--surface-alt) 55%, transparent); }
.scan-line {
  position: absolute;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--token), transparent);
  animation: scan 2.8s ease-in-out infinite;
}
@keyframes scan {
  0%, 100% { top: 28%; opacity: 0; }
  10% { opacity: 1; }
  50% { top: 72%; opacity: 1; }
  90% { opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .scan-line { animation: none; top: 50%; opacity: 0.6; }
}

/* ---- section shell ---- */
section.block { padding-block: 44px; border-top: 1px solid var(--border); }
.block-head { max-width: 56ch; margin-bottom: 32px; }
.block-head .kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.block-head h2 { font-size: 24px; margin-bottom: 10px; }
.block-head p { color: var(--text-secondary); font-size: 14px; }

/* ---- steps ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 20px;
}
.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-card);
}
.step.owner .num {
  color: var(--token);
  background: var(--token-soft);
}
.step .num {
  font-family: "IBM Plex Mono", monospace;
  font-size: 12px;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 3px 10px;
  display: inline-block;
  margin-bottom: 14px;
}
.step h3 { font-size: 15.5px; margin-bottom: 8px; }
.step p { font-size: 13px; color: var(--text-secondary); margin: 0; }

/* ---- owner photo guide ---- */
.photo-guide {
  margin-top: 32px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.photo-guide h3 { font-size: 17px; margin-bottom: 8px; }
.photo-guide > p { font-size: 13.5px; color: var(--text-secondary); max-width: 60ch; margin: 0 0 16px; }
.photo-guide-rules {
  margin: 0 0 22px;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13.5px;
}
.photo-guide-rules li { margin-bottom: 6px; }
.photo-guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
}
.photo-guide-grid figure {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.photo-guide-grid img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  background: var(--surface-alt);
}
.photo-guide-grid figcaption {
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
  text-align: center;
}

/* ---- token section ---- */
.token-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.token-copy p { font-size: 14px; color: var(--text-secondary); margin: 0 0 14px; }
.token-copy ul { margin: 0 0 14px; padding-left: 18px; color: var(--text-secondary); font-size: 13.5px; }
.token-copy li { margin-bottom: 6px; }

.token-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-card);
}
.token-card .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-block: 10px;
  border-bottom: 1px dashed var(--border);
}
.token-card .row:last-of-type { border-bottom: none; }
.token-card .row .label { font-size: 13px; color: var(--text-secondary); }
.token-card .row .value { font-size: 15px; font-weight: 700; }
.token-card .balance {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  background: var(--token-soft);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 14px;
}
.token-card .balance .label { font-size: 12.5px; font-weight: 700; color: var(--token); }
.token-card .balance .value { font-size: 22px; font-weight: 800; color: var(--token); }
.pg-badge {
  margin-top: 16px;
  font-size: 11.5px;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

/* ---- faq ---- */
.faq-item { border-bottom: 1px solid var(--border); padding-block: 16px; }
.faq-item:first-child { border-top: 1px solid var(--border); }
.faq-item summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  font-family: "IBM Plex Mono", monospace;
  color: var(--muted);
  font-size: 18px;
  flex-shrink: 0;
}
.faq-item[open] summary::after { content: "−"; }
.faq-item p {
  margin: 10px 0 0;
  font-size: 13.5px;
  color: var(--text-secondary);
}

/* ---- footer ---- */
footer.site-footer {
  border-top: 1px solid var(--border);
  padding-block: 32px 40px;
  margin-top: 20px;
}
.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.footer-links a {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-secondary);
  text-decoration: none;
}
.footer-links a:hover { color: var(--accent); }
.biz-info {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.9;
}
.biz-info .ph { color: var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 0 4px; }
.footer-note {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--muted);
}

/* ---- legal doc pages ---- */
.doc-header { padding-block: 40px 20px; border-bottom: 1px solid var(--border); }
.doc-header .kicker {
  display: block;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 8px;
}
.doc-header h1 { font-size: 26px; }
.doc-body { padding-block: 32px 60px; font-size: 14px; color: var(--text-secondary); }
.doc-body h2 {
  font-size: 16px;
  color: var(--text);
  margin-top: 34px;
  margin-bottom: 10px;
}
.doc-body h2:first-child { margin-top: 0; }
.doc-body p { margin: 0 0 12px; }
.doc-body ul, .doc-body ol { padding-left: 20px; margin: 0 0 12px; }
.doc-body li { margin-bottom: 6px; }
.doc-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 14px 0 20px;
  font-size: 13px;
}
.doc-body th, .doc-body td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
}
.doc-body th { background: var(--surface); }
.ph { color: var(--warn); background: var(--warn-soft); border-radius: 4px; padding: 0 4px; }
.placeholder-note {
  background: var(--warn-soft);
  border: 1px solid color-mix(in srgb, var(--warn) 40%, transparent);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  font-size: 12.5px;
  color: var(--text);
  margin-bottom: 24px;
}

/* ---- responsive ---- */
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; padding-block: 36px 24px; }
  .hero-visual { order: -1; max-width: 320px; margin-inline: auto; width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .token-layout { grid-template-columns: 1fr; }
  .nav-links { display: none; }
  .hero h1 { font-size: 27px; }
}
