/* ==========================================================================
   Korean War & Military Brides Project — site styles
   Colors live in the :root block below. Change them there and the whole
   site follows. Everything else is layout.
   ========================================================================== */

/* Google Sans, self-hosted (SIL Open Font License 1.1, see fonts/OFL.txt).
   A single variable file covers weight 400-700, so italic is the only
   second file needed. */
@font-face {
  font-family: "Google Sans";
  src: url("fonts/GoogleSans-Variable.woff2") format("woff2-variations"),
       url("fonts/GoogleSans-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Google Sans";
  src: url("fonts/GoogleSans-Italic-Variable.woff2") format("woff2-variations"),
       url("fonts/GoogleSans-Italic-Variable.woff2") format("woff2");
  font-weight: 400 700;
  font-style: italic;
  font-display: swap;
}


:root {
  /* Palette drawn from the project logo: steel blue on cream. --accent is a
     deepened version of the logo's blue so it clears AA contrast as text and
     as a button fill; --accent-soft is a pale tint of the logo's cream. */
  --bg: #f8f9fb;
  --bg-soft: #eef2f6;
  --surface: #ffffff;
  --text: #1a2027;
  --muted: #5b6672;
  --border: #dbe3ea;
  --accent: #3b6c87;
  /* Body text carrying a slight blue hue, for card pull quotes. */
  --text-blue: #273d4c;
  --accent-soft: #fff3d6;
  --accent-text: #ffffff;

  /* Dark banner across the top. */
  --header-bg: #16191d;
  --header-text: #ffffff;

  --radius: 10px;
  /* Content sits in a centered band with a gutter on each side.
     --maxw is how wide that band gets; --pad is the gutter inside it.
     --measure is off, so text fills the band rather than stopping short. */
  --maxw: 1280px;
  --pad: clamp(1rem, 4vw, 2.5rem);
  --measure: none;

  /* --serif is unused now that headings use --sans too; kept so a serif
     look can be restored by pointing a rule back at it. */
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
  --sans: "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* The site is light-only; this keeps form controls and scrollbars light
     even for visitors whose system is set to dark mode. */
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.65 var(--sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

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

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-text);
  padding: 0.6rem 1rem;
  z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding-block: 0.7rem;
  padding-inline: max(var(--pad), calc((100% - var(--maxw)) / 2 + var(--pad)));
  background: var(--header-bg);
  color: var(--header-text);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--header-text);
  min-width: 0;
}

.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  flex: none;
}

.brand-name {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.site-nav a {
  text-decoration: none;
  color: var(--header-text);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 0.5rem 0.85rem;
  border-radius: 8px;
  white-space: nowrap;
}

.site-nav a:hover { background: rgba(255, 255, 255, 0.12); }

/* Current page reads as a filled chip, the way the reference header does. */
.site-nav a[aria-current="page"] {
  background: #ffffff;
  color: var(--header-bg);
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 8px;
  color: var(--header-text);
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1;
  padding: 0.55rem 0.8rem;
}

.nav-toggle:hover { background: rgba(255, 255, 255, 0.12); }

@media (max-width: 860px) {
  .brand-name {
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .nav-toggle { display: inline-block; }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
    padding: 0.75rem var(--pad) 1rem;
    background: var(--header-bg);
  }

  .site-nav.open { display: flex; }
}

/* --------------------------------------------------------------- Layout  */

main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 var(--pad);
}

/* Sections carry no vertical padding of their own; the space between them is
   one explicit gap, so neighbouring padding cannot double into a hole. */
section { padding: 0; }
section + section { margin-top: 2.5rem; }

h1 {
  font-family: var(--sans);
  font-size: clamp(2.1rem, 5.5vw, 3.2rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  letter-spacing: -0.015em;
}

h2 {
  font-family: var(--sans);
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
  line-height: 1.25;
  margin: 0 0 1rem;
}

h3 { font-size: 1.05rem; margin: 0 0 0.4rem; }

.hero { padding-top: 3.25rem; }

.page-head { padding-top: 3rem; }

.lede {
  font-size: 1.15rem;
  color: var(--muted);
  max-width: var(--measure);
  margin: 0 0 1.5rem;
}

.prose p {
  max-width: var(--measure);
  margin: 0 0 1.1rem;
}

.prose h2 { margin-top: 2.2rem; }
.prose h2:first-child { margin-top: 0; }

.cite {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-soft);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 0.94rem;
  color: var(--muted);
}

/* -------------------------------------------------------------- Buttons  */


.btn {
  display: inline-block;
  padding: 0.65rem 1.15rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.12s ease, border-color 0.12s ease;
}

.btn:hover { transform: translateY(-1px); border-color: var(--accent); }

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

/* -------------------------------------------------------------- Callout  */

.callout {
  background: var(--accent-soft);
  border: 1px solid #f0dfae;
  border-radius: var(--radius);
  padding: 1.75rem;
}

.callout h2 { margin-top: 0; }
.callout p { color: var(--muted); max-width: var(--measure); }
.callout p:last-child { margin-bottom: 0; }

.contact-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.contact-list strong {
  display: inline-block;
  min-width: 6.5rem;
  color: var(--text);
}

/* --------------------------------------------------------------- Search  */

.search { display: block; max-width: 26rem; }

.search input {
  width: 100%;
  padding: 0.6rem 0.85rem;
  font: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.filter-status {
  margin: 0.6rem 0 0;
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.4em;
}

/* ------------------------------------------------- Interview card grid  */

.interview-index { padding-top: 0; }

.interview-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1.5rem;
}

.interview-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.14s ease;
}

.interview-card:hover {
  border-color: var(--accent);
}

.interview-card[hidden] { display: none; }

.card-media {
  display: block;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft) center / cover no-repeat;
  border-bottom: 1px solid var(--border);
}

.card-body {
  display: block;
  padding: 1.1rem 1.15rem 1.25rem;
}

.quote {
  font-family: var(--sans);
  font-size: 1.22rem;
  line-height: 1.3;
  margin: 0 0 0.6rem;
  text-wrap: balance;
}

.interview-card:hover .quote { color: var(--accent); }

.meta {
  display: block;
  font-size: 0.86rem;
  color: var(--muted);
  margin: 0 0 0.75rem;
}

/* A line from the interview, sitting under the narrator's name on a card. */
.card-quote {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  line-height: 1.45;
  color: var(--text-blue);
  margin: 0 0 0.75rem;
  text-wrap: pretty;
}

.card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.card-tags span {
  font-size: 0.76rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.18rem 0.6rem;
}

/* --------------------------------------------- Interview detail page  */

.interview {
  max-width: var(--measure);
  padding: 2.5rem 0 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-size: 0.9rem;
  text-decoration: none;
  margin-bottom: 1.75rem;
}

/* The arrow is masked rather than shown as an image, so it picks up the
   link colour instead of staying black. */
.back-link::before {
  content: "";
  flex: none;
  width: 0.95em;
  height: 0.95em;
  background: currentColor;
  -webkit-mask: url(images/arrow-left.svg) center / contain no-repeat;
  mask: url(images/arrow-left.svg) center / contain no-repeat;
}

.back-link:hover { text-decoration: underline; }

.interview h1 { margin-bottom: 0.6rem; text-wrap: balance; }

.interview .video-frame {
  max-height: 72vh;
  width: auto;
  margin-inline: auto;
}

.interview-standfirst {
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

.interview-meta {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0 0 1rem;
}

.interview-summary {
  font-size: 1.08rem;
  color: var(--muted);
  margin: 0 0 1.75rem;
}

.interview .prose { padding: 2rem 0 0; }
.interview .prose + .prose { margin-top: 2rem; }
.interview .back-link:last-child { margin: 2.5rem 0 0; }

.passages {
  margin: 0;
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.5rem 1.1rem;
  align-items: baseline;
}

.passages dt {
  font-variant-numeric: tabular-nums;
  font-size: 0.88rem;
  color: var(--accent);
}

.passages dd {
  margin: 0;
  color: var(--muted);
}

@media (max-width: 520px) {
  .passages { grid-template-columns: 1fr; gap: 0.15rem; }
  .passages dd { margin-bottom: 0.7rem; }
}

/* ------------------------------------------------- Video player frame  */

.video-frame {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--bg-soft) center / cover no-repeat;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

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

.video-play {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.28);
  border: 0;
  cursor: pointer;
  transition: background 0.15s ease;
}

.video-play:hover { background: rgba(0, 0, 0, 0.45); }

.video-play-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  padding-left: 5px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 1.4rem;
}

/* -------------------------------------------------------------- Archive  */


.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.gallery-wide {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
}

.item {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.item > img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.item .video-frame { border: 0; border-radius: 0; }

.item figcaption {
  padding: 0.9rem 1rem 1.1rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.item figcaption strong { color: var(--text); }

.credit {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  font-style: italic;
}

.doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1.25rem;
}

.doc-list li {
  border-left: 3px solid var(--border);
  padding-left: 1rem;
}

.doc-list strong { display: block; color: var(--text); }
.doc-list p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.95rem; }

/* ------------------------------------------------------- Transcript  */

/* Timestamp buttons in the transcript. */
.cue-time {
  font: inherit;
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.12rem 0.55rem;
  margin-right: 0.5rem;
  cursor: pointer;
}

.cue-time:hover {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-text);
}

.transcript-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.25rem;
  margin-bottom: 0.9rem;
}

.transcript-follow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.92rem;
  color: var(--muted);
}

.transcript-search { flex: 1 1 14rem; }

.transcript-search input {
  width: 100%;
  padding: 0.5rem 0.75rem;
  font: inherit;
  font-size: 0.92rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.transcript-notice {
  margin: 0 0 0.9rem;
  padding: 0.8rem 1rem;
  background: var(--accent-soft);
  border: 1px solid #f0dfae;
  border-radius: var(--radius);
  font-size: 0.9rem;
  color: var(--text);
}

.transcript-status {
  margin: 0 0 0.6rem;
  font-size: 0.9rem;
  color: var(--muted);
  min-height: 1.3em;
}

.transcript {
  max-height: 26rem;
  overflow-y: auto;
  padding: 0.35rem 1rem 0.35rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  scroll-behavior: smooth;
}

.cue {
  margin: 0 0 0.85rem;
  font-size: 0.97rem;
  line-height: 1.6;
  color: var(--muted);
  border-radius: 6px;
  padding: 0.25rem 0.35rem;
}

.cue[hidden] { display: none; }

.cue.is-active {
  background: var(--accent-soft);
  color: var(--text);
}

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

footer {
  border-top: 1px solid var(--border);
  margin-top: 3rem;
  padding-block: 2rem;
  padding-inline: max(var(--pad), calc((100% - var(--maxw)) / 2 + var(--pad)));
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
}

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


/* ------------------------------------------------------- Print to PDF   */

@media print {
  .site-header,
  footer,
  .back-link,
  .video-frame,
  .transcript-toolbar,
  .transcript-status,
  .skip-link,
  .cue-time {
    display: none !important;
  }

  html, body {
    background: #fff;
    color: #000;
    font-size: 11pt;
  }

  main, .interview {
    max-width: none;
    padding: 0;
    margin: 0;
  }

  /* The transcript prints in full rather than as a scrolling panel. */
  .transcript {
    max-height: none;
    overflow: visible;
    border: 0;
    padding: 0;
    background: transparent;
  }

  .cue {
    color: #000;
    background: transparent;
    padding: 0;
    margin-bottom: 0.6em;
    /* Keep a passage from being split across two pages. */
    break-inside: avoid;
  }

  .cue[hidden] { display: block !important; }
  .cue.is-active { background: transparent; }

  .transcript-notice {
    border: 1pt solid #000;
    background: transparent;
    break-inside: avoid;
  }

  h1 { font-size: 20pt; }
  h2 { font-size: 13pt; break-after: avoid; }

  a { color: #000; text-decoration: none; }

  /* Show the source URL once, so a printed copy can be traced back. */
  .interview::after {
    content: "Source: https://kwasant7.github.io/kwb-project/interviews/ock-soon-lee.html";
    display: block;
    margin-top: 1.5em;
    padding-top: 0.5em;
    border-top: 0.5pt solid #999;
    font-size: 8pt;
    color: #444;
  }

  @page { margin: 18mm; }
}
