/* Match React app design system exactly */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;600;700&display=swap');

/* Design tokens matching client/src/index.css */
:root {
    --primary: hsl(78, 85%, 35%);
    --primary-light: hsl(78, 85%, 35%, 0.05);
    --primary-border: hsl(78, 85%, 35%, 0.2);
    --accent: hsl(207, 49%, 39%);
    --background: hsl(0, 0%, 100%);
    --foreground: hsl(207, 49%, 25%);
    --muted: hsl(210, 12%, 94%);
    --muted-foreground: hsl(207, 30%, 45%);
    --border: hsl(210, 10%, 88%);
    --card: hsl(0, 0%, 100%);
    --card-border: hsl(210, 10%, 88%, 0.4);
    --radius: 0.75rem;
}

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

body {
    font-family: 'Roboto', system-ui, -apple-system, sans-serif;
    background: var(--background);
    color: var(--foreground);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
    text-decoration: none;
}

/* Header - matches React header style */
.header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--background);
    border-bottom: 1px solid var(--border);
}

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

.header-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--foreground);
}

.header-logo svg {
    width: 1.5rem;
    height: 1.5rem;
    color: var(--primary);
}

.header-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.25rem;
    padding: 0 1rem;
    background: var(--primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius);
    transition: opacity 0.15s;
}

.header-cta:hover {
    opacity: 0.9;
}

/* Breadcrumb - matches React style */
.breadcrumb {
    padding: 0.75rem 1rem;
    max-width: 1200px;
    margin: 0 auto;
}

.breadcrumb nav {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

.breadcrumb a:hover {
    color: var(--foreground);
}

.breadcrumb span.separator {
    color: var(--muted-foreground);
}

.breadcrumb span.current {
    color: var(--foreground);
    font-weight: 500;
}

/* Hero section - matches React py-16 px-4 with max-w-3xl mx-auto text-center */
.hero {
    padding: 4rem 1rem;
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

.hero h1 {
    font-size: 1.875rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1rem;
}

@media (min-width: 768px) {
    .hero h1 {
        font-size: 2.25rem;
    }
}

.hero .subheadline {
    font-size: 1rem;
    color: var(--muted-foreground);
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .hero .subheadline {
        font-size: 1.125rem;
    }
}

.hero .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0 2rem;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.hero .btn-primary:hover {
    opacity: 0.9;
}

/* Content sections - matches React py-12 px-4 */
section {
    padding: 3rem 1rem;
}

section h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    section h2 {
        font-size: 1.5rem;
    }
}

/* Problem section - max-w-3xl mx-auto */
.problem-section {
    max-width: 48rem;
    margin: 0 auto;
}

.problem-section p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.7;
    margin-bottom: 1rem;
}

.problem-section p:last-child {
    margin-bottom: 0;
}

/* Benefits section - matches React grid md:grid-cols-2 gap-4 */
.benefits-section {
    max-width: 56rem;
    margin: 0 auto;
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.benefit-card {
    padding: 1rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
}

.benefit-card-inner {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.benefit-icon {
    flex-shrink: 0;
    width: 1.25rem;
    height: 1.25rem;
    margin-top: 0.125rem;
    color: var(--primary);
}

.benefit-card h3 {
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.benefit-card p {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0;
}

/* FAQ section - matches React accordion style */
.faq-section {
    max-width: 48rem;
    margin: 0 auto;
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.faq-item {
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    background: var(--card);
    overflow: hidden;
}

.faq-question {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--foreground);
    font-family: inherit;
}

.faq-question:hover {
    background: var(--muted);
}

.faq-question svg {
    flex-shrink: 0;
    width: 1rem;
    height: 1rem;
    color: var(--muted-foreground);
    transition: transform 0.2s;
}

.faq-item.open .faq-question svg {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 1rem 1rem 1rem;
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.6;
}

.faq-item.open .faq-answer {
    display: block;
}

/* CTA section - matches React bg-primary/5 border border-primary/20 style */
.cta-section {
    max-width: 48rem;
    margin: 0 auto;
}

.cta-box {
    background: var(--primary-light);
    border: 1px solid var(--primary-border);
    border-radius: var(--radius);
    padding: 1.5rem;
    text-align: center;
}

.cta-box h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

@media (min-width: 768px) {
    .cta-box h2 {
        font-size: 1.5rem;
    }
}

.cta-box .btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2.75rem;
    padding: 0 2rem;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 700;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: opacity 0.15s;
}

.cta-box .btn-primary:hover {
    opacity: 0.9;
}

.cta-box .subtext {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin-top: 1rem;
}

/* Also works with section - matches React style */
.also-works-section {
    max-width: 56rem;
    margin: 0 auto;
    text-align: center;
}

.also-works-section h2 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.also-works-list {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.also-works-list a {
    padding: 0.5rem 1rem;
    background: hsl(210, 12%, 94%, 0.5);
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--muted-foreground);
    transition: background 0.15s;
}

.also-works-list a:hover {
    background: var(--muted);
}

/* Footer - matches React footer style */
footer {
    padding: 1.5rem 1rem;
    text-align: center;
}

.footer-brand {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--muted-foreground);
}

.footer-brand span.label {
    font-size: 0.75rem;
}

.footer-brand svg {
    width: 1rem;
    height: 1rem;
}

.footer-brand span.name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--foreground);
}

footer nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}

footer nav a {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

footer nav a:hover {
    text-decoration: underline;
}

/* Category page specific styles */
.category-hero {
    padding: 3rem 1rem;
    text-align: center;
    max-width: 48rem;
    margin: 0 auto;
}

.category-hero h1 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

@media (min-width: 768px) {
    .category-hero h1 {
        font-size: 2rem;
    }
}

.category-hero .subheadline {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.integrations-grid {
    max-width: 56rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 640px) {
    .integrations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .integrations-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.integration-card {
    display: block;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.integration-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.integration-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.integration-card p {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    margin: 0;
}

/* Hub page styles */
.hub-intro {
    max-width: 48rem;
    margin: 0 auto;
    padding: 0 1rem 2rem;
}

.hub-intro p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin-bottom: 1rem;
}

.category-grid {
    max-width: 60rem;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    padding: 0 1rem;
}

@media (min-width: 640px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 768px) {
    .category-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.category-card {
    display: block;
    padding: 1.5rem;
    background: var(--card);
    border: 1px solid var(--card-border);
    border-radius: var(--radius);
    transition: border-color 0.15s, box-shadow 0.15s;
}

.category-card:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.category-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.category-card p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
}

/* How it works section */
.how-it-works-section {
    max-width: 48rem;
    margin: 0 auto;
}

.steps-grid {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (min-width: 768px) {
    .steps-grid {
        flex-direction: row;
        gap: 2rem;
    }
}

.step {
    flex: 1;
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    background: var(--primary);
    color: white;
    font-weight: 700;
    border-radius: 50%;
    margin-bottom: 0.75rem;
}

.step h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    margin: 0;
}

/* Checkmark SVG icon */
.checkmark-icon {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    background-color: var(--primary);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 11.08V12a10 10 0 1 1-5.93-9.14'/%3E%3Cpolyline points='22 4 12 14.01 9 11.01'/%3E%3C/svg%3E") center/contain no-repeat;
}

/* Chevron down icon */
.chevron-icon {
    display: inline-block;
    width: 1rem;
    height: 1rem;
    background-color: var(--muted-foreground);
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E") center/contain no-repeat;
    transition: transform 0.2s;
}

.faq-item.open .chevron-icon {
    transform: rotate(180deg);
}
