/* ==========================================================================
   BUILT Trailers — Design System
   Modern hybrid: dark hero sections + light content, bold accent.
   ========================================================================== */

:root {
  /* Brand palette */
  --ink: #0e1116;          /* near-black charcoal */
  --ink-2: #161b22;        /* raised dark surface */
  --ink-3: #1f2630;        /* dark border / hover */
  --steel: #2c333d;
  --smoke: #5b6470;        /* muted text */
  --line: #e6e9ee;         /* light borders */
  --paper: #ffffff;        /* light surface */
  --paper-2: #f5f7fa;      /* light alt surface */
  --paper-3: #eef1f5;
  --text: #14181d;         /* body text on light */
  --text-soft: #495260;

  /* Accent — Built orange */
  --accent: #f15a22;
  --accent-600: #d84a16;
  --accent-700: #b93c10;
  --accent-soft: #fff1ea;

  /* Utility */
  --max: 1200px;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow-sm: 0 1px 2px rgba(14,17,22,.06), 0 2px 8px rgba(14,17,22,.05);
  --shadow: 0 10px 30px rgba(14,17,22,.10);
  --shadow-lg: 0 24px 60px rgba(14,17,22,.18);

  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --display: "Oswald", "Inter", system-ui, sans-serif;

  --ease: cubic-bezier(.4, 0, .2, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--paper);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; line-height: 1.08; margin: 0 0 .4em; letter-spacing: -.01em; text-transform: uppercase; }
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2.2vw, 1.6rem); }
p { margin: 0 0 1rem; }
ul { margin: 0; padding: 0; }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--tight { padding: clamp(44px, 6vw, 72px) 0; }
.section--dark { background: var(--ink); color: #e9edf2; }
.section--alt { background: var(--paper-2); }
.center { text-align: center; }
.lead { font-size: 1.2rem; color: var(--text-soft); max-width: 64ch; }
.section--dark .lead { color: #aeb7c2; }
.eyebrow {
  display: inline-block; font-family: var(--display); text-transform: uppercase;
  letter-spacing: .22em; font-size: .8rem; font-weight: 600; color: var(--accent);
  margin-bottom: 1rem;
}
.grid { display: grid; gap: 28px; }
.maxw-prose { max-width: 72ch; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .55em;
  font-family: var(--display); text-transform: uppercase; letter-spacing: .06em;
  font-weight: 600; font-size: .95rem;
  padding: 14px 26px; border-radius: var(--radius-sm);
  border: 2px solid transparent; cursor: pointer;
  transition: transform .18s var(--ease), background .18s var(--ease), border-color .18s var(--ease), color .18s var(--ease);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-600); }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: var(--steel); }
.btn--ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--on-dark { background: transparent; border-color: rgba(255,255,255,.3); color: #fff; }
.btn--on-dark:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--lg { padding: 17px 34px; font-size: 1.02rem; }
.btn-arrow { transition: transform .18s var(--ease); }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(14,17,22,.92);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 18px; }
.nav__logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: #fff; font-size: 1.35rem; }
.nav__logo .spark { color: var(--accent); }
.nav__logo img, .logo-img { height: 26px; width: auto; display: block; }
.footer__brand .nav__logo img { height: 34px; margin-bottom: 4px; }
.nav__links { display: flex; align-items: center; gap: 4px; list-style: none; }
.nav__links a {
  display: block; padding: 9px 14px; border-radius: 8px;
  color: #cdd4dd; font-size: .93rem; font-weight: 500;
  transition: color .15s var(--ease), background .15s var(--ease);
}
.nav__links a:hover, .nav__links a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.08); }
.nav__cta { display: flex; align-items: center; gap: 10px; }
.nav__toggle { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.nav__toggle span { display: block; width: 24px; height: 2px; background: #fff; margin: 5px 0; transition: .25s var(--ease); }

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 6px); left: 0; min-width: 230px;
  background: var(--ink-2); border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px; padding: 8px; box-shadow: var(--shadow-lg);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: .18s var(--ease); list-style: none;
}
.has-dropdown:hover .dropdown, .has-dropdown:focus-within .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a { padding: 10px 12px; border-radius: 8px; }

/* ---------- Hero ---------- */
.hero {
  position: relative; background: var(--ink); color: #fff; overflow: hidden;
  padding: clamp(90px, 14vw, 170px) 0 clamp(70px, 10vw, 130px);
}
.hero::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(1100px 520px at 78% -8%, rgba(241,90,34,.32), transparent 60%),
    radial-gradient(700px 420px at 8% 110%, rgba(44,90,160,.20), transparent 60%);
  pointer-events: none;
}
.hero--photo { background-size: cover; background-position: center right; }
.hero--photo::after { content: ""; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(90deg, rgba(11,13,17,.62) 0%, rgba(11,13,17,.32) 48%, rgba(11,13,17,.06) 100%); }
.hero--photo h1, .hero--photo .hero__sub, .hero--photo .eyebrow { text-shadow: 0 2px 18px rgba(0,0,0,.45); }
.hero--photo .container { position: relative; z-index: 2; }
.hero__grid { position: absolute; inset: 0; opacity: .35;
  background-image: linear-gradient(rgba(255,255,255,.04) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 56px 56px; mask-image: radial-gradient(70% 60% at 50% 40%, #000, transparent); }
.hero .container { position: relative; z-index: 2; }
.hero h1 { max-width: 16ch; }
.hero h1 .hl { color: var(--accent); }
.hero__sub { font-size: 1.25rem; color: #c4ccd6; max-width: 56ch; margin: 1.2rem 0 2rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 36px; margin-top: 56px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,.12); }
.stat__num { font-family: var(--display); font-size: 2.3rem; font-weight: 700; color: #fff; line-height: 1; }
.stat__label { font-size: .85rem; color: #9aa4b1; text-transform: uppercase; letter-spacing: .1em; margin-top: 6px; }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 26px; }
.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: #d4d9e0; }
.card__media { aspect-ratio: 4 / 3; background: var(--paper-3); position: relative; overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s var(--ease); }
.card:hover .card__media img { transform: scale(1.05); }
.card__badge { position: absolute; top: 12px; left: 12px; background: var(--accent); color: #fff; font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .72rem; font-weight: 600; padding: 5px 11px; border-radius: 6px; }
.card__body { padding: 22px 22px 24px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__body h3 { margin: 0; }
.card__body p { color: var(--text-soft); font-size: .97rem; margin: 0; }
.card__link { margin-top: auto; padding-top: 12px; font-family: var(--display); text-transform: uppercase; letter-spacing: .06em; font-size: .9rem; font-weight: 600; color: var(--accent); display: inline-flex; align-items: center; gap: .4em; }
.card__link:hover { color: var(--accent-700); }

/* Category card (image-led, links to product page) */
.cat-card { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 320px; display: flex; align-items: flex-end; color: #fff; background: var(--ink-2); box-shadow: var(--shadow-sm); }
.cat-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.cat-card::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(8,10,14,.86) 12%, rgba(8,10,14,.15) 60%, transparent); }
.cat-card:hover img { transform: scale(1.06); }
.cat-card__content { position: relative; z-index: 2; padding: 26px; width: 100%; }
.cat-card__content h3 { margin: 0 0 4px; font-size: 1.5rem; }
.cat-card__content span { color: #d6dce3; font-size: .95rem; }
.cat-card__arrow { position: absolute; top: 22px; right: 22px; z-index: 2; width: 42px; height: 42px; border-radius: 50%; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); display: grid; place-items: center; transition: .2s var(--ease); }
.cat-card:hover .cat-card__arrow { background: var(--accent); border-color: var(--accent); }

/* ---------- Feature blocks ---------- */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature__icon { width: 52px; height: 52px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; margin-bottom: 16px; }
.section--dark .feature__icon { background: rgba(241,90,34,.16); }
.feature h3 { margin-bottom: .35em; }
.feature p { color: var(--text-soft); margin: 0; }
.section--dark .feature p { color: #aeb7c2; }

/* Split / alternating */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(32px, 6vw, 72px); align-items: center; }
.split--rev .split__media { order: 2; }
.split__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 5/4; background: var(--paper-3); }
.split__media img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Product / model rows ---------- */
.model { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(28px, 5vw, 60px); align-items: center; padding: clamp(34px, 5vw, 56px) 0; border-bottom: 1px solid var(--line); }
.model:nth-child(even) .model__media { order: 2; }
.model__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 16/11; background: var(--paper-3); }
.model__media img { width: 100%; height: 100%; object-fit: cover; }
.model__sku { font-family: var(--display); color: var(--accent); letter-spacing: .12em; text-transform: uppercase; font-size: .82rem; font-weight: 600; }
.model h3 { margin: 6px 0 14px; }
.spec-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 28px; }
.spec-cols h4 { font-size: .82rem; letter-spacing: .12em; color: var(--smoke); margin: 0 0 8px; }
.spec-list { list-style: none; }
.spec-list li { position: relative; padding-left: 22px; margin-bottom: 7px; font-size: .96rem; color: var(--text-soft); }
.spec-list li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; background: var(--accent); border-radius: 2px; transform: rotate(45deg); }

/* ---------- Portal cards ---------- */
.portal-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.portal {
  position: relative; border-radius: var(--radius); padding: 40px; overflow: hidden;
  background: var(--ink-2); color: #fff; border: 1px solid rgba(255,255,255,.08);
}
.portal--accent { background: linear-gradient(135deg, var(--accent) 0%, var(--accent-700) 100%); }
.portal__icon { width: 56px; height: 56px; border-radius: 14px; background: rgba(255,255,255,.14); display: grid; place-items: center; margin-bottom: 20px; }
.portal h3 { font-size: 1.7rem; margin-bottom: .4em; }
.portal p { color: rgba(255,255,255,.82); margin-bottom: 24px; }
.portal .btn { background: #fff; color: var(--ink); }
.portal .btn:hover { background: #f0f0f0; }

/* ---------- Dealers ---------- */
.dealer-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; }
.dealer {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 22px; box-shadow: var(--shadow-sm); transition: border-color .2s var(--ease), transform .2s var(--ease);
}
.dealer:hover { border-color: var(--accent); transform: translateY(-3px); }
.dealer__name { font-family: var(--display); text-transform: uppercase; font-weight: 600; font-size: 1.05rem; margin-bottom: 8px; letter-spacing: .02em; }
.dealer__row { display: flex; gap: 9px; font-size: .94rem; color: var(--text-soft); margin-bottom: 6px; }
.dealer__row svg { flex-shrink: 0; margin-top: 3px; color: var(--accent); }
.dealer__row a:hover { color: var(--accent); }
.region-tag { display: inline-block; font-family: var(--display); font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--smoke); background: var(--paper-2); padding: 3px 10px; border-radius: 20px; margin-bottom: 14px; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 18px; max-width: 640px; }
.form__row { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field label { font-weight: 600; font-size: .9rem; }
.field input, .field select, .field textarea {
  font-family: var(--font); font-size: 1rem; padding: 13px 15px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: #fff; color: var(--text);
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(241,90,34,.14); }
.field textarea { resize: vertical; min-height: 130px; }

/* ---------- Warranty table ---------- */
.warranty-doc { max-width: 820px; }
.warranty-doc h3 { margin-top: 2.2rem; padding-top: 1.4rem; border-top: 1px solid var(--line); }
.warranty-doc h3:first-of-type { border-top: 0; padding-top: 0; }
.warranty-doc ul { list-style: none; margin: 1rem 0; }
.warranty-doc ul li { position: relative; padding-left: 24px; margin-bottom: 12px; color: var(--text-soft); }
.warranty-doc ul li::before { content: ""; position: absolute; left: 0; top: .55em; width: 9px; height: 9px; background: var(--accent); border-radius: 2px; transform: rotate(45deg); }
.warranty-doc ol { padding-left: 20px; color: var(--text-soft); }
.warranty-doc strong { color: var(--text); }
.callout { background: var(--accent-soft); border-left: 4px solid var(--accent); padding: 18px 22px; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; margin: 1.5rem 0; }
.callout p { margin: 0; }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: #fff; border-radius: var(--radius); padding: clamp(40px, 6vw, 70px); text-align: center; position: relative; overflow: hidden; }
.cta-band::before { content: ""; position: absolute; inset: 0; background: radial-gradient(700px 320px at 70% 0%, rgba(241,90,34,.3), transparent 60%); }
.cta-band > * { position: relative; z-index: 2; }
.cta-band h2 { margin-bottom: .5em; }
.cta-band p { color: #b9c1cc; max-width: 54ch; margin: 0 auto 28px; }
.cta-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* ---------- Page hero (interior) ---------- */
.page-hero { background: var(--ink); color: #fff; padding: clamp(70px, 10vw, 120px) 0 clamp(48px, 7vw, 80px); position: relative; overflow: hidden; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 400px at 85% -10%, rgba(241,90,34,.26), transparent 60%); }
.page-hero .container { position: relative; z-index: 2; }
.page-hero p { color: #c4ccd6; font-size: 1.15rem; max-width: 60ch; margin-top: 1rem; }
.breadcrumb { font-size: .85rem; color: #8b95a3; margin-bottom: 1.2rem; display: flex; gap: 8px; }
.breadcrumb a:hover { color: #fff; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #aeb7c2; padding: 70px 0 30px; border-top: 1px solid rgba(255,255,255,.07); }
.footer__top { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
.footer__brand .nav__logo { color: #fff; margin-bottom: 14px; }
.footer__brand p { font-size: .95rem; max-width: 34ch; }
.footer h4 { color: #fff; font-size: .82rem; letter-spacing: .14em; margin-bottom: 16px; }
.footer ul { list-style: none; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { font-size: .94rem; transition: color .15s var(--ease); }
.footer ul a:hover { color: var(--accent); }
.footer__bottom { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.08); font-size: .86rem; color: #7c8595; }
.footer__bottom a:hover { color: #fff; }

/* ---------- Misc ---------- */
.tagstrip { display: flex; flex-wrap: wrap; gap: 10px; }
.tag { font-family: var(--display); text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--text-soft); background: var(--paper-2); border: 1px solid var(--line); padding: 7px 14px; border-radius: 30px; }
.section--dark .tag { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); color: #c4ccd6; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }
.muted { color: var(--text-soft); }
.coming-soon { display: inline-flex; align-items: center; gap: 8px; font-family: var(--display); text-transform: uppercase; letter-spacing: .1em; font-size: .8rem; color: var(--accent); }

/* reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .footer__top { grid-template-columns: 1fr 1fr; }
  .split, .model, .model:nth-child(even) .model__media { grid-template-columns: 1fr; }
  .model__media, .split--rev .split__media { order: 0 !important; }
  .portal-grid { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .nav__links { position: fixed; inset: 74px 0 auto 0; flex-direction: column; align-items: stretch; gap: 0;
    background: var(--ink); padding: 14px; border-bottom: 1px solid rgba(255,255,255,.1);
    transform: translateY(-120%); transition: transform .3s var(--ease); max-height: calc(100vh - 74px); overflow:auto; }
  .nav__links.open { transform: translateY(0); }
  .nav__links a { padding: 14px; border-radius: 8px; }
  .dropdown { position: static; opacity: 1; visibility: visible; transform: none; background: transparent; border: 0; box-shadow: none; padding: 0 0 0 14px; }
  .nav__toggle { display: block; }
  .nav__cta .btn--ghost { display: none; }
  .hero__stats { gap: 24px; }
  .stat__num { font-size: 1.9rem; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .form__row, .spec-cols { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .hero__actions .btn, .cta-actions .btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
}
