/* ==========================================================================
   EYEDIA — Components
   Tokens live in style.css. Motion lives in motion.css.
   ========================================================================== */

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

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;
  padding: 0.6rem 0;
  background: transparent;
  transition: background var(--dur) var(--ease-out), padding var(--dur) var(--ease-out),
    border-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
  border-bottom: 1px solid transparent;
}

.site-header.is-scrolled {
  background: rgba(5, 5, 5, 0.86);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom-color: var(--gold-30);
  padding: 0.2rem 0;
}

/* Slide the bar away when scrolling down, bring it back on the way up. */
.site-header.is-hidden {
  transform: translateY(-104%);
}

.nav-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
}

.logo {
  line-height: 0;
  flex-shrink: 0;
}
.logo img {
  width: 150px;
  height: auto;
}

.nav-wrap {
  margin-inline-start: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  text-decoration: none;
  color: #f0f0f0;
  font-weight: 500;
  font-size: 1rem;
  position: relative;
  padding: 0.35rem 0;
  transition: color var(--dur-fast) var(--ease-out);
}

/* The numbered prefix — a nod to the reference site's editorial nav. */
.nav-links__num {
  font-family: "Space Grotesk", monospace;
  font-size: 0.62rem;
  letter-spacing: 0.06em;
  color: var(--gold);
  opacity: 0.55;
  transition: opacity var(--dur-fast) var(--ease-out);
}

.nav-links a:hover,
.nav-links a:focus-visible,
.nav-links a.is-active {
  color: var(--gold-bright);
}
.nav-links a:hover .nav-links__num,
.nav-links a.is-active .nav-links__num {
  opacity: 1;
}

/* Underline that wipes in from the leading edge. */
.nav-links__text::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: var(--underline-origin, left);
  transition: transform var(--dur) var(--ease-out);
}
.nav-links a:hover .nav-links__text::after,
.nav-links a.is-active .nav-links__text::after {
  transform: scaleX(1);
}

.nav-links .sub-menu {
  position: absolute;
  top: 100%;
  inset-inline-start: 0;
  min-width: 200px;
  background: rgba(10, 10, 15, 0.96);
  backdrop-filter: blur(14px);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: 0.6rem;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateY(10px);
  transition: all var(--dur) var(--ease-out);
}
.nav-links li {
  position: relative;
}
.nav-links li:hover > .sub-menu,
.nav-links li:focus-within > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.lang-switch {
  font-family: var(--font-ar);
  background: transparent;
  border: 1px solid var(--gold);
  color: var(--gold);
  padding: 0.4rem 1.1rem;
  border-radius: 40px;
  font-size: 0.9rem;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
    transform var(--dur-fast) var(--ease-out);
}
.lang-switch:hover {
  background: var(--gold);
  color: #0a0a0a;
  transform: translateY(-2px);
}

/* Burger */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  order: 3;
}
.menu-toggle__bar {
  display: block;
  width: 24px;
  height: 2px;
  margin: 0 auto;
  background: #fff;
  border-radius: 2px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast) linear;
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(2) {
  opacity: 0;
}
.menu-toggle.is-open .menu-toggle__bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  background: radial-gradient(circle at 20% 30%, #0f0f15, #010101);
  padding-block: 8rem 6rem;
}

.hero-content {
  max-width: 900px;
  position: relative;
  z-index: 2;
}

/* Faint vertical rules drifting behind the headline. */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0.5;
}
.hero__grid-line {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(199, 161, 122, 0.16) 30%,
    rgba(199, 161, 122, 0.16) 70%,
    transparent
  );
}
.hero__grid-line:nth-child(1) { left: 12%; }
.hero__grid-line:nth-child(2) { left: 38%; }
.hero__grid-line:nth-child(3) { left: 64%; }
.hero__grid-line:nth-child(4) { left: 87%; }

/* Warm glow that tracks the pointer. */
.hero__glow {
  position: absolute;
  width: 60vmax;
  height: 60vmax;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 161, 122, 0.09), transparent 62%);
  pointer-events: none;
  z-index: 1;
  transform: translate3d(-50%, -50%, 0);
  left: 30%;
  top: 40%;
  will-change: transform;
}

.hero-sub {
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 0.85rem;
  color: var(--gold);
  margin-bottom: 1.2rem;
  font-family: "Space Grotesk", var(--font-body);
}
.hero-sub__rule {
  display: block;
  width: 46px;
  height: 1px;
  background: var(--gold);
  opacity: 0.6;
}

.hero-title {
  font-size: clamp(3rem, 8vw, 5.5rem);
  line-height: 1.08;
  font-weight: 800;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

/* The split-text pass wraps each word in its own span, so the gradient has to
   be re-applied to those children — otherwise they inherit the transparent
   colour with no background of their own and vanish. */
.art-accent,
.art-accent .split-word {
  background: linear-gradient(120deg, var(--gold-pale), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-desc {
  font-size: 1.2rem;
  color: var(--text-muted);
  max-width: 640px;
  margin-bottom: 2rem;
}
.hero-desc--narrow {
  max-width: 800px;
}

.btn-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

/* The element carries data-reveal="fade", and motion.css resets transform on
   those — so centring lives on the independent `translate` property, which the
   motion layer never touches. left (not inset-inline-start) because centring is
   direction-neutral and pairs with a physical translate. */
.hero__scroll {
  position: absolute;
  left: 50%;
  bottom: 2rem;
  translate: -50% 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--text-dim);
  font-size: 0.68rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-family: "Space Grotesk", var(--font-body);
  z-index: 2;
}
.hero__scroll-line {
  width: 1px;
  height: 46px;
  background: linear-gradient(to bottom, transparent, var(--gold));
  position: relative;
  overflow: hidden;
}

/* --------------------------------------------------------------------------
   Buttons
   -------------------------------------------------------------------------- */

.btn {
  padding: 1rem 2.2rem;
  border-radius: 40px;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  font-family: var(--font-head);
  position: relative;
  overflow: hidden;
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease-out),
    background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out);
}

.btn-primary {
  background: var(--gold);
  color: #0a0a0a;
  box-shadow: 0 8px 20px rgba(199, 161, 122, 0.3);
}
.btn-primary:hover {
  background: var(--gold-bright);
  transform: translateY(-3px);
  box-shadow: 0 15px 30px rgba(199, 161, 122, 0.4);
}

.btn-outline {
  border: 1.5px solid var(--gold);
  color: var(--gold);
  background: transparent;
}
.btn-outline:hover {
  background: rgba(199, 161, 122, 0.1);
  transform: translateY(-3px);
}

.btn-shop {
  border: 1.5px solid var(--gold-pale);
  color: var(--gold-pale);
  background: var(--gold-15);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.02);
}
.btn-shop:hover {
  background: var(--gold-pale);
  color: #0a0a0a;
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(199, 161, 122, 0.28);
}

.btn:focus-visible,
.section-title__icon:focus-visible {
  outline: 3px solid var(--gold-pale);
  outline-offset: 4px;
}

.btn--block {
  width: 100%;
}

.btn i {
  transition: transform var(--dur) var(--ease-out);
}
.btn__cart-icon {
  transform-origin: 50% 80%;
}
.btn:hover i {
  transform: translateX(4px);
}
.is-rtl .btn:hover i {
  transform: translateX(-4px);
}

.btn[disabled] {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none !important;
}

/* --------------------------------------------------------------------------
   Sections & grids
   -------------------------------------------------------------------------- */

section {
  padding: var(--section-y) 0;
  position: relative;
}
.section--panel { background: var(--bg-panel); }
.section--panel-2 { background: var(--bg-panel-2); }
.section--panel-3 { background: var(--bg-panel-3); }
.section--short { padding: 60px 0; }

.section-title {
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
  letter-spacing: -0.02em;
}
.section-title--minor {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin-top: 3.5rem;
}

.section-sub {
  color: var(--gold);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 3px;
  margin-bottom: 1rem;
  font-weight: 600;
  font-family: "Space Grotesk", var(--font-body);
}

.grid-2,
.grid-3 {
  display: grid;
  gap: 2rem;
  margin-top: 3rem;
}
/* min() so a single track can never be wider than the container it sits in —
   a bare minmax(320px,…) overflows the 6%-padded container below ~364px. */
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); }
.grid--tight { margin-top: 2rem; }
.grid--middle { align-items: center; }

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

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */

.glass-card {
  background: var(--surface);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}
.glass-card--pad { padding: 2rem; }

.dept-card,
.partner-card {
  background: var(--surface-solid);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-radius: 1.8rem;
  padding: 2rem;
  border: 1px solid var(--gold-20);
  position: relative;
  overflow: hidden;
  transition: border-color var(--dur) var(--ease-out), background-color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}

.dept-card:hover,
.glass-card:hover {
  border-color: var(--gold);
  background: rgba(25, 25, 35, 0.8);
}

/* Radial highlight following the pointer across a card. */
.dept-card__glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    rgba(199, 161, 122, 0.14),
    transparent 45%
  );
  transition: opacity var(--dur) var(--ease-out);
}
.dept-card:hover .dept-card__glow { opacity: 1; }

.card-icon {
  font-size: 2.5rem;
  color: var(--gold);
  margin-bottom: 1.2rem;
  display: block;
}

.card-title {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  line-height: 1.25;
}

.partner-card {
  text-align: center;
  background: rgba(0, 0, 0, 0.4);
  text-decoration: none;
  color: inherit;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.partner-card__logo {
  width: 10rem;
  height: 10rem;
  object-fit: contain;
  filter: grayscale(100%) brightness(1.1);
  opacity: 0.8;
  transition: filter var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}
.partner-card:hover .partner-card__logo {
  filter: grayscale(0%);
  opacity: 1;
  transform: scale(1.06);
}
.partner-card h3 { font-size: 1.25rem; }
.partner-card p { color: var(--text-dim); font-size: 0.95rem; }

.stat-badge {
  background: rgba(199, 161, 122, 0.12);
  border-inline-start: 4px solid var(--gold);
  padding: 1rem 1.2rem;
  border-radius: var(--radius-sm);
  transition: background-color var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.stat-badge:hover {
  background: rgba(199, 161, 122, 0.2);
  transform: translateY(-3px);
}
.stat-badge i { margin-inline-end: 0.5rem; }

.check-list {
  list-style: none;
  margin-top: 0.5rem;
  display: grid;
  gap: 0.6rem;
}
.check-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
}
.check-list i { margin-top: 0.3rem; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   Impact
   -------------------------------------------------------------------------- */

/* Two columns on desktop rather than auto-fit: the section usually holds an
   even number of stories, and three columns leaves a ragged final row. */
.story-highlight {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr));
  gap: 2.5rem 3rem;
  background: linear-gradient(135deg, #12121a, #08080c);
  border-radius: var(--radius);
  padding: 2.5rem;
  border: 1px solid #2a241e;
  margin-top: 2rem;
}

.story-date {
  color: var(--gold);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.9rem;
  font-family: "Space Grotesk", var(--font-body);
}
.story-title {
  font-size: 1.8rem;
  margin: 0.5rem 0;
  line-height: 1.25;
}
.story-body p { color: var(--text-muted); }
.story-body p + p { margin-top: 0.8rem; }

/* --------------------------------------------------------------------------
   Parallax bands
   -------------------------------------------------------------------------- */

.paralex {
  position: relative;
  overflow: hidden;
  height: clamp(240px, 40vw, 520px);
}
.paralex picture {
  display: block;
  width: 100%;
  height: 100%;
}
.paralex img {
  width: 100%;
  height: 120%;
  object-fit: cover;
  display: block;
  will-change: transform;
}
.paralex__veil {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(5, 5, 5, 0.55), rgba(5, 5, 5, 0.15), rgba(5, 5, 5, 0.7));
  pointer-events: none;
}

/* --------------------------------------------------------------------------
   Leadership & team
   -------------------------------------------------------------------------- */

.leader-role { font-weight: 600; margin-bottom: 0.8rem; }

.leader-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 2.5rem 2rem;
  gap: 1rem;
}
.leader-card__photo {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  flex-shrink: 0;
}
.leader-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.leader-card__quote {
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.6;
}

.team-card {
  text-align: center;
  padding: 2rem 1.5rem;
  border-radius: var(--radius);
}
.team-img-wrapper {
  width: 160px;
  height: 160px;
  margin: 0 auto 1.5rem;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--gold);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}
.team-img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  filter: grayscale(100%);
  transition: filter var(--dur) var(--ease-out), transform var(--dur-slow) var(--ease-out);
}
.team-card:hover .team-img-wrapper img {
  filter: grayscale(0%);
  transform: scale(1.07);
}
.team-card__name { font-size: 1.6rem; margin-bottom: 0.25rem; }
.team-card__role { font-weight: 500; margin-bottom: 1rem; }
.team-card__bio { color: #ccc; font-size: 0.95rem; }

.team-social {
  margin-top: 1rem;
  display: flex;
  justify-content: center;
  gap: 1rem;
}
.team-social a {
  color: var(--text-dim);
  font-size: 1.1rem;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.team-social a:hover { color: var(--gold); }

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact-intro { font-size: 1.2rem; margin-bottom: 1.5rem; }

.contact-list {
  list-style: none;
  display: grid;
  gap: 1rem;
}
.contact-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
}
.contact-list a {
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.contact-list a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

.social-links {
  display: flex;
  gap: 1.2rem;
  margin-top: 2rem;
}
.social-links a {
  color: var(--text-dim);
  font-size: 1.3rem;
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out);
}
.social-links a:hover { color: var(--gold); }
.social-links--lg a { font-size: 1.5rem; }

/* Forms */
.eyedia-form input,
.eyedia-form select,
.eyedia-form textarea {
  width: 100%;
  padding: 1rem 1.25rem;
  margin-bottom: 1rem;
  background: #1e1e2a;
  /* #333 on #1e1e2a is 1.3:1 — WCAG 1.4.11 wants 3:1 for control boundaries. */
  border: 1px solid #5a5a66;
  border-radius: 2rem;
  color: #fff;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out);
}
.eyedia-form textarea {
  border-radius: 1.5rem;
  resize: vertical;
  min-height: 110px;
}
.eyedia-form input:focus,
.eyedia-form select:focus,
.eyedia-form textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(199, 161, 122, 0.16);
}
/* The visible labels are screen-reader-only, so the placeholder is the only
   label a sighted user gets — it has to clear 4.5:1, not the 3:1 afforded to
   decorative hint text. #9a9aa8 on #1e1e2a is ~5.9:1. */
.eyedia-form ::placeholder { color: #9a9aa8; opacity: 1; }
.eyedia-form select { appearance: none; cursor: pointer; }
.eyedia-form select option { background: #1e1e2a; }

/* Honeypot: hidden from people, still present and submittable for bots.
   Deliberately NOT positioned off-canvas with a physical offset — in RTL,
   overflow to the left is scrollable, so "left: -9999px" would stretch the
   document to ~11,000px wide and push the Arabic page off-screen. Clipping in
   place is direction-agnostic. */
.eyedia-form__hp {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.eyedia-form__captcha {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.eyedia-form__status {
  margin-top: 1rem;
  text-align: center;
  min-height: 1.4em;
  font-size: 0.95rem;
}
.eyedia-form__status.is-ok { color: #2ecc71; }
.eyedia-form__status.is-error { color: #e74c3c; }

/* Field-level validation */
.eyedia-form .is-invalid {
  border-color: #e74c3c;
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  background: #030303;
  padding: 60px 0 30px;
  border-top: 1px solid #1e1e1e;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 3rem;
}
.footer-logo img { width: 150px; height: auto; }
.footer-tagline { margin-top: 10px; }
.footer-copy { font-size: 0.8rem; margin-top: 20px; color: var(--text-dim); }

.site-footer h3 {
  font-size: 1.1rem;
  margin-bottom: 1rem;
}
.is-invisible { visibility: hidden; }

.footer-menu {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}
.footer-menu a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--dur-fast) var(--ease-out), padding-inline-start var(--dur-fast) var(--ease-out);
}
.footer-menu a:hover {
  color: var(--gold);
  padding-inline-start: 6px;
}
.site-footer .social-links { margin-top: 0; }

/* Back to top */
.to-top {
  position: fixed;
  inset-inline-end: 1.5rem;
  bottom: 1.5rem;
  z-index: 900;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: 1px solid var(--gold-30);
  background: rgba(10, 10, 15, 0.85);
  backdrop-filter: blur(10px);
  color: var(--gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out),
    visibility var(--dur) var(--ease-out), background-color var(--dur-fast) var(--ease-out);
}
.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.to-top:hover { background: var(--gold); color: #0a0a0a; }

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

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

/* --------------------------------------------------------------------------
   Inner pages (404, search, single, page)
   -------------------------------------------------------------------------- */

.page-hero {
  padding: calc(var(--header-h) + 5rem) 0 3rem;
  background: radial-gradient(circle at 20% 30%, #0f0f15, #010101);
  text-align: center;
}
.page-hero .section-title { margin-bottom: 0.5rem; }

.entry-content {
  max-width: 820px;
  margin: 0 auto;
}
.entry-content > * + * { margin-top: 1.2rem; }
.entry-content h2 { font-size: 1.9rem; margin-top: 2.5rem; }
.entry-content h3 { font-size: 1.45rem; margin-top: 2rem; }
.entry-content a { color: var(--gold); }
.entry-content ul,
.entry-content ol { padding-inline-start: 1.4rem; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content blockquote {
  border-inline-start: 3px solid var(--gold);
  padding-inline-start: 1.2rem;
  color: var(--text-muted);
  font-style: italic;
}

.search-form-wrap {
  display: flex;
  gap: 0.75rem;
  max-width: 520px;
  margin: 2rem auto 0;
}
.search-form-wrap input[type="search"] {
  flex: 1;
  padding: 0.9rem 1.25rem;
  background: #1e1e2a;
  border: 1px solid #333;
  border-radius: 2rem;
  color: #fff;
  font-family: inherit;
}
.search-form-wrap input[type="search"]:focus {
  outline: none;
  border-color: var(--gold);
}

.result-list {
  display: grid;
  gap: 1.5rem;
  max-width: 820px;
  margin: 0 auto;
  list-style: none;
}
.result-list li {
  padding: 1.5rem;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  transition: border-color var(--dur) var(--ease-out);
}
.result-list li:hover { border-color: var(--gold-30); }
.result-list h2 { font-size: 1.3rem; margin-bottom: 0.5rem; }
.result-list a { color: inherit; text-decoration: none; }
.result-list a:hover { color: var(--gold); }

.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 3rem;
  flex-wrap: wrap;
}
.pagination .page-numbers {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line-soft);
  border-radius: 2rem;
  text-decoration: none;
  color: var(--text-muted);
  transition: all var(--dur-fast) var(--ease-out);
}
.pagination .page-numbers:hover,
.pagination .page-numbers.current {
  border-color: var(--gold);
  color: var(--gold);
}

.error-code {
  font-size: clamp(5rem, 18vw, 12rem);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(120deg, var(--gold-pale), var(--gold));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* --------------------------------------------------------------------------
   Horizontal rails

   A row that scrolls sideways instead of wrapping, so a section stays the same
   height however many cards go into it. Used by the team and by every category
   row in the shop.
   -------------------------------------------------------------------------- */

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.rail-nav {
  display: flex;
  gap: 0.5rem;
  flex-shrink: 0;
}
.rail-nav__btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--gold-30);
  background: transparent;
  color: var(--gold);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out),
    opacity var(--dur-fast) var(--ease-out), border-color var(--dur-fast) var(--ease-out);
}
.rail-nav__btn:hover:not(:disabled) {
  background: var(--gold);
  border-color: var(--gold);
  color: #0a0a0a;
}
.rail-nav__btn:disabled {
  opacity: 0.25;
  cursor: default;
}
/* The arrows point along the row, so they flip with the writing direction. */
.is-rtl .rail-nav__btn i { transform: scaleX(-1); }

/* Keyed off the attribute the JavaScript looks for, so a rail can never be
   wired up in script but left unstyled — or the reverse. */
[data-rail] {
  display: flex;
  overflow-x: auto;
  overflow-y: hidden;
  /* Stops a sideways trackpad flick from also swiping the page back a step. */
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
  scrollbar-color: var(--gold-20) transparent;
}
[data-rail]::-webkit-scrollbar { height: 6px; }
[data-rail]::-webkit-scrollbar-track { background: transparent; }
[data-rail]::-webkit-scrollbar-thumb { background: var(--gold-20); border-radius: 10px; }
[data-rail]:hover::-webkit-scrollbar-thumb { background: var(--gold-30); }

[data-rail] > * { scroll-snap-align: start; }

/* While dragging, the pointer is a grabbing hand and text must not select.
   Suspending snap stops the row fighting the pointer mid-drag. */
[data-rail].is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
  user-select: none;
}
[data-rail].is-dragging * { pointer-events: none; }

/* --------------------------------------------------------------------------
   Store section — the homepage shopfront
   -------------------------------------------------------------------------- */

.section-title--icon {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.section-title__icon {
  display: grid;
  place-items: center;
  width: 3.2rem;
  height: 3.2rem;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid var(--gold-30);
  background: var(--gold-15);
  color: var(--gold);
  font-size: 1.4rem;
  text-decoration: none;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}
.section-title__icon:hover {
  background: var(--gold);
  color: #0a0a0a;
  transform: translateY(-2px) rotate(-6deg);
}

.btn-group--start { justify-content: flex-start; margin-top: 2rem; }

.dept-card--link {
  --dept-card-go-size: 2.4rem;
  --dept-card-go-offset: 1.5rem;
  --dept-card-go-gap: 1rem;
  display: block;
  text-decoration: none;
  color: inherit;
  /* Bottom inset + arrow size + a full 16px gap after the description. */
  padding-block-end: calc(var(--dept-card-go-offset) + var(--dept-card-go-size) + var(--dept-card-go-gap));
}
.dept-card__go {
  position: absolute;
  inset-block-end: var(--dept-card-go-offset);
  inset-inline-start: 2rem;
  width: var(--dept-card-go-size);
  height: var(--dept-card-go-size);
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--gold-30);
  color: var(--gold);
  font-size: 0.8rem;
  transition: background-color var(--dur) var(--ease-out), color var(--dur) var(--ease-out),
    transform var(--dur) var(--ease-out);
}
.is-rtl .dept-card__go i { transform: scaleX(-1); }
.dept-card--link:hover .dept-card__go {
  background: var(--gold);
  color: #0a0a0a;
  transform: translateX(4px);
}
.is-rtl .dept-card--link:hover .dept-card__go { transform: translateX(-4px); }

/* --------------------------------------------------------------------------
   Partner logo ribbon
   -------------------------------------------------------------------------- */

.section--strip { padding-bottom: 40px; }
.marquee--logos { margin-top: 2.5rem; border-block: 1px solid var(--line-soft); }
.marquee--logos .marquee__track { gap: 4rem; align-items: center; }

.marquee__logo {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  /* One box for every logo, whatever shape the file is: contain never crops
     or stretches, so a wide wordmark and a square badge sit level. */
  width: 150px;
  height: 68px;
}
.marquee__logo img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter: grayscale(100%) brightness(1.6);
  opacity: 0.65;
  transition: filter var(--dur) var(--ease-out), opacity var(--dur) var(--ease-out);
}
a.marquee__logo:hover img {
  filter: grayscale(0%) brightness(1);
  opacity: 1;
}

/* --------------------------------------------------------------------------
   Team — horizontal layout
   -------------------------------------------------------------------------- */

/* Scroll behaviour comes from [data-rail]; only the spacing is local. */
.team-rail {
  gap: 1.75rem;
  margin-top: 2.5rem;
  padding-bottom: 1.25rem;
}

.team-rail .team-card {
  flex: 0 0 clamp(238px, 74vw, 288px);
  scroll-snap-align: start;
  text-align: start;
  padding: 0 0 1.75rem;
  overflow: hidden;
}

/* One fixed portrait box per person. Whatever the uploaded file's proportions,
   every card in the row now shows the same shape at the same size. */
.team-rail .team-img-wrapper {
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  margin: 0 0 1.35rem;
  border: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  box-shadow: none;
  position: relative;
  background: linear-gradient(150deg, #16161f, #0b0b10);
}
.team-rail .team-card__name,
.team-rail .team-card__role,
.team-rail .team-card__bio,
.team-rail .team-social {
  padding-inline: 1.5rem;
}
.team-rail .team-card__name { font-size: 1.25rem; }
.team-rail .team-card__bio { font-size: 0.9rem; }
.team-rail .team-social { justify-content: flex-start; }

/* Faces sit in the upper part of a portrait, so a centred crop tends to cut
   foreheads off. Biasing upwards keeps the head in frame. */
.team-img-wrapper img,
.leader-card__photo img {
  object-position: 50% 28%;
}

/* Stands in for a missing photo so the row keeps its rhythm. */
.team-img-wrapper__initial {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3.5rem;
  font-weight: 800;
  color: var(--gold);
  opacity: 0.55;
}
.grid-team .team-img-wrapper__initial { font-size: 3rem; position: static; height: 100%; }

/* --------------------------------------------------------------------------
   Leadership without a photo
   -------------------------------------------------------------------------- */

.leader-solo { max-width: 860px; }

.leader-quote-inline {
  margin-top: 2rem;
  padding: 1.5rem 1.75rem;
  border-inline-start: 3px solid var(--gold);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--gold-15);
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.7;
}
.is-rtl .leader-quote-inline { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.leader-quote-inline i {
  color: var(--gold);
  margin-inline-end: 0.6rem;
  opacity: 0.7;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 980px) {
  .nav-links { gap: 1.4rem; }
  .nav-links a { font-size: 0.95rem; }
}

@media (max-width: 850px) {
  :root { --section-y: 70px; }

  .menu-toggle { display: flex; }

  .nav-wrap {
    position: fixed;
    top: 0;
    inset-inline-start: 0;
    width: min(78vw, 340px);
    height: 100dvh;
    background: rgba(6, 6, 10, 0.97);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-inline-end: 1px solid var(--line);
    transform: translateX(-102%);
    /*
     * visibility keeps the closed drawer out of the tab order — translating it
     * off-canvas alone leaves every link keyboard-focusable but invisible.
     * It is switched discretely rather than transitioned: flipped instantly on
     * open, and only after the slide-out has finished on close.
     */
    visibility: hidden;
    transition: transform 0.45s var(--ease-out), visibility 0s linear 0.45s;
    z-index: 999;
    padding: 6rem 2rem 2rem;
    overflow-y: auto;
    margin: 0;
  }
  .is-rtl .nav-wrap { transform: translateX(102%); }
  .nav-wrap.is-open {
    transform: translateX(0);
    visibility: visible;
    transition: transform 0.45s var(--ease-out), visibility 0s linear 0s;
  }

  .nav-links {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
  }
  .nav-links a { font-size: 1.15rem; }
  .nav-links .sub-menu {
    position: static;
    opacity: 1;
    visibility: visible;
    transform: none;
    background: transparent;
    border: none;
    padding: 0.5rem 0 0 1rem;
  }

  .hero-title { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  .container { padding: 0 6%; }
  .story-highlight { padding: 1.75rem; }
  .grid-2, .grid-3 { margin-top: 2rem; }
}

@media (max-width: 520px) {
  .logo img { width: 118px; }
  .lang-switch { padding: 0.35rem 0.8rem; font-size: 0.8rem; }
  .btn { padding: 0.85rem 1.6rem; font-size: 0.95rem; }
  .btn-group { width: 100%; }
  .btn-group .btn { flex: 1 1 100%; }
  .paralex { height: 220px; }
}

/* Rails are swiped on a touch screen, so the arrows are dead weight there —
   and there is no hover to reveal them with. */
@media (hover: none), (max-width: 700px) {
  .rail-nav { display: none; }
}

@media (max-width: 700px) {
  .section-title--icon { gap: 0.75rem; }
  .section-title__icon { width: 2.6rem; height: 2.6rem; font-size: 1.1rem; }
  .marquee__logo { width: 118px; height: 54px; }
  .marquee--logos .marquee__track { gap: 2.5rem; }
  .team-rail { gap: 1.15rem; }
}
