/* Speech pages — palette taken from the Mother of Peace book cover (sky #ACDDEB / navy #023E62). */

/* Europa + Calluna Sans — the FFWPU brand faces, self-hosted, same as the main
   site and /the-case. 800 maps to the real 700 outlines rather than a fake bold. */
@font-face { font-family: 'europa'; font-weight: 300; font-style: normal; font-display: swap; src: url('../fonts/europa-300.woff2') format('woff2'); }
@font-face { font-family: 'europa'; font-weight: 400; font-style: normal; font-display: swap; src: url('../fonts/europa-400.woff2') format('woff2'); }
@font-face { font-family: 'europa'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/europa-700.woff2') format('woff2'); }
@font-face { font-family: 'europa'; font-weight: 800; font-style: normal; font-display: swap; src: url('../fonts/europa-700.woff2') format('woff2'); }
@font-face { font-family: 'europa'; font-weight: 400; font-style: italic; font-display: swap; src: url('../fonts/europa-400i.woff2') format('woff2'); }
@font-face { font-family: 'europa'; font-weight: 700; font-style: italic; font-display: swap; src: url('../fonts/europa-700i.woff2') format('woff2'); }
@font-face { font-family: 'europa'; font-weight: 800; font-style: italic; font-display: swap; src: url('../fonts/europa-700i.woff2') format('woff2'); }
@font-face { font-family: 'calluna-sans'; font-weight: 300; font-style: normal; font-display: swap; src: url('../fonts/calluna-sans-300.woff2') format('woff2'); }
@font-face { font-family: 'calluna-sans'; font-weight: 700; font-style: normal; font-display: swap; src: url('../fonts/calluna-sans-700.woff2') format('woff2'); }
@font-face { font-family: 'calluna-sans'; font-weight: 300; font-style: italic; font-display: swap; src: url('../fonts/calluna-sans-300i.woff2') format('woff2'); }
@font-face { font-family: 'calluna-sans'; font-weight: 700; font-style: italic; font-display: swap; src: url('../fonts/calluna-sans-700i.woff2') format('woff2'); }

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

:root {
  --brand:       #0C6E9E;
  --brand-dark:  #023E62;
  --brand-light: #EAF6FB;
  --sky:         #ACDDEB;
  --navy:        #023E62;
  --ink:         #062033;
  --ink-700:     #1F3D52;
  --muted:       #6B7280;
  --border:      #E5E7EB;
  --bg:          #FFFFFF;
  --bg-subtle:   #F7FAFC;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'calluna-sans', 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  font-size-adjust: 0.545;

  /* A sky wash off the book cover, fading to warm paper. Fixed, so the page
     scrolls over the light rather than dragging it along. */
  background:
    radial-gradient(1100px 620px at 50% -260px, rgba(172,221,235,0.55), transparent 72%),
    radial-gradient(900px 700px at 100% 8%, rgba(12,110,158,0.06), transparent 68%),
    linear-gradient(180deg, #F6FAFC 0%, #FBFCFB 42%, #F7F5F1 100%);
  background-attachment: fixed;
  background-color: #F7F5F1;
}

/* Fine grain over everything — kept near-invisible (4%); it exists to stop the
   flat fields from reading as dead screen, not to be seen as a pattern. */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}

main, footer { position: relative; z-index: 1; }

@media (prefers-reduced-motion: no-preference) {
  .speech > .speech-inner { animation: sheet-in 0.5s cubic-bezier(0.16,1,0.3,1) both; }
}
@keyframes sheet-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

h1, h2, h3, h4, .nav-logo-main, .nav-logo-sub, .more-head, .more-excerpt,
.speech-quote, .footer-brand-name { font-size-adjust: none; }

/* ── NAV ──
   The same bar as the home page: same links, same drawer, same measurements.
   A message is one page of the site rather than a place off to the side, so
   arriving on one from a shared link leaves the whole site in reach — where
   before there was only a way back. */
nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

/* Set by the head script on weak hardware or a poor connection. At 95% white
   the bar can simply drop the blur — the sliver of the page showing through is
   too faint to read either way, and it takes a per-frame GPU pass off the
   scroll. */
html.lite nav {
  background: #fff;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.nav-inner {
  max-width: 1200px; margin: 0 auto; padding: 0 1.5rem;
  height: 64px; display: flex; align-items: center;
  justify-content: space-between; gap: 2rem;
}
.nav-logo { display: flex; align-items: center; gap: 0.65rem; text-decoration: none; }
.nav-logo-mark { width: 36px; height: 36px; display: block; flex-shrink: 0; }
.nav-logo-text { display: flex; flex-direction: column; line-height: 1.1; }
.nav-logo-main { font-family: 'europa', system-ui, sans-serif; font-size: 1.05rem; font-weight: 700; color: var(--ink); }
.nav-logo-sub { font-family: 'europa', system-ui, sans-serif; font-style: italic; font-size: 0.78rem; color: var(--brand); margin-top: 2px; }

.nav-links {
  display: flex; align-items: center; gap: 0.25rem; list-style: none;
}
.nav-links a {
  font-size: 0.85rem; font-weight: 500; color: var(--ink-700);
  text-decoration: none; padding: 0.4rem 0.75rem; border-radius: 6px;
  transition: background 0.15s, color 0.15s;
}
.nav-links a:hover { background: var(--bg-subtle); color: var(--ink); }

/* The row's 0.25rem gap is right between plain links; against a solid button it
   reads as a collision, because the button's own padding starts where the gap
   ends. It gets a little more room to itself. */
.nav-cta {
  background: var(--brand) !important;
  color: #fff !important;
  font-weight: 700 !important;
  font-size: 0.82rem !important;
  margin-left: 0.6rem;
}
.nav-cta:hover { background: var(--brand-dark) !important; }

/* Burger ↔ X crossfade. 44px is the floor for a thumb — the icon inside stays
   22px, the tap area around it does the growing. */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px; margin-right: -0.35rem;
  background: none; border: none; cursor: pointer; padding: 0.35rem;
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
  border-radius: 6px;
  transition: background 0.15s;
}
.nav-toggle:active { background: var(--bg-subtle); }
.nav-toggle svg {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  transition: opacity 0.25s ease-in-out, transform 0.3s ease-in-out;
}
.icon-burger { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) !important; }
.icon-close { opacity: 0; transform: translate(-50%, -50%) rotate(-45deg) scale(0.8) !important; }
.nav-toggle.open .icon-burger { opacity: 0; transform: translate(-50%, -50%) rotate(45deg) scale(0.8) !important; }
.nav-toggle.open .icon-close { opacity: 1; transform: translate(-50%, -50%) rotate(0deg) !important; }

@media (max-width: 860px) {
  .nav-toggle { display: block; }

  /* Slide-down drawer using max-height */
  .nav-links {
    display: flex; flex-direction: column;
    position: absolute; top: 64px; left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--border);
    padding: 0 1.5rem; gap: 0.1rem;
    max-height: 0; overflow: hidden; opacity: 0; pointer-events: none;
    /* pointer-events alone still leaves the links in the tab order, so a
       keyboard user tabs through six invisible items. visibility takes them out
       of the accessibility tree; the delay lets the close animation finish
       before they vanish. */
    visibility: hidden;
    transition: max-height 0.35s ease-in-out, opacity 0.25s ease-in-out, padding 0.35s ease-in-out,
      visibility 0s linear 0.35s;
  }
  .nav-links.open {
    visibility: visible;
    transition: max-height 0.35s ease-in-out, opacity 0.25s ease-in-out, padding 0.35s ease-in-out,
      visibility 0s;
    max-height: 420px; opacity: 1; pointer-events: auto;
    padding: 0.75rem 1.5rem;
  }
  .nav-links a { padding: 0.65rem 0.5rem; display: block; }
}

/* Anything a thumb is meant to hit gets 44px of height; nothing here changes
   what a mouse user sees. */
@media (pointer: coarse) {
  .nav-logo { min-height: 44px; }
  .nav-links a { min-height: 44px; display: flex; align-items: center; }
}

/* ── LAYOUT ── */
.speech-inner { max-width: 720px; margin: 0 auto; padding: 0 1.5rem; }
.speech { padding: 3.5rem 1.5rem 4.5rem; }

/* The speech itself sits on a sheet of paper floating over the wash. */
.speech > .speech-inner {
  position: relative;
  max-width: 768px;
  padding: 3.25rem 3.5rem 3.5rem;
  background: #fff;
  border: 1px solid rgba(2,62,98,0.07);
  border-radius: 14px;
  box-shadow:
    0 1px 2px rgba(2,62,98,0.04),
    0 12px 32px -12px rgba(2,62,98,0.10),
    0 40px 80px -32px rgba(2,62,98,0.12);
}

/* ── HEAD ── */
.speech-head { margin-bottom: 2rem; }
.speech-head h1 {
  font-family: 'europa', system-ui, sans-serif;
  font-size: clamp(1.9rem, 4.5vw, 2.7rem); font-weight: 800;
  line-height: 1.15; letter-spacing: -0.01em; color: var(--ink);
  margin-bottom: 0.85rem;
}
.speech-meta { font-size: 0.82rem; font-weight: 600; color: var(--brand-dark); letter-spacing: 0.03em; margin-bottom: 0.6rem; }

/* ── LANGUAGE TOGGLE ── */
.lang-toggle {
  display: inline-flex; gap: 0.25rem; padding: 0.25rem;
  background: var(--bg-subtle); border: 1px solid var(--border);
  border-radius: 999px; margin-bottom: 2rem;
}
.lang-btn {
  font-family: inherit; font-size: 0.82rem; font-weight: 600;
  padding: 0.45rem 1.1rem; border: none; border-radius: 999px;
  background: transparent; color: var(--muted); cursor: pointer;
  transition: background 0.18s, color 0.18s;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { background: var(--navy); color: #fff; }

/* ── BODY ── */
.speech-body p {
  font-family: 'europa', system-ui, sans-serif;
  font-size: 1.16rem; line-height: 1.85; color: var(--ink-700);
  margin-bottom: 1.35rem;
}
.speech-body p:first-child { font-size: 1.32rem; color: var(--ink); }
/* Links inside her words are for places she names, nothing else. They keep the
   ink of the sentence and take a brand underline rather than a brand colour —
   a line of her speech should not turn into a row of blue because one of the
   things in it has a website. */
.speech-body a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: rgba(12, 110, 158, 0.55);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s, text-decoration-color 0.15s;
}

.speech-body a:hover {
  color: var(--brand);
  text-decoration-color: var(--brand);
}

.speech-body[lang="ko"] p {
  font-family: 'calluna-sans', system-ui, sans-serif;
  font-size: 1.06rem; line-height: 2;
  word-break: keep-all;
}

.speech-source {
  margin-top: 2.5rem; padding-top: 1.25rem; border-top: 1px solid var(--border);
  font-size: 0.8rem; color: var(--muted); line-height: 1.6;
}
.speech-source a { color: var(--brand); font-weight: 600; }

/* ── SHARE ── */
.share { margin-top: 2.5rem; padding: 1.5rem; background: var(--brand-light); border-radius: 12px; }
.share-label { font-size: 0.78rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--brand-dark); margin-bottom: 0.9rem; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.share-btn {
  font-family: inherit; font-size: 0.85rem; font-weight: 600;
  padding: 0.55rem 1.1rem; border-radius: 999px; cursor: pointer;
  background: #fff; color: var(--brand-dark);
  border: 1px solid rgba(2,62,98,0.18); text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.share-btn:hover { background: var(--navy); color: #fff; border-color: var(--navy); }

/* ── MORE ── */
.more { border-top: 1px solid rgba(2,62,98,0.08); padding: 3rem 1.5rem 3.5rem; }
.more > .speech-inner { max-width: 768px; padding: 0; }
.more-head { font-family: 'europa', system-ui, sans-serif; font-size: 1.4rem; font-weight: 800; color: var(--ink); margin-bottom: 1.5rem; }
.more-grid { display: grid; gap: 1rem; }
.more-card {
  display: flex; flex-direction: column; gap: 0.4rem;
  padding: 1.25rem 1.4rem; background: var(--bg);
  border: 1px solid rgba(2,62,98,0.08); border-radius: 10px;
  box-shadow: 0 1px 2px rgba(2,62,98,0.04), 0 6px 18px -10px rgba(2,62,98,0.14);
  text-decoration: none;
  transition: box-shadow 0.3s cubic-bezier(0.16,1,0.3,1), transform 0.3s cubic-bezier(0.16,1,0.3,1), border-color 0.3s;
}
.more-card:hover { transform: translateY(-3px); box-shadow: 0 14px 40px rgba(2,62,98,0.12); border-color: var(--sky); }
.more-date { font-size: 0.72rem; font-weight: 600; color: var(--brand); letter-spacing: 0.06em; text-transform: uppercase; }
.more-title { font-size: 1rem; font-weight: 700; color: var(--ink); }
.more-excerpt { font-family: 'europa', system-ui, sans-serif; font-style: italic; font-size: 0.9rem; color: var(--muted); line-height: 1.55; }

/* ── FOOTER (identical to the homepage) ── */
footer { background: var(--navy); color: rgba(255,255,255,0.65); padding: 3rem 1.5rem 2rem; }
/* One block, the same as the home page, now that the link column is gone — the
   nav above carries every link it held. The max-width is measure, not
   decoration: the sentence would otherwise run the full 1200px. */
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-brand { max-width: 640px; }
.footer-brand-name { font-family: 'europa', system-ui, sans-serif; font-size: 1.1rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.footer-brand p { font-size: 0.83rem; line-height: 1.6; }

@media (max-width: 720px) {
  .speech { padding: 1.5rem 0.85rem 3rem; }
  .speech > .speech-inner { padding: 2rem 1.5rem 2.5rem; border-radius: 12px; }
  .speech > .speech-inner::before { border-radius: 12px 12px 0 0; }
  .more { padding: 2.5rem 0.85rem 3rem; }
}

@media (max-width: 640px) {
  .speech-body p { font-size: 1.08rem; line-height: 1.8; }
  .speech-body p:first-child { font-size: 1.18rem; }
  .nav-logo-main { font-size: 0.9rem; }
}
