/* yt:ui-tokens:start */
/* Shared UI tokens and a11y utilities (SSOT). Synced into site + portal CSS at build. */

:root {
  --focus-ring: var(--accent-gold);
  --focus-offset: 2px;
  --touch-target-min: 44px;
  --font-serif: "EB Garamond", Georgia, serif;
  --font-title: "Cinzel", serif;
  --font-mono: "JetBrains Mono", monospace;
}

:focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: var(--focus-offset);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  z-index: 100;
  padding: 0.75rem 1rem;
  background: var(--bg-surface);
  color: var(--accent-gold);
  border: 1px solid var(--accent-gold);
  font-family: var(--font-mono);
  font-size: max(0.875rem, 14px);
  text-decoration: none;
}

.skip-link:focus {
  position: fixed;
  left: 1rem;
  top: 1rem;
  width: auto;
  height: auto;
  overflow: visible;
}

.mobile-nav-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.mobile-nav-panel.open {
  max-height: 20rem;
}

@media (prefers-reduced-motion: reduce) {
  .mobile-nav-panel {
    transition: none;
  }
}
/* yt:ui-tokens:end */

.theme-dark {
    --bg-main: #0B1612;
    --bg-surface: #12221C;
    --bg-card: #172A23;
    --text-main: #F4F1EA;
    --text-muted: #B8C9C2;
    --accent-gold: #F0E68C;
    --accent-ochre: #C59B27;
    --border-color: rgba(240, 230, 140, 0.2);
    --border-hover: rgba(240, 230, 140, 0.6);
}

.theme-navy {
    --bg-main: #001F3F;
    --bg-surface: #002B56;
    --bg-card: #00366B;
    --text-main: #F4F1EA;
    --text-muted: #9BB8D4;
    --accent-gold: #D4AF37;
    --accent-ochre: #B37D1D;
    --border-color: rgba(212, 175, 55, 0.25);
    --border-hover: rgba(212, 175, 55, 0.7);
}

.theme-light {
    --bg-main: #FFFDD0;
    --bg-surface: #F8F5E4;
    --bg-card: #FFFFFF;
    --text-main: #001F3F;
    --text-muted: #3a4d5c;
    --accent-gold: #8B4513;
    --accent-ochre: #B37D1D;
    --border-color: rgba(139, 69, 19, 0.2);
    --border-hover: rgba(139, 69, 19, 0.6);
}

body {
    transition: background-color 0.4s ease, color 0.4s ease;
    overflow-x: hidden;
}

@media (prefers-reduced-motion: reduce) {
    body { transition: none; }
}

.bg-main { background-color: var(--bg-main); }
.bg-surface { background-color: var(--bg-surface); }
.bg-card { background-color: var(--bg-card); }
.bg-gold { background-color: var(--accent-gold); }
.text-main { color: var(--text-main); }
.text-muted { color: var(--text-muted); }
.text-gold { color: var(--accent-gold); }
.text-ochre { color: var(--accent-ochre); }
.border-theme { border-color: var(--border-color); }
.border-gold { border-color: var(--accent-gold); }

.border-theme:hover { border-color: var(--border-hover); }
.hover\:bg-gold:hover { background-color: var(--accent-gold); }
.hover\:border-gold:hover { border-color: var(--accent-gold); }
.hover\:text-gold:hover { color: var(--accent-gold); }

.focus\:border-gold:focus { border-color: var(--accent-gold); }

/* Typography (shared across all pages) — font vars synced from packages/ui-tokens/tokens.css */

body {
    font-family: var(--font-serif);
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

@media (min-width: 768px) {
    body { font-size: 1.125rem; }
}

.font-title { font-family: var(--font-title); }
.font-mono { font-family: var(--font-mono); }

.type-label {
    font-size: max(0.875rem, 14px);
    line-height: 1.45;
}

.type-body-sm {
    font-size: max(1rem, 16px);
    line-height: 1.6;
}

.type-eyebrow {
    font-size: max(0.8125rem, 13px);
    line-height: 1.4;
    letter-spacing: 0.12em;
}

.modal-blur {
    backdrop-filter: blur(8px);
    background-color: rgba(0, 0, 0, 0.75);
}

.form-honeypot {
    position: absolute;
    left: -10000px;
    top: auto;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.gallery-blur {
    filter: blur(3px);
    user-select: none;
}

/* Shared chrome — not dependent on Tailwind purge order */
[data-yt="chrome-footer"] .chrome-footer-nav {
    gap: 0.5rem 2rem;
}

[data-yt="chrome-footer"] .chrome-footer-nav a:not(:last-child)::after {
    content: '·';
    margin-left: 1rem;
    color: var(--text-muted);
    pointer-events: none;
}

@media (max-width: 639px) {
    [data-yt="chrome-footer"] .chrome-footer-nav a:not(:last-child)::after {
        display: none;
    }

    [data-yt="chrome-footer"] .chrome-footer-nav {
        row-gap: 0.75rem;
    }
}
