/* Turnabout Lane — design system
   Brand tokens verified from the supplied logo artwork:
   navy #0B1A3C, orange #E3692B (see scripts/prepare-assets.py). */

@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  --bg: #080f20;
  --bg-raise: #0b1a3c;
  --surface: #0c1d42;
  --surface-2: #10234c;
  --border: #22345f;
  --border-soft: #1a2a4e;
  --text: #f5f7fb;
  --muted: #a7b3c9;
  --muted-2: #8b99b5;
  --orange: #e3692b;
  --orange-bright: #f0854c;
  --orange-dark: #b34e1c;
  --radius: 16px;
  --container: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

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

.container {
  width: min(var(--container), 100% - 3rem);
  margin-inline: auto;
}

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

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  background: var(--orange);
  color: var(--bg);
  font-weight: 700;
  padding: 0.65rem 1.1rem;
  border-radius: 0 0 10px 10px;
  transition: top 0.2s ease;
}
.skip-link:focus { top: 0; }

a { color: var(--orange-bright); }
a:hover { color: var(--orange); }

:focus-visible {
  outline: 2px solid var(--orange-bright);
  outline-offset: 3px;
  border-radius: 4px;
}

h1, h2, h3 {
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin: 0 0 1rem;
  font-weight: 750;
}
h1 { font-size: clamp(2.5rem, 6vw, 4.3rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.75rem); }
h3 { font-size: 1.3rem; letter-spacing: -0.01em; }

p { margin: 0 0 1.1rem; }
.lede { font-size: 1.22rem; color: var(--muted); max-width: 46rem; }
.muted { color: var(--muted); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 15, 32, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-soft);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 76px;
}
.brand img { display: block; width: 218px; }
.primary-nav ul {
  display: flex;
  gap: 0.5rem;
  list-style: none;
  margin: 0; padding: 0;
}
.primary-nav a {
  display: inline-block;
  padding: 0.6rem 0.95rem;
  color: var(--text);
  text-decoration: none;
  font-weight: 550;
  border-radius: 10px;
}
.primary-nav a:hover { color: var(--orange-bright); }
.primary-nav a.active { color: var(--orange-bright); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 0.7rem 0.75rem;
  cursor: pointer;
  min-width: 46px; min-height: 46px;
}
.nav-toggle-bar {
  display: block;
  width: 22px; height: 2px;
  background: var(--text);
  margin: 4px auto;
}

/* ---------- Sections ---------- */
.section { padding: 5.5rem 0; }
.section--raise {
  background: linear-gradient(180deg, var(--bg-raise), var(--bg) 130%);
  border-block: 1px solid var(--border-soft);
}
.eyebrow {
  color: var(--orange-bright);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.section-head { max-width: 48rem; margin-bottom: 3rem; }
.section-head p { color: var(--muted); font-size: 1.13rem; }

/* ---------- Hero ---------- */
.hero {
  padding: 6.5rem 0 5.5rem;
  background:
    radial-gradient(1000px 480px at 78% -8%, rgba(227, 105, 43, 0.10), transparent 60%),
    radial-gradient(1100px 620px at 12% -20%, rgba(16, 35, 76, 0.95), transparent 65%);
  border-bottom: 1px solid var(--border-soft);
}
.hero h1 { max-width: 15ch; }
.hero h1 .accent { color: var(--orange); }
.hero .lede { margin-top: 1.4rem; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2.4rem;
}
.hero-mark {
  width: 54px;
  margin-bottom: 1.8rem;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.9rem 1.7rem;
  border-radius: 12px;
  font-weight: 650;
  font-size: 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  min-height: 48px;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease;
}
.btn-primary { background: var(--orange); color: var(--bg); }
.btn-primary:hover { background: var(--orange-bright); color: var(--bg); }
.btn-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-secondary:hover { border-color: var(--orange); color: var(--orange-bright); }

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.4rem;
}
.card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 2.1rem 1.9rem;
  transition: border-color 0.18s ease, transform 0.18s ease;
}
.card:hover { border-color: var(--orange-dark); transform: translateY(-3px); }
.card .card-num {
  color: var(--orange);
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  margin-bottom: 1.1rem;
}
.card p { color: var(--muted); margin: 0; }
.card-link { font-weight: 650; text-decoration: none; }
.card-link:hover { text-decoration: underline; }
.card-eyebrow {
  color: var(--orange-bright);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 0.7rem;
}

/* ---------- Mission / statement ---------- */
.statement { max-width: 56rem; }
.statement p.big {
  font-size: clamp(1.35rem, 2.6vw, 1.8rem);
  line-height: 1.5;
  color: var(--text);
  font-weight: 550;
  letter-spacing: -0.01em;
}

/* ---------- Focus page rows ---------- */
.focus-rows { display: grid; gap: 1.4rem; }
.focus-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 1.6rem;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 2.2rem;
}
.focus-row .card-num {
  color: var(--orange);
  font-size: 1.6rem;
  font-weight: 800;
}
.focus-row p { color: var(--muted); }
.focus-row ul { color: var(--muted); margin: 0.4rem 0 0; padding-left: 1.2rem; }
.focus-row li { margin-bottom: 0.35rem; }

/* ---------- Ventures ---------- */
.venture-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.4rem;
}
.venture-card {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 2.1rem 1.9rem;
  display: flex;
  flex-direction: column;
}
.venture-card p { color: var(--muted); }
/* Reserve two lines for the category heading so a wrapped heading on one
   card cannot push its logo and description below the neighbouring card's.
   The heading's bottom margin is removed on venture cards only: the logo
   row follows it directly, so the margin would only add dead space. */
.venture-card .card-eyebrow { min-height: 2.64rem; margin-bottom: 0; }
/* Fixed-height logo area: identical on every card, logo left-aligned and
   vertically centred. Logos are sized by WIDTH per venture (below), not by
   a shared height: the assets are height-normalized (each artwork 240px
   tall), but their aspect ratios differ widely (iAccommodate ≈ 8.8:1,
   Ruffin Digital ≈ 2.8:1), so a shared height made the wide wordmark
   render ~3.2x wider than the compact lockup. Widths are chosen so each
   rendered artwork (excluding transparent padding) lands at its target
   visual size. The container is only just taller than the tallest logo
   image (Ruffin Digital, ~59px), so the vertical centring leaves almost
   no slack around the logos and the cards stay compact. */
.venture-logo-wrap {
  height: 3.75rem;
  display: flex;
  align-items: center;
  margin: 0 0 0.6rem;
}
.venture-logo-wrap h3 { margin: 0; }
.venture-logo {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  object-position: left center;
}
/* img width = target artwork width x (canvas width / artwork width):
   iAccommodate 260px artwork (2165/2117), Ruffin Digital ~136px (717/669).
   Targets set by Dalton, Nov 21, 2026 (Ruffin reduced to 65% of its 210px
   size the same evening); verified by measuring the rendered artwork in
   the desktop staging render. */
.venture-logo--iaccommodate-ai { width: 16.6rem; }
.venture-logo--ruffin-digital { width: 9.17rem; }
/* Pin the link to the bottom of the card, level with its neighbour's. */
.venture-card .card-link { margin-top: auto; }
.venture-empty {
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: 2.6rem 2.2rem;
  text-align: center;
  background: rgba(16, 35, 76, 0.35);
}
.venture-empty p { color: var(--muted); max-width: 38rem; margin-inline: auto; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(120deg, var(--bg-raise), var(--surface-2));
  border: 1px solid var(--border-soft);
  border-radius: calc(var(--radius) + 6px);
  padding: 3rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.6rem;
}
.cta-band h2 { margin-bottom: 0.5rem; }
.cta-band p { color: var(--muted); margin: 0; max-width: 36rem; }

/* ---------- Page hero (subpages) ---------- */
.page-hero {
  padding: 4.5rem 0 3.5rem;
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(227, 105, 43, 0.08), transparent 60%),
    radial-gradient(1000px 560px at 10% -20%, rgba(16, 35, 76, 0.9), transparent 65%);
  border-bottom: 1px solid var(--border-soft);
}
.page-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); max-width: 20ch; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 2.5rem;
  align-items: start;
}
.category-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.category-list li {
  background: var(--surface);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 1.3rem 1.4rem;
}
.category-list h3 { margin-bottom: 0.3rem; font-size: 1.08rem; }
.category-list p { color: var(--muted); margin: 0; font-size: 0.98rem; }

form.contact-form {
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border-soft);
  border-radius: var(--radius);
  padding: 2.2rem;
}
.field { margin-bottom: 1.3rem; }
.field label { display: block; font-weight: 600; margin-bottom: 0.45rem; }
.field .hint { color: var(--muted-2); font-size: 0.9rem; font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.8rem 0.95rem;
  font: inherit;
  min-height: 48px;
}
.field textarea { min-height: 150px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--orange);
  outline: 2px solid var(--orange-bright);
  outline-offset: 1px;
}
.field [aria-invalid="true"] { border-color: #e5534b; }
.field-error { color: #ff9d94; font-size: 0.92rem; margin-top: 0.4rem; }
.form-status {
  border-radius: 10px;
  padding: 1rem 1.2rem;
  margin-bottom: 1.3rem;
  display: none;
}
.form-status.success {
  display: block;
  background: rgba(46, 160, 67, 0.14);
  border: 1px solid rgba(46, 160, 67, 0.55);
}
.form-status.error {
  display: block;
  background: rgba(229, 83, 75, 0.12);
  border: 1px solid rgba(229, 83, 75, 0.55);
}
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border-soft);
  background: #060b18;
  padding: 4rem 0 2rem;
  margin-top: 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 0.7fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}
.footer-brand img { width: 200px; display: block; margin-bottom: 1.1rem; }
.footer-brand p, .footer-privacy p { color: var(--muted); font-size: 0.98rem; max-width: 26rem; }
.site-footer h2 {
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 1rem;
}
.footer-nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-nav a { color: var(--muted); text-decoration: none; padding: 0.25rem 0; display: inline-block; }
.footer-nav a:hover { color: var(--orange-bright); }
.footer-legal {
  border-top: 1px solid var(--border-soft);
  padding-top: 1.6rem;
  color: var(--muted-2);
  font-size: 0.92rem;
}
.footer-legal p { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .card-grid { grid-template-columns: 1fr; }
  .venture-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .cta-band { padding: 2.2rem; }
}
@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .primary-nav {
    display: none;
    position: absolute;
    top: 76px; left: 0; right: 0;
    background: var(--bg-raise);
    border-bottom: 1px solid var(--border);
    padding: 0.8rem 1.5rem 1.2rem;
  }
  .primary-nav.open { display: block; }
  .primary-nav ul { flex-direction: column; gap: 0.2rem; }
  .primary-nav a { display: block; padding: 0.85rem 0.6rem; }
  .brand img { width: 178px; }
  .focus-row { grid-template-columns: 1fr; gap: 0.6rem; padding: 1.7rem; }
  .section { padding: 4rem 0; }
  .hero { padding: 4.5rem 0 4rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}
