/* ==========================================================================
   Rowley's Collision Center — spec preview
   Design system: deep navy garage, RCC red, steel details, DIN-style display
   ========================================================================== */

:root {
  /* Color */
  --ink-950: #0a111f;
  --ink-900: #0e1729;
  --ink-800: #152238;
  --ink-700: #1d2e4a;
  --red-600: #c8232c;
  --red-500: #da2e33;
  --red-soft: #ed6a66;           /* accessible red for text on dark */
  --paper: #f4f5f7;
  --white: #ffffff;
  --steel-200: #d6dbe3;
  --steel-300: #b9c3d2;
  --steel-500: #8593a7;
  --steel-600: #5b6a80;
  --text-900: #131c2e;
  --text-600: #46536a;
  --line-dark: rgba(255, 255, 255, 0.14);
  --line-light: #e1e5eb;

  /* Type */
  --font-display: "Bahnschrift", "Avenir Next Condensed", "Franklin Gothic Medium", "Arial Narrow", "Segoe UI", Arial, sans-serif;
  --font-body: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, Menlo, monospace;

  --fs-900: clamp(2.85rem, 6.6vw, 5.1rem);
  --fs-800: clamp(2.05rem, 4.2vw, 3.25rem);
  --fs-700: clamp(1.5rem, 2.6vw, 2.1rem);
  --fs-600: clamp(1.2rem, 1.8vw, 1.45rem);
  --fs-500: clamp(1.06rem, 1.4vw, 1.2rem);
  --fs-400: 1rem;
  --fs-300: 0.875rem;
  --fs-200: 0.78rem;

  /* Space */
  --section-pad: clamp(4.5rem, 9vw, 7.5rem);
  --gutter: clamp(1.5rem, 5vw, 4.5rem);
  --container: 74rem;

  --radius: 6px;
  --shadow-lg: 0 24px 60px -18px rgba(6, 11, 22, 0.55);
  --header-h: 4.75rem;
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

html,
body {
  overflow-x: clip;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--fs-400);
  line-height: 1.65;
  color: var(--text-900);
  background: var(--ink-950);
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0;
  text-wrap: balance;
  overflow-wrap: break-word;
}

p {
  margin: 0 0 1.1em;
  overflow-wrap: break-word;
}

p:last-child {
  margin-bottom: 0;
}

a {
  color: inherit;
}

ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}

li {
  list-style: none;
}

::selection {
  background: var(--red-600);
  color: var(--white);
}

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

.dark :focus-visible,
.site-header :focus-visible,
.mobile-menu :focus-visible {
  outline-color: var(--white);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.75rem 1.25rem;
  background: var(--red-600);
  color: var(--white);
  font-family: var(--font-mono);
  font-size: var(--fs-300);
  text-decoration: none;
  transform: translateY(-300%);
  transition: transform 0.2s ease;
}

.skip-link:focus {
  transform: translateY(0);
}

/* --------------------------------------------------------------------------
   Utilities
   -------------------------------------------------------------------------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: var(--section-pad);
}

.section[id] {
  scroll-margin-top: calc(var(--header-h) + 1rem);
}

/* Grid children never force tracks wider than the viewport */
.hero__grid > *,
.about__grid > *,
.work__grid > *,
.contact__grid > *,
.section-head--split > * {
  min-width: 0;
}

.dark {
  background: var(--ink-950);
  color: var(--steel-300);
}

.dark h2,
.dark h3 {
  color: var(--white);
}

.on-paper {
  background: var(--paper);
  color: var(--text-600);
}

.on-white {
  background: var(--white);
  color: var(--text-600);
}

.on-paper h2,
.on-white h2,
.on-paper h3,
.on-white h3 {
  color: var(--text-900);
}

.eyebrow {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  margin: 0 0 1.25rem;
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-600);
}

.eyebrow::before {
  content: "";
  flex: none;
  width: 2.25rem;
  height: 2px;
  margin-top: 0.55em;
  background: currentColor;
}

@media (max-width: 30em) {
  .eyebrow {
    letter-spacing: 0.15em;
  }
}

.dark .eyebrow,
.hero .eyebrow {
  color: var(--red-soft);
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  letter-spacing: 0.08em;
}

.lead {
  font-size: var(--fs-500);
  line-height: 1.7;
  max-width: 56ch;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 1rem 1.9rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.25s ease, border-color 0.25s ease,
    box-shadow 0.25s ease, translate 0.25s ease;
}

.btn--primary {
  background: var(--red-600);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--red-500);
  box-shadow: 0 14px 30px -10px rgba(200, 35, 44, 0.55);
  translate: 0 -2px;
}

.btn--ghost {
  border-color: var(--line-dark);
  color: var(--white);
}

.btn--ghost:hover {
  border-color: var(--steel-500);
  background: rgba(255, 255, 255, 0.05);
  translate: 0 -2px;
}

.btn--sm {
  padding: 0.65rem 1.2rem;
  font-size: 0.9rem;
}

/* Section headings */

.section-head {
  margin-bottom: clamp(2.75rem, 6vw, 4.25rem);
}

.section-head h2 {
  font-size: var(--fs-800);
  max-width: 22ch;
}

.section-head .lead {
  margin-top: 1.35rem;
}

@media (min-width: 60em) {
  .section-head--split {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(2.5rem, 5vw, 4.5rem);
    align-items: end;
  }

  .section-head--split .lead {
    margin-top: 0;
    padding-bottom: 0.35rem;
  }
}

/* --------------------------------------------------------------------------
   Header + nav
   -------------------------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.site-header.scrolled {
  background: rgba(10, 17, 31, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 10px 30px -12px rgba(0, 0, 0, 0.6);
}

.site-header__bar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  height: var(--header-h);
}

.brand {
  display: inline-flex;
  align-items: center;
  margin-right: auto;
  min-width: 0;
}

.brand img {
  height: clamp(2.5rem, 2rem + 1.5vw, 3rem);
  width: auto;
}

.site-nav {
  display: none;
}

.site-header__call {
  display: none;
  white-space: nowrap;
}

/* A collision shop's conversion is the phone call: keep it in the header,
   compact below 36em so logo + call + toggle always fit a 390px viewport */
@media (min-width: 23em) {
  .site-header__call {
    display: inline-flex;
  }
}

@media (max-width: 35.99em) {
  .site-header__call {
    padding: 0.55rem 0.85rem;
    font-size: 0.8rem;
    letter-spacing: 0.04em;
  }
}

@media (min-width: 58em) {
  .site-nav {
    display: flex;
    gap: 2.1rem;
    margin-right: 1.25rem;
  }

  .site-nav a {
    position: relative;
    font-family: var(--font-mono);
    font-size: var(--fs-200);
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    color: var(--steel-300);
    padding-block: 0.4rem;
    transition: color 0.2s ease;
  }

  .site-nav a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 2px;
    background: var(--red-500);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.25s ease;
  }

  .site-nav a:hover {
    color: var(--white);
  }

  .site-nav a:hover::after {
    transform: scaleX(1);
  }

  .site-header__call {
    display: inline-flex;
  }
}

/* Mobile menu */

.nav-toggle {
  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0 0.65rem;
  background: transparent;
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  cursor: pointer;
}

.nav-toggle__bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--white);
  transition: transform 0.3s ease, opacity 0.3s ease;
}

body.menu-open .nav-toggle__bar:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

body.menu-open .nav-toggle__bar:nth-child(2) {
  transform: translateY(-4px) rotate(-45deg);
}

/* After the base rule so the cascade actually hides it on desktop */
@media (min-width: 58em) {
  .nav-toggle {
    display: none;
  }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  background: linear-gradient(180deg, var(--ink-950) 0%, var(--ink-800) 100%);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

.mobile-menu.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease;
}

body.menu-open {
  overflow: hidden;
}

.mobile-menu nav {
  display: grid;
  gap: 0.35rem;
  width: 100%;
}

.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 8vw, 2.6rem);
  font-weight: 700;
  color: var(--white);
  text-decoration: none;
  padding-block: 0.55rem;
  border-bottom: 1px solid var(--line-dark);
  transition: color 0.2s ease, padding-left 0.25s ease;
}

.mobile-menu a:hover {
  color: var(--red-soft);
  padding-left: 0.5rem;
}

.mobile-menu .mobile-menu__phone {
  margin-top: 1.5rem;
  border-bottom: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-400);
  letter-spacing: 0.1em;
  color: var(--red-soft);
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hero {
  position: relative;
  padding-top: calc(var(--header-h) + clamp(3.5rem, 7vw, 6rem));
  padding-bottom: var(--section-pad);
  background-color: var(--ink-950);
  background-image:
    radial-gradient(58rem 40rem at 88% -12%, rgba(200, 35, 44, 0.38), transparent 64%),
    radial-gradient(46rem 34rem at -12% 112%, rgba(29, 46, 74, 0.65), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.024) 0 1px, transparent 1px 14px);
  color: var(--steel-300);
}

.hero__grid {
  display: grid;
  gap: clamp(3rem, 7vw, 5rem);
  align-items: center;
}

.hero h1 {
  font-size: var(--fs-900);
  line-height: 1.03;
  letter-spacing: -0.015em;
  color: var(--white);
  margin: 0 0 1.5rem;
  max-width: 16ch;
}

.hero .lead {
  color: var(--steel-300);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2.1rem;
}

.hero__stats {
  display: grid;
  gap: 0.9rem;
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--line-dark);
}

/* Compact rows on small screens, a ruled instrument panel from 36em up */
.stat {
  display: flex;
  align-items: baseline;
  gap: 1rem;
}

.stat b {
  display: block;
  font-family: var(--font-display);
  font-size: var(--fs-700);
  font-weight: 700;
  line-height: 1.1;
  color: var(--white);
}

.stat span {
  display: block;
  margin-top: 0;
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--steel-500);
}

@media (min-width: 36em) {
  .hero__stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0;
  }

  .stat {
    display: block;
    padding-right: 1.25rem;
  }

  .stat + .stat {
    padding-left: 1.75rem;
    border-left: 1px solid var(--line-dark);
  }

  .stat span {
    margin-top: 0.3rem;
  }
}

.hero__media {
  position: relative;
  max-width: 32rem;
}

/* Measurement-rig corner brackets instead of the stock offset border */
.hero__media::before,
.hero__media::after {
  content: "";
  position: absolute;
  width: 3.25rem;
  height: 3.25rem;
  z-index: 1;
  pointer-events: none;
}

.hero__media::before {
  top: -0.85rem;
  left: -0.85rem;
  border-top: 3px solid var(--red-600);
  border-left: 3px solid var(--red-600);
}

.hero__media::after {
  bottom: -0.85rem;
  right: -0.85rem;
  border-bottom: 3px solid var(--red-600);
  border-right: 3px solid var(--red-600);
}

.hero__media .frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.hero__media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.hero__media .frame:hover img {
  transform: scale(1.03);
}

/* Navy grade up top ties the bright raw photos into the palette;
   bottom scrim adds depth and grounds the caption chips */
.frame::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(200deg, rgba(14, 23, 41, 0.32) 0%, rgba(14, 23, 41, 0) 42%),
    linear-gradient(180deg, rgba(7, 13, 24, 0) 55%, rgba(7, 13, 24, 0.5) 100%);
  pointer-events: none;
}

/* On-photo caption chip: readable on any background */
.frame__tag {
  position: absolute;
  left: 0.9rem;
  bottom: 0.9rem;
  z-index: 2;
  max-width: calc(100% - 1.8rem);
  padding: 0.5rem 0.85rem;
  background: rgba(7, 13, 24, 0.82);
  border-left: 2px solid var(--red-500);
  border-radius: 3px;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--steel-200);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.hero__media .frame__tag {
  left: auto;
  bottom: auto;
  top: 0.9rem;
  right: 0.9rem;
}

/* Garage data plate anchoring the photo */
.hero__plate {
  position: relative;
  z-index: 2;
  display: grid;
  gap: 0.2rem;
  width: max-content;
  max-width: calc(100% - 2rem);
  margin: -1.5rem 0 0 1rem;
  padding: 1.05rem 1.35rem 1rem;
  background: var(--ink-800);
  border: 1px solid var(--line-dark);
  border-top: 3px solid var(--red-600);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.09em;
  line-height: 1.6;
  color: var(--steel-300);
}

.hero__plate b {
  margin-bottom: 0.4rem;
  font-weight: 600;
  font-size: 0.68rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--red-soft);
}

.hero__plate small {
  margin-top: 0.55rem;
  padding-top: 0.6rem;
  border-top: 1px solid var(--line-dark);
  font-size: 0.7rem;
  color: var(--steel-500);
}

@media (min-width: 64em) {
  .hero__grid {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  }

  .hero__media {
    justify-self: end;
    translate: 0 3.25rem;
    z-index: 2;
  }

  /* Straddle the photo's bottom-left corner so the plate anchors an edge
     instead of floating over the middle of the truck */
  .hero__plate {
    position: absolute;
    left: -2.25rem;
    bottom: -1.5rem;
    margin: 0;
    max-width: calc(100% - 0.5rem);
  }
}

/* --------------------------------------------------------------------------
   Certifications
   -------------------------------------------------------------------------- */

@media (min-width: 64em) {
  .certs.section {
    padding-top: calc(var(--section-pad) + 3.5rem);
  }
}

.certs__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

@media (min-width: 40em) {
  .certs__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem;
  }
}

.cert-tile {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 1.4rem 1.2rem 1.15rem;
  background: var(--white);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  transition: translate 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

/* Red top bar sweeps in on hover, same accent language as the team cards */
.cert-tile::after {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  background: var(--red-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.cert-tile:hover {
  translate: 0 -4px;
  border-color: var(--steel-200);
  box-shadow: 0 18px 36px -18px rgba(19, 28, 46, 0.35);
}

.cert-tile:hover::after {
  transform: scaleX(1);
}

/* Badge sits directly on the white card, hairline-ruled from its label,
   so mixed badge art reads like one printed spec sheet */
.cert-tile__badge {
  display: grid;
  place-items: center;
  min-height: clamp(5.75rem, 16vw, 7.5rem);
  padding: 0.5rem 0.5rem 1.1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line-light);
}

.cert-tile__badge img {
  max-height: clamp(4rem, 11vw, 5.5rem);
  max-width: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
}

/* Light badge art gets a dark stage so it can actually read */
.cert-tile--dark .cert-tile__badge {
  background: var(--ink-900);
  border-bottom: 0;
  border-radius: 4px;
  padding: 1rem 0.9rem;
}

.cert-tile__name {
  display: block;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-600);
  transition: color 0.3s ease;
}

.cert-tile:hover .cert-tile__name {
  color: var(--red-600);
}

/* --------------------------------------------------------------------------
   About / core values
   -------------------------------------------------------------------------- */

.about__grid {
  display: grid;
  gap: clamp(3rem, 7vw, 5.5rem);
}

.about__intro h2 {
  font-size: var(--fs-800);
  max-width: 16ch;
}

.about__forty {
  margin-top: clamp(2.5rem, 5vw, 4rem);
}

.about__forty b {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(6.5rem, 15vw, 10.5rem);
  font-weight: 700;
  line-height: 0.85;
  letter-spacing: -0.02em;
  color: #e7eaef;
}

@supports (-webkit-text-stroke: 2px black) {
  .about__forty b {
    color: transparent;
    -webkit-text-stroke: 2.5px #c7cfdc;
  }
}

.about__forty span {
  display: inline-block;
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 3px solid var(--red-600);
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-600);
}

.about__body .lead {
  color: var(--text-600);
}

.values {
  margin-top: clamp(2.25rem, 4vw, 3rem);
  display: grid;
}

.values li {
  padding-block: 1.6rem;
  border-top: 1px solid var(--line-light);
}

.values li:last-child {
  border-bottom: 1px solid var(--line-light);
}

.values h3 {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  font-size: var(--fs-600);
}

/* Short red bar, matching the eyebrow / spec-list accent language */
.values h3::before {
  content: "";
  flex: none;
  width: 1.1rem;
  height: 3px;
  background: var(--red-600);
  align-self: center;
}

.values p {
  margin: 0.6rem 0 0 2.1rem;
  max-width: 52ch;
}

@media (min-width: 64em) {
  .about__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
    align-items: start;
  }

  .about__intro {
    position: sticky;
    top: calc(var(--header-h) + 2rem);
  }
}

/* --------------------------------------------------------------------------
   Services
   -------------------------------------------------------------------------- */

.services {
  background-color: var(--ink-900);
  background-image:
    radial-gradient(50rem 30rem at 110% 0%, rgba(200, 35, 44, 0.12), transparent 60%);
}

.svc-list {
  border-top: 1px solid var(--line-dark);
}

.svc {
  display: grid;
  gap: 0.4rem 2rem;
  padding: clamp(1.6rem, 3vw, 2.2rem) clamp(0.5rem, 1.5vw, 1.25rem);
  border-bottom: 1px solid var(--line-dark);
  transition: background-color 0.3s ease;
}

.svc:hover {
  background: rgba(255, 255, 255, 0.035);
}

.svc__num {
  font-family: var(--font-mono);
  font-size: var(--fs-300);
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--red-soft);
}

/* Same short-bar marker as the eyebrow and spec-list accents */
.svc__num::before {
  content: "";
  display: inline-block;
  width: 0.6rem;
  height: 2px;
  margin-right: 0.6rem;
  vertical-align: 0.22em;
  background: var(--red-600);
}

.svc__name {
  font-size: var(--fs-600);
  transition: transform 0.3s ease;
}

.svc:hover .svc__name {
  transform: translateX(6px);
}

.svc__desc {
  margin: 0;
  color: var(--steel-300);
  max-width: 58ch;
}

@media (min-width: 56em) {
  .svc {
    grid-template-columns: 4.5rem minmax(0, 1fr) minmax(0, 1.5fr);
    align-items: baseline;
  }

  .svc__desc {
    margin: 0;
  }
}

/* --------------------------------------------------------------------------
   Recent work
   -------------------------------------------------------------------------- */

.work__grid {
  display: grid;
  gap: clamp(3rem, 7vw, 5rem);
  align-items: center;
}

.work__media {
  position: relative;
}

.work__media::before,
.work__media::after {
  content: "";
  position: absolute;
  width: 3.25rem;
  height: 3.25rem;
  z-index: 1;
  pointer-events: none;
}

.work__media::before {
  top: -0.85rem;
  right: -0.85rem;
  border-top: 3px solid var(--red-600);
  border-right: 3px solid var(--red-600);
}

.work__media::after {
  bottom: -0.85rem;
  left: -0.85rem;
  border-bottom: 3px solid var(--red-600);
  border-left: 3px solid var(--red-600);
}

/* Narrow screens: smaller brackets, pulled in so they stay well clear of
   the viewport edge inside the 24px gutter */
@media (max-width: 48em) {
  .hero__media::before,
  .hero__media::after,
  .work__media::before,
  .work__media::after {
    width: 2.5rem;
    height: 2.5rem;
  }

  .hero__media::before {
    top: -0.5rem;
    left: -0.5rem;
  }

  .hero__media::after {
    bottom: -0.5rem;
    right: -0.5rem;
  }

  .work__media::before {
    top: -0.5rem;
    right: -0.5rem;
  }

  .work__media::after {
    bottom: -0.5rem;
    left: -0.5rem;
  }
}

.work__media .frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}

.work__media img {
  width: 100%;
  aspect-ratio: 5 / 3;
  object-fit: cover;
  object-position: top;
  transition: transform 0.6s ease;
}

.work__media .frame:hover img {
  transform: scale(1.03);
}

.work__media .frame__tag {
  left: auto;
  right: 0.9rem;
}

.work__copy h2 {
  font-size: var(--fs-800);
  max-width: 18ch;
}

.work__copy .lead {
  margin-top: 1.35rem;
  color: var(--text-600);
}

.spec-list {
  margin-top: 2rem;
  border-top: 1px solid var(--line-light);
}

.spec-list__label {
  display: block;
  margin-top: 1.1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--red-600);
}

.spec-list ul {
  margin-top: 0.85rem;
  display: grid;
  gap: 0.4rem;
}

.spec-list li {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: var(--fs-300);
  letter-spacing: 0.06em;
  color: var(--text-900);
}

.spec-list li::before {
  content: "";
  flex: none;
  width: 0.6rem;
  height: 2px;
  background: var(--red-600);
}

@media (min-width: 64em) {
  .work__grid {
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  }

  .work__media {
    order: 2;
  }
}

/* --------------------------------------------------------------------------
   Mobile estimate band
   -------------------------------------------------------------------------- */

.band {
  padding-block: clamp(3.25rem, 7vw, 5rem);
  background-color: var(--red-600);
  background-image:
    radial-gradient(40rem 24rem at 100% 120%, rgba(10, 17, 31, 0.35), transparent 65%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.05) 0 1px, transparent 1px 12px);
  color: var(--white);
}

.band__inner {
  display: grid;
  gap: 1.9rem;
  justify-items: start;
}

.band__inner > * {
  min-width: 0;
}

.band__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3.2vw, 2.4rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-wrap: balance;
  max-width: 24ch;
}

.band__sub {
  margin: 0.65rem 0 0;
  font-size: var(--fs-500);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.88);
  max-width: 46ch;
}

.btn--onred {
  background: var(--white);
  color: var(--red-600);
}

.btn--onred:hover {
  background: var(--ink-950);
  color: var(--white);
  box-shadow: 0 14px 30px -10px rgba(7, 13, 24, 0.45);
  translate: 0 -2px;
}

@media (min-width: 56em) {
  .band__inner {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 3rem;
  }
}

/* --------------------------------------------------------------------------
   Team
   -------------------------------------------------------------------------- */

.team__grid {
  display: grid;
  gap: 1.25rem;
}

.team-card {
  position: relative;
  padding: clamp(1.9rem, 3vw, 2.4rem);
  background: var(--paper);
  border: 1px solid var(--line-light);
  border-radius: var(--radius);
  overflow: hidden;
  transition: translate 0.3s ease, box-shadow 0.3s ease;
}

.team-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 4px;
  background: var(--red-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s ease;
}

.team-card:hover {
  translate: 0 -5px;
  box-shadow: 0 20px 40px -20px rgba(19, 28, 46, 0.3);
}

.team-card:hover::before {
  transform: scaleX(1);
}

/* Roster plate: crew number over a red rule, name in display type */
.team-card__index {
  display: inline-block;
  padding-bottom: 0.55rem;
  border-bottom: 3px solid var(--red-600);
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--text-600);
}

.team-card h3 {
  margin-top: 2.5rem;
  font-size: var(--fs-700);
}

.team-card p {
  margin: 0.45rem 0 0;
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-600);
}

@media (min-width: 50em) {
  .team__grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
  }

  .team-card:nth-child(2) {
    translate: 0 2rem;
  }

  .team-card:nth-child(2):hover {
    translate: 0 calc(2rem - 5px);
  }
}

/* --------------------------------------------------------------------------
   Contact
   -------------------------------------------------------------------------- */

.contact {
  background-color: var(--ink-950);
  background-image:
    radial-gradient(52rem 36rem at -8% 0%, rgba(200, 35, 44, 0.16), transparent 60%),
    repeating-linear-gradient(115deg, rgba(255, 255, 255, 0.02) 0 1px, transparent 1px 14px);
}

.contact__grid {
  display: grid;
  gap: clamp(3rem, 6vw, 5rem);
  align-items: start;
}

.contact h2 {
  font-size: var(--fs-800);
  max-width: 16ch;
}

.contact .lead {
  margin-top: 1.35rem;
}

.contact__phone {
  display: inline-block;
  margin-top: 2.25rem;
  font-family: var(--font-display);
  font-size: var(--fs-800);
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--white);
  text-decoration: none;
  border-bottom: 3px solid var(--red-600);
  padding-bottom: 0.35rem;
  transition: color 0.25s ease, border-color 0.25s ease;
}

.contact__phone:hover {
  color: var(--red-soft);
  border-color: var(--red-soft);
}

.contact__hint {
  margin-top: 1.1rem;
  color: var(--steel-500);
}

.contact__info {
  display: grid;
  gap: 2.25rem;
}

.info-block {
  padding-left: 1.5rem;
  border-left: 2px solid var(--red-600);
}

.info-block h3 {
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--steel-500);
}

.info-block p {
  margin: 0.75rem 0 0;
  font-size: var(--fs-500);
  color: var(--white);
  line-height: 1.55;
}

.info-block p small {
  display: block;
  margin-top: 0.35rem;
  font-size: var(--fs-300);
  color: var(--steel-300);
}

@media (min-width: 64em) {
  .contact__grid {
    grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  }

  .contact__info {
    padding-top: 0.75rem;
  }
}

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */

.site-footer {
  padding-block: clamp(3rem, 6vw, 4.5rem);
  background: #070d18;
  color: var(--steel-500);
  border-top: 1px solid var(--line-dark);
}

.site-footer__grid {
  display: grid;
  gap: 2rem;
}

.site-footer .brand img {
  height: 2.6rem;
}

.site-footer__contact {
  font-family: var(--font-mono);
  font-size: var(--fs-300);
  letter-spacing: 0.05em;
  line-height: 2;
}

.site-footer__contact a {
  color: var(--steel-300);
  text-decoration: none;
}

.site-footer__contact a:hover {
  color: var(--white);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.site-footer__nav a {
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--steel-500);
  transition: color 0.2s ease;
}

.site-footer__nav a:hover {
  color: var(--white);
}

.site-footer__legal {
  font-size: var(--fs-300);
  color: var(--steel-600);
}

@media (min-width: 56em) {
  .site-footer__grid {
    grid-template-columns: auto 1fr auto;
    align-items: center;
  }

  .site-footer__contact {
    justify-self: center;
    text-align: center;
  }

  .site-footer__legal {
    grid-column: 1 / -1;
    padding-top: 1.75rem;
    margin-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
  }
}

/* Spec preview footer (mandatory) */

.spec-footer {
  padding: 1.6rem var(--gutter);
  background: #05090f;
  font-family: var(--font-mono);
  font-size: var(--fs-200);
  letter-spacing: 0.04em;
  text-align: center;
  color: var(--steel-600);
}

.spec-footer a {
  color: var(--steel-300);
}

.spec-footer a:hover {
  color: var(--white);
}

/* --------------------------------------------------------------------------
   Motion / reveal
   -------------------------------------------------------------------------- */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  /* Hover-affected properties stay listed so cards/rows keep easing after reveal */
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 0.61, 0.36, 1),
    translate 0.3s ease, background-color 0.3s ease, border-color 0.3s ease,
    box-shadow 0.3s ease;
}

/* Media frames settle in with a slight zoom */
.js [data-reveal="zoom"] {
  transform: translateY(22px) scale(0.975);
}

.js [data-reveal].in-view {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
