/* =============================================================================
   The Car Liaison — foundations
   Tokens, reset, typography and the primitives shared by the site and admin.
   ========================================================================== */

/* ------------------------------------------------------------------ tokens */

:root {
  /* ---- Brand palette. These four are the identity; everything else is a
     tint or shade of them. ---------------------------------------------- */
  --teal:         #163F42;   /* Deep Teal */
  --beige:        #DCCCB4;   /* Warm Beige */
  --slate:        #5D6E7A;   /* Slate Blue-Gray */
  --cream:        #F6F2EA;   /* Light Cream */

  /* Derived shades */
  --teal-deep:    #0E2E31;
  --teal-dark:    #071E20;
  --teal-2:       #1F4F53;
  --teal-3:       #2E666B;

  --beige-2:      #CBB899;
  --beige-3:      #B7A484;

  --slate-2:      #8395A0;
  --slate-3:      #A8B6BE;

  --cream-2:      #EBE5D9;
  --cream-3:      #DED7C8;
  --paper:        #FDFBF6;

  /* Text. Body copy is the brand teal, so nothing on the page reads as grey. */
  --ink:          #163F42;
  --ink-2:        #35555A;

  /* Functional only - never used for branding. */
  --error:        #9E4A34;
  --wa:           #25D366;
  --wa-deep:      #128C4A;

  /* Lines */
  --line:         rgba(22, 63, 66, .14);
  --line-soft:    rgba(22, 63, 66, .08);
  --line-dark:    rgba(220, 204, 180, .20);
  --line-dark-soft: rgba(220, 204, 180, .10);

  /* Shape - the design is uniformly tight at 6px; only the header pill rounds. */
  --r-card:   6px;
  --r-panel:  6px;
  --r-input:  6px;
  --r-btn:    6px;
  --r-pill:   999px;

  /* Depth - soft and warm, never a hard black drop shadow. */
  --sh-sm: 0 1px 2px rgba(14, 46, 49, .05), 0 4px 12px -6px rgba(14, 46, 49, .16);
  --sh-md: 0 2px 6px rgba(14, 46, 49, .05), 0 18px 42px -24px rgba(14, 46, 49, .42);
  --sh-lg: 0 4px 10px rgba(14, 46, 49, .05), 0 40px 80px -36px rgba(14, 46, 49, .52);
  --sh-glow: 0 20px 60px -24px rgba(22, 63, 66, .5);

  /* Rhythm */
  --wrap: 1340px;
  --hdr-h: 74px;
  --gut: clamp(20px, 5vw, 56px);
  --sec: clamp(64px, 9vw, 132px);

  /* Type - taken from the Figma design. Righteous carries display and UI,
     Audiowide is reserved for the oversized ghost typography, and Manrope
     handles running copy (which the design has none of). */
  --display: 'Righteous', 'Futura', 'Century Gothic', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --ghost: 'Audiowide', 'Righteous', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --body: 'Manrope', 'Segoe UI', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'Righteous', 'Futura', 'Helvetica Neue', Helvetica, Arial, sans-serif;

  --ease: cubic-bezier(.2, .7, .3, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

/* ------------------------------------------------------------------- reset */

*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

body {
  font-family: var(--body);
  /* Righteous ships one weight; let the browser show it rather than fake a bold. */
  font-synthesis: none;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; color: inherit; }

button { background: none; border: 0; cursor: pointer; }

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

table { border-collapse: collapse; width: 100%; }

:focus-visible {
  outline: 2px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection { background: var(--beige); color: var(--teal-dark); }

/* -------------------------------------------------------------- typography */

h1, h2, h3, h4 {
  font-family: var(--display);
  font-weight: 800;
  line-height: .95;
  letter-spacing: -.01em;
  text-wrap: balance;
}

.t-hero {
  font-size: clamp(33px, 5.2vw, 64px);
  font-weight: 800;
  line-height: .93;
  letter-spacing: -.015em;
}

.t-sec {
  font-size: clamp(27px, 3.4vw, 42px);
  letter-spacing: -.012em;
}

.t-sub {
  font-size: clamp(22px, 2.6vw, 30px);
  letter-spacing: -.02em;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--teal);
}

/* Warm beige is the emphasis colour on teal, the way teal is on cream. */
.on-dark .eyebrow, .hero .eyebrow, .promo .eyebrow, .phead .eyebrow { color: var(--beige); }

.eyebrow--muted { color: var(--slate); }

.lede {
  font-size: clamp(16px, 1.5vw, 19px);
  color: var(--ink-2);
  max-width: 56ch;
  text-wrap: pretty;
}

.on-dark .lede, .lede--dark { color: rgba(220, 204, 180, .72); }

/* Price lockups — the number is always the loudest thing in its container. */
.price {
  display: inline-flex;
  align-items: baseline;
  gap: .28em;
  font-family: var(--display);
  font-weight: 800;
  letter-spacing: -.018em;
  line-height: .9;
}

.price__cur { font-size: .52em; align-self: flex-start; margin-top: .18em; opacity: .7; }
.price__per {
  font-family: var(--body);
  font-size: .26em;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--slate);
  align-self: flex-end;
}

.on-dark .price__per { color: rgba(220, 204, 180, .62); }

/* --------------------------------------------------------------- utilities */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gut);
}

.section { padding-block: var(--sec); }

.on-dark { color: var(--paper); }
.on-dark h1, .on-dark h2, .on-dark h3 { color: var(--paper); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.stack { display: grid; gap: 14px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grow { flex: 1 1 auto; }
.muted { color: var(--slate); }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

/* Section headers share one lockup across the whole site. */
.sec-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
  margin-bottom: clamp(28px, 4vw, 52px);
}

.sec-head__text { max-width: min(42ch, 620px); }
.sec-head__text .eyebrow { display: block; margin-bottom: 14px; }
.sec-head__text .lede { margin-top: 14px; }

/* ----------------------------------------------------------------- buttons */

.btn {
  --btn-bg: var(--ink);
  --btn-fg: #fff;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: var(--r-btn);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--body);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -.01em;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease),
              background-color .25s var(--ease), color .25s var(--ease);
}

.btn:hover { transform: translateY(-2px); box-shadow: var(--sh-md); }
.btn:active { transform: translateY(0); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.btn svg { flex: none; }
.btn .arw { transition: transform .3s var(--ease); }
.btn:hover .arw { transform: translateX(4px); }

.btn--primary { --btn-bg: var(--teal); --btn-fg: var(--paper); }
.btn--primary:hover { --btn-bg: var(--teal-deep); box-shadow: var(--sh-glow); }

/* On teal surfaces the primary action inverts to warm beige. */
.on-dark .btn--primary, .hero .btn--primary, .promo .btn--primary {
  --btn-bg: var(--beige); --btn-fg: var(--teal-dark);
}
.on-dark .btn--primary:hover, .hero .btn--primary:hover, .promo .btn--primary:hover {
  --btn-bg: #E9DCC6; box-shadow: 0 20px 50px -20px rgba(220, 204, 180, .35);
}

.btn--light { --btn-bg: var(--beige); --btn-fg: var(--teal-dark); }
.btn--light:hover { --btn-bg: #E9DCC8; }

.btn--wa { --btn-bg: var(--wa); --btn-fg: #05291a; }
.btn--wa:hover { --btn-bg: #1fbe5b; }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  box-shadow: inset 0 0 0 1.5px var(--line);
}
.btn--outline:hover { --btn-bg: rgba(16,21,28,.04); box-shadow: inset 0 0 0 1.5px var(--ink); }

.btn--outline-dark {
  --btn-bg: transparent;
  --btn-fg: var(--beige);
  box-shadow: inset 0 0 0 1.5px var(--line-dark);
}
.btn--outline-dark:hover { --btn-bg: rgba(220,204,180,.10); box-shadow: inset 0 0 0 1.5px rgba(220,204,180,.45); }

.btn--sm { padding: 11px 18px; font-size: 14px; }
.btn--lg { padding: 18px 32px; font-size: 16.5px; }
.btn--block { width: 100%; }

/* Text link with a sliding underline. */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 15px;
  padding-bottom: 2px;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 1.5px;
  background-position: 0 100%;
  background-repeat: no-repeat;
  transition: background-size .35s var(--ease-out);
}
.tlink:hover { background-size: 100% 1.5px; }
.tlink .arw { transition: transform .3s var(--ease); }
.tlink:hover .arw { transform: translateX(4px); }

/* ------------------------------------------------------------------ badges */

.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 13px;
  border-radius: var(--r-pill);
  font-family: var(--mono);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: var(--ink);
  color: #fff;
  line-height: 1;
  white-space: nowrap;
}

.badge--feature { background: var(--beige); color: var(--teal-dark); }
.badge--limited { background: var(--teal); color: var(--beige); }
.badge--outline { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.2px var(--line); }
.badge--outline-dark { background: rgba(220,204,180,.08); color: var(--beige); box-shadow: inset 0 0 0 1.2px var(--line-dark); }
.badge--soft { background: var(--cream-3); color: var(--teal); }

/* Urgency label — honest copy only, never a fake countdown. */
.urgency {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal-3);
}
.urgency::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--teal-3);
  box-shadow: 0 0 0 0 rgba(46, 102, 107, .55);
  animation: pulse 2.6s var(--ease) infinite;
}

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(46, 102, 107, .5); }
  70%  { box-shadow: 0 0 0 8px rgba(46, 102, 107, 0); }
  100% { box-shadow: 0 0 0 0 rgba(46, 102, 107, 0); }
}

/* ------------------------------------------------------------------- forms */

.field { display: grid; gap: 8px; }

.field > label, .flabel {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -.005em;
  color: var(--ink-2);
}

.field .hint { font-size: 12.5px; color: var(--slate); }

.input, .select, .textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: var(--r-input);
  border: 1.5px solid var(--line);
  background: var(--paper);
  font-size: 16px;
  color: var(--ink);
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease), background-color .2s;
}

.input::placeholder, .textarea::placeholder { color: var(--slate-2); }

.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 4px rgba(22, 63, 66, .09);
}

.input[aria-invalid='true'], .select[aria-invalid='true'] {
  border-color: var(--error);
  box-shadow: 0 0 0 4px rgba(158, 74, 52, .14);
}

.textarea { min-height: 104px; resize: vertical; line-height: 1.55; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' stroke='%236E8285' stroke-width='1.8' fill='none' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 42px;
}

.err {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--error);
}

/* Selectable chips — used for terms, filters, quick browse. */
.chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: var(--r-pill);
  background: var(--paper);
  box-shadow: inset 0 0 0 1.5px var(--line);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink-2);
  cursor: pointer;
  white-space: nowrap;
  transition: all .22s var(--ease);
}

.chip:hover { box-shadow: inset 0 0 0 1.5px var(--slate); color: var(--ink); }

.chip[aria-pressed='true'], .chip.is-on {
  background: var(--ink);
  color: #fff;
  box-shadow: inset 0 0 0 1.5px var(--ink);
}

.chip[disabled] { opacity: .35; pointer-events: none; }

.chip--dark { background: rgba(220,204,180,.06); color: rgba(220,204,180,.8); box-shadow: inset 0 0 0 1.5px var(--line-dark); }
.chip--dark:hover { color: var(--beige); box-shadow: inset 0 0 0 1.5px rgba(220,204,180,.4); }

/* ---------------------------------------------------------------- surfaces */

.card {
  background: var(--paper);
  border-radius: var(--r-card);
  box-shadow: var(--sh-sm);
}

.panel {
  background: var(--paper);
  border-radius: var(--r-panel);
  box-shadow: var(--sh-md);
}

/* Fine grain over dark panels so large flat areas do not band. */
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .35;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------- reveals */

[data-reveal] {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .7s var(--ease-out), transform .7s var(--ease-out);
  transition-delay: var(--d, 0ms);
}

[data-reveal].is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------- scrollers */

.scroller {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding-block: 4px;
}
.scroller::-webkit-scrollbar { display: none; }
.scroller > * { scroll-snap-align: start; flex: none; }

/* Bleed a scroller to the screen edge on mobile so it reads as swipeable. */
@media (max-width: 860px) {
  .scroller--bleed {
    margin-inline: calc(var(--gut) * -1);
    padding-inline: var(--gut);
  }
}

/* ------------------------------------------------------------- brand mark */

/* Mirrors the logo lockup: light "The", bold "Car", light "Liaison". */
.wordmark {
  font-family: var(--display);
  letter-spacing: -.005em;
  line-height: 1;
  white-space: nowrap;
  color: var(--teal);
}

 /* Righteous has one weight, so the logo's heavier "car" is faked with a
    hairline stroke rather than a synthetic bold. */
.wordmark b { font-weight: 400; -webkit-text-stroke: .55px currentColor; }
.wordmark i { font-style: normal; font-weight: 400; opacity: .92; }

.wordmark--stack {
  display: grid;
  gap: .05em;
  line-height: .95;
  white-space: normal;
}

.wordmark--light { color: var(--beige); }

/* The sand line drawing from the logo, reusable at any size. */
.brandmark { display: block; width: 100%; height: auto; color: var(--beige); }

/* --------------------------------------------------------------- chevrons */

/* The design's ">>>" motif: three overlapping chevrons after every action. */
.chev {
  display: inline-flex;
  align-items: center;
  flex: none;
  color: currentColor;
}
.chev svg { display: block; }
.chev svg + svg { margin-left: -2px; }
.chev svg:nth-child(1) { opacity: .45; }
.chev svg:nth-child(2) { opacity: .72; }

.btn .chev, .tlink .chev { transition: transform .3s var(--ease); }
.btn:hover .chev, .tlink:hover .chev { transform: translateX(3px); }

.wordmark--lower { text-transform: lowercase; }
