/**
 * style.css
 * Core design system, typography, header, footer, and homepage content sections.
 */

:root {
    --primary: #2563eb;
    --primary-hover: #1d4ed8;
    --primary-light: #eff6ff;
    --primary-dark: #1e40af;
    --accent: #0ea5e9;
    --success: #10b981;
    --danger: #ef4444;
    --warning: #f59e0b;

    --bg-main: #f8fafc;
    --bg-card: #ffffff;
    --bg-subtle: #f1f5f9;
    
    --text-main: #0f172a;
    --text-muted: #475569;
    --text-light: #64748b;
    --border-color: #e2e8f0;
    --border-hover: #cbd5e1;

    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.05);

    --transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Reset & Box Sizing */
*, *::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);
    background-color: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    font-size: 16px;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Typography */
h1, h2, h3, h4 {
    color: var(--text-main);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
}

h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 0.75rem;
}

h2 {
    font-size: clamp(1.6rem, 3vw, 2.15rem);
    margin-bottom: 1rem;
    text-align: center;
}

h3 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-muted);
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

a:hover {
    color: var(--primary-hover);
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
    transition: var(--transition);
}

:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Layout Utilities */
.container {
    width: 100%;
    max-width: 1160px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
}

.text-center {
    text-align: center;
}

.section-lead {
    max-width: 680px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.1rem;
    color: var(--text-muted);
    text-align: center;
    margin-bottom: 2.5rem;
}

/* Header & Navigation */
.site-header {
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.03);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.25rem;
    color: var(--text-main);
    text-decoration: none;
}

.brand-icon {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.brand-badge {
    background: var(--primary-light);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.15rem 0.5rem;
    border-radius: var(--radius-full);
}

.nav-desktop {
    display: flex;
    align-items: center;
    gap: 1.75rem;
}

.nav-link {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 0;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--primary);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: var(--primary);
    border-radius: 2px;
}

.nav-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    border: 1px solid var(--border-color);
}

.mobile-nav {
    display: none;
    background-color: var(--bg-card);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 1.25rem;
    flex-direction: column;
    gap: 0.75rem;
}

.mobile-nav.active {
    display: flex;
}

.mobile-nav a {
    color: var(--text-main);
    font-weight: 500;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

/* Hero Section */
.hero-section {
    padding-top: 2.5rem;
    padding-bottom: 3.5rem;
    background: linear-gradient(180deg, #ffffff 0%, var(--bg-main) 100%);
    border-bottom: 1px solid var(--border-color);
}

.hero-header {
    text-align: center;
    max-width: 820px;
    margin: 0 auto 2rem;
}

.hero-header p {
    font-size: 1.15rem;
    color: var(--text-muted);
    line-height: 1.55;
    margin-bottom: 0;
}

/* Features Section */
.section-features {
    padding: 4.5rem 0;
    background-color: var(--bg-card);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.75rem;
}

.feature-card {
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.feature-icon-wrap {
    width: 44px;
    height: 44px;
    background: var(--primary-light);
    color: var(--primary);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    font-size: 1.25rem;
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* How It Works Section */
.section-how-it-works {
    padding: 4.5rem 0;
    background-color: var(--bg-main);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 1.75rem;
    position: relative;
}

.step-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    position: relative;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.step-number {
    width: 38px;
    height: 38px;
    background: var(--primary);
    color: #fff;
    font-weight: 700;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    font-size: 1rem;
}

.step-card h3 {
    font-size: 1.15rem;
    margin-bottom: 0.65rem;
}

.step-card p {
    font-size: 0.92rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Use Cases Section */
.section-use-cases {
    padding: 4.5rem 0;
    background-color: var(--bg-card);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
}

.use-case-item {
    display: flex;
    gap: 1rem;
    background-color: var(--bg-main);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.use-case-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    background: #e0e7ff;
    color: #4338ca;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.use-case-content h3 {
    font-size: 1rem;
    margin-bottom: 0.35rem;
}

.use-case-content p {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

.disclaimer-box {
    margin-top: 2.75rem;
    background: #fffdf5;
    border: 1px solid #fef08a;
    border-left: 4px solid #f59e0b;
    border-radius: var(--radius-md);
    padding: 1.15rem 1.4rem;
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
    font-size: 0.92rem;
    color: #92400e;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

/* Privacy Section */
.section-privacy {
    padding: 4.5rem 0;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    color: #f8fafc;
}

.section-privacy h2 {
    color: #ffffff;
}

.section-privacy .section-lead {
    color: #94a3b8;
}

.privacy-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.75rem;
}

.privacy-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: 2rem 1.5rem;
    backdrop-filter: blur(8px);
}

.privacy-card h3 {
    color: #ffffff;
    font-size: 1.15rem;
    margin-bottom: 0.6rem;
}

.privacy-card p {
    color: #cbd5e1;
    font-size: 0.92rem;
    margin-bottom: 0;
}

/* FAQ Section */
.section-faq {
    width: 100%;
    padding: 4.5rem 0;
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.faq-list {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

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

.faq-item.open {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.15rem 1.25rem;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.faq-icon {
    transition: transform 0.2s ease;
    font-size: 1.25rem;
    color: var(--text-light);
}

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

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.faq-answer-inner {
    padding: 0 1.25rem 1.25rem 1.25rem;
    font-size: 0.95rem;
    color: var(--text-muted);
    border-top: 1px solid transparent;
}

.faq-item.open .faq-answer-inner {
    border-top-color: var(--border-color);
    padding-top: 0.75rem;
}

/* Footer */
.site-footer {
    background-color: var(--bg-card);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 2rem;
    margin-top: auto;
}

.footer-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1.5rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.footer-links {
    display: flex;
    gap: 1.75rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.92rem;
}

.footer-links a:hover {
    color: var(--primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    padding-top: 1.75rem;
    font-size: 0.85rem;
    color: var(--text-light);
}

/* Content Pages (About, Contact, Privacy, Terms) */
.page-content-wrapper {
    padding: 3rem 0 4rem;
}

.page-article {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 2.5rem 2rem;
    max-width: 860px;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}

.page-article h1 {
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 1rem;
}

.page-article h2 {
    text-align: left;
    margin-top: 2rem;
    margin-bottom: 0.75rem;
    font-size: 1.5rem;
}

.page-article ul, .page-article ol {
    margin-left: 1.5rem;
    margin-bottom: 1.25rem;
    color: var(--text-muted);
}

.page-article li {
    margin-bottom: 0.4rem;
}

/* Responsive Breakpoints */
@media (max-width: 768px) {
    .nav-desktop {
        display: none;
    }
    .nav-toggle {
        display: flex;
    }
    .hero-section {
        padding-top: 1.5rem;
        padding-bottom: 2.5rem;
    }
    .page-article {
        padding: 1.5rem 1.25rem;
    }
    .footer-top {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Tool Switcher Banner (Cross-tool navigation) */
.tool-switcher-banner {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 0.6rem 1.25rem;
    margin: 1.25rem auto 2rem auto;
    font-size: 0.9rem;
    color: var(--text-muted);
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
    justify-content: center;
}

.tool-switcher-banner a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tool-switcher-banner a:hover {
    text-decoration: underline;
}

@media (max-width: 640px) {
    .tool-switcher-banner {
        font-size: 0.82rem;
        padding: 0.6rem 0.9rem;
        line-height: 1.45;
        gap: 0.5rem;
        width: 100%;
        margin-bottom: 1.5rem;
    }
}
