/*
Theme Name: Preston Jaguar Land Rover Specialist
Theme URI: https://wwebdesign.co.uk/
Author: W Web Design & Hosting
Author URI: https://wwebdesign.co.uk/
Description: Lean custom theme for Preston Jaguar Land Rover Specialist — code-registered ACF blocks, no page builder, no build step.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
License: GPL-2.0-or-later
Text Domain: jaguarlandroverpreston
*/

/* ==========================================================================
   Design tokens — the ONLY place cross-block values live.
   Anything used by more than one block belongs here. Anything used by exactly
   one block belongs in that block's own style.css.
   ========================================================================== */

/* Self-hosted, latin subset only. Elementor served these out of uploads/ and
   they disappear with it, so the theme carries its own copy. Oswald is a
   variable font — one file covers 400/500/600. */
@font-face {
  font-family: 'Oswald';
  font-style: normal;
  font-weight: 200 700;
  font-display: swap;
  src: url('assets/fonts/oswald-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/poppins-400-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Poppins';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/poppins-600-latin.woff2') format('woff2');
}

:root {
  /* Brand — read off the Elementor kit ("Tech2 Brands.", post 10) and confirmed
     with getComputedStyle on the live render. */
  --jaguarlandroverpreston-brand:        #ff8b00;   /* Theme Accent */
  --jaguarlandroverpreston-brand-dark:   #e07a00;   /* hover only — not on live, but a flat hover reads as broken */
  --jaguarlandroverpreston-accent:       #ff8b00;
  --jaguarlandroverpreston-black:        #000000;   /* Theme Accent - alt: footer, submit buttons */
  --jaguarlandroverpreston-panel-dark:   #051826;   /* the testimonials band */

  /* Surfaces.
     NEVER set a section background to #fff — leave sections transparent so
     they inherit --jaguarlandroverpreston-bg, and fill --jaguarlandroverpreston-card-bg on inner cards. */
  --jaguarlandroverpreston-bg:           #f7fafc;
  --jaguarlandroverpreston-card-bg:      #edf2f7;
  --jaguarlandroverpreston-card-bg-alt:  #ffffff;   /* testimonial cards, sitting on the dark band */
  --jaguarlandroverpreston-border:       #e2e8f0;
  --jaguarlandroverpreston-card-shadow:  0 0 3px 0 rgba(0, 0, 0, .5);

  /* Text */
  --jaguarlandroverpreston-text:         #2d3748;
  --jaguarlandroverpreston-text-muted:   #7a7a7a;
  --jaguarlandroverpreston-text-invert:  #ffffff;
  --jaguarlandroverpreston-heading:      #000000;

  /* Type. Sizes below are MEASURED off the live render, not chosen —
     see rebuild-spec.json > brand.type_scale. Do not "tidy" them. */
  --jaguarlandroverpreston-font:         'Poppins', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --jaguarlandroverpreston-font-heading: 'Oswald', 'Poppins', system-ui, sans-serif;

  /* Layout */
  --jaguarlandroverpreston-content-max:  1140px;
  --jaguarlandroverpreston-gutter:       20px;
  --jaguarlandroverpreston-section-y:    clamp(40px, 5vw, 60px);
  --jaguarlandroverpreston-radius:       3px;
  --jaguarlandroverpreston-header-height: 132px;

  /* Motion */
  --jaguarlandroverpreston-ease:         cubic-bezier(.22,.61,.36,1);
}

/* --------------------------------------------------------------------------
   Reset / base
   -------------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--jaguarlandroverpreston-bg);
  color: var(--jaguarlandroverpreston-text);
  font-family: var(--jaguarlandroverpreston-font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: inherit; }

/* Headings are black by default, as on live. Any section with a dark
   background MUST restate the colour or it renders black on black. */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--jaguarlandroverpreston-font-heading);
  font-weight: 600;
  color: var(--jaguarlandroverpreston-heading);
  line-height: 1;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.25rem, 4.2vw, 3.75rem); }   /* 60px */
h2 { font-size: clamp(1.85rem, 3.2vw, 2.8125rem); } /* 45px */
h3 { font-size: 1.5rem; }                           /* 24px */
h4 { font-size: 1.25rem; }

p { margin: 0 0 1.15em; }
p:last-child { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Shared layout primitives — used by chrome AND blocks.
   -------------------------------------------------------------------------- */

.jaguarlandroverpreston-wrap {
  width: 100%;
  max-width: var(--jaguarlandroverpreston-content-max);
  margin-inline: auto;
  padding-inline: var(--jaguarlandroverpreston-gutter);
}

.jaguarlandroverpreston-section { padding-block: var(--jaguarlandroverpreston-section-y); }

.jaguarlandroverpreston-section__head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.jaguarlandroverpreston-section__head--center { margin-inline: auto; text-align: center; }

.jaguarlandroverpreston-eyebrow {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--jaguarlandroverpreston-accent);
  margin-bottom: .75em;
}

.jaguarlandroverpreston-lede { color: var(--jaguarlandroverpreston-text-muted); }

/* Body copy on the old site was Poppins 18/28.8 in #7A7A7A, not the darker
   body colour. Blocks opt into it with this class. */
.jaguarlandroverpreston-prose { color: var(--jaguarlandroverpreston-text-muted); }
.jaguarlandroverpreston-prose a { color: var(--jaguarlandroverpreston-brand); }

/* Buttons — 15px Oswald 500 uppercase, 3px radius, measured off live. */
.jaguarlandroverpreston-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5em;
  padding: 12px 24px;
  border: 1px solid transparent;
  border-radius: var(--jaguarlandroverpreston-radius);
  background: var(--jaguarlandroverpreston-brand);
  color: var(--jaguarlandroverpreston-text-invert);
  font-family: var(--jaguarlandroverpreston-font-heading);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .02em;
  text-transform: uppercase;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  transition: background .25s var(--jaguarlandroverpreston-ease), transform .25s var(--jaguarlandroverpreston-ease);
}
.jaguarlandroverpreston-btn:hover { background: var(--jaguarlandroverpreston-brand-dark); transform: translateY(-1px); }

.jaguarlandroverpreston-btn--dark { background: var(--jaguarlandroverpreston-black); }
.jaguarlandroverpreston-btn--dark:hover { background: #262626; }

/* The white button on the orange CTA band — 24px Oswald 600, on live. */
.jaguarlandroverpreston-btn--invert {
  background: var(--jaguarlandroverpreston-text-invert);
  color: var(--jaguarlandroverpreston-black);
  font-size: 24px;
  font-weight: 600;
  text-transform: none;
}
.jaguarlandroverpreston-btn--invert:hover { background: #f0f0f0; }

.jaguarlandroverpreston-btn--ghost {
  background: transparent;
  color: var(--jaguarlandroverpreston-text);
  border-color: var(--jaguarlandroverpreston-border);
}
.jaguarlandroverpreston-btn--ghost:hover { background: var(--jaguarlandroverpreston-card-bg); }

.jaguarlandroverpreston-btn svg { width: 1em; height: 1em; flex: none; fill: currentColor; }

/* Cards — the ONLY place --jaguarlandroverpreston-card-bg should appear. */
.jaguarlandroverpreston-card {
  background: var(--jaguarlandroverpreston-card-bg);
  border-radius: var(--jaguarlandroverpreston-radius);
  box-shadow: var(--jaguarlandroverpreston-card-shadow);
  padding: 25px;
}

/* Screen-reader only */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* WP core alignment classes */
.alignfull { width: 100vw; max-width: 100vw; margin-inline: calc(50% - 50vw); }
.alignwide { max-width: calc(var(--jaguarlandroverpreston-content-max) + 160px); margin-inline: auto; }
.aligncenter { margin-inline: auto; }
