/* ==========================================================================
   FrugalText Design System V2
   Clean, utilitarian eCommerce. Product-forward, photo-driven.
   ========================================================================== */

:root {
    /* Colors - Primary */
    --color-primary: #3A78CA;
    --color-primary-dark: #2D5FA3;
    --color-primary-light: #5B93D5;
    --color-primary-lightest: #E8F0FA;

    /* Colors - Secondary (Navy) */
    --color-secondary: #041E42;
    --color-secondary-light: #0A3264;
    --color-secondary-lighter: #163D6B;

    /* Colors - Accent (Teal) */
    --color-accent: #0D9488;
    --color-accent-light: #14B8A6;
    --color-accent-dark: #0A766C;
    --color-accent-lightest: #E6F7F5;

    /* Neutrals */
    --color-neutral-900: #0F172A;
    --color-neutral-800: #1E293B;
    --color-neutral-700: #334155;
    --color-neutral-600: #475569;
    --color-neutral-500: #64748B;
    --color-neutral-400: #94A3B8;
    --color-neutral-300: #CBD5E1;
    --color-neutral-200: #E2E8F0;
    --color-neutral-100: #F1F5F9;
    --color-neutral-50: #F8FAFC;
    --color-white: #FFFFFF;

    /* Semantic */
    --color-success: #16A34A;
    --color-warning: #F59E0B;
    --color-error: #DC2626;

    /* Typography */
    --font-heading: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

    /* Type Scale */
    --text-hero: clamp(2.5rem, 5vw, 4rem);
    --text-h1: clamp(2.25rem, 4vw, 3.5rem);
    --text-h2: clamp(1.75rem, 3vw, 2.5rem);
    --text-h3: clamp(1.25rem, 2vw, 1.5rem);
    --text-h4: clamp(1.125rem, 1.5vw, 1.25rem);
    --text-body: 1rem;
    --text-body-lg: 1.125rem;
    --text-small: 0.875rem;
    --text-xs: 0.75rem;

    /* Spacing */
    --space-section: clamp(64px, 8vw, 96px);
    --space-section-sm: clamp(40px, 5vw, 64px);
    --space-container: min(92%, 1200px);
    --space-container-narrow: min(92%, 800px);
    --space-gap: 24px;
    --space-gap-lg: 40px;
    --space-cta-above: 48px;

    /* Shadows - Subtle, navy-tinted */
    --shadow-sm: 0 1px 3px rgba(4, 30, 66, 0.06), 0 1px 2px rgba(4, 30, 66, 0.04);
    --shadow-md: 0 4px 12px rgba(4, 30, 66, 0.08), 0 2px 4px rgba(4, 30, 66, 0.04);
    --shadow-lg: 0 8px 24px rgba(4, 30, 66, 0.1), 0 4px 8px rgba(4, 30, 66, 0.05);
    --shadow-card-hover: 0 12px 32px rgba(4, 30, 66, 0.12), 0 4px 8px rgba(4, 30, 66, 0.06);

    /* Border Radius */
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    --radius-pill: 9999px;

    /* Transitions */
    --ease-spring: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out: cubic-bezier(0.0, 0.0, 0.2, 1);
    --duration-fast: 200ms;
    --duration-normal: 300ms;

    /* Header */
    --header-height: 68px;
}


/* ---------- Reset ---------- */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-body);
    font-size: var(--text-body);
    font-weight: 400;
    line-height: 1.6;
    color: var(--color-neutral-800);
    background-color: var(--color-white);
    overflow-x: hidden;
}

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

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--duration-fast) var(--ease-out);
}

a:hover {
    color: var(--color-primary-dark);
}

a:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

ul, ol {
    list-style: none;
}

button {
    cursor: pointer;
    border: none;
    background: none;
    font-family: inherit;
}

input, textarea, select {
    font-family: inherit;
    font-size: inherit;
}


/* ---------- Typography ---------- */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-secondary);
    line-height: 1.2;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

h1 { font-size: var(--text-h1); font-weight: 700; }
h2 { font-size: var(--text-h2); font-weight: 600; }
h3 { font-size: var(--text-h3); font-weight: 600; }
h4 { font-size: var(--text-h4); font-weight: 600; }

p {
    max-width: 65ch;
    line-height: 1.65;
}


/* ---------- Container ---------- */
.container {
    width: var(--space-container);
    margin-left: auto;
    margin-right: auto;
}

.container--narrow {
    width: var(--space-container-narrow);
    margin-left: auto;
    margin-right: auto;
}


/* ---------- Buttons ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: var(--text-small);
    line-height: 1;
    padding: 12px 24px;
    border-radius: var(--radius-md);
    transition: background-color var(--duration-fast) var(--ease-out),
                transform var(--duration-fast) var(--ease-spring),
                box-shadow var(--duration-fast) var(--ease-out);
    text-decoration: none;
    white-space: nowrap;
    border: none;
    cursor: pointer;
}

.btn:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.btn--primary {
    background-color: var(--color-primary);
    color: var(--color-white);
}

.btn--primary:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-white);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn--primary:active {
    transform: translateY(0);
}

.btn--secondary {
    background-color: var(--color-secondary);
    color: var(--color-white);
}

.btn--secondary:hover {
    background-color: var(--color-secondary-light);
    color: var(--color-white);
    transform: translateY(-1px);
}

.btn--lg {
    font-size: var(--text-body);
    padding: 16px 32px;
}


/* ---------- Stars ---------- */
.stars {
    display: inline-flex;
    gap: 2px;
    color: #F59E0B;
}

.stars svg {
    width: 16px;
    height: 16px;
    fill: currentColor;
}


/* ---------- Screen Reader Only ---------- */
.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;
}


/* ---------- Scroll Reveal ---------- */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s var(--ease-spring),
                transform 0.5s var(--ease-spring);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay-1 { transition-delay: 80ms; }
.reveal--delay-2 { transition-delay: 160ms; }
.reveal--delay-3 { transition-delay: 240ms; }
.reveal--delay-4 { transition-delay: 320ms; }
.reveal--delay-5 { transition-delay: 400ms; }
.reveal--delay-6 { transition-delay: 480ms; }
.reveal--delay-7 { transition-delay: 560ms; }
.reveal--delay-8 { transition-delay: 640ms; }
