/* =====================================================================
   Golden Z @ UofT — design tokens
   Palette: deep maroon (primary), warm gold (accent), parchment (base)
   Type: Fraunces (display serif) + Work Sans (body/UI)
   ===================================================================== */

:root {
  /* color */
  --maroon-900: #3E0D18;
  --maroon-800: #4E1220;
  --maroon-700: #6B1A2C;
  --maroon-600: #832238;
  --gold-600:   #C08A1E;
  --gold-500:   #E0A930;
  --gold-300:   #F1CD73;
  --gold-100:   #FBEFD4;
  --parchment:  #FAF3E4;
  --parchment-2:#F3E8D2;
  --ink:        #2A1810;
  --ink-soft:   #5A4438;
  --white:      #FFFDF8;

  /* type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-body: "Work Sans", "Segoe UI", sans-serif;

  /* type scale */
  --step-4: clamp(2.5rem, 2rem + 2.2vw, 3.75rem);
  --step-3: clamp(1.9rem, 1.6rem + 1.4vw, 2.6rem);
  --step-2: clamp(1.4rem, 1.25rem + 0.6vw, 1.75rem);
  --step-1: 1.1875rem;
  --step-0: 1.0625rem;
  --step-neg1: 0.9rem;

  /* layout */
  --container: 1120px;
  --gutter: 1.5rem;
  --radius: 4px;
}

@media (prefers-color-scheme: dark) {
  /* This site is authored as a light, warm-paper identity by design —
     it keeps its palette in dark-mode browsers rather than inverting. */
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* Locks horizontal zooming/scrolling */
  width: 100%;
}

@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;
  }
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
  color: var(--ink);
  background: var(--parchment);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden; /* Locks horizontal zooming/scrolling */
  width: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--maroon-900);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 600;
}

h1 { font-size: var(--step-4); font-weight: 500; }
h2 { font-size: var(--step-3); }
h3 { font-size: var(--step-2); }

p { margin: 0 0 1.1em; max-width: 62ch; }
p.wide { max-width: 74ch; }

a {
  color: var(--maroon-700);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 3px;
}
a:hover { color: var(--maroon-900); }

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

.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;
}

:focus-visible {
  outline: 3px solid var(--gold-600);
  outline-offset: 2px;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.mark { color: var(--maroon-800); flex-shrink: 0; }
.mark .accent { fill: var(--gold-500); }
.on-dark .mark { color: var(--gold-300); }
.on-dark .mark .accent { fill: var(--parchment); }

/* =====================================================================
   Header
   ===================================================================== */

.site-header {
  background: var(--parchment);
  border-bottom: 1px solid var(--parchment-2);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.1rem;
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.75rem; 
  text-decoration: none;
  color: var(--maroon-900);
}

.logo-img {
  height: 35px;
  width: auto;
  display: block;
}

.logo-text {
  display: block;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--maroon-900);
  line-height: 1.1;
  max-width: 300px;
}

@media (max-width: 600px) {
  .logo { gap: 0.5rem; }
  .logo-img { height: 30px; }
  .logo-text { 
    font-size: 0.9rem; 
    max-width: 150px; 
    line-height: 1.2;
  }
}
@media (max-width: 380px) {
  .logo-text { max-width: 120px; font-size: 0.85rem; }
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--maroon-900);
}

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-nav a {
  display: inline-block;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.98rem;
  font-weight: 500;
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--maroon-900);
  border-bottom-color: var(--gold-500);
}

.site-nav .nav-cta {
  background: var(--maroon-800);
  color: var(--white);
  padding: 0.55rem 1.1rem;
  border-radius: var(--radius);
  border-bottom: none;
}
.site-nav .nav-cta:hover,
.site-nav .nav-cta[aria-current="page"] {
  background: var(--maroon-900);
  color: var(--white);
}

/* =====================================================================
   CLEAN DROPDOWN DESIGN
   ===================================================================== */
.has-dropdown {
  position: relative;
}
.dropdown-toggle {
  display: inline-block;
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 500;
  padding-block: 0.3rem;
  border-bottom: 2px solid transparent;
  cursor: default;
}
.has-dropdown:hover .dropdown-toggle,
.has-dropdown.dropdown-active .dropdown-toggle {
  color: var(--maroon-900);
  border-bottom-color: var(--gold-500);
}

/* FIXED: .site-nav .dropdown-menu forces it to override the row layout and stack vertically */
.site-nav .dropdown-menu {
  display: block;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 180px;
  margin: 0;
  padding: 0.5rem 0;
  list-style: none;
  background: var(--white);
  border: 1px solid var(--parchment-2);
  border-radius: var(--radius);
  box-shadow: 0 12px 28px rgba(42, 24, 16, 0.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.15s ease, transform 0.15s ease, visibility 0.15s;
  z-index: 50;
}
.has-dropdown:hover .dropdown-menu,
.has-dropdown:focus-within .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.site-nav .dropdown-menu li {
  display: block;
  margin: 0;
}

.site-nav .dropdown-menu a {
  display: block;
  padding: 0.6rem 1.2rem;
  white-space: nowrap;
  border-bottom: none;
  font-weight: 500;
  color: var(--ink);
}
.site-nav .dropdown-menu a:hover { 
  background: var(--parchment-2);
  color: var(--maroon-900); 
}

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .site-nav ul {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--parchment);
    border-bottom: 1px solid var(--parchment-2);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }
  .site-nav.open ul { max-height: 480px; }
  .site-nav ul li { border-top: 1px solid var(--parchment-2); }
  .site-nav ul li a { display: block; padding: 0.9rem var(--gutter); }
  .site-nav .nav-cta { margin: 0.9rem var(--gutter); text-align: center; }

  .dropdown-toggle {
    display: block;
    padding: 0.9rem var(--gutter) 0.3rem;
  }
  .site-nav .dropdown-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    padding: 0 0 0.4rem;
    margin: 0;
  }
  .site-nav .dropdown-menu a { 
    padding: 0.5rem var(--gutter) 0.5rem calc(var(--gutter) + 0.8rem); 
    color: var(--ink); 
  }
  .site-nav .dropdown-menu a:hover { 
    background: transparent; 
    color: var(--maroon-900); 
  }
}

/* =====================================================================
   Buttons
   ===================================================================== */

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.98rem;
  text-decoration: none;
  padding: 0.8rem 1.5rem;
  border-radius: var(--radius);
  border: 2px solid transparent;
}

.btn-gold {
  background: var(--gold-500);
  color: var(--maroon-900);
}
.btn-gold:hover { background: var(--gold-300); color: var(--maroon-900); }

.btn-outline {
  border-color: var(--parchment);
  color: var(--white);
}
.btn-outline:hover { border-color: var(--gold-500); color: var(--gold-300); }

.btn-line {
  border-color: var(--maroon-800);
  color: var(--maroon-900);
}
.btn-line:hover { background: var(--maroon-900); color: var(--white); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.9rem; }

/* =====================================================================
   Hero
   ===================================================================== */

.hero {
  background: var(--maroon-900);
  color: var(--parchment);
  padding-block: clamp(3rem, 6vw, 5.5rem);
  position: relative;
  overflow: hidden;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-eyebrow {
  font-size: var(--step-neg1);
  color: var(--gold-300);
  margin-bottom: 0.9rem;
}

.hero h1 { color: var(--white); }

.hero .lede {
  color: var(--gold-100);
  font-size: var(--step-1);
  max-width: 46ch;
}

.hero-figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-figure svg { width: 100%; height: auto; max-width: 340px; }

.logo-plate {
  background: var(--parchment);
  border-radius: 20px;
  padding: 1.8rem 2.2rem;
  box-shadow: 0 18px 40px rgba(20, 6, 10, 0.35);
  display: inline-flex;
}
.logo-plate img { width: 100%; max-width: 300px; height: auto; display: block; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; }
  .hero-figure { order: -1; max-width: 280px; margin-inline: auto; }
}

/* =====================================================================
   Section rhythm
   ===================================================================== */

section.block { padding-block: clamp(3rem, 6vw, 5rem); }
.block-alt { background: var(--parchment-2); }

.section-head {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  max-width: 60ch;
}

.rule {
  width: 46px;
  height: 3px;
  background: var(--gold-500);
  margin-bottom: 1.2rem;
}

/* =====================================================================
   Cards & Headshots (Team & Initiatives)
   ===================================================================== */

.people-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 2.2rem 2.5rem;
}

.person-avatar {
  width: 100%;
  max-width: 200px;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 1.2rem;
  display: block;
}

.person h3 { font-size: 1.15rem; margin-bottom: 0.15rem; }
.person .role {
  display: block;
  color: var(--gold-600);
  font-weight: 600;
  font-size: var(--step-neg1);
  margin-bottom: 0.5rem;
}
.person p { color: var(--ink-soft); margin-bottom: 0; }
.avatar-note {
  font-size: var(--step-neg1);
  color: var(--ink-soft);
  border-top: 1px dashed var(--gold-500);
  padding-top: 1rem;
  margin-top: 0.5rem;
}

.department-grid, .initiative-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  gap: 2rem;
  margin-top: 2.5rem;
}

.department-card, .initiative-card {
  background: var(--white);
  border: 1px solid var(--parchment-2);
  border-top: 5px solid var(--maroon-900);
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 8px 24px rgba(42, 24, 16, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.department-card:hover, .initiative-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(42, 24, 16, 0.08);
}
.department-card h3, .initiative-card h3 {
  font-size: 1.4rem;
  margin-top: 0;
  margin-bottom: 0.8rem;
}
.department-card p, .initiative-card p {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin-bottom: 1.2rem;
}
.department-card ul, .initiative-card ul {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.department-card ul li, .initiative-card ul li {
  margin-bottom: 0.5rem;
}

/* =====================================================================
   Facts strip (thin gold rules, not icon cards)
   ===================================================================== */

.facts {
  background: var(--parchment-2);
  border-bottom: 1px solid var(--gold-300);
}
.facts-list {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  margin: 0;
  padding: 1.6rem 0;
}
.facts-list li {
  flex: 1 1 220px;
  padding: 0.4rem 1.4rem;
  border-left: 2px solid var(--gold-500);
  font-size: var(--step-neg1);
  color: var(--ink-soft);
}
.facts-list li strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--maroon-900);
  font-weight: 600;
}

/* =====================================================================
   Quote / callout
   ===================================================================== */

blockquote.pull {
  border-left: 3px solid var(--gold-500);
  margin: 0;
  padding-left: 1.4rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 500;
  color: var(--maroon-900);
  max-width: 52ch;
}
blockquote.pull cite {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: var(--step-neg1);
  color: var(--ink-soft);
  margin-top: 0.8rem;
}

/* =====================================================================
   CTA band
   ===================================================================== */

.cta-band {
  background: var(--gold-100);
  border-top: 1px solid var(--gold-300);
  border-bottom: 1px solid var(--gold-300);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
  text-align: left;
}
.cta-band-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}
.cta-band h2 { margin-bottom: 0.3rem; }
.cta-band p { margin: 0; color: var(--ink-soft); }

/* =====================================================================
   Contact page
   ===================================================================== */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.field { margin-bottom: 1.3rem; }
.field label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.4rem;
  font-size: var(--step-neg1);
}
.field input,
.field select,
.field textarea {
  width: 100%;
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.7rem 0.8rem;
  border: 1.5px solid var(--parchment-2);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--ink);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--gold-600);
}
.field textarea { min-height: 130px; resize: vertical; }

.contact-info dt {
  font-weight: 600;
  color: var(--maroon-900);
  margin-top: 1.3rem;
}
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { margin: 0.2rem 0 0; color: var(--ink-soft); }

.note {
  font-size: var(--step-neg1);
  color: var(--ink-soft);
  border-top: 1px dashed var(--gold-500);
  padding-top: 1rem;
  margin-top: 1.5rem;
}

@media (max-width: 760px) {
  .contact-grid { grid-template-columns: 1fr; }
}

/* =====================================================================
   Footer
   ===================================================================== */

.site-footer {
  background: var(--maroon-900);
  color: var(--gold-100);
  padding-block: 3rem;
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 2rem;
  align-items: flex-start;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  max-width: 34ch;
}
.footer-logo-plate {
  background: var(--parchment);
  border-radius: 10px;
  padding: 0.5rem 0.7rem;
  display: inline-flex;
  flex-shrink: 0;
}
.footer-logo-plate img { height: 46px; width: auto; display: block; }
.footer-brand p { margin: 0; color: var(--gold-100); font-size: var(--step-neg1); }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.footer-links a {
  color: var(--parchment);
  text-decoration: none;
  font-size: var(--step-neg1);
}
.footer-links a:hover { color: var(--gold-300); }
.footer-copy {
  width: 100%;
  margin: 2rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--maroon-700);
  font-size: 0.85rem;
  color: var(--gold-300);
  opacity: 0.85;
}

/* =====================================================================
   Page header (non-home pages)
   ===================================================================== */

.page-header {
  background: var(--maroon-900);
  color: var(--parchment);
  padding-block: clamp(2.5rem, 5vw, 3.5rem);
}
.page-header h1 { color: var(--white); margin-bottom: 0.6rem; }
.page-header p { color: var(--gold-100); max-width: 56ch; margin: 0; }
