/* ==========================================================================
   ParPath Comparison Pages — Shared Stylesheet
   Accessibility: WCAG 2.2 AA · Responsive · Semantic
   ========================================================================== */

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html, body { overflow-x: hidden; }

/* ---------- Design Tokens ---------- */
:root {
    --deep-fairway: #082620;
    --fairway-elevated: #0D3D30;
    --fairway-card: #184A3A;
    --electric-lime: #5CDB95;
    --electric-lime-hover: #6ee8a4;
    --hazard-red: #FF6B61;
    --gold: #FFD700;

    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-tertiary: rgba(255, 255, 255, 0.62);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-hover: rgba(92, 219, 149, 0.4);

    /* Type scale (rem) */
    --text-xs: 0.75rem;
    --text-sm: 0.8125rem;
    --text-base: 0.875rem;
    --text-body: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.75rem;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--deep-fairway);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.5;
    font-kerning: normal;
}

/* ==========================================================================
   Skip Link (SC 2.4.1)
   ========================================================================== */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    z-index: 1000;
    padding: 0.75rem 1.5rem;
    background: var(--electric-lime);
    color: var(--deep-fairway);
    font-weight: 700;
    font-size: var(--text-base);
    text-decoration: none;
    border-radius: 0 0 0.5rem 0;
}
.skip-link:focus { top: 0; }

/* ==========================================================================
   Focus Indicators (SC 2.4.7 / 2.4.11)
   ========================================================================== */
:focus-visible {
    outline: 3px solid var(--electric-lime);
    outline-offset: 2px;
}
:focus:not(:focus-visible) {
    outline: none;
}

/* ==========================================================================
   Reduced Motion (SC 2.3.3)
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    max-width: 60rem;
    margin: 0 auto;
}
.nav-logo {
    font-size: var(--text-xl);
    font-weight: 800;
    letter-spacing: -0.02em;
    text-decoration: none;
    color: #fff;
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
}
.nav-logo span { color: var(--electric-lime); }
.nav-logo-arc {
    width: 52px;
    height: 8px;
    margin-bottom: -5px;
    display: block;
}
.nav-logo-arc path {
    fill: none;
    stroke: rgba(92, 219, 149, 0.6);
    stroke-width: 1.5;
    stroke-linecap: round;
}

.nav-links { display: flex; gap: 1.25rem; align-items: center; }
.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: var(--text-base);
    font-weight: 500;
    transition: color 0.2s;
}
.nav-links a:hover { color: #fff; }
.nav-links a[aria-current="page"] {
    color: #fff;
    font-weight: 600;
}
.nav-cta {
    background: var(--electric-lime) !important;
    color: var(--deep-fairway) !important;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-weight: 700 !important;
    font-size: var(--text-sm) !important;
    min-height: 2.75rem;
    display: inline-flex !important;
    align-items: center;
}

/* ==========================================================================
   Container
   ========================================================================== */
.container {
    max-width: 60rem;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.breadcrumb {
    padding: 1rem 0 0;
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}
.breadcrumb a {
    color: var(--text-tertiary);
    text-decoration: none;
    transition: color 0.2s;
}
.breadcrumb a:hover { color: var(--electric-lime); }
.breadcrumb .sep { margin: 0 0.5rem; }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
    text-align: center;
    padding: 3rem 0 2.5rem;
}

/* Hub page badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    background: rgba(92, 219, 149, 0.12);
    border: 1px solid rgba(92, 219, 149, 0.25);
    border-radius: 1.25rem;
    padding: 0.375rem 0.875rem;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--electric-lime);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero h1 {
    font-size: clamp(2rem, 1.4rem + 2.5vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
    margin-bottom: 1rem;
    text-wrap: balance;
}
.hero h1 .highlight { color: var(--electric-lime); }

.hero p {
    font-size: var(--text-body);
    color: var(--text-secondary);
    max-width: 40rem;
    margin: 0 auto;
    line-height: 1.6;
}

/* ==========================================================================
   Competitors Grid (hub page)
   ========================================================================== */
.competitors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(17.5rem, 1fr));
    gap: 1rem;
    padding: 1.25rem 0 3.75rem;
}

.competitor-card {
    background: var(--fairway-card);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.5rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.3s, transform 0.3s, box-shadow 0.3s;
    display: flex;
    flex-direction: column;
}
.competitor-card:hover,
.competitor-card:focus-visible {
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: 0 0.75rem 2rem rgba(0, 0, 0, 0.3);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 0.75rem;
}
.card-icon {
    width: 3rem;
    height: 3rem;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.375rem;
    font-weight: 700;
    flex-shrink: 0;
}
.card-name {
    font-size: var(--text-lg);
    font-weight: 700;
}
.card-ratings {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    margin-top: 0.125rem;
}
.card-weakness {
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.5;
    flex: 1;
    margin-bottom: 1rem;
}
.card-link {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    color: var(--electric-lime);
    font-size: var(--text-base);
    font-weight: 600;
}
.card-link svg {
    width: 1rem;
    height: 1rem;
    transition: transform 0.2s;
}
.competitor-card:hover .card-link svg {
    transform: translateX(4px);
}

/* ==========================================================================
   Value Section (hub page)
   ========================================================================== */
.value-section {
    text-align: center;
    padding: 2.5rem 0 3.75rem;
    border-top: 1px solid var(--glass-border);
}
.value-section h2 {
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    text-wrap: balance;
}
.value-section p {
    font-size: var(--text-body);
    color: var(--text-secondary);
    max-width: 33rem;
    margin: 0 auto 1.5rem;
    line-height: 1.6;
}

/* ==========================================================================
   Comparison Table
   ========================================================================== */
.table-section {
    padding: 1.25rem 0 3.75rem;
}
.table-section h2 {
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    text-align: center;
    text-wrap: balance;
}

.table-scroll-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: 1rem;
}

.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--fairway-card);
    border-radius: 1rem;
    border: 1px solid var(--glass-border);
    overflow: hidden;
}
.comparison-table thead th {
    padding: 1rem 1.25rem;
    font-size: var(--text-base);
    font-weight: 700;
    text-align: left;
    border-bottom: 1px solid var(--glass-border);
    color: var(--text-secondary);
    background: var(--fairway-card);
}
.comparison-table thead th:first-child {
    width: 40%;
}
.comparison-table thead th:nth-child(2) {
    color: var(--electric-lime);
}

.comparison-table tbody td {
    padding: 0.875rem 1.25rem;
    font-size: var(--text-base);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.comparison-table tbody tr:last-child td {
    border-bottom: none;
}
.comparison-table tbody td:first-child {
    font-weight: 600;
    color: var(--text-primary);
}
.comparison-table tbody td:nth-child(2) {
    color: var(--text-primary);
    background: rgba(92, 219, 149, 0.04);
}
.comparison-table tbody td:nth-child(3) {
    color: var(--text-secondary);
}

.check { color: var(--electric-lime); font-weight: 700; }
.cross { color: var(--hazard-red); font-weight: 700; }
.partial { color: var(--gold); font-weight: 700; }
.win { background: rgba(92, 219, 149, 0.08); }
.win td:nth-child(2) { background: rgba(92, 219, 149, 0.10); }

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing-section {
    padding: 1.25rem 0 3.75rem;
}
.pricing-section h2 {
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.25rem;
    text-align: center;
    text-wrap: balance;
}
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
.pricing-card {
    background: var(--fairway-card);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 1.75rem;
}
.pricing-card.parpath {
    border-color: rgba(92, 219, 149, 0.3);
    background: linear-gradient(160deg, var(--fairway-card) 0%, rgba(92, 219, 149, 0.06) 100%);
    box-shadow: 0 0 2rem rgba(92, 219, 149, 0.06);
}
.pricing-card h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: 1rem;
}
.pricing-card.parpath h3 {
    color: var(--electric-lime);
}
.pricing-tier {
    margin-bottom: 0.75rem;
}
.pricing-tier .tier-name {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 0.25rem;
}
.pricing-tier .tier-price {
    font-size: var(--text-lg);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.pricing-tier .tier-price small {
    color: var(--text-tertiary);
    font-size: var(--text-base);
    font-weight: 400;
}
.pricing-tier .tier-detail {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    margin-top: 0.125rem;
    line-height: 1.5;
}
.pricing-note {
    font-size: var(--text-sm);
    color: var(--electric-lime);
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--glass-border);
    font-weight: 600;
}

/* ==========================================================================
   Content Sections
   ========================================================================== */
.content-section {
    padding: 2.5rem 0;
    border-top: 1px solid var(--glass-border);
}
.content-section h2 {
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1rem;
    text-wrap: balance;
}
.content-section p {
    font-size: var(--text-body);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 1rem;
    max-width: 65ch;
}
.content-section p:last-child {
    margin-bottom: 0;
}

/* ==========================================================================
   FAQ — <details>/<summary>
   ========================================================================== */
.faq-section {
    padding: 2.5rem 0 3.75rem;
    border-top: 1px solid var(--glass-border);
}
.faq-section h2 {
    font-size: var(--text-2xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.5rem;
    text-wrap: balance;
}
.faq-subtitle {
    font-size: var(--text-body);
    color: var(--text-tertiary);
    margin-bottom: 1.5rem;
}

.faq-item {
    background: var(--fairway-card);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
}
.faq-question {
    width: 100%;
    background: none;
    border: none;
    color: var(--text-primary);
    font-family: inherit;
    font-size: var(--text-body);
    font-weight: 600;
    text-align: left;
    padding: 1.125rem 3rem 1.125rem 1.25rem;
    cursor: pointer;
    position: relative;
    display: block;
    min-height: 2.75rem;
}
.faq-question:hover {
    background: rgba(255, 255, 255, 0.03);
}
.faq-question .icon {
    position: absolute;
    right: 1.25rem;
    top: 1.125rem;
    font-size: var(--text-lg);
    color: var(--electric-lime);
    transition: transform 0.2s;
    user-select: none;
}
.faq-item.open .faq-question .icon {
    transform: rotate(45deg);
}
.faq-answer {
    display: none;
    padding: 0 1.25rem 1.125rem;
    font-size: var(--text-base);
    color: var(--text-secondary);
    line-height: 1.6;
}
.faq-item.open .faq-answer {
    display: block;
}
.faq-attribution {
    display: block;
    font-size: var(--text-sm);
    font-weight: 400;
    color: var(--text-tertiary);
    margin-top: 0.25rem;
}
.faq-stars {
    color: var(--gold);
    letter-spacing: 0.08em;
    font-size: var(--text-sm);
}
.faq-source {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--glass-border);
}
.faq-source a {
    color: var(--text-secondary);
    text-decoration: underline;
    text-underline-offset: 2px;
    transition: color 0.2s;
}
.faq-source a:hover {
    color: var(--electric-lime);
}

/* ==========================================================================
   CTA
   ========================================================================== */
.cta-section {
    text-align: center;
    padding: 3.75rem 0;
    border-top: 1px solid var(--glass-border);
}
.cta-section h2 {
    font-size: var(--text-3xl);
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    text-wrap: balance;
}

.cta-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 1rem 2rem;
    background: var(--electric-lime);
    color: var(--deep-fairway);
    font-size: var(--text-body);
    font-weight: 700;
    font-family: inherit;
    border: none;
    border-radius: 0.75rem;
    cursor: pointer;
    text-decoration: none;
    transition: background 0.3s, transform 0.3s, box-shadow 0.3s;
    box-shadow: 0 0.25rem 1rem rgba(92, 219, 149, 0.3);
    min-height: 2.75rem;
}
.cta-btn:hover {
    background: var(--electric-lime-hover);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(92, 219, 149, 0.4);
}
.cta-btn svg { width: 1.25rem; height: 1.25rem; }

.cta-note {
    font-size: var(--text-sm);
    color: var(--text-tertiary);
    margin-top: 0.75rem;
}

/* ==========================================================================
   Related Comparisons
   ========================================================================== */
.related-section {
    padding: 2.5rem 0 3.75rem;
    border-top: 1px solid var(--glass-border);
}
.related-section h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
    text-align: center;
    color: var(--text-secondary);
}
.related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(12.5rem, 1fr));
    gap: 0.625rem;
}
.related-link {
    background: var(--fairway-card);
    border: 1px solid var(--glass-border);
    border-radius: 0.625rem;
    padding: 0.875rem 1.125rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: var(--text-base);
    font-weight: 600;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    text-align: center;
    min-height: 2.75rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
}
.related-link svg {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}
.related-link:hover,
.related-link:focus-visible {
    border-color: var(--glass-border-hover);
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1.5rem rgba(0, 0, 0, 0.2);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    text-align: center;
    padding: 1.5rem;
    border-top: 1px solid var(--glass-border);
    font-size: var(--text-xs);
    color: var(--text-tertiary);
}
.footer a {
    color: var(--text-tertiary);
    text-decoration: none;
}
.footer-links {
    display: flex;
    justify-content: center;
    gap: 1.25rem;
    margin-bottom: 0.75rem;
}
.footer-links a:hover { color: var(--electric-lime); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 40rem) {
    .nav-links a:not(.nav-cta) { display: none; }
    .hero { padding: 2rem 0 1.5rem; }
    .competitors-grid { grid-template-columns: 1fr; }
    .pricing-grid { grid-template-columns: 1fr; }
    .related-grid { grid-template-columns: 1fr 1fr; }

    /* Mobile table: stack feature name above values */
    .comparison-table thead th:first-child,
    .comparison-table tbody td:first-child {
        width: auto;
        min-width: 6rem;
    }
    .comparison-table thead th,
    .comparison-table tbody td {
        padding: 0.625rem 0.75rem;
        font-size: var(--text-sm);
    }
    .comparison-table {
        min-width: 0;
    }
}
