:root {
  --bg: #ffffff;
  --fg: #111111;
  --invert-bg: #111111;
  --invert-fg: #ffffff;
  --grid: min(1120px, 92vw);
  /* New brand colors */
  --sky: #e6f0ff;
  --violet: #efe6ff;
  --amber: #fff2e0;
  --mint: #eafff4;
  --ink: #0f1020;
  /* Responsive tokens */
  --logo-size: clamp(36px, 4.8vw, 52px);
  --logo-size-footer: clamp(40px, 5.5vw, 64px);
  --hero-ctas-direction: row;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
html {
  overflow-x: hidden;
  scroll-behavior: smooth;
}
body {
  margin: 0;
  color: var(--fg);
  background: var(--bg);
  font-family: "Space Grotesk", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  line-height: 1.6;
  text-rendering: geometricPrecision;
  overflow-x: hidden;
  width: 100%;
}
/* Layering so the fixed parallax sits behind content */
body { position: relative; }
header, main, footer { position: relative; z-index: 1; }

/* Top progress bar */
.progress { position: fixed; inset: 0 auto auto 0; height: 3px; width: 100%; background: #000; transform: scaleX(0); transform-origin: left; z-index: 100; }

.invert { background: var(--invert-bg); color: var(--invert-fg); }
.theme-sky { background: var(--sky); }
.theme-violet { background: var(--violet); }
.theme-amber { background: var(--amber); }
.theme-mint { background: var(--mint); }
.sr-only { position: absolute; left: -9999px; }
.block { display: inline-block; }

.container { width: var(--grid); margin-inline: auto; max-width: 100%; }

/* Header */
.site-header {
  position: sticky; 
  top: 0; 
  z-index: 100;
  backdrop-filter: blur(8px);
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid #000;
  transition: transform .3s ease, box-shadow .3s ease;
}
.site-header .container {
  width: 100%;
  max-width: none;
  padding-inline: clamp(0.75rem, 4vw, 2rem);
}
.site-header.hide { transform: translateY(-100%); }
.header-inner {
  display: grid; 
  grid-template-columns: auto 1fr auto; 
  align-items: center; 
  gap: 1.5rem;
  padding: 0.85rem 0;
}
.header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.brand { 
  display: inline-grid; 
  grid-auto-flow: column; 
  align-items: center; 
  gap: .65rem; 
  text-decoration: none; 
  color: inherit;
  transition: opacity .2s ease;
}
.brand:hover { opacity: 0.8; }
.brand-logo { 
  height: var(--logo-size); 
  width: auto; 
  object-fit: contain; 
  display: inline-block; 
}
.brand-name { 
  font-family: "Playfair Display", Georgia, serif; 
  font-weight: 900; 
  letter-spacing: .02em;
  font-size: clamp(0.95rem, 2vw, 1.1rem);
}

.nav-list { 
  display: flex; 
  gap: 1.5rem; 
  list-style: none; 
  padding: 0; 
  margin: 0; 
  align-items: center;
}
.nav-list a { 
  text-decoration: none; 
  color: inherit; 
  opacity: .9;
  font-weight: 500;
  transition: opacity .2s ease;
  position: relative;
}
.nav-list a:hover { 
  opacity: 1;
}
.nav-list a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: currentColor;
  transition: width .3s ease;
}
.nav-list a:hover::after {
  width: 100%;
}

.actions { display: flex; gap: .6rem; align-items: center; }
.btn { 
  display: inline-block; 
  padding: .7rem 1.1rem; 
  text-decoration: none; 
  border: 1px solid currentColor; 
  transition: transform .15s ease, background .2s ease, box-shadow .2s ease; 
  font-weight: 600;
  border-radius: 4px;
  font-size: 0.95rem;
}
.btn:hover { 
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.btn-solid { background: #000; color: #fff; border-color: #fff; }
.btn-outline { background: transparent; color: inherit; }

/* Mobile nav - Clean hamburger menu */
.nav-burger { 
  display: none;
  background: transparent;
  border: none;
  cursor: pointer; 
  padding: 0;
  margin: 0;
  z-index: 150;
  position: relative;
  width: 40px;
  height: 40px;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
  transition: opacity .2s ease;
}
.nav-burger:hover {
  opacity: 0.7;
}
.nav-burger:active {
  opacity: 0.5;
}
.burger-line { 
  display: block; 
  width: 24px; 
  height: 2px; 
  background: #000; 
  transition: all .25s ease-in-out;
  border-radius: 2px;
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}
.burger-line:nth-child(1) { 
  top: 12px;
}
.burger-line:nth-child(2) { 
  top: 19px;
}
.burger-line:nth-child(3) { 
  top: 26px;
}
.nav-burger.active .burger-line:nth-child(1) { 
  top: 19px;
  transform: translateX(-50%) rotate(45deg); 
}
.nav-burger.active .burger-line:nth-child(2) { 
  opacity: 0;
}
.nav-burger.active .burger-line:nth-child(3) { 
  top: 19px;
  transform: translateX(-50%) rotate(-45deg); 
}

.nav-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 110;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s ease;
  -webkit-tap-highlight-color: transparent;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}
.nav-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* Blur main content when menu is open */
body.menu-open main,
body.menu-open footer {
  filter: blur(3px);
  transition: filter .3s ease;
}
body.menu-open {
  overflow: hidden;
}

.nav-drawer { 
  position: fixed; 
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100vw;
  height: 100vh;
  background: #ffffff; 
  z-index: 120;
  transform: translateX(100%);
  transition: transform .3s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  visibility: hidden;
  padding: 0;
  margin: 0;
}
.nav-drawer.active {
  transform: translateX(0);
  visibility: visible;
}

/* Ensure drawer is completely hidden on desktop */
@media (min-width: 861px) {
  .nav-drawer {
    display: none !important;
  }
  .nav-overlay {
    display: none !important;
  }
}

.nav-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  border-bottom: 1px solid #e0e0e0;
  background: #fafafa;
  flex-shrink: 0;
  min-height: 80px;
  width: 100%;
  margin: 0;
}
.drawer-brand {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: 0.02em;
}
.nav-close {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: .5rem;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, opacity .2s ease;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.nav-close:hover,
.nav-close:active {
  transform: rotate(90deg);
  opacity: 0.7;
}
.nav-close:focus {
  outline: none;
}
.nav-close svg {
  width: 22px;
  height: 22px;
  stroke-width: 2.5;
}

.nav-drawer-list { 
  list-style: none; 
  margin: 0; 
  padding: 0; 
  flex: 1;
  width: 100%;
}
.nav-drawer-list li {
  margin: 0;
  padding: 0;
  border-bottom: 1px solid #f0f0f0;
  width: 100%;
  display: block;
}
.nav-drawer-list li:first-child {
  border-top: none;
}
.nav-drawer-list li:last-child {
  border-bottom: none;
}
.nav-drawer-link { 
  display: block;
  text-decoration: none; 
  color: #111;
  padding: 1.3rem 1.5rem 1.3rem 1.5rem;
  margin: 0;
  font-size: 1.15rem;
  font-weight: 500;
  transition: all .2s ease;
  background: transparent;
  position: relative;
  width: 100%;
  box-sizing: border-box;
  text-indent: 0;
}
.nav-drawer-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: #000;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.nav-drawer-link:hover,
.nav-drawer-link:active {
  background: #f8f8f8;
  color: #000;
}
.nav-drawer-link:hover::before,
.nav-drawer-link:active::before {
  transform: scaleX(1);
}
.drawer-cta { 
  margin-top: auto;
  padding: 1.5rem 1.5rem 1.5rem 1.5rem;
  border-top: 1px solid #e0e0e0;
  background: #fafafa;
  width: 100%;
}
.drawer-cta .btn {
  width: 100%;
  text-align: center;
  display: block;
  padding: 1.2rem 1rem;
  font-size: 1.1rem;
  border-radius: 6px;
  font-weight: 600;
}

@media (max-width: 860px) {
  .header-inner { 
    grid-template-columns: auto 1fr auto; 
    position: relative;
  }
  .nav { display: none !important; }
  .header-right {
    justify-content: flex-end;
  }
  .actions { display: none !important; }
  .nav-burger { 
    display: flex !important;
  }
}

@media (max-width: 480px) {
  .brand-name { display: none; }
  .header-inner {
    padding: 0.75rem 0;
  }
  .nav-burger {
    width: 36px;
    height: 36px;
  }
  .burger-line {
    width: 20px;
  }
  .burger-line:nth-child(1) { 
    top: 11px;
  }
  .burger-line:nth-child(2) { 
    top: 17px;
  }
  .burger-line:nth-child(3) { 
    top: 23px;
  }
  .nav-burger.active .burger-line:nth-child(1) { 
    top: 17px;
    transform: translateX(-50%) rotate(45deg); 
  }
  .nav-burger.active .burger-line:nth-child(3) { 
    top: 17px;
    transform: translateX(-50%) rotate(-45deg); 
  }
}

/* Hero */
.hero { position: relative; border-bottom: 1px solid #000; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; padding: 8vh 0 10vh; align-items: start; max-width: 100%; }
.hero-media { grid-column: 1 / -1; margin-top: 1.2rem; border: 1px solid #000; overflow: hidden; }
.hero-media img { width: 100%; height: clamp(200px, 40vw, 420px); object-fit: cover; display: block; filter: grayscale(100%); }
.scanline { position: absolute; left: 0; right: 0; top: 0; height: 120px; background: linear-gradient(to bottom, rgba(255,255,255,.0), rgba(255,255,255,.35), rgba(255,255,255,.0)); transform: translateY(-120%); mix-blend-mode: screen; }
.hero-kicker { font-family: "IBM Plex Mono", ui-monospace, monospace; letter-spacing: .08em; text-transform: uppercase; font-size: .8rem; opacity: .8; }
.hero-title { font-family: "Playfair Display", Georgia, serif; font-weight: 900; line-height: .95; letter-spacing: .01em; font-size: clamp(2.6rem, 5vw + 1rem, 6rem); margin: .5rem 0 1rem; }
.hero-title .invert { padding: 0 .35rem; line-height: .9; box-decoration-break: clone; }
.hero-lede { font-size: clamp(1.05rem, 1.2vw + .6rem, 1.35rem); max-width: 60ch; }
.hero-ctas { display: flex; gap: .6rem; margin-top: 1rem; }
.hero-ctas { flex-direction: var(--hero-ctas-direction); }
.hero-aside { justify-self: end; }
.code-frame {
  border: 1px solid #000;
  background: #000;
  color: #fff;
  overflow: hidden;
  max-width: 100%;
  position: relative;
}
.code-header { 
  padding: .4rem .6rem; 
  border-bottom: 1px solid #fff; 
  font-family: "IBM Plex Mono", monospace; 
  font-size: .8rem; 
  display: flex; 
  justify-content: space-between; 
}
.code-body {
  margin: 0;
  padding: 0;
  font-family: "IBM Plex Mono", monospace;
  font-size: .85rem;
  overflow: hidden;
  height: 5.5em;
  position: relative;
}
.code-body .line {
  display: block;
  white-space: pre-wrap;
  min-height: 1em;
  word-break: break-all;
}

/* Glitch effect for morphing code */
.glitch-text {
  display: block;
  white-space: pre-wrap;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  padding: .8rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: .85rem;
}

.glitch-text::before,
.glitch-text::after {
  content: attr(data-text);
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #000;
  pointer-events: none;
}

.glitch-text::before {
  text-shadow: -2px 0 #ff00ff;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-1 2.5s infinite linear alternate-reverse;
}

.glitch-text::after {
  text-shadow: 2px 0 #00ffff;
  clip: rect(44px, 450px, 56px, 0);
  animation: glitch-anim-2 2.5s infinite linear alternate-reverse;
}

@keyframes glitch-anim-1 {
  0% {
    clip: rect(17px, 9999px, 94px, 0);
  }
  10% {
    clip: rect(84px, 9999px, 12px, 0);
  }
  20% {
    clip: rect(57px, 9999px, 43px, 0);
  }
  30% {
    clip: rect(25px, 9999px, 78px, 0);
  }
  40% {
    clip: rect(91px, 9999px, 36px, 0);
  }
  50% {
    clip: rect(3px, 9999px, 89px, 0);
  }
  60% {
    clip: rect(68px, 9999px, 51px, 0);
  }
  70% {
    clip: rect(12px, 9999px, 72px, 0);
  }
  80% {
    clip: rect(45px, 9999px, 19px, 0);
  }
  90% {
    clip: rect(76px, 9999px, 63px, 0);
  }
  100% {
    clip: rect(32px, 9999px, 8px, 0);
  }
}

@keyframes glitch-anim-2 {
  0% {
    clip: rect(65px, 9999px, 23px, 0);
  }
  10% {
    clip: rect(8px, 9999px, 95px, 0);
  }
  20% {
    clip: rect(48px, 9999px, 71px, 0);
  }
  30% {
    clip: rect(82px, 9999px, 14px, 0);
  }
  40% {
    clip: rect(21px, 9999px, 58px, 0);
  }
  50% {
    clip: rect(92px, 9999px, 39px, 0);
  }
  60% {
    clip: rect(5px, 9999px, 86px, 0);
  }
  70% {
    clip: rect(71px, 9999px, 27px, 0);
  }
  80% {
    clip: rect(34px, 9999px, 69px, 0);
  }
  90% {
    clip: rect(53px, 9999px, 16px, 0);
  }
  100% {
    clip: rect(11px, 9999px, 77px, 0);
  }
}
@media (max-width: 768px) {
  .code-frame {
    font-size: .75rem;
  }
  .code-header {
    font-size: .7rem;
    padding: .5rem;
  }
  .code-body {
    font-size: .75rem;
    padding: .6rem;
  }
  .code-body .line {
    word-break: break-word;
  }
}
.hero-code { grid-column: 1 / -1; }
@media (min-width: 980px) {
  .hero-grid { grid-template-columns: 1.1fr 1fr; align-items: start; }
  .hero-code { grid-column: 2 / 3; }
  .hero-media { grid-column: 1 / 2; }
}

/* Hero layout remix for desktop: content left, media right */
@media (min-width: 980px) {
  .hero-grid {
    grid-template-columns: 1.1fr 1fr;
    grid-template-areas:
      "kicker media"
      "title  media"
      "lede   media"
      "ctas   media"
      "code   aside";
  }
  .hero-kicker { grid-area: kicker; }
  .hero-title { grid-area: title; }
  .hero-lede { grid-area: lede; }
  .hero-ctas { grid-area: ctas; }
  .hero-media { grid-area: media; margin-top: 0; }
  .hero-code { grid-area: code; }
  .hero-aside { grid-area: aside; justify-self: end; align-self: start; }
}

.marquee { position: relative; border-top: 1px solid #000; overflow: hidden; white-space: nowrap; width: 100%; max-width: 100vw; }
.marquee-track { display: inline-flex; gap: 4rem; padding: .6rem 2rem; font-family: "IBM Plex Mono", ui-monospace, monospace; animation: slide 22s linear infinite; }
.marquee-track span { letter-spacing: .06em; }
/* Infinite scroll for both tracks: ensure track width spans more than 2x content */
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* Bands & Sections */
.band { border-block: 1px solid #000; }
.band-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; }
.band-item { padding: 1.2rem; text-align: center; }
.badge { display: inline-block; border: 1px solid currentColor; padding: .25rem .5rem; border-radius: 999px; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: .8rem; letter-spacing: .08em; }

.section { padding: 10vh 0; border-bottom: 1px solid #000; overflow: hidden; }
/* Remove bottom gap under the pinned work scroller */
.stories.section { padding-bottom: 0; }
.section-title { font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: clamp(1.8rem, 2.8vw + 1rem, 3rem); margin: 0 0 .8rem; }

/* Mission */
.mission-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.mission-media { display: grid; grid-template-columns: repeat(6, 1fr); grid-auto-rows: 90px; gap: 6px; }
.tile { background: #fff; border: 1px solid #000; position: relative; overflow: hidden; }
.tile::after { content: ""; position: absolute; inset: 0; background-size: cover; background-position: center; filter: grayscale(100%); }
.tile-a::after { background-image: url('https://images.unsplash.com/photo-1525351326368-efbb5cb6814d?auto=format&fit=crop&w=1200&q=60'); }
.tile-b::after { background-image: url('https://images.unsplash.com/photo-1518770660439-4636190af475?auto=format&fit=crop&w=1200&q=60'); }
.tile-c::after { background-image: url('https://images.unsplash.com/photo-1556157382-97eda2d62296?auto=format&fit=crop&w=1200&q=60'); }
.tile-a { grid-column: 1 / span 4; grid-row: 1 / span 3; }
.tile-b { grid-column: 3 / span 4; grid-row: 3 / span 3; }
.tile-c { grid-column: 2 / span 2; grid-row: 6 / span 2; }
.checks { list-style: none; padding: 0; margin: 1rem 0; }
.checks li { padding-left: 1.4rem; position: relative; }
.checks li::before { content: "✓"; position: absolute; left: 0; top: 0; font-family: "IBM Plex Mono", monospace; }
.cta-row { display: flex; gap: 1rem; margin-top: 1rem; }
.stack-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 1rem; }
.stack-tags span { border: 1px solid currentColor; padding: .2rem .5rem; font-family: "IBM Plex Mono", monospace; font-size: .8rem; }
.about-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1.2rem; }
.about-features .feat { border: 1px solid #000; padding: 1rem; }

/* Impact */
.impact-grid { display: grid; grid-template-columns: 1fr; gap: 2rem; }
.impact-image { border: 1px solid currentColor; overflow: hidden; }
.impact-image img { width: 100%; height: clamp(200px, 40vw, 420px); object-fit: cover; display: block; filter: grayscale(100%); }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; border: 1px solid currentColor; }
.stat { padding: 1.8rem 1.2rem; text-align: center; }
.stat-num { font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: clamp(2rem, 3vw + 1rem, 3.4rem); line-height: .9; }
.stat-label { font-size: .9rem; opacity: .75; }

/* Programs */
.programs-head { display: grid; gap: .5rem; margin-bottom: 1.2rem; }
.program-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.program-cards-four { grid-template-columns: repeat(4, 1fr); }
.card { border: 1px solid #000; padding: 1.2rem; display: grid; gap: .5rem; }
.card-media { width: 100%; height: 200px; object-fit: cover; border: 1px solid currentColor; filter: grayscale(100%); }
.card-title { font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: 1.6rem; margin: 0; }
.card-link {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  padding: .6rem .9rem;
  border: 1px solid currentColor;
  border-radius: 6px;
  transition: transform .08s ease, background .2s ease, color .2s ease;
}
.card-link:hover { transform: translateY(-1px); }
/* Light cards: outline style */
.card:not(.invert) .card-link { background: transparent; color: inherit; }
/* Dark cards: solid contrast button */
.card.invert .card-link { background: #fff; color: #000; border-color: #fff; }
.card:hover { transform: translateY(-2px); transition: transform .1s ease; }

/* Stories / Carousel */
.carousel-section { overflow: hidden; position: relative; z-index: 2; background: #ffffff; }
.stories-header { text-align: center; margin-bottom: 3rem; position: relative; z-index: 5; }
.stories-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 2rem; align-items: start; position: relative; z-index: 2; }
.stories { overflow: hidden; position: relative; z-index: 2; background: #ffffff; }
.stories::before {
  content: "MOVOR";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: clamp(8rem, 20vw, 18rem);
  color: #f5f5f5;
  letter-spacing: 0.1em;
  z-index: 1;
  pointer-events: none;
  user-select: none;
}
.stories::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: 
    repeating-linear-gradient(0deg, transparent, transparent 2px, #f8f8f8 2px, #f8f8f8 3px),
    repeating-linear-gradient(90deg, transparent, transparent 2px, #f8f8f8 2px, #f8f8f8 3px);
  background-size: 40px 40px;
  opacity: 0.5;
  z-index: 1;
  pointer-events: none;
}
.carousel-container {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2rem;
  margin-bottom: 2rem;
  z-index: 5;
}

.carousel-track-container {
  overflow: hidden;
  flex: 1;
}

.carousel-track {
  display: flex;
  transition: transform 0.5s ease;
}

.carousel-slide {
  min-width: 100%;
  flex-shrink: 0;
}

.carousel-btn {
  background: #000;
  color: #fff;
  border: 1px solid #000;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
  z-index: 10;
}

.carousel-btn:hover {
  background: #fff;
  color: #000;
  transform: scale(1.1);
}

.carousel-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.carousel-btn:disabled:hover {
  transform: none;
  background: #000;
  color: #fff;
}

.carousel-btn svg {
  width: 24px;
  height: 24px;
}

.carousel-dots {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  padding: 1rem 0;
  position: relative;
  z-index: 5;
}

.carousel-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid #000;
  background: transparent;
  cursor: pointer;
  transition: all 0.2s ease;
  padding: 0;
}

.carousel-dot.active {
  background: #000;
}

.carousel-dot:hover {
  transform: scale(1.2);
}

.stories-intro { position: sticky; top: 5.5rem; align-self: start; }
.stories-dots { list-style: none; display: flex; gap: .4rem; padding: .6rem 0 0; margin: 0; }
.stories-dots button { width: 10px; height: 10px; border-radius: 999px; border: 1px solid currentColor; background: transparent; cursor: pointer; }
.stories-dots button[aria-current="true"] { background: #000; color: #fff; }
.story-viewport { position: relative; overflow: hidden; }
.story-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: #0001; }
.story-progress span { display: block; height: 100%; width: 0%; background: #000; transform-origin: left; }
.story-list { display: flex; gap: 1rem; will-change: transform; }
.story-spacer { flex: 0 0 calc(65vw - 1rem); }
.story { border: 1px solid #000; padding: 1.2rem; }
.story-media { width: 100%; height: 200px; object-fit: cover; border: 1px solid currentColor; filter: grayscale(100%); margin-bottom: .8rem; }
.story-logo-container {
  width: 100%;
  height: 200px;
  border: 1px solid currentColor;
  margin-bottom: .8rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  padding: 2rem;
}
.story.invert .story-logo-container {
  background: #1a1a1a;
}
.story-logo {
  max-width: 80%;
  max-height: 80%;
  object-fit: contain;
  filter: grayscale(0);
}
.story blockquote { margin: 0 0 .6rem; font-family: "Playfair Display", Georgia, serif; font-weight: 700; font-size: 1.2rem; line-height: 1.3; }
.story figcaption { font-family: "IBM Plex Mono", monospace; letter-spacing: .05em; font-size: .85rem; }
.story figcaption a {
  color: inherit;
  text-decoration: underline;
  opacity: 0.85;
  transition: opacity 0.2s ease;
}
.story figcaption a:hover {
  opacity: 1;
}
/* Panels sized for horizontal track */
.story { min-width: clamp(260px, 60vw, 520px); }
.carousel-slide.story { min-width: 100%; max-width: 600px; margin: 0 auto; }
.story.active { outline: 2px solid #000; }
.brand-story { display: grid; place-items: center; }
.brand-story .brand-fill { font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: clamp(2rem, 10vw, 6rem); letter-spacing: .08em; }
.brand-overlay { position: absolute; inset: 0; display: grid; place-items: center; background: var(--invert-bg); color: var(--invert-fg); opacity: 0; transform: scale(0.96); z-index: 1; pointer-events: none; will-change: transform, opacity; }
.brand-overlay-text { font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: clamp(3rem, 14vw, 12rem); letter-spacing: .08em; }
/* Always-visible parallax layer behind Work -> Contact */
.bridge-parallax {
  position: fixed;
  inset: 0 0 auto 0;
  height: 100vh;
  width: 100%;
  background-image: url('https://images.unsplash.com/photo-1498050108023-c5249f4df085?auto=format&fit=crop&w=2000&q=80');
  background-size: cover;
  background-position: center 0%;
  background-attachment: fixed; /* fallback */
  filter: grayscale(100%) blur(6px) brightness(0.85);
  will-change: filter;
  z-index: 0;
  pointer-events: none;
  opacity: 0; /* toggled via JS within range */
  transition: opacity .3s ease;
}

.bridge-parallax::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  pointer-events: none;
}

.bridge-parallax.is-visible { opacity: 1; }
.work-bg {
  height: clamp(300px, 60vh, 600px);
  width: 100%;
  background-image: url('https://images.unsplash.com/photo-1487058792275-0ad4aaf24ca7?auto=format&fit=crop&w=1600&q=80');
  background-size: cover;
  background-position: center 0%;
  background-attachment: fixed; /* simple CSS parallax fallback */
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
  filter: grayscale(100%);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  /* visible by default so no blank gap under pinned work */
}

.work-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4);
}

.work-bg-inner {
  position: relative;
  z-index: 1;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 100%;
}

.work-bg-content {
  color: white;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 4vw, 3.5rem);
  letter-spacing: 0.02em;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  margin-bottom: 1rem;
  line-height: 1.2;
}

.work-bg-subtext {
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  margin: 0 0 2.5rem;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  line-height: 1.5;
}

.work-bg-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-top: 2rem;
  width: 100%;
}

.work-bg-feature {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem;
}

.feature-icon {
  width: clamp(2.5rem, 5vw, 3.5rem);
  height: clamp(2.5rem, 5vw, 3.5rem);
  stroke: white;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
  flex-shrink: 0;
}

.feature-label {
  color: white;
  font-weight: 600;
  font-size: clamp(0.9rem, 1.2vw, 1.1rem);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
  font-family: "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.3;
}


/* CTA */
.cta-inner { display: grid; gap: 1rem; justify-items: center; text-align: center; }
.cta-title { font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: clamp(1.8rem, 2vw + 1rem, 3rem); margin: 0; }
.donate-form { display: grid; gap: 1rem; }
.donate-amounts { display: flex; gap: .5rem; border: none; margin: 0; padding: 0; flex-wrap: wrap; justify-content: center; }
.donate-amounts label { position: relative; }
.donate-amounts input { position: absolute; opacity: 0; }
.donate-amounts span { display: inline-block; border: 1px solid currentColor; padding: .6rem .8rem; cursor: pointer; white-space: nowrap; }
.donate-amounts input:checked + span { background: #fff; color: #000; }
.cta-actions { display: flex; gap: .6rem; justify-content: center; flex-wrap: wrap; }

/* Footer */
.site-footer { padding: 2rem 0; background: #ffffff; color: #111111; border-top: 1px solid #000; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; align-items: start; position: relative; z-index: 2; }
.foot-brand .brand-mark { display: inline-block; margin-bottom: .5rem; }
.foot-brand .brand-logo { height: var(--logo-size-footer); width: auto; object-fit: contain; display: inline-block; margin-bottom: .5rem; }
.foot-nav { display: grid; gap: .35rem; }
.foot-nav a { text-decoration: none; color: inherit; }
.foot-legal { justify-self: end; text-align: right; opacity: .75; }
/* Improve legal buttons layout and color contrast */
.foot-legal p { display: inline-flex; gap: .5rem; align-items: center; }
.foot-legal .btn { padding: .45rem .7rem; font-size: .9rem; border-radius: 6px; }
.foot-legal .btn.btn-solid { background: #000; color: #fff; border-color: #fff; }
.foot-legal .btn.btn-outline { background: transparent; color: inherit; border-color: currentColor; }

/* Responsiveness */
@media (max-width: 1200px) {
  .program-cards-four { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-ctas { --hero-ctas-direction: column; }
  .btn { width: 100%; text-align: center; }
  .hero-aside { justify-self: start; }
  .band-grid { grid-template-columns: repeat(2, 1fr); }
  .mission-grid { grid-template-columns: 1fr; }
  .mission-media { display: none; }
  .cta-row { flex-direction: column; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .program-cards, .program-cards-four { grid-template-columns: 1fr; }
  .stories-grid { grid-template-columns: 1fr; }
  .story-list { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .foot-legal { justify-self: start; text-align: left; }

  /* Ensure no overflow on mobile */
  .section { padding: 6vh 0; }
  .hero-grid { padding: 6vh 0 8vh; }
}

@media (max-width: 768px) {
  .container { width: min(90vw, var(--grid)); }
  .band-grid { grid-template-columns: 1fr; }
  .about-features { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }

  /* CTA section mobile */
  .donate-amounts {
    flex-direction: column;
    width: 100%;
  }
  .donate-amounts label {
    width: 100%;
  }
  .donate-amounts span {
    display: block;
    text-align: center;
    width: 100%;
  }
  .cta-actions {
    flex-direction: column;
    width: 100%;
  }
  .cta-actions .btn {
    width: 100%;
    text-align: center;
  }

  /* Carousel mobile layout */
  .carousel-section {
    position: relative;
    z-index: 10;
  }

  .carousel-section .container {
    position: relative;
    z-index: 10;
  }

  .carousel-container {
    gap: 0.5rem;
    z-index: 10;
    position: relative;
  }

  .carousel-btn {
    width: 36px;
    height: 36px;
    z-index: 10;
    flex-shrink: 0;
  }

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

  .carousel-track-container {
    z-index: 10;
    position: relative;
  }

  .carousel-slide.story {
    max-width: 100%;
    z-index: 10;
    padding: 1rem;
    position: relative;
    background: #fff;
    border: 1px solid #000;
  }

  .carousel-slide.story.invert {
    background: #111;
    color: #fff;
  }

  .carousel-slide.story.invert .story-logo-container {
    background: #1a1a1a;
  }

  .carousel-slide.story blockquote,
  .carousel-slide.story figcaption {
    color: inherit;
  }

  .carousel-slide.story figcaption a {
    color: inherit;
  }

  .story-logo-container {
    height: 150px;
    padding: 1.5rem;
    position: relative;
    z-index: 10;
  }

  .story blockquote {
    font-size: 1rem;
    line-height: 1.2;
    color: #000;
  }

  .story.invert blockquote {
    color: #fff;
  }

  .story figcaption {
    font-size: 0.75rem;
    color: #000;
  }

  .story.invert figcaption {
    color: #fff;
  }

  .brand-story.invert .brand-fill {
    color: #fff;
  }

  .stories-header {
    z-index: 10;
    margin-bottom: 2rem;
    position: relative;
  }

  .stories-header p {
    font-size: 0.9rem;
  }

  .carousel-dots {
    z-index: 10;
    padding: 1.5rem 0 1rem;
    position: relative;
  }

  .carousel-dot {
    width: 10px;
    height: 10px;
  }

  .brand-overlay {
    z-index: 1 !important;
  }

  .stories::before {
    z-index: 1 !important;
  }

  .bridge-parallax {
    z-index: 0 !important;
  }

  .work-bg {
    z-index: 0 !important;
  }

  /* Stories mobile layout */
  .stories-intro { position: static; margin-bottom: 1.5rem; }
  .story-viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
  }
  .story {
    min-width: 85vw;
    scroll-snap-align: start;
  }

  /* Work-bg mobile adjustments */
  .work-bg {
    height: auto;
    min-height: clamp(500px, 80vh, 700px);
    padding: 4rem 0;
  }
  .work-bg-inner {
    padding: 0 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2rem;
  }
  .work-bg-content {
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    line-height: 1.2;
    margin-bottom: 0;
  }
  .work-bg-subtext {
    font-size: clamp(1rem, 3vw, 1.2rem);
    margin: 0;
    line-height: 1.5;
  }
  .work-bg-features {
    grid-template-columns: 1fr;
    gap: 2.5rem;
    margin-top: 1rem;
  }
  .work-bg-feature {
    gap: 1rem;
  }
  .feature-icon {
    width: 3rem;
    height: 3rem;
  }
  .feature-label {
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .container { width: min(92vw, var(--grid)); }
  .hero-title { font-size: clamp(2rem, 8vw, 2.6rem); }

  /* Even smaller carousel on tiny screens */
  .carousel-section {
    z-index: 10;
  }

  .carousel-section .container {
    z-index: 10;
  }

  .carousel-btn {
    width: 32px;
    height: 32px;
    z-index: 10;
  }

  .carousel-btn svg {
    width: 16px;
    height: 16px;
  }

  .carousel-slide.story {
    z-index: 10;
    background: #fff;
    border: 1px solid #000;
  }

  .carousel-slide.story.invert {
    background: #111;
    color: #fff;
  }

  .story-logo-container {
    height: 120px;
    padding: 1rem;
    z-index: 10;
  }

  .story blockquote {
    font-size: 0.9rem;
    color: #000;
  }

  .story.invert blockquote {
    color: #fff;
  }

  .story figcaption {
    font-size: 0.7rem;
    color: #000;
  }

  .story.invert figcaption {
    color: #fff;
  }

  .brand-overlay {
    z-index: 1 !important;
  }
  .section-title { font-size: clamp(1.5rem, 6vw, 1.8rem); }
  
  /* Simplify decorative elements */
  .stories::before { font-size: clamp(4rem, 15vw, 8rem); }
  
  /* Story cards */
  .story { min-width: 90vw; padding: 1rem; }
  
  /* Improve touch targets */
  .btn { min-height: 44px; }
  
  /* Work-bg small mobile adjustments */
  .work-bg {
    padding: 3rem 0;
    min-height: clamp(450px, 75vh, 600px);
  }
  .work-bg-inner {
    padding: 0 1rem;
    gap: 1.5rem;
  }
  .work-bg-content {
    font-size: clamp(1.5rem, 6vw, 2rem);
    line-height: 1.25;
  }
  .work-bg-subtext {
    font-size: 0.95rem;
  }
  .work-bg-features {
    gap: 2rem;
    margin-top: 0.5rem;
  }
  .feature-icon {
    width: 2.5rem;
    height: 2.5rem;
  }
  .feature-label {
    font-size: 0.9rem;
  }
}

/* Mobile device optimizations */
body.mobile-device {
  /* Disable expensive effects */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  -webkit-tap-highlight-color: rgba(0, 0, 0, 0.1);
}

/* Optimize header for mobile */
body.mobile-device .site-header {
  backdrop-filter: none;
  background: #ffffff;
}

body.mobile-device .nav-drawer {
  -webkit-overflow-scrolling: touch;
}

body.mobile-device * {
  /* Hardware acceleration for better performance */
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Disable scanline effect on mobile */
body.mobile-device .scanline {
  display: none;
}

/* Keep marquee animation on all devices */

/* Simplify parallax on mobile */
body.mobile-device .bridge-parallax {
  position: absolute !important;
  background-attachment: scroll !important;
  filter: grayscale(100%) blur(2px) brightness(0.85) !important;
  will-change: auto;
}

body.mobile-device .work-bg {
  background-attachment: scroll !important;
}

/* Disable parallax transforms on mobile */
body.mobile-device .tile {
  transform: none !important;
}

/* Simplify work section on mobile - no pinning */
body.mobile-device .stories {
  position: relative !important;
  height: auto !important;
}

/* Ensure smooth scrolling on mobile */
body.mobile-device .story-viewport {
  -webkit-overflow-scrolling: touch;
  scroll-behavior: smooth;
}

/* Reduce motion for better performance */
body.mobile-device .hero-media img,
body.mobile-device .card-media,
body.mobile-device .story-media {
  transition: none !important;
  transform: none !important;
}

/* Optimize images on mobile */
body.mobile-device img {
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

/* Remove complex filters on mobile */
body.mobile-device .cta-inner {
  filter: none !important;
}

/* Simplify transitions on mobile */
body.mobile-device * {
  transition-duration: 0.2s !important;
}

body.mobile-device .btn,
body.mobile-device a {
  transition-duration: 0.15s !important;
}

/* Bridge section */
.process .process-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; counter-reset: step; }
.process .step { border: 1px solid #000; padding: 1rem; position: relative; }
.process .step h3 { margin: 0 0 .4rem; font-family: "Playfair Display", Georgia, serif; }
.process .step::before { counter-increment: step; content: counter(step); position: absolute; top: .6rem; right: .6rem; font-family: "IBM Plex Mono", monospace; border: 1px solid currentColor; padding: .1rem .35rem; }

@media (max-width: 980px) {
  .process .process-steps { grid-template-columns: 1fr; }
}
.bridge { position: relative; z-index: 3; }
.bridge-grid { display: grid; gap: 1rem; align-items: center; grid-template-columns: 1.1fr 1fr; }
.bridge-title { font-family: "Playfair Display", Georgia, serif; font-weight: 900; margin: 0; font-size: clamp(1.8rem, 2.4vw + 1rem, 2.8rem); display: grid; gap: .4rem; }
.bridge-roller { display: inline-grid; overflow: hidden; height: 1.2em; vertical-align: bottom; }
.bridge-roller-inner { position: relative; height: 1.2em; }
.bridge-roller-inner span { position: absolute; left: 0; top: 0; display: inline-block; opacity: 0; transform: translateY(30%); }
.bridge-copy { margin: .2rem 0 0; opacity: .85; }
.bridge-collage { position: relative; height: clamp(220px, 40vw, 360px); }
.bridge-collage .shot { position: absolute; object-fit: cover; filter: grayscale(100%); border: 1px solid #000; }
.bridge-collage .shot-a { inset: 0 40% 30% 0; }
.bridge-collage .shot-b { inset: 20% 0 0 50%; }
.bridge-collage .shot-c { inset: 55% 20% 0 5%; }
.bridge-collage img { width: 100%; height: 100%; }
@media (max-width: 980px) {
  .bridge-grid { grid-template-columns: 1fr; }
}

/* Subtle focus styles for accessibility */
a:focus, button:focus, input:focus { outline: 2px dashed currentColor; outline-offset: 2px; }

/* Page Loader */
.page-loader {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  transition: opacity 0.5s ease, visibility 0.5s ease;
}

.page-loader.hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-container {
  --uib-size: 60px;
  --uib-color: black;
  --uib-speed: 1.5s;
  --uib-dot-size: calc(var(--uib-size) * 0.1);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: calc(var(--uib-size) * 0.64);
  width: calc(var(--uib-size) * 0.64);
}

@keyframes jump {
  0%,
  100% {
    transform: translateY(120%);
  }

  50% {
    transform: translateY(-120%);
  }
}

.loader-container .dot {
  --uib-d1: -0.48;
  --uib-d2: -0.4;
  --uib-d3: -0.32;
  --uib-d4: -0.24;
  --uib-d5: -0.16;
  --uib-d6: -0.08;
  --uib-d7: -0;
  position: absolute;
  bottom: calc(var(--uib-bottom) + var(--uib-dot-size) / 2);
  right: calc(var(--uib-right) + var(--uib-dot-size) / 2);
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--uib-dot-size);
  width: var(--uib-dot-size);
  animation: jump var(--uib-speed) ease-in-out infinite;
  opacity: var(--uib-scale);
  will-change: transform;
  backface-visibility: hidden;
}

.loader-container .dot::before {
  content: '';
  height: 100%;
  width: 100%;
  background-color: var(--uib-color);
  border-radius: 50%;
  transform: scale(var(--uib-scale));
  transition: background-color 0.3s ease;
}

.loader-container .dot:nth-child(1) {
  --uib-bottom: 24%;
  --uib-right: -35%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d1));
}
.loader-container .dot:nth-child(2) {
  --uib-bottom: 16%;
  --uib-right: -6%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d2));
}
.loader-container .dot:nth-child(3) {
  --uib-bottom: 8%;
  --uib-right: 23%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d3));
}
.loader-container .dot:nth-child(4) {
  --uib-bottom: -1%;
  --uib-right: 51%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d4));
}
.loader-container .dot:nth-child(5) {
  --uib-bottom: 38%;
  --uib-right: -17.5%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d2));
}
.loader-container .dot:nth-child(6) {
  --uib-bottom: 30%;
  --uib-right: 10%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d3));
}
.loader-container .dot:nth-child(7) {
  --uib-bottom: 22%;
  --uib-right: 39%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d4));
}
.loader-container .dot:nth-child(8) {
  --uib-bottom: 14%;
  --uib-right: 67%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d5));
}
.loader-container .dot:nth-child(9) {
  --uib-bottom: 53%;
  --uib-right: -0.8%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d3));
}
.loader-container .dot:nth-child(10) {
  --uib-bottom: 44.5%;
  --uib-right: 27%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d4));
}
.loader-container .dot:nth-child(11) {
  --uib-bottom: 36%;
  --uib-right: 55.7%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d5));
}
.loader-container .dot:nth-child(12) {
  --uib-bottom: 28.7%;
  --uib-right: 84.3%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d6));
}
.loader-container .dot:nth-child(13) {
  --uib-bottom: 66.8%;
  --uib-right: 15%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d4));
}
.loader-container .dot:nth-child(14) {
  --uib-bottom: 58.8%;
  --uib-right: 43%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d5));
}
.loader-container .dot:nth-child(15) {
  --uib-bottom: 50%;
  --uib-right: 72%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d6));
}
.loader-container .dot:nth-child(16) {
  --uib-bottom: 42%;
  --uib-right: 100%;
  animation-delay: calc(var(--uib-speed) * var(--uib-d7));
}

.loader-container .dot:nth-child(3) {
  --uib-scale: 0.98;
}
.loader-container .dot:nth-child(2),
.loader-container .dot:nth-child(8) {
  --uib-scale: 0.96;
}
.loader-container .dot:nth-child(1),
.loader-container .dot:nth-child(7) {
  --uib-scale: 0.94;
}
.loader-container .dot:nth-child(6),
.loader-container .dot:nth-child(12) {
  --uib-scale: 0.92;
}
.loader-container .dot:nth-child(5),
.loader-container .dot:nth-child(11) {
  --uib-scale: 0.9;
}
.loader-container .dot:nth-child(10),
.loader-container .dot:nth-child(16) {
  --uib-scale: 0.88;
}
.loader-container .dot:nth-child(9),
.loader-container .dot:nth-child(15) {
  --uib-scale: 0.86;
}
.loader-container .dot:nth-child(14) {
  --uib-scale: 0.84;
}
.loader-container .dot:nth-child(13) {
  --uib-scale: 0.82;
}

/* Skip link */
.skip { position: absolute; left: -9999px; top: 0; background: #000; color: #fff; padding: .4rem .6rem; }
.skip:focus { left: 1rem; top: 1rem; }

/* Back to top button */
.to-top {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid #000;
  background: #000;
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  display: grid;
  place-items: center;
  z-index: 110;
  transform: translateY(20px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}
.to-top.is-visible { opacity: 1; transform: translateY(0); }
.to-top:focus { outline: 2px dashed #fff; outline-offset: 2px; }

/* Services page specific styles */
.section-intro {
  max-width: 60ch;
  margin: 0 auto 3rem;
  text-align: center;
  font-size: 1.1rem;
  opacity: 0.85;
}

.services-detail .service-block {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
  margin-bottom: 6rem;
  padding: 3rem;
  border: 1px solid #000;
  background: #fff;
}

.services-detail .service-block.invert {
  background: #111;
  color: #fff;
}

.services-detail .service-block-reverse {
  direction: rtl;
}

.services-detail .service-block-reverse > * {
  direction: ltr;
}

.service-badge {
  display: inline-block;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
  border: 1px solid currentColor;
  margin-bottom: 1rem;
  border-radius: 999px;
}

.service-title {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: clamp(1.8rem, 2.5vw, 2.5rem);
  margin: 0 0 1rem;
  line-height: 1.2;
}

.service-description {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.service-visual {
  overflow: hidden;
  border: 1px solid currentColor;
}

.service-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  filter: grayscale(100%);
  min-height: 400px;
  max-height: 500px;
}

.package-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid currentColor;
}

.package-price {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.1rem;
  font-weight: 600;
  opacity: 0.85;
}

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

@media (max-width: 1200px) {
  .program-cards-three {
    grid-template-columns: 1fr;
  }

  .services-detail .service-block {
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 2rem;
    margin-bottom: 3rem;
  }

  .services-detail .service-block-reverse {
    direction: ltr;
  }

  .service-visual img {
    min-height: 300px;
    max-height: 400px;
  }
}

@media (max-width: 768px) {
  .services-detail .service-block {
    padding: 1.5rem;
    margin-bottom: 2rem;
  }

  .service-visual img {
    min-height: 250px;
    max-height: 300px;
  }

  .section-intro {
    font-size: 1rem;
    margin-bottom: 2rem;
  }
}

/* Contact page specific styles */
.contact-hero .hero-grid {
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.contact-hero .hero-media {
  margin-top: 2rem;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.5fr;
  gap: 4rem;
  align-items: start;
}

.contact-description {
  font-size: 1.05rem;
  line-height: 1.6;
  margin-bottom: 2rem;
  opacity: 0.85;
}

.contact-details {
  margin-bottom: 3rem;
}

.contact-detail-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 2rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.contact-detail-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

.contact-icon {
  width: 48px;
  height: 48px;
  border: 1px solid currentColor;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.contact-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.contact-detail-item h3 {
  margin: 0 0 0.25rem;
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.1rem;
}

.contact-detail-item p {
  margin: 0;
  opacity: 0.75;
}

.contact-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  padding: 2rem;
  background: rgba(0, 0, 0, 0.03);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.stat-item {
  text-align: center;
}

.stat-item .stat-num {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-item .stat-label {
  font-size: 0.9rem;
  opacity: 0.75;
}

.contact-form-wrapper {
  background: #fff;
  border: 1px solid #000;
  padding: 3rem;
  position: relative;
}

.contact-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.form-group {
  display: flex;
  flex-direction: column;
}

.form-group.full-width {
  grid-column: 1 / -1;
}

.form-group label {
  font-weight: 600;
  margin-bottom: 0.5rem;
  font-size: 0.95rem;
}

.required {
  color: #e53e3e;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
  padding: 0.75rem;
  border: 1px solid #ddd;
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  background: #fff;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #000;
  box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.1);
}

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

.radio-group {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.radio-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  padding: 0.75rem;
  border: 1px solid #ddd;
  transition: all 0.2s ease;
  font-weight: 400;
}

.radio-label:hover {
  border-color: #000;
  background: rgba(0, 0, 0, 0.02);
}

.radio-label input[type="radio"] {
  margin: 0;
  cursor: pointer;
}

.radio-label input[type="radio"]:checked + span {
  font-weight: 600;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  cursor: pointer;
  font-weight: 400;
  font-size: 0.95rem;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 0.25rem;
  cursor: pointer;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

.service-specific-fields {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.service-specific-fields .form-group.full-width {
  grid-column: 1 / -1;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  margin-top: 1rem;
}

.btn-large {
  padding: 1rem 2.5rem;
  font-size: 1.05rem;
  min-width: 200px;
}

.form-note {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.7;
  font-family: "IBM Plex Mono", monospace;
}

.form-success {
  text-align: center;
  padding: 3rem 2rem;
}

.success-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 1.5rem;
  border: 3px solid #48bb78;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #48bb78;
}

.success-icon svg {
  width: 40px;
  height: 40px;
  stroke-width: 3;
}

.form-success h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 900;
  font-size: 2rem;
  margin: 0 0 1rem;
}

.form-success p {
  font-size: 1.1rem;
  opacity: 0.85;
  margin-bottom: 2rem;
}

.faq-section {
  background: var(--mint);
}

.faq-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-top: 2rem;
}

.faq-item {
  padding: 2rem;
  border: 1px solid #000;
  background: #fff;
}

.faq-item h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: 1.3rem;
  margin: 0 0 1rem;
  line-height: 1.3;
}

.faq-item p {
  margin: 0;
  line-height: 1.6;
  opacity: 0.85;
}

@media (max-width: 1200px) {
  .contact-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }

  .faq-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .contact-form {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .service-specific-fields {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .checkbox-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }

  .contact-form-wrapper {
    padding: 2rem 1.5rem;
  }

  .contact-stats {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .faq-item {
    padding: 1.5rem;
  }

  .faq-item h3 {
    font-size: 1.15rem;
  }
}
