/*
Theme Name: Aggregate Tools
Theme URI: https://aggregate.tools
Author: Aggregate.Tools
Description: AI tools directory for construction and trade businesses.
Version: 1.2.0
*/

/* ============================================================
   RESET & ROOT
============================================================ */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --primary:      #1e40af;
    --primary-dark: #1e3a8a;
    --text:         #1f2937;
    --text-muted:   #6b7280;
    --bg:           #ffffff;
    --bg-off:       #f9fafb;
    --border:       #e5e7eb;
    --border-light: #f3f4f6;
    --radius:       8px;
    --serif:        'Playfair Display', Georgia, serif;
    --sans:         'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --shadow-sm:    0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
    --shadow-md:    0 4px 12px rgba(0,0,0,.08);
    --shadow-lg:    0 10px 30px rgba(0,0,0,.12);
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--sans);
    color: var(--text);
    background: var(--bg-off);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a   { color: var(--primary); text-decoration: none; transition: color .2s; }
a:hover { color: var(--primary-dark); }

/* ============================================================
   LAYOUT
============================================================ */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }

/* ============================================================
   HEADER / NAV
============================================================ */
.site-header {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--shadow-sm);
}

.site-header nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.1rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-logo {
    font-family: var(--serif);
    font-size: 22px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: -0.5px;
    text-decoration: none;
}
.site-logo:hover { color: var(--primary-dark); }

.nav-menu { display: flex; list-style: none; gap: 2rem; align-items: center; }

.nav-menu a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    transition: color .2s;
}
.nav-menu a:hover { color: var(--primary); }

.nav-menu .nav-cta a {
    background: var(--primary);
    color: #fff;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
}
.nav-menu .nav-cta a:hover { background: var(--primary-dark); color: #fff; }

/* mobile toggle */
.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    flex-direction: column;
    gap: 5px;
    padding: 4px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--text); border-radius: 2px; }

@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu {
        display: none;
        flex-direction: column;
        gap: 0;
        position: absolute;
        top: 100%;
        left: 0; right: 0;
        background: var(--bg);
        border-bottom: 1px solid var(--border);
        padding: 1rem;
        box-shadow: var(--shadow-md);
    }
    .nav-menu.open { display: flex; }
    .nav-menu a { padding: .75rem 0; display: block; border-bottom: 1px solid var(--border-light); }
    .site-header nav { position: relative; }
}

/* ============================================================
   HERO (front page)
============================================================ */
.site-hero {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-off) 100%);
    padding: 4rem 1rem 3.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.hero-inner { max-width: 740px; margin: 0 auto; }

.site-hero h1 {
    font-family: var(--serif);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: 1rem;
}

.hero-sub {
    font-size: 1.05rem;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 2rem;
    line-height: 1.7;
}

.hero-cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

/* Stats strip */
.hero-stats {
    display: flex;
    justify-content: center;
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    flex-wrap: wrap;
    gap: 0;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 2.5rem;
    border-right: 1px solid var(--border);
}
.hero-stat:last-child { border-right: none; }

.hero-stat strong {
    font-family: var(--serif);
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}
.hero-stat span { font-size: 13px; color: var(--text-muted); margin-top: 4px; }

@media (max-width: 500px) {
    .hero-stat { padding: .75rem 1.5rem; border-right: none; border-bottom: 1px solid var(--border); width: 50%; }
    .hero-stat:last-child { border-bottom: none; }
}

/* ============================================================
   PAGE HERO (inner pages)
============================================================ */
.page-hero {
    background: linear-gradient(135deg, var(--bg) 0%, var(--bg-off) 100%);
    padding: 3rem 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.page-hero h1 {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 5vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.2;
    color: var(--text);
    margin-bottom: .75rem;
}

.page-hero p { font-size: 1rem; color: var(--text-muted); max-width: 580px; margin: 0 auto; }

/* ============================================================
   BUTTONS
============================================================ */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all .2s;
    text-decoration: none;
    line-height: 1;
}

.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(30,64,175,.3); }

.btn-outline { background: transparent; color: var(--primary); border-color: var(--primary); }
.btn-outline:hover { background: var(--primary); color: #fff; }

/* ============================================================
   BADGES
============================================================ */
.badge {
    display: inline-block;
    background: var(--bg-off);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

/* ============================================================
   SECTION UTILITIES
============================================================ */
.section-pad    { padding: 3.5rem 1rem; }
.section-bg     { background: var(--bg); }
.section-bg-off { background: var(--bg-off); }

.section-title {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 4vw, 2.1rem);
    font-weight: 800;
    letter-spacing: -.5px;
    color: var(--text);
    margin-bottom: .5rem;
}

.section-sub { color: var(--text-muted); font-size: .95rem; margin-bottom: 2rem; }

/* ============================================================
   TOOL CARDS
============================================================ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.tool-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    transition: all .25s ease;
    box-shadow: var(--shadow-sm);
}

.tool-card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
    transform: translateY(-4px);
}

.tool-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: .5rem;
}

.tool-card h3 {
    font-family: var(--serif);
    font-size: 18px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -.3px;
}

.tool-rating { font-size: 12px; color: var(--text-muted); white-space: nowrap; }

.tool-card > p,
.tool-card-description {
    font-size: 14px;
    color: var(--text-muted);
    flex-grow: 1;
    margin-bottom: 1rem;
    line-height: 1.55;
}

.tool-meta { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }

.tool-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid var(--border-light);
    padding-top: 1rem;
    margin-top: auto;
}

.tool-price { font-size: 16px; font-weight: 700; color: var(--primary); }

.tool-card .btn-outline {
    padding: 8px 16px;
    font-size: 13px;
    border-radius: var(--radius);
}

/* ============================================================
   CATEGORY CARDS
============================================================ */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
}

.category-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: #fff;
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    text-align: center;
    min-height: 160px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: all .25s;
    text-decoration: none;
}

.category-card:hover { transform: translateY(-4px); box-shadow: 0 12px 32px rgba(30,64,175,.25); }

.category-card h3 {
    font-family: var(--serif);
    font-size: 1.15rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: .4rem;
    letter-spacing: -.3px;
}

.category-card p { font-size: 13px; color: rgba(255,255,255,.85); line-height: 1.4; }

/* ============================================================
   CTA BAND
============================================================ */
.cta-band {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    text-align: center;
    padding: 4rem 1rem;
}

.cta-band h2 {
    font-family: var(--serif);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: .75rem;
    letter-spacing: -.5px;
}

.cta-band p { color: rgba(255,255,255,.85); font-size: 1.05rem; margin-bottom: 1.75rem; }

.cta-band .btn-primary { background: #fff; color: var(--primary); border-color: #fff; box-shadow: none; }
.cta-band .btn-primary:hover { background: var(--bg-off); border-color: var(--bg-off); color: var(--primary-dark); }

/* ============================================================
   FILTER BAR (directory)
============================================================ */
.filters-bar {
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem 1rem;
}

.filter-pills { display: flex; flex-wrap: wrap; gap: .6rem; }

.filter-pill {
    display: inline-block;
    background: var(--bg-off);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all .2s;
    text-decoration: none;
}
.filter-pill:hover { border-color: var(--primary); color: var(--primary); }
.filter-pill.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.filter-pill.active:hover { color: #fff; }

.results-bar {
    background: var(--bg);
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem;
}

.results-count { font-size: 14px; color: var(--text-muted); }
.results-count strong { color: var(--text); }

.sort-select {
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    font-family: var(--sans);
}

/* ============================================================
   ABOUT PAGE
============================================================ */
.story-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; }
@media (max-width: 768px) { .story-grid { grid-template-columns: 1fr; gap: 2rem; } }

.story-section-title {
    font-family: var(--serif);
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 1rem;
}

.story-text p { color: var(--text-muted); margin-bottom: 1rem; font-size: 15px; line-height: 1.75; }

.story-quote {
    background: var(--bg-off);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.25rem 1.5rem;
    margin: 1.25rem 0;
    font-style: italic;
    color: var(--text);
    font-size: 15px;
}

.values-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1.25rem; }

.value-card {
    background: var(--bg-off);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
}
.value-card h4 { font-family: var(--serif); font-size: 17px; font-weight: 700; margin-bottom: .5rem; }
.value-card p  { font-size: 14px; color: var(--text-muted); }

.disclosure-box {
    background: linear-gradient(135deg, #fef3c7, #fef08a);
    border: 2px solid #f59e0b;
    border-radius: var(--radius);
    padding: 1.5rem;
    margin: 2rem 0;
}
.disclosure-box h3 { font-family: var(--serif); color: #92400e; margin-bottom: .75rem; font-weight: 700; }
.disclosure-box p, .disclosure-box li { color: #78350f; font-size: 15px; margin-bottom: .5rem; line-height: 1.65; }
.disclosure-box ul { margin-left: 1.5rem; }
.disclosure-box ul li { list-style: disc; }

/* ============================================================
   SUBMIT FORM
============================================================ */
.form-wrap { max-width: 700px; margin: 0 auto; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-bottom: 1.5rem; }
.form-row.full { grid-template-columns: 1fr; }
@media (max-width: 600px) { .form-row { grid-template-columns: 1fr; } }

.form-group { display: flex; flex-direction: column; }

.form-group label { font-size: 14px; font-weight: 600; margin-bottom: .4rem; color: var(--text); }

.form-group input,
.form-group select,
.form-group textarea {
    padding: 11px 13px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: var(--sans);
    color: var(--text);
    background: var(--bg);
    transition: border-color .2s, box-shadow .2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(30,64,175,.1);
}

.form-group textarea { min-height: 120px; resize: vertical; }
.form-help { font-size: 12px; color: var(--text-muted); margin-top: .3rem; }

.info-box {
    background: var(--bg-off);
    border-left: 4px solid var(--primary);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
}
.info-box h3 { font-size: 15px; font-weight: 700; margin-bottom: .4rem; }
.info-box p  { font-size: 14px; color: var(--text-muted); }

/* ============================================================
   SINGLE TOOL PAGE
============================================================ */
.tool-single { max-width: 860px; margin: 3rem auto; padding: 0 1rem 4rem; }

.tool-single-header h1 {
    font-family: var(--serif);
    font-size: clamp(1.75rem, 5vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -1px;
    margin-bottom: 1rem;
}

.tool-single-meta { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; margin: 1rem 0; }
.tool-single-price { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; color: var(--primary); }

.tool-content { font-size: 16px; line-height: 1.8; color: var(--text-muted); }
.tool-content p { margin-bottom: 1.25rem; }

.tool-cta-box {
    background: var(--bg-off);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    text-align: center;
    margin-top: 2.5rem;
}
.tool-cta-box p { margin-bottom: 1rem; color: var(--text-muted); font-size: 15px; }

/* ============================================================
   FOOTER
============================================================ */
.site-footer {
    background: var(--text);
    color: #fff;
    padding: 3.5rem 1rem 2rem;
    margin-top: 0;
}

.footer-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

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

.footer-brand .footer-logo {
    font-family: var(--serif);
    font-size: 20px;
    font-weight: 700;
    color: #fff;
    display: inline-block;
    margin-bottom: .75rem;
}

.footer-tagline { font-size: 13px; color: rgba(255,255,255,.6); line-height: 1.6; max-width: 220px; }

.footer-col h4 { font-size: 13px; font-weight: 600; color: rgba(255,255,255,.9); margin-bottom: 1rem; text-transform: uppercase; letter-spacing: .5px; }
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: .5rem; }
.footer-col a  { font-size: 13px; color: rgba(255,255,255,.6); transition: color .2s; }
.footer-col a:hover { color: #fff; }

.footer-disclosure {
    max-width: 1200px;
    margin: 0 auto 1.5rem;
    background: rgba(255,255,255,.06);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    font-size: 13px;
    color: rgba(255,255,255,.55);
    line-height: 1.6;
}
.footer-disclosure strong { color: rgba(255,255,255,.75); }

.footer-bottom {
    max-width: 1200px;
    margin: 0 auto;
    border-top: 1px solid rgba(255,255,255,.1);
    padding-top: 1.5rem;
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.4);
}

/* ============================================================
   UTILITIES
============================================================ */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mb-2 { margin-bottom: 2rem; }
.text-center { text-align: center; }

.no-tools { text-align: center; padding: 4rem 1rem; }
.no-tools h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--text); margin-bottom: .5rem; }
.no-tools p  { color: var(--text-muted); }

.stars { color: #f59e0b; letter-spacing: 1px; }
.star.empty { color: var(--border); }
.review-count { color: var(--text-muted); }
