/* 박둘기: 과적 배달왕 — support site. Colors come from the app icon (sun yellow, helmet green, beak orange, ink). */
@font-face {
  font-family: "Jua Site";
  src: url("fonts/jua-subset.woff2") format("woff2");
  font-display: swap;
}

:root {
  --paper: #fff7e6;
  --card: #ffffff;
  --ink: #2c2925;
  --soft: #4f4a42;
  --muted: #6d665a;
  --line: #e9dcbd;
  --sun: #f2c464;
  --sun-deep: #e4a93a;
  --helmet: #a9d140;
  --beak: #ee9652;
  --link: #8a4f00;
  --link-hover: #5e3500;
  --shadow: #2c2925;
  --focus: #1d6fd6;
  --table-head: #fbefd2;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #1b1915;
    --card: #25221d;
    --ink: #f6ecd6;
    --soft: #d6ccb6;
    --muted: #a99f8a;
    --line: #3e382e;
    --sun: #f2c464;
    --sun-deep: #f2c464;
    --helmet: #b9e04f;
    --beak: #f3a56a;
    --link: #ffd57a;
    --link-hover: #ffe7b0;
    --shadow: #000000;
    --focus: #8cc2ff;
    --table-head: #2e2a23;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.7 -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", "Malgun Gothic", "Segoe UI", Roboto, sans-serif;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }

/* ── language switching: without JS both languages stay visible ── */
html[data-lang="ko"] .en,
html[data-lang="en"] .ko { display: none !important; }
html:not([data-lang]) span.ko + span.en::before { content: " / "; }
html:not([data-lang]) .lang-toggle { display: none; }

.display, h1, h2, .brand-name {
  font-family: "Jua Site", "Apple SD Gothic Neo", "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, sans-serif;
  font-weight: 400;
  letter-spacing: -0.005em;
}

.wrap { max-width: 960px; margin: 0 auto; padding: 0 16px; }

/* ── header ── */
.site-header { border-bottom: 2px solid var(--line); background: var(--paper); }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  min-height: 64px; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; margin-right: auto; }
.brand img { width: 40px; height: 40px; border-radius: 11px; border: 2px solid var(--ink); }
.brand-name { font-size: 1.3rem; line-height: 1; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px; order: 3; width: 100%; }
.site-nav a {
  color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem;
  padding: 6px 12px; border-radius: 999px; border: 2px solid transparent;
}
.site-nav a:hover { border-color: var(--line); }
.site-nav a[aria-current="page"] { border-color: var(--ink); background: var(--card); }
@media (min-width: 720px) {
  .site-nav { order: 0; width: auto; }
}

.lang-toggle {
  display: inline-flex; border: 2px solid var(--ink); border-radius: 999px; overflow: hidden; background: var(--card);
}
.lang-toggle button {
  font: inherit; font-size: .9rem; font-weight: 700; color: var(--ink); background: transparent;
  border: 0; padding: 6px 12px; min-height: 36px; cursor: pointer;
}
.lang-toggle button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ── landing ── */
.hero { padding: 40px 0 24px; }
.hero .wrap { display: grid; gap: 24px; align-items: center; }
.hero-icon {
  width: 132px; height: 132px; border-radius: 30px; border: 3px solid var(--ink);
  box-shadow: 6px 6px 0 var(--shadow);
}
.hero h1 { font-size: clamp(2rem, 7vw, 3.2rem); line-height: 1.15; margin: 0 0 6px; }
.hero .tagline { font-size: 1.15rem; color: var(--soft); margin: 0 0 16px; font-weight: 600; }
.hero .pitch { font-size: 1.05rem; color: var(--soft); margin: 0 0 20px; max-width: 34em; }
.hero .alt-name { color: var(--muted); font-size: .95rem; margin: 0 0 4px; }
@media (min-width: 720px) {
  .hero { padding: 64px 0 32px; }
  .hero .wrap { grid-template-columns: auto 1fr; gap: 40px; }
  .hero-icon { width: 200px; height: 200px; border-radius: 44px; }
}

.stores { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 12px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center; min-width: 150px; min-height: 56px;
  padding: 8px 16px; border-radius: 16px; border: 3px solid var(--ink); background: var(--ink); color: var(--paper);
  text-decoration: none; line-height: 1.2; box-shadow: 4px 4px 0 var(--sun-deep);
}
.store:hover { color: var(--paper); transform: translate(-1px, -1px); box-shadow: 5px 5px 0 var(--sun-deep); }
.store .store-note { font-size: .78rem; opacity: .85; }
.store .store-name { font-size: 1.15rem; font-weight: 800; }
.store.is-soon { background: var(--card); color: var(--ink); box-shadow: none; border-style: dashed; cursor: default; }
.store.is-soon:hover { transform: none; }
.fine { color: var(--muted); font-size: .9rem; margin: 0; }

.features { padding: 16px 0 40px; }
.features ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .features ul { grid-template-columns: repeat(3, 1fr); } }
.feature {
  background: var(--card); border: 2px solid var(--ink); border-radius: 20px; padding: 18px 20px;
  box-shadow: 4px 4px 0 var(--shadow);
}
.feature .tag {
  display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .04em; padding: 2px 10px;
  border-radius: 999px; border: 2px solid var(--ink); color: #2c2925;
}
.feature:nth-child(1) .tag { background: var(--sun); }
.feature:nth-child(2) .tag { background: var(--helmet); }
.feature:nth-child(3) .tag { background: var(--beak); }
.feature h2 { font-size: 1.35rem; margin: 10px 0 6px; line-height: 1.3; }
.feature p { margin: 0; color: var(--soft); }

.help { padding: 0 0 48px; }
.help-grid { display: grid; gap: 16px; }
@media (min-width: 720px) { .help-grid { grid-template-columns: 1fr 1fr; } }
.help-card {
  display: block; padding: 18px 20px; border-radius: 20px; border: 2px solid var(--line); background: var(--card);
  color: var(--ink); text-decoration: none;
}
.help-card:hover { border-color: var(--ink); color: var(--ink); }
.help-card h2 { font-size: 1.25rem; margin: 0 0 4px; }
.help-card p { margin: 0; color: var(--soft); }
.help-card .go { color: var(--link); font-weight: 700; }

/* ── document pages ── */
.doc { padding: 28px 0 56px; }
.doc .wrap { max-width: 800px; }
.doc article {
  background: var(--card); border: 2px solid var(--line); border-radius: 20px; padding: 8px 22px 24px;
}
.doc article + article { margin-top: 32px; }
@media (max-width: 480px) { .doc article { padding: 4px 16px 20px; border-radius: 16px; } }
.doc h1 { font-size: clamp(1.6rem, 5.5vw, 2.2rem); line-height: 1.25; margin: 18px 0 8px; }
.doc h2 { font-size: 1.3rem; line-height: 1.35; margin: 2em 0 .5em; }
.doc h3 { font-size: 1.05rem; margin: 1.5em 0 .4em; }
.doc p, .doc li { color: var(--soft); }
.doc strong { color: var(--ink); }
.doc .meta { font-size: .95rem; color: var(--muted); }
.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: .35em; }
.callout {
  border: 3px solid var(--ink); border-radius: 18px; padding: 4px 18px; background: var(--paper); margin: 16px 0;
}
.callout p { color: var(--ink); }

.table-wrap { margin: 12px 0; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; overflow-wrap: break-word; hyphens: auto; }
td a { overflow-wrap: anywhere; }
th { background: var(--table-head); color: var(--ink); }
td { color: var(--soft); }
@media (max-width: 720px) {
  table, tbody, tr, td { display: block; width: 100%; }
  thead { display: none; }
  tr { border: 2px solid var(--line); border-radius: 14px; margin-bottom: 12px; padding: 6px 0; background: var(--card); }
  td { border: 0; padding: 4px 14px; }
  td::before { content: attr(data-label); display: block; color: var(--ink); font-weight: 800; font-size: .82rem; }
}

/* ── footer ── */
.site-footer { border-top: 2px solid var(--line); padding: 20px 0 32px; color: var(--muted); font-size: .9rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; }
.site-footer a { color: var(--muted); }
.site-footer .copy { margin-right: auto; }

@media (prefers-reduced-motion: no-preference) {
  .store, .help-card { transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
}
