/* Self-hosted fonts (SIL Open Font License); latin + cyrillic subsets */
@font-face {
  font-family: "Fraunces"; font-style: normal; font-weight: 600 700; font-display: swap;
  src: url(/assets/fonts/fraunces-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/assets/fonts/inter-latin.woff2) format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter"; font-style: normal; font-weight: 400 600; font-display: swap;
  src: url(/assets/fonts/inter-cyrillic.woff2) format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

:root {
  --ink: #1c2633;
  --ink-soft: #4a5666;
  --bg: #fbf7f1;
  --paper: #ffffff;
  --sand: #f3ebdf;
  --blue: #1d4e89;
  --blue-deep: #143a68;
  --accent: #b8532a;
  --accent-deep: #9a4422;
  --line: #e6dccd;
  --field: #948a7c;
  --ok: #2f7d4f;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(28, 38, 51, .06), 0 8px 24px rgba(28, 38, 51, .07);
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.0625rem/1.65 var(--sans);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-underline-offset: 3px; }
a:hover { color: var(--blue-deep); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; color: var(--ink); margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.4rem); }
h3, .h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.narrow { width: min(760px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 100; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }

/* Header */
.site-header { background: var(--paper); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center; width: 42px; height: 42px; border-radius: 10px;
  background: var(--blue); color: #fff; font: 700 1.05rem/1 var(--serif);
}
.brand-text { font: 700 1.2rem/1.1 var(--serif); }
.nav { display: flex; align-items: center; gap: 22px; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; font-size: .98rem; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { color: var(--blue); text-decoration: underline; text-decoration-thickness: 2px; }
.nav-toggle { display: none; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--accent); color: #fff; text-decoration: none; font-weight: 600;
  padding: 14px 24px; border-radius: 999px; border: 0; cursor: pointer; font-size: 1rem;
  transition: background .15s, transform .15s;
}
.btn:hover { background: var(--accent-deep); color: #fff; transform: translateY(-1px); }
.btn-small { padding: 9px 16px; font-size: .92rem; }
.btn-ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.btn-ghost:hover { background: var(--blue); color: #fff; }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }

/* Sections */
section { padding: clamp(48px, 8vw, 88px) 0; }
.section-sand { background: var(--sand); }
.section-blue { background: var(--blue); color: #e9f0f8; }
.section-blue h2, .section-blue h3 { color: #fff; }
.section-blue a:not(.btn) { color: #fff; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600; color: var(--accent-deep); margin-bottom: .6em; }
.section-blue .eyebrow { color: #ffc9a8; }
.lead { font-size: 1.18rem; color: var(--ink-soft); }
.center { text-align: center; }
.center .lead { margin-inline: auto; max-width: 640px; }

/* Hero */
.hero { padding: clamp(36px, 6vw, 72px) 0 clamp(48px, 7vw, 80px); }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.hero-photo { position: relative; }
.hero-photo img { border-radius: 22px; box-shadow: var(--shadow); aspect-ratio: 4 / 4.4; object-fit: cover; object-position: 42% 80%; width: 100%; }
.hero-badge {
  position: absolute; left: -18px; bottom: 26px; background: var(--paper); border-radius: 14px;
  padding: 12px 16px; box-shadow: var(--shadow); font-size: .92rem; line-height: 1.35; max-width: 230px;
}
.hero-badge strong { display: block; font-family: var(--serif); font-size: 1.05rem; }
.stars { color: #e3a008; letter-spacing: 2px; }
.trust { display: flex; flex-wrap: wrap; gap: 10px 22px; margin: 22px 0 0; padding: 0; list-style: none; color: var(--ink-soft); font-size: .95rem; }
.trust li::before { content: "✓"; color: var(--ok); font-weight: 700; margin-right: 6px; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px; margin-top: 32px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px; box-shadow: var(--shadow); display: flex; flex-direction: column;
}
.card h3 { margin-bottom: .3em; }
.card p { color: var(--ink-soft); }
.card .more { margin-top: auto; font-weight: 600; text-decoration: none; }
.card .more::after { content: " →"; }
.price { font: 700 2rem/1 var(--serif); color: var(--blue); margin: 6px 0 14px; }
.price span { font: 500 .95rem var(--sans); color: var(--ink-soft); }
.tag { display: inline-block; background: #fdeee5; color: var(--accent-deep); font-size: .78rem; font-weight: 600; padding: 3px 10px; border-radius: 99px; margin-bottom: 10px; }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-top: 32px; counter-reset: step; }
.step { position: relative; padding: 24px 22px 22px 22px; background: var(--paper); border-radius: var(--radius); border: 1px solid var(--line); }
.step::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%;
  background: var(--blue); color: #fff; font: 700 1.05rem var(--serif); margin-bottom: 12px;
}
.step p { color: var(--ink-soft); margin: 0; }

/* Split */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split img { border-radius: 18px; box-shadow: var(--shadow); }
.split.reverse > :first-child { order: 2; }

/* Where */
.where { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.where div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18); border-radius: var(--radius); padding: 22px; }
.where h3 { font-size: 1.15rem; }
.where p { margin: 0; }
.areas { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 22px 0 0; }
.areas li { background: rgba(255,255,255,.12); border-radius: 99px; padding: 5px 14px; font-size: .9rem; }
.areas.light li { background: var(--paper); border: 1px solid var(--line); }

/* Reviews */
.reviews { columns: 3 300px; column-gap: 22px; margin-top: 32px; }
.review {
  break-inside: avoid; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 24px; margin: 0 0 22px; box-shadow: var(--shadow);
}
.review p { margin-bottom: .8em; }
.review footer { font-weight: 600; font-size: .95rem; }
.review footer span { color: var(--ink-soft); font-weight: 400; }
.video-review { max-width: 680px; margin: 32px auto 0; }
.video-review video { border-radius: var(--radius); box-shadow: var(--shadow); width: 100%; background: #000; }
.video-review p { text-align: center; color: var(--ink-soft); font-size: .95rem; margin-top: 10px; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 32px; }
.gallery figure { margin: 0; position: relative; overflow: hidden; border-radius: 12px; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; transition: transform .3s; }
.gallery figure:hover img { transform: scale(1.04); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 22px 10px 8px; font-size: .8rem; color: #fff;
  background: linear-gradient(transparent, rgba(0,0,0,.65));
}
.gallery .wide { grid-column: span 2; }
.gallery .wide img { aspect-ratio: 2 / 1; }
.gallery .top img { object-position: center 25%; }

/* Referral */
.referral { padding: clamp(32px, 5vw, 56px) 0; }
.referral-box {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  background: #fdeee5; border: 1px solid #f5cfb9; border-radius: 18px; padding: clamp(22px, 4vw, 36px);
}
.referral-box h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.referral-box p:last-child { margin-bottom: 0; color: var(--ink-soft); }
.referral-box .btn { flex-shrink: 0; }
@media (max-width: 700px) { .referral-box { flex-direction: column; align-items: flex-start; } }

/* FAQ */
.faq { margin-top: 28px; }
.faq details { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 10px; padding: 0 20px; }
.faq summary { cursor: pointer; font-weight: 600; padding: 18px 0; list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.4rem; line-height: 1; color: var(--accent); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--ink-soft); padding-bottom: 18px; margin: 0; }

/* Page head */
.page-head { padding: clamp(40px, 6vw, 72px) 0 clamp(28px, 4vw, 40px); background: var(--sand); }
.page-head .lead { max-width: 680px; }
.crumbs { font-size: .88rem; color: var(--ink-soft); margin-bottom: 12px; }
.crumbs a { color: var(--ink-soft); }

/* Prose */
.prose h2 { margin-top: 1.6em; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .4em; }

/* Lesson detail rows */
.lesson { display: grid; grid-template-columns: 220px 1fr; gap: 28px; padding: 32px 0; border-top: 1px solid var(--line); }
.lesson:first-of-type { border-top: 0; }
.lesson .price { margin-top: 0; }

/* Contact */
.contact-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: clamp(28px, 5vw, 56px); align-items: start; }
.form { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(22px, 4vw, 34px); box-shadow: var(--shadow); }
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 600; font-size: .95rem; margin-bottom: 6px; }
.field .opt { font-weight: 400; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; padding: 12px 14px; border: 1.5px solid var(--field); border-radius: 10px;
  background: #fffdfa; color: var(--ink);
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(29,78,137,.15); }
.field textarea { min-height: 130px; resize: vertical; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .88rem; color: var(--ink-soft); margin-top: 12px; }
.contact-side .card { margin-bottom: 18px; }
.contact-line { display: flex; flex-direction: column; margin-bottom: 14px; }
.contact-line span { font-size: .85rem; color: var(--ink-soft); }
.contact-line a { font-size: 1.15rem; font-weight: 600; text-decoration: none; word-break: break-word; }

/* CTA band */
.cta-band { text-align: center; }
.cta-band .btn-row { justify-content: center; }
.cta-band .btn-ghost { color: #fff; box-shadow: inset 0 0 0 2px #fff; }
.cta-band .btn-ghost:hover { background: #fff; color: var(--blue); }

/* Footer */
.site-footer { background: #141d28; color: #b9c3cf; padding: 52px 0 96px; font-size: .95rem; }
.site-footer a { color: #e3e9f0; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 32px; }
.footer-brand { font: 700 1.25rem var(--serif); color: #fff; }
.footer-h { color: #fff; font-weight: 600; margin-bottom: .6em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.footer-small a { text-decoration: underline; }
.footer-small { border-top: 1px solid #2a3542; margin-top: 32px; padding-top: 18px; font-size: .85rem; }

/* Mobile call bar */
.mobile-cta { display: none; }

@media (max-width: 900px) {
  .hero-grid, .split, .contact-grid { grid-template-columns: 1fr; }
  .split.reverse > :first-child { order: 0; }
  .hero-photo { max-width: 460px; }
  .hero-photo img { aspect-ratio: 4 / 3; object-position: 40% 85%; }
  .hero-badge { left: auto; right: -8px; bottom: -18px; max-width: 200px; font-size: .85rem; }
  .steps, .where { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .lesson { grid-template-columns: 1fr; gap: 6px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid > :first-child { grid-column: 1 / -1; }

  .nav-toggle {
    display: inline-flex; font: 600 .95rem var(--sans); background: var(--sand); color: var(--ink);
    border: 1px solid var(--line); border-radius: 99px; padding: 8px 16px; cursor: pointer;
  }
  .nav {
    display: none; position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 18px;
  }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); }
  .nav .btn { margin-top: 14px; }

  .mobile-cta {
    display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
    background: var(--paper); border-top: 1px solid var(--line); box-shadow: 0 -4px 16px rgba(0,0,0,.08);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .mobile-cta a { text-align: center; padding: 14px 0; font-weight: 600; text-decoration: none; color: var(--blue); }
  .mobile-cta a:first-child { background: var(--accent); color: #fff; }
}

@media (max-width: 560px) {
  body { font-size: 1rem; }
  .row2 { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .gallery .wide { grid-column: span 2; }
  .btn-row .btn { width: 100%; }
}

/* Other scripts: the visitor's own system fonts render these best */
:lang(ja) { --serif: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif; --sans: "Hiragino Sans", "Yu Gothic UI", "Meiryo", "Noto Sans JP", system-ui, sans-serif; }
:lang(ko) { --serif: "Nanum Myeongjo", "Noto Serif KR", serif; --sans: "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif; }
:lang(ru) { --serif: Georgia, "PT Serif", "Times New Roman", serif; }
:lang(zh-Hans) { --serif: "Songti SC", "SimSun", "Noto Serif SC", serif; --sans: "PingFang SC", "Microsoft YaHei", "Noto Sans SC", system-ui, sans-serif; }
:lang(zh-Hant) { --serif: "Songti TC", "PMingLiU", "Noto Serif TC", serif; --sans: "PingFang TC", "Microsoft JhengHei", "Noto Sans TC", system-ui, sans-serif; }
:lang(ja) body, :lang(zh) body { line-break: strict; }
mark.todo { background: #ffe58a; color: var(--ink); padding: 0 .3em; border-radius: 4px; font-weight: 600; }
:lang(ko) body { word-break: keep-all; overflow-wrap: anywhere; }

/* Chat app buttons */
.chat-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 2px 0 18px; }
.chat-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 999px;
  font-weight: 600; font-size: .95rem; text-decoration: none; color: #fff;
}
.chat-btn:hover { color: #fff; filter: brightness(.95); }
.chat-whatsapp { background: #15703a; }
.chat-line { background: #057a35; }
.chat-kakao { background: #fee500; color: #191919; }
.chat-kakao:hover { color: #191919; }

/* The logo stays in the brand font on every language page */
.brand-mark, .brand-text, .footer-brand { font-family: "Fraunces", Georgia, serif; }
/* Language names in the footer use system fonts, so every page doesn't download the Cyrillic web font */
.footer-langs a { font-family: system-ui, -apple-system, "Segoe UI", sans-serif; }

/* Drafts (only built with --drafts) */
.draft-banner {
  position: relative; z-index: 70; background: #b42318; color: #fff; text-align: center;
  font-weight: 600; padding: 8px 16px; font-size: .9rem;
}

/* Articles */
.article { padding-top: 0; }
.article .prose { font-size: 1.08rem; }
.article .prose h2 { font-size: 1.6rem; }
.article .prose table { width: 100%; border-collapse: collapse; margin: 1.2em 0; font-size: .97rem; }
.article .prose th, .article .prose td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.article .prose th { background: var(--sand); }
.table-scroll { overflow-x: auto; }
.byline { color: var(--ink-soft); font-size: .95rem; }
.note { background: var(--sand); border-left: 4px solid var(--accent); padding: 14px 18px; border-radius: 0 10px 10px 0; }

/* Level quiz */
.quiz { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); }
.quiz fieldset { border: 0; padding: 0; margin: 0 0 22px; }
.quiz legend { font-weight: 600; margin-bottom: 10px; font-size: 1.05rem; }
.quiz label { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1.5px solid var(--field); border-radius: 10px; margin-bottom: 8px; cursor: pointer; }
.quiz label:hover { border-color: var(--blue); }
.quiz input[type=radio] { margin-top: 4px; accent-color: var(--blue); }
.quiz-progress { color: var(--ink-soft); font-size: .9rem; margin-bottom: 14px; }
.quiz-result { text-align: center; }
.quiz-result .level { font: 700 3rem/1 var(--serif); color: var(--blue); margin: 10px 0; }

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
