/* ============================================================
   Potato Hub — Design System
   style.css — Single CSS file (Decision D-02)
   Plans C–F append their component CSS below the foundation.
   ============================================================ */


/* ============================================================
   SECTION 1 — :root — Design Tokens
   All hex color values live ONLY in this block.
   No hex colors anywhere else in the file.
   ============================================================ */

:root {
  /* --- Colors (Potato Hub 2026 palette) --- */
  --color-bg-base: #FAF7F2;       /* milky white */
  --color-bg-surface: #FFFFFF;
  --color-bg-elevated: #F0EBE1;
  --color-text-primary: #1a1a1a;
  --color-text-secondary: #666666; /* exact user-provided gray */
  --color-accent: #ffaa11;         /* exact user-provided amber */
  --color-error: #c0392b;

  /* --- Brand green (new — primary anchor color for dark sections/footer) --- */
  --color-brand-green: #104d36;    /* exact user-provided green */
  --color-brand-green-elevated: #0d3d2b;
  --color-brand-green-bright: #4caf7d; /* lighter green, readable on dark hero video bg */

  /* --- Color variants (opacity) --- */
  --color-bg-surface-translucent: rgba(250, 247, 242, 0.95); /* nav scrolled bg */
  --color-accent-border: rgba(255, 170, 17, 0.25); /* nav scrolled border */

  /* --- Partner-panel accents — brand green/amber at higher opacity for contrast
     against the light section background (was an unrelated 6-color rainbow) --- */
  --color-accent-dark: #8a5a12;        /* darker amber, readable as a border on light bg */
  --color-panel-green-accent: rgba(16, 77, 54, 0.32);
  --color-panel-amber-accent: rgba(138, 90, 18, 0.28);

  /* --- Section background variety (branch: section-colors) — tints/shades of the
     three brand colors so no two consecutive sections read as the same flat color.
     --color-text-dark-fixed is a stable dark reference that is NOT redeclared inside
     any section override, for small light-chip components (e.g. an active filter
     pill) that must stay dark-on-light even inside a section themed light-on-dark. */
  --color-text-dark-fixed: #1a1a1a;
  --color-text-on-dark: #ffffff;
  --color-text-on-dark-secondary: rgba(255, 255, 255, 0.78);

  --color-goals-bg-start: #fff6e7;      /* pale amber tint */
  --color-goals-bg-end: #fce7be;
  --color-speakers-bg-start: #34413b;   /* dark gray-green blend */
  --color-speakers-bg-end: #1b2420;
  --color-services-bg-start: #ededeb;   /* pale neutral gray tint */
  --color-services-bg-end: #e2e1dd;
  --color-organizers-bg-start: #ffffff;
  --color-organizers-bg-end: #fbf4e7;   /* barely-there amber warmth */
  --color-contact-bg-start: #fff3dc;    /* amber↔green closing gradient */
  --color-contact-bg-end: #e3f1e9;

  /* --- Motion --- */
  --duration-fast:  150ms;
  --duration-base:  250ms;
  --duration-slow:  700ms;
  --ease-out:       cubic-bezier(0.25, 0, 0, 1);
  --ease-in-out:    cubic-bezier(0.4, 0, 0.2, 1);

  /* --- Spacing (4-point grid) --- */
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;
}


/* ============================================================
   SECTION 2 — Base Reset
   ============================================================ */

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-block-start: 56px; /* mobile nav height — prevents sections scrolling behind fixed nav */
}

@media (min-width: 1024px) {
  html {
    scroll-padding-block-start: 64px; /* desktop nav height */
  }
}

body {
  font-family: 'Readex Pro', sans-serif;
  background-color: var(--color-bg-base);
  color: var(--color-text-primary);
  line-height: 1.5;
  min-block-size: 100dvh;
  -webkit-font-smoothing: antialiased;
}

ul[role="list"] {
  list-style: none;
}

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

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

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


/* ============================================================
   SECTION 3 — Skip Navigation
   Off-screen positioning — visible on keyboard focus only.
   NEVER use display:none — it removes the element from the
   focus order entirely (WCAG 2.4.1, Pattern 7 in RESEARCH.md).
   ============================================================ */

.skip-nav {
  position: absolute;
  inset-block-start: -999px; /* never: top: -999px */
  inset-inline-start: 0;     /* logical property — RTL-safe */
  z-index: 9999;
  padding-block: var(--space-sm);
  padding-inline: var(--space-md);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}

.skip-nav:focus {
  inset-block-start: 0; /* slides into view on focus */
}


/* ============================================================
   SECTION 4 — Typography Helpers
   Scoped only to English — Arabic connected script (CLAUDE.md rule).
   ============================================================ */

/* Scoped to :lang(en) only — do not apply globally */
:lang(en) .nav-link {
  letter-spacing: 0.08em;
}


/* ============================================================
   SECTION 5 — Focus Ring
   Global focus-visible rule using accent color token.
   ============================================================ */

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


/* ============================================================
   SECTION 6 — Component CSS Placeholders
   Plans C–F append their CSS here in later Phase 1 plans.
   ============================================================ */

/* === NAV === (Plan C) */

.nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 900;
  block-size: 56px;                /* mobile default */
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: var(--space-md); /* 16px mobile */
  background: transparent;
  border-block-end: 1px solid transparent;
  transition:
    background-color var(--duration-base) var(--ease-out),
    -webkit-backdrop-filter var(--duration-base) var(--ease-out),
    backdrop-filter var(--duration-base) var(--ease-out),
    border-color var(--duration-base) var(--ease-out);
}

.nav--scrolled {
  background: var(--color-bg-surface-translucent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-block-end-color: var(--color-accent-border);
}

.nav__logo {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
  flex-shrink: 0;
  /* Hidden until scrolled — the hero now has its own centered logo, so
     showing this one too at the top of the page duplicated it. */
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}

.nav--scrolled .nav__logo {
  opacity: 1;
  pointer-events: auto;
}

/* Recovered — logo image inside .nav__logo (restoration, see style.css history) */
.nav__logo-img {
  height: 36px;
  width: auto;
  display: block;
  filter: brightness(0) invert(1);
  transition: filter var(--duration-base) var(--ease-out);
}

/* Nav sits transparent over the hero video until scrolled, so the logo
   and links need light color there; .nav--scrolled restores dark/secondary
   colors once a light backdrop is behind the nav. */
.nav--scrolled .nav__logo-img {
  filter: none;
}

.nav__links {
  display: none;
  align-items: center;
  gap: var(--space-lg);  /* 24px */
  list-style: none;
}

.nav__controls {
  display: flex;
  align-items: center;
  gap: var(--space-sm);  /* 8px */
}

.nav-link {
  font-size: 14px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.5);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.nav-link:hover,
.nav-link--active {
  color: #ffffff;
}

.nav--scrolled .nav-link {
  color: var(--color-text-secondary);
  text-shadow: none;
}

.nav--scrolled .nav-link:hover,
.nav--scrolled .nav-link--active {
  color: var(--color-text-primary);
}

/* letter-spacing already scoped in Plan B: :lang(en) .nav-link { letter-spacing: 0.08em; } */

/* >= 1024px: show desktop nav links, hide hamburger */
@media (min-width: 1024px) {
  .nav {
    block-size: 64px;
    padding-inline: var(--space-xl);  /* 32px */
  }

  .nav__links {
    display: flex;
  }
}

/* === PILL TOGGLE === (Plan D) */

.pill-toggle {
  position: relative;
  display: flex;
  align-items: center;
  inline-size: 72px;
  block-size: 32px;
  border-radius: 16px;
  background: var(--color-bg-elevated);
  padding: 4px;
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: outline var(--duration-fast) var(--ease-out);
}

.pill-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.pill-indicator {
  position: absolute;
  inset-block-start: 4px;
  inset-inline-start: 4px;
  inline-size: 32px;
  block-size: 24px;
  border-radius: 12px;
  background: var(--color-accent);
  transform: translateX(var(--pill-offset, 0px));
  transition: transform var(--duration-base) var(--ease-out);
  pointer-events: none;
}

.pill-toggle__label {
  position: relative;
  z-index: 1;
  flex: 1;
  text-align: center;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
  pointer-events: none;
  user-select: none;
}

html[lang="ar"] .pill-toggle__label--ar,
html[lang="en"] .pill-toggle__label--en {
  color: var(--color-bg-base); /* dark text on silver indicator */
}

.pill-toggle:hover .pill-toggle__label {
  color: var(--color-text-primary);
}

html[lang="ar"] .pill-toggle:hover .pill-toggle__label--ar,
html[lang="en"] .pill-toggle:hover .pill-toggle__label--en {
  color: var(--color-bg-base); /* keep active label dark even on hover */
}

@media (prefers-reduced-motion: reduce) {
  .pill-indicator { transition-duration: 0ms; }
}

/* === MOBILE OVERLAY === (Plan E) */

/* --- Hamburger button base --- */
.hamburger {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: center;
  inline-size: 44px;
  block-size: 44px;
  padding-block: 13px;  /* (44 - 18) / 2 — centers bars vertically in hit area */
  cursor: pointer;
  background: none;
  border: none;
  flex-shrink: 0;
}

.hamburger:hover {
  opacity: 0.75;
}

/* --- Hamburger bars --- */
.hamburger__bar {
  display: block;
  inline-size: 24px;
  block-size: 2px;
  border-radius: 1px;
  /* White while the nav sits transparent over the dark hero video;
     .nav--scrolled restores the dark color once a light backdrop is
     behind the nav — same pattern as .nav__logo-img / .nav-link above. */
  background: #ffffff;
  transition:
    transform var(--duration-base) var(--ease-in-out),
    opacity var(--duration-base) var(--ease-in-out),
    background-color var(--duration-base) var(--ease-out);
}

.nav--scrolled .hamburger__bar {
  background: var(--color-text-primary);
}

/* The bars stay white to read against the transparent/dark hero nav, but the
   mobile overlay they open into is white — so the morphed "X" close icon
   was invisible until the page had also been scrolled past .nav--scrolled.
   Force it dark whenever the overlay is open, regardless of scroll state. */
.hamburger[data-open="true"] .hamburger__bar {
  background: var(--color-text-primary);
}

/* --- Hamburger → X morph (JS sets [data-open="true"] on the button) --- */
[data-open="true"] .hamburger__bar:nth-child(1) {
  transform: translateY(9px) rotate(45deg);
}

[data-open="true"] .hamburger__bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

[data-open="true"] .hamburger__bar:nth-child(3) {
  transform: translateY(-9px) rotate(-45deg);
}

/* --- Mobile overlay base (closed state) --- */
.overlay {
  position: fixed;
  inset: 0;
  block-size: 100dvh;
  inline-size: 100%;
  background: var(--color-bg-surface);
  z-index: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-xl);       /* 32px between children */
  padding-block: var(--space-2xl);
  overflow-y: auto;
  clip-path: circle(0% at var(--clip-origin, 100% 0%));
  transition: clip-path var(--duration-slow) var(--ease-out);
  /* Hidden by default via clip-path; no display:none so transitions work */
  pointer-events: none;
}

/* --- Mobile overlay open state --- */
.overlay--open {
  clip-path: circle(150% at var(--clip-origin, 100% 0%));
  pointer-events: auto;
}

/* --- Overlay nav links list --- */
.overlay__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-xl);       /* 32px */
  list-style: none;
}

/* --- Overlay nav link anchors --- */
.overlay-link {
  font-size: 28px;
  font-weight: 500;
  color: var(--color-text-primary);
  text-decoration: none;
  transition: color var(--duration-fast) var(--ease-out);
}

.overlay-link:hover {
  color: var(--color-accent);
}

/* --- Tighter type/spacing on short or narrow phones — 9 links at 28px with
   32-48px gaps can force scrolling on small viewports before this. --- */
@media (max-width: 480px), (max-height: 700px) {
  .overlay {
    gap: var(--space-lg);       /* 24px between children */
    padding-block: var(--space-xl);
  }

  .overlay__links {
    gap: var(--space-md);       /* 16px */
  }

  .overlay-link {
    font-size: 21px;
  }
}

/* --- Hide overlay and hamburger on desktop --- */
/* These rules must live after the base .hamburger { display: flex } rule (line ~308)
   so the media query wins the cascade. */
@media (min-width: 1024px) {
  .overlay {
    display: none;
  }

  .hamburger {
    display: none;
  }
}

/* --- prefers-reduced-motion overlay fallback --- */
/* Note: this block is overridden by the global transition-duration: 0.01ms !important
   reset in Section 8 — the overlay will appear/disappear instantly via opacity,
   which is the correct reduced-motion behavior (instant, not animated). */
@media (prefers-reduced-motion: reduce) {
  .overlay {
    clip-path: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--duration-fast), visibility var(--duration-fast);
  }

  .overlay--open {
    opacity: 1;
    visibility: visible;
  }
}

/* === DOT-NAV === (Plan F) */

/* --- Dot-nav container: fixed, vertically centered, hidden on mobile --- */
.dot-nav {
  position: fixed;
  inset-block-start: 50%;
  inset-inline-end: var(--space-lg); /* 24px — logical: physical right in LTR, physical left in RTL */
  transform: translateY(-50%);
  z-index: 100;
  display: none; /* hidden on mobile; revealed at >= 1024px via media query */
}

.dot-nav ul {
  display: flex;
  flex-direction: column;
  gap: var(--space-sm); /* 8px between dots */
  list-style: none;
}

/* --- Dot button base (inactive state) --- */
.dot-nav__dot {
  display: block;
  inline-size: 6px;
  block-size: 6px;
  border-radius: 50%;
  background: var(--color-text-secondary);
  opacity: 0.4;
  border: none;
  cursor: pointer;
  padding: 0;
  transition:
    inline-size var(--duration-base) var(--ease-out),
    block-size var(--duration-base) var(--ease-out),
    background-color var(--duration-base) var(--ease-out),
    opacity var(--duration-base) var(--ease-out);
}

/* --- Dot hover state --- */
.dot-nav__dot:hover {
  inline-size: 8px;
  block-size: 8px;
  background: var(--color-text-primary);
  opacity: 0.8;
}

/* --- Dot active state (set by IntersectionObserver in script.js) --- */
.dot-nav__dot--active {
  inline-size: 8px;
  block-size: 8px;
  background: var(--color-accent);
  opacity: 1;
}

/* --- Dot focus-visible state --- */
.dot-nav__dot:focus-visible {
  inline-size: 8px;
  block-size: 8px;
  background: var(--color-accent);
  opacity: 1;
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

/* --- Desktop only: show dot-nav at >= 1024px --- */
@media (min-width: 1024px) {
  .dot-nav {
    display: block;
  }
}

/* --- Reduced motion: disable dot transitions --- */
@media (prefers-reduced-motion: reduce) {
  .dot-nav__dot {
    transition-duration: 0ms;
  }
}


/* ============================================================
   SECTION 7 — Section Stubs
   Full-viewport placeholder blocks for each section.
   Each stub is replaced by real content in Phase 2.
   Labels: English-only, no data-i18n — removed in Phase 2.
   ============================================================ */

.section-stub {
  min-block-size: 100vh; /* logical equivalent of min-height */
  min-height: 100vh;     /* fallback for browsers without min-block-size */
  display: flex;
  align-items: center;
  justify-content: center;
}

.section-stub__label {
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  color: var(--color-text-secondary);
  opacity: 0.5;
  text-transform: uppercase; /* ASCII section names only — no Arabic in stubs */
  user-select: none;
}

/* Alternate stub backgrounds for visual development clarity
   Even sections (#about, #services, #contact) get --color-bg-surface;
   odd sections inherit --color-bg-base from body. */
.section-stub:nth-child(even) {
  background-color: var(--color-bg-surface);
}


/* === HERO SECTION === (Plan B) */

.section-hero {
  position: relative;
  min-block-size: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: var(--color-bg-base);
}

.section-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(10,10,10,0.5) 0%, rgba(10,10,10,0.68) 55%, rgba(10,10,10,0.8) 100%);
  z-index: 2;
  pointer-events: none;
}

.hero-bg-img {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center;
  z-index: 0;
}

.hero-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(600px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(192,192,192,0.06), transparent 70%);
}

.hero-content {
  position: relative;
  z-index: 4;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  padding-inline: var(--space-lg);
}

/* Shown in its true brand colors (unlike .nav__logo-img, which is forced
   white) — a drop-shadow keeps it legible over the video regardless of
   what's playing behind it. */
.hero-logo {
  height: clamp(88px, 13vw, 120px);
  width: auto;
  margin-block-end: var(--space-xs);
  filter: drop-shadow(0 2px 14px rgba(0, 0, 0, 0.55));
}

.hero-headline {
  font-size: clamp(22px, 4.5vw, 40px);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
  margin: 0;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.55), 0 1px 4px rgba(0, 0, 0, 0.4);
}

.hero-headline__accent {
  color: var(--color-brand-green);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.75), 0 1px 4px rgba(0, 0, 0, 0.65);
}

.hero-edition {
  font-size: clamp(20px, 4vw, 36px);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-accent);
  margin: 0;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

.hero-subheadline {
  font-size: clamp(17px, 2.6vw, 22px);
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.5;
  margin: 0;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5);
}

.hero-subheadline__accent {
  font-weight: 800;
}

.hero-subheadline__accent--agri {
  color: var(--color-brand-green);
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.5), 0 0 6px rgba(0, 0, 0, 0.6);
}

.hero-subheadline__accent--industry {
  color: var(--color-accent);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: 12px;
  padding-inline: 32px;
  border: 1px solid var(--color-accent);
  border-radius: 2px;
  min-inline-size: 160px;
  min-block-size: 44px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  text-decoration: none;
  background: transparent;
  margin-block-start: var(--space-sm);
  transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

.hero-cta:hover {
  background: rgba(192,192,192,0.08);
  border-color: var(--color-text-primary);
}

/* Contact Us button sits directly on the hero video (not the solid-amber
   agenda button), so it needs light text/border for contrast there. */
.section-hero .hero-cta:not(.hero-cta--agenda) {
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.75);
}

.section-hero .hero-cta:not(.hero-cta--agenda):hover {
  background: rgba(255, 255, 255, 0.12);
  border-color: #ffffff;
}

/* Override the generic transparent hover for the agenda button — it must
   stay solid so dark text on it keeps contrast, unlike the outline buttons. */
.hero-cta--agenda:hover {
  background: var(--color-brand-green);
  border-color: var(--color-brand-green);
  color: #ffffff;
}

.hero-cta:active {
  background: rgba(192,192,192,0.15);
}

.hero-cta:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.scroll-indicator {
  position: absolute;
  inset-block-end: var(--space-xl);
  inset-inline: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  z-index: 4;
  pointer-events: none;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.scroll-indicator--hidden {
  opacity: 0;
}

.scroll-indicator__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--color-text-secondary);
  line-height: 1;
}

:lang(en) .scroll-indicator__label {
  letter-spacing: 0.08em;
}

.scroll-indicator__line {
  display: block;
  inline-size: 1px;
  block-size: 40px;
  background: var(--color-accent);
  animation: scrollIndicatorPulse 1.5s ease-in-out infinite;
}

.scroll-indicator__chevron {
  display: block;
  inline-size: 10px;
  block-size: 10px;
  /* Physical properties intentional — chevron must point ↓ in both LTR and RTL.
     border-inline-end would flip to border-left in RTL, making it point sideways. */
  border-bottom: 1.5px solid var(--color-accent);
  border-right: 1.5px solid var(--color-accent);
  transform: rotate(45deg);
  animation: scrollIndicatorPulse 1.5s ease-in-out infinite;
  animation-delay: 0.75s; /* offset from line so they alternate */
}

@keyframes scrollIndicatorPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-headline,
  .hero-subheadline,
  .hero-cta {
    opacity: 1;
    transform: none;
  }
  .scroll-indicator__chevron {
    animation: none;
  }
  .scroll-indicator__line {
    animation: none;
  }
}


/* === ABOUT SECTION === (Plan C) */

.section-about {
  position: relative;
  overflow: hidden;
  background-color: var(--color-brand-green);
}

.about-banner {
  position: absolute;
  inset: 0;
  background-image: url('images/banner.png');
  background-size: cover;
  background-position: center 35%;
}

.about-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(9, 33, 24, 0.82) 0%, rgba(9, 33, 24, 0.9) 100%);
}

.about-banner,
.about-overlay {
  z-index: 0;
}

.about-grid,
.about-stats {
  position: relative;
  z-index: 1;
}

.section-about .section-label {
  color: rgba(255, 255, 255, 0.75);
}

.section-about .about-headline {
  color: #ffffff;
}

.section-about .about-body {
  color: rgba(255, 255, 255, 0.82);
}

.section-about .about-stat__label {
  color: rgba(255, 255, 255, 0.7);
}


/* === ROYAL ENDORSEMENT SECTION === (now nested inside .section-about, sharing its banner) */

.endorsement-block {
  position: relative;
  z-index: 1;
  padding-block-start: var(--space-3xl);
  padding-block-end: var(--space-2xl);
}

.endorsement-inner {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: var(--space-2xl);
  align-items: center;
  max-inline-size: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-3xl);
}

.endorsement-photo-col {
  position: relative;
}

.endorsement-photo-col::before {
  content: '';
  position: absolute;
  inset-block-start: var(--space-lg);
  inset-inline-start: var(--space-lg);
  inline-size: 100%;
  block-size: 100%;
  background: var(--color-accent);
  border-radius: 4px;
  z-index: 0;
}

.endorsement-photo {
  position: relative;
  z-index: 1;
  display: block;
  inline-size: 100%;
  block-size: auto;
  border-radius: 4px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
}

.endorsement-text-col {
  position: relative;
}

.endorsement-quote {
  position: relative;
  font-size: clamp(19px, 2.4vw, 24px);
  font-weight: 500;
  font-style: italic;
  line-height: 1.7;
  color: #ffffff;
  margin: 0 0 var(--space-xl);
}

.endorsement-quote::before {
  content: '\201C';
  position: absolute;
  inset-inline-start: calc(-1 * var(--space-lg));
  inset-block-start: -0.3em;
  color: var(--color-accent);
  font-style: normal;
  font-size: 3em;
  font-weight: 700;
  line-height: 1;
  opacity: 0.5;
}

/* Only the glyph itself needs to differ by direction (opening vs. closing
   quote mark look) — inset-inline-start already resolves to the correct
   physical side per direction on its own; overriding the position too
   (as an earlier version of this rule did) zeroed out the logical
   padding below and let the RTL text run to the container edge. */
[dir="rtl"] .endorsement-quote::before {
  content: '\201D';
}

.endorsement-quote {
  padding-inline-start: var(--space-lg);
}

.endorsement-name {
  font-size: 19px;
  font-weight: 700;
  color: var(--color-accent);
  margin: 0;
  padding-inline-start: var(--space-lg);
}

.endorsement-title {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.75);
  margin: var(--space-xs) 0 0;
  padding-inline-start: var(--space-lg);
}

@media (max-width: 767px) {
  .endorsement-inner {
    grid-template-columns: 1fr;
    padding-inline: var(--space-lg);
    gap: var(--space-xl);
  }

  .endorsement-photo-col {
    max-inline-size: 260px;
    margin-inline: auto;
  }

  .endorsement-photo-col::before {
    inset-block-start: var(--space-md);
    inset-inline-start: var(--space-md);
  }

  /* clamp()'s 19px floor never actually shrank further on phones. */
  .endorsement-quote {
    font-size: 16px;
  }
}

.about-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  padding-block: var(--space-2xl);
  padding-inline: var(--space-3xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

.about-grid > * {
  /* Grid items default to min-width: auto, which for replaced elements
     (the video) resolves to its intrinsic size and blows out the grid
     track on narrow viewports. */
  min-inline-size: 0;
}

.about-text {
  transition-duration: 1100ms;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.section-label {
  display: none;
}

:lang(en) .section-label {
  letter-spacing: 0.08em;
}

.about-headline {
  font-size: clamp(24px, 5vw, 64px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-block-end: var(--space-md);
  margin-block-start: 0;
}

/* Recovered — portfolio section headline (restoration, see style.css history) */
.portfolio-headline {
  font-size: clamp(24px, 5vw, 64px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-block-end: var(--space-md);
  margin-block-start: 0;
}

.about-body {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.7;
  margin-block-end: var(--space-md);
}

.about-body:last-of-type {
  margin-block-end: 0;
}

.about-video-col {
  transition-duration: 1100ms;
  display: flex;
  align-items: stretch;
  align-self: start;
  block-size: 415px;
  border-radius: 4px;
  overflow: hidden;
  /* background-color: var(--color-bg-elevated); */
}

.about-video {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
  border-radius: 9px;
}

@media (max-width: 767px) {
  .about-grid {
    grid-template-columns: 1fr;
    padding-inline: var(--space-lg);
  }

  .about-video-col {
    block-size: auto;
    aspect-ratio: 16 / 9;
    min-block-size: unset;
  }
}

/* === CLIENTS SECTION === */

@keyframes clients-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.section-clients {
  background: linear-gradient(180deg, var(--color-organizers-bg-start) 0%, var(--color-organizers-bg-end) 100%);
  padding-block: var(--space-2xl);
  overflow: hidden;
}

.clients-header {
  padding-inline: var(--space-3xl);
  margin-block-end: var(--space-xl);
  text-align: start;
  max-inline-size: 1200px;
  margin-inline: auto;
}

.clients-heading {
  font-size: clamp(24px, 5vw, 64px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin: 0;
}

/* Recovered — clients + contact section headlines (restoration, see style.css history) */
.clients-headline,
.contact-headline {
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin: 0;
}

.clients-tagline {
  font-size: clamp(1rem, 2vw, 1.125rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-inline-size: 65ch;
  margin-block-start: var(--space-md);
}

.clients-marquee {
  overflow-x: hidden;
  /* Physical property intentional — locks marquee to LTR layout so translateX(-50%) loop
     is unaffected when dir="rtl" is set on <html>. Logical props inside still resolve LTR. */
  direction: ltr;
}

.clients-row {
  block-size: 80px;
  display: flex;
  align-items: center;
  margin-block-end: var(--space-md);
}

.clients-row:last-child {
  margin-block-end: 0;
}

.clients-track {
  display: flex;
  white-space: nowrap;
  gap: var(--space-2xl);
  align-items: center;
  animation: clients-scroll 40s linear infinite;
  will-change: transform;
}

.clients-row--rev .clients-track {
  animation-direction: reverse;
}

.clients-track img {
  block-size: 48px;
  inline-size: auto;
  object-fit: contain;
  filter: grayscale(100%);
  flex-shrink: 0;
}

@media (hover: hover) and (pointer: fine) {
  .clients-track img {
    transition: filter 400ms ease;
  }

  .clients-track img:hover {
    filter: grayscale(0%);
  }

  .clients-marquee:hover .clients-track {
    animation-play-state: paused;
  }
}

@media (max-width: 767px) {
  .clients-header {
    padding-inline: var(--space-xl);
  }
}

@media (prefers-reduced-motion: reduce) {
  .clients-track {
    animation-play-state: paused;
  }
}

.organizers-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-3xl);
  padding-inline: var(--space-3xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

.organizers-row img {
  block-size: 120px;
  inline-size: auto;
  max-inline-size: 260px;
  object-fit: contain;
}

@media (max-width: 767px) {
  .organizers-row {
    gap: var(--space-xl);
    padding-inline: var(--space-lg);
  }

  .organizers-row img {
    block-size: 84px;
  }
}


/* === VISION & MISSION SECTION === (Plan D) */

.section-vision {
  background: linear-gradient(160deg, var(--color-brand-green) 0%, var(--color-brand-green-elevated) 100%);
  /* Re-theme every descendant that reads these tokens (headline, pillar labels,
     the alternating pillar-node accent dots/icons, the timeline spine) so the
     section restyles as a unit instead of needing per-component overrides. */
  --color-text-primary: var(--color-text-on-dark);
  --color-text-secondary: var(--color-text-on-dark-secondary);
  --color-brand-green: var(--color-brand-green-bright);
  --color-accent-border: rgba(255, 255, 255, 0.3);
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  min-block-size: 80vh;
}

.section-vision--single {
  display: block;
  min-block-size: 0;
  padding-block: var(--space-3xl) var(--space-2xl);
}

.vision-half {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--space-2xl);
  padding-inline: var(--space-3xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

.section-vision--single .vision-half {
  padding-block: 0;
}

/* .vision-half--vision / .vision-half--mission no longer carry their own
   background — the section now renders a single .vision-half--vision half
   (see index.html #vision), so a distinct per-half background just left a
   mismatched box behind the heading instead of blending with .section-vision. */

.vision-divider {
  background: var(--color-accent);
  align-self: stretch;
  margin-block: var(--space-2xl);
}

.vision-headline {
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-block-end: var(--space-md);
  margin-block-start: 0;
}

@media (max-width: 767px) {
  .section-vision {
    grid-template-columns: 1fr;
  }
  .vision-divider {
    display: none;
  }
  .vision-half--mission {
    border-block-start: 1px solid var(--color-accent);
  }
  .vision-half {
    padding-inline: var(--space-lg);
  }
}


/* === VALUES / THEMES SECTION === */

.section-values {
  /* Reuses the neutral gray tint from .section-services — sits between the
     amber Goals section and the dark Speakers section, so it needed to be
     distinct from both rather than the green tint (too close to Vision/Speakers). */
  background: linear-gradient(180deg, var(--color-services-bg-start) 0%, var(--color-services-bg-end) 100%);
  padding-block: var(--space-3xl);
}

.values-header {
  padding-inline: var(--space-3xl);
  margin-block-end: var(--space-2xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

.values-headline {
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-block-start: 0;
  margin-block-end: 0;
}

.values-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-md);
  padding-inline: var(--space-3xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

.values-card {
  background-color: var(--color-bg-elevated);
  border-radius: 4px;
  padding: var(--space-lg);
  border-block-start: 3px solid var(--card-accent, var(--color-accent));
}

.values-card__top {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.values-card__icon {
  font-size: 32px;
  color: var(--card-accent, var(--color-accent));
  flex-shrink: 0;
}

.values-card__label {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
}

.values-card__desc {
  font-size: 15px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin-block-start: var(--space-sm);
  margin-block-end: 0;
}

@media (min-width: 600px) {
  .values-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 900px) {
  .values-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 767px) {
  .values-header,
  .values-grid {
    padding-inline: var(--space-lg);
  }
}


/* === PILLARS TIMELINE (Vision 2030 pillars — lives inside .section-vision--single) === */

.pillars-timeline {
  position: relative;
  display: grid;
  /* 6 nodes but only 3 logical columns — each column pairs an --above
     and a --below node via explicit grid-row, so this must be 3, not 6,
     or the real content only ever occupies the left half of the grid. */
  grid-template-columns: repeat(3, 1fr);
  align-items: stretch;
  gap: var(--space-md);
  padding-inline: var(--space-3xl);
  padding-block: var(--space-2xl) var(--space-lg);
  max-inline-size: 1200px;
  margin-inline: auto;
}

/* Was previously declared in an earlier @media(max-width:767px) block, but
   that block sat BEFORE this unconditional rule in source order — same
   specificity, so the unconditional padding-inline: var(--space-3xl) above
   always won the cascade and the section never actually narrowed its side
   padding on mobile widths. Redeclaring it after the base rule fixes that. */
@media (max-width: 767px) {
  .pillars-timeline {
    padding-inline: var(--space-lg);
  }
}

.pillars-timeline__spine {
  position: absolute;
  inset-inline: var(--space-3xl);
  block-size: 2px;
  background: var(--color-accent-border);
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
}

/* Decorative potato-plant watermark — PNG line art used as a mask so it
   can be tinted with any brand color via background-color, rather than
   fighting the raster PNG's baked-in black stroke with filters. */
.pillars-timeline__illustration {
  /* Disabled per feedback — user isn't happy with the current look,
     may revisit with a different asset/treatment later. Keeping the
     rest of the rule intact so it's a one-line flip to bring back. */
  display: none;
  position: absolute;
  /* inset-inline-start:50% + transform:translateX(-50%) is NOT direction-
     symmetric — the inset anchors from the trailing edge in RTL, so the
     translate double-shifts it off-center. inset-inline:0 + margin-inline:
     auto centers a fixed-width absolutely-positioned box correctly in
     both directions. */
  inset-inline: 0;
  margin-inline: auto;
  inline-size: 480px;
  max-inline-size: 70%;
  /* Source art (pillars-potato-plant.png) is 501x1023 with its soil line
     sitting at 47.2% down from the top. aspect-ratio keeps the mask at
     the right proportions as inline-size responds to max-inline-size,
     and top is -(0.472 * rendered height) so that soil line lands
     exactly on the section's top edge — roots/tubers read as "underground"
     filling the section, stem/leaves poke up above it into the Vision
     text area (not clipped there — overflow:hidden lives on #vision, not
     on this element's containing block). */
  aspect-ratio: 501 / 1023;
  top: -462.6px;
  background-color: var(--color-brand-green);
  opacity: 0.22;
  -webkit-mask-image: url('images/pillars-potato-plant.png');
  mask-image: url('images/pillars-potato-plant.png');
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-position: top center;
  mask-position: top center;
  -webkit-mask-size: contain;
  mask-size: contain;
  pointer-events: none;
  z-index: 0;
}

@media (max-width: 599px) {
  .pillars-timeline__illustration {
    display: none;
  }
}

.pillar-node {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  z-index: 1;
}

.pillar-node--above {
  grid-row: 1;
  align-self: end;
  padding-block-end: var(--space-xl);
}

.pillar-node--below {
  grid-row: 2;
  align-self: start;
  padding-block-start: var(--space-xl);
}

.pillar-node--above::after,
.pillar-node--below::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  margin-inline: auto;
  inline-size: 2px;
  block-size: var(--space-xl);
  background: var(--node-accent, var(--color-accent));
}

.pillar-node--above::after {
  bottom: calc(-1 * var(--space-xl));
}

.pillar-node--below::after {
  top: calc(-1 * var(--space-xl));
}

.pillar-node__dot {
  position: absolute;
  inset-inline: 0;
  margin-inline: auto;
  inline-size: 12px;
  block-size: 12px;
  border-radius: 50%;
  background: var(--node-accent, var(--color-accent));
  border: 3px solid var(--color-bg-base);
  z-index: 2;
}

.pillar-node--above .pillar-node__dot {
  bottom: calc(-1 * var(--space-xl) - 6px);
}

.pillar-node--below .pillar-node__dot {
  top: calc(-1 * var(--space-xl) - 6px);
}

.pillar-node__icon {
  font-size: 30px;
  color: var(--node-accent, var(--color-accent));
  margin-block-end: var(--space-xs);
}

.pillar-node__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
  margin: 0 0 var(--space-xs);
}

.pillar-node__desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin: 0;
}

@media (max-width: 899px) {
  .pillars-timeline {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
    border-inline-start: 2px solid var(--color-accent-border);
  }

  .pillars-timeline__spine {
    display: none;
  }

  .pillar-node,
  .pillar-node--above,
  .pillar-node--below {
    /* .pillar-node--above/--below set align-self: end/start for the desktop
       CSS-grid layout, to pull each node against the horizontal spine that
       runs between the two rows. .pillars-timeline is a column flexbox here
       instead, so that same align-self is read on the cross-axis — now
       horizontal — and shrink-wraps each node to its content width stuck to
       alternating left/right edges rather than stretching full-width.
       Resetting it lets the container's align-items: stretch (still in
       effect) take over again. */
    align-self: stretch;
    align-items: start;
    text-align: start;
    padding: 0 0 0 var(--space-lg);
    margin-inline-start: -2px;
    border-inline-start: 2px solid var(--node-accent, var(--color-accent));
  }

  [dir="rtl"] .pillar-node,
  [dir="rtl"] .pillar-node--above,
  [dir="rtl"] .pillar-node--below {
    padding: 0 var(--space-lg) 0 0;
  }

  .pillar-node--above::after,
  .pillar-node--below::after {
    content: none;
  }

  .pillar-node__dot {
    display: none;
  }
}


/* === GOALS SECTION (Conference Objectives) === */

.section-goals {
  background: linear-gradient(180deg, var(--color-goals-bg-start) 0%, var(--color-goals-bg-end) 100%);
  /* goals-scroll-track's edge-fade gradients and the scroll-arrow hover state
     both read --color-bg-elevated to blend with the section — repoint it at
     this section's own tint instead of the sitewide cream. */
  --color-bg-elevated: var(--color-goals-bg-end);
  padding-block: var(--space-3xl);
}

.goals-header {
  padding-inline: var(--space-3xl);
  margin-block-end: var(--space-2xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

@media (max-width: 767px) {
  .goals-header {
    padding-inline: var(--space-lg);
  }
}

.goals-headline {
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-block-start: 0;
  margin-block-end: 0;
}

.goals-scroll-track {
  position: relative;
  max-inline-size: 1200px;
  margin-inline: auto;
}

.goals-ledger {
  display: flex;
  list-style: none;
  margin: 0;
  padding-block: 0;
  padding-inline: var(--space-3xl);
  gap: 0;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-block: 1px solid rgba(26, 26, 26, 0.1);
}

.goals-ledger::-webkit-scrollbar {
  display: none;
}

.goals-ledger__row {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  flex: 0 0 240px;
  gap: var(--space-xs);
  padding-block: var(--space-xl) var(--space-lg);
  padding-inline: var(--space-lg);
  border-inline-end: 1px solid rgba(26, 26, 26, 0.1);
  scroll-snap-align: start;
}

.goals-ledger__row:last-child {
  border-inline-end: none;
}

.goals-ledger__num {
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
  line-height: 1;
}

.goals-ledger__row:nth-child(even) .goals-ledger__num {
  color: var(--color-brand-green);
}

.goals-ledger__icon {
  font-size: 22px;
  color: var(--color-text-secondary);
  margin-block-start: var(--space-xs);
}

.goals-ledger__text {
  min-inline-size: 0;
}

.goals-ledger__title {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
  margin: 0 0 var(--space-xs);
}

.goals-ledger__desc {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.55;
  margin: 0;
}

.goals-scroll-track::before,
.goals-scroll-track::after {
  content: '';
  position: absolute;
  inset-block: 0;
  inline-size: 64px;
  z-index: 2;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}

.goals-scroll-track::before {
  inset-inline-start: 0;
  background: linear-gradient(to right, var(--color-bg-elevated), transparent);
  opacity: 0;
}

.goals-scroll-track::after {
  inset-inline-end: 0;
  background: linear-gradient(to left, var(--color-bg-elevated), transparent);
}

[dir="rtl"] .goals-scroll-track::before {
  background: linear-gradient(to left, var(--color-bg-elevated), transparent);
}

[dir="rtl"] .goals-scroll-track::after {
  background: linear-gradient(to right, var(--color-bg-elevated), transparent);
}

.goals-scroll-track.at-start::before { opacity: 0; }
.goals-scroll-track.at-end::after    { opacity: 0; }
.goals-scroll-track:not(.at-start)::before { opacity: 1; }
.goals-scroll-track:not(.at-end)::after    { opacity: 1; }

.goals-scroll-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  inline-size: 36px;
  block-size: 36px;
  border-radius: 50%;
  background: var(--color-bg-surface);
  border: 1px solid rgba(26, 26, 26, 0.15);
  color: var(--color-text-primary);
  opacity: 1;
  transition: opacity var(--duration-base) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.goals-scroll-arrow:hover {
  background: var(--color-bg-elevated);
}

.goals-scroll-arrow--prev { inset-inline-start: var(--space-md); }
.goals-scroll-arrow--next { inset-inline-end: var(--space-md); }

/* Arrows are positioned with logical properties (flip sides automatically
   in RTL), but the chevron SVGs are drawn pointing a fixed physical
   direction — mirror them so "prev" still visually points toward the
   start of reading order and "next" toward the end. */
[dir="rtl"] .goals-scroll-arrow svg {
  transform: scaleX(-1);
}

.goals-scroll-arrow.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 767px) {
  .goals-ledger {
    padding-inline: var(--space-lg);
  }

  .goals-ledger__row {
    flex-basis: 200px;
  }
}


/* === GALLERY SECTION === */

.section-gallery {
  /* Reuses the amber tint from .section-goals — sits between the dark
     Speakers section and the gray-tinted Partner section, so it needed to
     be a third, non-adjacent hue rather than repeating either neighbor. */
  background: linear-gradient(180deg, var(--color-goals-bg-start) 0%, var(--color-goals-bg-end) 100%);
  padding-block: var(--space-3xl);
}

.gallery-header {
  padding-inline: var(--space-3xl);
  margin-block-end: var(--space-xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

.gallery-headline {
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin: 0;
}

.gallery-filters {
  display: flex;
  gap: var(--space-sm);
  max-inline-size: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-3xl);
  margin-block-end: var(--space-lg);
}

.gallery-filter {
  background: transparent;
  border: 1px solid rgba(26, 26, 26, 0.15);
  color: var(--color-text-secondary);
  padding: var(--space-xs) var(--space-lg);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.gallery-filter:hover {
  border-color: var(--color-accent);
}

.gallery-filter--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-primary);
}

.gallery-item--hidden {
  display: none;
}

@media (max-width: 767px) {
  .gallery-filters {
    padding-inline: var(--space-lg);
  }
}

.gallery-tagline {
  font-size: clamp(0.9375rem, 1.8vw, 1rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-inline-size: 60ch;
  margin-block-start: var(--space-md);
}

.gallery-grid-wrap {
  position: relative;
  max-block-size: 520px;
  overflow: hidden;
  transition: max-block-size var(--duration-slow) var(--ease-in-out);
}

.gallery-grid-wrap.is-expanded {
  max-block-size: none;
}

.gallery-fade {
  position: absolute;
  inset-block-end: 0;
  inset-inline: 0;
  block-size: 120px;
  background: linear-gradient(to top, var(--color-goals-bg-end), transparent);
  pointer-events: none;
}

.gallery-grid-wrap.is-expanded .gallery-fade {
  display: none;
}

.gallery-toggle {
  display: flex;
  margin: var(--space-lg) auto 0;
  padding: var(--space-sm) var(--space-xl);
  background: transparent;
  border: 1px solid var(--color-accent-dark);
  border-radius: 4px;
  color: var(--color-text-primary);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}

.gallery-toggle:hover {
  background: rgba(138, 90, 18, 0.08);
}

.gallery-subheading {
  font-size: clamp(18px, 3vw, 24px);
  font-weight: 700;
  color: var(--color-text-primary);
  max-inline-size: 1200px;
  margin: var(--space-lg) auto var(--space-lg);
  padding-inline: var(--space-3xl);
}

.gallery-videos {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
  max-inline-size: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-3xl);
}

.gallery-video {
  inline-size: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 6px;
  background: #000;
}

.gallery-live {
  max-inline-size: 900px;
  margin-inline: auto;
  padding-inline: var(--space-3xl);
}

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

@media (max-width: 767px) {
  .gallery-live {
    padding-inline: var(--space-lg);
  }
}

@media (max-width: 767px) {
  .gallery-subheading,
  .gallery-videos {
    padding-inline: var(--space-lg);
  }
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: var(--space-sm);
  padding-inline: var(--space-3xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4 / 3;
  padding: 0;
  border: none;
  border-radius: 6px;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg-elevated);
}

.gallery-item img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--duration-base) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .gallery-item:hover img {
    transform: scale(1.06);
  }
}

@media (max-width: 767px) {
  .gallery-header {
    padding-inline: var(--space-lg);
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    padding-inline: var(--space-lg);
  }
}

/* === GALLERY LIGHTBOX === */

.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.92);
  padding: var(--space-lg);
}

.gallery-lightbox[hidden] {
  display: none;
}

.gallery-lightbox__img {
  max-inline-size: min(90vw, 1200px);
  max-block-size: 88vh;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.5);
}

.gallery-lightbox__close {
  position: absolute;
  inset-block-start: var(--space-lg);
  inset-inline-end: var(--space-lg);
  inline-size: 44px;
  block-size: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}

.gallery-lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}

.gallery-lightbox__nav {
  position: absolute;
  inset-block-start: 50%;
  transform: translateY(-50%);
  inline-size: 48px;
  block-size: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}

.gallery-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.2);
}

.gallery-lightbox__prev { inset-inline-start: var(--space-lg); }
.gallery-lightbox__next { inset-inline-end: var(--space-lg); }

[dir="rtl"] .gallery-lightbox__prev svg,
[dir="rtl"] .gallery-lightbox__next svg {
  transform: scaleX(-1);
}

@media (max-width: 560px) {
  .gallery-lightbox__nav {
    inline-size: 40px;
    block-size: 40px;
  }

  .gallery-lightbox__prev { inset-inline-start: var(--space-sm); }
  .gallery-lightbox__next { inset-inline-end: var(--space-sm); }
}


/* === SERVICES SECTION === (Plan E) */

.section-services {
  background: linear-gradient(180deg, var(--color-services-bg-start) 0%, var(--color-services-bg-end) 100%);
  /* .services-panel's own gradient and bottom fade read --color-bg-elevated
     to blend into the section — repoint it at this section's tint. */
  --color-bg-elevated: var(--color-services-bg-end);
  padding-block-start: var(--space-2xl);
}

.services-header {
  padding-inline: var(--space-3xl);
  margin-block-end: var(--space-2xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

.services-headline {
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-block-start: 0;
  margin-block-end: 0;
}

.services-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.service-row {
  position: relative;
  overflow: hidden;
  cursor: crosshair;
  min-block-size: 160px;
  padding-block: var(--space-xl);
  padding-inline: var(--space-3xl);
  display: flex;
  flex-direction: column;
  justify-content: center;
  border-block-end: 1px solid rgba(192,192,192,0.08);
  background-color: var(--color-bg-base);
}

.service-row__spotlight {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(400px circle at var(--spotlight-x, -999px) var(--spotlight-y, -999px), var(--spotlight-color, transparent), transparent 70%);
}

.service-row__content {
  position: relative;
  z-index: 1;
}

.service-row__title {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-block-end: var(--space-sm);
  margin-block-start: 0;
}

.service-row__desc {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

.service-row--1 { --spotlight-color: rgba(240,245,255,0.07); }
.service-row--2 { --spotlight-color: rgba(255,190,80,0.07); }
.service-row--3 { --spotlight-color: rgba(220,170,150,0.07); }
.service-row--4 { --spotlight-color: rgba(80,160,255,0.07); }
.service-row--5 { --spotlight-color: rgba(192,192,192,0.07); }

@media (max-width: 767px) {
  .service-row {
    min-block-size: 120px;
    padding-inline: var(--space-lg);
  }
  .services-header {
    padding-inline: var(--space-lg);
  }
  .service-row__spotlight {
    background: radial-gradient(260px circle at var(--spotlight-x, -999px) var(--spotlight-y, -999px), var(--spotlight-color, transparent), transparent 70%);
  }
}


/* ============================================================
   RECOVERED — Services accordion (Phase 8 redesign)
   (restoration, see style.css history)
   ============================================================ */

/* Physical property intentional — locks panel order to LTR so flex expansion is
   unaffected when dir="rtl" is set on <html>. Same pattern as .clients-marquee (Phase 7). */
.services-panels {
  display: flex;
  justify-content: center;
  direction: ltr;
  block-size: 68vh;
  min-block-size: 520px;
  gap: var(--space-xs);
  overflow: hidden;
  max-inline-size: 1100px;
  margin-inline: auto;
}

.services-panel {
  flex: 0 0 80px;
  block-size: 100%;
  position: relative;
  overflow: hidden;
  cursor: pointer;
  background: linear-gradient(to bottom, var(--panel-accent) 0%, var(--color-bg-elevated) 60%);
  border: none;
  border-block-start: 2px solid var(--panel-border);
  padding: 0;
  text-align: start;
  color: inherit;
  font-family: inherit;
}

/* Defer flex transition past first paint to prevent layout-flash (Pitfall 1) */
.panels-initialized .services-panel {
  transition: flex 600ms var(--ease-out);
}

/* Per-panel accent colors — alternate brand green/amber (was an unrelated
   6-color rainbow at low opacity that barely registered against the light
   section background) */
.services-panel--1 {
  --panel-border: var(--color-brand-green);
  --panel-accent: var(--color-panel-green-accent);
}
.services-panel--2 {
  --panel-border: var(--color-accent-dark);
  --panel-accent: var(--color-panel-amber-accent);
}
.services-panel--3 {
  --panel-border: var(--color-brand-green-elevated);
  --panel-accent: var(--color-panel-green-accent);
}
.services-panel--4 {
  --panel-border: var(--color-accent);
  --panel-accent: var(--color-panel-amber-accent);
}
.services-panel--5 {
  --panel-border: var(--color-brand-green);
  --panel-accent: var(--color-panel-green-accent);
}
.services-panel--6 {
  --panel-border: var(--color-accent-dark);
  --panel-accent: var(--color-panel-amber-accent);
}

/* Active panel (mobile JS toggle) */
.services-panel.is-active {
  flex: 0 0 55%;
  background: linear-gradient(to bottom, var(--panel-accent) 0%, var(--color-bg-elevated) 60%);
}

.services-panel__collapsed-title {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  direction: ltr;
  unicode-bidi: plaintext;
  font-size: 16px;
  letter-spacing: -0.01em;
  font-weight: bold;
  color: var(--color-text-primary);
  white-space: nowrap;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 200ms var(--ease-out);
}

/* Panel 2's title is significantly longer than the others — needs a smaller
   size to fit the vertical collapsed-tab height without clipping. */
.services-panel--2 .services-panel__collapsed-title {
  font-size: 13px;
}

.services-panel__content {
  position: absolute;
  inset: 0;
  padding-block: var(--space-xl);
  padding-inline: var(--space-xl);
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
  transition: opacity 300ms var(--ease-out) 200ms;
}

.services-panel.is-active .services-panel__content {
  opacity: 1;
  pointer-events: auto;
}

.services-panel__title {
  font-size: 36px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-block-start: 0;
  margin-block-end: var(--space-md);
}

.services-panel__desc {
  font-size: 16px;
  font-weight: 500;
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
}

/* Gradient overlay — dark at bottom, fades to transparent at midpoint */
.services-panel::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  inset-block-end: 0;
  block-size: 55%;
  background: linear-gradient(to top, var(--color-bg-elevated) 0%, transparent 100%);
  z-index: 1;
  pointer-events: none;
}

.services-panel__icon {
  position: absolute;
  inset-block-end: var(--space-xl);
  inset-inline-end: var(--space-xl);
  inline-size: 140px;
  block-size: 140px;
  opacity: 0;
  z-index: 0;
  pointer-events: none;
  color: var(--color-text-primary);
  transition: opacity 300ms var(--ease-out);
}

.services-panel.is-active .services-panel__icon {
  opacity: 0.3;
}

.services-panel.is-active .services-panel__collapsed-title {
  opacity: 0;
}

/* Desktop hover — wrapped in hover guard to prevent touch-sticky hover */
@media (hover: hover) and (pointer: fine) {
  .services-panels:hover .services-panel {
    flex: 0 0 80px;
  }

  .services-panels:hover .services-panel:hover {
    flex: 0 0 55%;
    background: linear-gradient(to bottom, var(--panel-accent) 0%, var(--color-bg-elevated) 60%);
  }

  .services-panels:hover .services-panel:hover .services-panel__content {
    opacity: 1;
    pointer-events: auto;
  }

  .services-panels:hover .services-panel:hover .services-panel__icon {
    opacity: 0.3;
  }

  .services-panels:hover .services-panel:hover .services-panel__collapsed-title {
    opacity: 0;
  }
}

/* Scroll track wrapper — desktop: transparent passthrough */
.services-scroll-track {
  position: relative;
}

.services-scroll-arrow {
  display: none; /* mobile only */
}

/* Mobile — scrollable horizontal accordion */
@media (max-width: 767px) {
  .services-panels {
    block-size: 56vh;
    max-inline-size: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }

  .services-panels::-webkit-scrollbar {
    display: none;
  }

  .services-panels.has-active {
    justify-content: flex-start;
  }

  .services-panel {
    flex: 0 0 44px;
    scroll-snap-align: start;
  }

  .services-panel.is-active {
    flex: 0 0 78vw;
    scroll-snap-align: start;
  }

  .services-panel__desc {
    font-size: 15px;
  }

  .services-panel__title {
    font-size: 22px;
  }

  .services-panel__collapsed-title {
    font-size: 14px;
    font-weight: bold;
  }

  .services-header {
    padding-inline: var(--space-lg);
  }

  /* gradient edge fades */
  .services-scroll-track::before,
  .services-scroll-track::after {
    content: '';
    position: absolute;
    inset-block: 0;
    inline-size: 40px;
    z-index: 10;
    pointer-events: none;
    transition: opacity var(--duration-base) var(--ease-out);
  }

  .services-scroll-track::before {
    left: 0;
    background: linear-gradient(to right, var(--color-bg-surface), transparent);
    opacity: 0;
  }

  .services-scroll-track::after {
    right: 0;
    background: linear-gradient(to left, var(--color-bg-surface), transparent);
  }

  .services-scroll-track.at-start::before { opacity: 0; }
  .services-scroll-track.at-end::after    { opacity: 0; }
  .services-scroll-track:not(.at-start)::before { opacity: 1; }
  .services-scroll-track:not(.at-end)::after    { opacity: 1; }

  /* arrow buttons */
  .services-scroll-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 11;
    inline-size: 32px;
    block-size: 32px;
    border-radius: 50%;
    background: rgba(235, 235, 235, 0.08);
    border: 1px solid rgba(235, 235, 235, 0.18);
    color: var(--color-text-primary);
    opacity: 1;
    transition: opacity var(--duration-base) var(--ease-out),
                background var(--duration-fast) var(--ease-out);
  }

  .services-scroll-arrow:active {
    background: rgba(235, 235, 235, 0.16);
  }

  .services-scroll-arrow--prev { left: var(--space-sm); }
  .services-scroll-arrow--next { right: var(--space-sm); }

  .services-scroll-arrow.is-hidden {
    opacity: 0;
    pointer-events: none;
  }
}

/* RTL: restore text direction inside expanded panels (container is locked to ltr for panel order) */
:lang(ar) .services-panel__content {
  direction: rtl;
}


/* === PORTFOLIO SECTION === */
.section-portfolio {
  background-color: var(--color-bg-base);
  padding-block-start: var(--space-2xl);
  padding-block-end: var(--space-3xl);
}

.portfolio-header {
  padding-inline: var(--space-3xl);
  margin-block-end: var(--space-xl);
}

:lang(en) .portfolio-header .section-label {
  letter-spacing: 0.08em;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  padding-inline: var(--space-3xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

.portfolio-item {
  position: relative;
  aspect-ratio: 1/1;
  overflow: hidden;
  cursor: pointer;
  background: var(--color-bg-elevated);
  appearance: none;
  border: none;
  padding: 0;
}

.portfolio-item img {
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  display: block;
  transition: opacity var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out);
}

.portfolio-item:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.portfolio-item--hidden {
  display: none;
}

.portfolio-footer {
  display: flex;
  justify-content: center;
  margin-block-start: var(--space-xl);
  padding-inline: var(--space-lg);
}

.portfolio-view-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: 12px;
  padding-inline: var(--space-xl);
  border: 1px solid var(--color-accent);
  border-radius: 2px;
  min-inline-size: 160px;
  min-block-size: 44px;
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text-primary);
  background: transparent;
  cursor: pointer;
  font-family: inherit;
  transition: background-color var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

.portfolio-view-more:hover {
  background: rgba(192, 192, 192, 0.08);
  border-color: var(--color-text-primary);
}

.portfolio-view-more:active {
  background: rgba(192, 192, 192, 0.15);
}

.portfolio-view-more:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

@media (max-width: 767px) {
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
    padding-inline: var(--space-md);
  }

  .portfolio-header {
    padding-inline: var(--space-lg);
  }
}

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


/* === PORTFOLIO FILTER BAR === */
.portfolio-filter {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: var(--space-sm);
  padding-inline: var(--space-3xl);
  padding-block: var(--space-sm);
  margin-block-end: var(--space-xl);
  scrollbar-width: none;
}

.portfolio-filter::-webkit-scrollbar {
  display: none;
}

.portfolio-filter__pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-block: var(--space-sm);
  padding-inline: var(--space-md);
  border-radius: 20px;
  border: 1px solid rgba(160, 160, 160, 0.35);
  background: transparent;
  color: var(--color-text-secondary);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  line-height: 1;
  white-space: nowrap;
  min-block-size: 36px;
  cursor: pointer;
  flex-shrink: 0;
  transition: background-color var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.portfolio-filter__pill[aria-pressed="true"] {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-bg-base);
}

@media (hover: hover) and (pointer: fine) {
  .portfolio-filter__pill:hover {
    border-color: var(--color-accent);
    color: var(--color-text-primary);
  }
  .portfolio-filter__pill[aria-pressed="true"]:hover {
    border-color: var(--color-accent);
    color: var(--color-bg-base);
  }
}

.portfolio-filter__pill:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

:lang(en) .portfolio-filter__pill {
  letter-spacing: 0.06em;
}

.portfolio-filter__status {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
}

@media (max-width: 767px) {
  .portfolio-filter {
    padding-inline: var(--space-lg);
  }
}

/* === PORTFOLIO OVERLAY === */
.portfolio-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: flex-end;
}

.portfolio-overlay__title {
  inset-block-end: 0;
  inset-inline: 0;
  padding-block-end: var(--space-sm);
  padding-inline: var(--space-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-primary);
  text-align: start;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  width: 100%;
}

@media (hover: hover) and (pointer: fine) {
  .portfolio-overlay {
    background: linear-gradient(to top, rgba(10,10,10,0.85) 0%, rgba(10,10,10,0.0) 100%);
    opacity: 0;
    padding-block-start: 60%;
    transition: opacity 200ms cubic-bezier(0.25, 0, 0, 1);
  }
  .portfolio-item:hover .portfolio-overlay {
    opacity: 1;
  }
  .portfolio-item:hover img {
    opacity: 0.85;
    transform: scale(1.02);
  }
}

@media (hover: none) {
  .portfolio-overlay {
    background: linear-gradient(to top, rgba(10,10,10,0.72) 0%, rgba(10,10,10,0.0) 100%);
    padding-block-start: 75%;
    opacity: 1;
  }
}

/* === LIGHTBOX === */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(10, 10, 10, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}

.lightbox--open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox__img {
  max-inline-size: 90vw;
  max-block-size: 90vh;
  object-fit: contain;
  display: block;
  user-select: none;
}

.lightbox__close {
  position: fixed;
  top: var(--space-lg);
  /* Physical property intentional — close button must stay top-right in both LTR and RTL. */
  right: var(--space-lg);
  inline-size: 44px;
  block-size: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: var(--color-text-primary);
  z-index: 1001;
}

.lightbox__close:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.lightbox__close-icon {
  position: relative;
  inline-size: 24px;
  block-size: 24px;
}

.lightbox__close-bar {
  position: absolute;
  display: block;
  inline-size: 24px;
  block-size: 2px;
  background: currentColor;
  inset-block-start: 50%;
  inset-inline-start: 0;
}

.lightbox__close-bar:first-child {
  transform: translateY(-50%) rotate(45deg);
}

.lightbox__close-bar:last-child {
  transform: translateY(-50%) rotate(-45deg);
}

.lightbox__prev,
.lightbox__next {
  position: fixed;
  inset-block-start: 50%;
  transform: translateY(-50%);
  inline-size: 44px;
  block-size: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  z-index: 1001;
}

.lightbox__prev:focus-visible,
.lightbox__next:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.lightbox__prev {
  /* Physical property intentional — prev must stay on physical left in both LTR and RTL. */
  left: var(--space-lg);
}

.lightbox__next {
  /* Physical property intentional — next must stay on physical right in both LTR and RTL. */
  right: var(--space-lg);
}

.lightbox__arrow-icon {
  display: block;
  inline-size: 20px;
  block-size: 20px;
  border-block-end: 2px solid var(--color-accent);
  transition: inline-size var(--duration-fast) var(--ease-out), block-size var(--duration-fast) var(--ease-out), border-color var(--duration-fast) var(--ease-out);
}

.lightbox__arrow-icon--prev {
  /* Physical properties intentional — arrow must point ← in both LTR and RTL.
     border-inline-start flips to border-right in RTL, making it point down. */
  border-left: 2px solid var(--color-accent);
  transform: rotate(45deg);
}

.lightbox__arrow-icon--next {
  /* Physical properties intentional — arrow must point → in both LTR and RTL. */
  border-right: 2px solid var(--color-accent);
  transform: rotate(-45deg);
}

.lightbox__prev:hover .lightbox__arrow-icon,
.lightbox__next:hover .lightbox__arrow-icon {
  inline-size: 24px;
  block-size: 24px;
  border-color: var(--color-text-primary);
}


/* ============================================================
   SECTION 8 — Accessibility: Reduced Motion
   Disables all non-essential transitions and animations.
   Plans C/D/E/F add specific fallbacks for clip-path and overlay.
   ============================================================ */

/* === CONTACT SECTION === */
.section-contact {
  /* Darkened from the original light amber↔green tint — the form field
     borders (rgba(192,192,192,0.15)) were nearly invisible against a light
     background. Dark green also bookends the page with .section-vision. */
  background: linear-gradient(160deg, var(--color-brand-green) 0%, var(--color-brand-green-elevated) 100%);
  --color-text-primary: var(--color-text-on-dark);
  --color-text-secondary: var(--color-text-on-dark-secondary);
  padding-block-start: var(--space-2xl);
  padding-block-end: var(--space-3xl);
  position: relative;
}

.contact-header {
  padding-inline: var(--space-3xl);
  margin-block-end: var(--space-xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

:lang(en) .contact-header .section-label {
  letter-spacing: 0.08em;
}

/* Recovered — contact section tagline + closing copy (restoration, see style.css history) */
.contact-tagline {
  font-size: clamp(0.9375rem, 1.8vw, 1rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-secondary);
  max-inline-size: 60ch;
  margin-block-start: var(--space-md);
}

.contact-closing {
  font-size: clamp(0.875rem, 1.6vw, 1rem);
  font-weight: 400;
  line-height: 1.7;
  color: var(--color-text-secondary);
  text-align: center;
  max-inline-size: 55ch;
  margin-inline: auto;
  margin-block-start: var(--space-2xl);
  padding-inline: var(--space-lg);
}

.contact-form-wrapper {
  max-inline-size: 640px;
  margin-inline: auto;
  padding-inline: var(--space-3xl);
}

.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.form-field label {
  font-size: 14px;
  font-weight: 500;
  color: var(--color-text-secondary);
  transition: color var(--duration-fast) var(--ease-out);
  align-items: center;
}

.form-field:focus-within label {
  color: var(--color-text-primary);
}

.form-field input,
.form-field textarea {
  font-family: inherit;
  font-size: 16px;
  font-weight: 400;
  /* Fixed dark text regardless of --color-text-primary — the field itself
     stays a light chip even on the dark contact-section background, so its
     text must not follow the section's light-on-dark override. */
  color: var(--color-text-dark-fixed);
  background: var(--color-bg-surface);
  border: 1px solid rgba(26, 26, 26, 0.18);
  border-radius: 2px;
  padding-block: var(--space-sm);
  padding-inline: var(--space-md);
  min-block-size: 48px;
  inline-size: 100%;
  outline: none;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.form-field textarea {
  min-block-size: 120px;
  resize: vertical;
  resize: block;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--color-accent);
}

.form-field input.is-valid,
.form-field textarea.is-valid {
  border-color: rgba(16, 77, 54, 0.35);
}

.form-field input.is-invalid,
.form-field textarea.is-invalid {
  border-color: var(--color-error);
}

.form-error {
  font-size: 13px;
  font-weight: 400;
  color: var(--color-error);
  line-height: 1.4;
  min-block-size: 18px;
  display: none;
}

.form-field.has-error .form-error {
  display: block;
}

.form-honeypot { display: none; }

.form-field--checkbox {
  margin-block-end: var(--space-md);
}

.contact-consent {
  display: flex;
  align-items: flex-start;
  gap: var(--space-sm);
  font-size: 0.8rem;
  color: var(--color-text-secondary);
  cursor: pointer;
}

.contact-consent input[type="checkbox"] {
  flex-shrink: 0;
  margin-block-start: 2px;
  inline-size: 16px;
  block-size: 16px;
  accent-color: var(--color-brand-green);
  cursor: pointer;
}

.contact-consent a {
  color: var(--color-accent);
  text-decoration: underline;
}

.form-submit {
  align-self: center;
  margin-block-start: var(--space-sm);
}

.contact-success {
  display: none;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-md);
  padding-block: var(--space-2xl);
}

.contact-success--visible {
  display: flex;
}

.contact-success__heading {
  font-size: 28px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
}

.contact-success__body {
  font-size: 16px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.5;
}

/* Recovered — success icon + rule, and the draw-in animation they depend on
   (restoration, see style.css history) */
@keyframes success-rise {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes success-draw {
  to { stroke-dashoffset: 0; }
}

.contact-success__icon {
  inline-size: 52px;
  block-size: 52px;
  color: var(--color-accent);
  stroke-dasharray: 200;
  stroke-dashoffset: 200;
}

.contact-success--visible .contact-success__icon {
  animation: success-rise 0.55s var(--ease-out) 0.05s forwards,
             success-draw  0.6s var(--ease-out) 0.15s forwards;
}

.contact-success__rule {
  border: none;
  block-size: 1px;
  inline-size: 48px;
  background: var(--color-accent);
  opacity: 0.6;
}

@media (max-width: 767px) {
  .contact-header {
    padding-inline: var(--space-lg);
  }

  .contact-form-wrapper {
    padding-inline: var(--space-lg);
  }
}

/* === GRADIENT MESH === */
@property --mesh-x {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 20%;
}

@property --mesh-y {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 40%;
}

@property --mesh-x2 {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 80%;
}

@property --mesh-y2 {
  syntax: '<percentage>';
  inherits: false;
  initial-value: 60%;
}

.mesh-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(circle at var(--mesh-x, 20%) var(--mesh-y, 40%), rgba(192, 192, 192, 0.06) 0%, transparent 40%),
    radial-gradient(circle at var(--mesh-x2, 80%) var(--mesh-y2, 60%), rgba(192, 192, 192, 0.04) 0%, transparent 35%);
  animation: meshDrift 25s ease-in-out infinite alternate;
}

@keyframes meshDrift {
  from {
    --mesh-x: 20%;
    --mesh-y: 40%;
    --mesh-x2: 80%;
    --mesh-y2: 60%;
  }
  to {
    --mesh-x: 60%;
    --mesh-y: 25%;
    --mesh-x2: 30%;
    --mesh-y2: 75%;
  }
}

.section-vision {
  position: relative;
  overflow: hidden;
}

.section-contact {
  overflow: hidden;
}

/* === SCROLL REVEAL === */
.js-loaded .reveal-text {
  clip-path: inset(0 100% 0 0);
  transition: clip-path var(--duration-slow) var(--ease-out);
}

[dir="rtl"] .js-loaded .reveal-text {
  clip-path: inset(0 0 0 100%);
}

.js-loaded .reveal-text.is-revealed {
  clip-path: inset(0 0% 0 0);
}

.js-loaded .reveal-image {
  clip-path: inset(100% 0 0 0);
  transition: clip-path var(--duration-slow) var(--ease-out);
}

.js-loaded .reveal-image.is-revealed {
  clip-path: inset(0% 0 0 0);
}

/* === WORD REVEAL === */
.word-reveal {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px);
  animation: none;
}

h2.is-words-revealed .word-reveal {
  animation: wordReveal 1100ms var(--ease-out) forwards;
  animation-delay: var(--word-delay, 0ms);
}

@keyframes wordReveal {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* prefers-reduced-motion — Plans C/D/E/F add specific fallbacks for clip-path and overlay */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ============================================================
   HERO EVENT DETAILS + AGENDA DOWNLOAD (Potato Hub 2026)
   ============================================================ */

.hero-bg-video {
  position: absolute;
  inset: 0;
  inline-size: 100%;
  block-size: 100%;
  object-fit: cover;
  object-position: center 15%;
  z-index: 0;
}

.hero-countdown {
  display: flex;
  align-items: stretch;
  gap: var(--space-sm);
  margin-block: var(--space-sm);
}

.hero-countdown__item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-inline-size: 64px;
  padding-block: var(--space-sm);
  padding-inline: var(--space-md);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 6px;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hero-countdown__value {
  font-size: clamp(20px, 4vw, 30px);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
  line-height: 1;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.hero-countdown__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.75);
}

@media (max-width: 480px) {
  .hero-countdown {
    gap: 6px;
  }

  .hero-countdown__item {
    min-inline-size: 0;
    flex: 1 1 0;
    padding-inline: var(--space-xs);
  }
}

.hero-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  row-gap: var(--space-md);
  margin-block: var(--space-lg);
  color: #ffffff;
}

.hero-details__row {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.55);
}

.hero-details__icon {
  font-size: 1.1em;
  color: var(--color-accent);
}

.hero-details__location {
  display: inline-flex;
  align-items: center;
  gap: 0.35em;
  color: inherit;
  text-decoration: none;
  transition: color 200ms ease;
}

.hero-details__location:hover,
.hero-details__location:focus-visible {
  color: var(--color-accent);
}

.hero-details__row:not(:last-of-type)::after {
  content: '•';
  margin-inline: var(--space-md);
  color: var(--color-accent);
  text-shadow: none;
}

@media (max-width: 560px) {
  .hero-details {
    flex-direction: column;
    gap: var(--space-sm);
  }

  .hero-details__row:not(:last-of-type)::after {
    content: none;
  }

  /* clamp()'s 1.05rem floor never actually shrank on phones — three bold
     16.8px rows plus icons crowded the hero on short screens. */
  .hero-details__row {
    font-size: 0.85rem;
  }

  .hero-cta {
    font-size: 13px;
    padding-block: 10px;
    padding-inline: 22px;
    min-inline-size: 0;
    min-block-size: 40px;
  }
}

.hero-cta--agenda {
  flex-basis: 100%;
  max-inline-size: 340px;
  margin-inline: auto;
  margin-block-start: var(--space-md);
  background: var(--color-accent);
  color: var(--color-text-primary);
}

/* ============================================================
   About stats row (Task 4)
   ============================================================ */

.about-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
  max-inline-size: 900px;
  margin-inline: auto;
  padding-inline: var(--space-3xl);
  padding-block: var(--space-2xl);
}

.about-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.about-stat__num {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--color-accent);
}

.about-stat__label {
  font-size: 0.9rem;
  color: var(--color-text-secondary);
}

@media (max-width: 767px) {
  .about-stats {
    padding-inline: var(--space-lg);
  }
}

@media (max-width: 640px) {
  .about-stats {
    grid-template-columns: repeat(2, 1fr);
  }
}


/* ============================================================
   RECOVERED PRE-EXISTING COMPONENT CSS
   (entry overlay, footer — legitimate content lost during an
   earlier incorrect reset, restored from the original source)
   ============================================================ */

/* === FOOTER === */
.site-footer {
  background-color: var(--color-bg-elevated);
  border-block-start: 1px solid rgba(192, 192, 192, 0.12);
  padding-block: var(--space-2xl);
  padding-inline: var(--space-3xl);
}

.footer-inner {
  display: flex;
  gap: var(--space-2xl);
  align-items: flex-start;
  max-inline-size: 1200px;
  margin-inline: auto;
}

.footer-col--brand {
  flex: 1.5;
}

.footer-col--contact {
  flex: 1;
}

.footer-col--social {
  flex: 1;
}

.footer-logo {
  block-size: 40px;
  inline-size: auto;
  margin-block-end: var(--space-sm);
}

.footer-copyright {
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.5;
  margin-block-start: var(--space-sm);
}

.footer-contact-label {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-secondary);
  text-transform: uppercase;
  margin-block-end: var(--space-sm);
}

/* Scope letter-spacing to :lang(en) only — Arabic connected script breaks with letter-spacing */
:lang(en) .footer-contact-label {
  letter-spacing: 0.1em;
}

.footer-contact-item {
  display: block;
  font-size: 14px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.6;
  transition: color var(--duration-base) var(--ease-out);
}

[dir="rtl"] .footer-contact-item[href^="tel:"] {
  text-align: right;
}

.footer-social-links {
  display: flex;
  gap: var(--space-md);
  margin-block-start: var(--space-sm);
  flex-wrap: wrap;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 40px;
  block-size: 40px;
  color: var(--color-text-secondary);
  transition: color var(--duration-base) var(--ease-out);
}

.footer-social-icon {
  inline-size: 20px;
  block-size: 20px;
}

@media (hover: hover) and (pointer: fine) {
  .footer-contact-item:hover {
    color: var(--color-text-primary);
  }

  .footer-social-link:hover {
    color: var(--color-text-primary);
  }
}

@media (max-width: 767px) {
  .site-footer {
    padding-inline: var(--space-lg);
  }

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

  .footer-col--brand,
  .footer-col--contact,
  .footer-col--social {
    inline-size: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
  }
}

/* ============================================================
   SECTION — Entry Overlay (Phase 9, Plan 01)
   ============================================================ */

/* --- Overlay wrapper: fixed full-screen, above all other layers --- */
#entry-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: row;
  direction: ltr; /* visual-only element — panels must always split left/right regardless of doc dir */
  z-index: 9999;
  pointer-events: none;
}

/* --- Each panel: half the viewport width, full height, dark bg --- */
.entry-panel {
  flex: 0 0 50%;
  block-size: 100%;
  background-color: var(--color-bg-base);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* --- Left panel: push content toward the seam --- */
.entry-panel--left {
  justify-content: flex-end;
}

/* --- Right panel: mirror alignment --- */
.entry-panel--right {
  justify-content: flex-start;
}

/* --- Logo wrap: absolutely positioned at the seam between panels --- */
.entry-overlay__logo-wrap {
  position: absolute;
  inset-block-start: 50%;
  inset-inline: 0;
  margin-inline: auto;
  inline-size: fit-content;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
  padding-inline: var(--space-lg);
}

/* --- Logo image: responsive size --- */
.entry-overlay__logo {
  block-size: clamp(40px, 8vw, 80px);
  inline-size: auto;
  display: block;
}

/* --- CSS-only fallback if GSAP fails to load (T-09-01 mitigation) ---
   After 1.5s, fade the overlay out automatically so it never permanently
   blocks interaction regardless of JS/GSAP availability.
   animation-fill-mode: forwards keeps opacity:0 after the animation ends.
   The GSAP onComplete will set display:none faster if GSAP is available;
   this keyframe is a safety net only. */
@keyframes entry-fade-out {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

#entry-overlay {
  animation: entry-fade-out 0.4s ease-out 1.5s forwards;
}

/* === SPEAKERS SECTION === */

.section-speakers {
  background: linear-gradient(160deg, var(--color-speakers-bg-start) 0%, var(--color-speakers-bg-end) 100%);
  --color-text-primary: var(--color-text-on-dark);
  --color-text-secondary: var(--color-text-on-dark-secondary);
  /* speakers-scroll-track's edge-fade gradients read --color-bg-elevated to
     blend into the section — repoint it at the dark end of this section's
     own gradient instead of the sitewide cream. */
  --color-bg-elevated: var(--color-speakers-bg-end);
  padding-block: var(--space-3xl);
}

/* speakers-filter pills use a hardcoded near-black border tuned for a light
   section — invisible against the new dark background, so give it a light
   one instead. The active pill keeps its solid-amber fill, which needs dark
   text regardless of the section's light-on-dark theme above (--color-text-dark-fixed
   is never redeclared, so this stays dark even though --color-text-primary
   here now resolves to white). */
.section-speakers .speakers-filter {
  border-color: rgba(255, 255, 255, 0.28);
}

.section-speakers .speakers-filter--active {
  color: var(--color-text-dark-fixed);
}

/* speakers-scroll-arrow keeps its own always-light circular background
   (var(--color-bg-surface), unaffected by the override above) — its icon
   must stay dark to remain visible on that light chip. Its :hover state
   normally swaps to --color-bg-elevated to stay light-on-light, but that
   token was just repointed at the dark section background for the edge-fade
   gradients above, so give hover its own light background here instead of
   inheriting the (now dark) elevated token. */
.section-speakers .speakers-scroll-arrow {
  color: var(--color-text-dark-fixed);
}

.section-speakers .speakers-scroll-arrow:hover {
  background: var(--color-bg-base);
}

.speakers-header {
  max-inline-size: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-3xl);
  margin-block-end: var(--space-xl);
}

.speakers-headline {
  font-size: clamp(22px, 4vw, 48px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-block-start: 0;
  margin-block-end: 0;
}

.speakers-filters {
  display: flex;
  gap: var(--space-sm);
  max-inline-size: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-3xl);
  margin-block-end: var(--space-lg);
}

.speakers-empty {
  max-inline-size: 1200px;
  margin-inline: auto;
  padding-inline: var(--space-3xl);
  padding-block: var(--space-2xl);
  font-size: 15px;
  font-style: italic;
  color: var(--color-text-secondary);
}

.speakers-empty--hidden,
.speakers-scroll-track--hidden {
  display: none;
}

.speakers-filter {
  background: transparent;
  border: 1px solid rgba(26, 26, 26, 0.15);
  color: var(--color-text-secondary);
  padding: var(--space-xs) var(--space-lg);
  border-radius: 20px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.speakers-filter:hover {
  border-color: var(--color-accent);
}

.speakers-filter--active {
  background: var(--color-accent);
  border-color: var(--color-accent);
  color: var(--color-text-primary);
}

.speakers-scroll-track {
  position: relative;
  max-inline-size: 1200px;
  margin-inline: auto;
}

.speakers-carousel {
  display: flex;
  list-style: none;
  margin: 0;
  padding-block: var(--space-md);
  padding-inline: var(--space-3xl);
  scroll-padding-inline: var(--space-3xl);
  gap: var(--space-lg);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.speakers-carousel::-webkit-scrollbar {
  display: none;
}

.speaker-card {
  flex: 0 0 200px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

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

.speaker-card__photo {
  inline-size: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 6px;
  background: var(--color-bg-elevated);
}

.speaker-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.3;
  margin: var(--space-xs) 0 0;
}

.speaker-card__title {
  font-size: 12px;
  font-weight: 400;
  color: var(--color-text-secondary);
  line-height: 1.4;
  margin: 0;
}

.speaker-card__org {
  font-size: 12px;
  font-weight: 600;
  color: var(--color-accent);
  line-height: 1.4;
  margin: 0;
}

.speakers-scroll-track::before,
.speakers-scroll-track::after {
  content: '';
  position: absolute;
  inset-block: 0;
  inline-size: 64px;
  z-index: 2;
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out);
}

.speakers-scroll-track::before {
  inset-inline-start: 0;
  background: linear-gradient(to right, var(--color-bg-elevated), transparent);
  opacity: 0;
}

.speakers-scroll-track::after {
  inset-inline-end: 0;
  background: linear-gradient(to left, var(--color-bg-elevated), transparent);
}

.speakers-scroll-track.at-start::before { opacity: 0; }
.speakers-scroll-track.at-end::after    { opacity: 0; }
.speakers-scroll-track:not(.at-start)::before { opacity: 1; }
.speakers-scroll-track:not(.at-end)::after    { opacity: 1; }

[dir="rtl"] .speakers-scroll-track::before {
  background: linear-gradient(to left, var(--color-bg-elevated), transparent);
}

[dir="rtl"] .speakers-scroll-track::after {
  background: linear-gradient(to right, var(--color-bg-elevated), transparent);
}

.speakers-scroll-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  inline-size: 36px;
  block-size: 36px;
  border-radius: 50%;
  background: var(--color-bg-surface);
  border: 1px solid rgba(26, 26, 26, 0.15);
  color: var(--color-text-primary);
  opacity: 1;
  transition: opacity var(--duration-base) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.speakers-scroll-arrow:hover {
  background: var(--color-bg-elevated);
}

.speakers-scroll-arrow--prev { inset-inline-start: var(--space-md); }
.speakers-scroll-arrow--next { inset-inline-end: var(--space-md); }

[dir="rtl"] .speakers-scroll-arrow svg {
  transform: scaleX(-1);
}

.speakers-scroll-arrow.is-hidden {
  opacity: 0;
  pointer-events: none;
}

@media (max-width: 767px) {
  .speakers-header,
  .speakers-filters {
    padding-inline: var(--space-lg);
  }

  .speakers-carousel {
    padding-inline: var(--space-lg);
  }

  .speaker-card {
    flex-basis: 160px;
  }
}

/* ============================================================
   SPONSORSHIP TIERS (Potato Hub 2026 — new)
   ============================================================ */

.sponsorship-tiers {
  margin-block-start: var(--space-3xl);
  padding-block-end: var(--space-2xl);
  padding-inline: var(--space-3xl);
  max-inline-size: 1200px;
  margin-inline: auto;
}

.sponsorship-tiers__headline {
  font-size: clamp(20px, 3vw, 36px);
  font-weight: 700;
  color: var(--color-text-primary);
  line-height: 1.2;
  margin-block-end: var(--space-xl);
}

.sponsorship-tiers__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-lg);
}

@media (max-width: 767px) {
  .sponsorship-tiers {
    padding-inline: var(--space-lg);
  }
}

.tier-card {
  border: 2px solid var(--color-accent-border);
  border-radius: 8px;
  padding: var(--space-lg);
  background: var(--color-bg-surface);
}

.tier-card--platinum { --tier-accent: #b0b0b0; border-color: var(--tier-accent); }
.tier-card--gold { border-color: var(--color-accent); }
.tier-card--silver { --tier-accent: #c0c0c0; border-color: var(--tier-accent); }
.tier-card--bronze { --tier-accent: #a0703a; border-color: var(--tier-accent); }

.tier-card__badge {
  display: block;
  max-inline-size: 110px;
  margin-inline: auto;
  margin-block-end: var(--space-md);
}

.tier-card__badge--ar { display: none; }
:lang(ar) .tier-card__badge--en { display: none; }
:lang(ar) .tier-card__badge--ar { display: block; }

.tier-card__name {
  font-size: 1.15rem;
  font-weight: 700;
  margin-block-end: var(--space-md);
  color: var(--color-brand-green);
}

.tier-card__benefits {
  list-style: disc;
  padding-inline-start: var(--space-lg);
  font-size: 0.9rem;
  color: var(--color-text-secondary);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

@media (max-width: 900px) {
  .sponsorship-tiers__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .sponsorship-tiers__grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   COOKIE CONSENT BANNER (Potato Hub 2026 — new)
   ============================================================ */

.cookie-banner[hidden] {
  display: none;
}

.cookie-banner {
  position: fixed;
  inset-block-end: 0;
  inset-inline: 0;
  z-index: 9998;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-md) var(--space-lg);
  background: var(--color-brand-green);
  color: var(--color-bg-surface);
}

.cookie-banner__text {
  font-size: 0.9rem;
  flex: 1 1 300px;
}

.cookie-banner__actions {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.cookie-banner__link {
  color: var(--color-bg-surface);
  text-decoration: underline;
  font-size: 0.85rem;
}

.cookie-banner__accept {
  background: var(--color-accent);
  color: var(--color-text-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
}

.cookie-banner__reject,
.cookie-banner__customize {
  background: transparent;
  color: var(--color-bg-surface);
  border: 1px solid rgba(255, 255, 255, 0.4);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 4px;
  font-weight: 600;
  white-space: nowrap;
  transition: border-color var(--duration-fast) var(--ease-out);
}

.cookie-banner__reject:hover,
.cookie-banner__customize:hover {
  border-color: rgba(255, 255, 255, 0.8);
}

@media (max-width: 640px) {
  .cookie-banner {
    flex-direction: column;
    align-items: stretch;
    padding: var(--space-md);
  }

  /* .cookie-banner__text has flex: 1 1 300px — in the row layout that's a
     min-width, but flex-direction: column reinterprets the same flex-basis
     as a min-height, so the text block (and the whole banner along with it)
     was stretching to ~300px+ tall. Reset it back to a plain block on the
     main axis now that "basis" means height. */
  .cookie-banner__text {
    flex: initial;
  }

  .cookie-banner__actions {
    flex-wrap: wrap;
  }

  /* Policy link reads as a full-width row above the buttons rather than
     competing for space in the same wrapped row (it was getting squeezed
     to a sliver, or shoved below with buttons still overflowing). */
  .cookie-banner__link {
    flex-basis: 100%;
  }

  .cookie-banner__reject,
  .cookie-banner__customize,
  .cookie-banner__accept {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* === COOKIE PREFERENCES MODAL === */

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cookie-modal[hidden] {
  display: none;
}

.cookie-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
}

.cookie-modal__panel {
  position: relative;
  z-index: 1;
  background: var(--color-bg-surface);
  border-radius: 8px;
  padding: var(--space-xl);
  max-inline-size: 460px;
  inline-size: calc(100% - var(--space-lg) * 2);
  max-block-size: calc(100vh - var(--space-lg) * 2);
  overflow-y: auto;
}

.cookie-modal__panel h2 {
  font-size: 1.2rem;
  color: var(--color-brand-green);
  margin: 0 0 var(--space-lg);
}

.cookie-modal__row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-md);
  border-block-start: 1px solid var(--color-bg-elevated);
}

.cookie-modal__row strong {
  font-size: 0.95rem;
  color: var(--color-text-primary);
}

.cookie-modal__row p {
  font-size: 0.82rem;
  color: var(--color-text-secondary);
  margin: 4px 0 0;
}

.cookie-modal__always {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}

.cookie-modal__switch {
  position: relative;
  display: inline-block;
  inline-size: 40px;
  block-size: 22px;
  flex-shrink: 0;
}

.cookie-modal__switch input {
  opacity: 0;
  inline-size: 0;
  block-size: 0;
}

.cookie-modal__switch span {
  position: absolute;
  inset: 0;
  /* Was --color-bg-elevated (near-white) on the modal's own white panel —
     the "off" state was nearly invisible. A solid mid-gray track reads
     clearly as "off" without being confused with the green "on" state. */
  background: #b8b8b0;
  border: 1px solid rgba(26, 26, 26, 0.12);
  border-radius: 22px;
  transition: background-color var(--duration-fast) var(--ease-out);
}

.cookie-modal__switch span::before {
  content: '';
  position: absolute;
  inline-size: 16px;
  block-size: 16px;
  inset-inline-start: 3px;
  inset-block-start: 3px;
  background: var(--color-bg-surface);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  border-radius: 50%;
  transition: transform var(--duration-fast) var(--ease-out);
}

.cookie-modal__switch input:checked + span {
  background: var(--color-brand-green);
}

.cookie-modal__switch input:checked + span::before {
  transform: translateX(18px);
}

[dir="rtl"] .cookie-modal__switch input:checked + span::before {
  transform: translateX(-18px);
}

.cookie-modal__actions {
  display: flex;
  justify-content: flex-end;
  gap: var(--space-sm);
  margin-block-start: var(--space-xl);
}

.cookie-modal__cancel {
  background: transparent;
  color: var(--color-text-secondary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 4px;
}

.cookie-modal__save {
  background: var(--color-brand-green);
  color: var(--color-bg-surface);
  padding: var(--space-sm) var(--space-lg);
  border-radius: 4px;
  font-weight: 600;
}

/* === BACK TO TOP === */

.back-to-top {
  position: fixed;
  inset-block-end: calc(var(--space-lg) + var(--back-to-top-offset, 0px));
  inset-inline-end: var(--space-lg);
  z-index: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  inline-size: 44px;
  block-size: 44px;
  border-radius: 50%;
  background: var(--color-brand-green);
  color: var(--color-bg-surface);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
  transition: opacity var(--duration-base) var(--ease-out),
              transform var(--duration-base) var(--ease-out),
              background var(--duration-fast) var(--ease-out),
              inset-block-end var(--duration-base) var(--ease-out);
}

.back-to-top:hover {
  background: var(--color-brand-green-elevated);
}

.back-to-top--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
