/* ============================================================
   Subpage styles — Comptech Design System
   ============================================================ */

body.subpage { background: var(--ct-black); }
body.subpage .v7-ghost { position: fixed; opacity: 0.04; }

.masthead.subnav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px 34px; mix-blend-mode: normal;
  background: linear-gradient(180deg, rgba(6,6,7,0.9), rgba(6,6,7,0));
}
.masthead-home { display: block; }
.top-nav { display: flex; gap: 26px; }
.top-nav a {
  color: var(--ct-white); text-decoration: none;
  font-size: 11px; letter-spacing: 0.28em; opacity: 0.75; transition: all 0.25s;
}
.top-nav a:hover { opacity: 1; color: var(--ct-red); }

.page-main { padding-top: 0; }

/* hero */
.page-hero {
  min-height: 72vh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 22vh var(--gutter) 8vh;
  position: relative; z-index: 2;
}
.page-sub { margin-top: 28px; font-size: 17px; line-height: 1.7; opacity: 0.82; max-width: 560px; }

/* stat band */
.stat-band {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 1px;
  background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  position: relative; z-index: 2;
}
.stat { background: var(--ct-black); padding: 34px 26px; }
.stat > span { display: block; font-size: 38px; font-weight: 600; letter-spacing: -0.01em; }
.stat > span i { font-style: normal; font-size: 16px; opacity: 0.6; margin-left: 4px; }
.stat em { font-style: normal; display: block; margin-top: 10px; font-size: 13px; opacity: 0.65; }
.stat.accent > span { color: var(--ct-red); }

/* sections */
.page-section {
  padding: 12vh var(--gutter); position: relative; z-index: 2;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.page-section .display { margin-bottom: 5vh; }

/* media block */
.page-media { position: relative; z-index: 2; margin: 0; overflow: hidden; min-height: 30vh; }
.page-media img { width: 100%; display: block; filter: saturate(0.9) contrast(1.06); }
.page-media.missing img { display: none; }
.page-media .media-missing {
  position: relative; display: none; align-items: center; justify-content: center;
  min-height: 46vh; font-size: 10px; letter-spacing: 0.28em; color: var(--ct-red);
  border: 1px dashed rgba(255,90,31,0.5); margin: 0 var(--gutter);
}
.page-media.missing .media-missing { display: flex; }
.media-note {
  position: absolute; left: var(--gutter); bottom: 26px;
  font-size: 10px; letter-spacing: 0.3em; color: var(--ct-white); opacity: 0.85;
  text-shadow: 0 2px 18px rgba(0,0,0,0.7);
}
.mars-media { background: #17181a; padding: 6vh 0; }
.mars-media img { max-height: 82vh; width: auto; max-width: 90vw; margin: 0 auto; display: block; }

/* cards */
.card-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 22px;
}
.card-grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.p-card {
  background: var(--ct-graphite); padding: 34px 30px;
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer)));
}
.p-card h3 { font-family: var(--font-head); font-stretch: 116%; font-weight: 600; font-size: 22px; margin-bottom: 14px; }
.p-card p { font-size: 15px; line-height: 1.65; opacity: 0.78; }
.p-tag { font-size: 10px; letter-spacing: 0.26em; color: var(--ct-red); margin-bottom: 16px; }

/* timeline */
.timeline { border-left: 2px solid rgba(255,255,255,0.12); padding-left: 0; max-width: 760px; }
.tl-row { display: flex; align-items: baseline; gap: 22px; padding: 16px 0; position: relative; }
.tl-year { font-size: 15px; font-weight: 600; color: var(--ct-red); min-width: 64px; text-align: right; }
.tl-dot {
  width: 9px; height: 9px; background: var(--ct-red); flex: none; align-self: center;
  clip-path: polygon(50% 0, 100% 50%, 50% 100%, 0 50%);
  margin-left: -5.5px;
}
.tl-text { font-size: 15.5px; line-height: 1.6; opacity: 0.85; }

/* roles */
.roles { border-top: 1px solid var(--line); max-width: 880px; }
.role {
  display: flex; justify-content: space-between; align-items: center;
  padding: 26px 8px; border-bottom: 1px solid var(--line);
  text-decoration: none; color: var(--ct-white); transition: all 0.25s;
}
.role span { font-family: var(--font-head); font-stretch: 116%; font-weight: 500; font-size: 24px; }
.role i { font-style: normal; font-size: 11px; letter-spacing: 0.26em; color: var(--ct-red); opacity: 0; transform: translateX(-8px); transition: all 0.25s; }
.role:hover { padding-left: 18px; }
.role:hover i { opacity: 1; transform: translateX(0); }
.page-note { margin-top: 34px; font-size: 11px; letter-spacing: 0.2em; opacity: 0.7; line-height: 2; }
.page-note a { color: var(--ct-red); text-decoration: none; }

/* mission band */
.mission-band {
  padding: 16vh var(--gutter); position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  background: radial-gradient(90% 120% at 70% 100%, rgba(255,90,31,0.08), rgba(255,90,31,0) 60%), var(--ct-black);
}
.mission-band .cta-row { margin-top: 6vh; }

/* mars variants */
.variant-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 26px; max-width: 900px; }
.variant {
  background: var(--ct-graphite); padding: 40px 36px;
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer)));
}
.variant.accent { outline: 1px solid rgba(255,90,31,0.5); outline-offset: -1px; }
.variant-price { font-size: 52px; font-weight: 600; margin: 10px 0 4px; }
.variant.accent .variant-price { color: var(--ct-red); }
.variant-note { font-size: 9px; letter-spacing: 0.28em; opacity: 0.6; }
.variant-specs { display: flex; flex-direction: column; gap: 12px; margin-top: 28px; }
.variant-specs span {
  font-size: 12px; letter-spacing: 0.16em; padding: 12px 16px;
  border: 1px solid var(--line);
  clip-path: polygon(0 0, 100% 0, 100% calc(100% - 9px), calc(100% - 9px) 100%, 0 100%);
}

/* subpage spec grid inherits style.css .spec-grid/.spec */
body.subpage .spec-grid { position: relative; z-index: 2; }

@media (max-width: 900px) {
  .top-nav { gap: 14px; }
  .top-nav a { font-size: 9px; letter-spacing: 0.2em; }
  .page-hero { padding: 18vh 6vw 6vh; }
  .page-section { padding: 9vh 6vw; }
  .tl-year { min-width: 48px; }
  .role span { font-size: 18px; }
}

/* ============ DEALER ENQUIRY FORM ============ */
.enq-form { margin-top: 38px; max-width: 880px; }
.enq-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.enq-field { display: flex; flex-direction: column; gap: 9px; }
.enq-field label { font-size: 10px; letter-spacing: .18em; color: #8d939b; }
.enq-field input, .enq-field select {
  background: #17181b; border: 1px solid #26282d; color: var(--ct-grey);
  font: 15px/1.4 var(--font-body); padding: 14px 16px; outline: none; border-radius: 0;
  clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  transition: border-color .2s, background .2s; -webkit-appearance: none; appearance: none;
}
.enq-field select { cursor: pointer; }
.enq-field input::placeholder { color: #5a5f66; }
.enq-field input:focus, .enq-field select:focus { border-color: var(--ct-red); background: #1b1d21; }
.enq-error { color: var(--ct-red); font-size: 11px; letter-spacing: .14em; margin: 4px 0 0; }
.enq-ctas { margin-top: 26px; }
.enq-ctas .cta { border: 0; cursor: pointer; font: inherit; }
.enq-note { margin-top: 18px; font-size: 10px; letter-spacing: .14em; color: #55595f; }
@media (max-width: 700px) { .enq-row { grid-template-columns: 1fr; } }

/* ============================================================
   Rev-5 additions: active nav, video embed, Mars hero + gallery
   ============================================================ */
/* active nav highlight per page */
body[data-page="mars"]     .topbar-nav a[href="mars.html"],
body[data-page="about"]    .topbar-nav a[href="about.html"],
body[data-page="dealers"]  .topbar-nav a[href="dealers.html"],
body[data-page="career"]   .topbar-nav a[href="career.html"],
body[data-page="corporate"].topbar-nav a[href="corporate.html"] { color: var(--ct-red); }

/* company video */
.video-section .video-frame {
  margin-top: 40px; position: relative; width: 100%; max-width: 1100px;
  aspect-ratio: 16 / 9; background: #0d0e10; overflow: hidden;
  border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - 20px) 0, 100% 20px, 100% 100%, 20px 100%, 0 calc(100% - 20px));
}
.video-section iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; display: block; }

/* Mars hero — text + product image side by side */
.mars-hero { min-height: auto; display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 4vw; align-items: center; padding-top: 20vh; }
.mars-hero-text .cta-row { margin-top: 40px; }
.mars-hero-media img { width: 100%; display: block; filter: drop-shadow(0 30px 60px rgba(0,0,0,0.5)); }
@media (max-width: 900px) { .mars-hero { grid-template-columns: 1fr; gap: 5vh; padding-top: 16vh; } .mars-hero-media { order: -1; } }

/* Mars real-unit gallery */
.mars-gallery { margin-top: 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.mars-gallery figure {
  position: relative; overflow: hidden; background: #101215;
  clip-path: polygon(0 0, calc(100% - 16px) 0, 100% 16px, 100% 100%, 16px 100%, 0 calc(100% - 16px));
}
.mars-gallery img { width: 100%; display: block; }
.mars-gallery figcaption {
  position: absolute; left: 18px; bottom: 14px; font-size: 9px; letter-spacing: 0.28em;
  color: var(--ct-white); opacity: 0.85; text-shadow: 0 1px 8px rgba(0,0,0,0.7);
}
html[data-theme="light"] .mars-gallery figure { background: #e4e4df; }
html[data-theme="light"] .mars-gallery figcaption { color: #fff; }
html[data-theme="light"] .video-section .video-frame { background: #e4e4df; border-color: #dcdcd6; }
@media (max-width: 700px) { .mars-gallery { grid-template-columns: 1fr; } }


/* ============================================================
   MARS — on the shared dark system. No forked tokens, no
   rounded corners: the 45-degree chamfer and Night Black are
   the brand. Mars's identity is its hero, not its palette.
   ============================================================ */

/* ---- signature hero: the paperwork dissolves ---- */
.mhero {
  position: relative; z-index: 2; overflow: hidden;
  min-height: 100svh; display: flex; align-items: center;
  padding: 22vh var(--gutter) 14vh;
}
.mhero-glow {
  position: absolute; right: -10%; top: 6%; width: 70vw; height: 70vw; pointer-events: none;
  background: radial-gradient(circle, rgba(255,90,31,.16) 0%, rgba(255,90,31,0) 62%);
}
.mhero-inner { position: relative; z-index: 3; }

.mhero-lead { font-size: clamp(15px, 1.6vw, 19px); opacity: .68; margin-bottom: 14px; }

.mhero-strikes { list-style: none; display: flex; flex-direction: column; gap: 6px; margin-bottom: 26px; }
.mhero-strike {
  font-family: var(--font-head); font-stretch: 118%; font-weight: 700;
  font-size: clamp(22px, 3.1vw, 44px); line-height: 1.12; letter-spacing: -.01em;
  color: var(--ct-white); width: fit-content; position: relative;
  opacity: 0; animation: mhero-in .5s ease forwards;
  animation-delay: calc(.25s + var(--i) * .42s);
}
/* the strike-through sweeps across after the word has landed */
.mhero-strike span { position: relative; }
.mhero-strike span::after {
  content: ""; position: absolute; left: -2px; right: -2px; top: 52%; height: 3px;
  background: var(--ct-red); transform: scaleX(0); transform-origin: left center;
  animation: mhero-cross .38s cubic-bezier(.65,0,.35,1) forwards;
  animation-delay: calc(.62s + var(--i) * .42s);
}
/* once struck, the phrase recedes — you don't need it */
.mhero-strike { animation: mhero-in .5s ease forwards, mhero-fade .5s ease forwards; }
.mhero-strike { animation-delay: calc(.25s + var(--i) * .42s), calc(1.0s + var(--i) * .42s); }

@keyframes mhero-in   { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes mhero-cross{ to { transform: scaleX(1); } }
@keyframes mhero-fade { to { opacity: .34; } }

.mhero-payoff, .mhero-sub, .mhero-cta {
  opacity: 0; animation: mhero-in .6s cubic-bezier(.22,.61,.36,1) forwards;
}
.mhero-payoff { animation-delay: 1.72s; }
.mhero-sub    { animation-delay: 1.86s; max-width: 480px; }
.mhero-cta    { animation-delay: 2.0s; margin-top: 34px; }

/* The photograph is the whole stage now, not a column. It sits
   behind everything and the copy reads over it, anchored
   right-of-centre so the rider and scooter stay clear of the text. */
.mhero-shot { position: absolute; inset: 0; margin: 0; z-index: 0; }
.mhero-shot img {
  width: 100%; height: 100%; object-fit: cover; object-position: 72% center; display: block;
  animation: mhero-ride 16s cubic-bezier(.22,.61,.36,1) forwards;
}
@keyframes mhero-ride { from { transform: scale(1.07); } to { transform: scale(1); } }

/* Two scrims. A hard one from the left so the headline holds, and a
   top-and-bottom wash so the section meets the page below. This is a
   bright daylight photograph — without them the type is unreadable. */
.mhero-scrim {
  position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(9,9,10,.95) 0%, rgba(9,9,10,.84) 26%, rgba(9,9,10,.44) 50%, rgba(9,9,10,.06) 74%),
    linear-gradient(180deg, rgba(9,9,10,.7) 0%, rgba(9,9,10,0) 24%, rgba(9,9,10,0) 56%, rgba(9,9,10,.92) 100%);
}
.mhero-inner { max-width: 48%; }

.mhero-cue {
  position: absolute; left: var(--gutter); bottom: 5vh; z-index: 3;
  font-size: 9px; letter-spacing: .34em; opacity: .7;
  display: flex; flex-direction: column; gap: 10px;
}
.mhero-cue span { display: block; width: 1px; height: 46px; background: var(--ct-white); position: relative; overflow: hidden; }
.mhero-cue span::after { content: ""; position: absolute; left: 0; top: -100%; width: 100%; height: 100%; background: var(--ct-red); animation: cue 1.6s ease-in-out infinite; }

/* Everything above is decoration. If motion is unwelcome, the
   hero renders finished and still. */
@media (prefers-reduced-motion: reduce) {
  .mhero-strike, .mhero-payoff, .mhero-sub, .mhero-cta, .mhero-shot { opacity: 1; animation: none; transform: none; }
  .mhero-strike span::after { transform: scaleX(1); animation: none; }
  .mhero-cue span::after { animation: none; }
}

/* ---- the hook ---- */
.mars-hook-copy { max-width: 760px; margin-bottom: 6vh; }

/* ---- feature cards ----
   Composition follows the reference: text sits at the top, the
   photograph is the body of the card rather than a thumbnail
   under it, and the middle card breaks the grid — taller, lifted,
   with a full-bleed image — so the eye lands there first.
   Dark tokens and the 45-degree chamfer, per the design system. */
.feat-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px;
  align-items: start; padding: 46px 0;      /* room for the lifted middle card */
}
.feat-card {
  display: flex; flex-direction: column; background: var(--ct-graphite);
  padding: 34px 30px 0; overflow: hidden; min-height: 660px;
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer)));
  transition: transform .35s cubic-bezier(.22,.61,.36,1);
}
.feat-card:hover { transform: translateY(-6px); }

/* the hero card — taller, lifted out of the row, image bled to the edges */
.feat-card.accent {
  background: linear-gradient(168deg, #2b2d32 0%, #17181b 62%);
  outline: 1px solid rgba(255,90,31,.5); outline-offset: -1px;
  margin: -46px 0; min-height: 752px; padding-bottom: 0;
}
.feat-card.accent:hover { transform: translateY(-10px); }

.feat-tag { font-family: var(--font-mono); font-size: 10px; letter-spacing: .26em; color: var(--ct-red); margin-bottom: 14px; }
.feat-title {
  font-family: var(--font-head); font-stretch: 118%; font-weight: 700;
  font-size: clamp(24px, 2.4vw, 34px); line-height: 1.08; letter-spacing: -.01em;
}
.feat-body { font-size: 15px; line-height: 1.65; opacity: .74; margin-top: 14px; max-width: 34ch; }
.feat-card.accent .feat-body { opacity: .6; }

/* the photograph carries the card */
.feat-photo {
  width: calc(100% + 60px); margin: auto -30px 0; display: block;
  object-fit: contain; object-position: center bottom;
  min-height: 380px; max-height: 430px; padding-top: 30px;
}
/* The keys are a small object — blown up to fill the card they looked
   like a stock photo. Held smaller and centred on the base instead. */
.feat-card.accent .feat-photo {
  min-height: 300px; max-height: 330px; padding-top: 28px; padding-bottom: 44px;
  object-fit: contain;
}
.feat-card.accent { min-height: 700px; }

/* ---- real-unit gallery ---- */
.mars-strip { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: 6vh; }
.mars-strip figure {
  position: relative; overflow: hidden; background: var(--ct-graphite); aspect-ratio: 3 / 4;
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer)));
}
.mars-strip img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.mars-strip figure:hover img { transform: scale(1.05); }
.mars-strip figcaption {
  position: absolute; left: 18px; bottom: 16px; right: 18px; font-size: 9px; letter-spacing: .26em;
  color: var(--ct-white); text-shadow: 0 1px 10px rgba(0,0,0,.8);
}

/* ---- configure + book bar ---- */
.cfg {
  display: flex; align-items: center; justify-content: space-between; gap: 30px;
  flex-wrap: wrap; margin-top: 34px; padding: 26px 30px;
  background: var(--ct-graphite); border: 1px solid var(--line);
  clip-path: polygon(0 0, calc(100% - var(--chamfer)) 0, 100% var(--chamfer), 100% 100%, var(--chamfer) 100%, 0 calc(100% - var(--chamfer)));
}
.cfg-label { font-size: 11px; letter-spacing: .18em; opacity: .6; }
.cfg-value { font-size: clamp(28px, 3.2vw, 44px); font-weight: 700; line-height: 1.05; margin: 6px 0 8px; }
.cfg-note { font-size: 13px; opacity: .62; }
.cfg-sep { font-style: normal; opacity: .5; margin: 0 .6em; }
.cfg-cta { transition: transform .25s ease, box-shadow .25s ease; }
.cfg-cta:hover { transform: translateY(-3px); box-shadow: 0 14px 34px rgba(255,90,31,.3); }

/* ---- colour panel: contact shadow + settle ---- */
.colours-floor {
  position: absolute; left: 8%; right: 8%; bottom: 6%; height: 8%; pointer-events: none; z-index: 1;
  background: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,.30) 0%, rgba(0,0,0,0) 70%); filter: blur(6px);
}
@keyframes colour-settle {
  0%   { transform: translate(-50%, -46%) scale(1.015); opacity: .35; }
  60%  { transform: translate(-50%, -51%) scale(1.002); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}
.colour-shot.on.settle { animation: colour-settle .55s cubic-bezier(.22,.61,.36,1); }

.mars-closing { min-height: auto; padding-top: 14vh; padding-bottom: 16vh; }

/* ---- scroll reveal (see public/js/reveal.js) ----
   Scoped to .reveal-ready, which reveal.js only adds when it can
   actually run. No JS, an old browser, or reduced-motion means
   nothing is ever hidden. */
.reveal-ready [data-reveal],
.reveal-ready [data-reveal-group] > * {
  opacity: 0; transform: translateY(26px);
  transition: opacity .65s cubic-bezier(.22,.61,.36,1), transform .65s cubic-bezier(.22,.61,.36,1);
}
.reveal-ready [data-reveal].revealed,
.reveal-ready [data-reveal-group] > .revealed { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal-ready [data-reveal],
  .reveal-ready [data-reveal-group] > * { opacity: 1; transform: none; transition: none; }
  .feat-card, .mars-strip img, .colour-shot.on.settle { transition: none; animation: none; }
}

@media (max-width: 1000px) {
  /* Stack, but keep the scooter small enough that the payoff line
     stays above the fold — the whole point of the hero is the
     sentence, not the photograph. */
  .mhero { padding: 16vh var(--gutter) 10vh; min-height: 92svh; align-items: flex-end; }
  .mhero-inner { max-width: none; }
  .mhero-shot img { object-position: 62% 32%; }
  /* On a phone the copy sits ON the photograph rather than beside
     it, so the wash has to be much heavier — the struck lines were
     landing on the rider's face and disappearing. The image is
     dimmed too, which does more for legibility than gradient alone. */
  /* Anchored to include the scooter, not just the rider — on a tall
     phone crop the previous framing cut the product away entirely. */
  .mhero-shot img { filter: brightness(.5) saturate(.9); object-position: 58% 62%; }
  .mhero-scrim {
    background: linear-gradient(180deg, rgba(9,9,10,.72) 0%, rgba(9,9,10,.55) 22%, rgba(9,9,10,.8) 52%, rgba(9,9,10,.97) 100%);
  }
  .mhero-strike { font-size: clamp(20px, 6.4vw, 34px); }
  .mhero-cue { display: none; }
  .feat-grid, .mars-strip { grid-template-columns: 1fr; }
  .feat-grid { padding: 0; }
  .feat-card, .feat-card.accent { margin: 0; min-height: 0; }
  .feat-card.accent { padding-bottom: 0; }
}
@media (max-width: 700px) {
  .cfg { flex-direction: column; align-items: flex-start; }
  .cfg .cta { width: 100%; text-align: center; }
  .mars-strip figure { aspect-ratio: 4 / 3; }
}
