/* ================================================================
   Allvoca — homepage revamp layer v2 (loads after style.css)
   Editorial ink-on-paper, upgraded craft: numbered sections,
   layered cover composition, rank ribbon, refined type scale.
   ================================================================ */

/* fixes + global refinements */
section, .stats { scroll-margin-top: 72px; }
.btn { white-space: nowrap; }

.site-nav a { position: relative; }
.site-nav a:not(.nav-cta)::after {
  content: ""; position: absolute; left: 0; right: 100%; bottom: -4px;
  height: 2px; background: var(--accent); transition: right .18s ease;
}
.site-nav a:not(.nav-cta):hover::after { right: 0; }

/* numbered section eyebrows */
.section-eyebrow { display: flex; align-items: center; gap: 14px; }
.section-eyebrow .no { color: var(--accent); font-weight: 800; }
.section-eyebrow::after { content: ""; flex: 0 0 48px; height: 1px; background: var(--line); }

/* ---------------- hero ---------------- */
.hero { padding: 84px 0 0; position: relative; overflow: hidden; }
.hero .wrap { grid-template-columns: 1.02fr 0.98fr; gap: 48px; padding-bottom: 84px; }

.hero-kicker {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 13.5px; font-weight: 700; color: var(--ink);
  border: 1px solid var(--line); background: var(--paper-raised);
  padding: 8px 18px 8px 12px; border-radius: 100px; margin-bottom: 28px;
  box-shadow: 0 2px 10px -4px rgba(20,20,20,.08);
  white-space: nowrap;
}
@media (max-width: 960px) {
  .hero-kicker { font-size: 12px; padding: 7px 14px 7px 10px; }
}
.hero-kicker .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.hero-kicker em { font-style: normal; color: var(--accent); }

.hero h1 { font-size: clamp(36px, 5.2vw, 58px); line-height: 1.22; letter-spacing: -1.5px; }
.hero h1 em { font-style: normal; color: var(--accent); }
.hero .lede { font-size: 18px; line-height: 1.85; }

/* 3D book composition */
.hero-covers {
  position: relative; min-height: 500px;
  display: flex; align-items: center; justify-content: center;
  perspective: 1500px;
}
.hero-covers::before {
  content: ""; position: absolute; inset: 8% 2% 4% 2%;
  background:
    radial-gradient(ellipse at 60% 40%, var(--accent-soft) 0%, rgba(238,241,255,0) 62%);
}
.book3d {
  position: absolute; left: 50%; top: 50%;
  transform-style: preserve-3d;
}
.book3d img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  border-radius: 2px 6px 6px 2px;
  transform: translateZ(var(--bd));
  box-shadow: 0 44px 70px -30px rgba(20,20,20,.42);
}
.book3d::before { /* fore-edge: page block */
  content: ""; position: absolute; top: 3px; bottom: 3px; right: 0;
  width: calc(var(--bd) * 2 - 3px);
  transform: translateX(calc(var(--bd) - 1.5px)) rotateY(90deg);
  background: repeating-linear-gradient(90deg, #fdfcfa 0 2px, #e7e4dc 2px 3px);
}
.book3d::after { /* back cover */
  content: ""; position: absolute; inset: 0;
  transform: translateZ(calc(var(--bd) * -1));
  background: var(--bc); border-radius: 6px 2px 2px 6px;
  box-shadow: 0 40px 60px -24px rgba(20,20,20,.35);
}
.book3d-basic {
  --bd: 17px; --bc: #eceae4;
  width: 300px; height: 442px; z-index: 2;
  transform: translate(-50%, -50%) translateX(-78px) rotateY(-26deg) rotateZ(-1.5deg);
}
.book3d-advanced {
  --bd: 15px; --bc: #0d0d0d;
  width: 260px; height: 380px; z-index: 1;
  transform: translate(-50%, -50%) translateX(128px) translateY(-14px) rotateY(-26deg) rotateZ(2deg);
}
/* (cover badge removed \u2014 the covers themselves carry \ud1b5\ud569\uc801\uc6a9\ub960 99%) */

/* rank ribbon — marquee of the priority axis, #0001 → #7500 */
.rank-ribbon { border-top: 1px solid var(--line); background: var(--paper-raised); overflow: hidden; }
.rank-ribbon .wrap {
  display: flex; align-items: center; gap: 26px;
  padding-top: 20px; padding-bottom: 20px;
}
.rank-ribbon .rr-label {
  flex: none; font-size: 12.5px; font-weight: 700; color: var(--ink-faint);
  letter-spacing: 1px; white-space: nowrap;
}
.rr-viewport {
  flex: 1; overflow: hidden;
  mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 48px, #000 calc(100% - 48px), transparent 100%);
}
.rr-track {
  display: flex; align-items: center; width: max-content;
  animation: rr-move 32s linear infinite;
}
.rank-ribbon:hover .rr-track { animation-play-state: paused; }
@keyframes rr-move { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .rr-track { animation: none; } }
.rr-item { flex: none; display: flex; flex-direction: column; gap: 1px; }
.rr-item .rr-no { font-family: var(--font-latin); font-size: 11.5px; font-weight: 700; color: var(--accent); letter-spacing: .5px; }
.rr-item .rr-word { font-family: var(--font-latin); font-size: 16px; font-weight: 700; letter-spacing: -0.2px; }
.rr-sep {
  flex: none; width: 46px; height: 1px; margin: 0 22px;
  background: repeating-linear-gradient(90deg, var(--line) 0 6px, transparent 6px 12px);
}

/* ---------------- features (교재 특징) ---------------- */
.features-grid { grid-template-columns: repeat(3, 1fr); }
.feature { padding: 32px 30px; transition: border-color .18s ease, transform .18s ease; }
.feature:hover { border-color: var(--ink); transform: translateY(-3px); }
.feature .f-num { display: flex; align-items: center; gap: 10px; }
.feature .f-num::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.feature p b { color: var(--ink); font-weight: 700; }

/* level strip — Lv.1–8 학습 가이드 */
.level-strip { display: flex; gap: 4px; margin-top: 20px; align-items: flex-end; height: 40px; }
.level-strip i { flex: 1; background: var(--accent-soft); border-radius: 3px 3px 0 0; }
.level-strip i:nth-child(1) { height: 18%; } .level-strip i:nth-child(2) { height: 28%; }
.level-strip i:nth-child(3) { height: 38%; } .level-strip i:nth-child(4) { height: 50%; }
.level-strip i:nth-child(5) { height: 62%; background: color-mix(in oklab, var(--accent) 38%, var(--accent-soft)); }
.level-strip i:nth-child(6) { height: 74%; background: color-mix(in oklab, var(--accent) 56%, var(--accent-soft)); }
.level-strip i:nth-child(7) { height: 87%; background: color-mix(in oklab, var(--accent) 76%, var(--accent-soft)); }
.level-strip i:nth-child(8) { height: 100%; background: var(--accent); }
.level-caption { display: flex; justify-content: space-between; margin-top: 6px; font-family: var(--font-latin); font-size: 11px; font-weight: 700; color: var(--ink-faint); }

/* exam ledger — dictionary-index style rows */
.exam-ledger { margin-top: 44px; max-width: 680px; }
.exam-row {
  display: flex; align-items: baseline; gap: 18px;
  padding: 15px 2px; border-bottom: 1px solid var(--line);
}
.exam-row:first-child { border-top: 1px solid var(--line); }
.exam-row .e-name { flex: none; font-size: 16px; font-weight: 700; }
.exam-row .e-lead {
  flex: 1; align-self: center; height: 1px;
  background: repeating-linear-gradient(90deg, var(--line) 0 5px, transparent 5px 11px);
}
.exam-row .e-pct {
  flex: none; font-family: var(--font-latin); font-size: 27px;
  font-weight: 800; letter-spacing: -1px; line-height: 1;
}
.exam-row .e-pct span { font-size: 15px; font-weight: 700; color: var(--ink-faint); margin-left: 2px; }
.exam-row:hover .e-pct { color: var(--accent); }

.proof-secondary { margin-top: 36px; display: flex; align-items: baseline; gap: 18px; flex-wrap: wrap; }
.proof-secondary .chip { white-space: nowrap; }
.proof-secondary .p-label {
  font-family: var(--font-latin); font-size: 12px; font-weight: 700;
  letter-spacing: 2px; color: var(--ink-faint); text-transform: uppercase; white-space: nowrap;
}

/* 기출 데이터베이스 — data table */
.db-band {
  margin-top: 44px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--paper-raised); overflow: hidden;
}
.db-head {
  display: flex; align-items: baseline; gap: 12px;
  padding: 15px 24px; border-bottom: 1px solid var(--line); background: var(--paper);
}
.db-head .db-title { font-size: 14px; font-weight: 700; }
.db-head .db-sub { font-size: 12.5px; color: var(--ink-faint); }
.db-grid {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 1px; background: var(--line);
}
.db-cell {
  background: var(--paper-raised); padding: 15px 24px 17px;
  display: flex; flex-direction: column; gap: 2px;
}
.db-cell b { font-size: 14px; font-weight: 700; }
.db-cell span { font-size: 13px; color: var(--ink-soft); }
.db-cell em { font-style: normal; font-family: var(--font-latin); font-weight: 700; color: var(--accent); }

/* ---------------- books ---------------- */
.book-card .book-cover {
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,.06); padding: 34px 0 30px;
}
.book-card .book-cover img {
  height: 250px; width: auto; border-radius: 3px;
  aspect-ratio: auto; object-fit: contain;
  box-shadow: 0 22px 44px -18px rgba(0,0,0,.65);
  border: 1px solid rgba(255,255,255,.12);
  transition: transform .25s ease;
}
.book-card:hover .book-cover img { transform: translateY(-5px); }

.store-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.store-row .store-label { font-size: 12.5px; color: rgba(244,243,240,.5); margin-right: 4px; }
.store-link {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 600; color: rgba(244,243,240,.85);
  border: 1px solid rgba(255,255,255,.22); border-radius: 100px;
  padding: 7px 15px; transition: all .15s;
}
.store-link:hover { border-color: #f4f3f0; background: #f4f3f0; color: var(--ink); }
.store-link svg { width: 10px; height: 10px; }

/* ---------------- reviews: quotes ---------------- */
#reviews { background: var(--paper-raised); border-top: 1px solid var(--line); }
.quote-grid { margin-top: 44px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.quote-card {
  display: flex; flex-direction: column; gap: 12px;
  background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px 22px;
}
.quote-stars { display: flex; align-items: center; gap: 10px; }
.quote-stars .q-stars { color: var(--accent); letter-spacing: 3px; font-size: 15px; }
.quote-stars .q-score { font-family: var(--font-latin); font-size: 14px; font-weight: 800; }
.quote-stars .q-score span { color: var(--ink-faint); font-weight: 700; font-size: 12px; }
.quote-card blockquote { margin: 0; font-size: 14px; line-height: 1.75; color: var(--ink-soft); flex: 1; }
.quote-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 3px; }
.quote-meta .q-book { font-size: 14px; font-weight: 700; }
.quote-meta a { font-size: 13px; font-weight: 600; color: var(--ink-faint); }
.quote-meta a:hover { color: var(--accent); }

/* ---------------- resources: svg icons ---------------- */
.resource .r-glyph {
  width: 40px; height: 40px; border-radius: 10px; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  background: var(--accent-soft); color: var(--accent);
  transition: background .15s, color .15s;
}
.resource .r-glyph svg { width: 18px; height: 18px; }
.resource:hover .r-glyph { background: var(--accent); color: #fff; }

/* ---------------- final cta ---------------- */
.final-cta { position: relative; overflow: hidden; }
.final-cta .wrap { position: relative; }
.final-cta::before {
  content: "Allvoca"; position: absolute; left: 50%; bottom: -0.34em; transform: translateX(-50%);
  font-family: var(--font-latin); font-weight: 800; font-size: clamp(120px, 22vw, 300px);
  letter-spacing: -0.04em; color: rgba(244,243,240,.05); line-height: 1; white-space: nowrap;
  pointer-events: none;
}

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  .book3d-basic { width: 260px; height: 383px; transform: translate(-50%, -50%) translateX(-64px) rotateY(-26deg) rotateZ(-1.5deg); }
  .book3d-advanced { width: 224px; height: 327px; transform: translate(-50%, -50%) translateX(96px) translateY(-12px) rotateY(-26deg) rotateZ(2deg); }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 8px; padding-bottom: 56px; }
  .hero .lede { font-size: 16px; }
  .btn { font-size: 14px; padding: 11px 22px; }
  .hero-covers { min-height: 420px; order: 1; }
  .book3d-basic { width: 240px; height: 354px; transform: translate(-50%, -50%) translateX(-62px) rotateY(-26deg) rotateZ(-1.5deg); }
  .book3d-advanced { width: 208px; height: 304px; transform: translate(-50%, -50%) translateX(102px) translateY(-12px) rotateY(-26deg) rotateZ(2deg); }
  .features-grid { grid-template-columns: 1fr; }
  .exam-row .e-pct { font-size: 22px; }
  .quote-grid { grid-template-columns: 1fr 1fr; }
  .db-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .quote-grid { grid-template-columns: 1fr; }
  .db-grid { grid-template-columns: 1fr; }
}
