/* ==========================================================================
   AutoCrafterAI — Common Stylesheet
   Palette is derived from the logo: a single teal-blue brand family
   (deep -> bright cyan) on clean light neutrals. Kept intentionally simple.

   Sections:  1. Design tokens   2. Base   3. Layout   4. Buttons
              5. Header / nav     6. Hero    7. Footer    8. Responsive
   ========================================================================== */

/* 1. Design tokens ------------------------------------------------------- */
:root {
    /* Brand (from logo) */
    --brand:        #1c6c8f;   /* deep teal-blue */
    --brand-deep:   #14546f;
    --brand-bright: #18a8c8;   /* bright cyan highlight */
    --brand-tint:   rgba(24, 168, 200, 0.10);
    --brand-gradient: linear-gradient(135deg, var(--brand-deep), var(--brand-bright));

    /* Neutrals (light theme) */
    --bg-main:        #ffffff;
    --bg-soft:        #f4f8fa;
    --text-primary:   #112a33;   /* dark teal-navy */
    --text-secondary: #5d717a;
    --border:         rgba(17, 42, 51, 0.08);
    --border-soft:    rgba(17, 42, 51, 0.14);

    /* Type */
    --font-heading: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

    /* Layout */
    --container:    1200px;
    --gutter:       24px;
    --header-h:     84px;
    --radius:       12px;
    --radius-pill:  999px;

    /* Motion */
    --ease: 0.2s ease;
}

/* 2. Base ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    overflow-x: hidden;
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--bg-main);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    font-family: var(--font-heading);
    line-height: 1.15;
    margin: 0;
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--ease);
}

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

.text-accent { color: var(--brand); }

/* 3. Layout -------------------------------------------------------------- */
.container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

/* 4. Buttons ------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    line-height: 1;
    padding: 12px 20px;
    border: 1px solid transparent;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: filter var(--ease), border-color var(--ease), color var(--ease), background-color var(--ease);
}

.btn--primary {
    background-image: var(--brand-gradient);
    color: #fff;
}
.btn--primary:hover { filter: brightness(1.08); }

.btn--ghost {
    background-color: transparent;
    border-color: var(--border-soft);
    color: var(--text-primary);
}
.btn--ghost:hover {
    border-color: var(--brand);
    color: var(--brand);
}

.btn--lg {
    font-size: 16px;
    padding: 16px 28px;
}

/* 5. Header / nav -------------------------------------------------------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid transparent;
    transition: border-color var(--ease), box-shadow var(--ease);
}
.site-header.is-scrolled {
    border-bottom-color: var(--border);
    box-shadow: 0 6px 24px rgba(17, 42, 51, 0.05);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

/* Brand logo (icon + wordmark, horizontal lockup) */
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 42px; width: auto; }

.brand--footer .brand-logo { height: 48px; }

/* Nav links */
.nav {
    display: flex;
    align-items: center;
    gap: 28px;
}
.nav-link {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-secondary);
}
.nav-link:hover { color: var(--text-primary); }
.nav-link--muted { color: var(--text-secondary); }

.header-collapse {
    display: flex;
    align-items: center;
    gap: 32px;
}
.header-actions {
    display: flex;
    align-items: center;
    gap: 18px;
}

/* Hamburger toggle (hidden on desktop) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border-soft);
    border-radius: 10px;
    cursor: pointer;
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin-inline: auto;
    background-color: var(--text-primary);
    transition: transform var(--ease), opacity var(--ease);
}
.nav-toggle.is-active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-active span:nth-child(2) { opacity: 0; }
.nav-toggle.is-active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* 6. Hero ---------------------------------------------------------------- */
.hero {
    padding: clamp(64px, 12vw, 132px) 0;
    text-align: center;
    background:
        radial-gradient(62% 52% at 50% 0%, var(--brand-tint), transparent 70%),
        var(--bg-main);
}
.hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
}
.eyebrow {
    display: inline-block;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.3px;
    color: var(--brand);
    background-color: var(--brand-tint);
    border: 1px solid var(--border-soft);
    border-radius: var(--radius-pill);
}
.hero-title {
    font-size: clamp(36px, 6vw, 60px);
    font-weight: 800;
    max-width: 16ch;
    color: var(--text-primary);
}
.hero-sub {
    max-width: 60ch;
    margin: 0;
    font-size: clamp(16px, 2.2vw, 19px);
    color: var(--text-secondary);
}
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 14px;
    margin-top: 8px;
}

/* 7. Footer -------------------------------------------------------------- */
.site-footer {
    margin-top: 80px;
    padding-top: 64px;
    border-top: 1px solid var(--border);
    background-color: var(--bg-soft);
}
.footer-inner {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
    gap: clamp(32px, 4vw, 64px);
    padding-bottom: 48px;
}
.footer-brand { max-width: 360px; }
.footer-tagline {
    margin-top: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}
.footer-contact {
    display: inline-block;
    margin-top: 18px;
    font-size: 14px;
    font-weight: 600;
    color: var(--brand);
}
.footer-contact:hover { text-decoration: underline; }
.footer-heading {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--text-primary);
    margin-bottom: 16px;
}
.footer-col { display: flex; flex-direction: column; gap: 12px; }
.footer-link {
    font-size: 14px;
    color: var(--text-secondary);
}
.footer-link:hover { color: var(--brand); }

.footer-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px var(--gutter);
    border-top: 1px solid var(--border);
}
.footer-copy {
    margin: 0;
    font-size: 13px;
    text-align: center;
    color: var(--text-secondary);
}

/* 8. Responsive ---------------------------------------------------------- */
@media (max-width: 860px) {
    .nav-toggle { display: flex; }

    .header-collapse {
        position: absolute;
        top: var(--header-h);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        padding: 16px var(--gutter) 24px;
        background-color: var(--bg-main);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 12px 24px rgba(17, 42, 51, 0.06);
        transform: translateY(-12px);
        opacity: 0;
        visibility: hidden;
        transition: opacity var(--ease), transform var(--ease), visibility var(--ease);
    }
    .header-collapse.is-open {
        transform: translateY(0);
        opacity: 1;
        visibility: visible;
    }

    .nav {
        flex-direction: column;
        align-items: stretch;
        gap: 0;
    }
    .nav-link {
        padding: 14px 0;
        border-bottom: 1px solid var(--border);
    }
    .header-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-top: 18px;
    }
    .header-actions .btn { width: 100%; }

    .brand-logo { height: 36px; }

    .footer-inner {
        grid-template-columns: repeat(3, 1fr);
        gap: 32px 24px;
    }
    .footer-brand { grid-column: 1 / -1; max-width: none; }
}

@media (max-width: 520px) {
    .footer-inner { grid-template-columns: 1fr 1fr; }
}

/* Stack call-to-action buttons full-width on small phones (used site-wide) */
@media (max-width: 480px) {
    .hero-actions { flex-direction: column; align-items: stretch; }
    .hero-actions .btn { width: 100%; }
}
