/* =====================================================================
   COX STUDIO WEBSITE: STYLES

   1. Colours, fonts and spacing (change the brand look here)
   2. Base
   3. Buttons and small pieces
   4. Intro loader
   5. Top navigation
   6. Tunnel overlays (intro text, chapter info, side rail, end screen)
   7. Switching between the tunnel and the main site
   8. Main site sections
   9. Contact and brief form
   10. Footer
   11. FAQ
   12. Service pages (the pages in the folders next to index.html)
   13. Motion preferences
   ===================================================================== */


/* 1. COLOURS, FONTS AND SPACING -------------------------------------- */
:root {
  --color-bg: #0c0b0d;          /* page background */
  --color-text: #f3f1ee;        /* main text */
  --color-text-soft: #c9c5c2;   /* paragraphs */
  --color-muted: #8a858b;       /* small labels */
  --color-red: #ee1c12;         /* COX red */
  --color-line: rgba(243, 241, 238, 0.14);

  --font-display: "Big Shoulders Display", "Oswald", "Arial Narrow", Impact, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, Menlo, monospace;

  --side-space: clamp(16px, 4vw, 60px);  /* gap between content and the screen edge */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);

  color-scheme: dark;
}


/* 2. BASE -------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  background: var(--color-bg);
}

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

html.lenis,
html.lenis body {
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

:focus-visible {
  outline: 2px solid var(--color-red);
  outline-offset: 4px;
  border-radius: 4px;
}

.mono {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.display {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  line-height: 0.84;
  letter-spacing: -0.005em;
  margin: 0;
}

.text-red {
  color: var(--color-red);
}

/* The 3D tunnel is drawn on this canvas, behind everything. */
#tunnel-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 3;
  will-change: transform;
}

/* This empty block gives the page its scroll length while flying the tunnel. */
.tunnel-scroll {
  position: relative;
  z-index: 0;
  height: 900svh;
}

.vignette {
  position: fixed;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  will-change: transform;
  background: radial-gradient(ellipse at center, transparent 45%, rgba(0, 0, 0, 0.55) 100%);
}

.film-grain {
  position: fixed;
  inset: -50%;
  z-index: 40;
  pointer-events: none;
  opacity: 0.07;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 1s steps(6) infinite;
}

html.no-grain .film-grain {
  display: none;
}

@keyframes grain-shift {
  0%, 100% { transform: translate(0, 0); }
  25% { transform: translate(-4%, 3%); }
  50% { transform: translate(3%, -5%); }
  75% { transform: translate(-2%, 4%); }
}


/* 3. BUTTONS AND SMALL PIECES ---------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  border: 0;
  border-radius: 999px;
  background: var(--color-red);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  padding: 12px 20px;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
}

.btn:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: var(--color-text);
}

.btn-ghost:hover {
  background: var(--color-text);
  color: var(--color-bg);
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--color-muted);
}

.eyebrow::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-red);
}

/* Glass card, same family as the glass boxes in the tunnel. */
.glass {
  position: relative;
  border-radius: 22px;
  background: linear-gradient(150deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.025) 45%, rgba(255, 255, 255, 0.05));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 1px 0 0 rgba(255, 255, 255, 0.1), 0 30px 60px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  isolation: isolate;
}

.glass::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(115deg, transparent 35%, rgba(255, 255, 255, 0.1) 45%, transparent 55%);
  transform: translateX(-120%);
  transition: transform 1.1s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.glass:hover::after {
  transform: translateX(120%);
}

/* Ring that fills while a tunnel box is being held (before it can be dragged). */
@property --hold-progress {
  syntax: "<angle>";
  inherits: false;
  initial-value: 0deg;
}

.hold-ring {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 61;
  width: 54px;
  height: 54px;
  margin: -27px 0 0 -27px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: conic-gradient(var(--color-red) var(--hold-progress), rgba(255, 255, 255, 0.15) 0);
  -webkit-mask: radial-gradient(circle, transparent 20px, #000 21px);
  mask: radial-gradient(circle, transparent 20px, #000 21px);
}

.hold-ring.is-filling {
  opacity: 1;
  animation: hold-fill var(--hold-time, 0.28s) linear forwards;
}

@keyframes hold-fill {
  to { --hold-progress: 360deg; }
}

html.can-grab,
html.can-grab body {
  cursor: grab;
}

html.is-grabbing,
html.is-grabbing * {
  cursor: grabbing !important;
  user-select: none;
}


/* 4. INTRO LOADER ------------------------------------------------------ */
#loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  container-type: size;
  overflow: hidden;
  /* safety net: if scripts fail, the loader still fades away */
  animation: loader-safety-out 0.8s ease 8.6s forwards;
}

@keyframes loader-safety-out {
  to { opacity: 0; visibility: hidden; }
}

.loader-backdrop {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 45%, #1a1014 0%, var(--color-bg) 65%);
}

#loader canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.loader-brand {
  position: absolute;
  top: calc(16px + var(--safe-top));
  left: var(--side-space);
  height: 40px;
  width: auto;
}

.loader-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(1.6cqw + 2cqh);
  padding-inline: var(--side-space);
  text-align: center;
}

.loader-infinity {
  width: min(calc(30cqw + 18cqh), 620px);
  aspect-ratio: 2 / 1;
  flex: none;
}

.loader-copy {
  display: grid;
  gap: calc(0.5cqw + 0.8cqh);
  justify-items: center;
}

.loader-title {
  font-size: calc(4cqw + 2cqh);
}

.loader-word {
  display: inline-block;
  white-space: nowrap;
}

.loader-letter {
  display: inline-block;
  white-space: pre;
  opacity: 0;
  transform: translateY(40%);
}

.loader-letter.red {
  color: var(--color-red);
}

.loader-line {
  margin: 0;
  max-width: 36ch;
  color: var(--color-text-soft);
  font-size: max(13px, calc(0.55cqw + 0.95cqh));
  line-height: 1.45;
  opacity: 0;
}

.loader-bar {
  width: min(calc(20cqw + 10cqh), 360px);
  height: 2px;
  border-radius: 2px;
  overflow: hidden;
  background: rgba(243, 241, 238, 0.12);
  opacity: 0;
}

.loader-bar i {
  display: block;
  height: 100%;
  background: var(--color-red);
  box-shadow: 0 0 10px var(--color-red);
  transform-origin: 0 50%;
  transform: scaleX(0);
}

.loader-foot {
  position: absolute;
  left: var(--side-space);
  right: var(--side-space);
  bottom: calc(24px + var(--safe-bottom));
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  color: var(--color-muted);
  opacity: 0;
}

.loader-count {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.8;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}


/* 5. TOP NAVIGATION ---------------------------------------------------- */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: calc(16px + var(--safe-top)) var(--side-space) 16px;
  transition: transform 0.5s cubic-bezier(0.2, 0.7, 0.1, 1), opacity 0.4s ease;
}

.site-nav img {
  display: block;
  width: auto;
  height: 40px;
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 26px;
}

.nav-links {
  display: flex;
  gap: 24px;
  font-size: 14px;
  font-weight: 500;
}

.nav-links a {
  opacity: 0.8;
  transition: opacity 0.3s;
}

.nav-links a:hover {
  opacity: 1;
}

/* Tunnel links show in the tunnel, site links (and the FAQ button) on the main site.
   While switching to the site, the bar already carries the site links, so it
   slides down complete instead of swapping buttons after it lands. */
html.show-site .nav-tunnel,
html.is-switching .nav-tunnel,
html:not(.show-site):not(.is-switching) .nav-site {
  display: none;
}

.site-nav.is-hidden {
  transform: translateY(-150%);
  opacity: 0;
  pointer-events: none;
}

/* On the main site the bar becomes a floating, tinted glass bar. */
html.show-site .site-nav,
html.is-switching .site-nav {
  top: calc(10px + var(--safe-top));
  left: var(--side-space);
  right: var(--side-space);
  padding: 10px 12px 10px 18px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(60, 14, 14, 0.55), rgba(22, 20, 24, 0.55) 55%, rgba(40, 12, 12, 0.5));
  -webkit-backdrop-filter: blur(18px) saturate(170%);
  backdrop-filter: blur(18px) saturate(170%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.28), inset 0 -1px 0 rgba(0, 0, 0, 0.35), 0 18px 40px rgba(0, 0, 0, 0.45);
}

html.show-site .site-nav img,
html.is-switching .site-nav img {
  height: 34px;
}

html.show-site .site-nav .btn,
html.is-switching .site-nav .btn {
  padding: 10px 18px;
}

@media (max-width: 820px) {
  .nav-links {
    display: none;
  }
}

@media (max-width: 480px) {
  .site-nav img {
    height: 34px;
  }

  .btn {
    padding: 10px 15px;
    font-size: 13px;
  }
}


/* 6. TUNNEL OVERLAYS --------------------------------------------------- */
.overlay {
  position: fixed;
  z-index: 10;
  pointer-events: none;
}

.overlay .clickable {
  pointer-events: auto;
}

/* "Step into the frame" */
.tunnel-intro {
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
  padding-inline: var(--side-space);
  text-align: center;
}

.tunnel-intro h1 {
  font-size: clamp(70px, 13.5vw, 250px);
}

.tunnel-intro .outline {
  color: transparent;
  -webkit-text-stroke: 2px var(--color-text);
}

.tunnel-intro p {
  margin: 0;
  max-width: 44ch;
  color: var(--color-text-soft);
  font-size: clamp(15px, 1.3vw, 19px);
}

.tunnel-intro .tagline {
  color: var(--color-muted);
}

.tunnel-intro .brand-label {
  position: absolute;
  left: var(--side-space);
  bottom: calc(24px + var(--safe-bottom));
  color: var(--color-muted);
}

.scroll-cue {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--color-text-soft);
}

.scroll-cue i {
  width: 1px;
  height: 44px;
  background: linear-gradient(var(--color-text), transparent);
  transform-origin: top;
  animation: scroll-cue 2s cubic-bezier(0.7, 0, 0.2, 1) infinite;
}

@keyframes scroll-cue {
  0% { transform: scaleY(0); }
  50% { transform: scaleY(1); opacity: 1; }
  100% { opacity: 0; }
}

/* The intro words rise in after the loader. */
.tunnel-intro > * {
  transition: opacity 1.1s cubic-bezier(0.2, 0.7, 0.1, 1), transform 1.2s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.tunnel-intro > :nth-child(2) { transition-delay: 0.08s; }
.tunnel-intro > :nth-child(3) { transition-delay: 0.16s; }
.tunnel-intro > :nth-child(4) { transition-delay: 0.24s; }

html.loader-on .tunnel-intro > * {
  opacity: 0;
  transform: translateY(30px);
}

/* Bottom-left chapter info: 01 / IDEA / text */
.chapter-info {
  left: var(--side-space);
  bottom: calc(70px + var(--safe-bottom));
  width: min(440px, calc(100% - 2 * var(--side-space)));
  opacity: 0;
}

.chapter-number {
  display: flex;
  align-items: baseline;
  gap: 14px;
  color: var(--color-muted);
}

.chapter-number b {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(64px, 8vw, 120px);
  line-height: 0.8;
  color: var(--color-red);
}

.chapter-info h2 {
  font-size: clamp(48px, 6vw, 96px);
  margin: 10px 0 12px;
}

.chapter-info p {
  margin: 0;
  max-width: 40ch;
  color: var(--color-text-soft);
  font-size: 16.5px;
}

.chapter-info .swap {
  transition: opacity 0.35s, transform 0.45s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.chapter-info.is-changing .swap {
  opacity: 0;
  transform: translateY(14px);
}

/* Right side progress rail */
.chapter-rail {
  right: var(--side-space);
  top: 50%;
  width: 2px;
  height: min(46svh, 360px);
  margin-top: calc(min(46svh, 360px) / -2);
  background: var(--color-line);
  opacity: 0;
}

.chapter-rail i {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: var(--color-red);
  transform-origin: top;
  transform: scaleY(0);
}

.chapter-rail span {
  position: absolute;
  right: 14px;
  transform: translateY(-50%);
  white-space: nowrap;
  color: var(--color-muted);
  transition: color 0.3s;
}

.chapter-rail span::after {
  content: "";
  position: absolute;
  right: -19px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--color-bg);
  border: 1.5px solid var(--color-muted);
}

.chapter-rail span.is-current {
  color: var(--color-text);
}

.chapter-rail span.is-current::after {
  background: var(--color-red);
  border-color: var(--color-red);
}

@media (max-width: 700px) {
  .chapter-rail {
    display: none;
  }

  .chapter-info {
    bottom: calc(64px + var(--safe-bottom));
  }

  .chapter-number b {
    font-size: 56px;
  }

  .chapter-info h2 {
    font-size: 52px;
    margin: 6px 0 8px;
  }

  .chapter-info p {
    font-size: 15px;
  }

  .tunnel-intro h1 {
    font-size: clamp(64px, 19vw, 110px);
  }
}

/* "Your idea is next." end screen */
/* Sizes also follow the screen height, so short screens (tablets and phones
   in landscape) keep room above the text for the COX logo. */
.tunnel-end {
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: min(18px, 2.2svh);
  padding: 0 var(--side-space) calc(min(80px, 7svh) + var(--safe-bottom));
  text-align: center;
  opacity: 0;
}

.tunnel-end h2 {
  font-size: min(clamp(52px, 8vw, 130px), 13svh);
}

.tunnel-end p {
  margin: 0;
  color: var(--color-text-soft);
}

.tunnel-end .quick-contacts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 26px;
  color: var(--color-text);
}

.tunnel-end .quick-contacts span {
  user-select: all;
}

.enter-button {
  margin-top: min(10px, 1svh);
  height: 54px;
  padding: 0 26px;
  font-size: 16px;
}

.enter-button .arrow {
  display: inline-block;
  animation: nudge-down 1.6s ease-in-out infinite;
}

@keyframes nudge-down {
  50% { transform: translateY(4px); }
}


/* 7. SWITCHING BETWEEN THE TUNNEL AND THE MAIN SITE ------------------- */
/* Red line under the tunnel while it lifts off the site. */
.curtain-edge {
  position: fixed;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 11;
  height: 2px;
  pointer-events: none;
  opacity: 0;
  will-change: transform;
  background: linear-gradient(90deg, transparent, var(--color-red) 20%, #ff8a7e 50%, var(--color-red) 80%, transparent);
  box-shadow: 0 0 24px 6px rgba(238, 28, 18, 0.55), 0 -30px 60px rgba(0, 0, 0, 0.6);
}

html.show-site .tunnel-scroll,
html.show-site .overlay,
html.show-site #tunnel-canvas,
html.show-site .vignette,
html.show-site .curtain-edge {
  display: none;
}

html:not(.show-site):not(.is-switching) .main-site {
  display: none;
}

/* While switching, the site sits still underneath the moving tunnel. */
html.is-switching .main-site {
  position: fixed;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  will-change: transform;
}


/* 8. MAIN SITE SECTIONS ------------------------------------------------ */
.main-site {
  position: relative;
  z-index: 1;
  background: var(--color-bg);
}

.container {
  max-width: 1360px;
  margin-inline: auto;
  padding-inline: var(--side-space);
}

.section {
  padding-block: clamp(90px, 11vw, 150px);
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px 48px;
  margin-bottom: clamp(34px, 5vw, 60px);
}

.section-head h2 {
  font-size: clamp(50px, 7.6vw, 124px);
  margin-top: 16px;
}

.section-head p {
  margin: 0;
  max-width: 40ch;
  color: var(--color-text-soft);
  font-size: 17px;
}

/* "Revisit the journey" button at the top of the site */
.revisit-bar {
  display: flex;
  justify-content: center;
  padding-top: calc(96px + var(--safe-top));
}

.revisit-bar + .section {
  padding-top: clamp(40px, 6vw, 80px);
}

.revisit-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font: 500 14px var(--font-body);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}

.revisit-button:hover {
  background: rgba(238, 28, 18, 0.18);
  border-color: rgba(238, 28, 18, 0.6);
}

.revisit-button .arrow {
  display: inline-block;
  color: var(--color-red);
  animation: nudge-up 1.6s ease-in-out infinite;
}

@keyframes nudge-up {
  50% { transform: translateY(-4px); }
}

/* What we do */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.service-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 26px;
  min-height: 340px;
  padding: clamp(22px, 3vw, 36px);
  transition: border-color 0.4s, transform 0.6s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.service-card:hover {
  border-color: rgba(238, 28, 18, 0.55);
  transform: translateY(-4px);
}

.service-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--color-muted);
}

.service-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: rgba(238, 28, 18, 0.14);
  border: 1px solid rgba(238, 28, 18, 0.4);
  color: #ff5a4a;
}

.service-icon svg {
  width: 28px;
  height: 28px;
}

.service-card h3 {
  font-size: clamp(42px, 4.8vw, 76px);
}

.service-body {
  display: grid;
  gap: 16px;
}

.service-body p {
  margin: 0;
  max-width: 46ch;
  color: var(--color-text-soft);
}

.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.tags li {
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-soft);
  font-size: 13px;
}

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

  .service-card {
    min-height: 0;
  }
}

/* Moving word strip */
.marquee {
  overflow: hidden;
  padding-block: 24px;
  border-block: 1px solid var(--color-line);
}

.marquee-row {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: marquee 32s linear infinite;
}

.marquee-row span {
  display: inline-flex;
  align-items: center;
  gap: 0.3em;
  padding-right: 0.3em;
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(46px, 7vw, 108px);
  line-height: 1;
}

.marquee-row span:nth-child(even) {
  color: transparent;
  -webkit-text-stroke: 1.5px rgba(243, 241, 238, 0.6);
}

.marquee-row span::after {
  content: "";
  width: 0.2em;
  height: 0.2em;
  border-radius: 50%;
  background: var(--color-red);
}

@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* How we work */
.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.step-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  cursor: pointer;
  transition: border-color 0.3s;
}

.step-card:hover {
  border-color: rgba(238, 28, 18, 0.55);
}

.step-card b {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: 56px;
  line-height: 0.8;
  color: var(--color-red);
}

.step-card h3 {
  font-size: 34px;
}

.step-card p {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 14.5px;
}

.step-card span {
  color: var(--color-muted);
}

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

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

/* Why COX */
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.why-grid > div {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px;
}

.why-grid b {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(28px, 2.4vw, 38px);
  line-height: 0.95;
}

.why-grid p {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 15px;
}

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

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

/* Cards rise in as they scroll into view. */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 1s cubic-bezier(0.2, 0.7, 0.1, 1), transform 1.1s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* 9. CONTACT AND BRIEF FORM ------------------------------------------ */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(34px, 6vw, 90px);
  align-items: start;
}

.contact h2 {
  font-size: clamp(64px, 10vw, 168px);
  margin-top: 16px;
}

.contact-lede {
  margin: 18px 0 0;
  max-width: 36ch;
  color: var(--color-text-soft);
  font-size: 18px;
}

.contact-list {
  margin-top: 30px;
  border-top: 1px solid var(--color-line);
}

.contact-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding-block: 15px;
  border-bottom: 1px solid var(--color-line);
}

.contact-label {
  color: var(--color-muted);
}

.contact-value {
  font-size: clamp(16px, 1.5vw, 20px);
  font-weight: 500;
  overflow-wrap: anywhere;
  user-select: all;
}

a.contact-value {
  user-select: auto;
}

.copy-button {
  padding: 8px 13px;
  border-radius: 999px;
  border: 1px solid var(--color-line);
  background: transparent;
  color: var(--color-text);
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 0.3s;
}

.copy-button:hover {
  border-color: var(--color-red);
  color: var(--color-red);
}

.copy-button.is-done {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
}

.brief-form {
  display: grid;
  gap: 18px;
  padding: clamp(20px, 3vw, 34px);
}

.brief-form label {
  display: grid;
  gap: 8px;
}

.brief-form label > span {
  color: var(--color-muted);
}

.brief-form input,
.brief-form textarea {
  width: 100%;
  padding: 14px 15px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.35);
  color: var(--color-text);
  font: inherit;
  font-size: 16px;
  transition: border-color 0.3s;
}

.brief-form input:focus,
.brief-form textarea:focus {
  outline: none;
  border-color: var(--color-red);
}

.brief-form textarea {
  min-height: 120px;
  resize: vertical;
}

.brief-form fieldset {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  border: 0;
}

.brief-form legend {
  margin-bottom: 10px;
  padding: 0;
  color: var(--color-muted);
}

.need-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.need-options label {
  position: relative;
  display: inline-flex;
}

.need-options input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.need-options label span {
  padding: 10px 15px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.03);
  color: var(--color-text-soft);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.25s;
}

.need-options input:checked + span {
  background: var(--color-red);
  border-color: var(--color-red);
  color: #fff;
}

.need-options input:focus-visible + span {
  outline: 2px solid var(--color-red);
  outline-offset: 3px;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-message {
  min-height: 1.2em;
  margin: 0;
  color: #ff5a4a;
  font-size: 14px;
}

.form-message.is-info {
  color: var(--color-text-soft);
}

.form-note {
  margin: 0;
  color: var(--color-muted);
  font-size: 13px;
}

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

@media (max-width: 480px) {
  .contact-row {
    grid-template-columns: 1fr auto;
  }

  .contact-label {
    grid-column: 1 / -1;
    margin-bottom: -6px;
  }

  .form-actions .btn {
    width: 100%;
  }
}


/* 10. FOOTER ----------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-line);
}

.footer-columns {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 36px;
  padding-block: 56px 36px;
}

.footer-about img {
  height: 56px;
  width: auto;
}

.footer-about p {
  max-width: 42ch;
  margin: 18px 0 0;
  color: var(--color-muted);
  font-size: 14.5px;
}

.footer-links {
  display: grid;
  align-content: start;
  gap: 10px;
  color: var(--color-text-soft);
  font-size: 15px;
}

.footer-links > .mono {
  margin-bottom: 4px;
  color: var(--color-muted);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-links a {
  width: fit-content;
  transition: color 0.3s;
}

.footer-links a:hover {
  color: var(--color-red);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 28px;
  padding-block: 24px calc(28px + var(--safe-bottom));
  border-top: 1px solid var(--color-line);
  color: var(--color-muted);
}

.footer-inner a:hover {
  color: var(--color-text);
}

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

  .footer-about {
    grid-column: 1 / -1;
  }
}

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


/* 11. FAQ -------------------------------------------------------------- */
/* Each question is a <details> block: tap the question to open the answer. */
.faq-list {
  display: grid;
  gap: 10px;
  max-width: 980px;
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px clamp(18px, 3vw, 30px);
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item h3 {
  margin: 0;
  font: 600 clamp(17px, 1.6vw, 20px) / 1.35 var(--font-body);
  letter-spacing: 0;
  text-transform: none;
}

/* the + that turns into a − when open */
.faq-icon {
  position: relative;
  flex: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: background 0.3s, border-color 0.3s;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 1.6px;
  margin: -0.8px 0 0 -6px;
  background: var(--color-text);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.1, 1);
}

.faq-icon::after {
  transform: rotate(90deg);
}

.faq-item[open] .faq-icon {
  background: var(--color-red);
  border-color: var(--color-red);
}

.faq-item[open] .faq-icon::after {
  transform: rotate(0deg);
}

.faq-item:hover {
  border-color: rgba(238, 28, 18, 0.45);
}

.faq-answer {
  padding: 0 clamp(18px, 3vw, 30px) 24px;
}

/* Answers slide open smoothly (in browsers that support it; others simply open). */
.faq-item {
  interpolate-size: allow-keywords;
}

.faq-item::details-content {
  block-size: 0;
  overflow-y: clip;
  transition:
    block-size 0.45s cubic-bezier(0.16, 1, 0.3, 1),
    content-visibility 0.45s allow-discrete;
}

.faq-item[open]::details-content {
  block-size: auto;
}

.faq-answer p {
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity 0.4s ease 0.08s, transform 0.45s ease 0.08s;
}

.faq-item[open] .faq-answer p {
  opacity: 1;
  transform: none;
}

.faq-answer p {
  margin: 0;
  max-width: 70ch;
  color: var(--color-text-soft);
}

.text-link {
  color: var(--color-text);
  text-decoration: underline;
  text-decoration-color: var(--color-red);
  text-underline-offset: 4px;
}

/* "Learn more" link at the bottom of each service card */
.service-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--color-text);
  font-weight: 500;
  font-size: 15px;
  border-bottom: 1px solid var(--color-red);
  padding-bottom: 3px;
}

.service-link span {
  color: var(--color-red);
  transition: transform 0.3s;
}

.service-link:hover span {
  transform: translateX(4px);
}


/* FAQ dropdown in the top navigation (main site only, also on phones) */
.faq-menu {
  display: flex;
  align-items: center;
}

.faq-toggle {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 40px;
  padding: 0 16px;
  border-radius: 999px;
  font: 500 14px var(--font-body);
  color: var(--color-text);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.16);
  cursor: pointer;
  transition: background 0.3s, border-color 0.3s;
}

.faq-toggle:hover,
.faq-toggle[aria-expanded="true"] {
  background: rgba(238, 28, 18, 0.18);
  border-color: rgba(238, 28, 18, 0.6);
}

.faq-caret {
  width: 7px;
  height: 7px;
  margin-top: -3px;
  border-right: 1.6px solid currentColor;
  border-bottom: 1.6px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.35s cubic-bezier(0.2, 0.7, 0.1, 1), margin 0.35s;
}

.faq-toggle[aria-expanded="true"] .faq-caret {
  margin-top: 3px;
  transform: rotate(225deg);
}

/* The panel hangs under the nav bar, aligned to its right edge. */
.faq-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  width: min(580px, calc(100vw - 2 * var(--side-space)));
  max-height: min(72svh, 640px);
  overflow-y: auto;
  overscroll-behavior: contain;
  display: grid;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(160deg, #26100f, #121013 55%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 30px 70px rgba(0, 0, 0, 0.6);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-14px) scale(0.97);
  transform-origin: top right;
  pointer-events: none;
  transition:
    opacity 0.35s ease,
    transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0s linear 0.45s;
}

.faq-menu.is-open .faq-panel {
  opacity: 1;
  visibility: visible;
  transform: none;
  pointer-events: auto;
  transition:
    opacity 0.4s ease,
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    visibility 0s;
}

/* The panel's contents follow it in, one after another (--i is set by site.js). */
.faq-panel-head,
.faq-panel .faq-item,
.faq-panel-foot {
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.faq-menu.is-open .faq-panel-head,
.faq-menu.is-open .faq-panel .faq-item,
.faq-menu.is-open .faq-panel-foot {
  opacity: 1;
  transform: none;
  transition:
    opacity 0.5s ease calc(0.08s + var(--i, 0) * 0.04s),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1) calc(0.08s + var(--i, 0) * 0.04s);
}

.faq-panel-head {
  display: grid;
  gap: 6px;
  padding: 4px 4px 0;
}

.faq-panel-head p,
.faq-panel-foot {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 14px;
}

.faq-panel-foot {
  padding: 2px 4px 4px;
}

.faq-panel .faq-list {
  gap: 8px;
}

.faq-panel .faq-item {
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.faq-panel .faq-item summary {
  padding: 14px 16px;
  gap: 14px;
}

.faq-panel .faq-item h3 {
  font-size: 15.5px;
}

.faq-panel .faq-icon {
  width: 28px;
  height: 28px;
}

.faq-panel .faq-answer {
  padding: 0 16px 16px;
}

.faq-panel .faq-answer p {
  font-size: 14.5px;
}

@media (max-width: 480px) {
  .nav-right {
    gap: 10px;
  }

  .faq-toggle {
    height: 38px;
    padding: 0 13px;
    font-size: 13px;
  }
}


/* 12. SERVICE PAGES ------------------------------------------------------ */
.page-hero {
  padding-top: calc(150px + var(--safe-top));
  padding-bottom: clamp(30px, 5vw, 60px);
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
  color: var(--color-muted);
  font-size: 12px;
}

.breadcrumb a:hover {
  color: var(--color-text);
}

.page-hero h1 {
  max-width: 14ch;
  margin: 16px 0 22px;
  font-size: clamp(54px, 8.5vw, 136px);
}

.page-lede {
  max-width: 58ch;
  margin: 0 0 30px;
  color: var(--color-text-soft);
  font-size: clamp(17px, 1.5vw, 20px);
}

.page-intro {
  display: grid;
  gap: 14px;
  max-width: 56ch;
}

.page-intro p {
  margin: 0;
  color: var(--color-text-soft);
}

.offer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.offer-grid > div {
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 24px;
}

.offer-grid b {
  font-family: var(--font-display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(26px, 2.2vw, 34px);
  line-height: 0.95;
}

.offer-grid p {
  margin: 0;
  color: var(--color-text-soft);
  font-size: 15px;
}

.service-page .step-card {
  cursor: default;
}

.why-grid.why-grid-three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.page-note {
  margin: 20px 0 0;
  color: var(--color-muted);
  font-size: 13px;
}

.page-cta .form-actions {
  margin-bottom: 40px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.related-card {
  display: grid;
  gap: 8px;
  padding: 22px 24px;
  transition: border-color 0.3s;
}

.related-card:hover {
  border-color: rgba(238, 28, 18, 0.55);
}

.related-card .mono {
  color: var(--color-muted);
  font-size: 12px;
}

.related-card b {
  font-size: clamp(28px, 2.6vw, 40px);
  line-height: 0.95;
}

.related-card .arrow {
  color: var(--color-red);
}

@media (max-width: 900px) {
  .offer-grid,
  .related-grid,
  .why-grid.why-grid-three {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  .offer-grid,
  .related-grid,
  .why-grid.why-grid-three {
    grid-template-columns: 1fr;
  }

  .page-hero {
    padding-top: calc(120px + var(--safe-top));
  }
}


/* 13. MOTION PREFERENCES ---------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  .film-grain,
  .marquee-row {
    animation: none;
  }

  #loader {
    display: none;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }

  .faq-panel,
  .faq-panel-head,
  .faq-panel .faq-item,
  .faq-panel-foot,
  .faq-answer p {
    transition: none !important;
  }
}

/* Kept as its own rule: browsers that do not know ::details-content skip only this one. */
@media (prefers-reduced-motion: reduce) {
  .faq-item::details-content {
    transition: none !important;
  }
}
