/* ==========================================================================
   GFSMUN - main.css
   Monochrome editorial, Antonio display, human + modern black/white
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Antonio:wght@300;400;500;600;700&family=Cinzel:wght@400;500;600;700&display=swap');

/* --------------------------------------------------------------------------
   0. FONT FACES - Antonio local + Cotorie fallback
   -------------------------------------------------------------------------- */
@font-face {
  font-family: "Cotorie";
  src: url("../assets/fonts/cotorie.woff2") format("woff2"),
       url("../assets/fonts/cotorie.ttf") format("truetype");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Antonio";
  src: url("../assets/fonts/Antonio/static/Antonio-Regular.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Antonio";
  src: url("../assets/fonts/Antonio/static/Antonio-Medium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Antonio";
  src: url("../assets/fonts/Antonio/static/Antonio-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Antonio";
  src: url("../assets/fonts/Antonio/static/Antonio-Bold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Antonio";
  src: url("../assets/fonts/Antonio/static/Antonio-Light.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS - MONOCHROME
   -------------------------------------------------------------------------- */
:root {
  --bg-base: #08080A;
  --bg-deep: #050507;
  --bg-surface: #111113;
  --bg-surface-alt: #17171A;
  --bg-elevated: #1E1E21;
  --bg-glass: rgba(8, 8, 10, 0.78);
  --bg-glass-strong: rgba(5, 5, 7, 0.92);

  /* White is the only accent */
  --brand-primary: #FFFFFF;
  --brand-secondary: #F2F2F0;
  --brand-light: #FFFFFF;
  --brand-soft: #FFFFFF;
  --brand-glow: rgba(255, 255, 255, 0.08);
  --brand-glow-soft: rgba(255, 255, 255, 0.04);
  --brand-gradient: linear-gradient(180deg, #FFFFFF 0%, #EDEDEB 100%);
  --brand-gradient-hover: linear-gradient(180deg, #F5F5F3 0%, #E0E0DE 100%);

  --text-main: #F5F5F3;
  --text-secondary: #D8D6D1;
  --text-muted: #9B9893;
  --text-faint: #6E6C69;
  --text-on-purple: #0A0A0A;
  --text-inverse: #0A0A0A;

  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-soft: rgba(255, 255, 255, 0.13);
  --border-strong: rgba(255, 255, 255, 0.22);
  --border-purple: rgba(255, 255, 255, 0.18);
  --border-purple-soft: rgba(255, 255, 255, 0.09);

  --success: #FFFFFF;
  --error: #FF4D4D;
  --warning: #FFD23F;

  --nav-height: 79px;
  --nav-height-mobile: 70px;

  /* Boxy - no pills */
  --radius-sm: 0px;
  --radius-md: 0px;
  --radius-lg: 0px;
  --radius-xl: 0px;
  --radius-pill: 0px;

  --transition-fast: 160ms ease;
  --transition-standard: 280ms ease;
  --transition-smooth: 480ms cubic-bezier(0.25, 0.8, 0.25, 1);
  --transition-spring: 600ms cubic-bezier(0.34, 1.56, 0.64, 1);

  --content-width: 1200px;
  --content-narrow: 760px;
  --gutter: 40px;

  --space-xs: 8px;
  --space-sm: 16px;
  --space-md: 24px;
  --space-lg: 48px;
  --space-xl: 80px;
  --space-2xl: 120px;

  --shadow-soft: 0 4px 32px rgba(0, 0, 0, 0.5);
  --shadow-purple: 0 8px 32px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.06);
  --shadow-card: 0 2px 20px rgba(0, 0, 0, 0.4);

  --font-display: "Antonio", "Inter", system-ui, sans-serif;
  --font-brand: "Cotorie", "Antonio", Georgia, serif;
  --font-body: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-mono: Arial, Helvetica, sans-serif;
}

/* --------------------------------------------------------------------------
   2. RESET & BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: var(--nav-height);
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.72;
  color: var(--text-main);
  background: var(--bg-base);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
}

/* Film grain - slightly stronger for human texture, monochrome */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.42'/%3E%3C/svg%3E");
  mix-blend-mode: soft-light;
}

img, picture, video, canvas, svg { display: block; max-width: 100%; }

img { height: auto; }

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

ul, ol { list-style: none; padding: 0; }

fieldset { border: 0; padding: 0; margin: 0; }

::selection {
  background: #FFFFFF;
  color: #0A0A0A;
}

/* Scrollbar - boxy, monochrome */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg-deep); }
::-webkit-scrollbar-thumb { background: #2A2A2E; border-radius: 0; }
::-webkit-scrollbar-thumb:hover { background: #3A3A3E; }

/* --------------------------------------------------------------------------
   3. TYPOGRAPHY - ANTONIO EVERYWHERE FOR DISPLAY
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.01em;
  color: var(--text-main);
  text-wrap: balance;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(48px, 9vw, 126px);
  letter-spacing: 0.015em;
  line-height: 0.98;
  font-weight: 700;
}

h2 {
  font-size: clamp(32px, 5vw, 58px);
  line-height: 1.04;
  letter-spacing: 0.015em;
  font-weight: 600;
}

h3 {
  font-size: clamp(22px, 3.2vw, 30px);
  line-height: 1.1;
  letter-spacing: 0.02em;
}

h4 {
  font-size: clamp(18px, 2.2vw, 22px);
  line-height: 1.15;
  letter-spacing: 0.02em;
}

/* GFSMUN-only wordmark - Cotorie, nothing else uses this */
.brand-gfsmun {
  font-family: var(--font-brand);
  font-weight: 400;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-muted);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: var(--text-muted);
  opacity: 0.7;
  display: inline-block;
}

.eyebrow--light::before { background: var(--text-muted); }
.eyebrow--no-line::before { display: none; }

.lead {
  font-size: clamp(17px, 2vw, 20px);
  line-height: 1.7;
  color: var(--text-secondary);
  font-weight: 300;
  max-width: 60ch;
}

.body-muted {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.7;
}

.label-mono {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* Link underline helper */
.text-link {
  color: var(--text-main);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,255,255,0.28);
  transition: text-decoration-color var(--transition-fast), color var(--transition-fast);
}
.text-link:hover { color: #fff; text-decoration-color: #fff; }
.text-link:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 0; }

/* --------------------------------------------------------------------------
   4. LAYOUT - CONTAINER & GRID - 8pt rhythm
   -------------------------------------------------------------------------- */
.container {
  width: min(var(--content-width), calc(100% - var(--gutter)));
  margin-inline: auto;
}

.container--narrow {
  width: min(var(--content-narrow), calc(100% - var(--gutter)));
  margin-inline: auto;
}

.container--wide {
  width: min(1360px, calc(100% - var(--gutter)));
  margin-inline: auto;
}

.section {
  padding-block: clamp(64px, 8vw, 120px);
  position: relative;
}

.section--tight { padding-block: clamp(48px, 5vw, 80px); }

.section--dark-alt { background: var(--bg-deep); }

.section__header {
  margin-bottom: clamp(36px, 5vw, 64px);
  max-width: 720px;
}

.section__header--center {
  text-align: center;
  margin-inline: auto;
}

.section__header h2 { margin-top: 16px; }

.section__header p {
  margin-top: 16px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.7;
}

/* Editorial grid */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

@media (max-width: 1024px) {
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  :root { --gutter: 24px; }
  .grid-2 { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .section__header--center { text-align: left; }
}

/* Subtle divider */
.divider {
  height: 1px;
  background: var(--border-subtle);
  border: 0;
  margin: 0;
}

.divider--purple {
  background: var(--border-subtle);
  height: 1px;
}

/* Grain / radial glow – subtle white glow */
.bg-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.bg-glow::before {
  content: "";
  position: absolute;
  width: 900px;
  height: 900px;
  left: 50%;
  top: -200px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse at center, rgba(255,255,255,0.045) 0%, rgba(255,255,255,0.018) 35%, transparent 70%);
  filter: blur(40px);
}

.bg-glow--bottom::before {
  top: auto;
  bottom: -300px;
}

/* --------------------------------------------------------------------------
   5. UTILITIES
   -------------------------------------------------------------------------- */
.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-link {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 9999;
  background: #fff;
  color: #000;
  padding: 12px 20px;
  border-radius: 0;
  font-weight: 600;
  font-size: 14px;
  transform: translateY(-150%);
  transition: transform var(--transition-fast);
}
.skip-link:focus { transform: translateY(0); }

.text-center { text-align: center; }
.text-muted { color: var(--text-muted); }

.flex { display: flex; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm { gap: 12px; }
.gap-md { gap: 24px; }

/* Image handling */
.img-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.aspect-16-9 { aspect-ratio: 16 / 9; }
.aspect-4-3 { aspect-ratio: 4 / 3; }
.aspect-4-5 { aspect-ratio: 4 / 5; }
.aspect-3-2 { aspect-ratio: 3 / 2; }

.rounded-lg { border-radius: var(--radius-lg); overflow: hidden; }
.rounded-xl { border-radius: var(--radius-xl); overflow: hidden; }

/* Placeholder while real photos are pending - monochrome */
.image-placeholder {
  background:
    radial-gradient(ellipse at 30% 20%, rgba(255,255,255,0.06), transparent 50%),
    radial-gradient(ellipse at 80% 80%, rgba(255,255,255,0.04), transparent 50%),
    linear-gradient(180deg, #141416 0%, #0E0E10 100%);
  border: 1px solid var(--border-subtle);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  min-height: 220px;
  position: relative;
  overflow: hidden;
}

.image-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.32));
  pointer-events: none;
}

.image-placeholder span {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255,255,255,0.10);
  padding: 8px 14px;
  border-radius: 0;
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(8px);
}

/* Stagger helper for JS reveals */
.reveal-group > * { --stagger: 0; }

/* --------------------------------------------------------------------------
   6. ANIMATIONS & REVEALS
   -------------------------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 320ms ease, transform 320ms cubic-bezier(0.25, 0.8, 0.25, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 0ms; }
.reveal--delay-2 { transition-delay: 0ms; }
.reveal--delay-3 { transition-delay: 0ms; }
.reveal--delay-4 { transition-delay: 0ms; }

/* Mobile: shorter hero-to-content reveal travel so the scroll animation reads cleanly */
@media (max-width: 768px) {
  .reveal { transform: translateY(10px); }
  .reveal.is-visible { transform: translateY(0); }
}

/* subtle image zoom on card hover – defined in components but base */
.img-zoom { transition: transform 700ms cubic-bezier(0.25, 0.8, 0.25, 1); }
*:hover > .img-zoom { transform: scale(1.04); }

/* Focus */
:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

/* Mobile: no text highlight on tap/selection */
@media (max-width: 768px) {
  * { -webkit-tap-highlight-color: transparent; }
  button, a, .team-card, .nav__link, .mobile-menu__link, .gallery-edition__cover, .page-hero__inner, .btn {
    -webkit-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
  }
  ::selection { background: transparent; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .img-zoom { transition: none; }
}

/* --------------------------------------------------------------------------
   7. ACCESSIBILITY & PRINT
   -------------------------------------------------------------------------- */
@media (prefers-contrast: more) {
  :root {
    --border-subtle: rgba(255,255,255,0.25);
    --text-muted: #C5C5CE;
  }
}

@media print {
  body { background: #fff; color: #000; }
  .nav, .footer, .lightbox, .mobile-menu { display: none !important; }
}
