/* Speedcore site styles, Railway coding test 7 Nov 2026 */
:root {
  /* Brand: black, red and white from the Speedcore logo. */
  --black: #0b0b0c;
  --coal: #17171a;
  --red: #c8102e;
  --red-bright: #ff3b3b;
  --white: #ffffff;
  --paper: #f4f4f2;
  --paper-deep: #e8e8e4;
  --ink: #0b0b0c;
  --ink-soft: #4a4a50;
  --chalk-soft: #b3b3b8;
  --line: #d2d2cd;
  /* Contrast checked (WCAG ratio): white on red 5.9, red on paper 5.3, bright red on black 5.6,
     bright red on coal 5.1, soft grey on black 9.4. */
  --text-font: Bahnschrift, Roboto, "Segoe UI", system-ui, sans-serif;
  --display-font: "Bahnschrift Condensed", "HelveticaNeue-CondensedBold", "Roboto Condensed", "Arial Narrow", sans-serif-condensed, sans-serif;
  --gutter: max(clamp(1.25rem, 5vw, 3rem), calc((100vw - 74rem) / 2));
  /* Each page's lead colour field. Rescue swaps these for red. */
  --field: var(--black);
  --on-field: var(--white);
  --eyebrow: var(--red-bright);
  --art-line: var(--white);
  --art-spot: var(--red-bright);
}
.rescue { --field: var(--red); --eyebrow: var(--white); --art-spot: var(--white); }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--red) var(--paper); }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text-font);
}
::selection { background: var(--red); color: var(--white); }
img, svg { display: block; max-width: 100%; }
h1, h2, h3 {
  font-family: var(--display-font); font-weight: 800; font-style: italic; text-transform: uppercase;
  line-height: 1; letter-spacing: 0.01em; text-wrap: balance; overflow-wrap: anywhere; margin: 0;
}
h1 { font-size: clamp(2.75rem, 9vw, 5.5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3rem); }
h3 { font-size: 1.875rem; }
p { margin: 0 0 1em; max-width: 65ch; }
a { color: inherit; text-underline-offset: 0.2em; }
a:not([href]) { text-decoration: none; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }
ul, ol { margin: 0; padding-left: 1.25em; max-width: 65ch; }
li { margin-bottom: 0.5em; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; background: var(--white); color: var(--ink); padding: 0.5rem 1rem; z-index: 30; }
.skip:focus { left: 0.5rem; top: 0.5rem; }

/* Top strip and header */
.topline {
  display: flex; justify-content: space-between; gap: 0.5rem 1.5rem; flex-wrap: wrap;
  padding: 0.4rem var(--gutter);
  background: var(--coal); color: var(--chalk-soft);
  border-top: 4px solid var(--red);
  font-size: 0.875rem; line-height: 1.4;
}
.topline a { color: var(--white); font-weight: 600; }

.site-head {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 2rem;
  padding: 0.75rem var(--gutter);
  background: var(--black); color: var(--white);
  border-bottom: 1px solid #2a2a2e;
}
.brand img { height: 4.5rem; width: auto; }
.nb { white-space: nowrap; }
.site-head nav {
  display: flex; gap: 0.25rem 1.5rem; order: 3; width: 100%;
  font: 800 1.25rem/1 var(--display-font); font-style: italic; text-transform: uppercase; letter-spacing: 0.02em;
}
.site-head nav a { text-decoration: none; padding: 0.6rem 0; border-bottom: 3px solid transparent; }
.site-head nav a:hover { border-bottom-color: var(--red-bright); }
.site-head nav a[aria-current] { border-bottom-color: var(--red); }
.dropdown { position: relative; }
.dropdown-toggle {
  font: inherit; letter-spacing: inherit; text-transform: inherit; color: inherit; background: none; border: 0;
  border-bottom: 3px solid transparent; padding: 0.6rem 0; cursor: pointer;
}
.dropdown-toggle:hover { border-bottom-color: var(--red-bright); }
.dropdown-toggle.current { border-bottom-color: var(--red); }
.dropdown-menu {
  position: absolute; left: 0; top: 100%; z-index: 20; min-width: 16rem;
  display: flex; flex-direction: column; gap: 0.25rem; padding: 0.5rem 1rem;
  background: var(--black); border: 1px solid #2a2a2e; border-top: 3px solid var(--red);
}
.head-call { margin-left: auto; }
@media (min-width: 760px) {
  .site-head nav { order: 0; width: auto; margin-left: auto; }
  .head-call { margin-left: 0; }
}

/* Buttons: red is the main action, white sits on red fields, outlines are the quiet option */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3rem; border: 0; cursor: pointer;
  padding: 0.75rem 1.5rem;
  background: var(--red); color: var(--white);
  font: 800 1.125rem/1.1 var(--display-font); font-style: italic; text-transform: uppercase; letter-spacing: 0.03em;
  text-decoration: none; border-radius: 2px;
  transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: none; }
a.btn:not([href]) { cursor: default; transform: none; }
.btn-light { background: var(--white); color: var(--ink); }
.btn-dark { background: var(--black); color: var(--white); }
.btn-plain { background: none; color: inherit; box-shadow: inset 0 0 0 2px currentColor; }
.btn-ghost { background: none; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* Lead field */
.lead {
  display: grid; gap: 2rem; align-items: center;
  padding: clamp(2rem, 5vw, 4.5rem) var(--gutter) clamp(2.5rem, 6vw, 5rem);
  background:
    linear-gradient(105deg, transparent 0 66%, rgb(255 255 255 / 0.05) 66% 67.5%, transparent 67.5% 70%, rgb(255 255 255 / 0.05) 70% 71.5%, transparent 71.5%),
    var(--field);
  color: var(--on-field);
  border-bottom: 6px solid var(--red);
}
.rescue .lead { border-bottom-color: var(--black); }
.eyebrow { margin: 0 0 0.75rem; color: var(--eyebrow); font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; font-size: 0.875rem; }
.lead p:not(.eyebrow) { font-size: 1.1875rem; margin-top: 1.25rem; }
.hero-logo { width: min(100%, 28rem); height: auto; justify-self: center; }
.rescue .lead .btn:not(.btn-light):not(.btn-plain) { background: var(--black); }
@media (min-width: 900px) {
  .lead { grid-template-columns: 1.15fr 1fr; gap: 4rem; }
}

/* Vector drawings in every picture spot (until real photos are set in config.js) */
.art { color: var(--art-line); }
.art svg, .art img { width: 100%; height: auto; }
.art img { aspect-ratio: 16 / 10; object-fit: cover; }
.lead .art { max-width: 26rem; width: 100%; justify-self: center; }
.art .frame { stroke: currentColor; stroke-width: 6; fill: none; stroke-linecap: round; }
.art .guide { stroke: currentColor; stroke-width: 2; stroke-dasharray: 8 9; opacity: 0.5; fill: none; }
.art .solid, .art .wheel { fill: var(--art-spot); }
.art .wheel { transform-box: fill-box; transform-origin: center; }
.art .out { animation: settle-out 1.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
.art .in { animation: settle-in 1.8s 0.3s cubic-bezier(0.16, 1, 0.3, 1) backwards; }
@keyframes settle-out { from { transform: rotate(-11deg); } }
@keyframes settle-in { from { transform: rotate(11deg); } }
@media (prefers-reduced-motion: reduce) {
  .art .out, .art .in { animation: none; }
  .btn { transition: none; }
}

/* Home: popular services first */
.section { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); }
.section-alt { background: var(--paper-deep); }
.section-title { margin-bottom: 1.75rem; }
.section-title::after { content: ""; display: block; width: 4.5rem; height: 6px; margin-top: 0.75rem; background: var(--red); transform: skewX(-20deg); }

.popular { display: grid; gap: 1.25rem; }
.card { display: grid; gap: 1.25rem; padding: 1.5rem; background: var(--black); color: var(--white); border-radius: 2px; align-content: start; }
.card .art { max-width: 14rem; }
.card h3 a { text-decoration: none; }
.card h3 a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.card p { margin: 0.75rem 0 1rem; }
.card .more { font-weight: 700; }
.card-red { background: var(--red); --art-spot: var(--white); }
.card-wide { background: var(--white); color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); --art-line: var(--ink); --art-spot: var(--red); }
.tag { display: inline-block; margin: 0 0 0.75rem !important; padding: 0.2rem 0.6rem; background: var(--white); color: var(--ink); font-size: 0.8125rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
@media (min-width: 640px) {
  .card-big { grid-template-columns: 11rem 1fr; align-items: center; }
}
@media (min-width: 1000px) {
  .popular { grid-template-columns: 1fr 1fr; }
  .card-wide { grid-column: 1 / -1; grid-template-columns: 11rem 1fr; align-items: center; }
  .card-big { grid-template-columns: 1fr; padding: 2rem; }
  .card-big .art { max-width: 15rem; }
}

.tiles { list-style: none; margin: 0; padding: 0; max-width: none; display: grid; gap: 0.75rem; }
.tiles li {
  margin: 0; padding: 1rem 1.25rem; background: var(--white); border-left: 6px solid var(--red);
  font: 800 1.375rem/1.15 var(--display-font); font-style: italic; text-transform: uppercase; letter-spacing: 0.01em;
}
@media (min-width: 560px) { .tiles { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .tiles { grid-template-columns: repeat(4, 1fr); } }

/* Home: three steps to a quote, numbered like job order slips */
.steps { list-style: none; margin: 0; padding: 0; max-width: none; display: grid; gap: 0.75rem; counter-reset: step; }
.steps li {
  position: relative; margin: 0; padding: 1.25rem 1.25rem 1.25rem 4.75rem;
  background: var(--white); border-left: 6px solid var(--red);
}
.steps li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1.4rem; top: 1.15rem;
  color: var(--red);
  font: 800 2.25rem/1 var(--display-font); font-style: italic;
}
.steps h3 { font-size: 1.375rem; margin-bottom: 0.35rem; }
.steps p { margin: 0; font-size: 1rem; }
@media (min-width: 640px) { .steps { grid-template-columns: repeat(3, 1fr); } }

/* Quote band */
.quote { padding: clamp(2.5rem, 6vw, 4rem) var(--gutter); background: var(--red); color: var(--white); }
.quote p { margin-top: 1rem; }

.find { max-width: 44rem; }

/* Service page body */
.body { padding: clamp(2.5rem, 6vw, 4.5rem) var(--gutter); display: grid; gap: 3rem; }
.body h2 { margin-bottom: 1rem; }
@media (min-width: 900px) {
  .body { grid-template-columns: 1fr 1fr; gap: 3rem 4rem; }
  .body .wide { grid-column: 1 / -1; }
}

/* Details sheet: rows of label and value, like a job order */
.sheet { margin: 0; border-top: 4px solid var(--red); max-width: 40rem; }
.sheet > div { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 0.8rem 0; border-bottom: 1px solid var(--line); }
.sheet dt { font-weight: 700; }
.sheet dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }

.site-foot {
  display: grid; gap: 2rem;
  padding: 3rem var(--gutter) 7rem;
  background: var(--black); color: var(--white);
  border-top: 6px solid var(--red);
}
.site-foot img { width: 13rem; height: auto; margin-bottom: 0.5rem; }
.site-foot p { color: var(--chalk-soft); }
.site-foot dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 0.35rem 1rem; }
.site-foot dt { font-weight: 700; }
.site-foot dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.site-foot nav { display: grid; gap: 0.35rem; align-content: start; }
@media (min-width: 900px) {
  .site-foot { grid-template-columns: 1fr 1.25fr auto; padding-bottom: 6rem; }
}

/* Phones: one-tap Call and Text bar. Computers: floating Text box button. */
.dock {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 10;
  display: grid; grid-template-columns: 1fr 1fr; gap: 0.6rem;
  padding: 0.6rem 0.75rem calc(0.6rem + env(safe-area-inset-bottom));
  background: var(--black); border-top: 3px solid var(--red);
}
.dock .btn { min-height: 3.25rem; }
@media (min-width: 760px) { .dock { display: none; } }

.chat { position: fixed; right: 1rem; bottom: 4.9rem; z-index: 11; display: flex; flex-direction: column; align-items: flex-end; gap: 0.75rem; }
.chat-toggle {
  display: none; align-items: center; gap: 0.5rem;
  padding: 0.7rem 1rem; border: 2px solid var(--white); border-radius: 2px; cursor: pointer;
  background: var(--black); color: var(--white);
  font: 800 1.125rem/1 var(--display-font); font-style: italic; text-transform: uppercase;
  box-shadow: 0 6px 18px rgb(0 0 0 / 0.35);
}
@media (min-width: 760px) {
  .chat { bottom: 1rem; }
  .chat-toggle { display: flex; }
}
.chat-panel {
  width: min(22rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 8rem); overflow-y: auto;
  padding: 1.25rem;
  background: var(--white); color: var(--ink);
  border-radius: 2px; border-top: 6px solid var(--red);
  box-shadow: 0 12px 36px rgb(0 0 0 / 0.45);
}
.chat-panel h2 { font-size: 1.75rem; margin-bottom: 0.75rem; }
.chat-panel label { display: block; font-weight: 700; margin-bottom: 0.35rem; }
.chat-panel textarea {
  width: 100%; padding: 0.6rem; resize: vertical;
  font: inherit; color: inherit; caret-color: var(--red);
  background: var(--white); border: 1.5px solid var(--ink-soft); border-radius: 2px;
}
.chat-note { font-size: 0.9375rem; color: var(--ink-soft); margin: 0.6rem 0 0.9rem; }
.chat-actions { display: flex; gap: 0.75rem; }
.chat-actions .btn { flex: 1; }
.chat-panel .btn-plain { color: var(--ink); }

.map-link { display: grid; gap: 0.75rem; max-width: 32rem; padding: 1rem; background: var(--black); color: var(--white); --art-spot: var(--red-bright); border-radius: 2px; text-decoration: none; }
.map-link svg { width: 100%; height: auto; stroke: currentColor; }
.map-link .guide { stroke-width: 2; stroke-dasharray: 8 9; opacity: 0.5; fill: none; }
.map-link .solid { fill: var(--art-spot); stroke: none; }
.map-cta { font-weight: 700; text-decoration: underline; }
