/* ============================================================
   Milestone 2026 — Studio-derived design system
   Faithful to Tailwind "Studio" template + Milestone brand
   ============================================================ */

@font-face {
  font-family: 'Mona Sans';
  font-weight: 200 900;
  font-display: block;
  font-style: normal;
  font-stretch: 75% 125%;
  src: url('fonts/Mona-Sans.var.woff2') format('woff2');
}

:root {
  --gold: #e1c57c;        /* champagne accent — on dark */
  --gold-ink: #9a7c3a;    /* deeper gold — on white */
  --ink: #0a0a0a;         /* neutral-950 */
}

* { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Mona Sans', ui-sans-serif, system-ui, sans-serif;
  background: var(--ink);
  color: var(--ink);
  margin: 0;
}

/* Display face uses the wide axis like the Studio template */
.font-display { font-family: 'Mona Sans', ui-sans-serif, system-ui, sans-serif; font-variation-settings: 'wdth' 125; }

.text-balance { text-wrap: balance; }
.text-pretty  { text-wrap: pretty; }

/* ---- Type scale override to match Studio exactly ---- */
.t-xs   { font-size: .75rem;  line-height: 1rem; }
.t-sm   { font-size: .875rem; line-height: 1.5rem; }
.t-base { font-size: 1rem;    line-height: 1.75rem; }
.t-lg   { font-size: 1.125rem;line-height: 1.75rem; }
.t-xl   { font-size: 1.25rem; line-height: 2rem; }
.t-2xl  { font-size: 1.5rem;  line-height: 2.25rem; }
.t-3xl  { font-size: 1.75rem; line-height: 2.25rem; }
.t-4xl  { font-size: 2rem;    line-height: 2.5rem; }
.t-5xl  { font-size: 2.5rem;  line-height: 3rem; }
.t-6xl  { font-size: 3rem;    line-height: 3.5rem; }
.t-7xl  { font-size: 4rem;    line-height: 4.5rem; }

/* ---- Layout primitives ---- */
.container-x { margin-inline: auto; max-width: 80rem; padding-inline: 1.5rem; }
@media (min-width: 1024px){ .container-x { padding-inline: 2rem; } }
.container-inner { margin-inline: auto; max-width: 42rem; }
@media (min-width: 1024px){ .container-inner { max-width: none; } }

.rounded-4xl { border-radius: 2.5rem; }

/* ---- Eyebrow / labels ---- */
.eyebrow {
  font-variation-settings: 'wdth' 125;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  font-size: .8125rem;
}

/* Left accent border used by stats + list items (Studio "Border") */
.border-accent { position: relative; padding-left: 2rem; }
.border-accent::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 2px; background: var(--ink);
}
.border-accent.gold::before { background: var(--gold-ink); }
.on-dark .border-accent::before { background: rgba(255,255,255,.2); }

/* ---- Reveal classes kept as no-ops: content is always visible.
   (This preview renderer freezes CSS animations/transitions at frame 0, which
   would otherwise leave entrance-animated content stuck hidden. Hover/interaction
   transitions are unaffected and still used throughout.) ---- */
.fade-in { opacity: 1; }
.stagger > * { opacity: 1; }

/* ---- Stylized image: the Studio "milestone marker" clip ---- */
.stylized { position: relative; width: 100%; aspect-ratio: 719/680; filter: grayscale(1); }
.stylized svg { height: 100%; width: 100%; }
.stylized .clip-img { width: 100%; height: 100%; object-fit: cover; background: #f5f5f5;
  transition: transform .5s ease; transform: scale(1); }
.stylized:hover .clip-img { transform: scale(1.05); }

/* ---- Nav overlay ---- */
.nav-panel { height: .5rem; overflow: hidden; transition: height .5s cubic-bezier(.4,0,.2,1); }
.nav-panel.open { height: var(--panel-h, 640px); }

/* Full-bleed nav rows: each cell fills its half of the viewport so the hover
   target matches the visible highlight edge-to-edge (no dead gutter). */
.nav-row { display: grid; grid-template-columns: 1fr; }
.nav-cell { position: relative; isolation: isolate; display: block; background: #0a0a0a;
  padding: 2.25rem 1.5rem; color: #fff; }
.nav-cell .hover-bg { position: absolute; inset: 0; z-index: -10; background: #171717;
  opacity: 0; transition: opacity .35s ease; }
.nav-cell:hover .hover-bg { opacity: 1; }
.nav-cell.muted { color: #737373; }
.nav-row + .nav-row { border-top: 1px solid #1c1c1c; }
@media (min-width: 640px) {
  .nav-row { grid-template-columns: 1fr 1fr; }
  .nav-cell { padding-top: 4rem; padding-bottom: 4rem; }
  .nav-cell-l { padding-left: max(1.5rem, calc((100vw - 80rem)/2 + 2rem)); padding-right: 4rem; }
  .nav-cell-r { padding-left: 4rem; padding-right: max(1.5rem, calc((100vw - 80rem)/2 + 2rem));
    border-left: 1px solid #262626; }
}

.nav-item { position: relative; isolation: isolate; }
.nav-item .hover-bg { position: absolute; inset: 0; z-index: -10; background: #171717; opacity: 0;
  transition: opacity .35s ease; }
.nav-item:hover .hover-bg { opacity: 1; }

/* ---- Hardware render framing ---- */
.hw-frame { background: linear-gradient(180deg,#fafafa,#f1f1f1); border-radius: 1.5rem; }

/* ---- Customer marquee: scrolls horizontally as you scroll the page, fades at edges ---- */
.cust-marquee { position: relative; overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 7%, #000 93%, transparent); }
.cust-track { display: inline-flex; align-items: center; gap: 2.25rem; width: max-content;
  white-space: nowrap; will-change: transform; }
.cust-track .name { font-size: 1.375rem; line-height: 1; font-weight: 500; color: #d4d4d4; }
.cust-track .dot { width: 4px; height: 4px; flex: none; border-radius: 50%; background: #525252; }

.cable-canvas { position: absolute; top: 0; left: 0; right: 0; width: 100%; height: 100%;
  z-index: 0; pointer-events: none; opacity: 0; transition: opacity .3s linear; }
@media (min-width: 1024px) {
  /* own sticky layer: pinned to the viewport for the whole hero, scrolls off only
     with the section at the very end. margin-bottom:-100vh removes it from flow so
     the content layer still starts at the section top and overlaps it. */
  .cable-canvas { position: sticky; top: 0; height: 100vh; margin-bottom: -100vh; }
}

/* ---- Mobile hero visual: rack peeking from the right with power-on FX ---- */
.mobile-rack { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.mobile-rack-img { position: absolute; top: 50%; right: -34%; width: 62%; max-width: 340px;
  overflow: hidden; transform: translateY(-46%); animation: rackFloat 6s ease-in-out infinite; }
.mobile-rack-img img { display: block; width: 100%; height: auto;
  filter: drop-shadow(0 30px 50px rgba(0,0,0,.28)); }
/* soft gold "powered" glow behind the rack */
.mobile-rack-glow { position: absolute; top: 50%; right: -14%; width: 70%; aspect-ratio: 1;
  transform: translateY(-46%); border-radius: 50%;
  background: radial-gradient(circle, rgba(225,197,124,.28), rgba(225,197,124,0) 68%);
  animation: rackPulse 4.5s ease-in-out infinite; }
/* gold scan line sweeping down the rack like it's powering on */
.mobile-rack-scan { position: absolute; left: 0; right: 0; top: 0; height: 24%;
  background: linear-gradient(180deg, rgba(225,197,124,0), rgba(225,197,124,.55) 50%, rgba(225,197,124,0));
  mix-blend-mode: screen; animation: rackScan 4s linear infinite; }
/* white scrim so the headline/body stay crisp over the rack */
.mobile-rack::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(100deg, #fff 30%, rgba(255,255,255,.72) 52%, rgba(255,255,255,0) 78%); }
@keyframes rackFloat { 0%,100% { transform: translateY(-46%); } 50% { transform: translateY(-52%); } }
@keyframes rackPulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@keyframes rackScan { 0% { top: -28%; } 100% { top: 100%; } }
@media (prefers-reduced-motion: reduce) {
  .mobile-rack-img, .mobile-rack-glow, .mobile-rack-scan { animation: none; }
}
@media (min-width: 1024px) { .mobile-rack { display: none; } }

/* ---- Hero scrollytelling: crossfading stage panels (left) ---- */
.hero-left { position: relative; }
.hstage { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease;
  pointer-events: none; }
.hstage.is-active { opacity: 1; transform: none; pointer-events: auto; }
/* stage 0 stays in flow to set the column height; stages 1-4 overlay it */
.hstage[data-hstage="0"] { position: relative; }
.hstage:not([data-hstage="0"]) { position: absolute; inset: 0; }
.hstage-num { font-variation-settings: 'wdth' 125; font-weight: 700; font-size: .8125rem;
  letter-spacing: .04em; color: var(--gold-ink); }
.hstage-h { font-family: 'Mona Sans', sans-serif; font-variation-settings: 'wdth' 125;
  font-weight: 500; letter-spacing: -0.02em; color: var(--ink);
  font-size: 2.25rem; line-height: 1.05; text-wrap: balance; }
@media (min-width: 640px) { .hstage-h { font-size: 3.25rem; } }
.hstage-p { margin-top: 1.25rem; max-width: 34rem; font-size: 1.125rem; line-height: 1.6;
  color: #525252; text-wrap: pretty; }

/* ---- Hero progress tracker (mirrors the rack filling) ---- */
.hero-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem;
  margin-top: 2.25rem; max-width: 32rem; opacity: .4; transition: opacity .5s ease; }
.hero-steps.is-on { opacity: 1; }
.hstep-bar { display: block; height: 3px; border-radius: 2px; background: #e5e5e5;
  position: relative; overflow: hidden; }
.hstep-bar::after { content: ""; position: absolute; inset: 0 100% 0 0; background: var(--gold-ink);
  transition: right .55s ease; }
.hstep.done .hstep-bar::after { right: 0; background: var(--ink); }
.hstep.active .hstep-bar::after { right: 0; background: var(--gold-ink); }
.hstep-label { display: block; margin-top: .55rem; font-size: .75rem; font-weight: 600;
  letter-spacing: .04em; text-transform: uppercase; color: #a3a3a3; transition: color .4s ease; white-space: nowrap; }
.hstep.done .hstep-label { color: #525252; }
.hstep.active .hstep-label { color: var(--ink); }
@media (max-width: 1023px) { .hero-steps { display: none; } }


/* ---- Testimonial: faded, slanted, repeating-logo parallax backdrop ---- */
.testi-bg { position: absolute; inset: 0; overflow: hidden; z-index: 0; pointer-events: none; }
.testi-band {
  position: absolute; top: -45%; left: -45%; width: 190%; height: 190%;
  background-image: url('img/milestone-mark.png');
  background-repeat: repeat; background-size: 104px auto;
  transform: rotate(-11deg); opacity: .05; will-change: transform;
}
.testi-band--2 { background-size: 150px auto; opacity: .035; background-position: 52px 38px; }

/* ---- Persistent left-margin brand mark (appears on scroll, wide screens only) ---- */
.margin-mark {
  position: fixed; top: 5rem; z-index: 30; display: none; width: 24px;
  /* horizontally centered within the available left margin (gutter) */
  left: calc(max(1rem, (100vw - 80rem) / 4 + 1rem) - 12px);
  --my: 0px;
  transform: translateY(var(--my));
  opacity: 0; pointer-events: none;
  transition: opacity .5s ease;
}
.margin-mark img { display: block; width: 100%; height: auto; transform-origin: center; }
.margin-mark.show { opacity: 1; pointer-events: auto; }
.margin-mark.show img { animation: markPulse 3s ease-in-out infinite; }
@keyframes markPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.09); opacity: .9; }
}
@media (min-width: 1440px) { .margin-mark { display: block; } }
@media (prefers-reduced-motion: reduce) {
  .margin-mark { transition: opacity .3s ease; }
  .margin-mark.show img { animation: none; }
}

/* ---- Hero scroll rack: real Figma cabinet (filled -> blank -> fills) ---- */
.rack-stage { position: relative; width: 100%; max-width: 300px; margin-inline: auto;
  transform-origin: center top; will-change: transform; }
/* blank cabinet — the always-present base, revealed when the cover fades */
.cab-base { display: block; width: 100%; height: auto;
  filter: drop-shadow(0 26px 44px rgba(0,0,0,.30)); }
/* filled cabinet — sits on top, fades out first */
.rack-cover { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; z-index: 3;
  filter: drop-shadow(0 26px 44px rgba(0,0,0,.30)); will-change: opacity; }
/* white Milestone mark overlaid on the rack's top vent logo — flickers on scroll like data transfer.
   Aligned to the BLANK cabinet's logo (visible during scroll): center x 50%, center y ~8.4%. */
.rack-data { position: absolute; left: 50%; top: 6.2%; width: 7%; transform: translateX(-50%);
  z-index: 6; pointer-events: none; opacity: 0; will-change: opacity;
  filter: drop-shadow(0 0 5px rgba(225,197,124,0.85)); }

/* Lightfall ambient backdrop (dark CTA) */
.lf-bg { position: absolute; inset: 0; z-index: 0; }
.lf-scrim { position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(10,10,10,0.94) 0%, rgba(10,10,10,0.7) 34%, rgba(10,10,10,0.28) 64%, rgba(10,10,10,0) 100%); }
/* mounting area inside the cabinet where units stack */
.rack-well { position: absolute; z-index: 2; left: 4.5%; right: 4.5%; top: 13.6%; bottom: 6%;
  display: flex; flex-direction: column; justify-content: flex-start; gap: 0; }
.rack-well .ru { position: relative; display: block; width: 100%; height: auto;
  opacity: 0; transform: translateY(22px);
  transition: opacity .55s ease, transform .55s ease; }
.rack-well .ru + .ru { margin-top: -10.4%; }   /* collapse so units butt / shadows overlap */
.rack-well .ru.in { opacity: 1; transform: none; }
/* cascade: the server (2nd unit) lags the storage unit so stage 1 reveals them in sequence */
.rack-well .ru:nth-child(2).in { transition-delay: .22s; }
/* Each unit slides UP and fades in BEHIND the one above it; the PC console pops in front. */
.rack-well .ru:nth-child(1){ z-index: 50; }
.rack-well .ru:nth-child(2){ z-index: 40; }
.rack-well .ru:nth-child(3){ z-index: 100; }
.rack-well .ru:nth-child(4){ z-index: 20; }
.rack-well .ru:nth-child(5){ z-index: 10; }
@media (prefers-reduced-motion: reduce){ .rack-well .ru { transition: none; } }

/* ---- Portrait placeholder (subtly striped) ---- */
.ms-portrait { background-color: #efefef;
  background-image: repeating-linear-gradient(135deg, rgba(0,0,0,.03) 0 14px, rgba(0,0,0,0) 14px 28px); }

/* ---- Buttons ---- */
.btn { display: inline-flex; align-items: center; border-radius: 9999px; padding: .375rem 1rem;
  font-size: .875rem; font-weight: 600; transition: background-color .2s ease, color .2s ease; }
.btn-dark { background: var(--ink); color: #fff; }
.btn-dark:hover { background: #262626; }
.btn-light { background: #fff; color: var(--ink); }
.btn-light:hover { background: #e5e5e5; }

/* ---- Misc helpers ---- */
.divider { height: 1px; background: rgba(10,10,10,.1); }
.on-dark .divider { background: rgba(255,255,255,.1); }
a { color: inherit; text-decoration: none; }
.link-underline { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .15em; }
