/* Helvetica Neue Font Face Declarations - WOFF2 (Web Optimized) */
@font-face {
    font-family: 'Helvetica Neue';
    src: url('/fonts/HelveticaNeueCyr-Thin.woff2') format('woff2');
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvetica Neue';
    src: url('/fonts/HelveticaNeueCyr-Light.woff2') format('woff2');
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvetica Neue';
    src: url('/fonts/HelveticaNeueCyr-Roman.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvetica Neue';
    src: url('/fonts/HelveticaNeueCyr-Medium.woff2') format('woff2');
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'Helvetica Neue';
    src: url('/fonts/HelveticaNeueCyr-Bold.woff2') format('woff2');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

/* CSS Variables - Dark Theme */
:root {
    /* Background Colors */
    --bg-primary: #212121;
    --bg-secondary: #181818;
    --bg-card: #2d2d2d;
    --bg-card-hover: #3a3a3a;
    --bg-featured: #3e3e5e;

    /* Text Colors */
    --text-primary: #ECECF1;
    --text-secondary: #8e8e8e;
    --text-muted: #64748b;

    /* Accent Colors */
    --accent-primary: #5e5ee0;
    --accent-hover: #4d4dcf;
    --accent-success: #10b981;
    --border-color: #4d4d4d;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 1.5rem;
    --spacing-lg: 2rem;
    --spacing-xl: 3rem;
    --spacing-2xl: 4rem;

    /* Typography */
    --font-family: 'Helvetica Neue', -apple-system, BlinkMacSystemFont, 'Arial', sans-serif;

    /* Borders & Shadows */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.4);
}

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

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

/* NAVIGATION */
.navbar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    text-decoration: none;
    color: var(--text-primary);
}

.logo h1 {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 400;
    transition: color 0.2s ease;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-cta .btn-signin {
    padding: 0.625rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
}

.nav-cta .btn-signin:hover {
    background: var(--bg-card);
    border-color: var(--accent-primary);
}

.nav-cta .btn-dashboard {
    padding: 0.625rem 1.5rem;
    background: #10a37f;
    color: white;
    text-decoration: none;
    border-radius: 9999px;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
    border: none;
}

.nav-cta .btn-dashboard:hover {
    background: #0d8b6d;
}

/* PRICING PAGE */
.pricing-page {
    min-height: calc(100vh - 200px);
    padding: 4rem 2rem 3rem;
}

.pricing-container {
    max-width: 1400px;
    margin: 0 auto;
}

/* HERO SECTION */
.pricing-hero {
    text-align: center;
    margin-bottom: 4rem;
}

.pricing-hero h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    letter-spacing: -1px;
}

.pricing-hero .subtitle {
    font-size: 1.125rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* BILLING TOGGLE - View Transitions API Pill Toggle
   Grid-stacking: button + indicator share the same grid cell.
   The indicator <span> is moved between items by JS;
   view-transition-name on the indicator makes the browser morph it. */
.billing-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 3rem;
}

.toggle-pill {
    list-style: none;
    display: flex;
    gap: 4px;
    padding: 4px;
    border-radius: 50px;
    background: #2a2a2a;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.3);
}

.toggle-pill__item {
    display: grid;
}

/* Stack button and indicator in the same grid cell */
.toggle-pill__btn,
.toggle-pill__indicator {
    grid-area: 1 / 1;
}

.toggle-pill__btn {
    padding: 10px 24px;
    position: relative;
    z-index: 1;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    font-family: var(--font-family);
    cursor: pointer;
    white-space: nowrap;
    border-radius: 50px;
    transition: color 0.3s ease;
    view-transition-class: toggle-pill-btn;
}

.toggle-pill__btn[aria-selected="true"] {
    color: #1a1a1a;
}

.toggle-pill__btn:hover {
    color: var(--text-primary);
}

.toggle-pill__btn[aria-selected="true"]:hover {
    color: #000;
}

/* White indicator — fills its grid cell, morphs between items */
.toggle-pill__indicator {
    background: white;
    border-radius: 50px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    view-transition-name: toggle-pill-indicator;
}

/* View Transition animations */
::view-transition-group(toggle-pill-indicator) {
    z-index: 0;
    animation-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    animation-duration: 0.3s;
}

::view-transition-old(toggle-pill-indicator),
::view-transition-new(toggle-pill-indicator) {
    height: 100%;
    width: 100%;
}

/* Save badge */
.save-badge {
    background: var(--accent-success);
    color: white;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 0.2rem 0.5rem;
    border-radius: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-left: 6px;
    display: inline-block;
    vertical-align: middle;
}

/* Responsive */
@media (max-width: 767px) {
    .toggle-pill__btn {
        padding: 8px 20px;
        font-size: 14px;
    }

    .save-badge {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }

    /* Hide Free tier on mobile — first paid tier (Basic) should be
       immediately visible without scrolling down past a free option */
    .pricing-card:first-child {
        display: none;
    }

    /* Move "Get Started" button right under the price on mobile.
       User sees: Plan name → Price → Description → Button → Features.
       No need to scroll to see the CTA. */
    .pricing-card .cta-button {
        order: 1;
        margin-top: 1rem;
        margin-bottom: 1.5rem;
    }

    .pricing-card .feature-list {
        order: 2;
        margin-top: 0;
    }
}

/* PRICING GRID */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 2.5rem;
    max-width: 1400px;
    margin-left: auto;
    margin-right: auto;
}

/* PRICING CARD */
.pricing-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 2rem;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

/* FEATURED CARD */
.pricing-card.featured {
    background: linear-gradient(135deg, var(--bg-featured) 0%, #2d2d4d 100%);
    border-color: var(--accent-primary);
    transform: scale(1.02);
    box-shadow: var(--shadow-md);
}

.pricing-card.featured:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-lg);
}

/* POPULAR BADGE */
.popular-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-primary);
    color: white;
    padding: 0.375rem 0.875rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* CARD HEADER */
.card-header {
    margin-bottom: 0.5rem;
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

/* PRICE DISPLAY */
.card-price {
    display: flex;
    align-items: baseline;
    margin: 1.5rem 0 1rem;
}

.card-price .currency {
    font-size: 1.5rem;
    color: var(--text-secondary);
    margin-right: 0.25rem;
    font-weight: 400;
}

.card-price .amount {
    font-size: 3rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
}

.card-price .period {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-left: 0.25rem;
    font-weight: 400;
}

/* PLAN DESCRIPTION */
.plan-description {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* FEATURE LIST */
.feature-list {
    list-style: none;
    margin: 1.5rem 0;
    flex-grow: 1;
}

.feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.875rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.feature-list li svg {
    width: 20px;
    height: 20px;
    color: var(--accent-success);
    flex-shrink: 0;
    margin-top: 2px;
}

.feature-list li span {
    flex: 1;
}

/* CTA BUTTON */
.cta-button {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-primary);
    border-radius: 9999px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: var(--font-family);
    margin-top: auto;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cta-button:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent-primary);
    transform: translateY(-1px);
}

.cta-button:active {
    transform: translateY(0);
}

/* PRIMARY BUTTON (for featured card) */
.cta-button.primary {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: white;
}

.cta-button.primary:hover {
    background: var(--accent-hover);
    border-color: var(--accent-hover);
}

/* GUARANTEE NOTE */
.guarantee-note {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-top: 2rem;
}

/* FOOTER */
.main-footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 3rem 2rem 2rem;
    margin-top: 4rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-container--three-col {
    display: flex;
    justify-content: space-between;
}

.footer-section h4 {
    color: var(--text-primary);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: 0.625rem;
}

.footer-section ul li a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-section ul li a:hover {
    color: var(--text-primary);
}

.footer-section p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.375rem;
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* RESPONSIVE DESIGN */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .pricing-card.featured {
        grid-column: 1 / -1;
        max-width: 500px;
        margin: 0 auto;
    }

    .footer-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile (<768px) */
@media (max-width: 767px) {
    .navbar {
        padding: 1rem;
    }

    .nav-container {
        flex-direction: column;
        gap: 1rem;
    }

    .nav-links {
        gap: 1.5rem;
        flex-wrap: wrap;
        justify-content: center;
    }

    .pricing-page {
        padding: 2rem 1rem;
    }

    .pricing-hero h1 {
        font-size: 2rem;
    }

    .pricing-hero .subtitle {
        font-size: 1rem;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .pricing-card.featured {
        transform: scale(1);
        max-width: none;
    }

    .pricing-card.featured:hover {
        transform: translateY(-4px) scale(1);
    }

    .card-price .amount {
        font-size: 2.5rem;
    }

    .footer-container {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

/* Small Mobile (<480px) */
@media (max-width: 479px) {
    .pricing-hero h1 {
        font-size: 1.75rem;
    }

    .card-price .amount {
        font-size: 2.25rem;
    }

    .plan-name {
        font-size: 1.375rem;
    }
}

/* ========================================
   CSP-Compliant Utility Classes
   (Replaces inline styles for CSP nonce implementation)
   ======================================== */

/* Display utilities */
.hidden {
    display: none;
}

.inline-block {
    display: inline-block;
}

/* Text alignment utilities */
.text-center {
    text-align: center;
}

/* Margin utilities */
.mt-30 {
    margin-top: 30px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-20 {
    margin-bottom: 2rem;
}

.m-0 {
    margin: 0;
}

.mt-4 {
    margin-top: 4rem;
}

.mt-2 {
    margin-top: 2rem;
}

.mt-1 {
    margin-top: 1rem;
}

/* Vertical margin utilities (top AND bottom) */
.my-1 {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

/* Flexbox utilities */
.flex-row {
    display: flex;
}

.flex-center {
    display: flex;
    justify-content: center;
}

.flex-wrap {
    flex-wrap: wrap;
}

.flex-gap-1 {
    gap: 1rem;
}

/* Link styling */
.link-primary {
    color: var(--accent-primary);
    text-decoration: none;
}

.link-primary:hover {
    text-decoration: underline;
}

.link-large {
    font-size: 1.125rem;
    font-weight: 500;
}

/* Checklist styles (for safety page) */
.checklist {
    list-style: none;
    padding-left: 0;
}

.checklist-item {
    margin-bottom: 0.75rem;
    padding-left: 1.5rem;
    position: relative;
}

.checklist-icon {
    position: absolute;
    left: 0;
    font-weight: 700;
}

.checklist-icon-check {
    color: #10b981;
}

.checklist-icon-x {
    color: #ef4444;
}

.checklist-item-muted {
    color: var(--text-secondary);
}

.checklist-icon-bullet {
    color: var(--accent-primary);
}

/* Button utilities */
.cta-button-inline {
    display: inline-block;
    text-decoration: none;
    padding: 14px 32px;
}

/* Color utilities */
.text-muted {
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Section utilities */
.company-details {
    margin-top: 2rem;
}

/* Display utilities */
.hidden {
    display: none !important;
}
