@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&display=swap');

/* ===================================================================
   AssignmentToppers - Motion Layer
   1. Order Stage triptych (homepage, behind/around "Place an Order")
   2. Cinematic video footer (all pages)
   =================================================================== */

:root {
  --stage-page: #F1F5F9;
  --stage-surface: #FFFFFF;
  --stage-ink: #0F172A;
  --stage-muted: #64748B;
  --stage-gold: #E5A93C;
  --stage-gold-deep: #C2831B;
  --stage-gold-soft: #FDF0D5;
  --stage-cyan: #00A8E8;
  --stage-green: #10B981;
}

/* ===================================================================
   1. ORDER STAGE — three-card composition
   =================================================================== */

.order-stage-section {
  position: relative;
  overflow: hidden;
  padding: 4.5rem 0 5rem;
  background:
    radial-gradient(circle at 50% 0%, rgba(229, 169, 60, 0.13), transparent 58%),
    radial-gradient(circle at 88% 82%, rgba(0, 168, 232, 0.10), transparent 55%),
    linear-gradient(180deg, #FFFFFF 0%, var(--stage-page) 45%, #FFFFFF 100%);
}

.order-stage-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 2.75rem;
  padding: 0 1.25rem;
}

.order-stage-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(229, 169, 60, 0.14);
  border: 1px solid rgba(229, 169, 60, 0.35);
  color: var(--stage-gold-deep);
  padding: 0.34rem 0.9rem;
  border-radius: 9999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.order-stage-head h2 {
  font-family: var(--font-heading);
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.16;
  color: var(--stage-ink);
  margin-bottom: 0.6rem;
}

.order-stage-head p {
  font-size: 0.98rem;
  line-height: 1.6;
  color: var(--stage-muted);
}

/* --- The composition ------------------------------------------------ */

.stage-cards {
  container-type: inline-size;
  width: min(1180px, 92%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 32.33% 32.33% 31.7%;
  justify-content: space-between;
  align-items: start;
}

.stage-card {
  position: relative;
  display: grid;
  grid-template-rows: 72.2% 27.8%;
  aspect-ratio: 0.781;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(229, 169, 60, 0.22);
  border-radius: 1.95cqw;
  background: var(--stage-surface);
  box-shadow:
    0.4cqw 1.1cqw 1.75cqw rgba(15, 23, 42, 0.10),
    0 0.2cqw 0.5cqw rgba(15, 23, 42, 0.035);
}

.stage-card:last-child {
  align-self: end;
  height: 98.5%;
}

/* The centre card is the interactive anchor */
a.stage-card {
  transition: transform 320ms cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 320ms cubic-bezier(0.16, 1, 0.3, 1);
}

a.stage-card:hover,
a.stage-card:focus-visible {
  transform: translateY(-6px);
  box-shadow:
    0.4cqw 1.6cqw 2.6cqw rgba(15, 23, 42, 0.16),
    0 0 0 2px rgba(229, 169, 60, 0.45);
}

a.stage-card:focus-visible {
  outline: 3px solid var(--stage-gold-deep);
  outline-offset: 3px;
}

.stage-panel {
  position: relative;
  margin-inline: 2.55%;
  overflow: hidden;
  border-radius: 1.55cqw 1.55cqw 1.3cqw 1.3cqw;
  background:
    radial-gradient(circle at 50% 78%, rgba(229, 169, 60, 0.16), transparent 47%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(253, 246, 235, 0.94));
}

.stage-card--anchor .stage-panel {
  margin-inline: 2%;
  background:
    radial-gradient(circle at 74% 46%, rgba(229, 169, 60, 0.30), transparent 48%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(253, 242, 225, 0.97));
}

.stage-copy {
  position: relative;
  padding: 7.1% 8.4% 6.5%;
}

.stage-copy h3 {
  margin: 0 0 1.6%;
  font-family: var(--font-heading);
  color: var(--stage-ink);
  font-size: 2.28cqw;
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.045em;
  white-space: nowrap;
}

.stage-card--anchor .stage-copy h3 {
  font-size: 2.62cqw;
  letter-spacing: -0.035em;
}

.stage-copy p {
  margin: 0;
  color: var(--stage-muted);
  font-size: 1.7cqw;
  font-weight: 500;
  line-height: 1.24;
  letter-spacing: -0.02em;
}

.stage-icon {
  position: absolute;
  right: 8.4%;
  bottom: 22.5%;
  width: 8.2%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--stage-gold-soft);
  color: var(--stage-gold-deep);
}

.stage-icon svg {
  width: 56%;
  height: 56%;
}

/* --- Card 1: progress bars ------------------------------------------ */

.stage-timeline {
  position: absolute;
  top: 5.7%;
  left: 16%;
  width: 68%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--stage-gold-deep);
  font-size: 0.78cqw;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.stage-timeline i {
  width: 18%;
  border-top: 1px dashed rgba(194, 131, 27, 0.55);
}

.stage-bars {
  position: absolute;
  left: 5.9%;
  right: 5.9%;
  bottom: 12%;
  height: 62%;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
}

.stage-bars i {
  width: 2.4%;
  height: var(--h);
  border-radius: 9999px;
  background: rgba(229, 169, 60, 0.34);
}

.stage-bars i.is-active {
  width: 2.8%;
  background: var(--stage-gold);
  box-shadow: 0 0 0.4cqw rgba(229, 169, 60, 0.5);
}

.stage-chip {
  position: absolute;
  top: 14.5%;
  left: 43%;
  min-width: 18%;
  padding: 0.4cqw 0.7cqw;
  display: grid;
  place-items: center;
  border: 2px solid #FFFFFF;
  border-radius: 9999px;
  background: var(--stage-gold);
  box-shadow: 0 0 0 1px var(--stage-gold), 0 0.35cqw 0.6cqw rgba(69, 45, 10, 0.28);
  color: #23180A;
  font-size: 0.86cqw;
  font-weight: 800;
  white-space: nowrap;
}

.stage-axis {
  position: absolute;
  left: 6.5%;
  right: 6.5%;
  bottom: 4.6%;
  display: flex;
  justify-content: space-between;
  color: #94A3B8;
  font-size: 0.72cqw;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* --- Card 2: the order anchor --------------------------------------- */

.stage-brand {
  position: absolute;
  top: 8.2%;
  left: 6.2%;
  display: flex;
  align-items: center;
  gap: 1.1cqw;
  color: var(--stage-gold-deep);
  font-size: 1.55cqw;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.stage-brand-badge {
  width: 2.7cqw;
  height: 2.7cqw;
  border-radius: 50%;
  background: var(--stage-gold-soft);
  display: grid;
  place-items: center;
  color: var(--stage-gold-deep);
}

.stage-brand-badge svg {
  width: 55%;
  height: 55%;
}

.stage-question {
  position: absolute;
  top: 21.5%;
  left: 6.2%;
  right: 6.2%;
  margin: 0;
  color: var(--stage-ink);
  font-size: 1.62cqw;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.03em;
}

.stage-prompt {
  position: absolute;
  top: 33%;
  left: 6.2%;
  width: 87.2%;
  height: 34.5%;
  padding: 4.7% 4.2%;
  border: 1px solid #D8CDBD;
  border-radius: 1.05cqw;
  background: rgba(255, 255, 255, 0.42);
  color: var(--stage-muted);
  font-size: 1.24cqw;
  font-weight: 500;
  line-height: 1.34;
  letter-spacing: -0.012em;
}

.stage-cta {
  position: absolute;
  top: 78.1%;
  left: 6.2%;
  width: 46%;
  height: 11.6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: 1.2cqw;
  border-radius: 9999px;
  background: linear-gradient(100deg, #F7CE7A 0%, #E5A93C 38%, #C2831B 100%);
  box-shadow:
    0 0.6cqw 1.5cqw rgba(194, 131, 27, 0.48),
    0 0.2cqw 0.5cqw rgba(194, 131, 27, 0.3);
  color: #24190A;
  font-size: 1.16cqw;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.stage-cta canvas {
  flex: 0 0 auto;
  width: 1.8cqw;
  height: 1.75cqw;
}

.stage-cursor {
  position: absolute;
  top: 84.5%;
  left: 48%;
  width: 5%;
  aspect-ratio: 0.72;
  z-index: 3;
  filter: drop-shadow(0 0 1px #fff) drop-shadow(0 0 1px #fff)
          drop-shadow(0.1cqw 0.2cqw 0.1cqw rgba(0, 0, 0, 0.45));
}

.stage-cursor::before,
.stage-cursor::after {
  content: '';
  position: absolute;
  clip-path: polygon(0 0, 94% 62%, 57% 67%, 38% 100%);
}

.stage-cursor::before {
  inset: 0;
  background: #0B192C;
  z-index: 1;
}

.stage-cursor::after {
  inset: -11%;
  background: #FFFFFF;
}

/* --- Card 3: converging support flow -------------------------------- */

.stage-metric {
  position: absolute;
  top: 7.8%;
  left: 5.6%;
  right: 5.6%;
}

.stage-metric-label {
  color: #64748B;
  font-size: 1.05cqw;
  font-weight: 500;
  margin-bottom: 0.3cqw;
}

.stage-metric-row {
  display: flex;
  align-items: baseline;
  gap: 1.1cqw;
}

.stage-metric-row strong {
  color: var(--stage-gold-deep);
  font-family: var(--font-heading);
  font-size: 2.5cqw;
  font-weight: 800;
  line-height: 0.98;
  letter-spacing: -0.035em;
}

.stage-metric-row span {
  color: var(--stage-green);
  font-size: 1.08cqw;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.stage-flow {
  position: absolute;
  top: 39%;
  left: 0;
  width: 100%;
  height: 53%;
  display: block;
  pointer-events: none;
}

.stage-tag {
  position: absolute;
  z-index: 2;
  height: 8.6%;
  display: grid;
  place-items: center;
  padding-inline: 0.6cqw;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0.15cqw 0.4cqw rgba(15, 23, 42, 0.12);
  color: var(--stage-ink);
  font-size: 0.8cqw;
  font-weight: 700;
  white-space: nowrap;
}

.stage-tag--a { top: 33.5%; right: 6%; }
.stage-tag--b { top: 66%;   left: 5%;  }
.stage-tag--c { top: 82%;   right: 6%; }

/* --- Entrance choreography ------------------------------------------ */

.stage-pending .stage-card { opacity: 0; }

.stage-active .stage-card,
.stage-active .stage-panel,
.stage-active .stage-copy {
  will-change: opacity, transform, clip-path;
}

/* --- Responsive ------------------------------------------------------ */

@media (max-width: 1024px) {
  .stage-cards {
    width: min(680px, 92%);
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.85rem, 2.2cqw, 1.3rem);
    justify-content: center;
  }
  .stage-card { border-radius: clamp(0.9rem, 2.4cqw, 1.25rem); }
  .stage-card--anchor {
    grid-column: 1 / -1;
    order: -1;
    width: min(100%, 340px);
    margin-inline: auto;
  }
  .stage-card:last-child { height: auto; align-self: start; }
  .stage-copy h3 { font-size: clamp(0.95rem, 4.2cqw, 1.3rem); }
  .stage-card--anchor .stage-copy h3 { font-size: clamp(1.05rem, 4.8cqw, 1.45rem); }
  .stage-copy p { font-size: clamp(0.75rem, 3.1cqw, 0.98rem); }
  .stage-brand { font-size: clamp(0.8rem, 3cqw, 1.05rem); gap: clamp(0.35rem, 1.8cqw, 0.6rem); }
  .stage-brand-badge {
    width: clamp(1.15rem, 4.6cqw, 1.7rem);
    height: clamp(1.15rem, 4.6cqw, 1.7rem);
  }
  .stage-cta canvas { width: clamp(0.75rem, 3cqw, 1.1rem); height: clamp(0.73rem, 2.9cqw, 1.07rem); }
  .stage-question { font-size: clamp(0.8rem, 3.1cqw, 1.05rem); }
  .stage-prompt { font-size: clamp(0.68rem, 2.4cqw, 0.86rem); }
  .stage-cta { font-size: clamp(0.66rem, 2.3cqw, 0.85rem); }
  .stage-metric-row strong { font-size: clamp(1.1rem, 4.6cqw, 1.6rem); }
  .stage-metric-label,
  .stage-metric-row span { font-size: clamp(0.62rem, 2.1cqw, 0.8rem); }
  .stage-tag { font-size: clamp(0.5rem, 1.7cqw, 0.68rem); }
  .stage-chip { font-size: clamp(0.55rem, 1.9cqw, 0.75rem); }
  .stage-timeline,
  .stage-axis { font-size: clamp(0.44rem, 1.5cqw, 0.62rem); }
}

@media (max-width: 640px) {
  .order-stage-section { padding: 3rem 0 3.25rem; }
  .stage-cards {
    width: min(360px, 90%);
    grid-template-columns: minmax(0, 1fr);
    gap: 1.1rem;
  }
  .stage-card--anchor { width: 100%; }
  .stage-copy h3,
  .stage-card--anchor .stage-copy h3 { font-size: 1.32rem; }
  .stage-copy p { font-size: 0.95rem; }
  .stage-brand,
  .stage-question { font-size: 1.02rem; }
  .stage-brand-badge { width: 1.7rem; height: 1.7rem; }
  .stage-cta canvas { width: 1.1rem; height: 1.07rem; }
  .stage-prompt { font-size: 0.84rem; }
  .stage-cta { font-size: 0.84rem; min-height: 2.75rem; }
  .stage-metric-row strong { font-size: 1.7rem; }
  .stage-metric-label,
  .stage-metric-row span { font-size: 0.82rem; }
  .stage-tag { font-size: 0.66rem; }
  .stage-chip { font-size: 0.74rem; }
  .stage-timeline,
  .stage-axis { font-size: 0.6rem; }
}

/* ===================================================================
   2. CINEMATIC FOOTER — looping night-study video + liquid glass
   =================================================================== */

.site-footer.cine-footer {
  position: relative;
  isolation: isolate;
  background: #05101C;
  overflow: hidden;
}

.cine-media {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.cine-media img,
.cine-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 62%;
}

.cine-media video {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 1200ms ease;
}

.cine-media video.is-playing { opacity: 1; }

/* Dark overlay keeps every footer link above 4.5:1 contrast */
.cine-scrim {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(5, 16, 28, 0.62) 0%, rgba(5, 16, 28, 0.52) 22%, rgba(5, 16, 28, 0.74) 58%, rgba(5, 16, 28, 0.93) 100%),
    radial-gradient(ellipse at 50% 4%, rgba(0, 168, 232, 0.14), transparent 60%);
}

.site-footer.cine-footer > .container {
  position: relative;
  z-index: 2;
}

/* --- Cinematic lede ------------------------------------------------- */

.cine-lede {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 46rem;
  margin: 0 auto 3.25rem;
  padding: 0 1rem;
}

.cine-lede h2 {
  text-wrap: balance;
  text-shadow: 0 2px 24px rgba(5, 16, 28, 0.65);
  font-family: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(2rem, 5.2vw, 3.6rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  color: #FFFFFF;
  margin: 0 0 1.1rem;
}

.cine-lede h2 em {
  font-style: normal;
  color: #AEBAC8;
}

.cine-lede p {
  color: #C6D0DB;
  text-shadow: 0 1px 12px rgba(5, 16, 28, 0.7);
  font-size: clamp(0.92rem, 1.4vw, 1.04rem);
  line-height: 1.65;
  max-width: 34rem;
  margin: 0 auto 1.75rem;
}

.cine-lede-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.85rem;
}

.cine-lede-actions a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  padding: 0.8rem 1.7rem;
  border-radius: 9999px;
  font-size: 0.92rem;
  font-weight: 600;
  color: #FFFFFF;
  text-decoration: none;
  transition: transform 260ms cubic-bezier(0.16, 1, 0.3, 1), box-shadow 260ms ease;
}

.cine-lede-actions a:hover,
.cine-lede-actions a:focus-visible { transform: scale(1.03); }

.cine-lede-actions a:focus-visible {
  outline: 3px solid var(--stage-gold);
  outline-offset: 3px;
}

.cine-lede-actions .is-gold {
  background: linear-gradient(100deg, #F7C04A 0%, #E5A93C 45%, #C2831B 100%);
  color: #1B1206;
  box-shadow: 0 10px 26px rgba(194, 131, 27, 0.36);
}

/* --- Liquid glass --------------------------------------------------- */

.liquid-glass {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.035);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  border: none;
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.10);
}

.liquid-glass::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.15) 80%, rgba(255, 255, 255, 0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* Footer columns become glass panels */
.cine-footer .footer-col,
.cine-footer .footer-brand-col {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 1.5rem 1.35rem;
  background: rgba(6, 17, 30, 0.42);
  backdrop-filter: blur(9px);
  -webkit-backdrop-filter: blur(9px);
  box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.10);
}

.cine-footer .footer-col::before,
.cine-footer .footer-brand-col::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1.4px;
  background: linear-gradient(180deg,
    rgba(255, 255, 255, 0.45) 0%, rgba(255, 255, 255, 0.15) 20%,
    rgba(255, 255, 255, 0) 40%, rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0.15) 80%, rgba(255, 255, 255, 0.45) 100%);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}

/* Lift text contrast against the video */
.cine-footer .footer-desc,
.cine-footer .footer-links-list a { color: #CFD8E2; }
.cine-footer .footer-links-list a:hover { color: var(--stage-gold); }
.cine-footer .footer-address-box {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.14);
  color: #DCE3EB;
}
.cine-footer .footer-bottom-bar {
  position: relative;
  z-index: 2;
  color: #9DA9B7;
  border-top-color: rgba(255, 255, 255, 0.14);
}

/* Entrance */
@keyframes cine-fade-rise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Only the decorative lede animates. The link columns are content and are
   never hidden behind an animation that might not run. `is-settled` is added
   by script once the sequence is over, so a stalled animation clock can never
   leave the headline invisible. */
.cine-footer.is-revealed .cine-lede h2 { animation: cine-fade-rise 0.8s ease-out both; }
.cine-footer.is-revealed .cine-lede p  { animation: cine-fade-rise 0.8s ease-out 0.15s both; }
.cine-footer.is-revealed .cine-lede-actions { animation: cine-fade-rise 0.8s ease-out 0.3s both; }

.cine-footer.is-settled .cine-lede h2,
.cine-footer.is-settled .cine-lede p,
.cine-footer.is-settled .cine-lede-actions {
  animation: none;
  opacity: 1;
  transform: none;
}

@media (max-width: 991px) {
  .cine-footer .footer-col,
  .cine-footer .footer-brand-col { padding: 1.25rem 1.1rem; }
  .cine-lede { margin-bottom: 2.25rem; }
}

/* ===================================================================
   3. HERO AMBIENT VIDEO — manual fade loop in the lower hero band
   =================================================================== */

/* Anchored to the lower part of the hero, the way the motion brief places it:
   headline over clean navy up top, the loop reading as ambient light below.
   Opacity is driven per-frame from hero-ambient.js, so no transition here. */
.hero-video-container video.hero-ambient {
  position: absolute;
  inset: auto 0 0 0;
  top: 38%;
  z-index: 1;
  width: 100%;
  object-fit: cover;
  opacity: 0;
  pointer-events: none;
  /* Knocks the footage back to a muted wash so it reads as atmosphere rather
     than a literal landscape, and keeps the headline clear of the contrast
     floor. */
  filter: saturate(0.5) brightness(0.75) contrast(1.05);
}

/* from-background -> transparent -> to-background, feathering both edges of
   the video band into the hero so it has no visible seam. */
.hero-video-container.has-ambient::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  top: 38%;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(180deg,
    #0B192C 0%,
    rgba(11, 25, 44, 0) 34%,
    rgba(11, 25, 44, 0) 58%,
    rgba(11, 25, 44, 0.9) 100%);
}

/* Once the loop is running the still would only muddy it, so fade it out. */
.hero-video-container.has-ambient img.hero-video {
  opacity: 0;
  transition: opacity 1400ms ease;
}

/* The stock overlay is tuned for a still photo and buries the loop entirely.
   Lighten it only over the lower band, while it stays dark behind the
   headline. */
.hero-video-container.has-ambient + .hero-overlay {
  background:
    radial-gradient(circle at 75% 30%, rgba(30, 62, 98, 0.55) 0%, rgba(11, 25, 44, 0.88) 72%),
    linear-gradient(180deg,
      rgba(11, 25, 44, 0.96) 0%,
      rgba(11, 25, 44, 0.92) 34%,
      rgba(11, 25, 44, 0.50) 62%,
      rgba(11, 25, 44, 0.78) 100%);
  transition: background 1400ms ease;
}

@media (prefers-reduced-motion: reduce) {
  .hero-video-container video.hero-ambient { display: none; }
}

/* ===================================================================
   REDUCED MOTION
   =================================================================== */

@media (prefers-reduced-motion: reduce) {
  .stage-pending .stage-card { opacity: 1; }
  .cine-media video { display: none; }
  .cine-footer.is-revealed .cine-lede h2,
  .cine-footer.is-revealed .cine-lede p,
  .cine-footer.is-revealed .cine-lede-actions { animation: none; }
  a.stage-card:hover { transform: none; }
}

/* On stacked layouts the hero grows very tall (the order form sits below the
   headline), so a percentage band would stretch the loop into a heavy crop.
   Anchor it to the bottom with a capped height instead. */
@media (max-width: 1100px) {
  .hero-video-container video.hero-ambient,
  .hero-video-container.has-ambient::after {
    top: auto;
    height: min(52%, 520px);
  }
}

/* ===================================================================
   4. ACADEMIC AMBIENT BAND
   Wraps the run of light sections from "Specialized Academic Support
   Services" through "Countries We Serve". Replaces the flat white with a
   soft tinted ground, drifting academic marks, and a faint ruled grid
   that reads as notebook paper.
   =================================================================== */

.academic-band {
  position: relative;
  isolation: isolate;
  /* On a short page the 100vh backdrop is taller than the band itself and
     would paint over the footer. `clip` trims it without turning the band
     into a scroll container, which `hidden` would do — and that would stop
     the backdrop sticking at all. */
  overflow: clip;
  background:
    radial-gradient(ellipse 70% 40% at 12% 8%, rgba(229, 169, 60, 0.13), transparent 62%),
    radial-gradient(ellipse 60% 45% at 92% 34%, rgba(0, 168, 232, 0.12), transparent 60%),
    radial-gradient(ellipse 80% 40% at 50% 78%, rgba(30, 62, 98, 0.09), transparent 66%),
    linear-gradient(180deg,
      #FFFFFF 0%,
      #F2F7FC 12%,
      #E9F1F9 46%,
      #EFF5FB 80%,
      #FFFFFF 100%);
}

/* Sticky and viewport-tall, with the height pulled straight back out of the
   flow, so the canvas never paints more than one screen no matter how far
   the band runs. */
.academic-band-bg {
  position: sticky;
  top: 0;
  height: 100vh;
  margin-bottom: -100vh;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.academic-band-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* Ruled paper, panning slowly. Cheap: one composited background-position. */
.academic-band-grid {
  position: absolute;
  inset: -10% -10% -10% -10%;
  background-image:
    linear-gradient(to right, rgba(11, 25, 44, 0.06) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(11, 25, 44, 0.06) 1px, transparent 1px);
  background-size: 46px 46px;
  /* Fade only at the top and bottom seams so the ruling reads right across
     the width, including the gutters either side of the cards. */
  mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 14%, #000 86%, transparent 100%);
  animation: academic-grid-drift 48s linear infinite;
}

@keyframes academic-grid-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 46px 92px, 46px 92px; }
}

/* The sections ride above the backdrop and give up their own white. */
.academic-band > .section,
.academic-band > .turnitin-trust-section {
  position: relative;
  z-index: 1;
  background: transparent;
}

/* Interior pages hang the band on their single <main class="section">, so the
   content container itself is what has to sit above the backdrop. */
.academic-band > .container {
  position: relative;
  z-index: 1;
}

/* The Turnitin band keeps a whisper of its original gradient for separation. */
.academic-band > .turnitin-trust-section {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.55) 0%, rgba(248, 250, 252, 0.35) 100%);
}

/* Cards sat on flat white before; give them a hair more lift now that the
   ground behind them moves. */
/* Cards sat on flat white before. Letting a little of the moving ground show
   through is what makes the backdrop readable at all — fully opaque cards
   would hide almost every mark. */
.academic-band .service-box-card,
.academic-band .why-card,
.academic-band .step-card,
.academic-band .review-card,
.academic-band .country-card,
.academic-band .pricing-card,
.academic-band .category-service-card,
.academic-band .blog-card,
.academic-band .faq-item,
.academic-band .score-gauge-box,
.academic-band .turnitin-visual-card,
.academic-band .turnitin-point-card {
  background-color: rgba(255, 255, 255, 0.82);
  backdrop-filter: blur(6px) saturate(1.15);
  -webkit-backdrop-filter: blur(6px) saturate(1.15);
  border-color: rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.07), 0 1px 2px rgba(15, 23, 42, 0.04);
}

.academic-band .turnitin-box,
.academic-band .turnitin-integrity-box {
  background-color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

@media (max-width: 640px) {
  .academic-band-grid { background-size: 34px 34px; }
}

@media (prefers-reduced-motion: reduce) {
  .academic-band-grid { animation: none; }
}

/* ===================================================================
   5. HERO FIGURES
   Two cutouts filling the blank navy band above the headline, opposite
   the order form. Anchored to the top edge of .hero-content so they
   always sit directly above the copy rather than at a fixed offset.
   =================================================================== */

.hero-content { position: relative; }

.hero-figures {
  position: absolute;
  bottom: calc(100% + 1rem);
  left: 0;
  right: 0;
  height: clamp(180px, 26vw, 360px);
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
  pointer-events: none;
  z-index: 1;
}

/* A warm pool of light so the pair are grounded rather than floating on
   flat navy. */
.hero-figures::before {
  content: '';
  position: absolute;
  left: -6%;
  width: 62%;
  bottom: -8%;
  height: 118%;
  background: radial-gradient(ellipse at 42% 62%, rgba(229, 169, 60, 0.18), transparent 64%);
  pointer-events: none;
}

.hero-figure {
  position: relative;
  display: block;
  height: 100%;
}

.hero-figure img {
  display: block;
  height: 100%;
  width: auto;
  /* The source photos are full-length; they are cropped at the waist, so
     the cut edge is faded out into the hero rather than left as a hard line. */
  mask-image: linear-gradient(180deg, #000 66%, transparent 99%);
  -webkit-mask-image: linear-gradient(180deg, #000 66%, transparent 99%);
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.42));
}

.hero-figure--student { z-index: 2; }

.hero-figure--advisor {
  height: 86%;
  margin-left: -2.5%;
  opacity: 0.96;
  z-index: 1;
}

@keyframes hero-figure-float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-9px); }
}

.hero-figure--student { animation: hero-figure-float 7s ease-in-out infinite; }
.hero-figure--advisor { animation: hero-figure-float 8.5s ease-in-out -2.6s infinite; }

/* Hidden only where the hero stops being two columns. How much room the band
   actually has is decided in main.js from the real gap above the headline --
   it comes from the order form's height, not the viewport's, so a short
   laptop screen still has plenty of space for them. */
@media (max-width: 991px) {
  .hero-figures { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-figure--student,
  .hero-figure--advisor { animation: none; }
}

/* ===================================================================
   6. HERO PIPELINE
   Fills the blank navy band beneath the stats with the one thing a
   hesitant student actually wants to know: what happens after they hand
   over their brief. A gold pulse walks the four stages on a loop, and the
   referencing styles scroll underneath.
   =================================================================== */

.hero-pipeline {
  position: absolute;
  top: calc(100% + 1.5rem);
  left: 0;
  right: 0;
  padding: 1.15rem 1.35rem 1rem;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(229, 169, 60, 0.22);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 18px 44px rgba(3, 10, 20, 0.38);
  z-index: 1;
}

.hero-pipeline-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #CBD5E1;
  margin-bottom: 1.1rem;
}

.hero-pipeline-live {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #10B981;
  box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55);
  animation: pipeline-live 2.4s ease-out infinite;
}

@keyframes pipeline-live {
  0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  70%  { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
  100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* --- the four stages ------------------------------------------------ */

.hero-pipeline-rail {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  list-style: none;
  margin: 0 0 1rem;
  padding: 0;
}

/* Track the pulse runs along. */
.hero-pipeline-rail::before,
.hero-pipeline-rail::after {
  content: '';
  position: absolute;
  top: 19px;
  height: 2px;
  border-radius: 2px;
  pointer-events: none;
}

.hero-pipeline-rail::before {
  left: 12.5%;
  right: 12.5%;
  background: rgba(255, 255, 255, 0.14);
}

.hero-pipeline-rail::after {
  left: 12.5%;
  width: 0;
  background: linear-gradient(90deg, rgba(229, 169, 60, 0), #E5A93C);
  animation: pipeline-sweep 9s ease-in-out infinite;
}

@keyframes pipeline-sweep {
  0%        { width: 0; opacity: 1; }
  78%       { width: 75%; opacity: 1; }
  92%, 100% { width: 75%; opacity: 0; }
}

.hero-pipeline-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.35rem;
}

.hero-pipeline-node {
  position: relative;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(229, 169, 60, 0.14);
  border: 1px solid rgba(229, 169, 60, 0.34);
  color: var(--color-accent-light, #F7C04A);
  animation: pipeline-node 9s ease-in-out infinite;
  animation-delay: calc(var(--step) * 1.6s);
}

.hero-pipeline-node svg { width: 18px; height: 18px; }

/* The resting state is already legible; the animation only adds the sweep,
   so a stalled or disabled animation still leaves a finished-looking panel. */
@keyframes pipeline-node {
  0%, 14%, 100% {
    background: rgba(229, 169, 60, 0.14);
    box-shadow: 0 0 0 0 rgba(229, 169, 60, 0);
    transform: scale(1);
  }
  4% {
    background: rgba(229, 169, 60, 0.32);
    box-shadow: 0 0 0 7px rgba(229, 169, 60, 0.12);
    transform: scale(1.09);
  }
}

.hero-pipeline-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #FFFFFF;
  line-height: 1.2;
}

.hero-pipeline-note {
  font-size: 0.72rem;
  color: #94A3B8;
  line-height: 1.25;
}

/* --- referencing marquee -------------------------------------------- */

.hero-pipeline-styles {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding-top: 0.85rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.hero-pipeline-styles-label {
  flex: 0 0 auto;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #93A2B6;
}

.hero-pipeline-marquee {
  position: relative;
  flex: 1 1 auto;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.hero-pipeline-track {
  display: flex;
  gap: 0.5rem;
  width: max-content;
  animation: pipeline-marquee 26s linear infinite;
}

.hero-pipeline-track span {
  flex: 0 0 auto;
  padding: 0.28rem 0.7rem;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.72rem;
  font-weight: 600;
  color: #D6DEE8;
  white-space: nowrap;
}

@keyframes pipeline-marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* Shown only where the hero is still two columns and the band exists. */
@media (max-width: 991px) {
  .hero-pipeline { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-pipeline-live,
  .hero-pipeline-node,
  .hero-pipeline-track { animation: none; }
  .hero-pipeline-rail::after { animation: none; width: 75%; opacity: 1; }
}
