/**
 * Website-5 — Linear-inspired design system with dark/light modes.
 *
 * Dark by default with near-black background, gradient text, radial glows,
 * and CSS-only abstract illustrations. Light mode uses data-theme attribute
 * for manual toggle and falls back to prefers-color-scheme media query.
 */

/* ---------------------------------------------------------------------------
 * Design tokens
 * ------------------------------------------------------------------------- */

:root {
    --bg: #09090b;
    --bg-surface: #141417;
    --bg-hover: #1c1c20;
    --border: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.1);
    --text-primary: #fafafa;
    --text-secondary: #a1a1aa;
    --text-tertiary: #71717a;
    --accent: #C1272D;
    --accent-light: #e8363d;
    --accent-glow: rgba(193, 39, 45, 0.12);

    --illust-blue: #3b82f6;
    --illust-green: #22c55e;
    --illust-orange: #f97316;
    --illust-purple: #8b5cf6;

    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius: 12px;
    --radius-sm: 8px;
    --radius-lg: 16px;

    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;

    --max-width: 1200px;
    --header-height: 64px;
}

/* ---------------------------------------------------------------------------
 * Reset & base
 * ------------------------------------------------------------------------- */

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

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

a:hover {
    color: var(--accent-light);
}

/* ---------------------------------------------------------------------------
 * Screen-reader only
 * ------------------------------------------------------------------------- */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ---------------------------------------------------------------------------
 * Skip link
 * ------------------------------------------------------------------------- */

.skip-link {
    position: absolute;
    top: -100%;
    left: var(--space-4);
    z-index: 9999;
    padding: var(--space-2) var(--space-4);
    background: var(--accent);
    color: #fff;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.875rem;
}

.skip-link:focus {
    top: var(--space-4);
}

/* ---------------------------------------------------------------------------
 * Layout
 * ------------------------------------------------------------------------- */

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--space-6);
}

/* ---------------------------------------------------------------------------
 * Typography
 * ------------------------------------------------------------------------- */

.heading-1 {
    font-size: clamp(2.25rem, 5vw, 3.5rem);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.heading-2 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: var(--text-primary);
}

.heading-3 {
    font-size: 1.125rem;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-label {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--accent);
    margin-bottom: var(--space-4);
}

/* ---------------------------------------------------------------------------
 * Buttons
 * ------------------------------------------------------------------------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    font-family: var(--font);
    font-weight: 500;
    font-size: 0.875rem;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    white-space: nowrap;
}

.btn--sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
}

.btn--lg {
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
}

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

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

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

.btn--outline:hover {
    background: var(--bg-hover);
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text-primary);
}

.btn:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * Header
 * ------------------------------------------------------------------------- */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--header-height);
    background: rgba(9, 9, 11, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header-logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 600;
    font-size: 1.0625rem;
    color: var(--text-primary);
}

.header-logo:hover {
    color: var(--text-primary);
}

.header-logo .logo-light {
    display: none;
}

.header-logo .logo-dark {
    display: block;
}

.header-nav {
    display: none;
    align-items: center;
    gap: var(--space-8);
}

.header-nav a {
    font-size: 0.875rem;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.header-nav a:hover {
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.lang-switcher {
    display: none;
    align-items: center;
    gap: var(--space-1);
    margin-right: var(--space-3);
}

.lang-switcher a {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-tertiary);
    padding: var(--space-1) var(--space-2);
    border-radius: 4px;
    transition: all 0.2s;
}

.lang-switcher a:hover {
    color: var(--text-primary);
}

.lang-switcher a[aria-current="true"] {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.header-actions .btn--outline,
.header-actions .btn--primary {
    display: none;
}

/* Mobile toggle */
.mobile-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.3s;
}

.mobile-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.mobile-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile menu */
.mobile-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999;
    background: var(--bg);
    padding: var(--space-8) var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu.is-open {
    transform: translateX(0);
}

.mobile-menu a {
    font-size: 1.125rem;
    color: var(--text-secondary);
    padding: var(--space-2) 0;
}

.mobile-menu a:hover {
    color: var(--text-primary);
}

.mobile-lang {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border);
}

.mobile-lang a {
    font-size: 0.875rem;
    color: var(--text-tertiary);
}

.mobile-lang a[aria-current="true"] {
    color: var(--text-primary);
}

/* Desktop breakpoints */
@media (min-width: 768px) {
    .header-nav {
        display: flex;
    }

    .lang-switcher {
        display: flex;
    }

    .header-actions .btn--outline,
    .header-actions .btn--primary {
        display: inline-flex;
    }

    .mobile-toggle {
        display: none;
    }
}

/* ---------------------------------------------------------------------------
 * Sections
 * ------------------------------------------------------------------------- */

.section {
    padding: var(--space-16) 0;
    position: relative;
}

@media (min-width: 768px) {
    .section {
        padding: var(--space-20) 0;
    }
}

/* ---------------------------------------------------------------------------
 * Hero
 * ------------------------------------------------------------------------- */

.hero {
    padding-top: calc(var(--header-height) + var(--space-16));
    padding-bottom: var(--space-16);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.hero-title {
    max-width: 720px;
    margin: 0 auto var(--space-6);
}

.hero-subtitle {
    max-width: 600px;
    margin: 0 auto var(--space-10);
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--text-secondary);
}

.hero-ctas {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .hero {
        padding-top: calc(var(--header-height) + var(--space-20));
        padding-bottom: var(--space-20);
    }
}

/* ---------------------------------------------------------------------------
 * Feature sections (Linear-style individual hero per feature)
 * ------------------------------------------------------------------------- */

.feature-section {
    padding: var(--space-12) 0;
    position: relative;
}

.feature-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.5;
}

.feature-header {
    margin-bottom: var(--space-10);
}

.feature-grid {
    display: grid;
    gap: var(--space-12);
    align-items: start;
}

.feature-grid--reversed .feature-content {
    order: 1;
}

.feature-grid--reversed .feature-visual {
    order: 2;
}

.feature-capabilities {
    display: grid;
    gap: var(--space-4);
    margin-top: var(--space-8);
}

.feature-capability {
    display: flex;
    gap: var(--space-3);
    align-items: flex-start;
}

.feature-capability-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 2px;
    border-radius: 50%;
    background: var(--accent-glow);
    border: 1px solid rgba(193, 39, 45, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-capability-icon::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.feature-capability-text h4 {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.feature-capability-text p {
    font-size: 0.8125rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.feature-description {
    font-size: 1rem;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-top: var(--space-4);
}

@media (min-width: 768px) {
    .feature-section {
        padding: var(--space-16) 0;
    }

    .feature-section--reversed .section-label {
        display: block;
        margin-left: calc(6 / 11 * 100% + var(--space-12) / 2);
    }

    .feature-grid {
        grid-template-columns: 5fr 6fr;
    }

    .feature-grid--reversed {
        grid-template-columns: 6fr 5fr;
    }

    .feature-grid--reversed .feature-content {
        order: 2;
    }

    .feature-grid--reversed .feature-visual {
        order: 1;
    }
}

/* ---------------------------------------------------------------------------
 * Abstract CSS illustrations
 * ------------------------------------------------------------------------- */

.illust {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-6);
    position: relative;
    overflow: hidden;
    min-height: 280px;
}

/* Inventory illustration — stylized table rows */
.illust-inventory {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.illust-inventory-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.5fr;
    gap: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
}

.illust-inventory-header span {
    height: 8px;
    border-radius: 4px;
    background: var(--text-tertiary);
    opacity: 0.4;
}

.illust-inventory-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 0.5fr;
    gap: var(--space-3);
    align-items: center;
    padding: var(--space-2) 0;
}

.illust-inventory-row .illust-text {
    height: 10px;
    border-radius: 5px;
    background: var(--bg-hover);
}

.illust-inventory-row .illust-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    opacity: 0.8;
}

.illust-badge--blue { background: var(--illust-blue); }
.illust-badge--green { background: var(--illust-green); }
.illust-badge--orange { background: var(--illust-orange); }
.illust-badge--purple { background: var(--illust-purple); }

/* Consumption illustration — horizontal bar chart */
.illust-consumption {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
    justify-content: center;
    height: 100%;
}

.illust-bar-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.illust-bar-label {
    height: 8px;
    width: 60px;
    border-radius: 4px;
    background: var(--bg-hover);
}

.illust-bar {
    height: 24px;
    border-radius: 6px;
    opacity: 0.85;
    position: relative;
}

.illust-bar::after {
    content: '';
    position: absolute;
    right: var(--space-2);
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.3);
}

/* Reports illustration — chart bars with summary */
.illust-reports {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    justify-content: center;
    height: 100%;
}

.illust-chart {
    display: flex;
    align-items: flex-end;
    gap: var(--space-2);
    height: 120px;
    padding-top: var(--space-4);
    border-bottom: 1px solid var(--border);
}

.illust-chart-bar {
    flex: 1;
    border-radius: 4px 4px 0 0;
    opacity: 0.85;
    min-height: 12px;
}

.illust-summary {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-4);
}

.illust-summary-item {
    display: flex;
    flex-direction: column;
    gap: var(--space-1);
}

.illust-summary-value {
    height: 16px;
    width: 40px;
    border-radius: 4px;
    background: var(--bg-hover);
}

.illust-summary-label {
    height: 8px;
    width: 56px;
    border-radius: 4px;
    background: var(--bg-hover);
    opacity: 0.6;
}

/* Compliance illustration — audit log timeline */
.illust-compliance {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    padding-left: var(--space-8);
    justify-content: center;
    height: 100%;
}

.illust-compliance::before {
    content: '';
    position: absolute;
    left: 14px;
    top: var(--space-4);
    bottom: var(--space-4);
    width: 2px;
    background: var(--border);
}

.illust-log-entry {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    padding: var(--space-3) 0;
    position: relative;
}

.illust-log-dot {
    position: absolute;
    left: calc(-1 * var(--space-8) + 8px);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 2px solid var(--bg-surface);
}

.illust-log-time {
    width: 40px;
    height: 8px;
    border-radius: 4px;
    background: var(--bg-hover);
    opacity: 0.6;
    flex-shrink: 0;
}

.illust-log-content {
    height: 10px;
    border-radius: 5px;
    background: var(--bg-hover);
    flex: 1;
}

/* ---------------------------------------------------------------------------
 * Feature screenshots
 * ------------------------------------------------------------------------- */

.feature-screenshot {
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
    background: var(--bg-surface);
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .feature-screenshot {
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    }
}

:root[data-theme="light"] .feature-screenshot {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
}

/* ---------------------------------------------------------------------------
 * How it Works
 * ------------------------------------------------------------------------- */

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

.steps-grid {
    display: grid;
    gap: var(--space-8);
    margin-top: var(--space-12);
}

.step-item {
    text-align: center;
    position: relative;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--accent);
    margin-bottom: var(--space-4);
}

.step-item h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.step-item p {
    font-size: 0.875rem;
    color: var(--text-secondary);
    max-width: 280px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--space-12);
    }
}

/* ---------------------------------------------------------------------------
 * Stats
 * ------------------------------------------------------------------------- */

.stats-section {
    position: relative;
    text-align: center;
}

.stats-section::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 300px;
    background: radial-gradient(ellipse, var(--accent-glow) 0%, transparent 70%);
    pointer-events: none;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8);
    margin-top: var(--space-12);
}

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

.stat-value {
    font-size: clamp(2rem, 4vw, 2.75rem);
    font-weight: 700;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: var(--space-2);
}

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

/* ---------------------------------------------------------------------------
 * Pricing
 * ------------------------------------------------------------------------- */

.pricing-grid {
    display: grid;
    gap: var(--space-6);
    margin-top: var(--space-12);
}

.pricing-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-8);
    display: flex;
    flex-direction: column;
    position: relative;
}

.pricing-card--featured {
    border-color: var(--accent);
    box-shadow: 0 0 40px var(--accent-glow);
}

.pricing-badge {
    position: absolute;
    top: calc(-1 * var(--space-3));
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: #fff;
    font-size: 0.75rem;
    font-weight: 600;
    padding: var(--space-1) var(--space-4);
    border-radius: 20px;
    white-space: nowrap;
}

.pricing-name {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.pricing-description {
    font-size: 0.875rem;
    color: var(--text-secondary);
    margin-bottom: var(--space-6);
}

.pricing-price {
    margin-bottom: var(--space-6);
}

.pricing-amount {
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.pricing-period {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: var(--space-1);
}

.pricing-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-bottom: var(--space-8);
    flex: 1;
}

.pricing-feature {
    font-size: 0.875rem;
    color: var(--text-secondary);
    padding-left: var(--space-6);
    position: relative;
}

.pricing-feature::before {
    content: '';
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.pricing-feature::after {
    content: '';
    position: absolute;
    left: 4px;
    top: 10px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--illust-green);
}

.pricing-note {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-tertiary);
    margin-top: var(--space-8);
}

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

/* ---------------------------------------------------------------------------
 * FAQ
 * ------------------------------------------------------------------------- */

.faq-list {
    max-width: 720px;
    margin: var(--space-12) auto 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

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

.faq-item summary {
    padding: var(--space-5) var(--space-6);
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-primary);
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    transition: background 0.2s;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: '+';
    font-size: 1.25rem;
    color: var(--text-tertiary);
    flex-shrink: 0;
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: '−';
}

.faq-item summary:hover {
    background: var(--bg-hover);
}

.faq-answer {
    padding: 0 var(--space-6) var(--space-5);
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------------------------------------------------------------------------
 * Contact / CTA
 * ------------------------------------------------------------------------- */

.contact-section {
    border-top: 1px solid var(--border);
}

.contact-grid {
    display: grid;
    gap: var(--space-12);
    margin-top: var(--space-10);
}

.contact-info {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.contact-card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--space-6);
}

.contact-card h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.contact-card p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.contact-card a {
    color: var(--accent-light);
}

.contact-card a:hover {
    color: var(--accent);
}

@media (min-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ---------------------------------------------------------------------------
 * Form
 * ------------------------------------------------------------------------- */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.form-group label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-group input,
.form-group textarea {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: var(--space-3) var(--space-4);
    font-family: var(--font);
    font-size: 0.9375rem;
    color: var(--text-primary);
    transition: border-color 0.2s;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-group textarea {
    min-height: 120px;
    resize: vertical;
}

.field-error input,
.field-error textarea {
    border-color: var(--accent-light);
}

.form-error {
    font-size: 0.75rem;
    color: var(--accent-light);
    min-height: 1rem;
}

.honeypot {
    position: absolute;
    left: -9999px;
    opacity: 0;
    height: 0;
    overflow: hidden;
}

.form-flash {
    padding: var(--space-4) var(--space-5);
    border-radius: var(--radius-sm);
    font-size: 0.875rem;
    margin-bottom: var(--space-6);
}

.form-flash--success {
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    color: var(--illust-green);
}

.form-flash--error {
    background: rgba(193, 39, 45, 0.1);
    border: 1px solid rgba(193, 39, 45, 0.3);
    color: var(--accent-light);
}

.form-flash--error p {
    margin-bottom: var(--space-1);
}

.form-flash--error p:last-child {
    margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
 * Footer
 * ------------------------------------------------------------------------- */

.site-footer {
    border-top: 1px solid var(--border);
    padding: var(--space-10) 0;
}

.footer-inner {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    align-items: center;
    text-align: center;
}

.footer-brand p {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-top: var(--space-2);
}

.footer-links {
    display: flex;
    gap: var(--space-6);
    flex-wrap: wrap;
    justify-content: center;
}

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

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

.footer-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-4);
    margin-top: var(--space-8);
    padding-top: var(--space-6);
    border-top: 1px solid var(--border);
}

.footer-bottom span {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

.footer-lang {
    display: flex;
    gap: var(--space-3);
}

.footer-lang a {
    font-size: 0.75rem;
    color: var(--text-tertiary);
}

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

.footer-lang a[aria-current="true"] {
    color: var(--text-primary);
}

@media (min-width: 768px) {
    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }

    .footer-bottom {
        flex-direction: row;
        justify-content: space-between;
    }
}

/* ---------------------------------------------------------------------------
 * Legal pages
 * ------------------------------------------------------------------------- */

.legal-page {
    padding-top: calc(var(--header-height) + var(--space-16));
    padding-bottom: var(--space-20);
}

.legal-page .container {
    max-width: 720px;
}

.legal-page h1 {
    margin-bottom: var(--space-3);
}

.legal-meta {
    font-size: 0.8125rem;
    color: var(--text-tertiary);
    margin-bottom: var(--space-12);
}

.legal-section {
    margin-bottom: var(--space-8);
}

.legal-section h2 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-3);
}

.legal-section p {
    font-size: 0.9375rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ---------------------------------------------------------------------------
 * Scroll reveal
 * ------------------------------------------------------------------------- */

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal[data-delay="1"] { transition-delay: 0.1s; }
.reveal[data-delay="2"] { transition-delay: 0.2s; }
.reveal[data-delay="3"] { transition-delay: 0.3s; }
.reveal[data-delay="4"] { transition-delay: 0.4s; }

/* ---------------------------------------------------------------------------
 * Responsive breakpoints
 * ------------------------------------------------------------------------- */

@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-8);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-12);
    }
}

@media (min-width: 1280px) {
    .container {
        padding: 0 var(--space-6);
    }
}

/* ---------------------------------------------------------------------------
 * Light mode tokens (shared between system preference and manual toggle)
 * ------------------------------------------------------------------------- */

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) {
        --bg: #fafafa;
        --bg-surface: #ffffff;
        --bg-hover: #f4f4f5;
        --border: rgba(0, 0, 0, 0.06);
        --border-hover: rgba(0, 0, 0, 0.12);
        --text-primary: #18181b;
        --text-secondary: #3f3f46;
        --text-tertiary: #71717a;
        --accent: #b91c22;
        --accent-light: #C1272D;
        --accent-glow: rgba(185, 28, 34, 0.06);

        --illust-blue: #2563eb;
        --illust-green: #16a34a;
        --illust-orange: #ea580c;
        --illust-purple: #7c3aed;
    }
}

:root[data-theme="light"] {
    --bg: #fafafa;
    --bg-surface: #ffffff;
    --bg-hover: #f4f4f5;
    --border: rgba(0, 0, 0, 0.06);
    --border-hover: rgba(0, 0, 0, 0.12);
    --text-primary: #18181b;
    --text-secondary: #3f3f46;
    --text-tertiary: #71717a;
    --accent: #b91c22;
    --accent-light: #C1272D;
    --accent-glow: rgba(185, 28, 34, 0.06);

    --illust-blue: #2563eb;
    --illust-green: #16a34a;
    --illust-orange: #ea580c;
    --illust-purple: #7c3aed;
}

/* ---------------------------------------------------------------------------
 * Light mode overrides (system preference)
 * ------------------------------------------------------------------------- */

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) body {
        -webkit-font-smoothing: auto;
        -moz-osx-font-smoothing: auto;
    }

    :root:not([data-theme="dark"]) .site-header {
        background: rgba(250, 250, 250, 0.85);
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    }

    :root:not([data-theme="dark"]) .gradient-text {
        background: linear-gradient(135deg, #18181b 0%, #3f3f46 60%, #71717a 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
    }

    :root:not([data-theme="dark"]) .illust,
    :root:not([data-theme="dark"]) .pricing-card,
    :root:not([data-theme="dark"]) .faq-item,
    :root:not([data-theme="dark"]) .contact-card {
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
    }

    :root:not([data-theme="dark"]) .pricing-card--featured {
        box-shadow: 0 4px 24px rgba(185, 28, 34, 0.08);
    }

    :root:not([data-theme="dark"]) .illust-bar::after {
        background: rgba(0, 0, 0, 0.1);
    }

    :root:not([data-theme="dark"]) .hero::before,
    :root:not([data-theme="dark"]) .feature-section::before,
    :root:not([data-theme="dark"]) .stats-section::before {
        opacity: 1;
    }

    :root:not([data-theme="dark"]) .btn--outline {
        border-color: var(--border-hover);
        color: var(--text-primary);
    }

    :root:not([data-theme="dark"]) .btn--outline:hover {
        background: var(--bg-hover);
        border-color: rgba(0, 0, 0, 0.2);
    }

    :root:not([data-theme="dark"]) .form-group input,
    :root:not([data-theme="dark"]) .form-group textarea {
        background: #fff;
        border-color: var(--border-hover);
    }

    :root:not([data-theme="dark"]) .form-flash--success {
        background: rgba(22, 163, 74, 0.08);
        border-color: rgba(22, 163, 74, 0.25);
        color: #15803d;
    }

    :root:not([data-theme="dark"]) .form-flash--error {
        background: rgba(193, 39, 45, 0.06);
        border-color: rgba(193, 39, 45, 0.2);
        color: var(--accent);
    }

    :root:not([data-theme="dark"]) .form-error {
        color: var(--accent);
    }

    :root:not([data-theme="dark"]) .contact-card a {
        color: var(--accent);
    }

    :root:not([data-theme="dark"]) .contact-card a:hover {
        color: var(--accent-light);
    }

    :root:not([data-theme="dark"]) .pricing-feature::before {
        background: rgba(22, 163, 74, 0.1);
        border-color: rgba(22, 163, 74, 0.25);
    }

    :root:not([data-theme="dark"]) .step-number {
        background: var(--bg-surface);
        border-color: var(--border);
    }

    :root:not([data-theme="dark"]) .header-logo .logo-dark {
        display: none;
    }

    :root:not([data-theme="dark"]) .header-logo .logo-light {
        display: block;
    }
}

/* ---------------------------------------------------------------------------
 * Light mode overrides (explicit toggle)
 * ------------------------------------------------------------------------- */

:root[data-theme="light"] body {
    -webkit-font-smoothing: auto;
    -moz-osx-font-smoothing: auto;
}

:root[data-theme="light"] .site-header {
    background: rgba(250, 250, 250, 0.85);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

:root[data-theme="light"] .gradient-text {
    background: linear-gradient(135deg, #18181b 0%, #3f3f46 60%, #71717a 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

:root[data-theme="light"] .illust,
:root[data-theme="light"] .pricing-card,
:root[data-theme="light"] .faq-item,
:root[data-theme="light"] .contact-card {
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04), 0 4px 12px rgba(0, 0, 0, 0.03);
}

:root[data-theme="light"] .pricing-card--featured {
    box-shadow: 0 4px 24px rgba(185, 28, 34, 0.08);
}

:root[data-theme="light"] .illust-bar::after {
    background: rgba(0, 0, 0, 0.1);
}

:root[data-theme="light"] .hero::before,
:root[data-theme="light"] .feature-section::before,
:root[data-theme="light"] .stats-section::before {
    opacity: 1;
}

:root[data-theme="light"] .btn--outline {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

:root[data-theme="light"] .btn--outline:hover {
    background: var(--bg-hover);
    border-color: rgba(0, 0, 0, 0.2);
}

:root[data-theme="light"] .form-group input,
:root[data-theme="light"] .form-group textarea {
    background: #fff;
    border-color: var(--border-hover);
}

:root[data-theme="light"] .form-flash--success {
    background: rgba(22, 163, 74, 0.08);
    border-color: rgba(22, 163, 74, 0.25);
    color: #15803d;
}

:root[data-theme="light"] .form-flash--error {
    background: rgba(193, 39, 45, 0.06);
    border-color: rgba(193, 39, 45, 0.2);
    color: var(--accent);
}

:root[data-theme="light"] .form-error {
    color: var(--accent);
}

:root[data-theme="light"] .contact-card a {
    color: var(--accent);
}

:root[data-theme="light"] .contact-card a:hover {
    color: var(--accent-light);
}

:root[data-theme="light"] .pricing-feature::before {
    background: rgba(22, 163, 74, 0.1);
    border-color: rgba(22, 163, 74, 0.25);
}

:root[data-theme="light"] .step-number {
    background: var(--bg-surface);
    border-color: var(--border);
}

:root[data-theme="light"] .header-logo .logo-dark {
    display: none;
}

:root[data-theme="light"] .header-logo .logo-light {
    display: block;
}

/* ---------------------------------------------------------------------------
 * Theme toggle button
 * ------------------------------------------------------------------------- */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid var(--border-hover);
    background: transparent;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    padding: 0;
    flex-shrink: 0;
}

.theme-toggle:hover {
    background: var(--bg-hover);
    border-color: var(--text-tertiary);
}

.theme-toggle:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

.theme-toggle svg {
    width: 16px;
    height: 16px;
    fill: none;
    stroke: var(--text-secondary);
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.theme-icon-sun { display: none; }
.theme-icon-moon { display: block; }

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .theme-icon-sun { display: block; }
    :root:not([data-theme="dark"]) .theme-icon-moon { display: none; }
}

:root[data-theme="light"] .theme-icon-sun { display: block; }
:root[data-theme="light"] .theme-icon-moon { display: none; }

:root[data-theme="dark"] .theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: block; }

/* ---------------------------------------------------------------------------
 * Accessibility: reduced motion
 * ------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}

/* ---------------------------------------------------------------------------
 * Focus visible
 * ------------------------------------------------------------------------- */

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

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
details:focus-visible summary {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * Print styles
 * ------------------------------------------------------------------------- */

@media print {
    .site-header,
    .mobile-menu,
    .hero::before,
    .feature-section::before,
    .stats-section::before,
    .illust {
        display: none;
    }

    body {
        background: #fff;
        color: #000;
    }

    .section-label {
        color: #000;
    }

    a {
        color: #000;
        text-decoration: underline;
    }
}
