/* ================================================================
   Allvoca — refined editorial design system
   Monochrome ink-on-paper, one blue accent, generous whitespace.
   ================================================================ */

:root {
  --paper: #faf9f7;
  --paper-raised: #ffffff;
  --ink: #141414;
  --ink-soft: #4a4a4a;
  --ink-faint: #6c6c68; /* ≥4.5:1 on --paper (WCAG AA) */
  --line: #e4e2dd;
  --accent: #2b50ff;
  --accent-soft: #eef1ff;
  --radius: 14px;
  --font-latin: "Montserrat", sans-serif;
  --font-kr: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", sans-serif;
  --maxw: 1080px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-kr);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------------- header ---------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 249, 247, 0.97);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex; align-items: center; justify-content: space-between;
  height: 64px;
}
.wordmark {
  font-family: var(--font-latin);
  font-weight: 800; font-size: 22px; letter-spacing: -0.5px;
}
.wordmark sup {
  font-family: var(--font-kr); font-weight: 500; font-size: 10px;
  color: var(--ink-faint); letter-spacing: 2px; margin-left: 8px; vertical-align: super;
}
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a { font-size: 14.5px; font-weight: 500; color: var(--ink-soft); transition: color .15s; }
.site-nav a:hover { color: var(--ink); }
.site-nav a.active { color: var(--ink); font-weight: 700; box-shadow: 0 2px 0 var(--accent); }
.site-nav a.nav-cta {
  color: #fff; background: var(--ink);
  padding: 8px 18px; border-radius: 100px; font-weight: 600;
}
.site-nav a.nav-cta:hover { background: var(--accent); }
.nav-toggle { display: none; }

/* ---------------- buttons ---------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-kr); font-size: 15px; font-weight: 600;
  padding: 13px 28px; border-radius: 100px; border: 1.5px solid var(--ink);
  cursor: pointer; transition: all .18s ease;
}
.btn-solid { background: var(--ink); color: #fff; }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: #fff; }

/* ---------------- hero ---------------- */
.hero { padding: 88px 0 72px; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 56px; align-items: center; }
.hero .eyebrow {
  font-size: 13.5px; font-weight: 700; letter-spacing: 3px;
  color: var(--accent); text-transform: uppercase; margin-bottom: 20px;
}
.hero h1 {
  font-size: clamp(34px, 5vw, 52px); font-weight: 800;
  line-height: 1.28; letter-spacing: -1px; margin-bottom: 22px;
}
.hero .lede { font-size: 17.5px; color: var(--ink-soft); max-width: 30em; margin-bottom: 36px; }
.hero .cta-row { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-visual { position: relative; }
.hero-visual img {
  border-radius: var(--radius);
  box-shadow: 0 24px 60px -18px rgba(20,20,20,.28);
  aspect-ratio: 4 / 5; object-fit: cover;
}

/* ---------------- stats band ---------------- */
.stats { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-raised); }
.stats .wrap {
  display: grid; grid-template-columns: repeat(3, 1fr);
  padding-top: 44px; padding-bottom: 44px; gap: 24px;
}
.stat { text-align: center; }
.stat .num {
  font-family: var(--font-latin); font-size: clamp(30px, 4vw, 44px);
  font-weight: 800; letter-spacing: -1px; line-height: 1.1;
}
.stat .num .unit { font-family: var(--font-kr); font-size: 0.62em; font-weight: 700; }
.stat .label { margin-top: 6px; font-size: 14px; color: var(--ink-faint); }

/* ---------------- sections ---------------- */
section { padding: 96px 0; }
.section-eyebrow {
  font-family: var(--font-latin); font-size: 12.5px; font-weight: 700;
  letter-spacing: 3px; color: var(--ink-faint); text-transform: uppercase; margin-bottom: 14px;
}
.section-title {
  font-size: clamp(26px, 3.6vw, 36px); font-weight: 800;
  letter-spacing: -0.6px; line-height: 1.35; margin-bottom: 16px;
}
.section-lede { font-size: 16.5px; color: var(--ink-soft); max-width: 38em; }

/* features */
.features-grid {
  margin-top: 56px; display: grid;
  grid-template-columns: repeat(2, 1fr); gap: 20px;
}
.feature {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 36px 32px;
}
.feature .f-num {
  font-family: var(--font-latin); font-weight: 800; font-size: 13px;
  color: var(--accent); letter-spacing: 1px; margin-bottom: 14px;
}
.feature h3 { font-size: 19.5px; font-weight: 700; margin-bottom: 10px; letter-spacing: -0.3px; }
.feature p { font-size: 15px; color: var(--ink-soft); }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.chip {
  font-size: 13px; font-weight: 600; padding: 6px 13px;
  background: var(--accent-soft); color: var(--accent); border-radius: 100px;
}
.chip b { font-family: var(--font-latin); font-weight: 700; }
.chip-row-lg { margin-top: 36px; gap: 10px; max-width: 720px; }
.chip-row-lg .chip { font-size: 14.5px; padding: 9px 18px; }

/* books */
#books { background: var(--ink); color: #f4f3f0; }
#books .section-eyebrow { color: rgba(244,243,240,.45); }
#books .section-lede { color: rgba(244,243,240,.72); }
.books-grid { margin-top: 56px; display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.book-card {
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius); overflow: hidden;
  display: flex; flex-direction: column;
  transition: transform .2s ease, border-color .2s ease;
}
.book-card:hover { transform: translateY(-4px); border-color: rgba(255,255,255,.3); }
.book-card img { aspect-ratio: 16 / 10.5; object-fit: cover; }
.book-card .book-body { padding: 28px 28px 30px; flex: 1; display: flex; flex-direction: column; }
.book-card h3 { font-size: 21px; font-weight: 700; letter-spacing: -0.3px; }
.book-card .book-range {
  font-family: var(--font-latin); font-size: 13px; font-weight: 600;
  color: rgba(244,243,240,.55); letter-spacing: 1px; margin: 4px 0 12px;
}
.book-card p { font-size: 14.5px; color: rgba(244,243,240,.72); margin-bottom: 18px; }
.book-feats { list-style: none; margin: 0 0 24px; flex: 1; }
.book-feats li {
  position: relative; padding-left: 22px; margin-bottom: 7px;
  font-size: 13.5px; color: rgba(244,243,240,.82);
}
.book-feats li::before {
  content: ""; position: absolute; left: 0; top: 7px;
  width: 11px; height: 6px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}
.book-links { display: flex; gap: 10px; flex-wrap: wrap; }
.book-links .btn { font-size: 14px; padding: 10px 22px; border-color: #f4f3f0; }
.book-links .btn-solid { background: #f4f3f0; color: var(--ink); }
.book-links .btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.book-links .btn-ghost { color: #f4f3f0; }
.book-links .btn-ghost:hover { background: #f4f3f0; color: var(--ink); }

/* reader ratings */
.review-grid { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; max-width: 760px; }
.review-card {
  display: block; background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px 30px;
  transition: transform .18s ease, border-color .18s ease;
}
.review-card:hover { transform: translateY(-3px); border-color: var(--ink); }
.rv-score { font-family: var(--font-latin); font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.2; }
.rv-score .rv-star { color: var(--accent); margin-right: 6px; }
.rv-score span { font-size: 16px; font-weight: 700; color: var(--ink-faint); }
.rv-name { margin-top: 6px; font-size: 15.5px; font-weight: 700; }
.rv-src { margin-top: 2px; font-size: 13px; color: var(--ink-faint); }

/* about */
.about-quote {
  font-size: clamp(21px, 3vw, 28px); font-weight: 600; line-height: 1.65;
  letter-spacing: -0.4px; max-width: 26em; margin-top: 32px;
}
.about-quote em { font-style: normal; color: var(--accent); }
.about-body { margin-top: 28px; font-size: 16.5px; color: var(--ink-soft); max-width: 40em; }

/* study center resources */
#study { background: var(--paper-raised); border-top: 1px solid var(--line); }
.resource-grid {
  margin: 48px 0 40px; display: grid;
  grid-template-columns: repeat(5, 1fr); gap: 16px;
}
.resource {
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 20px;
  transition: transform .18s ease, border-color .18s ease;
}
.resource:hover { transform: translateY(-3px); border-color: var(--ink); }
.resource .r-icon { font-size: 26px; display: block; margin-bottom: 14px; }
.resource h3 { font-size: 16px; font-weight: 700; margin-bottom: 6px; letter-spacing: -0.2px; }
.resource p { font-size: 13px; color: var(--ink-soft); line-height: 1.6; }

/* final cta */
.final-cta { background: var(--ink); color: #f4f3f0; text-align: center; }
.final-cta h2 {
  font-size: clamp(28px, 4vw, 40px); font-weight: 800;
  letter-spacing: -0.7px; line-height: 1.35; margin-bottom: 14px;
}
.final-cta p { color: rgba(244,243,240,.65); font-size: 16.5px; margin-bottom: 36px; }
.final-cta .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.final-cta .btn { border-color: #f4f3f0; }
.final-cta .btn-solid { background: #f4f3f0; color: var(--ink); }
.final-cta .btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.final-cta .btn-ghost { color: #f4f3f0; }
.final-cta .btn-ghost:hover { background: #f4f3f0; color: var(--ink); }

/* ---------------- footer ---------------- */
.site-footer { padding: 56px 0 64px; border-top: 1px solid var(--line); }
.footer-links { display: flex; gap: 24px; flex-wrap: wrap; margin-bottom: 28px; }
.footer-links a { font-size: 14px; font-weight: 600; color: var(--ink-soft); }
.footer-links a:hover { color: var(--accent); }
.biz-info { font-size: 12.5px; color: var(--ink-faint); line-height: 2; }
.biz-info .copy { margin-top: 10px; font-family: var(--font-latin); letter-spacing: .5px; }

/* ================================================================
   Study Center
   ================================================================ */
.study-hero { padding: 64px 0 40px; }
.study-hero h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -0.7px; margin-bottom: 12px; }
.study-hero p { color: var(--ink-soft); font-size: 16.5px; max-width: 36em; }

/* big jump box — the centerpiece of the study page */
.jump-hero { margin-top: 36px; }
.jump-hero label {
  display: block; font-size: 15px; font-weight: 700; color: var(--ink);
  margin-bottom: 12px;
}
.jump-hero-controls {
  display: flex; gap: 12px; max-width: 460px;
}
.jump-hero-controls input {
  flex: 1; min-width: 0;
  padding: 18px 26px; border: 2px solid var(--ink); border-radius: 100px;
  font-family: var(--font-latin); font-size: 22px; font-weight: 700;
  background: var(--paper-raised); color: var(--ink); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.jump-hero-controls input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.jump-hero-controls input::placeholder { color: var(--ink-faint); font-weight: 500; }
.jump-hero-controls button {
  border: 0; background: var(--ink); color: #fff; cursor: pointer;
  font-family: var(--font-kr); font-size: 17px; font-weight: 700;
  padding: 18px 34px; border-radius: 100px; white-space: nowrap;
  transition: background .15s, transform .15s;
}
.jump-hero-controls button:hover { background: var(--accent); transform: translateY(-1px); }
/* hide number spinners */
.jump-form input::-webkit-outer-spin-button,
.jump-form input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.jump-form input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.study-toolbar {
  position: sticky; top: 64px; z-index: 40;
  background: rgba(250, 249, 247, 0.97);
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 14px 0;
}
.study-toolbar .wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }

.vol-tabs { display: flex; background: var(--line); border-radius: 100px; padding: 3px; }
.vol-tab {
  border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-kr); font-size: 14.5px; font-weight: 600; color: var(--ink-soft);
  padding: 8px 22px; border-radius: 100px; transition: all .15s;
}
.vol-tab.active { background: var(--ink); color: #fff; }

.jump-box { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.jump-box label { font-size: 13.5px; color: var(--ink-faint); font-weight: 500; }
.jump-box input {
  width: 96px; padding: 9px 14px; border: 1.5px solid var(--line); border-radius: 100px;
  font-family: var(--font-latin); font-size: 14px; font-weight: 600;
  background: var(--paper-raised); color: var(--ink); outline: none;
  transition: border-color .15s;
}
.jump-box input:focus { border-color: var(--accent); }
.jump-box button {
  border: 0; background: var(--ink); color: #fff; cursor: pointer;
  font-family: var(--font-kr); font-size: 13.5px; font-weight: 600;
  padding: 9px 18px; border-radius: 100px; transition: background .15s;
}
.jump-box button:hover { background: var(--accent); }

.study-main { padding: 40px 0 96px; }

.range-group { margin-bottom: 40px; }
.range-head { margin-bottom: 14px; }
.range-head h2 {
  font-family: var(--font-latin); font-size: 19px; font-weight: 800; letter-spacing: -0.2px;
}

.block-list {
  background: var(--paper-raised); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}
.block-row { border-bottom: 1px solid var(--line); }
.block-row:last-child { border-bottom: 0; }
.block-row.flash { animation: flash 1.6s ease; }
@keyframes flash { 0%, 45% { background: var(--accent-soft); } 100% { background: transparent; } }

.block-main {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 20px;
}
.block-label {
  font-family: var(--font-latin); font-size: 15px; font-weight: 700;
  letter-spacing: .2px; min-width: 128px;
}
.block-actions { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }
.act {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-kr); font-size: 13px; font-weight: 600;
  padding: 7px 14px; border-radius: 100px; cursor: pointer;
  border: 1px solid var(--line); background: var(--paper); color: var(--ink-soft);
  transition: all .15s;
}
.act:hover { border-color: var(--ink); color: var(--ink); }
.act.playing { background: var(--ink); border-color: var(--ink); color: #fff; }
.act svg { width: 11px; height: 11px; flex: none; }

.row-panel { display: none; padding: 0 20px 20px; }
.row-panel.open { display: block; }
.row-panel .frame-holder {
  border-radius: 10px; overflow: hidden; background: #000;
  aspect-ratio: 16 / 9; max-width: 640px;
  box-shadow: 0 12px 32px -12px rgba(20,20,20,.35);
}
.row-panel iframe { width: 100%; height: 100%; border: 0; display: block; }
.row-panel .panel-note { font-size: 14px; color: var(--ink-faint); padding: 6px 2px; }
.row-panel .panel-note a { color: var(--accent); font-weight: 600; }

/* sentence translations table */
.sheet-table {
  border: 1px solid var(--line); border-radius: 10px;
  background: var(--paper); overflow: hidden;
}
.sent-head, .sent-row {
  display: grid; grid-template-columns: 52px 1.15fr 1fr; gap: 14px;
  padding: 9px 16px; align-items: baseline;
}
.sent-head {
  font-size: 12.5px; font-weight: 700; color: var(--ink-faint);
  border-bottom: 1px solid var(--line); letter-spacing: 1px;
  position: sticky; top: 0; background: var(--paper);
}
.sent-body { max-height: 420px; overflow-y: auto; }
.sent-row { border-bottom: 1px solid var(--line); }
.sent-row:last-child { border-bottom: 0; }
.sent-num {
  font-family: var(--font-latin); font-size: 12.5px; font-weight: 700;
  color: var(--ink-faint);
}
.sent-en { font-size: 14.5px; font-weight: 500; }
.sent-ko { font-size: 14px; color: var(--ink-soft); }
.sheet-foot {
  border-top: 1px solid var(--line); padding: 10px 16px;
  background: var(--paper-raised);
}
.sheet-foot a {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: var(--ink-faint);
}
.sheet-foot a:hover { color: var(--accent); }
.sheet-foot a svg { width: 11px; height: 11px; }

.study-extras { margin-top: 24px; }
.study-extras .ex-title { font-size: 14px; font-weight: 700; color: var(--ink-faint); margin-bottom: 12px; letter-spacing: 1px; }
.extras-row { display: flex; gap: 10px; flex-wrap: wrap; }
.extra-link {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 600; color: var(--ink-soft);
  border: 1px solid var(--line); background: var(--paper-raised);
  padding: 10px 20px; border-radius: 100px; transition: all .15s;
}
.extra-link:hover { border-color: var(--ink); color: var(--ink); }

/* ---------------- responsive ---------------- */
@media (max-width: 860px) {
  section { padding: 64px 0; }
  .hero { padding: 48px 0; }
  .hero .wrap { grid-template-columns: 1fr; gap: 36px; }
  .hero-visual { order: -1; }
  .hero-visual img { aspect-ratio: 16 / 10; }
  .features-grid, .books-grid { grid-template-columns: 1fr; }
  .resource-grid { grid-template-columns: 1fr 1fr; }
  .stats .wrap { grid-template-columns: 1fr 1fr 1fr; gap: 10px; padding-top: 32px; padding-bottom: 32px; }
  /* mobile nav: hamburger + dropdown panel */
  .nav-toggle {
    display: inline-flex; flex-direction: column; justify-content: center; gap: 4.5px;
    width: 40px; height: 40px; padding: 9px;
    border: 0; background: none; cursor: pointer;
  }
  .nav-toggle span {
    display: block; height: 2px; width: 100%; background: var(--ink); border-radius: 2px;
    transition: transform .18s ease, opacity .18s ease;
  }
  .site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
  .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }
  .site-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    display: none; flex-direction: column; align-items: flex-start; gap: 0;
    background: var(--paper-raised); border-bottom: 1px solid var(--line);
    padding: 10px 24px 20px;
    box-shadow: 0 24px 40px -24px rgba(20,20,20,.25);
  }
  .site-header.nav-open .site-nav { display: flex; }
  .site-nav a { display: block; width: 100%; padding: 12px 0; font-size: 16px; border-bottom: 1px solid var(--line); }
  .site-nav a.active { box-shadow: none; color: var(--accent); }
  .site-nav a.nav-cta {
    display: inline-flex; width: auto; margin-top: 14px;
    padding: 10px 22px; border-bottom: 0; color: #fff;
  }
  .review-grid { grid-template-columns: 1fr; }
  .study-toolbar { top: 63px; }
  .jump-box { margin-left: 0; }
  .jump-hero-controls input { font-size: 18px; padding: 15px 20px; }
  .jump-hero-controls button { font-size: 15px; padding: 15px 24px; }
  .block-main { flex-wrap: wrap; }
  .block-actions { margin-left: 0; width: 100%; }
  .sent-head { display: none; }
  .sent-row { grid-template-columns: 40px 1fr; }
  .sent-en { grid-column: 2; }
  .sent-ko { grid-column: 2; }
}
