/* Kosmo Cars — deep navy-slate ground, photographs, soft white type, brand red on the actions */

:root {
  --bg: #14202c;
  --surface: #1b2a39;
  --surface-strong: #233548;
  --ink: #eef1f4;
  --soft: #b6c1cc;
  --accent: #d9232a;
  --accent-strong: #b81c22;
  --paper: #ffffff;
  --paper-ink: #14202c;
  --paper-soft: #4a5562;

  --display: "Panchang", "Helvetica Neue", Arial, sans-serif;
  --text: "Switzer", "Helvetica Neue", Arial, sans-serif;

  --step-small: 0.875rem;
  --step-body: clamp(1.0625rem, 1rem + 0.2vw, 1.125rem);
  --step-lead: clamp(1.25rem, 1rem + 0.75vw, 1.75rem);
  --step-head: clamp(1.375rem, 0.9rem + 1.3vw, 2.25rem);
  --step-display: clamp(1.375rem, 0.5rem + 2.7vw, 2.875rem);

  --m: 32px;
  --gap: 24px;
  --section: clamp(112px, 12vw, 200px);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.33, 1, 0.68, 1);
  --t-press: 140ms;
  --t-hover: 200ms;
}
@media (max-width: 760px) { :root { --m: 16px; --gap: 16px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--text);
  font-size: var(--step-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
h1, h2, h3, p, ul, dl, dd, address { margin: 0; }
ul { padding: 0; list-style: none; }
address { font-style: normal; }
a { color: inherit; }
strong { font-weight: 500; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }

h1, h2 {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  line-height: 1.08;
}
h2 { font-size: var(--step-head); }

.skip { position: absolute; left: -999px; top: 0; background: var(--paper); color: var(--paper-ink); padding: 12px 16px; z-index: 50; }
.skip:focus { left: var(--m); }

.photo { overflow: hidden; background: var(--surface); }
.photo img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- controls ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px;
  background: var(--accent); color: #fff;
  font-family: var(--text); font-weight: 500; font-size: 1rem;
  text-decoration: none; border: 0; border-radius: 0;
  transition: transform var(--t-press) var(--ease-out), background-color var(--t-hover) ease;
}
.button:active { transform: scale(0.97); }
.button-small { min-height: 44px; padding: 0 18px; font-size: 0.9375rem; background: #fff; color: var(--paper-ink); }
.text-link {
  color: var(--ink); font-weight: 500; text-decoration: underline;
  text-decoration-thickness: 1px; text-underline-offset: 0.3em;
  text-decoration-color: rgba(238, 241, 244, 0.4);
  transition: text-decoration-color var(--t-hover) ease;
}
@media (hover: hover) and (pointer: fine) {
  .button:hover { background: var(--accent-strong); }
  .button-small:hover { background: #dfe5ea; }
  .text-link:hover { text-decoration-color: var(--ink); }
}

/* ---------- hero ---------- */
.hero { min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.nav {
  display: flex; align-items: center; gap: 40px;
  height: 80px; padding: 0 var(--m);
  font-size: 0.9375rem;
}
.wordmark { display: grid; gap: 3px; text-decoration: none; }
.wordmark-profile { width: 104px; height: 14px; fill: var(--ink); }
.wordmark span { font-family: var(--display); font-weight: 500; font-size: 0.9375rem; letter-spacing: 0.04em; text-transform: uppercase; line-height: 1; }
.wordmark em { font-style: normal; color: #f2484e; }
.nav-links { display: flex; gap: 28px; }
.nav-links a { text-decoration: none; color: var(--soft); transition: color var(--t-hover) ease; }
.nav-links a:hover { color: var(--ink); }
.nav-call { margin-left: auto; }
.menu { display: none; }

.hero-media { position: relative; min-height: 340px; overflow: hidden; }
.hero-media img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: contrast(1.03);
  opacity: 0; transition: opacity 1600ms ease;
}
.hero-media img.is-on { opacity: 1; }
.hero-media img:nth-child(2) { object-position: 50% 40%; }

.hero-band {
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap);
  align-items: end; padding: 40px var(--m) 44px;
}
.hero-title { grid-column: 1 / span 8; font-size: var(--step-display); font-weight: 500; line-height: 1.12; }
.lines .line, .hero-title .line { display: block; overflow: hidden; padding-bottom: 0.08em; margin-bottom: -0.08em; white-space: nowrap; }
.hero-title [data-line] { display: block; }
.hero-side { grid-column: 9 / span 4; display: grid; gap: 16px; }
.hero-side p:first-child { max-width: 38ch; }
.status { color: var(--soft); font-size: var(--step-small); }
.status strong { color: var(--ink); }
.status .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: #3fcf8e; margin-right: 8px; vertical-align: 1px; }
.status .dot.off { background: #7d8a97; }
.actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; margin-top: 8px; }

/* ---------- services ---------- */
.services { padding: var(--section) var(--m) 0; }
.section-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: start; }
.section-head h2 { grid-column: 1 / span 4; }
.section-intro { grid-column: 7 / span 5; max-width: 46ch; }
.services .section-head { margin-bottom: 64px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.tile {
  background: var(--surface); padding: 28px 28px 32px; min-height: 260px;
  display: flex; flex-direction: column; gap: 14px;
  transition: background-color var(--t-hover) ease, transform 260ms var(--ease-out);
}
.tile h3 { font-family: var(--display); font-weight: 500; font-size: 1rem; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.35; margin: 0 0 auto; padding-bottom: 32px; }
.tile p { color: var(--soft); max-width: 32ch; }
@media (hover: hover) { .tile:hover { background: var(--surface-strong); } .tile:hover p { color: var(--ink); } }
.tile-call { background: #c11d24; color: #fff; }
.tile-call p { color: #fff; }
.tile-link { color: #fff; font-weight: 500; text-decoration: underline; text-underline-offset: 0.3em; text-decoration-thickness: 1px; }
@media (hover: hover) { .tile-call:hover { background: #a9181e; } .tile-call:hover p { color: #fff; } }

/* ---------- how a job runs ---------- */
.how { margin-top: var(--section); background: var(--surface); padding: clamp(80px, 9vw, 140px) var(--m); }
.how-inner { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: start; }
.how-side { grid-column: 1 / span 5; position: sticky; top: 40px; display: grid; gap: 20px; }
.how-intro { max-width: 40ch; }
.how-photo { aspect-ratio: 4 / 3; margin-top: 20px; }
.how-photo img { object-position: 70% 50%; }
.steps { grid-column: 7 / span 6; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.step {
  display: grid; grid-template-columns: 64px 1fr; gap: 20px; align-items: start;
  background: var(--surface-strong); padding: 32px 32px 36px 28px;
  transition: transform 260ms var(--ease-out);
}
.step-num {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  background: var(--accent); color: #fff;
  font-family: var(--display); font-weight: 500; font-size: 1.125rem; line-height: 1;
}
.step h3 { font-family: var(--display); font-weight: 500; font-size: 1.0625rem; text-transform: uppercase; letter-spacing: 0.01em; line-height: 1.35; margin: 10px 0 12px; }
.step p { color: var(--soft); max-width: 46ch; }
.step a { color: var(--ink); font-weight: 500; text-underline-offset: 0.25em; text-decoration-color: rgba(238, 241, 244, 0.45); }

/* ---------- about ---------- */
.about { padding: var(--section) var(--m); }
.about-head { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: start; }
.about-head h2 { grid-column: 1 / span 4; }
.about-lead { grid-column: 5 / span 8; font-size: var(--step-lead); line-height: 1.4; max-width: 44ch; }
.about-lead strong { color: #fff; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 80px 0 0; }
.fact { background: var(--surface); padding: 26px 28px 30px; display: grid; gap: 28px; align-content: space-between; min-height: 150px; }
.fact dt { font-size: var(--step-small); color: var(--soft); }
.fact dd { font-size: var(--step-lead); font-weight: 500; line-height: 1.2; }
.fact:first-child { background: #c11d24; }
.fact:first-child dt { color: #fff; }

/* ---------- visit ---------- */
.visit {
  padding: 0 var(--m) 40px;
  display: grid; grid-template-columns: repeat(12, 1fr); column-gap: var(--gap); align-items: stretch;
}
.visit-photo { grid-column: 1 / span 7; aspect-ratio: 3 / 2; }
.visit-photo img { object-position: 50% 60%; }
.card {
  grid-column: 8 / span 5; align-self: stretch; color: var(--paper-ink);
  align-content: start; background: var(--paper); color: var(--paper-ink);
  padding: 32px 32px 0; border-radius: 8px; overflow: hidden;
  display: flex; flex-direction: column; gap: 20px; font-size: 1rem; line-height: 1.5;
}
.card h2 { font-size: var(--step-lead); letter-spacing: -0.01em; }
.hours div { display: flex; justify-content: space-between; gap: 16px; padding: 3px 0; }
.hours dt { color: var(--paper-soft); }
.hours dd { font-variant-numeric: tabular-nums; }
.card-contact { display: grid; gap: 2px; }
.card-contact a { font-weight: 500; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.25em; text-decoration-color: rgba(18, 20, 22, 0.3); overflow-wrap: anywhere; }
.card-contact a:hover { text-decoration-color: currentColor; }
.card-note { color: var(--paper-soft); font-size: var(--step-small); }
.card-button { margin: auto -32px 0; min-height: 56px; }

/* ---------- footer ---------- */
.footer { padding: 24px var(--m) 30px; font-size: var(--step-small); color: var(--soft); }
.footer-line { display: grid; grid-template-columns: 1fr auto 1fr; gap: 24px; align-items: baseline; }
.footer-links { display: flex; gap: 24px; }
.footer-links a { color: var(--ink); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.footer-right { justify-self: end; }

/* ---------- tablet ---------- */
@media (max-width: 1100px) {
  .nav-links { gap: 20px; }
  .hero-title { grid-column: 1 / -1; margin-bottom: 28px; }
  .hero-side { grid-column: 1 / span 8; }
  .section-head h2 { grid-column: 1 / -1; margin-bottom: 20px; }
  .section-intro { grid-column: 1 / span 9; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .visit-photo { grid-column: 1 / span 6; aspect-ratio: auto; }
  .card { grid-column: 7 / span 6; }
  .how-side { grid-column: 1 / span 5; }
  .steps { grid-column: 6 / span 7; }
  .about-head h2 { grid-column: 1 / -1; margin-bottom: 24px; }
  .about-lead { grid-column: 1 / -1; }
  .facts { grid-template-columns: repeat(2, 1fr); margin-top: 56px; }
}

/* ---------- phone ---------- */
@media (max-width: 760px) {
  .nav { height: 64px; gap: 12px; }
  .nav-links {
    display: none; position: absolute; top: 64px; left: 0; right: 0; z-index: 20;
    flex-direction: column; gap: 0; background: var(--surface); padding: 8px 0;
  }
  .nav-links.is-open { display: flex; }
  .nav-links a { padding: 14px var(--m); color: var(--ink); font-size: 1.125rem; }
  .nav-call { padding: 0 14px; font-size: 0.875rem; }
  .nav-call { font-size: 0; }
  .nav-call::after { content: "Call"; font-size: 0.9375rem; }
  .menu {
    display: block; background: none; border: 0; color: var(--ink); cursor: pointer;
    font: 500 0.9375rem var(--text); padding: 0 0 0 8px; min-height: 44px;
  }
  .hero { min-height: 0; }
  .hero-media { min-height: 0; height: 52svh; }
  .hero-band { display: block; padding: 28px var(--m) 40px; }
  .hero-title { font-size: 5.5vw; margin-bottom: 20px; }
  .hero-side { gap: 14px; }

  .section-intro { grid-column: 1 / -1; }
  .services .section-head { margin-bottom: 40px; }
  .tiles { grid-template-columns: 1fr; gap: 8px; }
  .tile { min-height: 0; padding: 22px 20px 24px; gap: 8px; }
  .tile h3 { padding-bottom: 4px; }

  .how-inner { display: block; }
  .how-side { position: static; margin-bottom: 32px; }
  .how-photo { margin-top: 8px; }
  .step { grid-template-columns: 40px 1fr; gap: 14px; padding: 22px 20px 24px 16px; }
  .step-num { width: 36px; height: 36px; font-size: 0.9375rem; }
  .step h3 { margin: 6px 0 8px; font-size: 0.9375rem; }

  .about-lead { font-size: 1.1875rem; }
  .facts { gap: 8px; margin-top: 40px; }
  .fact { min-height: 0; padding: 18px 18px 20px; gap: 14px; }
  .fact dd { font-size: 1.0625rem; }

  .visit { display: block; padding-bottom: 32px; }
  .visit-photo { aspect-ratio: 4 / 3; }
  .card { margin: -48px 12px 0; position: relative; padding: 24px 24px 0; }
  .card-button { margin: 4px -24px 0; }

  .footer { padding-top: 24px; }
  .footer-line { display: grid; grid-template-columns: 1fr; gap: 8px; }
  .footer-right { justify-self: start; }
}

/* ---------- motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .hero-title [data-line] { transform: translateY(105%); animation: line-up 1000ms var(--ease-out) forwards; animation-delay: calc(var(--i) * 120ms + 300ms); }
  .js [data-rise] { opacity: 0; transform: translateY(16px); animation: rise 900ms var(--ease-out) forwards; animation-delay: 560ms; }
  .js .hero-media { animation: lift 1600ms var(--ease-soft) both; }
  .js .hero-media img.is-on { animation: settle 7000ms var(--ease-soft) both; }

  .js [data-reveal] { opacity: 0; transform: translateY(22px); transition: opacity 800ms var(--ease-out), transform 1000ms var(--ease-out); transition-delay: calc(var(--d, 0) * 70ms); }
  .js [data-reveal].is-in { opacity: 1; transform: none; }
  .js .photo[data-reveal] { transform: none; }
  .js .photo[data-reveal] img { transform: scale(1.06); transition: transform 1600ms var(--ease-soft); }
  .js .photo[data-reveal].is-in img { transform: none; }

  @supports (animation-timeline: view()) {
    .drift { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% exit 100%; }
  }
}
@keyframes line-up { to { transform: none; } }
@keyframes rise { to { opacity: 1; transform: none; } }
@keyframes lift { from { opacity: 0; } to { opacity: 1; } }
@keyframes settle { from { transform: scale(1.06); } to { transform: none; } }
@keyframes drift { from { transform: scale(1.12) translateY(-4%); } to { transform: scale(1.12) translateY(4%); } }
