/* ═══════════════════════════════════════════════════════════════
   SKELETON SITE -- Main Stylesheet
   
   [CHANGE-PER-CLIENT] Update the :root variables below to
   rebrand the entire site in seconds.
   ═══════════════════════════════════════════════════════════════ */

/*
   Jace Web Design (static marketing site) — image asset cheat sheet
   Paths are relative to that project’s images/ unless under demo/.
   This skeleton stylesheet does not load these by default; the list
   is for parity when porting or documenting client deliverables.

   Branding: jace_web_design_favicon.png, jace_web_design_logo.png
   Hero JPEGs: hero-workspace-960.jpg, hero-workspace-1920.jpg (<picture srcset>)
   Services scrim: section-collab-1600.jpg; @media max-width 768px → section-collab-800.jpg (#services.section-alt::before)
   Optional: section-texture.webp + class has-section-texture on .section (::before on .section.has-section-texture)
   Optional: hero-mesh.webp + class has-hero-mesh on .section-hero (::after on .section-hero.has-hero-mesh)
   circuit-grid.svg: .section-hero::before; .section.pricing-dark::before; .section-ready.cta-strip::before; body.sales-page .sales-tier-section::before
   Demo thumbnails (index demos grid): demo/book-garden/images/thumbnail.png; demo/auto-detailing/images/auto-detailing-thumbnail.png; demo/restaurant/images/thumbnail.png; demo/piano-tuning/images/thumbnail.png; demo/custom-woodworks/images/thumbnail.png; demo/escape-room/images/Tumbnail.png (filename spelling as in Jace)
   Shipped in this repo under images/: circuit-grid.svg
*/

/* ── Theme Variables ──────────────────────────────────────────── */
:root {
    /* Brand Colors */
    --color-primary: #2c3e50;
    --color-primary-light: #3d5a80;
    --color-primary-dark: #1a252f;
    --color-accent: #e67e22;
    --color-accent-hover: #d35400;

    /* Neutrals */
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-bg-dark: #2c3e50;
    --color-text: #333333;
    --color-text-light: #666666;
    --color-text-muted: #999999;
    --color-text-on-dark: #ffffff;
    --color-border: #e0e0e0;

    /* Status */
    --color-success: #27ae60;
    --color-error: #e74c3c;
    --color-warning: #f39c12;

    /* Typography */
    --font-body: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-heading: 'Segoe UI', system-ui, -apple-system, sans-serif;
    --font-size-base: 1rem;
    --line-height: 1.6;

    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 3rem;
    --space-2xl: 5rem;

    /* Layout */
    --max-width: 1200px;
    --header-height: 70px;
    --border-radius: 6px;
    --shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 4px 20px rgba(0, 0, 0, 0.15);
    --transition: 0.3s ease;
}

/* ── Reset ────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-accent);
}

ul, ol {
    list-style: none;
}

/* ── Utility ──────────────────────────────────────────────────── */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.section {
    padding: var(--space-2xl) 0;
}

.section--alt {
    background: var(--color-bg-alt);
}

.section__title {
    font-family: var(--font-heading);
    font-size: 2rem;
    color: var(--color-primary);
    margin-bottom: var(--space-lg);
    text-align: center;
}

.section__subtitle {
    text-align: center;
    color: var(--color-text-light);
    max-width: 650px;
    margin: calc(-1 * var(--space-md)) auto var(--space-xl);
}

/* ── Buttons ──────────────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: var(--border-radius);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), transform var(--transition);
    text-align: center;
    line-height: 1.4;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn--primary {
    background: var(--color-accent);
    color: #fff;
}

.btn--primary:hover {
    background: var(--color-accent-hover);
    color: #fff;
}

.btn--secondary {
    background: var(--color-primary);
    color: #fff;
}

.btn--secondary:hover {
    background: var(--color-primary-dark);
    color: #fff;
}

.btn--outline {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
}

.btn--outline:hover {
    background: var(--color-primary);
    color: #fff;
}

.btn--sm {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ── Header / Nav ─────────────────────────────────────────────── */
.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
    height: var(--header-height);
    display: flex;
    align-items: center;
    box-shadow: var(--shadow);
}

.site-header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.site-logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-primary);
}

.site-logo:hover {
    color: var(--color-primary);
}

.nav-list {
    display: flex;
    gap: var(--space-lg);
    align-items: center;
}

.nav-list a {
    font-weight: 500;
    color: var(--color-text);
    position: relative;
    padding: var(--space-xs) 0;
}

.nav-list a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width var(--transition);
}

.nav-list a:hover::after,
.nav-list a.active::after {
    width: 100%;
}

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-sm);
}

.nav-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--color-text);
    margin: 5px 0;
    transition: var(--transition);
}

/* ── Hero ─────────────────────────────────────────────────────── */
.hero {
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: var(--color-text-on-dark);
    padding: var(--space-2xl) 0;
    min-height: 50vh;
    display: flex;
    align-items: center;
}

.hero__content {
    max-width: 700px;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 5vw, 3.2rem);
    margin-bottom: var(--space-md);
    line-height: 1.2;
}

.hero__text {
    font-size: 1.15rem;
    opacity: 0.9;
    margin-bottom: var(--space-lg);
}

.hero .btn {
    margin-right: var(--space-md);
    margin-bottom: var(--space-sm);
}

/* ── Cards Grid ───────────────────────────────────────────────── */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.card {
    background: var(--color-bg);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: transform var(--transition), box-shadow var(--transition);
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
    background: var(--color-bg-alt);
}

.card__body {
    padding: var(--space-lg);
}

.card__title {
    font-size: 1.25rem;
    margin-bottom: var(--space-sm);
    color: var(--color-primary);
}

.card__text {
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

/* ── Gallery Grid ─────────────────────────────────────────────── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--space-md);
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--border-radius);
    cursor: pointer;
    aspect-ratio: 1;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition);
}

.gallery-item:hover img {
    transform: scale(1.05);
}

/* ── Lightbox ─────────────────────────────────────────────────── */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.9);
    align-items: center;
    justify-content: center;
    padding: var(--space-lg);
}

.lightbox.active {
    display: flex;
}

.lightbox img {
    max-width: 90vw;
    max-height: 85vh;
    border-radius: var(--border-radius);
}

.lightbox__close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    background: none;
    border: none;
    color: #fff;
    font-size: 2rem;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Reviews ──────────────────────────────────────────────────── */
.review-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: var(--space-lg);
}

.review-card {
    background: var(--color-bg);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    box-shadow: var(--shadow);
    position: relative;
}

.review-card__stars {
    color: var(--color-warning);
    margin-bottom: var(--space-sm);
    font-size: 1.1rem;
}

.review-card__text {
    font-style: italic;
    color: var(--color-text-light);
    margin-bottom: var(--space-md);
}

.review-card__author {
    font-weight: 600;
    color: var(--color-primary);
}

/* ── FAQ Accordion ────────────────────────────────────────────── */
.faq-list {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    border-bottom: 1px solid var(--color-border);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: var(--space-md) 0;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-text);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-md);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--color-accent);
    transition: transform var(--transition);
    flex-shrink: 0;
}

.faq-item.active .faq-question::after {
    content: '\2212';
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding-bottom: var(--space-md);
}

.faq-answer p {
    color: var(--color-text-light);
}

/* ── Contact Form ─────────────────────────────────────────────── */
.form-section {
    max-width: 700px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: var(--space-md);
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: var(--space-xs);
    color: var(--color-text);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(44, 62, 80, 0.1);
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

.form-group .error-text {
    color: var(--color-error);
    font-size: 0.875rem;
    margin-top: var(--space-xs);
    display: none;
}

.form-group.has-error input,
.form-group.has-error textarea {
    border-color: var(--color-error);
}

.form-group.has-error .error-text {
    display: block;
}

.form-message {
    padding: var(--space-md);
    border-radius: var(--border-radius);
    margin-bottom: var(--space-md);
    display: none;
}

.form-message--success {
    display: block;
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.form-message--error {
    display: block;
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed var(--color-border);
    border-radius: var(--border-radius);
    padding: var(--space-lg);
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition), background var(--transition);
}

.file-upload-area:hover,
.file-upload-area.dragover {
    border-color: var(--color-primary);
    background: var(--color-bg-alt);
}

.file-upload-area input[type="file"] {
    display: none;
}

.file-upload-area__text {
    color: var(--color-text-muted);
}

.file-preview {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-sm);
    margin-top: var(--space-sm);
}

.file-preview__item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-xs) var(--space-sm);
    background: var(--color-bg-alt);
    border-radius: var(--border-radius);
    font-size: 0.875rem;
}

.file-preview__remove {
    background: none;
    border: none;
    color: var(--color-error);
    cursor: pointer;
    font-weight: bold;
    font-size: 1rem;
    padding: 0 4px;
}

/* ── Footer ───────────────────────────────────────────────────── */
.site-footer {
    background: var(--color-bg-dark);
    color: var(--color-text-on-dark);
    padding: var(--space-xl) 0 var(--space-md);
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-lg);
}

.footer-col h4 {
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
}

.footer-col a {
    color: rgba(255, 255, 255, 0.7);
    display: block;
    padding: var(--space-xs) 0;
}

.footer-col a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: var(--space-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--space-sm);
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a {
    color: rgba(255, 255, 255, 0.5);
}

.footer-bottom a:hover {
    color: #fff;
}

/* ── Cookie Consent ───────────────────────────────────────────── */
.cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3000;
    background: var(--color-bg-dark);
    color: var(--color-text-on-dark);
    padding: var(--space-md) var(--space-lg);
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.2);
}

.cookie-banner.visible {
    display: block;
}

.cookie-banner__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.cookie-banner__text {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-banner__text a {
    color: var(--color-accent);
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    gap: var(--space-sm);
    flex-shrink: 0;
}

.cookie-banner__actions .btn {
    white-space: nowrap;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 768px) {
    :root {
        --header-height: 60px;
    }

    .nav-toggle {
        display: block;
    }

    .nav-list {
        display: none;
        position: absolute;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: var(--color-bg);
        flex-direction: column;
        padding: var(--space-md);
        gap: 0;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow);
    }

    .nav-list.open {
        display: flex;
    }

    .nav-list a {
        padding: var(--space-md) 0;
        border-bottom: 1px solid var(--color-border);
    }

    .nav-list a:last-child {
        border-bottom: none;
    }

    .hero {
        padding: var(--space-xl) 0;
        min-height: auto;
    }

    .hero__title {
        font-size: 1.8rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }

    .cookie-banner__inner {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .review-grid {
        grid-template-columns: 1fr;
    }
}
