/* ============================================
   ESTEVE CASTELLS — Personal Website
   Design: Editorial Luxury Consulting
   ============================================ */

/* --- Design Tokens --- */
:root {
  /* Colors */
  --color-bg: #FAF8F5;
  --color-bg-alt: #F2EFEB;
  --color-surface: #FFFFFF;
  --color-dark: #111827;
  --color-text: #1A1A1A;
  --color-text-secondary: #5F6368;
  --color-text-muted: #9CA3AF;
  --color-accent: #1A4B9C;
  --color-accent-light: #EAF0FA;
  --color-accent-hover: #133A7A;
  --color-accent-warm: #C4873B;
  --color-border: #E5E1DB;
  --color-border-light: #F0EDE8;

  /* Typography */
  --font-sans: 'Urbanist', -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;
  --text-xs: 0.8125rem;
  --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;
  --leading-tight: 1.15;
  --leading-snug: 1.3;
  --leading-normal: 1.6;

  /* Spacing */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-2xl: 6rem;
  --space-3xl: 8rem;

  /* Layout */
  --max-width: 1200px;
  --max-width-narrow: 800px;
  --radius: 8px;
  --radius-lg: 16px;

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

/* --- Reset & Base --- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background-color: var(--color-bg);
  overflow-x: hidden;
}

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

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

a:hover {
  color: var(--color-accent-hover);
}

ul {
  list-style: none;
}

/* --- Utility --- */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md);
}

.section-pad {
  padding: var(--space-2xl) 0;
}

/* Scroll reveal — JS adds .visible; content is visible by default
   until JS loads (progressive enhancement) */
.reveal {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.js-reveal-ready .reveal {
  opacity: 0;
  transform: translateY(24px);
}

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

/* Staggered children */
.js-reveal-ready .reveal-stagger > .reveal:nth-child(1) { transition-delay: 0s; }
.js-reveal-ready .reveal-stagger > .reveal:nth-child(2) { transition-delay: 0.1s; }
.js-reveal-ready .reveal-stagger > .reveal:nth-child(3) { transition-delay: 0.2s; }
.js-reveal-ready .reveal-stagger > .reveal:nth-child(4) { transition-delay: 0.25s; }
.js-reveal-ready .reveal-stagger > .reveal:nth-child(5) { transition-delay: 0.3s; }
.js-reveal-ready .reveal-stagger > .reveal:nth-child(6) { transition-delay: 0.35s; }

/* --- Announcement Banner --- */
.banner {
  background-color: var(--color-dark);
  color: #fff;
  font-size: var(--text-sm);
  text-align: center;
  padding: 0.625rem var(--space-md);
  position: relative;
  z-index: 100;
}

.banner-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.banner-icon {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.banner a {
  color: #6db3f2;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.banner a:hover {
  color: #fff;
}

.banner-close {
  position: absolute;
  right: var(--space-sm);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.5);
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.25rem;
  transition: color 0.2s;
}

.banner-close:hover {
  color: #fff;
}

.banner.hidden {
  display: none;
}

/* --- Navbar --- */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(250, 248, 245, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--color-border-light);
  transition: box-shadow 0.3s;
}

.navbar.scrolled {
  box-shadow: 0 1px 12px rgba(0, 0, 0, 0.06);
}

.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.navbar-logo {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  line-height: 1;
  gap: 3px;
}

.navbar-logo:hover {
  color: inherit;
}

.logo-name {
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: 1.6rem;
  color: var(--color-accent);
  letter-spacing: -0.01em;
}

.logo-tagline {
  font-family: var(--font-sans);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.logo-sep {
  color: var(--color-border);
  margin: 0 1px;
}

.nav-links {
  display: none;
  align-items: center;
  gap: var(--space-lg);
}

.nav-links a {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: 0.01em;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-accent);
  transition: width 0.3s var(--ease-out);
}

.nav-links a:hover {
  color: var(--color-accent);
}

.nav-links a:hover::after {
  width: 100%;
}

.nav-icon {
  display: flex;
  align-items: center;
  opacity: 0.6;
}

.nav-icon::after {
  display: none !important;
}

.nav-icon:hover {
  opacity: 1;
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  z-index: 60;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-text);
  border-radius: 2px;
  transition: all 0.3s var(--ease-out);
}

.nav-toggle.active span:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
  opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero --- */
.hero {
  padding: var(--space-lg) 0 0;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -120px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(13, 107, 88, 0.06) 0%, transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  align-items: center;
}

.hero-content {
  max-width: 600px;
}

.hero h1 {
  font-family: var(--font-sans);
  font-size: var(--text-4xl);
  font-weight: 800;
  line-height: var(--leading-tight);
  color: var(--color-text);
  margin-bottom: var(--space-md);
  letter-spacing: -0.02em;
}

.hero h1 .accent {
  color: var(--color-accent);
  font-style: italic;
  font-family: var(--font-serif);
  font-weight: 700;
}

.hero-subtitle {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
  margin-bottom: var(--space-md);
  max-width: 520px;
}

.hero-ctas {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.hero-image {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  align-self: flex-end;
}

.hero-image img {
  max-width: 480px;
  width: 100%;
  mix-blend-mode: multiply;
  display: block;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  border-radius: 50px;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: all 0.3s var(--ease-out);
  border: 2px solid transparent;
  text-decoration: none;
}

.btn-primary {
  background: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}

.btn-primary:hover {
  background: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(13, 107, 88, 0.2);
}

.btn-outline {
  background: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}

.btn-outline:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
  transform: translateY(-2px);
}

/* --- Logo Grid --- */
.logos {
  padding: var(--space-lg) 0;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

.logo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto auto;
  gap: var(--space-md);
  align-items: center;
  justify-items: center;
  min-height: 120px;
}

.logo-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 48px;
  width: 100%;
  padding: 0 0.5rem;
}

.logo-cell img {
  max-height: 100%;
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  opacity: 0.55;
  mix-blend-mode: multiply;
  transition: opacity 0.25s ease;
}

.logo-cell img:hover {
  opacity: 1;
}

.logo-cell.logo-fading img {
  opacity: 0;
}

.logo-cell.hidden-logo {
  display: none;
}

.logo-cell.hidden-logo img {
  opacity: 0;
}

/* --- Section Headers --- */
.section-header {
  text-align: center;
  max-width: var(--max-width-narrow);
  margin: 0 auto var(--space-xl);
}

.section-eyebrow {
  display: block;
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--color-accent);
  margin-bottom: 0.75rem;
}

.section-header h2 {
  font-family: var(--font-serif);
  font-size: var(--text-3xl);
  font-weight: 500;
  line-height: var(--leading-tight);
  letter-spacing: -0.01em;
  margin-bottom: var(--space-sm);
}

.section-header p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.section-header p a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Left-aligned section header */
.section-header-left {
  text-align: left;
  max-width: none;
  margin-bottom: var(--space-xl);
}

.section-header-left h2 {
  font-family: var(--font-sans);
  font-size: var(--text-3xl);
  font-weight: 800;
  line-height: var(--leading-tight);
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.section-header-left p {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  max-width: 640px;
}

/* --- Expertise Cards --- */
.expertise {
  background: var(--color-bg);
}

.expertise-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.expertise-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.expertise-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s var(--ease-out);
}

.expertise-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
}

.expertise-card:hover::before {
  transform: scaleX(1);
}

.expertise-card h3 {
  font-family: var(--font-serif);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-sm);
  color: var(--color-text);
}

.expertise-card p {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.expertise-card p + p {
  margin-top: var(--space-sm);
}

.expertise-card a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --- Services Accordion --- */
.services {
  background: var(--color-dark);
  color: #fff;
  position: relative;
}

.services .section-header h2,
.services .section-header p {
  color: #fff;
}

.services .section-header p {
  opacity: 0.7;
}

.services-list {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.services-list details {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.services-list details:first-of-type {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.services-list summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-md) 0;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 700;
  color: #fff;
  list-style: none;
  transition: color 0.3s;
}

.services-list summary::-webkit-details-marker {
  display: none;
}

.services-list summary::marker {
  display: none;
  content: '';
}

.services-list summary:hover {
  color: var(--color-accent-warm);
}

.summary-icon {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  position: relative;
  transition: transform 0.3s var(--ease-out);
}

.summary-icon::before,
.summary-icon::after {
  content: '';
  position: absolute;
  background: currentColor;
  border-radius: 2px;
}

.summary-icon::before {
  width: 16px;
  height: 2px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.summary-icon::after {
  width: 2px;
  height: 16px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  transition: transform 0.3s var(--ease-out), opacity 0.3s;
}

details[open] .summary-icon::after {
  transform: translate(-50%, -50%) rotate(90deg);
  opacity: 0;
}

.service-answer {
  padding: 0 0 var(--space-md);
  font-size: var(--text-base);
  color: rgba(255, 255, 255, 0.7);
  line-height: var(--leading-normal);
  max-width: 640px;
}

.service-answer p + p {
  margin-top: var(--space-sm);
}

.service-answer a {
  color: var(--color-accent-warm);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.service-answer a:hover {
  color: #e0a050;
}

/* --- Events Grid --- */
.events {
  background: var(--color-bg);
}

.events-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
}

.event-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: all 0.4s var(--ease-out);
}

.event-card:hover {
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.06);
  transform: translateY(-4px);
}

.event-card-image {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-md);
  background: var(--color-bg-alt);
  min-height: 120px;
}

.event-card-image img {
  max-height: 60px;
  width: auto;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.event-card-body {
  padding: var(--space-md);
}

.event-card-body a,
.event-card-body span {
  font-size: var(--text-sm);
  font-weight: 600;
  line-height: var(--leading-snug);
  color: var(--color-text);
}

.event-card-body a:hover {
  color: var(--color-accent);
}

/* See More / See All button */
.section-cta {
  text-align: center;
  margin-top: var(--space-xl);
}

/* --- Publications --- */
.publications {
  background: var(--color-bg-alt);
}

.pub-table {
  width: 100%;
}

.pub-table-header {
  display: none;
}

.pub-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-bottom: 1px solid var(--color-border);
}

.pub-cell {
  padding: var(--space-md) 0;
  font-size: var(--text-sm);
  line-height: var(--leading-normal);
}

.pub-cell strong {
  display: block;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
  font-weight: 700;
}

.pub-cell a {
  color: var(--color-text);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: var(--color-border);
  transition: text-decoration-color 0.3s;
}

.pub-cell a:hover {
  text-decoration-color: var(--color-accent);
  color: var(--color-accent);
}

/* --- Media Logos --- */
.media {
  background: var(--color-bg);
}

.media-logo-grid {
  max-width: 960px;
  margin: 0 auto;
  grid-template-rows: auto;
  min-height: auto;
  justify-content: center;
}

.media-logo-grid .logo-cell {
  height: 80px;
  background: #fff;
  border-radius: var(--radius);
  padding: 0.625rem 1.25rem;
}

.media-logo-grid .logo-cell img {
  max-height: 32px;
  max-width: 140px;
}

/* --- Testimonials --- */
.testimonials {
  background: var(--color-bg-alt);
  overflow: hidden;
}

.slider {
  position: relative;
  max-width: 960px;
  margin: 0 auto;
  overflow: hidden;
}

.slider-track {
  display: flex;
  transition: transform 0.5s var(--ease-out);
}

.slider-slide {
  flex: 0 0 100%;
  padding: 0 var(--space-sm);
}

.testimonial-card {
  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: var(--space-lg) var(--space-xl);
  border: 1px solid var(--color-border-light);
}

.testimonial-quote {
  font-family: var(--font-serif);
  font-size: var(--text-lg);
  font-style: italic;
  line-height: var(--leading-normal);
  color: var(--color-text);
  margin-bottom: var(--space-lg);
  position: relative;
}

.testimonial-quote::before {
  content: '\201C';
  position: absolute;
  top: -1.75rem;
  left: -0.25rem;
  font-size: 3.5rem;
  color: var(--color-accent);
  opacity: 0.25;
  font-family: var(--font-serif);
  line-height: 1;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.testimonial-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-border-light);
}

.testimonial-info {
  flex: 1;
}

.testimonial-name-row {
  display: flex;
  align-items: center;
  gap: 0.375rem;
}

.testimonial-name {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
}

.testimonial-role {
  font-size: var(--text-xs);
  color: var(--color-text-secondary);
}

.testimonial-linkedin {
  color: var(--color-text-muted);
  transition: color 0.3s;
  display: flex;
  flex-shrink: 0;
}

.testimonial-linkedin:hover {
  color: #0A66C2;
}

.testimonial-linkedin svg {
  width: 16px;
  height: 16px;
}

.slider-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  margin-top: var(--space-lg);
}

.slider-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid var(--color-border);
  background: var(--color-surface);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s var(--ease-out);
  color: var(--color-text);
}

.slider-btn:hover {
  border-color: var(--color-accent);
  color: var(--color-accent);
}

.slider-btn:disabled {
  opacity: 0.3;
  cursor: default;
}

.slider-btn svg {
  width: 18px;
  height: 18px;
}

.slider-dots {
  display: flex;
  gap: 0.375rem;
}

.slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: all 0.3s var(--ease-out);
}

.slider-dot.active {
  background: var(--color-accent);
  width: 24px;
  border-radius: 4px;
}

/* --- Contact CTA --- */
.contact-cta {
  background: linear-gradient(135deg, var(--color-accent) 0%, #0f3d7a 50%, var(--color-dark) 100%);
  color: #fff;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.contact-cta::before {
  content: '';
  position: absolute;
  top: -30%;
  right: -20%;
  width: 500px;
  height: 500px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.08) 0%, transparent 70%);
  pointer-events: none;
}

.contact-cta::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

.section-eyebrow--light {
  color: rgba(255, 255, 255, 0.6);
}

.contact-cta h2 {
  font-family: var(--font-serif);
  font-size: var(--text-5xl);
  font-weight: 500;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
  position: relative;
}

/* --- Floating Orbs (easter egg) --- */
.cta-orbs {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.cta-orb {
  position: absolute;
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, rgba(255,255,255,0.15), rgba(255,255,255,0.03));
  backdrop-filter: blur(1px);
  pointer-events: none;
  will-change: transform;
  animation: orb-float linear infinite;
}

@keyframes orb-float {
  0%   { transform: translate(0, 0) scale(1); }
  25%  { transform: translate(var(--dx1), var(--dy1)) scale(1.05); }
  50%  { transform: translate(var(--dx2), var(--dy2)) scale(0.95); }
  75%  { transform: translate(var(--dx3), var(--dy3)) scale(1.02); }
  100% { transform: translate(0, 0) scale(1); }
}

.contact-cta p {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-xl);
  opacity: 0.8;
  margin-bottom: var(--space-xl);
  position: relative;
}

.contact-buttons {
  display: flex;
  gap: var(--space-sm);
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

.btn-white {
  background: #fff;
  color: var(--color-accent);
  border-color: #fff;
  font-weight: 700;
}

.btn-white:hover {
  background: rgba(255, 255, 255, 0.9);
  color: var(--color-accent-hover);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.btn-ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}

.btn-ghost:hover {
  border-color: #fff;
  color: #fff;
  transform: translateY(-2px);
}

/* --- About Page --- */
.about-page h1 {
  font-family: var(--font-sans);
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.about-intro {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-xl);
  max-width: 640px;
}

.about-gallery {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-bottom: var(--space-xl);
}

.about-gallery figure {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--color-border-light);
}

.about-gallery img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 4/5;
  object-fit: cover;
}

.about-gallery figcaption {
  padding: var(--space-sm) var(--space-md);
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  background: var(--color-surface);
}

.about-links {
  display: flex;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

@media (max-width: 767px) {
  .about-gallery {
    grid-template-columns: 1fr;
  }

  .about-page h1 {
    font-size: var(--text-3xl);
  }
}

/* --- Media Page --- */
.media-page h1 {
  font-family: var(--font-sans);
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-sm);
}

.media-intro {
  font-size: var(--text-lg);
  color: var(--color-text-secondary);
  margin-bottom: var(--space-lg);
  max-width: 640px;
}

.media-tabs {
  display: flex;
  gap: 0.375rem;
  flex-wrap: wrap;
  margin-bottom: var(--space-xl);
  border-bottom: 1px solid var(--color-border);
  padding-bottom: var(--space-sm);
}

.media-tab {
  padding: 0.5rem 1rem;
  border: none;
  background: none;
  font-family: var(--font-sans);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: 50px;
  transition: all 0.2s;
}

.media-tab:hover {
  color: var(--color-text);
  background: var(--color-bg-alt);
}

.media-tab.active {
  color: #fff;
  background: var(--color-accent);
}

.media-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.media-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  transition: all 0.3s var(--ease-out);
}

.media-card:hover {
  border-color: var(--color-accent);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.05);
  transform: translateY(-2px);
}

.media-card.hidden {
  display: none;
}

.media-card-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-accent);
  background: var(--color-accent-light);
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.625rem;
}

.media-card h3 {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  font-weight: 700;
  line-height: var(--leading-snug);
  margin-bottom: 0.375rem;
}

.media-card h3 a {
  color: var(--color-text);
  text-decoration: none;
}

.media-card h3 a:hover {
  color: var(--color-accent);
}

.media-card p {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

@media (max-width: 767px) {
  .media-page h1 {
    font-size: var(--text-3xl);
  }

  .media-cards {
    grid-template-columns: 1fr;
  }

  .media-tabs {
    gap: 0.25rem;
  }

  .media-tab {
    font-size: var(--text-xs);
    padding: 0.375rem 0.75rem;
  }
}

/* --- Legal Pages --- */
.legal-page {
  max-width: var(--max-width-narrow);
  margin: 0 auto;
}

.legal-page h1 {
  font-family: var(--font-sans);
  font-size: var(--text-4xl);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: var(--space-xs);
}

.legal-updated {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

.legal-page h2 {
  font-family: var(--font-sans);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-top: var(--space-lg);
  margin-bottom: var(--space-sm);
}

.legal-page h3 {
  font-family: var(--font-sans);
  font-size: var(--text-lg);
  font-weight: 600;
  margin-top: var(--space-md);
  margin-bottom: var(--space-xs);
}

.legal-page p,
.legal-page li {
  font-size: var(--text-base);
  color: var(--color-text-secondary);
  line-height: var(--leading-normal);
}

.legal-page p + p {
  margin-top: var(--space-sm);
}

.legal-page ul {
  list-style: disc;
  padding-left: var(--space-md);
  margin: var(--space-sm) 0;
}

.legal-page li + li {
  margin-top: 0.375rem;
}

.cookie-table {
  width: 100%;
  border-collapse: collapse;
  margin: var(--space-sm) 0;
  font-size: var(--text-sm);
}

.cookie-table th,
.cookie-table td {
  text-align: left;
  padding: 0.75rem;
  border-bottom: 1px solid var(--color-border);
}

.cookie-table th {
  font-weight: 700;
  color: var(--color-text);
}

.cookie-table td {
  color: var(--color-text-secondary);
}

/* --- Footer --- */
.footer {
  background: var(--color-dark);
  color: rgba(255, 255, 255, 0.5);
  padding: var(--space-lg) 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  text-align: center;
}

.footer-legal {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: var(--text-sm);
}

.footer-legal a {
  color: rgba(255, 255, 255, 0.5);
  transition: color 0.3s;
}

.footer-legal a:hover {
  color: #fff;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
}

.footer-social a {
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.3s;
}

.footer-social a:hover {
  color: #fff;
}

.footer-social svg {
  width: 22px;
  height: 22px;
}

/* ============================================
   RESPONSIVE — Tablet (768px)
   ============================================ */
@media (min-width: 768px) {
  .hero h1 {
    font-size: var(--text-4xl);
  }

  .expertise-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .events-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .pub-table-header {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--color-text);
    margin-bottom: 0;
  }

  .pub-table-header h3 {
    font-family: var(--font-serif);
    font-size: var(--text-lg);
    font-weight: 700;
  }

  .pub-row {
    grid-template-columns: 1fr 1fr;
    gap: var(--space-lg);
  }

  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
  }
}

/* ============================================
   RESPONSIVE — Desktop (1024px)
   ============================================ */
@media (min-width: 1024px) {
  .nav-links {
    display: flex;
  }

  .nav-toggle {
    display: none;
  }

  .hero-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero h1 {
    font-size: var(--text-5xl);
  }

  .events-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .logo-cell {
    height: 52px;
  }

  .section-header h2,
  .section-header-left h2 {
    font-size: var(--text-4xl);
  }
}

/* ============================================
   RESPONSIVE — Mobile overrides
   ============================================ */
@media (max-width: 1023px) {
  .nav-links {
    display: flex;
    position: fixed;
    top: 0;
    right: -100%;
    width: 280px;
    height: 100vh;
    background: var(--color-surface);
    flex-direction: column;
    padding: 5rem var(--space-lg) var(--space-lg);
    gap: var(--space-md);
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0.1);
    transition: right 0.4s var(--ease-out);
    z-index: 55;
  }

  .nav-links.open {
    right: 0;
  }

  .nav-toggle {
    display: flex;
  }
}

@media (max-width: 767px) {
  :root {
    --space-2xl: 4rem;
    --space-3xl: 5rem;
  }

  .hero h1 {
    font-size: var(--text-3xl);
  }

  .hero-image img {
    max-width: 320px;
  }

  .logo-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-sm);
  }

  .logo-cell {
    height: 36px;
  }

  .section-header h2,
  .section-header-left h2 {
    font-size: var(--text-2xl);
  }

  .contact-cta h2 {
    font-size: var(--text-3xl);
  }

  .media-logos {
    gap: var(--space-lg);
  }

  .media-logos img {
    height: 28px;
  }

  .logo-name {
    font-size: 1.3rem;
  }

  .logo-tagline {
    font-size: 0.62rem;
  }
}

/* Mobile nav overlay */
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.3);
  z-index: 52;
  opacity: 0;
  transition: opacity 0.3s;
}

.nav-overlay.active {
  display: block;
  opacity: 1;
}
