/*
 * GMC Design Tokens
 * Single source of truth for color, type, spacing, radius, and motion.
 * Derived from the Greenwell Motor Co (GMC) logo palette.
 * See /docs/design/brand-foundation.md for full rationale and usage rules.
 *
 * NOTE: This is a single visual mode - there is no light/dark theme switch.
 */

:root {
    /* Color palette (extracted from the GMC logo) */
    --gmc-black: #000000;
    --gmc-white: #ffffff;
    --gmc-off-white: #f6f6f6;
    --gmc-charcoal: #171717;

    --gmc-green: #2ebd13;
    --gmc-green-light: #2ae31b;
    --gmc-green-dark: #1f7f0d;
    --gmc-green-shadow: #041102;

    --gmc-border-on-dark: rgba(255, 255, 255, 0.12);
    --gmc-border-on-light: rgba(0, 0, 0, 0.10);

    /* Typography */
    --gmc-font-heading: 'Play', sans-serif;
    --gmc-font-body: 'Ubuntu', sans-serif;

    --gmc-fs-display: 4rem;      /* 64px */
    --gmc-fs-h1: 3rem;           /* 48px */
    --gmc-fs-h2: 2rem;           /* 32px */
    --gmc-fs-h3: 1.375rem;       /* 22px */
    --gmc-fs-body: 1rem;         /* 16px */
    --gmc-fs-caption: 0.8125rem; /* 13px */

    /* Spacing / rhythm */
    --gmc-section-padding-y: 6rem;   /* 96px desktop */
    --gmc-section-padding-y-sm: 3.5rem; /* 56px mobile */
    --gmc-container-max-width: 1200px;
    --gmc-container-gutter: 2.5rem; /* 40px tablet+ */
    --gmc-container-gutter-sm: 1.5rem; /* 24px mobile */

    /* Radius */
    --gmc-radius: 12px;
    --gmc-radius-pill: 999px;

    /* Elevation */
    --gmc-shadow-float: 0 8px 24px rgba(0, 0, 0, 0.25);

    /* Motion */
    --gmc-transition-fast: 200ms ease-out;
    --gmc-transition-slow: 400ms ease;

    /* Focus */
    --gmc-focus-ring: 2px solid var(--gmc-green-light);
    --gmc-focus-ring-offset: 2px;
}

/* Base typography using the token scale */
h1, .gmc-h1 {
    font-family: var(--gmc-font-heading);
    font-weight: 700;
    font-size: var(--gmc-fs-h1);
    line-height: 1.1;
}

h2, .gmc-h2 {
    font-family: var(--gmc-font-heading);
    font-weight: 700;
    font-size: var(--gmc-fs-h2);
    line-height: 1.15;
}

h3, .gmc-h3 {
    font-family: var(--gmc-font-heading);
    font-weight: 700;
    font-size: var(--gmc-fs-h3);
    line-height: 1.25;
}

.gmc-display {
    font-family: var(--gmc-font-heading);
    font-weight: 700;
    font-size: var(--gmc-fs-display);
    line-height: 1.05;
}

.gmc-eyebrow {
    font-family: var(--gmc-font-body);
    font-size: var(--gmc-fs-caption);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--gmc-green);
}

/* Prominent eyebrow used as a page heading (e.g. Finance page) */
.gmc-eyebrow-lg {
    font-size: var(--gmc-fs-h2);
    line-height: 1.15;
}

/* Section band alternation helpers */
.gmc-band {
    padding-top: var(--gmc-section-padding-y-sm);
    padding-bottom: var(--gmc-section-padding-y-sm);
}

@media (min-width: 768px) {
    .gmc-band {
        padding-top: var(--gmc-section-padding-y);
        padding-bottom: var(--gmc-section-padding-y);
    }
}

.gmc-band-light {
    background-color: var(--gmc-off-white);
    color: var(--gmc-black);
}

.gmc-band-dark {
    background-color: var(--gmc-black);
    color: var(--gmc-white);
}

.gmc-band-charcoal {
    background-color: var(--gmc-charcoal);
    color: var(--gmc-white);
}

/* Card surface following the thin-border, minimal style */
.gmc-card {
    border-radius: var(--gmc-radius);
    border: 1px solid var(--gmc-border-on-light);
    background-color: var(--gmc-white);
    color: var(--gmc-black);
    transition: transform var(--gmc-transition-fast), border-color var(--gmc-transition-fast);
}

.gmc-band-dark .gmc-card,
.gmc-band-charcoal .gmc-card {
    border-color: var(--gmc-border-on-dark);
    background-color: rgba(255, 255, 255, 0.04);
    color: var(--gmc-white);
}

/* Hover lift is opt-in so only genuinely clickable stock cards move. */
.gmc-card-interactive:hover {
    transform: translateY(-4px);
    border-color: var(--gmc-green);
}

/* Consistent internal padding for cards that contain text. */
.gmc-card .card-body {
    padding: 1.5rem;
}

/* Buttons */
.gmc-btn {
    border-radius: var(--gmc-radius);
    font-family: var(--gmc-font-body);
    font-weight: 700;
    transition: background-color var(--gmc-transition-fast), color var(--gmc-transition-fast), border-color var(--gmc-transition-fast);
}

.gmc-btn-primary {
    background-color: var(--gmc-green);
    color: var(--gmc-black);
    border: 1px solid var(--gmc-green);
}

.gmc-btn-primary:hover {
    background-color: var(--gmc-green-light);
    border-color: var(--gmc-green-light);
}

.gmc-btn-outline {
    background-color: transparent;
    border: 1px solid currentColor;
    color: inherit;
}

.gmc-btn-outline:hover {
    background-color: rgba(46, 189, 19, 0.10);
    border-color: var(--gmc-green);
}

/* Accessible focus states, all surfaces */
a:focus-visible,
button:focus-visible,
.gmc-btn:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: var(--gmc-focus-ring);
    outline-offset: var(--gmc-focus-ring-offset);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.001ms !important;
        animation-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
