/* =======================================================================================
   Auto In-vitro — Cleaned & documented stylesheet
   Notes:
   • Preserves original Auto In-vitro SVG logo animation and timing.
   • Removes redundant/duplicate rules, consolidates z-index/layers, and standardizes naming.
   • Scopes SVG text styles to the logo wrapper to avoid affecting other inline SVGs.
   • Adds abundant comments and consistent sectioning for industry-standard readability.
   
   1 Design
   2 Layout
   3 header
   4 hero
   5 subnav
   6 PAGE LAYOUT, CARDS, GRIDS, MEDIA BLOCKS
   7 COMPONENTS (TEAM, CLASSES, BADGES, FORMS)
   8 FOOTER
   9 projects
   10 sticky z-index safety
   11 responsive breakpoints
   12 reduced motion
   13 Logo


   ======================================================================================= */





/* =========================================
   01) DESIGN TOKENS & GLOBAL RESETS
   ========================================= */
:root{
  /* ---- Color system ---- */
  --bg: #0b0d12;              /* Page background (dark) */
  --surface: #121620;         /* Card/overlay surface */
  --surface-2: #1a2030;       /* Secondary surface (e.g., buttons) */
  --text: #eef2f7e7;            /* Primary text on dark bg */
  --muted: #a8b3c7;           /* Muted/secondary text */
  --accent: #f186c1;          /* Primary accent */
  --accent2: #e018c5e4;          /* Primary accent */
  --link: #7cc4ff;            /* Link color */
  --header: #c9c9c9b7;          /* Header text color */

  /* ---- Loader / animated logo ---- */
  --loader-text-color: #f6e9fe;
  --loader-dot-color:  #f02d98;
  --loader-bg:         #100319;

  /* ---- Radii/Shadows ---- */
  --radius: 12px;
  --shadow: 0 10px 30px rgba(0,0,0,.25);

  /* ---- Layout constants ---- */
  --banner-height: 64px;      /* Updated by JS at runtime for sticky offsets */
  --content-max: 1100px;      /* Comfortable reading width */
}

/* Box-sizing for predictable layout */
*{ box-sizing: border-box; }

/* Allow % heights for full-height sections */
html, body{ height: 100%; }

/* Base typography & background */
html{
  font-family: 'Figtree', system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.5;
}
body{
  margin: 0;
  color: var(--text);
  background: linear-gradient(180deg, #0b0d12 0%, #0d111a 100%);
  line-height: 1.6; /* slightly looser for readability */
}

/* Normalize inline SVG sizing without forcing colors */
svg{
  width: 100%;
  height: 100%;
  display: block;
}

/* Links: minimal styling, underline on hover for clarity */
a{ color: var(--link); text-decoration: none; }
a:hover{ text-decoration: underline; }


/* =========================================
   02) LAYOUT UTILITIES
   ========================================= */

/* Constrain content width with fluid gutters */
.max-w{
  max-width: var(--content-max);
  margin-inline: auto;
  padding-inline: clamp(16px, 4vw, 32px);
}

/* Keyboard-accessible skip link */
.skip-link{
  position: absolute;
  left: -999px;
  top: auto;
}
.skip-link:focus{
  left: 16px;
  top: 12px;
  background: var(--surface);
  color: var(--text);
  padding: 8px 12px;
  border-radius: 6px;
  z-index: 1000;
}


/* =========================================
   03) HEADER (FIXED TOP BANNER + NAV DRAWER)
   ========================================= */

/* Fixed, translucent header */
.top-banner{
  position: fixed;
  inset: 0 0 auto 0;                /* top:0; left/right:0 */
  height: var(--banner-height);
  z-index: 100;                      /* Above subnav/drawer */
  display: grid;
  grid-template-columns: 1fr auto;   /* Brand left, menu right */
  align-items: center;
  padding-inline: clamp(12px, 3vw, 24px);
  background: rgba(10,14,22,.75);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

/* Brand lockup */
.logo{ display: inline-flex; align-items: center; }
.logo-svg{ height: 40px; max-width: 20vw; width: auto; display: block; color: var(--text); }

/* Tap-friendly hamburger */
.hamburger{
  width: 44px; height: 44px;
  border: 0;
  border-radius: 10px;
  display: grid; place-items: center;
  background: var(--surface-2);
  cursor: pointer;
}
.hamburger span{
  display:block;
  width: 20px; height: 2px;
  background: var(--text);
  margin: 3px 0;
  transition: transform .25s ease, opacity .25s ease;
}
/* Morph to “X” when expanded */
.hamburger[aria-expanded="true"] span:nth-child(1){ transform: translateY(5px) rotate(45deg); }
.hamburger[aria-expanded="true"] span:nth-child(2){ opacity: 0; }
.hamburger[aria-expanded="true"] span:nth-child(3){ transform: translateY(-5px) rotate(-45deg); }

/* Slide-down drawer directly under banner */
.nav-drawer{
  position: fixed;
  top: var(--banner-height);
  left: 0; right: 0;
  transform: translateY(-120%);      /* Hidden by default */
  transition: transform .25s ease;
  background: rgba(13,17,26,.95);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
  padding: 16px 24px;
  z-index: 95;
}
.nav-drawer.open{ transform: translateY(0); }

/* Drawer nav list */
.nav-drawer ul{
  list-style: none;
  margin: 0; padding: 0;
  display: grid; gap: 8px;
}
.nav-drawer a{
  display: block;
  padding: 10px 8px;
  border-radius: 8px;
}
.nav-drawer a[aria-current="page"]{
  background: rgba(91,209,185,.12);
}


/* =========================================
   04) HERO (VIDEO BACKGROUND + HEADLINE)
   ========================================= */
.hero{
  position: relative;
  overflow: hidden;
  margin-top: var(--banner-height);         /* Avoid being under header */
  min-height: clamp(380px, 55vh, 720px);
  display: grid;
  align-content: end;                        /* Content towards bottom */
}
.video-wrap{ position: absolute; inset: 0; z-index: 0; }
.hero video{
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: .2;
  display: block;
}
.video-scrim{
  position: absolute; inset: 0;
  background: radial-gradient(
    120% 70% at 50% 10%,
    rgba(0,0,0,.0) 0,
    rgba(0,0,0,.35) 60%,
    rgba(0,0,0,.55) 100%
  );
}
.hero-content{
  position: relative; z-index: 1;
  padding: clamp(28px, 6vw, 64px) 0;
}
.eyebrow{
  text-transform: uppercase;
  letter-spacing: .18em;
  color: var(--muted);
  font-size: .85rem;
  margin: 0 0 8px;
}
.hero h1{
  margin: 0;
  font-size: clamp(1.6rem, 3.8vw, 3rem);
  line-height: 1.2;
  max-width: 22ch;
}
.hero .hero-highlight{
  color: #ff5bb5;
  font-weight: 700;
}


/* =========================================
   05) SUBNAV (STICKY “CHIPS” QUICK LINKS)
   ========================================= */
.subnav{
  position: sticky;
  top: var(--banner-height);
  z-index: 200;                            /* Above drawer/subcontent */
  background: rgba(18,22,32,.85);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 10px;
  padding: 8px;
  margin-bottom: 16px;
}
.subnav .track{
  list-style: none; margin: 0; padding: 0;
  display: flex; gap: 8px;
  overflow-x: auto; overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
  scrollbar-width: none;                   /* Firefox */
}
.subnav .track::-webkit-scrollbar{ display: none; }
.subnav li{ flex: 0 0 auto; scroll-snap-align: start; }
.subnav a{
  display: inline-block;
  padding: 8px 10px;
  border-radius: 8px;
  white-space: nowrap;
  background: rgba(255,255,255,.04);
}
.subnav a:hover{ background: rgba(255,255,255,.08); }
.subnav a.is-active,
.subnav a[aria-current="true"]{
  background: rgba(91,209,185,.25);
  outline: 1px solid rgba(91,209,185,.5);
}

/* Optional fixed variant (used when JS toggles .is-fixed) */
.subnav.is-fixed{
  position: fixed;
  top: var(--banner-height);
  left: 0; right: 0;
  margin: 0;
  z-index: 200;
}
.subnav.is-fixed > .max-w{
  margin-inline: auto;
  max-width: var(--content-max);
}


/* =========================================
   06) PAGE LAYOUT, CARDS, GRIDS, MEDIA BLOCKS
   ========================================= */
.page{ padding-block: clamp(24px, 5vw, 48px); }
.section{ margin-bottom: clamp(24px, 5vw, 56px); }
.section h1{
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 5px 5px 12px;
  padding-left: 3vw;
  color: var(--header);
}
.section h2{
  font-size: clamp(1.25rem, 2.1vw, 1.6rem);
  margin: 5px 5px 12px;
}

/* Reveal-on-scroll (paired with JS IntersectionObserver) */
.reveal{
  opacity: 0;
  transform: translateY(14px) scale(.98);
  filter: blur(2px);
}
.reveal.is-visible{
  opacity: 1;
  transform: none;
  filter: none;
  transition: opacity .5s ease, transform .5s ease, filter .5s ease;
}

/* Cards */
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.02));
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Grids */
.grid{ display: grid; gap: clamp(12px, 2.3vw, 24px); }
.grid-fit-250{ grid-template-columns: repeat(auto-fit, minmax(250px,1fr)); }

/* Media blocks */
.media{
  display: grid;
  grid-template-columns: 1fr minmax(260px, 420px);
  gap: clamp(12px, 2.2vw, 28px);
  align-items: start;
}
.media img, .media video{
  width: 100%; height: auto;
  border-radius: 12px;
  display: block;
  border: 1px solid rgba(255,255,255,.06);
}


/* =========================================
   07) COMPONENTS (TEAM, CLASSES, BADGES, FORMS)
   ========================================= */

/* Team/person card */
.person{
  display: grid;
  gap: 10px;
  padding: 12px;
  align-content: start;
}
.person img{
  width: 30%;
  aspect-ratio: 1/1;
  object-fit: cover;
  border-radius: 10px;
}
.person .role{
  color: var(--muted);
  font-size: .95rem;
}

/* Class item */
.class-item{ padding: 16px; }

/* Pills/badges */
.badge{
  display:inline-block;
  padding: 4px 8px;
  border:1px solid rgba(255,255,255,.12);
  border-radius:100px;
  font-size:.8rem;
  color: var(--muted);
}

/* Forms */
form{ display: grid; gap: 12px; }
input, textarea, select, button{ font: inherit; color: var(--text); }
input, textarea{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 10px;
  padding: 10px 12px;
}
textarea{ min-height: 120px; resize: vertical; }

button{
  background: var(--accent);
  color: #031a16;
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  font-weight: 700;
}
button:hover{ filter: brightness(1.05); }

/* Legacy pill CTAs */
.cta-row { display:flex; gap:.75rem; margin-top:1.25rem; flex-wrap:wrap; }
.button {
  appearance: none;
  display: inline-block;
  border: none;
  padding: .8rem 1rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: .01em;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  box-shadow: var(--shadow);
}
.button.primary {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  color: #0b0d10;
}
.button.ghost {
  background: rgba(255,255,255,0.05);
}


/* =========================================
   08) FOOTER
   ========================================= */
.site-footer{
  background: #0a0e17;
  border-top: 1px solid rgba(255,255,255,.08);
}
.footer-grid{
  display: grid; gap: 18px;
  padding-block: clamp(20px, 4vw, 36px);
  grid-template-columns: 2fr 1fr 2fr;
}
.footer-heading{
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
}
.footer-links{
  list-style: none;
  padding: 0; margin: 0;
  display: grid; gap: 8px;
}
.legal{
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 10px 0;
  text-align: center;
  color: var(--muted);
}


/* =========================================
   09) PROJECTS (CONSISTENT THUMBNAILS)
   ========================================= */
.project-card .thumb{
  width: 100%;
  aspect-ratio: 16/9;
  overflow: hidden;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  margin-bottom: 10px;
}
.project-card .thumb img{
  width: 100%; height: 100%;
  object-fit: cover; display: block;
}

/* Design section — smaller, consistent thumbs */
#design-cards .thumb{
  width: min(360px, 80%);
  margin: 0;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.06);
  overflow: hidden;
}
#design-cards .thumb img{
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}


/* =========================================
   10) Z-INDEX / STICKY SAFETY
   ========================================= */
/* Maintain stacking order for stickies and hero */
.top-banner{ z-index: 100; }
.nav-drawer{ z-index: 95; top: var(--banner-height); }
.subnav{ z-index: 200; }
.hero{ margin-top: var(--banner-height); }

/* Ensure no ancestor breaks sticky positioning */
main, .page, .max-w, .container, section{ overflow: visible; transform: none; }


/* =========================================
   11) RESPONSIVE BREAKPOINTS
   ========================================= */
@media (min-width: 901px){
  .subnav .track{ overflow: visible; flex-wrap: wrap; }
  .subnav::before, .subnav::after{ display: none; } /* gradients not needed on wide */
}

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


/* =========================================
   12) REDUCED MOTION
   ========================================= */
@media (prefers-reduced-motion: reduce){
  .hero video{ display: none; }
  .reveal{ opacity: 1; transform: none; filter: none; }
}

/* =========================================
   13) SVG LOADER / LOGO ANIMATION
   (REPLACED with the original Auto In‑vitro animation)
   ========================================= */

/* Keep base SVG text sizing from app header logo only */
.top-banner .logo-animated{
  height: 40px;        /* Constant header logo height */
  width: auto;
  display: block;
}
.top-banner .logo-animated text{
  font-size: 80px;
  letter-spacing: -2px;
  stroke-width: 1;
}

/* ---- Original Auto In‑vitro animation (kept) ---- */
.logo-ai .A-outline {
  fill: transparent;
  stroke: var(--loader-text-color, #f6e9fe);
  stroke-width: 1.2;
  opacity: .55;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  pointer-events: none;
  animation: none !important;
  mix-blend-mode: normal;
}
.logo-ai .A-outline.dot,
.logo-ai .A-outline.text-body { animation: none !important; }

.logo-animated { height: 40px; width: auto; display: block; }
svg text { font-size: 80px; letter-spacing: -2px; stroke-width: 1; }
svg text.text-body {
  stroke: #f6e9fe;
  animation: 10s animate-stroke ease-in-out infinite;
}
svg text.dot {
  fill: var(--loader-dot-color);
  stroke: var(--loader-dot-color);
  animation: 10s animate-dot ease-in-out infinite;
}
@keyframes animate-stroke {
  0%,20%,85%, 100% { fill:transparent; stroke:#f6e9fe; stroke-width:1; stroke-dasharray:0 32%; stroke-dashoffset:25; }
  45% { fill:transparent; stroke:#f6e9fe; stroke-width:3; stroke-dasharray:50% 0; stroke-dashoffset:0; }
  55%,80% { fill:#f6e9fe; stroke:20; stroke-width:0; stroke-dasharray:32 0%; stroke-dashoffset:-25%; }
}
@keyframes animate-dot {
  0%,20%, 80%,100% { fill:var(--loader-dot-color); opacity:0; }
  60%,70% { fill:var(--loader-dot-color); opacity:1; }
}
/* Overlays (A + moving I) — stroke-only, no animation */
.logo-ai .outline {
  fill: transparent;
  stroke: var(--loader-text-color, #f6e9fe);
  stroke-width: 1.2;
  opacity: .55;
  vector-effect: non-scaling-stroke;
  stroke-linejoin: round;
  pointer-events: none;
  animation: none !important;
}
/* Config */
.logo-ai{
  --i-x:   60px;
  --shift: 150px;
  --dur:   10s;
  --ease:  cubic-bezier(.25,.8,.25,1);
  --moveI: 20%;
}
/* Normalize transform origins */
.logo-ai .layout .AUTO,
.logo-ai .layout .IN,
.logo-ai .layout .RIGHT,
.logo-ai .layout .I-left,
.logo-ai .layout .I-right,
.logo-ai .reveal-auto,
.logo-ai .reveal-in {
  transform-box: fill-box;
  transform-origin: left center;
}
/* Timeline */
.logo-ai .RIGHT{
  transform: translateX(var(--i-x));
  animation: ai-move-right var(--dur) var(--ease) infinite both;
}
@keyframes ai-move-right{
  0%,  8%  { transform: translateX(var(--i-x)); }
  15%, 70% { transform: translateX(calc(var(--i-x) + var(--shift))); }
  100%     { transform: translateX(var(--i-x)); }
}
.logo-ai .reveal-auto{
  transform: scaleX(0);
  animation: ai-reveal-auto var(--dur) var(--ease) infinite both;
}
@keyframes ai-reveal-auto{
  0%,14%  { transform: scaleX(0); }
  50%,70% { transform: scaleX(1); }
  80%,100%{ transform: scaleX(0); }
}
.logo-ai .reveal-in{
  transform: scaleX(0);
  animation: ai-reveal-in var(--dur) var(--ease) infinite both;
}
@keyframes ai-reveal-in{
  0%,14%   { transform: scaleX(0); }
  50%,70%  { transform: scaleX(1); }
  80%,100% { transform: scaleX(0); }
}
.logo-ai .I-left{  animation: ai-i-left-fade var(--dur) linear infinite both; }
.logo-ai .I-right{ animation: ai-i-right-fade var(--dur) linear infinite both; }
@keyframes ai-i-left-fade{
  0%  { opacity: 1; }
  9%, 94% { opacity: 0; }
  100%     { opacity: 1; }
}
@keyframes ai-i-right-fade{
  0%,  6%  { opacity: 0; }
  18%, 50% { opacity: 1; }
  100%     { opacity: 0; }
}
.logo-ai .dot{ animation: ai-dot var(--dur) var(--ease) infinite both; }
@keyframes ai-dot{
  0%,45% { opacity: 0; }
  50%,65%{ opacity: 1; }
  79%,100%   { opacity: 0; }
}