/* ===================================
   Design Tokens
   =================================== */

:root {
    /* Colors */
    --color-background: #fafaf9;
    --color-surface: #ffffff;
    --color-text: #1c1917;
    --color-text-muted: #57534e;
    --color-border: #e7e5e4;
    --color-accent: #78716c;
    --color-accent-hover: #57534e;
    --color-accent-light: #f5f5f4;
    --color-primary: #3b82f6;  /* Blue for wizard progress */
    --color-success: #15803d;
    --color-success-light: #dcfce7;
    
    /* Strong Accent Colors */
    --color-accent-strong: #5a6c57;
    --color-accent-strong-light: #f2f4f2;

    /* Spacing Scale */
    --s-1: 0.25rem;   /* 4px */
    --s-2: 0.5rem;    /* 8px */
    --s-3: 0.75rem;   /* 12px */
    --s-4: 1rem;      /* 16px */
    --s-6: 1.5rem;    /* 24px */
    --s-8: 2rem;      /* 32px */
    --s-12: 3rem;     /* 48px */
    --s-16: 4rem;     /* 64px */
    --s-24: 6rem;     /* 96px */

    /* Typography */
    --fs-sm: 0.875rem;    /* 14px */
    --fs-base: 1rem;      /* 16px */
    --fs-lg: 1.125rem;    /* 18px */
    --fs-xl: 1.25rem;     /* 20px */
    --fs-2xl: 1.5rem;     /* 24px */
    --fs-3xl: 1.875rem;   /* 30px */
    --fs-4xl: 2.25rem;    /* 36px */

    /* Border Radius */
    --radius-sm: 0.25rem;   /* 4px */
    --radius: 0.5rem;       /* 8px */
    --radius-lg: 0.75rem;   /* 12px */

    /* Shadow */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);

    /* Layout */
    --container-max: 1200px;
    --container-padding: var(--s-6);
}

/* ===================================
   Reset & Base Styles
   =================================== */

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: var(--fs-base);
    line-height: 1.6;
    color: var(--color-text);
    background-color: var(--color-background);
}

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

a {
    color: var(--color-accent);
    text-decoration: none;
}

a:hover {
    color: var(--color-accent-hover);
}

ul {
    list-style: none;
}

/* ===================================
   Layout
   =================================== */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
}

/* ===================================
   Utility Classes
   =================================== */

.section {
    padding: var(--s-16) 0;
}

.section-muted {
    background-color: var(--color-accent-light);
}

.hero-accent {
    background: linear-gradient(to bottom, var(--color-accent-strong-light), var(--color-background));
}

.reading-wrap {
    max-width: 800px;
    margin: 0 auto;
}

.reading-block {
    border-left: 3px solid var(--color-accent-strong);
    padding-left: var(--s-6);
}

.card-highlight {
    background-color: var(--color-accent-strong-light);
    border-color: var(--color-accent-strong);
    border-left-width: 4px;
}

.cta-band {
    background-color: var(--color-accent-strong);
    color: #ffffff;
}

.cta-band h2,
.cta-band h3,
.cta-band h4,
.cta-band p {
    color: #ffffff;
}

.cta-band .btn-primary {
    background-color: #ffffff;
    color: var(--color-accent-strong);
    border-color: #ffffff;
}

.cta-band .btn-primary:hover {
    background-color: var(--color-accent-light);
    border-color: var(--color-accent-light);
    color: var(--color-accent-strong);
}

.cta-band .btn-secondary {
    background-color: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.4);
}

.cta-band .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-color: #ffffff;
    color: #ffffff;
}

.text-center {
    text-align: center;
}

.py-12 {
    padding-top: var(--s-12);
    padding-bottom: var(--s-12);
}

.my-12 {
    margin-top: var(--s-12);
    margin-bottom: var(--s-12);
}

.mb-4 {
    margin-bottom: var(--s-4);
}

.pill-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-top: var(--s-6);
}

.button-row {
    display: flex;
    justify-content: center;
    gap: var(--s-4);
    flex-wrap: wrap;
}

.section-heading {
    margin-top: var(--s-16);
}

.lead-lg {
    font-size: var(--fs-lg);
    margin-bottom: var(--s-8);
}

.lead-statement {
    font-size: var(--fs-xl);
    font-weight: 500;
    color: var(--color-text);
    text-align: center;
    margin-top: var(--s-12);
}

/* ===================================
   Typography
   =================================== */

h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
}

h1 {
    font-size: var(--fs-4xl);
    margin-bottom: var(--s-6);
}

h2 {
    font-size: var(--fs-3xl);
    margin-bottom: var(--s-6);
}

h3 {
    font-size: var(--fs-xl);
    margin-bottom: var(--s-3);
}

h4 {
    font-size: var(--fs-lg);
    margin-bottom: var(--s-2);
}

p {
    margin-bottom: var(--s-4);
    color: var(--color-text-muted);
}

p:last-child {
    margin-bottom: 0;
}

/* ===================================
   Buttons
   =================================== */

.btn {
    display: inline-block;
    padding: var(--s-3) var(--s-6);
    font-size: var(--fs-base);
    font-weight: 500;
    text-align: center;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

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

.btn-primary {
    background-color: var(--color-accent);
    color: var(--color-surface);
    border-color: var(--color-accent);
}

.btn-primary:hover {
    background-color: var(--color-accent-hover);
    border-color: var(--color-accent-hover);
    color: var(--color-surface);
}

.btn-secondary {
    background-color: transparent;
    color: var(--color-accent);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background-color: var(--color-accent-light);
    border-color: var(--color-accent);
}

.btn-lg {
    padding: var(--s-4) var(--s-8);
    font-size: var(--fs-lg);
}

/* ===================================
   Card Component
   =================================== */

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

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: var(--s-4);
    padding-bottom: var(--s-4);
    border-bottom: 1px solid var(--color-border);
}

.card-header h3 {
    margin-bottom: 0;
    font-size: var(--fs-lg);
}

/* ===================================
   Badge / Pill Component
   =================================== */

.badge {
    display: inline-block;
    padding: var(--s-1) var(--s-3);
    font-size: var(--fs-sm);
    font-weight: 500;
    border-radius: var(--radius-sm);
}

.badge-success {
    background-color: var(--color-success-light);
    color: var(--color-success);
}

.pill {
    display: inline-block;
    padding: var(--s-2) var(--s-4);
    font-size: var(--fs-sm);
    font-weight: 500;
    background-color: var(--color-accent-light);
    color: var(--color-text);
    border-radius: var(--radius);
    margin-right: var(--s-2);
}

.pill:last-child {
    margin-right: 0;
}

/* ===================================
   Header
   =================================== */

.site-header {
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    padding: var(--s-4) 0;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-6);
}

.brand {
    display: flex;
    align-items: center;
    gap: var(--s-3);
}

.brand-text {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.brand-text strong {
    font-weight: 600;
    color: var(--color-text);
}

.logo img {
    width: 160px;
    height: auto;
}

.main-nav ul {
    display: flex;
    gap: var(--s-6);
    align-items: center;
}

.main-nav a {
    color: var(--color-text);
    font-weight: 500;
    transition: color 0.2s ease;
}

.main-nav a:hover {
    color: var(--color-accent);
}

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

/* ===================================
   Hero Section
   =================================== */

.hero {
    padding: var(--s-24) 0;
    background: linear-gradient(to bottom, var(--color-surface), var(--color-background));
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-12);
    align-items: center;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: var(--fs-4xl);
    line-height: 1.1;
    margin-bottom: var(--s-6);
}

.hero-subtitle {
    font-size: var(--fs-xl);
    margin-bottom: var(--s-8);
    color: var(--color-text-muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-4);
}

/* Hero Image */

.hero-image img {
    display: block;
    width: 100%;
    height: auto;
    mask-image: radial-gradient(
        ellipse at center,
        black 60%,
        transparent 100%
    );
    -webkit-mask-image: radial-gradient(
        ellipse at center,
        black 60%,
        transparent 100%
    );
}

/* Preview Card */

.preview-card {
    max-width: 500px;
}

.preview-specs {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
    margin-bottom: var(--s-6);
}

.spec-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.spec-label {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-text-muted);
}

.spec-value {
    font-size: var(--fs-base);
    font-weight: 500;
    color: var(--color-text);
}

.preview-sections {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    margin-bottom: var(--s-6);
    padding-bottom: var(--s-6);
    border-bottom: 1px solid var(--color-border);
}

.preview-materials h4 {
    font-size: var(--fs-base);
    margin-bottom: var(--s-3);
}

.preview-materials ul {
    display: flex;
    flex-direction: column;
    gap: var(--s-3);
}

.preview-materials li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: var(--fs-sm);
}

.material-name {
    color: var(--color-text);
}

.material-qty {
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ===================================
   How It Works Section
   =================================== */

.how-it-works {
    padding: var(--s-24) 0;
}

.how-it-works h2 {
    text-align: center;
    margin-bottom: var(--s-12);
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-8);
}

.step-card {
    text-align: center;
}

.step-icon {
    color: var(--color-accent);
    margin-bottom: var(--s-4);
    display: flex;
    justify-content: center;
}

.step-card h3 {
    margin-bottom: var(--s-3);
}

.step-card p {
    max-width: 400px;
    margin: 0 auto;
}

/* ===================================
   Features Section
   =================================== */

.features {
    padding: var(--s-24) 0;
    background-color: var(--color-surface);
}

.features h2 {
    text-align: center;
    margin-bottom: var(--s-12);
}

.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-6);
}

.feature-card h3 {
    margin-bottom: var(--s-3);
}

.feature-card p {
    margin-bottom: 0;
}

/* ===================================
   Trust Strip Section
   =================================== */

.trust-strip {
    padding: var(--s-24) 0;
}

.trust-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.trust-content h2 {
    margin-bottom: var(--s-6);
}

.trust-content p {
    font-size: var(--fs-lg);
    margin-bottom: var(--s-4);
}

.disclaimer {
    font-size: var(--fs-base);
    padding: var(--s-4);
    background-color: var(--color-accent-light);
    border-radius: var(--radius);
    border-left: 3px solid var(--color-accent);
}

/* ===================================
   Footer
   =================================== */

.site-footer {
    background-color: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: var(--s-16) 0 var(--s-8);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s-8);
    margin-bottom: var(--s-8);
}

.footer-brand img {
    width: 140px;
    height: auto;
    margin-bottom: var(--s-4);
}

.footer-brand p {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.footer-links h4 {
    font-size: var(--fs-base);
    margin-bottom: var(--s-3);
}

.footer-links ul {
    display: flex;
    flex-direction: column;
    gap: var(--s-2);
}

.footer-links a {
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
}

.footer-links a:hover {
    color: var(--color-accent);
}

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

.footer-bottom {
    padding-top: var(--s-8);
    border-top: 1px solid var(--color-border);
    text-align: center;
}

.footer-bottom .copyright {
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: var(--s-3);
}

.footer-bottom .disclaimer {
    font-size: var(--fs-sm);
    background-color: transparent;
    border: none;
    padding: 0;
}

/* ===================================
   Responsive Design
   =================================== */

@media (min-width: 640px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    :root {
        --s-24: 8rem;  /* 128px on larger screens */
    }

    h1 {
        font-size: 3rem;  /* 48px */
    }

    h2 {
        font-size: 2.25rem;  /* 36px */
    }

    .hero h1 {
        font-size: 3rem;
    }

    .hero-grid {
        grid-template-columns: 1fr 1fr;
    }

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: var(--s-12);
    }

    .footer-bottom {
        display: flex;
        justify-content: space-between;
        text-align: left;
    }

    .footer-bottom .copyright,
    .footer-bottom .disclaimer {
        margin-bottom: 0;
    }
}

@media (min-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ===================================
   Focus Styles (Accessibility)
   =================================== */

*:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}

button:focus-visible,
a:focus-visible {
    outline: 2px solid var(--color-accent);
    outline-offset: 2px;
}
/* ============================================
   Stepped Wizard Styles
   ============================================ */

/* Step Progress Indicator */
.step-progress {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--s-8);
    padding: var(--s-4) 0;
    border-bottom: 2px solid var(--color-border);
}

.step-item {
    flex: 1;
    text-align: center;
    position: relative;
}

.step-item:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 16px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: var(--color-border);
    z-index: 0;
}

.step-item.completed:not(:last-child)::after {
    background: var(--color-accent-strong);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--color-surface);
    border: 2px solid var(--color-border);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    position: relative;
    z-index: 1;
    margin: 0 auto var(--s-2);
}

.step-item.active .step-number {
    background: var(--color-accent-strong);
    border-color: var(--color-accent-strong);
    color: white;
}

.step-item.completed .step-number {
    background: var(--color-accent-strong);
    border-color: var(--color-accent-strong);
    color: white;
}

.step-item.completed .step-number::before {
    content: '✓';
}

.step-label {
    font-size: var(--fs-xs);
    color: var(--color-text-muted);
    font-weight: 500;
}

.step-item.active .step-label {
    color: var(--color-text);
    font-weight: 600;
}

/* Step Content */
.step-content {
    display: none;
}

.step-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Step Navigation Buttons */
.step-navigation {
    display: flex;
    gap: var(--s-3);
    margin-top: var(--s-6);
    padding-top: var(--s-6);
    border-top: 1px solid var(--color-border);
}

.step-nav-btn {
    padding: var(--s-3) var(--s-6);
    border-radius: var(--radius);
    font-size: var(--fs-base);
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-previous {
    background: var(--color-surface);
    color: var(--color-text);
    border: 1px solid var(--color-border);
}

.btn-previous:hover {
    background: var(--color-border);
}

.btn-next {
    background: var(--color-accent-strong);
    color: white;
    margin-left: auto;
}

.btn-next:hover {
    opacity: 0.9;
}

.btn-next:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-calculate {
    background: var(--color-accent-strong);
}

.btn-calculate:hover {
    background: var(--color-accent);
}

/* Step Help Text */
.step-help {
    background: var(--color-accent-strong-light);
    border-left: 3px solid var(--color-accent-strong);
    padding: var(--s-3) var(--s-4);
    margin-bottom: var(--s-6);
    border-radius: var(--radius);
}

.step-help h4 {
    margin: 0 0 var(--s-2) 0;
    font-size: var(--fs-base);
    color: var(--color-accent-strong);
}

.step-help p {
    margin: 0;
    font-size: var(--fs-sm);
    color: var(--color-text-muted);
    line-height: 1.5;
}

/* Make step items clickable */
.step-item {
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.step-item:hover {
    opacity: 0.8;
}

.step-item:not(.active):not(.completed) {
    cursor: default;
    opacity: 0.6;
}

/* Mobile step progress */
@media (max-width: 768px) {
    .step-progress {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: var(--s-3);
    }
    
    .step-label {
        font-size: 10px;
    }
    
    .step-number {
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
    
    .step-navigation {
        flex-direction: column;
    }
    
    .btn-next {
        margin-left: 0;
        order: -1;
    }
}
