/* Strata — App Store site. One stylesheet, no build step. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-alt: #f5f5f7;
  --bg-code: #f2f2f4;
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --rule: rgba(0, 0, 0, 0.12);
  --rule-strong: rgba(0, 0, 0, 0.3);
  --accent: #0a66d8;
  --header-bg: rgba(255, 255, 255, 0.94);
  --g-safe: #0a66d8;
  --g-review: #b8520a;
  --g-protected: #c4271f;
  --g-system: #8e8e93;
  --focus: 0 0 0 3px rgba(10, 102, 216, 0.45);
  --max: 980px;
  --gutter: 22px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Apple SD Gothic Neo", "Helvetica Neue", "Noto Sans KR", "Malgun Gothic", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161618;
    --bg-alt: #1e1e21;
    --bg-code: #242428;
    --text: #f5f5f7;
    --text-2: #a1a1a6;
    --rule: rgba(255, 255, 255, 0.14);
    --rule-strong: rgba(255, 255, 255, 0.34);
    --accent: #3d9bff;
    --header-bg: rgba(22, 22, 24, 0.94);
    --g-safe: #3d9bff;
    --g-review: #ff9f0a;
    --g-protected: #ff6961;
    --g-system: #98989d;
    --focus: 0 0 0 3px rgba(61, 155, 255, 0.55);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
body:lang(ko) { word-break: keep-all; line-height: 1.7; }

svg { display: block; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.18em; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 6px; }

code, kbd { font-family: var(--mono); font-size: 0.88em; }
code { background: var(--bg-code); padding: 0.1em 0.38em; border-radius: 5px; }
kbd { border: 1px solid var(--rule-strong); border-radius: 4px; padding: 0 0.3em; }

.skip { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--bg); color: var(--accent); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.wrap-narrow { max-width: 720px; margin: 0 auto; padding: 0 var(--gutter); }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rule);
}
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 52px; }
.brand { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-weight: 600; font-size: 17px; }
.brand:hover { text-decoration: none; }
.brand svg { width: 20px; height: 20px; }
.nav { display: flex; gap: 20px; margin-left: auto; font-size: 14px; }
.nav a { color: var(--text-2); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }
.lang-link { font-size: 14px; color: var(--text-2); padding-left: 20px; border-left: 1px solid var(--rule); }
@media (max-width: 640px) {
  .nav { gap: 14px; }
  .nav .nav-home { display: none; }
  .lang-link { padding-left: 14px; }
}

/* Type */
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
:lang(ko) h1, :lang(ko) h2, :lang(ko) h3 { letter-spacing: -0.03em; line-height: 1.3; }

/* Home */
section { padding: 72px 0; }
section + section { border-top: 1px solid var(--rule); }
@media (max-width: 640px) { section { padding: 52px 0; } }

.hero { padding: 80px 0 64px; }
.hero .eyebrow { font-size: 15px; font-weight: 600; color: var(--text-2); margin: 0 0 12px; }
.hero h1 { font-size: clamp(36px, 6vw, 60px); max-width: 13em; }
.hero .lede { font-size: clamp(18px, 2.2vw, 21px); color: var(--text-2); margin: 20px 0 0; max-width: 38em; }
.hero .lede strong { color: var(--text); font-weight: 600; }
.hero .meta { font-size: 15px; color: var(--text-2); margin: 24px 0 0; }

.section-title { font-size: clamp(26px, 3.6vw, 36px); }
.section-intro { font-size: 18px; color: var(--text-2); margin: 12px 0 0; max-width: 38em; }

.steps { list-style: none; padding: 0; margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 36px; }
.steps li { border-top: 1px solid var(--rule-strong); padding-top: 16px; }
.steps .n { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.steps h3 { font-size: 21px; margin: 6px 0 10px; }
.steps p { margin: 0 0 10px; color: var(--text-2); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; gap: 28px; } }

.grades { margin: 40px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.grade { display: grid; grid-template-columns: 28px 1fr; gap: 0 14px; padding: 22px 0; border-top: 1px solid var(--rule); }
.grade h3 { font-size: 18px; margin: 0 0 2px; }
.grade p { margin: 0; color: var(--text-2); font-size: 16px; }
.grade .ex { margin-top: 6px; font-size: 15px; }
.sw { width: 18px; height: 18px; margin-top: 3px; border: 1px solid var(--rule-strong); }
.sw-safe { background: var(--g-safe); border-color: var(--g-safe); }
.sw-review { background: repeating-linear-gradient(45deg, var(--g-review) 0 1.5px, transparent 1.5px 5px); }
.sw-protected { background: repeating-linear-gradient(45deg, var(--g-protected) 0 1px, transparent 1px 5px), repeating-linear-gradient(-45deg, var(--g-protected) 0 1px, transparent 1px 5px); }
.sw-system { background: radial-gradient(circle, var(--g-system) 1px, transparent 1.2px) 0 0 / 5px 5px; }
@media (max-width: 760px) { .grades { grid-template-columns: 1fr; } }

.cols { margin: 40px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.col { border-top: 1px solid var(--rule-strong); padding-top: 16px; }
.col h3 { font-size: 19px; margin: 0 0 8px; }
.col ul { margin: 0; padding-left: 1.2em; color: var(--text-2); }
.col li { margin: 4px 0; }
.col p { color: var(--text-2); margin: 12px 0 0; font-size: 16px; }
@media (max-width: 760px) { .cols { grid-template-columns: 1fr; gap: 28px; } }

.plain { margin: 20px 0 0; max-width: 40em; color: var(--text-2); }
.plain p { margin: 0 0 10px; }

/* Documents */
.doc { padding: 64px 0 88px; }
.doc h1 { font-size: clamp(32px, 5vw, 44px); }
.doc .updated { color: var(--text-2); font-size: 15px; margin: 10px 0 0; }
.doc .lead { font-size: 19px; color: var(--text-2); margin: 20px 0 0; }
.doc h2 { font-size: 22px; margin: 44px 0 10px; letter-spacing: -0.01em; }
.doc h3 { font-size: 18px; margin: 26px 0 8px; }
.doc ul, .doc ol { padding-left: 1.25em; }
.doc li { margin: 6px 0; }
.doc .box { border: 1px solid var(--rule); border-radius: 12px; padding: 18px 22px; margin: 28px 0 0; background: var(--bg-alt); }
.doc .box p { margin: 0 0 8px; }
.doc .box p:last-child { margin-bottom: 0; }

.faq { margin: 16px 0 0; border-bottom: 1px solid var(--rule); }
.faq details { border-top: 1px solid var(--rule); }
.faq summary { list-style: none; cursor: pointer; padding: 16px 28px 16px 0; font-weight: 600; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 50%; width: 7px; height: 7px; margin-top: -6px;
  border-right: 1.5px solid var(--text-2); border-bottom: 1.5px solid var(--text-2); transform: rotate(45deg);
}
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: -2px; }
.faq .a { padding: 0 0 18px; color: var(--text-2); }
.faq .a p { margin: 0 0 10px; }
.faq .a ol, .faq .a ul { margin: 0 0 10px; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); background: var(--bg-alt); padding: 28px 0 36px; font-size: 14px; color: var(--text-2); }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: baseline; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer a { color: var(--text-2); }
.site-footer a:hover { color: var(--text); }
.site-footer .copy { margin-left: auto; }
@media (max-width: 640px) { .site-footer .copy { margin-left: 0; width: 100%; } }
