/* ═══════════════════════════════════════════════════════
   TOM.COOL — Fresh Design System
   Inspired by Frankli: calm, human-first, approachable
   ═══════════════════════════════════════════════════════ */

/* ── Google Fonts loaded in HTML ── */

/* ── 1. TOKENS ── */
:root {
    --primary: #1B3A4B;
    --primary-light: #2a5468;
    --secondary: #E8845C;
    --secondary-dark: #c96d42;
    --surface: #F7F5F0;
    --surface-dim: #EDEAE4;
    --white: #ffffff;
    --text: #1B3A4B;
    --text-muted: #6B7B8D;
    --outline: #D0CCC4;
    --mint: #D4EDE1;
    --peach: #FAE0D4;
    --lavender: #E8E0F0;
    --font-serif: 'Literata', Georgia, serif;
    --font-sans: 'Inter', system-ui, sans-serif;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 9999px;
    --max-w: 1140px;
    --max-w-narrow: 720px;
    --section-py: clamp(64px, 8vw, 120px);
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── 2. RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font-sans);
    color: var(--text);
    background: var(--surface);
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ── 3. TYPOGRAPHY ── */
h1, h2, h3, h4 {
    font-family: var(--font-serif);
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); font-weight: 600; }
h4 { font-size: 1rem; font-weight: 600; }
p { color: var(--text-muted); max-width: 60ch; }
.accent { color: var(--secondary); }
.label {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--secondary);
}

/* ── 4. LAYOUT ── */
.container { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.container-narrow { max-width: var(--max-w-narrow); margin: 0 auto; padding: 0 24px; }
.section { padding: var(--section-py) 0; }
.section-teal { background: var(--primary); color: rgba(255,255,255,0.85); }
.section-teal h2, .section-teal h3, .section-teal h4 { color: #fff; }
.section-teal p { color: rgba(255,255,255,0.7); }
.section-teal .feature-item { color: rgba(255,255,255,0.85); }
.section-teal .feature-item strong { color: #fff; }
.section-teal .feature-item p { color: rgba(255,255,255,0.65); }
.section-teal .feature-item .check { color: #FAE0D4; }
.section-teal .label { color: var(--peach); }
.section-peach .feature-item { color: var(--text); }
.section-mint { background: var(--mint); }
.section-peach { background: var(--peach); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 32px; align-items: center; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-3 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .grid-4 { grid-template-columns: 1fr; }
}
.text-center { text-align: center; }
.mx-auto { margin-left: auto; margin-right: auto; }

/* ── 5. NAVIGATION ── */
.nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 100;
    background: rgba(247,245,240,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.04);
    transition: box-shadow 0.3s var(--ease);
}
.nav.scrolled { box-shadow: 0 1px 12px rgba(0,0,0,0.05); }
.nav-inner {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    height: 64px;
    gap: 32px;
}
.nav-logo {
    display: flex; align-items: center; gap: 8px;
    font-family: var(--font-serif);
    font-weight: 700; font-size: 1.15rem;
    color: var(--primary);
    flex-shrink: 0;
}
.nav-logo img { height: 28px; width: 28px; border-radius: 6px; }
.nav-logo:hover { color: var(--secondary); }
.nav-links {
    display: flex; align-items: center; gap: 4px;
    flex: 1; justify-content: center;
}
.nav-links a {
    padding: 8px 14px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: color 0.2s, background 0.2s;
}
.nav-links a:hover { color: var(--text); }
.nav-links a.active { color: var(--text); font-weight: 600; }
.nav-cta {
    padding: 10px 24px;
    background: var(--secondary);
    color: #fff;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.88rem;
    transition: background 0.2s, transform 0.2s;
    flex-shrink: 0;
}
.nav-cta:hover { background: var(--secondary-dark); transform: translateY(-1px); }

/* Hamburger */
.nav-hamburger {
    display: none;
    width: 40px; height: 40px;
    background: var(--primary);
    border: none; border-radius: var(--radius-sm);
    color: #fff; font-size: 1.2rem;
    cursor: pointer; align-items: center; justify-content: center;
}
@media (max-width: 768px) {
    .nav-links, .nav-cta { display: none; }
    .nav-hamburger { display: flex; margin-left: auto; }
}

/* Mobile drawer */
.drawer-backdrop {
    position: fixed; inset: 0; background: rgba(27,58,75,0.3);
    z-index: 200; opacity: 0; pointer-events: none;
    transition: opacity 0.3s;
}
.drawer-backdrop.active { opacity: 1; pointer-events: auto; }
.drawer {
    position: fixed; top: 0; right: -320px; width: 300px; max-width: 85vw;
    height: 100vh; background: var(--surface); z-index: 201;
    padding: 24px; overflow-y: auto;
    transition: right 0.3s var(--ease);
    box-shadow: -8px 0 32px rgba(0,0,0,0.08);
}
.drawer.active { right: 0; }
.drawer-close {
    width: 36px; height: 36px; background: transparent;
    border: 1px solid var(--outline); border-radius: var(--radius-sm);
    color: var(--text-muted); font-size: 1.1rem;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    margin-left: auto; margin-bottom: 24px;
}
.drawer-section { margin-bottom: 24px; }
.drawer-section h4 {
    font-family: var(--font-sans);
    font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: var(--text-muted); margin-bottom: 8px;
}
.drawer-section a {
    display: block; padding: 10px 12px;
    font-size: 0.92rem; color: var(--text);
    border-radius: var(--radius-sm);
    transition: background 0.2s;
}
.drawer-section a:hover { background: rgba(27,58,75,0.04); color: var(--secondary); }
.drawer-cta {
    display: block; text-align: center;
    padding: 12px; background: var(--secondary);
    color: #fff; border-radius: var(--radius-pill);
    font-weight: 600; margin-top: 16px;
}

/* ── 6. BUTTONS ── */
.btn {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 14px 32px; border: none; border-radius: var(--radius-pill);
    font-family: var(--font-sans); font-weight: 600; font-size: 0.95rem;
    cursor: pointer; transition: all 0.25s var(--ease);
    text-decoration: none;
}
.btn-primary { background: var(--secondary); color: #fff; }
.btn-primary:hover { background: var(--secondary-dark); transform: translateY(-2px); box-shadow: 0 4px 16px rgba(232,132,92,0.25); }
.btn-outline { background: transparent; color: var(--primary); border: 2px solid var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }
.btn-white { background: #fff; color: var(--primary); }
.btn-white:hover { background: var(--surface-dim); transform: translateY(-2px); }
.btn-group { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }

/* ── 7. CARDS ── */
.card {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: box-shadow 0.3s var(--ease), transform 0.3s var(--ease);
}
.card:hover {
    box-shadow: 0 8px 32px rgba(27,58,75,0.06);
    transform: translateY(-4px);
}
.card-icon {
    width: 48px; height: 48px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    background: var(--peach);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}
.card-icon.mint { background: var(--mint); }
.card-icon.lavender { background: var(--lavender); }
.card h3 { margin-bottom: 8px; }
.card p { font-size: 0.92rem; }

/* ── 8. HERO ── */
.hero {
    padding-top: calc(64px + var(--section-py));
    padding-bottom: var(--section-py);
}
.hero-content { max-width: 560px; }
.hero-content h1 { margin-bottom: 16px; }
.hero-content p { font-size: 1.1rem; line-height: 1.7; margin-bottom: 8px; }
.hero-image { display: flex; align-items: center; justify-content: center; }
.hero-image img { max-height: 400px; object-fit: contain; }

/* ── 9. STATS BAR ── */
.stats-bar {
    display: flex; gap: 48px; flex-wrap: wrap;
    padding: 32px 0;
    border-top: 1px solid var(--outline);
    border-bottom: 1px solid var(--outline);
    justify-content: center;
}
.stat { text-align: center; }
.stat-value { font-family: var(--font-serif); font-size: 1.8rem; font-weight: 700; color: var(--primary); }
.stat-label { font-size: 0.82rem; color: var(--text-muted); margin-top: 2px; }

/* ── 10. TESTIMONIALS ── */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.testimonial {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: var(--radius-lg);
    padding: 28px;
}
.testimonial-stars { color: #FBBC05; font-size: 0.9rem; margin-bottom: 12px; letter-spacing: 2px; }
.testimonial blockquote { font-size: 0.95rem; color: var(--text); line-height: 1.7; font-style: italic; margin-bottom: 16px; }
.testimonial-author { font-size: 0.82rem; font-weight: 600; color: var(--text-muted); }

/* ── 11. SECTION HEADERS ── */
.section-header { text-align: center; max-width: 600px; margin: 0 auto 48px; }
.section-header .label { margin-bottom: 12px; display: block; }
.section-header p { margin: 12px auto 0; }

/* ── 12. FEATURE LIST ── */
.feature-list { display: flex; flex-direction: column; gap: 12px; margin-top: 20px; }
.feature-item {
    display: flex; align-items: flex-start; gap: 12px;
    font-size: 0.95rem; color: var(--text);
}
.feature-item .check { color: var(--secondary); font-weight: 700; flex-shrink: 0; }

/* ── 13. CTA SECTION ── */
.cta-block {
    background: var(--primary);
    border-radius: var(--radius-lg);
    padding: 64px 48px;
    text-align: center;
    color: #fff;
}
.cta-block h2 { color: #fff; margin-bottom: 12px; }
.cta-block p { color: rgba(255,255,255,0.7); margin: 0 auto 24px; }

/* ── 14. FOOTER ── */
.footer {
    background: var(--primary);
    color: rgba(255,255,255,0.7);
    padding: 64px 0 32px;
}
.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 48px;
}
@media (max-width: 768px) {
    .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 480px) {
    .footer-grid { grid-template-columns: 1fr; }
}
.footer h4 {
    font-family: var(--font-sans);
    font-size: 0.72rem; font-weight: 600;
    text-transform: uppercase; letter-spacing: 0.08em;
    color: rgba(255,255,255,0.4);
    margin-bottom: 16px;
}
.footer a { color: rgba(255,255,255,0.7); transition: color 0.2s; }
.footer a:hover { color: #fff; }
.footer-links { display: flex; flex-direction: column; gap: 8px; }
.footer-links a { font-size: 0.9rem; }
.footer-brand { font-family: var(--font-serif); font-size: 1.2rem; font-weight: 700; color: #fff; margin-bottom: 12px; }
.footer-brand-desc { font-size: 0.88rem; line-height: 1.6; margin-bottom: 16px; }
.footer-socials { display: flex; gap: 12px; }
.footer-socials a {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.5);
    transition: all 0.2s;
}
.footer-socials a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.08);
    margin-top: 48px; padding-top: 24px;
    display: flex; justify-content: space-between; align-items: center;
    font-size: 0.82rem; color: rgba(255,255,255,0.4);
    flex-wrap: wrap; gap: 12px;
}
.footer-bottom a { color: rgba(255,255,255,0.5); }

/* ── 15. FORM ── */
.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.88rem; font-weight: 500; margin-bottom: 6px; color: var(--text); }
.form-input {
    width: 100%;
    padding: 12px 16px;
    background: var(--white);
    border: 1px solid var(--outline);
    border-radius: var(--radius-sm);
    font-family: var(--font-sans);
    font-size: 0.95rem;
    color: var(--text);
    transition: border-color 0.2s;
}
.form-input:focus { outline: none; border-color: var(--secondary); box-shadow: 0 0 0 3px rgba(232,132,92,0.1); }
textarea.form-input { resize: vertical; min-height: 120px; }

/* ── 16. CASE STUDY CARDS ── */
.case-card {
    background: var(--white);
    border: 1px solid rgba(0,0,0,0.04);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: box-shadow 0.3s, transform 0.3s;
}
.case-card:hover { box-shadow: 0 8px 32px rgba(27,58,75,0.06); transform: translateY(-4px); }
.case-card-img { height: 200px; background: var(--surface-dim); overflow: hidden; }
.case-card-img img { width: 100%; height: 100%; object-fit: cover; }
.case-card-body { padding: 24px; }
.case-card-tag { font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--secondary); margin-bottom: 8px; }
.case-card-body h3 { margin-bottom: 8px; }
.case-card-body p { font-size: 0.88rem; }
.case-card-arrow { color: var(--secondary); font-weight: 600; font-size: 0.88rem; margin-top: 12px; display: inline-flex; align-items: center; gap: 4px; }

/* ── 17. FAQ ── */
.faq-item { border-bottom: 1px solid var(--outline); }
.faq-question {
    display: flex; justify-content: space-between; align-items: center;
    padding: 20px 0; cursor: pointer;
    font-weight: 600; font-size: 1rem; color: var(--text);
    background: none; border: none; width: 100%; text-align: left;
    font-family: var(--font-sans);
}
.faq-question:hover { color: var(--secondary); }
.faq-answer { padding: 0 0 20px; color: var(--text-muted); font-size: 0.95rem; line-height: 1.7; display: none; }
.faq-item.open .faq-answer { display: block; }
.faq-icon { font-size: 1.2rem; transition: transform 0.2s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }

/* ── 18. UTILITIES ── */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0; }
.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.mt-3 { margin-top: 24px; }

/* ── 19. SCROLL ANIMATIONS ── */
/* .reveal is a no-op marker class — no CSS effects, no opacity changes */
/* Content is always fully visible regardless of JS state */
.reveal, .reveal.animated, .reveal.will-reveal, .reveal.visible { }
/* Optional: hover lift for cards handled separately */

/* ── 20. SCROLLBAR ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--surface); }
::-webkit-scrollbar-thumb { background: rgba(27,58,75,0.15); border-radius: 10px; }
* { scrollbar-width: thin; scrollbar-color: rgba(27,58,75,0.15) var(--surface); }

/* ── 21. SELECTION ── */
::selection { background: rgba(232,132,92,0.2); color: var(--text); }

/* ── 22. EXTRAS ── */
.container-narrow { max-width: 720px; margin: 0 auto; padding: 0 24px; }

/* Lavender hero background */
.section-lavender { background: #e8e4f5; }

/* btn-white for use on dark backgrounds */
.btn-white { background: #fff; color: var(--primary); border-color: transparent; }
.btn-white:hover { background: rgba(255,255,255,0.92); }

/* FAQ Accordion */
.faq-item { border-bottom: 1px solid var(--outline); }
.faq-question {
    width: 100%; background: none; border: none; padding: 20px 0;
    display: flex; justify-content: space-between; align-items: center;
    font-family: var(--font-sans); font-size: 1rem; font-weight: 600;
    color: var(--text); cursor: pointer; text-align: left; gap: 16px;
}
.faq-question:hover { color: var(--secondary); }
.faq-icon { font-size: 1.3rem; font-weight: 400; color: var(--secondary); flex-shrink: 0; transition: transform 0.3s; }
.faq-item.open .faq-icon { transform: rotate(45deg); }
.faq-answer {
    font-size: 0.95rem; color: var(--text-muted); line-height: 1.75;
    padding-bottom: 20px; display: none;
}
.faq-item.open .faq-answer { display: block; }

/* Testimonials grid */
.testimonials-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 768px) { .testimonials-grid { grid-template-columns: 1fr; } }
.testimonial { background: var(--white); border: 1px solid rgba(0,0,0,0.04); border-radius: var(--radius-lg); padding: 28px; }
.testimonial-stars { color: var(--secondary); font-size: 1.1rem; margin-bottom: 12px; }
.testimonial blockquote { font-family: var(--font-serif); font-size: 1rem; line-height: 1.65; color: var(--text); margin: 0 0 16px; }
.testimonial-author { font-size: 0.85rem; font-weight: 600; color: var(--text-muted); }

/* Card-icon color overrides */
.card-icon.peach { background: var(--peach); }
.card-icon.lavender { background: var(--lavender); }

/* Form Validation UX */
.form-error { color: #e53e3e; font-size: 0.85rem; margin-top: 4px; animation: fadeIn 0.3s ease; }
.form-shake { animation: formShake 0.4s ease-in-out; }
@keyframes formShake { 0%, 100% { transform: translateX(0); } 20%, 60% { transform: translateX(-5px); } 40%, 80% { transform: translateX(5px); } }
