/* =========================================================================
   PaddockDesk — public marketing website
   Design tokens are copied exactly from the real application's own
   stylesheet (paddockdesk repo, assets/css/app.css :root block) so this
   marketing site's navy/red is genuinely the approved brand, not an
   approximation. Font is the product's own (Barlow / Barlow Condensed).
   Premium automotive-technology aesthetic: deep navy backgrounds, white
   typography, subtle red accents - enterprise SaaS, not a garage
   brochure site.
   ========================================================================= */

:root {
  /* Exact values from paddockdesk/assets/css/app.css */
  --navy: #08294f;
  --navy-900: #051a33;
  --navy-800: #0a2342;
  --navy-700: #123a6a;
  --red: #e90a17;
  --red-700: #b80712;

  --on-dark: #ffffff;
  --on-dark-dim: #aab7c8;
  --on-dark-dimmer: #7c8aa0;
  --line: rgba(255, 255, 255, 0.12);
  --line-soft: rgba(255, 255, 255, 0.08);

  --font: "Barlow", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Barlow Condensed", "Barlow", system-ui, sans-serif;

  --radius-sm: 7px;
  --radius: 14px;
  --radius-lg: 22px;
  --container-width: 1180px;
  --shadow-soft: 0 24px 60px -30px rgba(0, 0, 0, 0.6);
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  background: var(--navy-900);
  color: var(--on-dark);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--on-dark);
  line-height: 1.12;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: 0.1px;
}
h1 { font-size: clamp(2.3rem, 5vw, 3.75rem); }
h2 { font-size: clamp(1.8rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.3rem; }

p { margin: 0 0 1em; color: var(--on-dark-dim); }
a { color: var(--on-dark); }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 24px;
}
.container.narrow { max-width: 760px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--red);
  margin: 0 0 14px;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 20px;
  height: 2px;
  background: var(--red);
}

.section { padding: clamp(60px, 8vw, 116px) 0; }
.section-alt { background: var(--navy-800); }

.section-heading { max-width: 700px; margin: 0 0 44px; }
.section-heading.centered { margin-left: auto; margin-right: auto; text-align: center; }
.section-lede { font-size: 1.1rem; color: var(--on-dark-dim); max-width: 62ch; }

/* -------------------------------------------------------------------
   Buttons
   ------------------------------------------------------------------- */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font);
  font-weight: 600;
  font-size: 0.96rem;
  padding: 14px 30px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
  white-space: nowrap;
}
.button.primary {
  background: var(--red);
  color: #ffffff;
  box-shadow: 0 14px 30px -14px rgba(233, 10, 23, 0.55);
}
.button.primary:hover { background: var(--red-700); transform: translateY(-1px); }
.button.secondary {
  background: transparent;
  color: var(--on-dark);
  border-color: var(--line);
}
.button.secondary:hover { border-color: var(--on-dark); }
.button-row { display: flex; flex-wrap: wrap; gap: 14px; }

/* -------------------------------------------------------------------
   Header / navigation
   ------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(5, 26, 51, 0.86);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 24px;
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.brand img { height: 64px; width: auto; display: block; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
}
.nav-links a {
  color: var(--on-dark-dim);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.93rem;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.nav-links a:hover { border-color: var(--red); color: var(--on-dark); }
.nav-cta {
  color: var(--on-dark) !important;
  font-weight: 650 !important;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--navy-800);
  cursor: pointer;
}
.nav-toggle span { display: block; width: 18px; height: 2px; margin: 0 auto; background: var(--on-dark); transition: transform 0.2s ease, opacity 0.2s ease; }
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* -------------------------------------------------------------------
   Hero
   ------------------------------------------------------------------- */
.hero {
  position: relative;
  padding: clamp(64px, 9vw, 110px) 0 clamp(40px, 6vw, 70px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(55% 50% at 85% 0%, rgba(233, 10, 23, 0.14), transparent 60%),
    radial-gradient(50% 45% at 8% 100%, rgba(18, 58, 106, 0.4), transparent 60%);
  pointer-events: none;
}
.hero .container { position: relative; text-align: center; }
.hero-eyebrow { justify-content: center; }
.hero h1 { max-width: 16ch; margin: 0 auto 20px; }
.hero-lede { font-size: 1.18rem; max-width: 56ch; margin: 0 auto 34px; }
.hero .button-row { justify-content: center; margin-bottom: 56px; }

/* -------------------------------------------------------------------
   Hero / showcase device frames
   ------------------------------------------------------------------- */
.device-frame {
  position: relative;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: var(--navy-800);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  max-width: 1040px;
}
.device-frame-chrome {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 12px 16px;
  background: var(--navy-700);
  border-bottom: 1px solid var(--line);
}
.device-frame-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
}
.device-frame img { width: 100%; height: auto; display: block; }

.device-frame-phone {
  width: 300px;
  max-width: 100%;
  border-radius: 28px;
  padding: 10px;
  border-width: 2px;
}
.device-frame-phone .device-frame-chrome { display: none; }
.device-frame-phone img { border-radius: 18px; }

/* -------------------------------------------------------------------
   Platform / positioning strip
   ------------------------------------------------------------------- */
.positioning-strip {
  text-align: center;
}
.positioning-strip h2 { max-width: 24ch; margin-left: auto; margin-right: auto; }

/* -------------------------------------------------------------------
   Feature rows (alternating image/text)
   ------------------------------------------------------------------- */
.feature-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 48px;
  align-items: center;
  padding: 48px 0;
  border-bottom: 1px solid var(--line-soft);
}
.feature-row:last-child { border-bottom: none; padding-bottom: 0; }
.feature-row:first-child { padding-top: 0; }
.feature-row.is-reversed { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); }
.feature-row.is-reversed .feature-copy { order: 2; }
.feature-row.is-reversed .feature-visual { order: 1; }

.feature-copy .status-chip { margin-bottom: 14px; }
.feature-list {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.feature-list li {
  position: relative;
  padding-left: 22px;
  color: var(--on-dark-dim);
  font-size: 0.96rem;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--red);
}

.feature-visual {
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  background: var(--navy-800);
}
.feature-visual img { width: 100%; height: auto; display: block; }
/* Fixed width, not max-width - a grid item with an auto margin (used
   here to centre it) loses CSS Grid's default stretch sizing and falls
   back to shrink-to-fit-content instead, which - combined with
   loading="lazy" meaning the image may have no resolved intrinsic size
   yet when this first paints - collapsed this to padding-only width
   (reproduced: 18px). An explicit width has no such dependency. */
.feature-visual-phone {
  width: 280px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 24px;
  padding: 8px;
}
.feature-visual-phone img { border-radius: 16px; }

/* -------------------------------------------------------------------
   Status chip (honest Live / In development labelling)
   ------------------------------------------------------------------- */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
}
.status-chip::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status-chip.is-live { color: #8fe3a8; background: rgba(32, 184, 94, 0.14); }
.status-chip.is-developing { color: #f5b942; background: rgba(245, 185, 66, 0.14); }

/* -------------------------------------------------------------------
   Cards / grids
   ------------------------------------------------------------------- */
.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }

.card {
  background: var(--navy-800);
  border-radius: var(--radius);
  padding: 28px 26px;
  border: 1px solid var(--line);
}
.card h3 { margin-bottom: 10px; }
.card p:last-child { margin-bottom: 0; }

.icon-badge {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: rgba(233, 10, 23, 0.14);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--red);
}
.icon-badge svg { width: 22px; height: 22px; }

/* -------------------------------------------------------------------
   Showcase gallery
   ------------------------------------------------------------------- */
.showcase-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.showcase-item {
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--navy-800);
  box-shadow: var(--shadow-soft);
}
.showcase-item img { width: 100%; height: auto; display: block; }
.showcase-item-caption {
  padding: 16px 18px 20px;
}
.showcase-item-caption h3 { margin-bottom: 4px; font-size: 1rem; }
.showcase-item-caption p { margin: 0; font-size: 0.88rem; }

/* -------------------------------------------------------------------
   Pricing
   ------------------------------------------------------------------- */
.pricing-grid { grid-template-columns: repeat(3, 1fr); }
.pricing-card { text-align: left; }
.pricing-card .tbc {
  display: inline-block;
  margin-top: 14px;
}
.tbc {
  background: rgba(233, 10, 23, 0.14);
  color: #ff9099;
  padding: 2px 10px;
  border-radius: 6px;
  font-weight: 600;
  font-size: 0.86em;
}

/* -------------------------------------------------------------------
   Footer
   ------------------------------------------------------------------- */
.site-footer {
  background: var(--navy-900);
  color: rgba(255, 255, 255, 0.75);
  padding: 56px 0 28px;
  border-top: 1px solid var(--line-soft);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 32px;
  margin-bottom: 40px;
}
.footer-grid h4 { color: var(--on-dark); font-family: var(--font-display); font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 14px; }
.footer-grid a { color: rgba(255, 255, 255, 0.75); text-decoration: none; display: block; margin-bottom: 10px; font-size: 0.92rem; }
.footer-grid a:hover { color: var(--on-dark); }
.footer-brand img { height: 30px; margin-bottom: 14px; }
.footer-brand p { color: rgba(255, 255, 255, 0.55); font-size: 0.9rem; max-width: 34ch; }
.footer-bottom {
  border-top: 1px solid var(--line-soft);
  padding-top: 22px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.5);
}
.footer-bottom strong { color: var(--on-dark); }

/* -------------------------------------------------------------------
   Workflow steps (Platform page)
   ------------------------------------------------------------------- */
.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(233, 10, 23, 0.14);
  color: var(--red);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 14px;
}

/* -------------------------------------------------------------------
   Utility
   ------------------------------------------------------------------- */
.text-muted { color: var(--on-dark-dimmer); }
.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  background: var(--navy-900);
  color: var(--on-dark);
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  z-index: 100;
}
.skip-link:focus { left: 0; top: 0; }

/* -------------------------------------------------------------------
   Responsive
   ------------------------------------------------------------------- */
@media (max-width: 980px) {
  .grid-3, .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .feature-row, .feature-row.is-reversed {
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .feature-row .feature-copy,
  .feature-row.is-reversed .feature-copy { order: 1; }
  .feature-row .feature-visual,
  .feature-row.is-reversed .feature-visual { order: 2; }
  .showcase-gallery { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 720px) {
  .brand img { height: 34px; }
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  #site-nav.is-open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--navy-900);
    padding: 20px 24px 26px;
    border-bottom: 1px solid var(--line-soft);
    gap: 16px;
  }
  .grid-2, .grid-3, .grid-5 { grid-template-columns: 1fr; }
  .showcase-gallery { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition-duration: 0.001ms !important; animation-duration: 0.001ms !important; }
}
