/* =========================================================
   Cia-Cia Archive — shared stylesheet
   (originally designed by Jacob for the first version of the site)
   ========================================================= */

:root {
  color-scheme: light;
  --color-bg: #fcfcfa;
  --color-bg-alt: #f1f0eb;
  --color-surface: #ffffff;
  --color-text: #1b1b1a;
  --color-text-muted: #5d5d58;
  --color-primary: #1f5c4a;      /* forest green — CTAs, links */
  --color-primary-dark: #154234;
  --color-secondary: #7d6534;    /* old gold — accents */
  --color-border: #e2e0d8;
  --color-hero-overlay: rgba(10, 20, 16, 0.45);
  --hero-gradient: linear-gradient(135deg, #4a6b5f, #1f5c4a 55%, #10271f);
  --hero-eyebrow: #e3d6b0;
  --glow-1: rgba(31,92,74,0.08);
  --glow-2: rgba(125,101,52,0.10);
  --thumb-dictionary: linear-gradient(135deg, #2f6f5c, #10271f);
  --thumb-stories: linear-gradient(135deg, #a08a5c, #5c4a26);
  --thumb-recordings: linear-gradient(135deg, #55605c, #22282a);
  --thumb-culture: linear-gradient(135deg, #6f8a6a, #2f4430);

  --font-serif: 'Fraunces', 'Noto Sans KR', Georgia, 'Times New Roman', serif;
  --font-sans: 'Work Sans', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --max-width: 1120px;
  --radius: 10px;
  --shadow: 0 2px 10px rgba(43, 36, 28, 0.08);
  --shadow-lg: 0 12px 40px rgba(43, 36, 28, 0.16);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5em;
  color: var(--color-text);
}

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 500; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--color-text); }

a { color: var(--color-primary); }

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

img { max-width: 100%; display: block; }

/* ---------- Header / Nav ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  max-width: var(--max-width);
  margin: 0 auto;
}

.nav-brand {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-brand .mark {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-primary);
}

.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.btn-primary {
  background: var(--color-primary);
  color: #fff;
}
.btn-primary:hover { background: var(--color-primary-dark); box-shadow: var(--shadow); }

/* .nav-links a rules above are more specific than .btn-primary alone —
   these override them so the nav Donate button stays white in every state. */
.nav-links a.btn-primary,
.nav-links a.btn-primary:hover,
.nav-links a.btn-primary[aria-current="page"] {
  color: #fff;
}

.btn-outline {
  background: transparent;
  border-color: var(--color-primary);
  color: var(--color-primary);
}
.btn-outline:hover { background: var(--color-primary); color: #fff; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  font-size: 1.6rem;
  cursor: pointer;
  color: var(--color-text);
}

@media (max-width: 780px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links .btn { width: 100%; text-align: center; }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding: 110px 24px 90px;
  text-align: center;
  background: linear-gradient(180deg, var(--color-bg-alt), var(--color-bg));
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 15% 25%, var(--glow-1), transparent 45%),
                     radial-gradient(circle at 85% 75%, var(--glow-2), transparent 45%);
  pointer-events: none;
}

.hero-inner {
  position: relative;
  max-width: 780px;
  margin: 0 auto;
}

.eyebrow {
  display: inline-block;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-secondary);
  margin-bottom: 18px;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--color-text-muted);
  max-width: 620px;
  margin: 18px auto 32px;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.hero-banner {
  position: relative;
  height: 46vh;
  min-height: 320px;
  display: flex;
  align-items: flex-end;
  background: linear-gradient(180deg, rgba(0,0,0,0.05), var(--color-hero-overlay)),
              var(--hero-gradient);
}

.hero-banner .container { padding-bottom: 48px; }

.hero-banner .eyebrow { color: var(--hero-eyebrow); }
.hero-banner h1, .hero-banner p { color: #fff; }
.hero-banner p.lead { color: rgba(255,255,255,0.88); margin-left: 0; }

/* ---------- Sections ---------- */

section { padding: 72px 0; }
section.alt { background: var(--color-bg-alt); }

.section-head {
  max-width: 680px;
  margin: 0 auto 44px;
  text-align: center;
}
.section-head.left { text-align: left; margin-left: 0; }

/* ---------- Language cards (home) ---------- */

.lang-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 28px;
}

.lang-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: var(--color-text);
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.lang-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.lang-card .thumb {
  height: 170px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.lang-card .thumb.cia-cia {
  background: linear-gradient(135deg, #c97a45, #7a3421);
}
.lang-card .thumb.australia {
  background: linear-gradient(135deg, #b06a3a, #3f2a1c);
}

.lang-card .status {
  position: absolute;
  top: 14px;
  right: 14px;
  background: rgba(255,255,255,0.92);
  color: var(--color-text);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 999px;
}

.lang-card .body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.lang-card .body h3 { margin-bottom: 6px; }
.lang-card .body .region { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 12px; }
.lang-card .body p { color: var(--color-text-muted); font-size: 0.95rem; flex: 1; }
.lang-card .body .go { font-weight: 600; color: var(--color-primary); font-size: 0.9rem; margin-top: 10px; }

/* ---------- Content blocks ---------- */

.prose { max-width: 720px; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.prose p, .prose li { color: var(--color-text-muted); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 20px;
  margin: 36px 0;
}
.stat {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
}
.stat .num {
  font-family: var(--font-serif);
  font-size: 1.9rem;
  color: var(--color-primary);
  display: block;
}
.stat .label {
  font-size: 0.8rem;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.callout {
  border-left: 3px solid var(--color-secondary);
  background: var(--color-bg-alt);
  padding: 18px 22px;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 28px 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}
.callout strong { color: var(--color-text); }

/* ---------- Media grid (video archive) ---------- */

.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.media-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  overflow: hidden;
}

.media-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #1b1712;
  display: flex;
  align-items: center;
  justify-content: center;
}

.media-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-placeholder {
  color: rgba(255,255,255,0.55);
  text-align: center;
  padding: 20px;
  font-size: 0.85rem;
}
.media-placeholder .icon { font-size: 1.8rem; display: block; margin-bottom: 8px; }

.media-card .body { padding: 16px 18px; }
.media-card h4 { margin-bottom: 4px; font-size: 1.02rem; }
.media-card .meta { font-size: 0.82rem; color: var(--color-text-muted); }

/* ---------- Interview / translation list ---------- */

.entry-list { display: flex; flex-direction: column; gap: 18px; }

.entry {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.entry h4 { margin-bottom: 6px; }
.entry .meta { font-size: 0.82rem; color: var(--color-text-muted); margin-bottom: 10px; }
.entry .excerpt { font-style: italic; color: var(--color-text-muted); }

.translation-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  padding: 18px 0;
  border-bottom: 1px solid var(--color-border);
}
.translation-pair:last-child { border-bottom: none; }
.translation-pair .lang-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-secondary);
  font-weight: 700;
  margin-bottom: 4px;
}
@media (max-width: 600px) {
  .translation-pair { grid-template-columns: 1fr; }
}

/* ---------- Donate ---------- */

.donate-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
  max-width: 560px;
  margin: 0 auto;
  box-shadow: var(--shadow);
}
.donate-card .icon { font-size: 2.4rem; margin-bottom: 12px; }

.donate-placeholder-note {
  margin-top: 18px;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: var(--color-bg-alt);
  border-radius: var(--radius);
  padding: 12px 16px;
}

/* ---------- Footer ---------- */

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 48px 0 32px;
  background: var(--color-bg-alt);
}

.footer-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  justify-content: space-between;
  margin-bottom: 32px;
}

.footer-col h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: var(--color-text); text-decoration: none; font-size: 0.92rem; }
.footer-col a:hover { color: var(--color-primary); }

.footer-bottom {
  border-top: 1px solid var(--color-border);
  padding-top: 20px;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

/* ---------- Utility ---------- */

.text-center { text-align: center; }
.mt-lg { margin-top: 48px; }
.badge {
  display: inline-block;
  background: var(--color-bg-alt);
  color: var(--color-secondary);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}


/* =========================================================
   Additions for the trilingual archive (2026-10)
   ========================================================= */

/* Korean pages: Fraunces has no Hangul, so use one consistent Korean face. */
body.lang-ko { --font-serif: 'Noto Sans KR', sans-serif; word-break: keep-all; }
.hangul { font-family: 'Noto Sans KR', var(--font-sans); }

.nav-brand .brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.nav-brand .brand-sub {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--color-text-muted);
}
.nav-links { gap: 22px; }

.lang-switch {
  display: flex;
  gap: 4px;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 3px;
}
.lang-switch a {
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.8rem;
}
.nav-links .lang-switch a.active {
  background: var(--color-primary);
  color: #fff;
}

@media (max-width: 980px) {
  .nav-toggle { display: block; }
  .nav { position: relative; }
  .nav-links {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    align-items: flex-start;
    padding: 20px 24px 28px;
    gap: 18px;
    display: none;
  }
  .nav-links.open { display: flex; }
}

.hero-banner.small { height: auto; min-height: 0; padding-top: 72px; }
.hero-banner.small .container { padding-bottom: 40px; }
.hero-banner p.lead { max-width: 760px; }

.lang-card .thumb-dictionary { background: var(--thumb-dictionary); }
.lang-card .thumb-stories { background: var(--thumb-stories); }
.lang-card .thumb-recordings { background: var(--thumb-recordings); }
.lang-card .thumb-culture { background: var(--thumb-culture); }
.lang-card .thumb { height: 110px; }

.empty {
  text-align: center;
  color: var(--color-text-muted);
  padding: 48px 16px;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
}
.muted { color: var(--color-text-muted); }

.media-card .body { padding: 18px 20px 22px; }
.media-card .meta { font-size: 0.85rem; color: var(--color-text-muted); margin-bottom: 10px; }
.media-card audio, .dict-table audio { width: 100%; max-width: 260px; }
.media-card img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }

.dict-search {
  width: 100%;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: var(--color-surface);
  color: var(--color-text);
  margin-bottom: 20px;
}
.table-wrap { overflow-x: auto; }
.dict-table { width: 100%; border-collapse: collapse; background: var(--color-surface); }
.dict-table th, .dict-table td {
  text-align: left;
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  vertical-align: middle;
}
.dict-table th { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--color-text-muted); }
.dict-table .hangul { font-size: 1.15rem; }
.dict-table .pos { font-size: 0.75rem; color: var(--color-text-muted); }

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 18px;
}
.gallery figure { margin: 0; background: var(--color-surface); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--color-border); }
.gallery img { aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.gallery figcaption { padding: 10px 12px; font-size: 0.88rem; }

.prose ul { padding-left: 1.2em; }
.cite { font-family: ui-monospace, Menlo, monospace; font-size: 0.9rem; }
.transcript { white-space: pre-wrap; font-size: 0.9rem; }

.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 36px 0 48px;
  font-size: 0.88rem;
  color: var(--color-text-muted);
}
.site-footer p { color: var(--color-text-muted); margin-bottom: 0.5em; }
.site-footer .footer-name { font-family: var(--font-serif); font-size: 1.05rem; color: var(--color-text); }
.site-footer .mark { color: var(--color-primary); }

@media (max-width: 600px) {
  section { padding: 48px 0; }
  .container { padding: 0 16px; }
  .hero { padding: 72px 16px 56px; }
}

.hero-banner .container { width: 100%; }
.lang-grid.four { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
@media (max-width: 600px) {
  .stat-row { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .stat { padding: 14px 6px; }
  .stat .num { font-size: 1.5rem; }
  .stat .label { font-size: 0.66rem; }
}
.media-grid { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ---------- Home page photos ---------- */
.hero.has-photo { background-size: cover; background-position: center; padding: 150px 24px 130px; }
.hero.has-photo::before { display: none; }
.hero.has-photo h1, .hero.has-photo p.lead { color: #fff; }
.hero.has-photo p.lead { color: rgba(255,255,255,0.92); }
.hero.has-photo .eyebrow { color: var(--hero-eyebrow); }
.lang-card .thumb[style] { background-size: cover; background-position: center; }
.home-photos { grid-template-columns: repeat(3, 1fr); }
.see-all { text-align: center; margin-top: 28px; }
@media (max-width: 720px) {
  .home-photos { grid-template-columns: repeat(2, 1fr); }
  .hero.has-photo { padding: 96px 16px 80px; }
}

.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,20,16,0.35), rgba(10,20,16,0.65)); }
.hero.has-photo .hero-inner { position: relative; z-index: 1; }
@media (prefers-reduced-motion: reduce) { .hero-video { display: none; } }

/* ---------- Alphabet ---------- */
.letter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 14px; margin: 18px 0 40px; }
.letter-card { position: relative; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius); padding: 16px; text-align: center; }
.letter-card.special { border: 2px solid var(--color-primary); background: color-mix(in srgb, var(--color-primary) 5%, var(--color-surface)); }
.letter-card .glyph { font-family: 'Noto Sans KR', sans-serif; font-size: 3rem; line-height: 1.1; color: var(--color-text); }
.letter-card.special .glyph { color: var(--color-primary); }
.letter-card .latin { font-weight: 700; margin-top: 4px; }
.letter-card .example, .letter-card .note { font-size: 0.85rem; margin-top: 8px; }
.letter-card .badge { display: inline-block; margin-top: 8px; font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--color-primary); }
.letter-card audio { width: 100%; margin-top: 10px; height: 32px; }
