/* ==========================================================================
   ApexLuxe - Luxury Exotic Car Rental & Auto Detailing Studio Template
   theme.css - Design tokens, color palettes, spacing matrix, typography
   scales, universal form reset and button design tokens.
   Author: qcomdigital
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Design tokens (CSS custom properties)
   Aesthetic: Pure Platinum Light Showroom
   -------------------------------------------------------------------------- */
:root {
  /* Color palette ---------------------------------------------------------- */
  --al-platinum: #f8fafc;            /* primary canvas */
  --al-surface: #ffffff;             /* elevated cards */
  --al-line: #e2e8f0;                /* subtle borders */
  --al-line-2: #cbd5e1;              /* strong borders */
  --al-ink: #0f172a;                 /* near-black slate ink */
  --al-ink-2: #1e293b;               /* secondary ink */
  --al-body: #475569;                /* body copy */
  --al-muted: #64748b;               /* muted copy */
  --al-gold: #f95700;                /* primary accent - amber gold */
  --al-gold-2: #c2410c;              /* deep amber gold */
  --al-gold-tint: #fff7ed;           /* amber wash */
  --al-gold-line: #fb923c;           /* amber hairline */
  --al-success: #15803d;
  --al-error: #b91c1c;
  --al-info: #0e7490;
  --al-navy: #0b1329;                /* deep midnight navy */
  --al-slate: #f1f5f9;               /* light slate wash */

  /* Typography stacks ------------------------------------------------------ */
  --font-body: "Plus Jakarta Sans", "Segoe UI", -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --font-sans: var(--font-body);
  --font-display: "Space Grotesk", "Plus Jakarta Sans", "Trebuchet MS", Arial, sans-serif;
  --font-mono: "JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", monospace;

  /* Typography scale ------------------------------------------------------- */
  --fs-xs: 0.75rem;
  --fs-sm: 0.8125rem;
  --fs-base: 0.9375rem;
  --fs-md: 1.0625rem;
  --fs-lg: 1.1875rem;
  --fs-xl: clamp(1.375rem, 2.4vw, 1.625rem);
  --fs-2xl: clamp(1.75rem, 3.4vw, 2.25rem);
  --fs-3xl: clamp(2.125rem, 4.6vw, 3rem);
  --fs-display: clamp(2.625rem, 6vw, 4.25rem);
  --fs-display-xl: clamp(3rem, 7.5vw, 5.25rem);

  /* Spacing matrix --------------------------------------------------------- */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.25rem;
  --sp-6: 1.5rem;
  --sp-8: 2rem;
  --sp-10: 2.5rem;
  --sp-12: 3rem;
  --sp-16: 4rem;
  --sp-20: 5rem;
  --sp-24: 6rem;
  --sp-section: clamp(3.25rem, 5.5vw, 5rem);

  /* Radii ------------------------------------------------------------------- */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 26px;
  --r-2xl: 32px;
  --r-pill: 999px;
  --r-full: 9999px;

  /* Elevation --------------------------------------------------------------- */
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-1: 0 1px 2px rgba(15, 23, 42, 0.05), 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-2: 0 2px 4px rgba(15, 23, 42, 0.04), 0 12px 28px -10px rgba(15, 23, 42, 0.12);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.08), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-3: 0 4px 8px rgba(15, 23, 42, 0.05), 0 28px 56px -18px rgba(15, 23, 42, 0.2);
  --shadow-gold: 0 10px 26px -10px rgba(249, 87, 0, 0.55);

  /* Motion ------------------------------------------------------------------ */
  --tr-fast: 0.16s ease;
  --tr: 0.28s cubic-bezier(0.4, 0, 0.2, 1);
  --tr-slow: 0.55s cubic-bezier(0.22, 1, 0.36, 1);

  /* Layout ------------------------------------------------------------------ */
  --container: 1280px;
  --container-pad: clamp(1.25rem, 4vw, 2.5rem);
  --header-h: 78px;

  /* Z-index ------------------------------------------------------------------ */
  --z-header: 100;
  --z-backdrop: 190;
  --z-drawer: 200;
  --z-modal: 250;
}

/* --------------------------------------------------------------------------
   2. Base reset & document
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: 1.7;
  color: var(--al-body);
  background-color: var(--al-platinum);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

img,
picture,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

svg {
  display: block;
  max-width: 100%;
}

@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;
  }
}

img {
  height: auto;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--al-ink);
  line-height: 1.12;
  font-weight: 700;
  text-wrap: balance;
}

h1 { font-size: var(--fs-display); }
h2 { font-size: var(--fs-3xl); }
h3 { font-size: var(--fs-xl); }
h4 { font-size: var(--fs-lg); }

p {
  text-wrap: pretty;
}

a {
  color: var(--al-gold-2);
  text-decoration: none;
  transition: color var(--tr-fast);
}

a:hover {
  color: var(--al-gold);
}

ul[class], ol[class] {
  list-style: none;
  padding: 0;
}

strong, b {
  color: var(--al-ink);
  font-weight: 700;
}

::selection {
  background: rgba(249, 87, 0, 0.22);
  color: var(--al-ink);
}

:focus-visible {
  outline: 2px solid var(--al-gold);
  outline-offset: 2px;
}

/* Skip link ---------------------------------------------------------------- */
.skip-link {
  position: absolute;
  top: -48px;
  left: 1rem;
  z-index: 300;
  padding: 0.6rem 1rem;
  background: var(--al-ink);
  color: #ffffff;
  border-radius: var(--r-sm);
  font-weight: 700;
  transition: top var(--tr-fast);
}

.skip-link:focus {
  top: 0.75rem;
  color: #ffffff;
}

/* Screen-reader helper ----------------------------------------------------- */
.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;
}

/* --------------------------------------------------------------------------
   3. Telemetry & display helpers
   -------------------------------------------------------------------------- */
.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.625rem;
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--al-gold-2);
}

.eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--al-gold);
}

/* --------------------------------------------------------------------------
   4. Button design tokens
   -------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  padding: 0.9rem 1.9rem;
  border: 1px solid transparent;
  border-radius: var(--r-pill);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color var(--tr), border-color var(--tr), color var(--tr),
    box-shadow var(--tr), transform var(--tr);
}

.btn .ico {
  width: 1.05em;
  height: 1.05em;
  flex: none;
  transition: transform var(--tr);
}

.btn:hover .ico {
  transform: translateX(3px);
}

.btn--gold {
  background: var(--al-gold);
  color: #ffffff;
}

.btn--gold:hover {
  background: var(--al-gold-2);
  color: #ffffff;
  box-shadow: var(--shadow-gold);
  transform: translateY(-2px);
}

.btn--dark {
  background: var(--al-ink);
  color: #ffffff;
}

.btn--dark:hover {
  background: var(--al-ink-2);
  color: #ffffff;
  box-shadow: var(--shadow-2);
  transform: translateY(-2px);
}

.btn--outline {
  background: transparent;
  border-color: var(--al-line-2);
  color: var(--al-ink);
}

.btn--outline:hover {
  border-color: var(--al-ink);
  background: var(--al-surface);
  color: var(--al-ink);
  transform: translateY(-2px);
  box-shadow: var(--shadow-1);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;
}

.btn--ghost:hover {
  background: #ffffff;
  color: var(--al-ink);
}

.btn--sm {
  padding: 0.6rem 1.3rem;
  font-size: var(--fs-sm);
}

.btn--lg {
  padding: 1.05rem 2.35rem;
  font-size: var(--fs-md);
}

.btn--block {
  width: 100%;
}

.btn[disabled],
.btn.is-disabled {
  opacity: 0.55;
  pointer-events: none;
}

.btn.is-loading {
  pointer-events: none;
  color: transparent;
  position: relative;
}

.btn.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 1.15rem;
  height: 1.15rem;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: al-spin 0.7s linear infinite;
}

@keyframes al-spin {
  to { transform: rotate(360deg); }
}

/* Inline icon sizing -------------------------------------------------------- */
.ico {
  width: 1.25rem;
  height: 1.25rem;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}

/* --------------------------------------------------------------------------
   5. Universal form reset (inputs, selects, textareas)
   Custom SVG dropdown arrow via appearance: none.
   -------------------------------------------------------------------------- */
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

.field-label {
  display: block;
  margin-bottom: 0.5rem;
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--al-ink);
}

.field {
  display: block;
  width: 100%;
  padding: 0.85rem 1.05rem;
  background: var(--al-surface);
  border: 1px solid var(--al-line-2);
  border-radius: var(--r-md);
  font-size: var(--fs-base);
  color: var(--al-ink);
  transition: border-color var(--tr), box-shadow var(--tr);
}

.field::placeholder {
  color: var(--al-muted);
}

.field:hover {
  border-color: #94a3b8;
}

.field:focus {
  outline: none;
  border-color: var(--al-gold);
  box-shadow: 0 0 0 3px rgba(249, 87, 0, 0.16);
}

.field--error,
.field[aria-invalid="true"] {
  border-color: var(--al-error);
}

.field--error:focus {
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.14);
}

textarea.field {
  min-height: 148px;
  resize: vertical;
  line-height: 1.6;
}

/* Custom dropdown arrow ------------------------------------------------------ */
select.field,
.select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  padding-right: 2.9rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 18px 18px;
  cursor: pointer;
}

select.field:focus,
.select:focus {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23b45309' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
}

/* Native accent + number spinners --------------------------------------------- */
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--al-gold);
}

input[type="number"] {
  -moz-appearance: textfield;
  appearance: textfield;
}

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

/* Autofill polish --------------------------------------------------------------- */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: var(--al-ink);
  transition: background-color 9999s ease-in-out 0s;
}

/* --------------------------------------------------------------------------
   6. Reduced motion preference
   -------------------------------------------------------------------------- */
@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;
  }
}
