/* =========================================================
   Veritas Mission Team — Site styles
   Shared across all 4 pages. Built on colors_and_type.css.
   ========================================================= */

@import url("./colors_and_type.css");

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

html, body { height: 100%; }

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh-relaxed);
  color: var(--fg);
  background: var(--bg);
  overflow: hidden; /* every page = single viewport, no scroll */
  /* Korean: break on word (어절) boundaries, never inside a 단어 */
  word-break: keep-all;
  line-break: strict;
}

::selection { background: var(--gold-soft); color: var(--navy-800); }

a { color: inherit; text-decoration: none; }

/* =========================================================
   APP SHELL — 1 viewport, no scroll
   ========================================================= */
.app {
  height: 100dvh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.app--inverse {
  background: var(--bg-inverse);
  color: var(--fg-inverse);
}

/* =========================================================
   HEADER — hamburger left, † right
   ========================================================= */
.site-header {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-5) var(--safe-x);
  z-index: 20;
}

.menu-toggle {
  background: transparent;
  border: 0;
  padding: 6px;
  margin: -6px;
  cursor: pointer;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font: inherit;
  letter-spacing: var(--ls-wider);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  transition: opacity var(--dur-fast) var(--ease-out);
}
.menu-toggle:hover { opacity: 0.72; }
.menu-toggle:active { opacity: 0.55; }

.menu-icon {
  display: inline-block;
  width: 22px;
  height: 14px;
  position: relative;
}
.menu-icon::before,
.menu-icon::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: currentColor;
}
.menu-icon::before { top: 3px; }
.menu-icon::after  { bottom: 3px; }
.menu-toggle .menu-label { display: none; }
@media (min-width: 720px) { .menu-toggle .menu-label { display: inline; } }

.brand-mark {
  font-family: var(--font-display-en);
  font-weight: 500;
  letter-spacing: var(--ls-wide);
  font-size: 1rem;
  opacity: 0.9;
}

/* The † symbol, top right */
.cross-glyph {
  font-family: var(--font-display-en);
  font-weight: 400;
  font-size: 1.25rem;
  opacity: 0.55;
  letter-spacing: 0;
  line-height: 1;
}

/* =========================================================
   MAIN — fills the rest, no scroll
   ========================================================= */
.site-main {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  padding: 0 var(--safe-x);
  overflow: hidden;
  position: relative;
}

/* =========================================================
   FOOTER — minimal, baseline-anchored
   ========================================================= */
.site-footer {
  flex: 0 0 auto;
  padding: var(--space-5) var(--safe-x) calc(var(--space-5) + env(safe-area-inset-bottom));
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--fs-xs);
  letter-spacing: 0.02em;
  color: var(--fg-quiet);
  border-top: 1px solid var(--hairline);
}
.app--inverse .site-footer {
  color: var(--fg-inverse-quiet);
  border-top-color: var(--hairline-inverse);
}
.site-footer .footer-left { display: flex; flex-direction: column; gap: 2px; }
.site-footer .footer-brand { font-weight: 500; color: var(--fg-muted); letter-spacing: 0.04em; }
.app--inverse .site-footer .footer-brand { color: var(--ivory); }
.site-footer .footer-sub  { font-size: 10px; opacity: 0.78; }
.site-footer .footer-right { text-align: right; font-size: 10px; opacity: 0.78; }

/* =========================================================
   HAMBURGER OVERLAY — full-screen navy, fade in
   ========================================================= */
.nav-overlay {
  position: fixed;
  inset: 0;
  background: var(--navy-800);
  color: var(--ivory);
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: var(--space-5) var(--safe-x) calc(var(--space-5) + env(safe-area-inset-bottom));
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out);
}
.nav-overlay[data-open="true"] {
  opacity: 1;
  pointer-events: auto;
}

.nav-overlay__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-overlay__close {
  background: transparent;
  border: 0;
  padding: 6px;
  margin: -6px;
  color: inherit;
  font: inherit;
  cursor: pointer;
  letter-spacing: var(--ls-wider);
  font-size: var(--fs-eyebrow);
  text-transform: uppercase;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.nav-overlay__close .close-icon {
  display: inline-block;
  width: 18px; height: 18px;
  position: relative;
}
.nav-overlay__close .close-icon::before,
.nav-overlay__close .close-icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 0; right: 0;
  height: 1px;
  background: currentColor;
}
.nav-overlay__close .close-icon::before { transform: rotate(45deg); }
.nav-overlay__close .close-icon::after  { transform: rotate(-45deg); }

.nav-overlay__wordmark {
  font-family: var(--font-display-en);
  letter-spacing: var(--ls-display);
  font-size: 0.875rem;
  opacity: 0.7;
  text-transform: uppercase;
}
.nav-overlay__wordmark-logo {
  width: 44px;
  height: 44px;
  display: block;
  opacity: 0.92;
}

.nav-overlay__list {
  margin-top: var(--space-10);
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  list-style: none;
}

.nav-overlay__item {
  font-family: var(--font-display-ko);
  font-size: clamp(1.4rem, 5.6vw, 2.275rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.005em;
  position: relative;
  display: inline-block;
  cursor: pointer;
  color: var(--ivory);
  width: max-content;
  padding-bottom: 4px;
  transition: color var(--dur-fast) var(--ease-out), letter-spacing var(--dur-base) var(--ease-out);
}
.nav-overlay__item:hover {
  color: var(--gold-soft);
  letter-spacing: 0.005em;
}
.nav-overlay__item[aria-current="page"] {
  color: var(--gold-soft);
}
.nav-overlay__item[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  width: 24px;
  bottom: -2px;
  height: 1px;
  background: var(--gold-soft);
  opacity: 0.8;
}

.nav-overlay__verse {
  margin-top: auto;
  padding-top: var(--space-5);
  border-top: 1px solid var(--hairline-inverse);
  font-family: var(--font-serif-ko);
  font-weight: 300;
  font-size: 0.875rem;
  line-height: 1.7;
  opacity: 0.72;
  max-width: 28ch;
}
.nav-overlay__verse cite {
  display: block;
  margin-top: 8px;
  font-style: normal;
  font-family: var(--font-body);
  font-size: 0.6875rem;
  letter-spacing: var(--ls-wider);
  opacity: 0.6;
  text-transform: uppercase;
}

/* =========================================================
   PAGE FADE TRANSITION
   ========================================================= */
.app {
  animation: page-fade-in var(--dur-base) var(--ease-out) both;
}
@keyframes page-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
.app[data-leaving="true"] {
  animation: page-fade-out var(--dur-base) var(--ease-out) forwards;
}
@keyframes page-fade-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}

/* =========================================================
   SHARED UTILITIES
   ========================================================= */
.hairline { height: 1px; background: var(--hairline); width: 100%; }
.app--inverse .hairline { background: var(--hairline-inverse); }

.hairline--short {
  width: 32px; height: 1px; background: var(--hairline-strong);
}
.app--inverse .hairline--short { background: var(--hairline-inverse-strong); }

.center { display: flex; flex-direction: column; align-items: center; }

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
