/* ═══════════════════════════════════════════
   AI Tools Guide — Light Accessible Design
   Tom Hagiladi — 2026
   WCAG AA Compliant — Contrast Ratio 4.5:1+
   ═══════════════════════════════════════════ */

:root {
    /* Light palette */
    --bg-page: #ffffff;
    --bg-surface: #f7f5f2;
    --bg-card: #ffffff;
    --bg-card-hover: #faf8f5;
    --bg-highlight: #f0ece6;

    /* Brand accent — warm gold/brown */
    --accent: #8b5e1a;
    --accent-light: #a97624;
    --accent-bg: rgba(139, 94, 26, 0.08);
    --accent-border: rgba(139, 94, 26, 0.2);

    /* Semantic colors — all meet 4.5:1 on white */
    --green: #1a7a3d;
    --green-bg: rgba(26, 122, 61, 0.08);
    --green-border: rgba(26, 122, 61, 0.2);

    --purple: #6b21a8;
    --purple-bg: rgba(107, 33, 168, 0.07);
    --purple-border: rgba(107, 33, 168, 0.18);

    --red: #b91c1c;
    --red-bg: rgba(185, 28, 28, 0.07);
    --red-border: rgba(185, 28, 28, 0.18);

    --blue: #1e40af;

    /* Text — high contrast */
    --text-primary: #1a1a1a;        /* ~17:1 on white */
    --text-secondary: #4a4a4a;      /* ~7.7:1 on white */
    --text-muted: #5c5c5c;          /* ~5.9:1 on white */

    /* Borders */
    --border: #e0dbd4;
    --border-hover: #c4b9a8;

    /* Sizing */
    --radius: 14px;
    --radius-sm: 8px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-card: 0 1px 4px rgba(0, 0, 0, 0.06), 0 2px 12px rgba(0, 0, 0, 0.04);
    --shadow-card-hover: 0 4px 20px rgba(0, 0, 0, 0.1);

    /* Motion */
    --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ═══════ Reset ═══════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

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

body {
    font-family: 'Heebo', sans-serif;
    background: var(--bg-page);
    color: var(--text-primary);
    line-height: 1.7;
    min-height: 100vh;
    overflow-x: hidden;
}

/* ═══════ Decorative top bar ═══════ */
body::before {
    content: '';
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light), var(--accent));
}

/* ═══════ Navbar ═══════ */
.navbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0.75rem 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}
.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}
.navbar-brand img {
    height: 38px;
    border-radius: 8px;
}
.navbar-brand span {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--accent);
    font-family: 'Space Grotesk', sans-serif;
}
.navbar-links {
    display: flex;
    gap: 0.5rem;
}
.navbar-links a {
    color: var(--text-secondary);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.25s var(--ease);
}
.navbar-links a:hover,
.navbar-links a.active {
    color: var(--accent);
    background: var(--accent-bg);
}

/* ═══════ Hero ═══════ */
.hero {
    padding: 5rem 2rem 3rem;
    text-align: center;
}
.hero-badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: var(--radius-full);
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid var(--accent-border);
}
.hero h1 {
    font-family: 'Heebo', sans-serif;
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    line-height: 1.3;
    margin-bottom: 1rem;
    color: var(--text-primary);
}
.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero p {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 680px;
    margin: 0 auto 2rem;
    line-height: 1.8;
}
.hero-divider {
    width: 60px;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    border-radius: var(--radius-full);
    margin: 0 auto;
}

/* ═══════ Section ═══════ */
.section {
    padding: 2rem 2rem 3rem;
    max-width: 1200px;
    margin: 0 auto;
}
.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}
.section-header h2 {
    font-family: 'Heebo', sans-serif;
    font-size: clamp(1.5rem, 3.5vw, 2rem);
    font-weight: 800;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}
.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 600px;
    margin: 0 auto;
}

/* ═══════ Category ═══════ */
.category {
    margin-bottom: 2.5rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2.5rem;
}
.category-title {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 1.25rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--border);
    color: var(--text-primary);
}
.category-title .cat-icon {
    font-size: 1.3rem;
}

/* ═══════ Tool Cards ═══════ */
.tools-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
    max-width: 1100px;
    margin: 0 auto;
}
/* Center single cards instead of aligning to start */
.tools-grid:has(> :only-child) {
    grid-template-columns: minmax(320px, 520px);
    justify-content: center;
}

.tool-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: all 0.25s var(--ease);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.tool-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
    box-shadow: var(--shadow-card-hover);
}

/* Affiliate card */
.tool-card.affiliate {
    border-color: var(--accent-border);
    background: linear-gradient(135deg, var(--bg-card), var(--accent-bg));
}
.tool-card.affiliate::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
}
.affiliate-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-full);
    background: var(--accent);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 700;
}

.tool-card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}
.tool-logo {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    object-fit: contain;
    flex-shrink: 0;
    background: var(--bg-surface);
    padding: 4px;
}
.tool-name {
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Space Grotesk', 'Heebo', sans-serif;
    color: var(--text-primary);
}
.tool-desc {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 1rem;
    flex-grow: 1;
}

/* Pricing */
.tool-pricing {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1rem;
}
.price-tag {
    padding: 0.2rem 0.65rem;
    border-radius: var(--radius-full);
    font-size: 0.76rem;
    font-weight: 600;
}
.price-free {
    background: var(--green-bg);
    color: var(--green);
    border: 1px solid var(--green-border);
}
.price-paid {
    background: var(--purple-bg);
    color: var(--purple);
    border: 1px solid var(--purple-border);
}
.price-paid-only {
    background: var(--red-bg);
    color: var(--red);
    border: 1px solid var(--red-border);
}

/* Links */
.tool-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 1.1rem;
    border-radius: var(--radius-sm);
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s var(--ease);
    align-self: flex-start;
}
.tool-link-primary {
    background: var(--accent);
    color: #ffffff;
}
.tool-link-primary:hover {
    background: var(--accent-light);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 94, 26, 0.25);
}
.tool-link-secondary {
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
}
.tool-link-secondary:hover {
    border-color: var(--border-hover);
    background: var(--bg-highlight);
}

/* ═══════ LLM Cards — Expanded ═══════ */
.llm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 1.5rem;
    max-width: 1100px;
    margin: 0 auto;
}

.llm-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    transition: all 0.25s var(--ease);
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-card);
}
.llm-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
    box-shadow: var(--shadow-card-hover);
}
.llm-card-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}
.llm-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: contain;
    flex-shrink: 0;
    background: var(--bg-surface);
    padding: 4px;
}
.llm-card-header .llm-title {
    display: flex;
    flex-direction: column;
}
.llm-card-header .llm-name {
    font-size: 1.3rem;
    font-weight: 800;
    font-family: 'Space Grotesk', 'Heebo', sans-serif;
    color: var(--text-primary);
}
.llm-card-header .llm-maker {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}
.llm-desc {
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.75;
    margin-bottom: 1rem;
}
.llm-features {
    list-style: none;
    margin-bottom: 1.25rem;
}
.llm-features li {
    padding: 0.25rem 0;
    font-size: 0.87rem;
    color: var(--text-secondary);
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}
.llm-features li::before {
    content: '\2713';
    color: var(--green);
    font-weight: 700;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    flex-shrink: 0;
}
.llm-bottom {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ═══════ Info Note ═══════ */
.info-note {
    background: var(--accent-bg);
    border: 1px solid var(--accent-border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 2rem;
}
.info-note .note-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}
.info-note strong {
    color: var(--accent);
}

/* ═══════ Tip Box ═══════ */
.tip-box {
    background: var(--green-bg);
    border: 1px solid var(--green-border);
    border-radius: var(--radius);
    padding: 1rem 1.25rem;
    margin-top: 0.75rem;
    font-size: 0.86rem;
    color: var(--text-secondary);
    line-height: 1.7;
}
.tip-box strong {
    color: var(--green);
}

/* ═══════ Landing Cards ═══════ */
.landing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2rem;
}
.landing-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2.5rem 2rem;
    text-align: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.3s var(--ease);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-card);
}
.landing-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--accent-light));
    opacity: 0;
    transition: opacity 0.25s var(--ease);
}
.landing-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-card-hover);
}
.landing-card:hover::before {
    opacity: 1;
}
.landing-icon {
    font-size: 3rem;
    margin-bottom: 0.5rem;
}
.landing-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--text-primary);
}
.landing-card p {
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.6;
}
.landing-card .card-count {
    display: inline-block;
    padding: 0.3rem 0.9rem;
    border-radius: var(--radius-full);
    background: var(--accent-bg);
    color: var(--accent);
    font-size: 0.82rem;
    font-weight: 600;
}

/* ═══════ Page Switcher ═══════ */
.page-switcher {
    display: flex;
    justify-content: center;
    gap: 0;
    max-width: 600px;
    margin: 0 auto 2rem;
    border-radius: var(--radius);
    overflow: hidden;
    border: 2px solid var(--border);
    background: var(--bg-surface);
}
.page-switcher a {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.5rem;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-muted);
    transition: all 0.25s var(--ease);
    border: none;
}
.page-switcher a:hover {
    background: var(--bg-highlight);
    color: var(--text-primary);
}
.page-switcher a.current {
    background: var(--accent);
    color: #ffffff;
}
.page-switcher a:not(.current) {
    cursor: pointer;
}
.page-switcher .switch-icon {
    font-size: 1.1rem;
}

/* ═══════ Footer ═══════ */
.footer {
    text-align: center;
    padding: 2.5rem 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-surface);
}
.footer-logo {
    height: 45px;
    border-radius: 8px;
    margin-bottom: 0.75rem;
}
.footer p {
    color: var(--text-muted);
    font-size: 0.85rem;
}
.footer a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}
.footer a:hover {
    text-decoration: underline;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 0.75rem;
    flex-wrap: wrap;
}

/* ═══════ Accessibility Statement Page ═══════ */
.a11y-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
}
.a11y-page h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 2rem 0 0.75rem;
    color: var(--text-primary);
}
.a11y-page p, .a11y-page li {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.8;
}
.a11y-page ul {
    padding-right: 1.5rem;
    margin-bottom: 1rem;
}
.a11y-page li {
    margin-bottom: 0.4rem;
}

/* ═══════ Responsive ═══════ */
@media (max-width: 768px) {
    .navbar { padding: 0.6rem 1rem; }
    .navbar-links { display: none; }
    .hero { padding: 3rem 1.25rem 2rem; }
    .section { padding: 1.5rem 1.25rem 2.5rem; }
    .tools-grid, .llm-grid { grid-template-columns: 1fr; }
    .landing-grid { grid-template-columns: 1fr; padding: 0 1.25rem; }
}

/* ═══════ Animations ═══════ */
.fade-in {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.5s var(--ease), transform 0.5s var(--ease);
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ═══════ Accessibility ═══════ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
}

:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 3px;
}

.skip-link {
    position: absolute;
    top: -100px;
    right: 0;
    background: var(--accent);
    color: #ffffff;
    padding: 0.75rem 1.5rem;
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    font-weight: 700;
    z-index: 200;
    text-decoration: none;
    font-size: 1rem;
}
.skip-link:focus {
    top: 0;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --border: #666666;
        --border-hover: #333333;
        --text-secondary: #333333;
        --text-muted: #444444;
    }
}
