/*
Theme Name: WordPress
Theme URI:
Author:
Author URI:
Description: Custom WordPress theme built with AppBuilder
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: my-theme
*/

/* =====================================================================
   DESIGN SYSTEM — Auto Repair Shop (US-001)
   Cohesive dark navy/graphite base with warm orange accents. This file
   is the foundation every other template and stylesheet consumes: it
   defines the color palette, typography scale, spacing rhythm, motion,
   and the reusable component + utility classes.

   NOTE ON ARCHITECTURE
   The theme's per-feature stylesheets already read a shared set of
   --mytheme-* custom properties (surface / ink / accent / bg / border /
   muted). We keep that contract and simply re-point those tokens to the
   new dark palette here, so flipping the scheme flips every template at
   once without touching each component file. The canonical, named tokens
   below (--color-navy, --color-orange, …) are the single source of truth;
   the --mytheme-* aliases map onto them for backwards compatibility.
   ===================================================================== */

:root {
	/* ---- Brand palette (acceptance-criteria named tokens) --------- */
	--color-navy: #1a1f2e;          /* base page background            */
	--color-navy-deep: #141824;     /* deepest bands (footer, hero)    */
	--color-graphite: #2d3142;      /* cards & raised surfaces         */
	--color-graphite-light: #363b4f;/* inputs, hovered surfaces        */
	--color-orange: #e87a2f;        /* primary warm accent             */
	--color-orange-dark: #cf6420;   /* accent hover / active           */
	--color-yellow: #f5a623;        /* secondary highlight accent      */
	--color-white: #ffffff;
	--color-light-gray: #c7ced9;    /* body copy on dark               */
	--color-muted: #94a0b2;         /* secondary / meta text on dark   */
	--color-border: rgba(255, 255, 255, 0.10); /* hairlines on dark    */
	--color-border-strong: rgba(255, 255, 255, 0.18);

	/* Semantic aliases (use these in components) */
	--color-bg: var(--color-navy);
	--color-surface: var(--color-graphite);
	--color-text: var(--color-light-gray);
	--color-heading: var(--color-white);
	--color-accent: var(--color-orange);
	--color-accent-dark: var(--color-orange-dark);

	/* ---- Typography ---------------------------------------------- */
	/* Bold display sans for headings; clean readable sans for body.
	   Named webfonts sit first so they take over once US-005 enqueues
	   them; robust system fallbacks keep the scale intact until then. */
	--font-heading: "Montserrat", "Oswald", "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	--font-body: "Open Sans", "Source Sans Pro", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

	/* Fluid type scale (mobile → desktop) */
	--text-xs: 0.75rem;                                  /* 12px */
	--text-sm: 0.875rem;                                 /* 14px */
	--text-base: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);/* 16–17px */
	--text-lg: clamp(1.125rem, 1.05rem + 0.4vw, 1.25rem);
	--text-xl: clamp(1.375rem, 1.25rem + 0.6vw, 1.5rem);
	--text-2xl: clamp(1.75rem, 1.5rem + 1vw, 2rem);
	--text-3xl: clamp(2rem, 1.6rem + 1.8vw, 2.5rem);
	--text-4xl: clamp(2.5rem, 1.9rem + 2.8vw, 3.25rem);

	--weight-regular: 400;
	--weight-medium: 600;
	--weight-bold: 700;
	--weight-black: 800;

	--leading-tight: 1.12;
	--leading-snug: 1.3;
	--leading-normal: 1.65;

	--letter-tight: -0.01em;
	--letter-wide: 0.08em;

	/* ---- Spacing scale (8px rhythm) ------------------------------ */
	--space-1: 0.25rem;
	--space-2: 0.5rem;
	--space-3: 0.75rem;
	--space-4: 1rem;
	--space-5: 1.5rem;
	--space-6: 2rem;
	--space-8: 3rem;
	--space-10: 4rem;
	--space-12: 5rem;
	--space-16: 6rem;
	--space-32: 8rem;
	--space-section: clamp(3rem, 6vw, 5.5rem); /* vertical rhythm between page sections */

	/* ---- Layout -------------------------------------------------- */
	--container-max: 1180px;
	--container-pad: clamp(1.25rem, 4vw, 2.5rem);

	/* ---- Radius & elevation -------------------------------------- */
	--radius-sm: 8px;
	--radius: 12px;
	--radius-lg: 18px;
	--radius-full: 999px;
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
	--shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
	--shadow-lg: 0 22px 50px rgba(0, 0, 0, 0.45);

	/* ---- Motion -------------------------------------------------- */
	--ease-default: cubic-bezier(0.2, 0.7, 0.3, 1);
	--duration-fast: 150ms;
	--duration-normal: 220ms;

	/* =============================================================
	   Legacy --mytheme-* aliases → re-pointed onto the dark palette.
	   Every existing component stylesheet reads these, so defining
	   them here flips the whole theme to the new scheme.
	   ============================================================= */
	--mytheme-bg: var(--color-navy);
	--mytheme-surface: var(--color-graphite);
	--mytheme-ink: var(--color-light-gray);
	--mytheme-muted: var(--color-muted);
	--mytheme-border: var(--color-border);
	--mytheme-accent: var(--color-orange);
	--mytheme-accent-dark: var(--color-orange-dark);
	--mytheme-radius: var(--radius);
	--mytheme-radius-sm: var(--radius-sm);
	--mytheme-radius-full: var(--radius-full);
	--mytheme-shadow: var(--shadow);
	--mytheme-shadow-lg: var(--shadow-lg);
	--mytheme-maxw: var(--container-max);
	--mytheme-touch: 44px;
	--mytheme-ease: var(--ease-default);
	--mytheme-duration: var(--duration-normal);
}

/* =====================================================================
   Base / global elements
   ===================================================================== */
html {
	-webkit-text-size-adjust: 100%;
	scroll-behavior: smooth;
}

body {
	margin: 0;
	font-family: var(--font-body);
	font-size: var(--text-base);
	line-height: var(--leading-normal);
	color: var(--color-text);
	background-color: var(--color-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Headings — bold display sans, tight tracking, light on dark. */
h1, h2, h3, h4, h5, h6 {
	margin: 0 0 var(--space-4);
	font-family: var(--font-heading);
	font-weight: var(--weight-black);
	line-height: var(--leading-tight);
	letter-spacing: var(--letter-tight);
	color: var(--color-heading);
}

h1 { font-size: var(--text-4xl); }
h2 { font-size: var(--text-3xl); }
h3 { font-size: var(--text-2xl); }
h4 { font-size: var(--text-xl); font-weight: var(--weight-bold); }
h5 { font-size: var(--text-lg); font-weight: var(--weight-bold); }
h6 {
	font-size: var(--text-base);
	font-weight: var(--weight-bold);
	text-transform: uppercase;
	letter-spacing: var(--letter-wide);
}

p { margin: 0 0 var(--space-4); }

ul, ol { margin: 0 0 var(--space-4); padding-left: 1.25rem; }

/* Links — orange accent with a smooth hover to the lighter warm tone. */
a {
	color: var(--color-accent);
	text-decoration: none;
	transition: color var(--duration-normal) var(--ease-default);
}

a:hover,
a:focus {
	color: var(--color-yellow);
}

strong, b { font-weight: var(--weight-bold); color: var(--color-white); }

hr {
	border: 0;
	height: 1px;
	background: var(--color-border);
	margin: var(--space-6) 0;
}

img { max-width: 100%; height: auto; }

/* Accessible, high-contrast focus ring for keyboard users on dark bg. */
:focus-visible {
	outline: 3px solid var(--color-yellow);
	outline-offset: 2px;
	border-radius: 2px;
}

::selection {
	background: var(--color-orange);
	color: var(--color-navy-deep);
}

/* =====================================================================
   Buttons — reusable, prefixed component classes
   Primary: warm orange fill, dark text, bold uppercase, hover darkens.
   Secondary / outline: transparent with an orange border only.
   ===================================================================== */
.btn,
.button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: var(--space-2);
	min-height: var(--mytheme-touch);
	padding: 0.85em 1.75em;
	font-family: var(--font-heading);
	font-size: var(--text-sm);
	font-weight: var(--weight-bold);
	line-height: 1;
	text-transform: uppercase;
	letter-spacing: var(--letter-wide);
	text-align: center;
	border: 2px solid transparent;
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: background-color var(--duration-normal) var(--ease-default),
		border-color var(--duration-normal) var(--ease-default),
		color var(--duration-normal) var(--ease-default),
		transform var(--duration-fast) var(--ease-default);
}

.btn:hover,
.button:hover { transform: translateY(-2px); }

.btn-primary,
.button {
	background-color: var(--color-orange);
	border-color: var(--color-orange);
	color: var(--color-navy-deep);
}

.btn-primary:hover,
.btn-primary:focus,
.button:hover,
.button:focus {
	background-color: var(--color-orange-dark);
	border-color: var(--color-orange-dark);
	color: var(--color-navy-deep);
}

.btn-secondary {
	background-color: var(--color-yellow);
	border-color: var(--color-yellow);
	color: var(--color-navy-deep);
}

.btn-secondary:hover,
.btn-secondary:focus {
	background-color: #dd9214;
	border-color: #dd9214;
	color: var(--color-navy-deep);
}

/* Outline / ghost variant — border only, fills on hover. */
.btn-outline {
	background-color: transparent;
	border-color: var(--color-orange);
	color: var(--color-orange);
}

.btn-outline:hover,
.btn-outline:focus {
	background-color: var(--color-orange);
	color: var(--color-navy-deep);
}

/* =====================================================================
   Form elements — dark fields, light text, orange focus ring
   ===================================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="number"],
input[type="search"],
input[type="date"],
input[type="password"],
select,
textarea {
	width: 100%;
	padding: 0.75rem 1rem;
	font-family: var(--font-body);
	font-size: var(--text-base);
	color: var(--color-white);
	background-color: var(--color-graphite-light);
	border: 1px solid var(--color-border-strong);
	border-radius: var(--radius-sm);
	transition: border-color var(--duration-normal) var(--ease-default),
		box-shadow var(--duration-normal) var(--ease-default);
}

input::placeholder,
textarea::placeholder { color: var(--color-muted); }

input:focus,
select:focus,
textarea:focus {
	outline: none;
	border-color: var(--color-orange);
	box-shadow: 0 0 0 3px rgba(232, 122, 47, 0.35);
}

label {
	display: inline-block;
	margin-bottom: var(--space-2);
	font-weight: var(--weight-medium);
	color: var(--color-white);
}

/* =====================================================================
   Layout & utility helpers
   ===================================================================== */
.container {
	width: 100%;
	max-width: var(--container-max);
	margin-inline: auto;
	padding-inline: var(--container-pad);
}

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

.section--alt { background-color: var(--color-graphite); }
.section--deep { background-color: var(--color-navy-deep); }

/* Small uppercase kicker above a heading. */
.eyebrow {
	display: inline-block;
	margin-bottom: var(--space-3);
	font-family: var(--font-heading);
	font-size: var(--text-sm);
	font-weight: var(--weight-bold);
	text-transform: uppercase;
	letter-spacing: var(--letter-wide);
	color: var(--color-orange);
}

.text-center { text-align: center; }
.text-muted { color: var(--color-muted); }
.text-accent { color: var(--color-orange); }

.card {
	background-color: var(--color-graphite);
	border: 1px solid var(--color-border);
	border-radius: var(--radius);
	box-shadow: var(--shadow-sm);
	padding: var(--space-6);
}

/* Screen-reader-only text (accessible labels without visual clutter). */
.screen-reader-text,
.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;
}

/* =====================================================================
   Responsive breakpoints
   mobile < 768px  |  tablet 768–1023px  |  desktop >= 1024px
   Type & spacing are already fluid via clamp(); these queries fine-tune
   the section rhythm at the small end.
   ===================================================================== */
@media (max-width: 767px) {
	:root {
		--space-section: clamp(2.5rem, 9vw, 3.25rem);
	}

	.card { padding: var(--space-5); }

	.btn,
	.button { width: 100%; }
}

@media (min-width: 768px) and (max-width: 1023px) {
	:root {
		--space-section: clamp(3rem, 7vw, 4.5rem);
	}
}

/* Respect users who prefer reduced motion. */
@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
	}
}
