/* CompliChef Lite — Website Styles */

:root {
    --green:      #1a4a3a;
    --green-dark: #112e24;
    --green-light:#2d6b55;
    --amber:      #e8922a;
    --amber-light:#f0a84a;
    --pass:       #28a745;
    --fail:       #d9534f;
    --white:      #ffffff;
    --grey-light: #f5f5f5;
    --grey:       #e0e0e0;
    --text:       #222222;
    --text-light: #666666;
    --radius:     12px;
    --radius-lg:  20px;
    --shadow:     0 4px 24px rgba(0,0,0,0.08);
    --shadow-lg:  0 8px 40px rgba(0,0,0,0.12);
}

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

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: var(--text);
    background: var(--white);
    line-height: 1.6;
}

/* ── Typography ─────────────────────────────────────────────────────────── */

h1, h2, h3, h4 { font-weight: 700; line-height: 1.2; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: 1.25rem; }

p { margin-bottom: 1rem; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── Layout ─────────────────────────────────────────────────────────────── */

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 24px;
}

.section { padding: 80px 0; }
.section--grey { background: var(--grey-light); }
.section--green { background: var(--green); color: var(--white); }

/* ── Navbar ─────────────────────────────────────────────────────────────── */

.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    border-bottom: 1px solid var(--grey);
    padding: 0 24px;
}

.navbar__inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.navbar__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--green);
    text-decoration: none;
}

.navbar__logo-icon {
    width: 34px;
    height: 34px;
    background: var(--green);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.navbar__links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.navbar__links a {
    color: var(--text-light);
    font-size: 0.95rem;
    transition: color 0.2s;
}

.navbar__links a:hover { color: var(--green); text-decoration: none; }

.navbar__toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

.navbar__toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.navbar__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.navbar__toggle.active span:nth-child(2) {
    opacity: 0;
}

.navbar__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* ── Buttons ─────────────────────────────────────────────────────────────── */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    border: none;
    transition: transform 0.15s, opacity 0.15s;
    text-decoration: none;
}

.btn:hover { transform: translateY(-1px); opacity: 0.92; text-decoration: none; }
.btn:active { transform: translateY(0); }

.btn--primary   { background: var(--green);  color: white; }
.btn--amber     { background: var(--amber);  color: white; }
.btn--outline   { background: transparent; color: var(--green); border: 2px solid var(--green); }
.btn--outline-white { background: transparent; color: white; border: 2px solid white; }
.btn--sm        { padding: 10px 20px; font-size: 0.9rem; }
.btn--lg        { padding: 18px 36px; font-size: 1.1rem; }

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
    background: var(--green);
    color: white;
    padding: 100px 24px;
    text-align: center;
}

.hero__badge {
    display: inline-block;
    background: var(--amber);
    color: white;
    padding: 4px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.hero h1 { color: white; margin-bottom: 20px; }

.hero__sub {
    font-size: 1.2rem;
    opacity: 0.85;
    max-width: 600px;
    margin: 0 auto 40px;
}

.hero__ctas {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.hero__app-badges {
    margin-top: 48px;
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

.app-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.25);
    color: white;
    padding: 12px 22px;
    border-radius: var(--radius);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    transition: background 0.2s;
}

.app-badge:hover { background: rgba(255,255,255,0.2); text-decoration: none; color: white; }

/* ── Features grid ────────────────────────────────────────────────────── */

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 28px;
    margin-top: 48px;
}

.feature-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 32px;
    box-shadow: var(--shadow);
    transition: transform 0.2s, box-shadow 0.2s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.feature-card__icon {
    width: 56px;
    height: 56px;
    background: var(--green);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 26px;
    margin-bottom: 20px;
}

.feature-card h3 { margin-bottom: 10px; }
.feature-card p  { color: var(--text-light); margin: 0; font-size: 0.95rem; }

/* ── Pricing ─────────────────────────────────────────────────────────── */

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 28px;
    max-width: 720px;
    margin: 48px auto 0;
}

.pricing-grid--single {
    grid-template-columns: 1fr;
    max-width: 480px;
}

.pricing-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 36px;
    box-shadow: var(--shadow);
    position: relative;
    border: 2px solid transparent;
    transition: border-color 0.2s;
}

.pricing-card--featured { border-color: var(--amber); }

.pricing-card__badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--amber);
    color: white;
    padding: 4px 16px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
}

.pricing-card__trial {
    background: var(--green);
    color: white;
    display: inline-block;
    padding: 3px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.pricing-card__price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--green);
    line-height: 1;
}

.pricing-card__period {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-bottom: 24px;
}

.pricing-card__features { list-style: none; margin-bottom: 28px; }
.pricing-card__features li {
    padding: 6px 0;
    font-size: 0.95rem;
    color: var(--text-light);
    display: flex;
    align-items: center;
    gap: 10px;
}

.pricing-card__features li::before {
    content: "✓";
    color: var(--pass);
    font-weight: 700;
    flex-shrink: 0;
}

/* ── How it works ─────────────────────────────────────────────────────── */

.steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 40px;
    margin-top: 48px;
    counter-reset: step;
}

.step {
    text-align: center;
    padding: 32px 20px;
}

.step__number {
    width: 56px;
    height: 56px;
    background: var(--green);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
    margin: 0 auto 20px;
}

.step h3 { margin-bottom: 10px; }
.step p  { color: var(--text-light); font-size: 0.95rem; }

/* ── FAQ ─────────────────────────────────────────────────────────────── */

.faq { max-width: 760px; margin: 48px auto 0; }

.faq-item {
    border-bottom: 1px solid var(--grey);
    overflow: hidden;
}

.faq-item__question {
    width: 100%;
    background: none;
    border: none;
    text-align: left;
    padding: 20px 0;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.faq-item__question::after {
    content: "+";
    font-size: 1.4rem;
    color: var(--green);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.faq-item.open .faq-item__question::after { transform: rotate(45deg); }

.faq-item__answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.7;
}

.faq-item.open .faq-item__answer { max-height: 400px; }
.faq-item__answer-inner { padding: 0 0 20px; }

/* ── Footer ──────────────────────────────────────────────────────────── */

.footer {
    background: var(--green-dark);
    color: rgba(255,255,255,0.7);
    padding: 60px 24px 32px;
}

.footer__grid {
    max-width: 1120px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 48px;
}

.footer__brand { color: white; font-weight: 700; font-size: 1.1rem; margin-bottom: 12px; }
.footer__brand-sub { font-size: 0.9rem; line-height: 1.6; }

.footer__col h4 { color: white; margin-bottom: 16px; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer__col ul { list-style: none; }
.footer__col li { margin-bottom: 10px; }
.footer__col a  { color: rgba(255,255,255,0.6); font-size: 0.9rem; transition: color 0.2s; }
.footer__col a:hover { color: white; text-decoration: none; }

.footer__bottom {
    max-width: 1120px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    font-size: 0.85rem;
}

/* ── Section headings ────────────────────────────────────────────────── */

.section-header {
    text-align: center;
    margin-bottom: 8px;
}

.section-header__eyebrow {
    color: var(--amber);
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 12px;
    display: block;
}

.section-header__sub {
    color: var(--text-light);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ── Page headers (inner pages) ──────────────────────────────────────── */

.page-hero {
    background: var(--green);
    color: white;
    padding: 60px 24px;
    text-align: center;
}

.page-hero h1 { color: white; margin-bottom: 12px; }
.page-hero p  { opacity: 0.8; max-width: 600px; margin: 0 auto; }

/* ── Prose content ───────────────────────────────────────────────────── */

.prose {
    max-width: 760px;
    margin: 0 auto;
    padding: 60px 24px;
}

.prose h2 { margin-top: 40px; margin-bottom: 16px; }
.prose h3 { margin-top: 28px; margin-bottom: 10px; color: var(--green); }
.prose ul, .prose ol { padding-left: 24px; margin-bottom: 16px; }
.prose li { margin-bottom: 6px; }

/* ── Admin / Install ─────────────────────────────────────────────────── */

.admin-layout {
    display: grid;
    grid-template-columns: 220px 1fr;
    min-height: 100vh;
}

.admin-sidebar {
    background: var(--green);
    padding: 24px;
    position: relative;
}

.admin-sidebar__logo {
    color: white;
    font-weight: 700;
    font-size: 1rem;
    margin-bottom: 32px;
    display: block;
}

.admin-sidebar__toggle {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1000;
}

.admin-sidebar__toggle span {
    width: 24px;
    height: 2px;
    background: white;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}

.admin-sidebar__toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(10px, 10px);
}

.admin-sidebar__toggle.active span:nth-child(2) {
    opacity: 0;
}

.admin-sidebar__toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

.admin-sidebar__nav {
    list-style: none;
    display: flex;
    flex-direction: column;
}

.admin-sidebar__nav li { margin-bottom: 4px; }
.admin-sidebar__nav a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: rgba(255,255,255,0.7);
    font-size: 0.9rem;
    transition: background 0.15s, color 0.15s;
    text-decoration: none;
}
.admin-sidebar__nav a:hover,
.admin-sidebar__nav a.active {
    background: rgba(255,255,255,0.12);
    color: white;
}

.admin-main { padding: 32px; background: var(--grey-light); }
.admin-main h1 { font-size: 1.5rem; margin-bottom: 24px; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 32px; }

.stat-card {
    background: white;
    border-radius: var(--radius);
    padding: 20px 24px;
    box-shadow: var(--shadow);
}

.stat-card__value { font-size: 2rem; font-weight: 800; color: var(--green); }
.stat-card__label { font-size: 0.85rem; color: var(--text-light); margin-top: 4px; }

.table-container {
    background: white;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
}

table { width: 100%; border-collapse: collapse; }
thead { background: var(--grey-light); }
th, td { padding: 12px 16px; text-align: left; font-size: 0.9rem; border-bottom: 1px solid var(--grey); }
th { font-weight: 600; color: var(--text-light); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 600;
}

.badge--pass     { background: #d4edda; color: #155724; }
.badge--fail     { background: #f8d7da; color: #721c24; }
.badge--amber    { background: #fff3cd; color: #856404; }
.badge--grey     { background: var(--grey); color: var(--text-light); }

/* ── Forms ───────────────────────────────────────────────────────────── */

.form-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    box-shadow: var(--shadow-lg);
    max-width: 480px;
    margin: 60px auto;
}

.form-card h2 { margin-bottom: 8px; }
.form-card .sub { color: var(--text-light); margin-bottom: 28px; }

.field { margin-bottom: 20px; }
.field label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; }
.field input, .field select, .field textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--grey);
    border-radius: var(--radius);
    font-size: 1rem;
    color: var(--text);
    background: white;
    transition: border-color 0.2s;
    outline: none;
}
.field input:focus, .field select:focus, .field textarea:focus {
    border-color: var(--green);
}

.field-hint { font-size: 0.8rem; color: var(--text-light); margin-top: 4px; }
.field-error { font-size: 0.85rem; color: var(--fail); margin-top: 4px; }

.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 0.9rem;
}
.alert--error   { background: #fde8e7; color: #c0392b; border-left: 4px solid var(--fail); }
.alert--success { background: #d4f5e0; color: #155724; border-left: 4px solid var(--pass); }
.alert--info    { background: #e8f4fd; color: #0c5460; border-left: 4px solid #17a2b8; }

/* ── Install wizard ──────────────────────────────────────────────────── */

.install-card {
    max-width: 640px;
    margin: 60px auto;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.install-card__header {
    background: var(--green);
    color: white;
    padding: 32px 40px;
}

.install-card__body { padding: 40px; }

.install-steps { display: flex; gap: 8px; margin-bottom: 32px; }
.install-step {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: var(--grey);
}
.install-step.done    { background: var(--pass); }
.install-step.current { background: var(--amber); }

/* ── Cookie Banner ───────────────────────────────────────────────────── */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--green-dark);
    color: white;
    padding: 20px 24px;
    box-shadow: 0 -4px 12px rgba(0,0,0,0.15);
    z-index: 99;
    display: flex;
    align-items: center;
    gap: 20px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.cookie-banner.show {
    max-height: 200px;
}

.cookie-banner__content {
    flex: 1;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-banner__content p {
    margin: 0;
}

.cookie-banner__content a {
    color: var(--amber);
    text-decoration: underline;
}

.cookie-banner__actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

.cookie-banner__btn {
    padding: 10px 20px;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    transition: opacity 0.2s;
}

.cookie-banner__btn:hover {
    opacity: 0.9;
}

.cookie-banner__btn--accept {
    background: var(--amber);
    color: white;
}

.cookie-banner__btn--decline {
    background: rgba(255,255,255,0.2);
    color: white;
}

/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 768px) {
    html { font-size: 14px; }

    .navbar__toggle { display: flex; }

    .cookie-banner {
        flex-direction: column;
        gap: 16px;
        align-items: flex-start;
    }

    .cookie-banner.show {
        max-height: 300px;
    }

    .cookie-banner__actions {
        width: 100%;
    }

    .cookie-banner__btn {
        flex: 1;
    }

    .navbar__links {
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        gap: 0;
        border-bottom: 1px solid var(--grey);
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .navbar__links.active {
        max-height: 400px;
    }

    .navbar__links li {
        border-bottom: 1px solid var(--grey);
    }

    .navbar__links a {
        display: block;
        padding: 16px 24px;
    }

    /* Admin mobile styles */
    .admin-layout {
        grid-template-columns: 1fr;
    }

    .admin-sidebar {
        position: relative;
        padding-top: 60px;
    }

    .admin-sidebar__toggle {
        display: flex;
    }

    .admin-sidebar__nav {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
    }

    .admin-sidebar__nav.active {
        max-height: 500px;
    }

    .admin-sidebar__logo {
        margin-bottom: 0;
        font-size: 0.9rem;
    }

    .footer__grid  { grid-template-columns: 1fr; }
    .hero { padding: 60px 24px; }
    .section { padding: 56px 0; }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin-left: auto; margin-right: auto; }
}
