@font-face {
  font-family: Pretendard;
  src: url('/assets/PretendardVariable.woff2') format('woff2');
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --bg: #fff9e9;
  --surface: #fffdf5;
  --text: #142f4b;
  --muted: #516678;
  --accent: #1769b5;
  --line: #dce3e7;
  --selection: #e7f1fd;
  --section: #f8f1e0;
  --preview: #163b5d;
  --preview-dot: #4b6a8b;
  --on-accent: #fffdf5;
  font-family: Pretendard, system-ui, sans-serif;
  color: var(--text);
  background: var(--bg);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #152330;
    --surface: #1c2c3b;
    --text: #e7eef6;
    --muted: #adbdcc;
    --accent: #8bc0f5;
    --line: #3b5063;
    --selection: #2c4865;
    --section: #182734;
    --preview: #173753;
    --preview-dot: #456481;
    --on-accent: #142f4b;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-size: 1rem; line-height: 1.6; }
img { display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
svg { width: 1.25em; height: 1.25em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.container { width: min(100% - 96px, 1180px); margin-inline: auto; }
.skip-link { position: fixed; z-index: 2; inset: 10px auto auto 10px; transform: translateY(-160%); background: var(--surface); padding: 8px 16px; border-radius: 8px; }
.skip-link:focus { transform: none; }
.site-header { border-bottom: 1px solid var(--line); }
.header-inner, .footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: 1.4rem; font-weight: 800; letter-spacing: -.035em; }
.brand img { border: 1px solid var(--line); border-radius: 10px; }
.nav { display: flex; align-items: center; gap: clamp(8px, 3vw, 34px); font-weight: 650; }
.nav a { display: inline-flex; align-items: center; min-height: 44px; border-radius: 4px; white-space: nowrap; }
.nav a:hover { color: var(--accent); text-decoration: underline; text-underline-offset: 4px; }

.hero { display: grid; grid-template-columns: .85fr 1.15fr; align-items: center; gap: clamp(30px, 5vw, 84px); padding-block: clamp(54px, 7.5vw, 108px) 68px; }
.hero-copy h1 { font-size: clamp(4rem, 7vw, 6.1rem); font-weight: 790; letter-spacing: -.085em; line-height: 1.04; }
.hero-copy em { font-style: normal; color: var(--accent); }
.hero-copy > p { color: var(--muted); margin-block: 24px 30px; max-width: 22em; font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.7; word-break: keep-all; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 10px 17px; border: 1px solid transparent; border-radius: 9px; font-weight: 720; }
.primary { background: var(--accent); color: var(--on-accent); }
.primary:hover { filter: brightness(.9); }

.hero-figure { min-width: 0; }
.hero-figure figcaption { color: var(--muted); text-align: right; margin-top: 10px; font-size: .8125rem; }
.preview-stage {
  --bg: #fff9e9;
  --surface: #fffdf5;
  --text: #142f4b;
  --muted: #516678;
  --line: #dce3e7;
  --selection: #e7f1fd;
  --accent: #1769b5;
  position: relative;
  isolation: isolate;
  container-type: inline-size;
  aspect-ratio: 1.49;
  border-radius: 20px;
  overflow: hidden;
  color: var(--text);
  background: radial-gradient(var(--preview-dot) 1px, transparent 1px) 0 0 / 15px 15px, var(--preview);
}
.app-window {
  position: absolute;
  inset: 10% 9% auto 7%;
  min-height: 70%;
  overflow: hidden;
  border: 1px solid #fff5;
  border-radius: clamp(8px, 2.1cqw, 14px);
  background: var(--surface);
  box-shadow: 0 18px 35px #071b32a0;
  font-size: 2.8cqw;
}
.app-bar { display: flex; align-items: center; gap: 1cqw; padding: 1.5cqw 2.3cqw; border-bottom: 1px solid var(--line); background: var(--bg); }
.app-bar img { width: 4.8cqw; height: 4.8cqw; }
.window-controls { width: 1cqw; height: 1cqw; border-radius: 50%; margin-left: auto; margin-right: 4cqw; background: #8b9aab; box-shadow: 2cqw 0 #8b9aab, 4cqw 0 #8b9aab; }
.app-workspace { display: grid; grid-template-columns: 56% 44%; min-height: 39cqw; }
.sample-editor { border-right: 1px solid var(--line); }
.sample-mode { display: flex; align-items: center; gap: 1cqw; height: 6.5cqw; padding-inline: 3cqw; border-bottom: 1px solid var(--line); color: var(--muted); font-size: .82em; font-weight: 650; }
.sample-manuscript, .sample-passage { padding: 3cqw; }
.sample-reference { color: var(--accent); font-size: .8em; font-weight: 700; }
.sample-manuscript strong { display: block; font-size: 1.5em; letter-spacing: -.06em; }
.sample-manuscript hr { border: 0; border-top: 1px solid var(--line); margin: 2.4cqw 0; }
.sample-manuscript p { font-weight: 700; }
.sample-manuscript > span:last-child { display: block; margin-block: 1cqw; font-size: .8em; word-break: keep-all; line-height: 1.5; }
.sample-passage > span { display: block; margin-bottom: 2cqw; color: var(--muted); font-size: .8em; }
.sample-passage p { padding: 1cqw; background: var(--selection); border-radius: 4px; font-size: .86em; }
.sample-passage p span { color: var(--accent); font-size: .75em; font-weight: 700; }
.app-status { padding: .75cqw 2.5cqw; border-top: 1px solid var(--line); color: #28734b; background: var(--bg); font-size: .72em; }
.phone { position: absolute; inset: auto 4.8% 6% auto; display: flex; flex-direction: column; width: 27%; height: 59%; overflow: hidden; border: max(2px, .7cqw) solid #101f30; border-radius: 3.7cqw; background: var(--bg); box-shadow: 0 8px 26px #071b32a6; font-size: 2.2cqw; }
.phone-header { display: flex; gap: 1cqw; align-items: center; padding: 1.4cqw; border-bottom: 1px solid var(--line); }
.phone-page { display: flex; flex: 1; flex-direction: column; justify-content: center; padding: 1.5cqw; background: var(--surface); line-height: 1.4; }
.phone-page > strong { margin-block: .7cqw; font-size: 1.27em; }
.phone-reference, .phone-verse { color: var(--accent); font-size: .85em; font-weight: 650; }
.phone-verse { margin-top: .8cqw; }
.phone-tabs { display: flex; justify-content: space-around; padding: 1.35cqw 1cqw; border-top: 1px solid var(--line); color: var(--muted); }
.phone-tabs span:first-child { color: var(--accent); font-weight: 700; }

section[id] { scroll-margin-block-start: 20px; }
.download-section { border-block: 1px solid var(--line); background: var(--section); padding-block: clamp(46px, 6vw, 78px); }
.section-heading { margin-bottom: 26px; }
.section-heading h2, .support-card h2 { font-size: clamp(1.8rem, 3.7vw, 2.6rem); line-height: 1.2; letter-spacing: -.05em; }
.section-heading p, .support-card p { margin-top: 9px; color: var(--muted); }
.platforms { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.platform { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(17px, 2.3vw, 28px); border: 1px solid var(--line); border-radius: 14px; background: var(--surface); }
.platform-icon { width: 46px; height: 46px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 10px; background: var(--selection); color: var(--accent); }
.platform-icon svg { width: 23px; height: 23px; }
.windows-icon { width: 22px; height: 22px; background: linear-gradient(90deg, currentColor 46%, transparent 46% 54%, currentColor 54%); clip-path: polygon(0 0, 100% 0, 100% 46%, 0 46%, 0 54%, 100% 54%, 100% 100%, 0 100%); }
.android-icon { position: relative; width: 26px; height: 14px; border: 2px solid currentColor; border-radius: 14px 14px 3px 3px; background: radial-gradient(circle at 6.5px 6px, currentColor 1px, transparent 1.6px), radial-gradient(circle at 15.5px 6px, currentColor 1px, transparent 1.6px); }
.android-icon::before, .android-icon::after { content: ''; position: absolute; top: -5px; width: 2px; height: 6px; border-radius: 2px; background: currentColor; }
.android-icon::before { left: 3px; transform: rotate(-30deg); }
.android-icon::after { right: 3px; transform: rotate(30deg); }
.platform h3 { font-size: 1.45rem; line-height: 1.2; letter-spacing: -.025em; }
.platform p { margin-top: 6px; color: var(--muted); word-break: keep-all; font-size: .9375rem; }
.platform .release { margin-top: 14px; margin-bottom: 12px; font-size: .875rem; }
.download { align-self: stretch; margin-top: auto; background: var(--selection); color: var(--accent); }
.download:hover { border-color: var(--accent); }
.pending .platform-icon { color: var(--muted); background: var(--section); }
.status { color: var(--muted); font-size: .875rem; font-weight: 700; border: 1px solid var(--line); border-radius: 5px; padding: 3px 9px; margin-top: 14px; }
.install-guide { margin-top: 16px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.install-guide summary { padding: 12px 16px; min-height: 48px; font-weight: 650; border-radius: inherit; cursor: pointer; }
.install-guide ul { margin: 0; padding: 0 26px 14px 39px; color: var(--muted); }
.install-guide li + li { margin-top: 4px; }

.support-section { padding-block: clamp(40px, 7vw, 84px); }
.support-card { display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; padding: clamp(21px, 4vw, 44px); border: 1px solid var(--line); border-radius: 16px; background: var(--selection); }
.support-card h2 { font-size: clamp(1.5rem, 3.5vw, 2rem); }
.support-icon { display: grid; place-items: center; width: 55px; height: 55px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--accent); font-family: system-ui, sans-serif; font-size: 2rem; line-height: 1; }
.support-card .support-status { margin: 0; padding: 8px 12px; border-radius: 6px; background: var(--surface); font-size: .875rem; font-weight: 650; }
.site-footer { border-top: 1px solid var(--line); }
.footer-inner { min-height: 78px; }
.footer-inner .brand { font-size: 1.05rem; }
.footer-inner small { color: var(--muted); font-size: .875rem; }

@media (max-width: 900px) {
  .container { width: calc(100% - 56px); }
  .hero { gap: 30px; }
  .hero-copy h1 { font-size: clamp(3.65rem, 8.2vw, 5rem); }
}

@media (max-width: 680px) {
  .container { width: calc(100% - 36px); }
  .header-inner { min-height: 62px; }
  .brand { gap: 7px; font-size: 1.2rem; }
  .header-inner .brand img { width: 34px; height: 34px; }
  .nav { gap: 14px; font-size: .9rem; }
  .hero { grid-template-columns: 1fr; padding-block: 41px 34px; gap: 30px; }
  .hero-copy h1 { font-size: clamp(3.35rem, 12vw, 4.5rem); }
  .hero-copy p { margin-block: 17px 22px; }
  .preview-stage { border-radius: 12px; }
  .platforms { grid-template-columns: 1fr; gap: 10px; }
  .platform { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; }
  .platform-icon { grid-row: span 2; margin: 0; }
  .platform h3 { font-size: 1.25rem; }
  .platform p { margin-top: 3px; }
  .platform .release, .platform .status { grid-column: 2; justify-self: start; }
  .platform .release { margin-block: 8px 11px; }
  .platform .status { margin-top: 8px; }
  .platform .download { grid-column: 1 / -1; }
  .support-card { grid-template-columns: auto 1fr; gap: 12px; }
  .support-icon { width: 42px; height: 42px; font-size: 1.5rem; }
  .support-card .support-status { grid-column: 2; justify-self: start; }
  .support-card p { word-break: keep-all; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
