/* ============================================================================
   Landing page — the photo helix, the hero, and the screen illustrations.
   ========================================================================== */

/* =============================================================== the hero == */

.hero {
  position: relative;
  padding-block: clamp(52px, 7vw, 104px) clamp(64px, 8vw, 120px);
  overflow: hidden;   /* contains the helix; the page itself never scrolls x */
  background:
    radial-gradient(1200px 620px at 78% 18%, rgba(18, 87, 78, .07) 0%, transparent 62%),
    radial-gradient(900px 520px at 8% 95%, rgba(171, 124, 56, .06) 0%, transparent 60%),
    var(--paper);
}

.hero__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(44px, 6vw, 76px);
  align-items: center;
}

@media (min-width: 1000px) {
  .hero__inner {
    /* The helix gets real estate rather than hiding behind the text, but the
       headline needs enough measure not to break after two words. */
    grid-template-columns: minmax(0, 1.18fr) minmax(0, 1fr);
    gap: clamp(36px, 4vw, 72px);
  }
}
@media (min-width: 1280px) {
  .hero__inner { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
}

.hero__copy { position: relative; z-index: 2; }

.hero h1 {
  margin-bottom: 24px;
  text-wrap: balance;
  color: var(--ink);
  font-size: clamp(2.15rem, 6.2vw, 4.2rem);
}
@media (min-width: 1000px) { .hero h1 { max-width: 15ch; } }
.hero h1 em {
  font-style: italic;
  color: var(--accent);
  /* A hairline swash under the emphasised phrase — a small, quiet flourish. */
  background-image: linear-gradient(var(--brass), var(--brass));
  background-repeat: no-repeat;
  background-size: 100% 1.5px;
  background-position: 0 92%;
  padding-bottom: 2px;
}

.hero__lede {
  font-size: clamp(1.06rem, 1.25vw, 1.2rem);
  line-height: 1.62;
  color: var(--ink-2);
  margin-bottom: 34px;
  max-width: 52ch;
}

.hero__meta {
  display: flex; flex-wrap: wrap;
  gap: 14px 30px;
  margin-top: 40px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
  font-size: .89rem; color: var(--ink-3);
}
.hero__meta span { display: inline-flex; align-items: center; gap: 9px; }
.hero__meta strong { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; }

/* ============================================================== the helix == */

.helix-stage {
  position: relative;
  z-index: 1;
  /* Square-ish on desktop so the helix reads as a column within a circle. */
  aspect-ratio: 1 / 1.06;
  min-height: 380px;
  perspective: 1500px;
  perspective-origin: 50% 50%;
  display: grid;
  place-items: center;
}

/* The circular field the photographs turn inside. It is what makes this read
   as a deliberate object rather than a background image that slipped. */
.helix-stage::before {
  content: '';
  position: absolute;
  inset: 4%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 42%, rgba(255,255,255,.9) 0%, rgba(255,255,255,0) 58%),
    conic-gradient(from 210deg, rgba(18,87,78,.1), rgba(171,124,56,.09), rgba(18,87,78,.1));
  border: 1px solid var(--line-soft);
  box-shadow: inset 0 0 90px rgba(20,23,27,.05);
  pointer-events: none;
}

/* A second, thinner ring just inside — depth without clutter. */
.helix-stage::after {
  content: '';
  position: absolute;
  inset: 13%;
  border-radius: 50%;
  border: 1px dashed rgba(20,23,27,.09);
  pointer-events: none;
}

.helix {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  pointer-events: none;
  opacity: var(--helix-opacity, 1);
  will-change: opacity;
}

.helix__spin {
  position: absolute;
  top: 50%; left: 50%;
  width: 0; height: 0;
  transform-style: preserve-3d;
  animation: helix-spin var(--helix-duration, 64s) linear infinite;
}

@keyframes helix-spin {
  from { transform: rotateY(0deg); }
  to   { transform: rotateY(360deg); }
}

.helix {
  /* The whole geometry is four numbers, and all four scale together at each
     breakpoint. The generated per-card block emits only an angle and a
     unitless step, so the vertical pitch can shrink with the rest — baking
     the pitch into the markup made the column overflow its stage on a phone
     and land on top of the headline. */
  /*
   * Geometry as four numbers, so it scales at a breakpoint without touching
   * the transforms. The one that matters for crowding is the relationship
   * between --card-w and --radius: neighbours sit a chord apart, which for six
   * per turn is exactly the radius, so a radius comfortably larger than the
   * card width is what keeps them from cutting through each other.
   */
  --card-w: 168px;
  --card-h: 112px;
  --radius: 195px;
  --pitch:  38px;
}

.helix__item {
  position: absolute;
  width: var(--card-w);
  height: var(--card-h);
  margin-left: calc(var(--card-w) / -2);
  margin-top: calc(var(--card-h) / -2);
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(255,255,255,.7);
  box-shadow: 0 14px 34px -10px rgba(20,23,27,.3), 0 2px 5px rgba(20,23,27,.1);
  /* Placed by variables the template writes, so the geometry lives in one
     place and the markup stays declarative. */
  transform:
    rotateY(var(--angle))
    translateZ(var(--radius))
    translateY(calc(var(--pitch) * var(--y-step)));
  backface-visibility: hidden;
  opacity: 0;
  animation: helix-in .8s cubic-bezier(.2,.8,.3,1) forwards;
  animation-delay: var(--delay, 0s);
}

@keyframes helix-in {
  from { opacity: 0; }
  to   { opacity: var(--item-opacity, 1); }
}

.helix__item img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(1.02) contrast(1.02);
}

/* Placeholder tiles, shown until photographs are dropped into
   public/assets/img/helix. The helix is the centrepiece of this page, so an
   empty folder must still produce something deliberate — not a blank hero
   that looks like a failed deploy. */
.helix__item--placeholder {
  background:
    linear-gradient(150deg, var(--ph-a) 0%, var(--ph-b) 100%);
  display: grid;
  place-items: center;
  border-color: rgba(255,255,255,.55);
}
.helix__item--placeholder::after {
  content: '';
  width: 34%; height: 34%;
  background: rgba(255,255,255,.5);
  clip-path: polygon(0 68%, 26% 40%, 46% 60%, 72% 22%, 100% 52%, 100% 100%, 0 100%);
}
.helix__item--placeholder::before {
  content: '';
  position: absolute;
  top: 16%; right: 18%;
  width: 13%; aspect-ratio: 1;
  border-radius: 50%;
  background: rgba(255,255,255,.62);
}

/* A soft wash at the stage edges so cards fade rather than clip hard. */
.helix-stage__veil {
  position: absolute; inset: -2%;
  border-radius: 50%;
  pointer-events: none;
  z-index: 3;
  background: radial-gradient(circle at 50% 50%,
    transparent 0%, transparent 74%, rgba(251,250,248,.72) 88%, var(--paper) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .helix__spin { animation: none; transform: rotateY(-20deg); }
  .helix__item { animation: none; opacity: var(--item-opacity, 1); }
}

/* On a phone the helix sits above the copy as a smaller, complete object
   rather than being deleted — it is the thing that makes this page itself.
   The cards scale with the stage; leaving them at desktop size made them
   spill past both edges of the screen. */
@media (max-width: 999px) {
  .helix-stage {
    aspect-ratio: 1 / 1;
    width: 100%;
    max-width: 430px;
    margin-inline: auto;
    min-height: 260px;
    order: -1;
  }
  .helix { --card-w: 124px; --card-h: 83px; --radius: 140px; --pitch: 27px; }
  .helix-stage__veil {
    background: radial-gradient(circle at 50% 50%,
      transparent 0%, transparent 66%, rgba(251,250,248,.8) 84%, var(--paper) 100%);
  }
}
@media (max-width: 620px) {
  .helix-stage { max-width: min(300px, 78vw); }
  /* Slightly smaller cards here: the stage is capped at 300px, so the radius
     cannot grow to make room the way it can on a wider screen. */
  .helix { --card-w: 84px; --card-h: 56px; --radius: 100px; --pitch: 20px; }
}

/* ================================================== screen illustrations == */

.screens-grid {
  display: grid;
  gap: clamp(18px, 2vw, 28px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}

.screen-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: transform .28s cubic-bezier(.2,.8,.3,1), box-shadow .28s ease, border-color .28s ease;
}
.screen-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow);
  border-color: var(--accent-line);
}

/* The stage each illustration stands on. */
.screen-card__stage {
  position: relative;
  background:
    radial-gradient(120% 90% at 50% 8%, #ffffff 0%, var(--paper-2) 62%, var(--paper-3) 100%);
  border-bottom: 1px solid var(--line-soft);
  padding: 30px 24px 26px;
  display: grid; place-items: center;
  min-height: 236px;
}

/* A floor shadow belongs under something standing on the floor — the pump.
   The in-store screens are fixed to a wall, so they cast onto the wall
   behind them instead. */
.screen-card__stage::after {
  content: '';
  position: absolute;
  bottom: 20px; left: 50%; transform: translateX(-50%);
  width: 62%; height: 13px;
  background: radial-gradient(ellipse at center, rgba(20,23,27,.17) 0%, transparent 72%);
  border-radius: 50%;
}
.screen-card__stage--wall::after { display: none; }

.screen-illo { position: relative; z-index: 1; height: 176px; width: auto; }

/* The cast shadow is what makes a wall-fixed screen read as hung rather than
   floating, now that there is no stand to ground it. */
.screen-illo--wall { filter: drop-shadow(0 14px 18px rgba(20, 23, 27, .2)); }

/* The live area of each illustration — a slow shimmer so the screens read as
   powered on rather than as line art. */
.screen-illo .glass { fill: url(#screenGlass); }
.screen-illo .glass-anim { animation: screen-shimmer 5.5s ease-in-out infinite; transform-origin: center; }
@keyframes screen-shimmer { 0%, 100% { opacity: .82; } 50% { opacity: 1; } }

.screen-card__body { padding: 22px clamp(20px, 2.4vw, 26px) 26px; flex: 1; }
.screen-card__body h3 { margin-bottom: 7px; }

.screen-card__spec {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--mono); font-size: .78rem; letter-spacing: .02em;
  color: var(--accent); background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 4px 10px; border-radius: 6px;
  margin-bottom: 13px;
}

.screen-card__where {
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  font-size: .84rem; color: var(--ink-3);
  display: flex; align-items: center; gap: 8px;
}

/* ===================================================== locations section == */

.location-grid {
  display: grid;
  gap: clamp(14px, 1.6vw, 20px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
}

.location-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px 26px 24px;
  position: relative;
  overflow: hidden;
}
.location-card::before {
  content: '';
  position: absolute; inset: 0 auto 0 0; width: 3px;
  background: linear-gradient(var(--accent-2), var(--accent));
}
.location-card h3 {
  font-family: var(--display); font-size: 1.4rem; font-weight: 500;
  letter-spacing: -.015em; margin-bottom: 4px;
}
.location-card__county { font-size: .82rem; color: var(--ink-4); margin-bottom: 16px; }
.location-card__screens { display: grid; gap: 8px; font-size: .88rem; }
.location-card__screens span { display: flex; align-items: center; gap: 9px; color: var(--ink-2); }
.location-card__screens svg { color: var(--accent-2); flex: none; }
.location-card__screens .absent { color: var(--ink-4); }
.location-card__screens .absent svg { color: var(--ink-4); opacity: .5; }

/* ========================================================== how it works == */

.steps { display: grid; gap: 0; counter-reset: step; }

.step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 22px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line-soft);
}
.step:last-child { border-bottom: 0; }

.step__num {
  counter-increment: step;
  width: 46px; height: 46px; border-radius: 50%;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  color: var(--accent);
  display: grid; place-items: center;
  font-family: var(--display); font-size: 1.15rem; font-weight: 600;
  flex: none;
}
.step__num::before { content: counter(step); }
.step h3 { margin-bottom: 5px; }
.step p { margin: 0; color: var(--ink-3); font-size: .96rem; }

/* ================================================================== CTA === */

.cta-panel {
  position: relative;
  overflow: hidden;
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(38px, 5.5vw, 74px) clamp(26px, 5vw, 64px);
  text-align: center;
  color: rgba(255,255,255,.7);
}
.cta-panel::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(900px 420px at 50% -10%, rgba(26,122,108,.45) 0%, transparent 68%),
    radial-gradient(600px 300px at 88% 110%, rgba(171,124,56,.22) 0%, transparent 65%);
  pointer-events: none;
}
.cta-panel > * { position: relative; }
.cta-panel h2 { color: #fff; margin-bottom: 14px; }
.cta-panel .lede { color: rgba(255,255,255,.74); margin-inline: auto; }
.cta-panel .btn-row { justify-content: center; margin-top: 32px; }

/* ============================================================ scroll cue == */

.scroll-cue {
  display: flex; align-items: center; gap: 10px;
  margin-top: 34px;
  font-size: .74rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--ink-4);
  background: none; border: 0; padding: 0; cursor: pointer;
  font-family: inherit;
}
.scroll-cue:hover { color: var(--accent); }
.scroll-cue svg { animation: cue-bob 2.4s ease-in-out infinite; }
@keyframes cue-bob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(4px); } }
@media (max-width: 999px) { .scroll-cue { display: none; } }

/* ------------------------------------------------- client adverts on the helix
 * A client advert is artwork made for a screen, so it is shown in one: a dark
 * bezel, a glass highlight and a power light. Photographs of the forecourts
 * keep their plain frame — the distinction is the point, and without it an
 * advert reads as just another photograph.
 */

.helix__item--screen {
  /* The bezel is the card's own padding, so the artwork sits inside it. */
  padding: 7px 7px 11px;
  background: linear-gradient(168deg, #363d45 0%, #1b2026 62%, #12161a 100%);
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 9px;
  box-shadow:
    0 16px 36px -10px rgba(20, 23, 27, .5),
    0 2px 6px rgba(20, 23, 27, .28),
    inset 0 1px 0 rgba(255, 255, 255, .14);
}

.helix__item--screen img {
  border-radius: 2px;
  /* Screens are emissive; a flat photograph of one is not. A touch of
     brightness and saturation is what sells it as lit rather than printed. */
  filter: saturate(1.1) brightness(1.06) contrast(1.02);
  box-shadow: inset 0 0 12px rgba(0, 0, 0, .45);
}

/* Glass: a single diagonal sheen across the panel. */
.helix__item--screen::before {
  content: '';
  position: absolute;
  inset: 7px 7px 11px;
  border-radius: 2px;
  background: linear-gradient(122deg,
    rgba(255, 255, 255, .2) 0%,
    rgba(255, 255, 255, .06) 26%,
    rgba(255, 255, 255, 0) 52%);
  pointer-events: none;
  z-index: 2;
}

/* The power light on the bezel below the panel. */
.helix__item--screen::after {
  content: '';
  position: absolute;
  bottom: 3.5px; left: 50%;
  transform: translateX(-50%);
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--accent-3);
  box-shadow: 0 0 4px var(--accent-3);
  z-index: 2;
}
