/* V220 — editorial theme */
:root {
  --bg: #f5f3ee;
  --surface: #ffffff;
  --ink: #142030;
  --ink-soft: #2c3a4b;
  --muted: #5d6a7a;
  --line: #e3ded3;
  --accent: #0f766e;
  --accent-ink: #0b5d57;
  --gold: #b7791f;
  --navy: #0b1626;
  --navy-2: #12233a;
  --on-navy: #e6edf5;
  --on-navy-muted: #9fb0c4;
  --teal-bright: #2dd4bf;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 32, 48, .06), 0 8px 24px rgba(20, 32, 48, .07);
  --font-ui: "Manrope", "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
  --font-text: "Source Serif 4", Georgia, "Times New Roman", 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-family: var(--font-ui);
  font-size: 16px;
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
:focus-visible { outline: 3px solid var(--teal-bright); outline-offset: 2px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .wrap { padding: 0 28px; } }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--surface); color: var(--ink); padding: 10px 16px; border-radius: 8px;
  font-weight: 700; text-decoration: none; box-shadow: var(--shadow);
}
.skip:focus { top: 12px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.header-row { display: flex; align-items: center; gap: 16px; min-height: 68px; position: relative; }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--on-navy); flex-shrink: 0; }
.logo img { border-radius: 9px; }
.logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.logo-text b { font-size: 20px; font-weight: 800; letter-spacing: .02em; color: #fff; }
.logo-text small { font-size: 11.5px; color: var(--on-navy-muted); font-weight: 600; letter-spacing: .02em; }
.logo:hover { color: #fff; }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; }
.main-nav a {
  display: block; padding: 8px 12px; border-radius: 8px;
  color: var(--on-navy); text-decoration: none; font-weight: 600; font-size: 14.5px;
}
.main-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.main-nav a[aria-current="page"] { color: var(--teal-bright); background: rgba(45, 212, 191, .1); }

.lang-switch {
  display: inline-flex; flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; padding: 3px;
}
.lang-switch a, .lang-switch span {
  display: inline-block; min-width: 42px; text-align: center;
  padding: 5px 10px; border-radius: 999px;
  font-size: 13px; font-weight: 800; letter-spacing: .06em; text-decoration: none;
}
.lang-switch a { color: var(--on-navy); }
.lang-switch a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.lang-switch .is-active { background: var(--teal-bright); color: var(--navy); }

.menu-btn {
  display: none; margin-left: auto; width: 44px; height: 44px;
  background: transparent; border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px; cursor: pointer;
  align-items: center; justify-content: center;
}
.menu-icon, .menu-icon::before, .menu-icon::after {
  display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px; position: relative; transition: transform .2s, background .2s;
}
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; }
.menu-icon::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-icon { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-icon::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-icon::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .menu-btn { display: inline-flex; }
  .header-row .lang-switch { order: 2; }
  .menu-btn { order: 3; margin-left: 0; }
  .header-row .logo { margin-right: auto; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--navy-2); border-top: 1px solid rgba(255, 255, 255, .08);
    padding: 8px 16px 16px; margin: 0;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 12px; font-size: 16px; }
}
@media (max-width: 420px) {
  .logo-text small { display: none; }
}

/* ---------- Breadcrumbs ---------- */
.breadcrumbs { padding: 22px 0 6px; font-size: 13.5px; }
.breadcrumbs ol { list-style: none; margin: 0 auto; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; max-width: 800px; }
.breadcrumbs li { color: var(--muted); }
.breadcrumbs li + li::before { content: "›"; margin-right: 6px; color: #a3acb8; }
.breadcrumbs a { color: var(--muted); text-decoration: none; font-weight: 600; }
.breadcrumbs a:hover { color: var(--accent); text-decoration: underline; }
.breadcrumbs [aria-current] { color: var(--ink-soft); }

/* ---------- Article ---------- */
.post { max-width: 800px; margin: 0 auto; padding: 8px 0 24px; }
.post-head { margin-bottom: 22px; }
.kicker {
  display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--accent); background: rgba(15, 118, 110, .09); padding: 4px 10px; border-radius: 999px;
}
.post h1 {
  font-size: clamp(28px, 4.6vw, 44px); line-height: 1.15; letter-spacing: -.015em;
  font-weight: 800; margin: 14px 0 14px; color: var(--ink); overflow-wrap: break-word;
}
.meta { display: flex; flex-wrap: wrap; gap: 6px 10px; margin: 0; color: var(--muted); font-size: 14px; font-weight: 600; }

/* Framed images: fixed 16:9 frame, image centered and cropped, never stretched */
.frame {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 8px;
  box-shadow: var(--shadow);
}
.frame img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: center;
  border-radius: calc(var(--radius) - 6px);
  background: var(--navy);
}
.frame-hero { margin-bottom: 30px; }
@media (max-width: 520px) { .frame { padding: 5px; border-radius: 12px; } .frame img { border-radius: 8px; } }

.post-body { font-family: var(--font-text); font-size: 19px; line-height: 1.72; color: var(--ink-soft); }
@media (max-width: 520px) { .post-body { font-size: 17.5px; } }
.post-body > * + * { margin-top: 1.05em; }
.post-body p { margin: 0; }
.post-body > p + p { margin-top: 1em; }
.post-body h2 {
  font-family: var(--font-ui); color: var(--ink);
  font-size: clamp(23px, 3vw, 30px); line-height: 1.25; letter-spacing: -.01em; font-weight: 800;
  margin: 1.8em 0 .6em; scroll-margin-top: 90px;
}
.post-body h3 { font-family: var(--font-ui); color: var(--ink); font-size: 21px; line-height: 1.3; margin: 1.5em 0 .5em; }
.post-body ul, .post-body ol { margin: 1.1em 0; padding: 18px 22px 18px 44px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.post-body li + li { margin-top: .45em; }
.post-body li::marker { color: var(--accent); font-weight: 700; }
.post-body strong { color: var(--ink); }
.post-body .frame { margin: 1.8em 0; }
.post-body blockquote {
  margin: 1.8em 0; padding: 22px 26px;
  background: var(--navy); color: var(--on-navy);
  border-left: 5px solid var(--teal-bright); border-radius: var(--radius);
  font-style: italic; font-size: 1.08em;
}
.post-body blockquote p { margin: 0; }
.post-body .note {
  padding: 18px 22px; background: rgba(15, 118, 110, .07);
  border: 1px solid rgba(15, 118, 110, .25); border-radius: var(--radius);
}
.post-body table { width: 100%; border-collapse: collapse; font-family: var(--font-ui); font-size: 15px; background: var(--surface); border-radius: var(--radius); overflow: hidden; }
.table-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.post-body th, .post-body td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.post-body th { background: #eef3f2; color: var(--ink); font-weight: 800; }
.post-body tr:last-child td { border-bottom: 0; }

/* ---------- Cards (vertical article blocks) ---------- */
.cards { padding: 36px 0 64px; border-top: 1px solid var(--line); margin-top: 24px; }
.cards > h2 { font-size: clamp(24px, 3vw, 32px); font-weight: 800; letter-spacing: -.01em; margin: 0 0 22px; }
.cards-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
@media (max-width: 1080px) { .cards-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .cards-grid { grid-template-columns: minmax(0, 1fr); } }

.card {
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(20, 32, 48, .06), 0 16px 32px rgba(20, 32, 48, .1); }
.card-media { display: block; margin: 10px 10px 0; padding: 6px; box-shadow: none; }
.card-media img { transition: transform .35s; }
.card:hover .card-media img { transform: scale(1.03); }
.card-media { overflow: hidden; }
.card-body { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px 20px; flex: 1; }
.card-body .kicker { align-self: flex-start; font-size: 11px; }
.card h3 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 800; }
.card h3 a { color: var(--ink); text-decoration: none; }
.card h3 a:hover { color: var(--accent); }
.card p { margin: 0; color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.card-more { margin-top: auto; padding-top: 6px; font-weight: 800; font-size: 14.5px; text-decoration: none; }
.card-more:hover { text-decoration: underline; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy); color: var(--on-navy); }
.footer-top { border-bottom: 1px solid rgba(255, 255, 255, .1); }
.footer-top-row { display: flex; align-items: center; gap: 20px 28px; flex-wrap: wrap; padding-top: 24px; padding-bottom: 24px; }
.footer-nav { flex: 1; }
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; justify-content: center; }
.footer-nav a { color: var(--on-navy); text-decoration: none; font-weight: 600; font-size: 14.5px; }
.footer-nav a:hover { color: var(--teal-bright); text-decoration: underline; }
.footer-nav a[aria-current="page"] { color: var(--teal-bright); }
@media (max-width: 760px) {
  .footer-top-row { flex-direction: column; align-items: flex-start; }
  .footer-nav ul { justify-content: flex-start; }
}

.footer-bottom { padding: 28px 0 18px; }
.footer-bottom-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 28px; align-items: start; }
@media (max-width: 860px) { .footer-bottom-grid { grid-template-columns: minmax(0, 1fr); } }
.footer-about { margin: 0; color: var(--on-navy-muted); font-size: 14.5px; line-height: 1.7; }
.adult {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 16px; border: 1px solid rgba(239, 68, 68, .45); border-radius: var(--radius); background: rgba(239, 68, 68, .07);
}
.adult p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--on-navy); }
.adult-badge {
  flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: 3px solid #ef4444; color: #fff; font-weight: 800; font-size: 17px; letter-spacing: -.02em; background: rgba(239, 68, 68, .15);
}
.footer-copy { margin-top: 22px; padding-top: 16px; border-top: 1px solid rgba(255, 255, 255, .08); }
.footer-copy p { margin: 0; font-size: 13px; color: var(--on-navy-muted); }

/* ---------- 404 ---------- */
.notfound { max-width: 640px; margin: 0 auto; padding: 80px 0; text-align: center; }
.notfound h1 { font-size: 64px; margin: 0; }
.notfound .lang-switch { border-color: var(--line); }
.notfound .lang-switch a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card, .card-media img { transition: none; }
}
