/* ==========================================================================
   StreetSmart Driving Academy — Design System / Base
   --------------------------------------------------------------------------
   Layer 1 of 4. Load order: base → layout → hero → sections.

   Direction: cinematic automotive premium. Deep ink backgrounds carry the
   brand, with light "paper" sections used as relief between them. Gold stays
   the single accent and is never used as a large fill — only for edges,
   eyebrows, rules and one primary button per view.
   ========================================================================== */

/* ---------- Tokens ------------------------------------------------------- */
:root {
	/* Ink — dark surfaces */
	--ink-950: #07070a;
	--ink-900: #0b0b10;
	--ink-850: #101017;
	--ink-800: #16161f;
	--ink-700: #1f1f2a;
	--ink-600: #2b2b38;
	--ink-500: #3a3a49;

	/* Paper — light surfaces */
	--paper-100: #ffffff;
	--paper-200: #fbfaf8;
	--paper-300: #f4f2ee;
	--paper-400: #e9e6df;
	--paper-500: #d8d4ca;

	/* Accent */
	--gold-300: #ffe08a;
	--gold-400: #ffce4d;
	--gold-500: #f2b705;
	--gold-600: #d29a00;
	--gold-soft: rgba(242, 183, 5, 0.12);
	--gold-line: rgba(242, 183, 5, 0.32);

	/* Support */
	--mint-500: #35c88f;
	--sky-500: #4aa8ff;

	/* Type colour — on dark */
	--t-hi: #ffffff;
	--t-mid: rgba(255, 255, 255, 0.70);
	--t-low: rgba(255, 255, 255, 0.46);
	--t-line: rgba(255, 255, 255, 0.10);
	--t-line-strong: rgba(255, 255, 255, 0.18);

	/* Type colour — on light */
	--i-hi: #0b0b10;
	--i-mid: #55555f;
	--i-low: #86868f;
	--i-line: rgba(11, 11, 16, 0.10);
	--i-line-strong: rgba(11, 11, 16, 0.18);

	/* Typography */
	--f-display: 'Sora', 'Segoe UI', system-ui, sans-serif;
	--f-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--f-mono: ui-monospace, 'SF Mono', 'Cascadia Mono', Menlo, monospace;

	/* Fluid type scale */
	--fs-display: clamp(2.35rem, 5vw, 4.5rem);
	--fs-h1: clamp(2.25rem, 5.2vw, 4.25rem);
	--fs-h2: clamp(1.9rem, 3.9vw, 3.35rem);
	--fs-h3: clamp(1.3rem, 2.1vw, 1.75rem);
	--fs-h4: clamp(1.05rem, 1.5vw, 1.25rem);
	--fs-lead: clamp(1.0625rem, 1.35vw, 1.25rem);
	--fs-body: 1rem;
	--fs-sm: 0.9375rem;
	--fs-xs: 0.8125rem;
	--fs-eyebrow: 0.75rem;

	/* Layout */
	--container: 1280px;
	--container-wide: 1480px;
	--container-narrow: 820px;
	--gutter: clamp(20px, 5vw, 56px);
	--section-y: clamp(80px, 11vw, 160px);

	/* Shape */
	--r-xs: 8px;
	--r-sm: 12px;
	--r-md: 20px;
	--r-lg: 28px;
	--r-xl: 40px;
	--r-pill: 999px;

	/* Elevation */
	--sh-sm: 0 2px 8px rgba(7, 7, 10, 0.06);
	--sh-md: 0 14px 40px -12px rgba(7, 7, 10, 0.18);
	--sh-lg: 0 32px 80px -24px rgba(7, 7, 10, 0.32);
	--sh-gold: 0 16px 44px -14px rgba(242, 183, 5, 0.55);

	/* Motion */
	--e-out: cubic-bezier(0.16, 1, 0.3, 1);
	--e-in-out: cubic-bezier(0.76, 0, 0.24, 1);
	--e-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
	--d-fast: 0.22s;
	--d-mid: 0.45s;
	--d-slow: 0.8s;

	/* Chrome */
	--header-h: 76px;
	--z-nav: 200;
	--z-overlay: 400;
	--z-loader: 900;
}

/* ---------- Reset -------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; min-width: 0; }

html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: auto; /* Lenis owns smooth scrolling; see modules/smooth-scroll.js */
}

body {
	margin: 0;
	background: var(--ink-950);
	color: var(--i-mid);
	font-family: var(--f-body);
	font-size: var(--fs-body);
	font-weight: 400;
	line-height: 1.7;
	letter-spacing: -0.005em;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-wrap: break-word;
}

/* The page sits on an ink page-ground so pinned/overscroll areas never flash
   white; individual sections paint their own surface. */
#site-main { background: var(--paper-200); position: relative; z-index: 1; }

img, svg, video, canvas { display: block; max-width: 100%; }
img, video { height: auto; }
/* The rule above is an author style, so it outranks the UA sheet's
   `[hidden] { display: none }` and would otherwise make the `hidden`
   attribute a no-op on these elements — which is how the hero's fallback
   <video> ends up painted over the canvas. */
[hidden] { display: none !important; }
a { color: inherit; text-decoration: none; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
iframe { border: 0; display: block; }

h1, h2, h3, h4, h5 {
	margin: 0 0 0.5em;
	font-family: var(--f-display);
	font-weight: 600;
	line-height: 1.06;
	letter-spacing: -0.035em;
	color: var(--i-hi);
	text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); letter-spacing: -0.025em; line-height: 1.2; }
h4 { font-size: var(--fs-h4); letter-spacing: -0.02em; line-height: 1.3; }
p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }
strong { font-weight: 600; color: var(--i-hi); }

::selection { background: var(--gold-500); color: var(--ink-950); }

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

.screen-reader-text {
	position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed; top: 14px; left: 14px; z-index: 9999;
	width: auto; height: auto; clip: auto; margin: 0;
	padding: 12px 20px; border-radius: var(--r-pill);
	background: var(--gold-500); color: var(--ink-950); font-weight: 600;
}

/* ---------- Layout helpers ----------------------------------------------- */
.container { width: 100%; max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.container-wide { max-width: var(--container-wide); }
.container-narrow { max-width: var(--container-narrow); }
.section { padding-block: var(--section-y); position: relative; }
.section-tight { padding-block: clamp(56px, 7vw, 96px); }
.text-center { text-align: center; }

/* Surfaces. `.on-dark` flips every colour token that text and borders read,
   so the same component markup works on either ground without variants. */
.surface-paper { background: var(--paper-200); color: var(--i-mid); }
.surface-paper-alt { background: var(--paper-300); color: var(--i-mid); }
.surface-ink { background: var(--ink-950); color: var(--t-mid); }
.surface-ink-soft { background: var(--ink-900); color: var(--t-mid); }

.on-dark {
	--i-hi: var(--t-hi);
	--i-mid: var(--t-mid);
	--i-low: var(--t-low);
	--i-line: var(--t-line);
	--i-line-strong: var(--t-line-strong);
	color: var(--t-mid);
}
.on-dark h1, .on-dark h2, .on-dark h3, .on-dark h4, .on-dark strong { color: var(--t-hi); }

/* ---------- Section headings --------------------------------------------- */
.eyebrow {
	/* flex-start, not center: on narrow screens the label wraps to two lines
	   and a centred dot would float between them. */
	display: inline-flex; align-items: flex-start; gap: 10px;
	font-family: var(--f-body);
	font-size: var(--fs-eyebrow);
	font-weight: 600;
	letter-spacing: 0.18em;
	text-transform: uppercase;
	color: var(--gold-600);
	margin: 0 0 20px;
}
.on-dark .eyebrow { color: var(--gold-400); }
.eyebrow::before {
	content: "";
	width: 7px; height: 7px; border-radius: 50%;
	background: var(--gold-500);
	box-shadow: 0 0 0 4px var(--gold-soft);
	flex: none;
	margin-top: 0.55em; /* optically centres the dot on the first line */
}

.section-head { max-width: 46ch; margin-bottom: clamp(44px, 5vw, 72px); }
.section-head.text-center { margin-inline: auto; }
.section-head.text-center .eyebrow { justify-content: center; }
.section-head h2 { margin-bottom: 0.45em; }
.section-head p { font-size: var(--fs-lead); color: var(--i-mid); margin: 0; }

/* A heading row that keeps a "view all" action beside the title on desktop
   and stacks it underneath on narrow screens. */
.section-head-row {
	display: flex; align-items: flex-end; justify-content: space-between;
	gap: 32px; flex-wrap: wrap;
	margin-bottom: clamp(44px, 5vw, 72px);
}
.section-head-row .section-head { margin-bottom: 0; }

/* ---------- Buttons ------------------------------------------------------ */
.btn {
	position: relative;
	display: inline-flex; align-items: center; justify-content: center; gap: 10px;
	padding: 15px 28px;
	border-radius: var(--r-pill);
	border: 1px solid transparent;
	font-family: var(--f-body);
	font-size: var(--fs-sm);
	font-weight: 600;
	letter-spacing: -0.01em;
	line-height: 1;
	white-space: nowrap;
	cursor: pointer;
	isolation: isolate;
	transition: transform var(--d-fast) var(--e-out),
	            background-color var(--d-fast) var(--e-out),
	            border-color var(--d-fast) var(--e-out),
	            color var(--d-fast) var(--e-out),
	            box-shadow var(--d-fast) var(--e-out);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 17px; height: 17px; transition: transform var(--d-fast) var(--e-out); }
.btn:hover .icon-arrow-right { transform: translateX(4px); }
.btn-lg { padding: 18px 34px; font-size: var(--fs-body); }
.btn-sm { padding: 11px 20px; font-size: var(--fs-xs); }
.btn-block { width: 100%; }

.btn-gold {
	background: var(--gold-500); color: var(--ink-950); border-color: var(--gold-500);
	box-shadow: var(--sh-gold);
}
.btn-gold:hover { background: var(--gold-400); border-color: var(--gold-400); }

.btn-ink { background: var(--ink-950); color: var(--t-hi); border-color: var(--ink-950); }
.btn-ink:hover { background: var(--ink-800); border-color: var(--ink-800); }

.btn-light { background: var(--paper-100); color: var(--ink-950); border-color: var(--paper-100); }
.btn-light:hover { background: var(--gold-500); border-color: var(--gold-500); }

.btn-outline { background: transparent; color: var(--i-hi); border-color: var(--i-line-strong); }
.btn-outline:hover { border-color: var(--i-hi); background: color-mix(in srgb, var(--i-hi) 6%, transparent); }

.btn-ghost { background: transparent; color: var(--i-hi); border-color: transparent; padding-inline: 8px; }
.btn-ghost:hover { color: var(--gold-600); }
.on-dark .btn-ghost:hover { color: var(--gold-400); }

/* Text link with a rule that draws itself in from the left on hover. */
.link-underline {
	display: inline-flex; align-items: center; gap: 8px;
	font-weight: 600; color: var(--i-hi);
	padding-bottom: 3px;
	background-image: linear-gradient(var(--gold-500), var(--gold-500));
	background-size: 0% 2px;
	background-position: 0 100%;
	background-repeat: no-repeat;
	transition: background-size var(--d-mid) var(--e-out), color var(--d-fast) var(--e-out);
}
.link-underline:hover { background-size: 100% 2px; }

/* ---------- Pills, tags, badges ------------------------------------------ */
.pill {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 7px 14px;
	border-radius: var(--r-pill);
	border: 1px solid var(--i-line);
	background: color-mix(in srgb, var(--i-hi) 4%, transparent);
	font-size: var(--fs-xs); font-weight: 600; letter-spacing: -0.01em;
	color: var(--i-mid);
}
.pill .icon { width: 14px; height: 14px; color: var(--gold-500); }

.price-tag {
	font-family: var(--f-display);
	font-size: var(--fs-h3);
	font-weight: 600;
	letter-spacing: -0.03em;
	color: var(--i-hi);
}

/* ---------- Cards -------------------------------------------------------- */
.card {
	position: relative;
	background: var(--paper-100);
	border: 1px solid var(--i-line);
	border-radius: var(--r-lg);
	overflow: hidden;
	transition: transform var(--d-mid) var(--e-out),
	            box-shadow var(--d-mid) var(--e-out),
	            border-color var(--d-mid) var(--e-out);
}
.card:hover { transform: translateY(-6px); box-shadow: var(--sh-lg); border-color: var(--i-line-strong); }
.on-dark .card { background: var(--ink-850); }

/* ---------- Icons -------------------------------------------------------- */
.icon { width: 20px; height: 20px; flex: none; }
.icon-badge {
	display: grid; place-items: center;
	width: 52px; height: 52px;
	border-radius: var(--r-sm);
	background: var(--gold-soft);
	color: var(--gold-600);
	border: 1px solid var(--gold-line);
}
.on-dark .icon-badge { color: var(--gold-400); }
.icon-badge .icon { width: 24px; height: 24px; }

/* ---------- Scroll reveal ------------------------------------------------ */
/* Elements opt in with [data-reveal]; modules/reveal.js adds .is-revealed.
   The no-JS / reduced-motion path leaves them fully visible. */
[data-reveal] {
	opacity: 0;
	transform: translateY(28px);
	transition: opacity 0.9s var(--e-out), transform 0.9s var(--e-out);
	transition-delay: var(--reveal-delay, 0ms);
	will-change: opacity, transform;
}
[data-reveal="fade"] { transform: none; }
[data-reveal="left"] { transform: translateX(-32px); }
[data-reveal="right"] { transform: translateX(32px); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal="clip"] {
	opacity: 1; transform: none;
	clip-path: inset(0 0 100% 0);
	transition: clip-path 1.1s var(--e-out);
	transition-delay: var(--reveal-delay, 0ms);
}
/* The gutter is `clamp(20px, 5vw, 56px)`, so below roughly 640px it is
   narrower than the 32px sideways offset above — which lets an unrevealed
   element poke past the edge and scroll the page horizontally. Columns are
   stacked at these widths anyway, so the entrance becomes vertical. */
@media (max-width: 720px) {
	[data-reveal="left"],
	[data-reveal="right"] { transform: translateY(28px); }
}

.is-revealed { opacity: 1 !important; transform: none !important; }
/* Only the clip variant gets a clip-path. Applying one to every revealed
   element would clip anything positioned outside its box — the numbered
   markers hanging off the left of the process steps, for instance. */
[data-reveal="clip"].is-revealed { clip-path: inset(0 0 0 0) !important; }
.no-js [data-reveal],
html.reduced-motion [data-reveal] { opacity: 1; transform: none; clip-path: none; transition: none; }

/* Word-by-word headline reveal, built by modules/reveal.js */
.split-line { display: block; overflow: hidden; }
.split-word { display: inline-block; will-change: transform; }

/* ---------- Utility ------------------------------------------------------ */
.empty-state {
	padding: 48px 0; text-align: center;
	color: var(--i-low); font-style: italic;
}
.visually-flat { box-shadow: none !important; transform: none !important; }
.nowrap { white-space: nowrap; }

/* Thin gold rule used to separate stacked blocks */
.rule {
	height: 1px; border: 0; margin: 0;
	background: linear-gradient(90deg, var(--gold-line), transparent);
}

/* ---------- Editor content (the_content on Pages/Packages) --------------- */
.entry-content > *:last-child { margin-bottom: 0; }
.entry-content h2 { margin-top: 1.6em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content ul, .entry-content ol { margin: 0 0 1.1em; padding-left: 0; }
.entry-content ul li {
	position: relative; padding-left: 26px; margin-bottom: 8px;
}
.entry-content ul li::before {
	content: ""; position: absolute; left: 4px; top: 0.72em;
	width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500);
}
.entry-content ol { counter-reset: n; }
.entry-content ol li {
	position: relative; padding-left: 30px; margin-bottom: 8px; counter-increment: n;
}
.entry-content ol li::before {
	content: counter(n) "."; position: absolute; left: 0; top: 0;
	font-weight: 600; color: var(--gold-600);
}
.entry-content a { color: var(--i-hi); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gold-line); }
.entry-content a:hover { text-decoration-color: var(--gold-500); }
.entry-content img { border-radius: var(--r-md); margin-block: 1.5em; }

/* ---------- Forms (Contact Form 7) --------------------------------------- */
.form-shell label { display: block; margin-bottom: 18px; font-size: var(--fs-sm); font-weight: 600; color: var(--i-hi); }
.form-shell input[type="text"],
.form-shell input[type="email"],
.form-shell input[type="tel"],
.form-shell input[type="url"],
.form-shell select,
.form-shell textarea {
	display: block; width: 100%; margin-top: 8px;
	padding: 14px 18px;
	background: var(--paper-100);
	border: 1px solid var(--i-line-strong);
	border-radius: var(--r-sm);
	font-size: var(--fs-body); font-weight: 400; color: var(--i-hi);
	transition: border-color var(--d-fast) var(--e-out), box-shadow var(--d-fast) var(--e-out);
}
.form-shell textarea { min-height: 150px; resize: vertical; }
.form-shell input:focus, .form-shell select:focus, .form-shell textarea:focus {
	outline: none;
	border-color: var(--gold-500);
	box-shadow: 0 0 0 4px var(--gold-soft);
}
.form-shell input[type="submit"] {
	margin-top: 8px; padding: 16px 34px;
	background: var(--ink-950); color: var(--t-hi);
	border: 0; border-radius: var(--r-pill);
	font-size: var(--fs-sm); font-weight: 600; cursor: pointer;
	transition: background-color var(--d-fast) var(--e-out), transform var(--d-fast) var(--e-out);
}
.form-shell input[type="submit"]:hover { background: var(--gold-500); color: var(--ink-950); transform: translateY(-2px); }
.wpcf7-not-valid-tip { color: #d64545; font-size: var(--fs-xs); font-weight: 500; margin-top: 6px; }
.wpcf7-response-output {
	margin: 20px 0 0 !important;
	padding: 14px 18px !important;
	border-radius: var(--r-sm) !important;
	border-width: 1px !important;
	font-size: var(--fs-sm);
}
.wpcf7-spinner { display: block; margin: 12px 0 0; }

/* ---------- Reduced motion ----------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
	[data-reveal] { opacity: 1; transform: none; clip-path: none; }
}
