/* ===== GLOBAL.CSS =====
   Reset · Variables · Typography · Layout · Header · Footer · Utilities
   ================================================= */

:root {
  /* Colors */
  --navy: #0B1628;
  --navy-mid: #112040;
  --navy-light: #1A3260;
  --gold: #C9A84C;
  --gold-light: #DFC278;
  --gold-pale: #F0E4C0;
  --white: #FFFFFF;
  --off-white: #F5F3EE;
  --text-dark: #1C1C1E;
  --text-muted: #8A9BB5;
  --border-subtle: rgba(201, 168, 76, 0.18);
  --border-light: rgba(255, 255, 255, 0.08);

  /* Typography */
  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Type scale */
  --text-xs: 0.75rem;
  --text-sm: 0.875rem;
  --text-base: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.25rem;
  --text-2xl: 1.5rem;
  --text-3xl: 2rem;
  --text-4xl: 2.75rem;
  --text-5xl: 3.5rem;

  /* Layout */
  --max-width: 1160px;
  --header-height: 68px;
  --radius-sm: 4px;
  --radius: 8px;
  --radius-lg: 16px;

  /* Spacing */
  --space-1: 0.25rem;
  --space-2: 0.5rem;
  --space-3: 0.75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-24: 6rem;

  /* Shadows */
  --shadow-card: 0 2px 16px rgba(11, 22, 40, 0.4), 0 1px 4px rgba(11, 22, 40, 0.3);
  --shadow-gold: 0 4px 24px rgba(201, 168, 76, 0.15);
  --shadow-float: 0 8px 40px rgba(11, 22, 40, 0.6);

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 220ms;
}

/* ===== RESET ===== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.7;
  color: var(--white);
  background-color: var(--navy);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

ul, ol {
  list-style: none;
}

a {
  color: var(--gold);
  text-decoration: none;
  transition: color var(--duration) var(--ease-out);
}

a:hover { color: var(--gold-light); }

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

button {
  font-family: inherit;
  cursor: pointer;
  background: none;
  border: none;
}

/* ===== TYPOGRAPHY ===== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--white);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); }

@media (min-width: 768px) {
  h1 { font-size: var(--text-5xl); }
  h2 { font-size: var(--text-4xl); }
}

p { margin-bottom: var(--space-4); }
p:last-child { margin-bottom: 0; }

strong { font-weight: 600; }

/* ===== LAYOUT ===== */

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-6);
}

.section {
  padding: var(--space-12) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-16) 0;
  }
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: 600;
  margin-bottom: var(--space-8);
  color: var(--white);
}

@media (min-width: 768px) {
  .section-title {
    font-size: var(--text-4xl);
  }
}

.section-title--dark {
  color: var(--navy);
}

.section--light {
  background: var(--off-white);
  color: var(--text-dark);
}

.section--light h1,
.section--light h2,
.section--light h3,
.section--light h4,
.section--light .section-title {
  color: var(--navy);
}

.section--light p,
.section--light li,
.section--light td,
.section--light th {
  color: var(--text-dark);
}

.section--light a {
  color: var(--navy-light);
}

.section--mid {
  background: var(--navy-mid);
}

/* ===== HEADER ===== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background: rgba(11, 22, 40, 0.97);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
}

.site-header .container {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-6);
}

/* Logo */
.site-logo {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--white);
  text-decoration: none;
}

.site-logo:hover { color: var(--white); }

.site-logo svg {
  display: block;
}

/* Nav */
.site-nav {
  display: none;
}

@media (min-width: 768px) {
  .site-nav {
    display: block;
  }
}

.nav-list {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

.nav-list a {
  display: inline-block;
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  border-bottom: 2px solid transparent;
  transition: color var(--duration) var(--ease-out), border-color var(--duration) var(--ease-out);
}

.nav-list a:hover {
  color: var(--white);
}

.nav-list a.active {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* Header actions: lang switch + mobile toggle */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  flex-shrink: 0;
}

.lang-switch {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: var(--space-1) var(--space-3);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  color: var(--text-muted);
  transition: color var(--duration), border-color var(--duration), background var(--duration);
}

.lang-switch:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
}

/* Mobile nav toggle */
.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 32px;
  height: 32px;
  padding: 4px;
}

@media (min-width: 768px) {
  .nav-toggle {
    display: none;
  }
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text-muted);
  border-radius: 2px;
  transition: transform var(--duration) var(--ease-out), opacity var(--duration);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Mobile nav overlay */
.site-nav.is-open {
  display: block;
  position: fixed;
  top: var(--header-height);
  left: 0;
  right: 0;
  bottom: 0;
  background: var(--navy-mid);
  border-top: 1px solid var(--border-subtle);
  overflow-y: auto;
  z-index: 99;
}

.site-nav.is-open .nav-list {
  flex-direction: column;
  align-items: stretch;
  padding: var(--space-4);
  gap: 0;
}

.site-nav.is-open .nav-list a {
  padding: var(--space-4) var(--space-4);
  font-size: var(--text-base);
  border-bottom: 1px solid var(--border-subtle);
  border-right: none;
  text-transform: none;
  letter-spacing: 0;
}

/* ===== FOOTER ===== */

.site-footer {
  background: var(--navy-mid);
  border-top: 1px solid var(--border-subtle);
  padding: var(--space-12) 0 var(--space-8);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-8);
  margin-bottom: var(--space-8);
}

@media (min-width: 768px) {
  .footer__grid {
    grid-template-columns: 2fr 1fr 1fr;
    gap: var(--space-12);
  }
}

.footer__brand {
  max-width: 300px;
}

.footer__desc {
  margin-top: var(--space-4);
  font-size: var(--text-sm);
  color: var(--text-muted);
  line-height: 1.6;
}

.footer__nav-title {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.footer__nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__nav a {
  font-size: var(--text-sm);
  color: var(--text-muted);
  transition: color var(--duration);
}

.footer__nav a:hover {
  color: var(--gold);
}

.footer__legal {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.footer__legal ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.footer__legal a {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.footer__copy,
.footer__disclaimer {
  font-size: var(--text-xs);
  color: var(--text-muted);
  line-height: 1.5;
}

.footer__bottom {
  border-top: 1px solid var(--border-light);
  padding-top: var(--space-6);
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__bottom .container {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--space-4);
}

.footer__bottom-copy {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* ===== UTILITIES ===== */

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

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

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: var(--text-sm);
  color: var(--text-muted);
  padding: var(--space-4) 0;
}

.breadcrumb a {
  color: var(--text-muted);
}

.breadcrumb a:hover {
  color: var(--gold);
}

.breadcrumb__sep {
  color: var(--border-subtle);
  font-size: var(--text-xs);
}

/* Page intro for EEAT pages */
.page-intro {
  background: var(--navy-mid);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--space-12) 0 var(--space-8);
}

.page-intro h1 {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .page-intro h1 {
    font-size: var(--text-4xl);
  }
}

.page-intro p {
  font-size: var(--text-lg);
  color: var(--text-muted);
  max-width: 640px;
}

/* Prose content for EEAT pages */
.prose {
  max-width: 740px;
}

.prose h2 {
  font-size: var(--text-2xl);
  margin-top: var(--space-12);
  margin-bottom: var(--space-4);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

@media (min-width: 768px) {
  .prose h2 {
    font-size: var(--text-3xl);
  }
}

.prose h3 {
  font-size: var(--text-xl);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.prose p {
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}

.prose ul,
.prose ol {
  list-style: disc;
  padding-left: var(--space-6);
  margin-bottom: var(--space-6);
}

.prose ul li,
.prose ol li {
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.prose a {
  color: var(--gold);
  text-decoration: underline;
  text-decoration-color: var(--border-subtle);
}

.prose a:hover {
  text-decoration-color: var(--gold);
}

.prose strong {
  color: var(--white);
}

/* Info box / callout for prose pages */
.info-box {
  background: var(--navy-mid);
  border: 1px solid var(--border-subtle);
  border-left: 3px solid var(--gold);
  border-radius: var(--radius);
  padding: var(--space-6);
  margin: var(--space-8) 0;
}

.info-box p {
  color: var(--text-muted);
  margin: 0;
  font-size: var(--text-sm);
}

/* Score table for methodology */
.criteria-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  margin: var(--space-6) 0;
}

.criteria-table th {
  text-align: left;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold);
  background: var(--navy-mid);
  border-bottom: 1px solid var(--border-subtle);
}

.criteria-table td {
  padding: var(--space-3) var(--space-4);
  color: var(--text-muted);
  border-bottom: 1px solid var(--border-light);
}

.criteria-table tr:hover td {
  background: rgba(201, 168, 76, 0.04);
}

/* Contact form */
.contact-form {
  max-width: 540px;
}

.form-group {
  margin-bottom: var(--space-6);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: var(--navy-mid);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius);
  color: var(--white);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--duration);
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.form-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238A9BB5' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-select option {
  background: var(--navy-mid);
}

.form-textarea {
  resize: vertical;
  min-height: 120px;
}

.form-submit {
  display: inline-block;
  padding: var(--space-3) var(--space-8);
  background: var(--gold);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.06em;
  border-radius: var(--radius);
  cursor: pointer;
  border: none;
  transition: background var(--duration), transform var(--duration);
}

.form-submit:hover {
  background: var(--gold-light);
  transform: translateY(-1px);
}

.form-submit:active {
  transform: translateY(0);
}

/* Glossary */
.glossary-nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.glossary-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  font-size: var(--text-sm);
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  transition: color var(--duration), border-color var(--duration), background var(--duration);
}

.glossary-nav a:hover {
  color: var(--gold);
  border-color: var(--gold);
  background: rgba(201, 168, 76, 0.06);
}

.glossary-section {
  margin-bottom: var(--space-12);
}

.glossary-section-letter {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 600;
  color: var(--gold);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.glossary-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

.glossary-term dt {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--white);
  margin-bottom: var(--space-2);
}

.glossary-term dd {
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: 1.7;
  padding-left: var(--space-4);
  border-left: 2px solid var(--border-subtle);
}
