/* Optimaaya responsive refinement: desktop, tablet and mobile */
:root {
  --grid-margin: clamp(18px, 4vw, 64px);
  --grid-gutter: clamp(0px, 1vw, 16px);
}
html, body, #root { width: 100%; min-width: 320px; }
html { overflow-x: clip; }
body { overflow-x: clip; }
img, video, canvas, svg { max-width: 100%; }
button, input, select, textarea { max-width: 100%; }
section, main, header, footer { min-width: 0; }
.hero, .grid12 { min-width: 0; }
.headline, .section-title, .persp-title, .wwd-title { overflow-wrap: anywhere; }
.hero-card { min-width: 0; }
.hero-card figure, .hero-card img { max-width: 100%; }
.nav { max-width: 1440px; }
.section { scroll-margin-top: calc(var(--nav-height) + 20px); }
.contact-form input, .contact-form textarea, .contact-form select { width: 100%; min-width: 0; }
.contact-form button, .contact-form .btn { min-height: 44px; }
a, button { -webkit-tap-highlight-color: transparent; }

@media (min-width: 1441px) {
  .hero-shell, main, .section, .footer-inner { max-width: 1920px; margin-inline: auto; }
}

@media (max-width: 1200px) {
  :root { --grid-margin: clamp(20px, 3.5vw, 40px); }
  .nav { left: var(--grid-margin); right: var(--grid-margin); }
  .persp-top, .persp-cards { grid-column: 1 / -1; }
  .persp-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .collab-intro, .founders, .contact-intro, .contact-form { grid-column: 1 / -1; }
  .founders { margin-top: 24px; }
}

@media (max-width: 900px) {
  :root { --grid-margin: clamp(16px, 3.8vw, 28px); --nav-height: 72px; }
  .nav {
    top: max(12px, env(safe-area-inset-top));
    left: var(--grid-margin);
    right: var(--grid-margin);
    height: 48px;
    padding: 0 6px 0 16px;
  }
  .brand-logo { height: 21px; max-width: min(42vw, 190px); }
  .nav-right { gap: 8px; }
  .menu-toggle { width: 40px; height: 40px; flex: 0 0 40px; }
  .nav-links { z-index: 12; }
  .menu-open .nav-links { max-height: min(70vh, 420px); overflow-y: auto; }
  .hero-shell { padding-top: var(--nav-height); }
  .hero-top { padding: clamp(42px, 8vw, 72px) 0 30px; }
  .headline { max-width: 16ch; font-size: clamp(42px, 8vw, 68px); line-height: .98; }
  .lede { width: min(100%, 42ch); padding-inline: 8px; font-size: 15px; }
  .hero-work { margin-top: 20px; }
  .hero-card { flex-basis: min(82vw, 560px); }
  .hero-card img { aspect-ratio: 4 / 3; }
  .section { padding-block: clamp(52px, 8vw, 76px); }
  .section-title, .persp-title { max-width: 19ch; font-size: clamp(36px, 6vw, 48px); }
  .persp-top { gap: 18px; }
  .persp-cards { gap: 12px; }
  .persp-card { padding: clamp(20px, 4vw, 27px); }
  .wwd-head { width: calc(100% - 2 * var(--grid-margin)); }
  .wwd-stack .scroll-stack__inner { padding-inline: var(--grid-margin); }
  .wwd-stack .scroll-stack-card.wwd-card { height: auto; min-height: 0; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .wwd-card-body { padding: clamp(20px, 3vw, 30px); }
  .wwd-card-title { font-size: clamp(30px, 5vw, 42px); }
  .contact-stage { padding-inline: var(--grid-margin); }
  .contact-body { max-width: 100%; }
  .footer-bottom { padding-inline: var(--grid-margin); }
}

@media (max-width: 640px) {
  :root { --grid-margin: 18px; --grid-gutter: 0px; --nav-height: 66px; }
  .grid-overlay { display: none; }
  .nav { top: max(10px, env(safe-area-inset-top)); height: 46px; border-radius: 24px; }
  .brand-logo { height: 19px; max-width: 46vw; }
  .hero-top { padding: 42px 0 22px; }
  .headline { max-width: 13ch; font-size: clamp(38px, 10vw, 54px); line-height: .98; }
  .lede { max-width: 34ch; margin-top: 16px; font-size: 14px; line-height: 1.55; }
  .btn-square { min-height: 46px; padding: 12px 19px; font-size: 13px; }
  .hero-work { margin-inline: calc(var(--grid-margin) * -1); }
  .hero-track { --card-gap: 12px; }
  .hero-card { flex-basis: 88vw; padding: 8px; border-radius: 22px; }
  .hero-card figure { border-radius: 16px; }
  .hero-card-title { font-size: 21px; }
  .hero-tags li { padding: 6px 9px; }
  .section { padding-block: 48px; }
  .section-label { font-size: 11px; }
  .section-title, .persp-title { max-width: 16ch; font-size: clamp(34px, 9vw, 43px); line-height: 1; }
  .section-lede, .persp-lede { font-size: 14px; line-height: 1.55; }
  .persp-top { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .persp-cards { grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 24px; }
  .persp-card { border-radius: 22px; padding: 22px; }
  .persp-card-icon { width: 52px; height: 52px; }
  .persp-card h3 { margin-top: 28px; font-size: 26px; min-height: 0; }
  .collab-intro, .founders, .contact-intro, .contact-form { grid-column: 1 / -1; min-width: 0; }
  .founder { gap: 12px; }
  .founder-avatar { width: 52px; height: 52px; }
  .wwd { padding-bottom: 42px; }
  .wwd-title { max-width: 17ch; font-size: clamp(32px, 8.5vw, 42px); }
  .wwd-stack { margin-top: 26px; }
  .wwd-stack .scroll-stack__inner { width: 100%; padding-inline: var(--grid-margin); }
  .wwd-stack .scroll-stack__slot { position: relative !important; top: auto !important; }
  .wwd-stack .scroll-stack-card.wwd-card {
    display: flex;
    flex-direction: column;
    height: auto;
    min-height: 0;
    margin-bottom: 14px;
    border-radius: 22px;
    transform: none !important;
  }
  .wwd-card-body { padding: 22px; }
  .wwd-card-title { margin-top: 36px; font-size: 34px; }
  .wwd-card-text { font-size: 14px; line-height: 1.5; }
  .wwd-card-tags { margin-top: 16px; }
  .wwd-card-art { min-height: 210px; aspect-ratio: 16 / 10; }
  .scroll-stack-card { height: auto; padding: 22px; }
  .contact-stage { padding: 10px 0; }
  .contact-body { width: 100%; padding: 18px; border-radius: 22px; }
  .contact-form { margin-top: 20px; padding: 0; }
  .contact-form-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; }
  .contact-form input, .contact-form textarea, .contact-form select { min-height: 46px; font-size: 16px; }
  .contact-form textarea { min-height: 120px; }
  .footer-brand, .footer-nav, .footer-contact, .footer-bottom p { grid-column: 1 / -1; }
  .footer-contact { justify-self: start; }
  .footer-bottom p { font-size: 11px; line-height: 1.5; }
}

@media (max-width: 380px) {
  :root { --grid-margin: 14px; }
  .headline { font-size: 37px; }
  .hero-card { flex-basis: 91vw; }
  .hero-card-head { padding-left: 8px; }
  .hero-card-title { font-size: 19px; }
  .wwd-card-title { font-size: 30px; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-track { animation: none; }
  .hero-card img, .persp-card, .menu-toggle span { transition: none; }
}


/* Optimaaya motion layer: brand colours and logo remain unchanged */
:root {
  --optimaaya-ivory: #FFFAEB;
  --optimaaya-purple: #231C3E;
  --optimaaya-champagne: #D4CA99;
}

/* Fine page-reading indicator */
.optimaaya-reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: 3px;
  overflow: hidden;
  pointer-events: none;
  background: rgba(35, 28, 62, 0.10);
}
.optimaaya-reading-progress__fill {
  display: block;
  width: 100%;
  height: 100%;
  transform: scaleX(0);
  transform-origin: 0 50%;
  background: var(--optimaaya-champagne);
  box-shadow: 0 0 10px rgba(212, 202, 153, 0.55);
  will-change: transform;
}

/* Rotating orbital motif in the hero: decorative only, never replaces the logo */
.hero { isolation: isolate; }
.hero-top, .hero-work { position: relative; z-index: 1; }
.optimaaya-orbit {
  position: absolute;
  z-index: 0;
  top: 49%;
  right: clamp(24px, 6.2vw, 104px);
  width: clamp(132px, 15.5vw, 220px);
  aspect-ratio: 1;
  transform: translateY(-50%);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.42;
  color: var(--optimaaya-champagne);
}
.optimaaya-orbit__ring {
  position: absolute;
  inset: 0;
  display: block;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.optimaaya-orbit__ring--outer {
  border-color: rgba(212, 202, 153, 0.8);
  animation: optimaaya-orbit-spin 34s linear infinite;
}
.optimaaya-orbit__ring--outer::before,
.optimaaya-orbit__ring--outer::after {
  position: absolute;
  display: block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--optimaaya-champagne);
  content: "";
}
.optimaaya-orbit__ring--outer::before { top: 13%; left: 18%; }
.optimaaya-orbit__ring--outer::after { right: 8%; bottom: 27%; width: 4px; height: 4px; }
.optimaaya-orbit__ring--middle {
  inset: 12%;
  border-style: dashed;
  border-color: rgba(212, 202, 153, 0.78);
  animation: optimaaya-orbit-spin 27s linear infinite reverse;
}
.optimaaya-orbit__ring--inner {
  inset: 27%;
  border-color: rgba(35, 28, 62, 0.22);
  animation: optimaaya-orbit-spin 19s linear infinite;
}
.optimaaya-orbit__satellite {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 50%;
  animation: optimaaya-orbit-spin 12s linear infinite;
}
.optimaaya-orbit__satellite::after {
  position: absolute;
  top: 3%;
  left: 50%;
  width: 9px;
  height: 9px;
  border: 2px solid var(--optimaaya-ivory);
  border-radius: 50%;
  background: var(--optimaaya-purple);
  box-shadow: 0 0 0 3px rgba(212, 202, 153, 0.30);
  content: "";
}
.optimaaya-orbit__core {
  position: absolute;
  inset: 35%;
  display: grid;
  place-content: center;
  border: 1px solid rgba(212, 202, 153, 0.85);
  border-radius: 50%;
  background: rgba(255, 250, 235, 0.74);
  color: var(--optimaaya-purple);
  text-align: center;
  font-size: clamp(7px, 0.65vw, 9px);
  font-weight: 650;
  letter-spacing: 0.13em;
  line-height: 1.45;
}
.optimaaya-orbit__caption {
  position: absolute;
  left: 50%;
  width: max-content;
  color: var(--optimaaya-purple);
  font-size: 8px;
  font-weight: 650;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  white-space: nowrap;
  transform: translateX(-50%);
}
.optimaaya-orbit__caption--top { top: 7%; }
.optimaaya-orbit__caption--bottom { bottom: 7%; }

/* Keep existing project marquee smooth and hint at its continuous movement */
.hero-work {
  position: relative;
}
.hero-work::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 2px;
  background: linear-gradient(90deg,
    transparent 0%,
    rgba(212, 202, 153, 0.15) 15%,
    rgba(212, 202, 153, 0.95) 50%,
    rgba(212, 202, 153, 0.15) 85%,
    transparent 100%);
  background-size: 220% 100%;
  animation: optimaaya-flow-line 8s linear infinite;
  content: "";
  pointer-events: none;
}

@keyframes optimaaya-orbit-spin {
  to { transform: rotate(360deg); }
}
@keyframes optimaaya-flow-line {
  to { background-position: -220% 0; }
}

@media (max-width: 1100px) {
  .optimaaya-orbit {
    right: 3%;
    width: clamp(112px, 14vw, 160px);
    opacity: 0.25;
  }
}
@media (max-width: 760px) {
  .optimaaya-orbit { display: none; }
  .optimaaya-reading-progress { height: 2px; }
}
@media (prefers-reduced-motion: reduce) {
  .optimaaya-orbit__ring,
  .optimaaya-orbit__satellite,
  .hero-work::after {
    animation: none !important;
  }
  .optimaaya-reading-progress__fill {
    transition: none !important;
  }
}


/* Visibility correction: keep the motion layer above decorative backdrops */
.hero-shell {
  position: relative;
  z-index: 3;
}
.hero {
  position: relative;
  z-index: 3;
  isolation: isolate;
}
.hero-top,
.hero-work {
  position: relative;
  z-index: 2;
}

/* Make the rotating visual legible without changing the established identity */
.optimaaya-orbit {
  z-index: 1;
  top: 48%;
  right: clamp(18px, 4.2vw, 72px);
  width: clamp(178px, 19vw, 270px);
  opacity: .62;
}
.optimaaya-orbit__ring--outer {
  border-width: 1.5px;
  box-shadow: 0 0 24px rgba(212, 202, 153, .12);
}
.optimaaya-orbit__ring--middle {
  border-width: 1.5px;
}
.optimaaya-orbit__core {
  background: rgba(255, 250, 235, .94);
  box-shadow: 0 0 30px rgba(212, 202, 153, .18);
  animation: optimaaya-core-pulse 4.5s ease-in-out infinite;
}
@keyframes optimaaya-core-pulse {
  0%, 100% { box-shadow: 0 0 16px rgba(212, 202, 153, .12); }
  50% { box-shadow: 0 0 34px rgba(212, 202, 153, .4); }
}

/* A visible champagne progress rail, with a moving leading glint */
.optimaaya-reading-progress {
  z-index: 1001;
  height: 4px;
  background: rgba(35, 28, 62, .16);
}
.optimaaya-reading-progress__fill {
  position: relative;
  background: linear-gradient(90deg, #D4CA99 0%, #F1E6BE 50%, #D4CA99 100%);
  box-shadow: 0 0 12px rgba(212, 202, 153, .8);
}
.optimaaya-reading-progress__fill::after {
  position: absolute;
  top: 50%;
  right: -3px;
  width: 8px;
  height: 8px;
  border: 1px solid #FFFAEB;
  border-radius: 50%;
  background: #D4CA99;
  box-shadow: 0 0 12px rgba(212, 202, 153, .95);
  content: "";
  transform: translateY(-50%);
}
.hero-work::after {
  z-index: 3;
  height: 3px;
  background-size: 180% 100%;
  animation-duration: 5s;
}

@media (max-width: 1100px) {
  .optimaaya-orbit {
    right: 2%;
    width: clamp(132px, 18vw, 190px);
    opacity: .48;
  }
}
@media (max-width: 760px) {
  .hero-shell { z-index: 3; }
  .optimaaya-orbit {
    display: block;
    top: 47%;
    right: 1%;
    width: clamp(82px, 22vw, 116px);
    opacity: .34;
  }
  .optimaaya-orbit__caption { display: none; }
  .optimaaya-orbit__core {
    font-size: 6px;
    letter-spacing: .08em;
  }
  .optimaaya-reading-progress { height: 3px; }
  .hero-work::after { height: 2px; }
}
@media (max-width: 380px) {
  .optimaaya-orbit {
    right: -2%;
    width: 82px;
    opacity: .26;
  }
}
@media (prefers-reduced-motion: reduce) {
  .optimaaya-orbit__core { animation: none !important; }
}


/* Founder profiles: prevent stretched grid tracks creating a large empty gap */
.founders {
  align-content: start;
  grid-auto-rows: max-content;
  row-gap: clamp(22px, 2vw, 30px);
}
.founders .founder + .founder {
  padding-top: 16px;
}


/* Contact form: constrain grid children and controls to the available column */
.contact-body {
  box-sizing: border-box;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  min-width: 0;
}
.contact-body > *,
.contact-intro,
.contact-form {
  min-width: 0;
}
.contact-form {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.contact-form label,
.contact-form-row,
.contact-form-row > label {
  min-width: 0;
  max-width: 100%;
}
.contact-form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  display: block;
  box-sizing: border-box;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.contact-form textarea {
  overflow-wrap: anywhere;
}
@media (max-width: 900px) {
  .contact-body {
    grid-template-columns: minmax(0, 1fr);
  }
  .contact-intro,
  .contact-form {
    grid-column: 1 / -1;
    width: 100%;
  }
  .contact-form-row {
    grid-template-columns: minmax(0, 1fr);
  }
}
@media (max-width: 640px) {
  .contact-body {
    min-width: 0;
    width: calc(100% - 2 * var(--grid-margin));
    max-width: 100%;
    padding-inline: 18px;
  }
}


/* Final contact layout correction: a bounded two-column card, not a 12-track span */
.contact-stage .contact-body {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
  column-gap: clamp(28px, 4vw, 64px) !important;
  row-gap: 32px !important;
  width: min(1040px, calc(100% - 48px)) !important;
  max-width: 1040px !important;
  margin-inline: auto !important;
  padding: clamp(28px, 4vw, 48px) !important;
  box-sizing: border-box !important;
  min-width: 0 !important;
}
.contact-stage .contact-intro {
  grid-column: 1 !important;
  min-width: 0 !important;
  width: 100% !important;
}
.contact-stage .contact-form {
  grid-column: 2 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
}
.contact-stage .contact-form-row {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 16px !important;
  width: 100% !important;
  min-width: 0 !important;
}
.contact-stage .contact-form-row > label,
.contact-stage .contact-form label {
  min-width: 0 !important;
  width: 100% !important;
}
.contact-stage .contact-form input,
.contact-stage .contact-form select,
.contact-stage .contact-form textarea {
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
@media (max-width: 900px) {
  .contact-stage .contact-body {
    grid-template-columns: minmax(0, 1fr) !important;
    width: min(720px, calc(100% - 32px)) !important;
    padding: 28px !important;
  }
  .contact-stage .contact-intro,
  .contact-stage .contact-form {
    grid-column: 1 !important;
  }
  .contact-stage .contact-form-row {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}
@media (max-width: 480px) {
  .contact-stage .contact-body {
    width: calc(100% - 24px) !important;
    padding: 20px !important;
  }
}


/* The extra orbital illustration has been removed from the design */
.optimaaya-orbit,
.optimaaya-orbit * {
  display: none !important;
}


/* Search identity: a quiet text identifier above the existing hero headline */
.hero-top .brand-identifier {
  margin: 0 0 clamp(14px, 1.8vw, 20px);
  color: #231C3E;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: .18em;
  text-align: center;
  text-transform: uppercase;
}
@media (max-width: 640px) {
  .hero-top .brand-identifier {
    margin-bottom: 14px;
    font-size: 9px;
    letter-spacing: .14em;
  }
}
