/* ============================================
   rtkUSA — Modern Light Theme
   Bold red + teal-blue from logo
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

:root {
    /* Backgrounds */
    --bg-primary: #ffffff;
    --bg-secondary: #f7f8fa;
    --bg-card: #ffffff;
    --bg-card-hover: #f9fafb;
    --bg-elevated: #f1f3f5;
    --bg-dark: #1a1d23;

    /* Borders */
    --border: #e2e5ea;
    --border-hover: #cdd1d8;

    /* Text */
    --text-primary: #111318;
    --text-secondary: #5a6170;
    --text-muted: #9199a6;

    /* Brand — Red */
    --red: #da3c3e;
    --red-hover: #c4292b;
    --red-light: #fef2f2;
    --red-border: #fecaca;
    --red-glow: rgba(218, 60, 62, 0.12);

    /* Brand — Teal Blue */
    --teal: #2ab0a8;
    --teal-hover: #1e978f;
    --teal-light: #effffe;
    --teal-border: #b2f0ec;
    --teal-glow: rgba(42, 176, 168, 0.10);

    /* Accent (primary action = red) */
    --accent: var(--red);
    --accent-hover: var(--red-hover);
    --accent-light: var(--red-light);
    --accent-glow: var(--red-glow);

    /* Status */
    --success: #16a34a;
    --success-light: #f0fdf4;
    --warning: #d97706;
    --warning-light: #fffbeb;
    --danger: #dc2626;
    --danger-light: #fef2f2;

    /* Misc */
    --radius: 8px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06);
    --shadow: 0 4px 16px rgba(0,0,0,0.07);
    --shadow-lg: 0 12px 40px rgba(0,0,0,0.10);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================================
   RESET
   ============================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: var(--font); line-height: 1.6; color: var(--text-primary); background: var(--bg-primary); overflow-x: hidden; }
a { color: var(--accent); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--accent-hover); }
img { max-width: 100%; }

/* Layout */
.container { max-width: 1200px; margin: 0 auto; padding: 0 2rem; }
.section { padding: 5rem 0; }
.section-dark { background: var(--bg-secondary); }
.section-dark-blue {
    background: hsla(218, 37%, 23%, 1);
}
.section-dark-blue .value-prop h2 { color: #ffffff; }
.section-dark-blue .value-prop p { color: rgba(255,255,255,0.7); }
.section-dark-blue .value-prop .tagline { color: rgba(255,255,255,0.7); }
.section-dark-blue .value-prop .tagline .check { background: rgba(42,176,168,0.2); border-color: rgba(42,176,168,0.4); color: var(--teal); }

/* ============================================
   NAVBAR
   ============================================ */
.navbar {
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid var(--border);
    padding: 0.85rem 0;
    position: sticky; top: 0; z-index: 1000;
}
.navbar-grid { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
.brand { justify-self: center; }
.brand img { height: 48px; transition: opacity var(--transition); }
.brand img:hover { opacity: 0.8; }
.nav-left, .nav-right { display: flex; gap: 2rem; align-items: center; }
.nav-left a, .nav-right a { color: var(--text-secondary); font-size: 0.875rem; font-weight: 500; letter-spacing: -0.01em; transition: color var(--transition); }
.nav-left a:hover, .nav-right a:hover { color: var(--text-primary); }
.nav-right { justify-content: flex-end; }
.btn-link { background: none; border: none; color: var(--text-secondary); cursor: pointer; font-size: 0.875rem; font-weight: 500; font-family: var(--font); }
.btn-link:hover { color: var(--text-primary); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.625rem 1.5rem; border-radius: var(--radius); font-weight: 600;
    cursor: pointer; border: none; font-size: 0.875rem; font-family: var(--font);
    transition: all var(--transition); letter-spacing: -0.01em;
}
.btn-primary {
    background: var(--red); color: #fff;
    box-shadow: 0 2px 8px var(--red-glow);
}
.btn-primary:hover { background: var(--red-hover); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(218,60,62,0.2); }
.btn-secondary { background: var(--bg-elevated); color: var(--text-primary); border: 1px solid var(--border); }
.btn-secondary:hover { background: var(--bg-card-hover); border-color: var(--border-hover); }
.btn-outline { background: transparent; color: var(--text-primary); border: 1px solid var(--border); }
.btn-outline:hover { border-color: var(--text-secondary); background: var(--bg-secondary); }
.btn-teal { background: var(--teal); color: #fff; box-shadow: 0 2px 8px var(--teal-glow); }
.btn-teal:hover { background: var(--teal-hover); color: #fff; transform: translateY(-1px); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; }
.btn-lg { padding: 0.875rem 2.25rem; font-size: 0.95rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 0.375rem 0.875rem; font-size: 0.8rem; }

/* ============================================
   FORMS
   ============================================ */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; margin-bottom: 0.4rem; font-weight: 500; font-size: 0.85rem; color: var(--text-secondary); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.65rem 1rem; border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 0.925rem; background: #fff; color: var(--text-primary);
    font-family: var(--font); transition: all var(--transition);
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-glow);
}
.form-group input::placeholder, .form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:disabled { opacity: 0.5; cursor: not-allowed; background: var(--bg-secondary); }
.form-group small { color: var(--text-muted); font-size: 0.8rem; }

/* ============================================
   CARDS
   ============================================ */
.card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.75rem; margin-bottom: 1rem;
    transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.card:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 0.75rem; font-size: 1.05rem; font-weight: 600; }

/* ============================================
   ALERTS
   ============================================ */
.alert { padding: 0.875rem 1.25rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid; font-size: 0.9rem; }
.alert-info { background: var(--teal-light); color: var(--teal); border-color: var(--teal-border); }
.alert-success { background: var(--success-light); color: var(--success); border-color: #bbf7d0; }
.alert-error { background: var(--danger-light); color: var(--danger); border-color: var(--red-border); }
.alert-warning { background: var(--warning-light); color: var(--warning); border-color: #fde68a; }

/* ============================================
   HERO — Bold split with dark background
   ============================================ */
.hero {
    position: relative; min-height: 88vh; display: flex; align-items: center;
    background: linear-gradient(165deg, #1a1d23 0%, #232830 50%, #1a1d23 100%);
    overflow: hidden;
}
.hero::before {
    content: ''; position: absolute; inset: 0;
    background: url('/static/images/hero-bg.jpg');
    background-size: cover; background-position: center;
    opacity: 0.15;
}
.hero::after {
    content: ''; position: absolute; bottom: 0; left: 0; right: 0; height: 200px;
    background: linear-gradient(to top, var(--bg-primary) 0%, transparent 100%);
}
.hero .container { position: relative; z-index: 2; }
.hero-content { max-width: 700px; }
.hero .overline {
    display: inline-block; font-size: 0.75rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.15em; color: var(--teal); margin-bottom: 1.25rem;
    padding: 0.4rem 1rem; border: 1px solid rgba(42,176,168,0.3); border-radius: 99px;
    background: rgba(42,176,168,0.1);
}
.hero h1 {
    font-size: 3.75rem; font-weight: 900; line-height: 1.08; margin-bottom: 1.25rem;
    letter-spacing: -0.035em; color: #ffffff;
}
.hero .subtitle { font-size: 1.2rem; color: #9ca3b0; line-height: 1.7; max-width: 540px; }
.hero .highlight { color: #ffffff; font-weight: 600; }
.hero-stats {
    display: flex; gap: 3rem; margin: 2.5rem 0; padding: 1.5rem 0;
    border-top: 1px solid rgba(255,255,255,0.1); border-bottom: 1px solid rgba(255,255,255,0.1);
}
.hero-stats .stat-value { font-size: 1.75rem; font-weight: 800; letter-spacing: -0.02em; color: #fff; }
.hero-stats .stat-label { font-size: 0.7rem; color: rgba(255,255,255,0.7); text-transform: uppercase; letter-spacing: 0.12em; margin-top: 0.2rem; }
.hero-actions { display: flex; gap: 1rem; margin-top: 2.5rem; }
.hero .btn-outline { color: #fff; border-color: rgba(255,255,255,0.2); }
.hero .btn-outline:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.4); }

/* ============================================
   FEATURES — Icon Cards
   ============================================ */
.features-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.25rem;
}
.feature-card {
    padding: 2rem 1.5rem; border-radius: var(--radius-lg);
    background: var(--bg-card); border: 1px solid var(--border);
    transition: all var(--transition); text-align: center; box-shadow: var(--shadow-sm);
}
.feature-card:hover { border-color: var(--border-hover); transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-icon {
    width: 52px; height: 52px; margin: 0 auto 1.25rem;
    border-radius: 14px; display: flex; align-items: center; justify-content: center;
    background: var(--red-light); border: 1px solid var(--red-border);
}
.feature-icon svg { width: 24px; height: 24px; stroke: var(--red); fill: none; stroke-width: 1.5; }
.feature-card h3 { font-size: 0.95rem; font-weight: 700; margin-bottom: 0.5rem; letter-spacing: -0.01em; color: var(--text-primary); }
.feature-card p { font-size: 0.85rem; color: var(--text-secondary); line-height: 1.6; }

/* Alternate: teal icons on even cards */
.feature-card:nth-child(even) .feature-icon { background: var(--teal-light); border-color: var(--teal-border); }
.feature-card:nth-child(even) .feature-icon svg { stroke: var(--teal); }

/* ============================================
   VALUE PROPOSITION
   ============================================ */
.value-prop { text-align: center; max-width: 720px; margin: 0 auto; }
.value-prop h2 {
    font-size: 2.5rem; font-weight: 800; margin-bottom: 1.25rem; letter-spacing: -0.03em;
    line-height: 1.15; color: var(--text-primary);
}
.value-prop p { font-size: 1.05rem; color: var(--text-secondary); line-height: 1.85; }
.value-prop .tagline {
    display: flex; gap: 2.5rem; justify-content: center; margin-top: 2.5rem;
    font-size: 0.875rem; color: var(--text-secondary);
}
.value-prop .tagline span { display: flex; align-items: center; gap: 0.5rem; }
.value-prop .tagline .check {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--teal-light); display: inline-flex; align-items: center; justify-content: center;
    color: var(--teal); font-size: 0.7rem; flex-shrink: 0; border: 1px solid var(--teal-border);
}

/* ============================================
   BRANDS
   ============================================ */
.brands-section { text-align: center; }
.brands-section h2 { font-size: 1rem; font-weight: 500; margin-bottom: 2.5rem; color: var(--text-muted); letter-spacing: 0.02em; }
.brands-grid {
    display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem;
}
.brands-grid span {
    font-size: 0.75rem; font-weight: 600; color: var(--text-muted);
    text-transform: uppercase; letter-spacing: 0.1em;
    padding: 0.6rem 1.25rem; border: 1px solid var(--border); border-radius: 99px;
    transition: all var(--transition);
}
.brands-grid span:hover { border-color: var(--teal); color: var(--teal); background: var(--teal-light); }

/* ============================================
   PRICING
   ============================================ */
.pricing-section { text-align: center; }
.pricing-section h2 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.pricing-section > .subtitle { color: var(--text-secondary); margin-bottom: 3rem; font-size: 1.05rem; }
.pricing-grid {
    display: grid; grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem; max-width: 1000px; margin: 0 auto;
}
.pricing-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-xl);
    padding: 2.5rem 2rem; text-align: center; transition: all var(--transition); position: relative;
    box-shadow: var(--shadow-sm);
}
.pricing-card:hover { border-color: var(--border-hover); transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.pricing-card.featured { border-color: var(--red); border-width: 2px; }
.pricing-card.featured::before {
    content: 'Best Value'; position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
    background: var(--red); color: #fff; padding: 0.3rem 1.25rem; border-radius: 99px;
    font-size: 0.7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em;
    box-shadow: 0 4px 12px var(--red-glow);
}
.pricing-card h3 { font-size: 1.1rem; font-weight: 600; margin-bottom: 1.25rem; color: var(--text-secondary); }
.pricing-card .price { font-size: 3.25rem; font-weight: 900; letter-spacing: -0.04em; line-height: 1; color: var(--text-primary); }
.pricing-card .price span { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.pricing-card .period { color: var(--text-muted); font-size: 0.85rem; margin: 0.75rem 0 2rem; }
.pricing-card ul { list-style: none; text-align: left; margin-bottom: 2rem; }
.pricing-card ul li {
    padding: 0.5rem 0; color: var(--text-secondary); font-size: 0.875rem;
    border-bottom: 1px solid var(--bg-secondary);
}
.pricing-card ul li::before { content: "\2713"; color: var(--teal); margin-right: 0.75rem; font-weight: 700; }

/* ============================================
   NETWORK
   ============================================ */
.section-charcoal { background: #2A2829; }
.section-charcoal .network-section h2 { color: #ffffff; }
.section-charcoal .network-section > p { color: rgba(255,255,255,0.7); }
.section-charcoal .network-feature { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.1); }
.section-charcoal .network-feature:hover { border-color: rgba(255,255,255,0.2); box-shadow: 0 4px 16px rgba(0,0,0,0.3); }
.section-charcoal .network-feature p { color: rgba(255,255,255,0.65); }

.network-section { max-width: 900px; margin: 0 auto; }
.network-section h2 { font-size: 2.25rem; font-weight: 800; margin-bottom: 1.25rem; letter-spacing: -0.03em; }
.network-section > p { color: var(--text-secondary); line-height: 1.85; margin-bottom: 2rem; font-size: 1.05rem; }
.network-features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.network-feature {
    padding: 1.75rem; background: var(--bg-card); border-radius: var(--radius-lg);
    border: 1px solid var(--border); transition: all var(--transition); box-shadow: var(--shadow-sm);
}
.network-feature:hover { border-color: var(--border-hover); box-shadow: var(--shadow); }
.network-feature h4 { color: var(--teal); margin-bottom: 0.75rem; font-size: 0.95rem; font-weight: 700; }
.network-feature p { font-size: 0.875rem; color: var(--text-secondary); margin: 0; line-height: 1.7; }

/* ============================================
   FAQ
   ============================================ */
.faq-section { max-width: 720px; margin: 0 auto; }
.faq-section h2 { text-align: center; font-size: 2.25rem; font-weight: 800; margin-bottom: 2.5rem; letter-spacing: -0.03em; }
.faq-section h3 { color: var(--teal); margin: 2.5rem 0 1rem; font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-question {
    width: 100%; padding: 1.25rem 0; background: none; border: none; color: var(--text-primary);
    font-size: 0.95rem; font-weight: 600; text-align: left; cursor: pointer; font-family: var(--font);
    display: flex; justify-content: space-between; align-items: center; gap: 1rem;
    transition: color var(--transition);
}
.faq-question:hover { color: var(--accent); }
.faq-question::after { content: "+"; font-size: 1.25rem; color: var(--text-muted); transition: all var(--transition); flex-shrink: 0; }
.faq-item.open .faq-question::after { content: "\2212"; color: var(--accent); }
.faq-answer { display: none; padding: 0 0 1.5rem; color: var(--text-secondary); line-height: 1.8; font-size: 0.9rem; }
.faq-item.open .faq-answer { display: block; }

/* ============================================
   CONTACT
   ============================================ */
.contact-section { max-width: 520px; margin: 0 auto; text-align: center; }
.contact-section h2 { font-size: 2.25rem; font-weight: 800; letter-spacing: -0.03em; margin-bottom: 0.5rem; }
.contact-section > p { color: var(--text-secondary); margin-bottom: 2.5rem; }
.contact-section form { text-align: left; }

/* ============================================
   TABLES
   ============================================ */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.85rem 1rem; text-align: left; border-bottom: 1px solid var(--border); }
th { font-weight: 600; color: var(--text-muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.08em; background: var(--bg-secondary); }
td { color: var(--text-primary); font-size: 0.9rem; }
tbody tr { transition: background var(--transition); }
tbody tr:hover { background: var(--bg-secondary); }

/* ============================================
   FOOTER
   ============================================ */
.footer {
    text-align: center; padding: 3rem 0; color: var(--text-muted);
    font-size: 0.8rem; border-top: 1px solid var(--border); letter-spacing: 0.01em;
}

/* ============================================
   AUTH PAGES
   ============================================ */
.auth-container { max-width: 420px; margin: 4rem auto; }
.auth-container h2 { margin-bottom: 0.25rem; font-weight: 800; letter-spacing: -0.02em; }

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-block; padding: 0.2rem 0.75rem; border-radius: 99px;
    font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em;
}
.badge-active { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-trialing { background: var(--teal-light); color: var(--teal); border: 1px solid var(--teal-border); }
.badge-expired { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-enabled { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.badge-disabled { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }
.badge-canceled { background: #f4f4f5; color: #71717a; border: 1px solid #e4e4e7; }
.badge-past-due, .badge-past_due { background: #fffbeb; color: #d97706; border: 1px solid #fde68a; }

/* ============================================
   CREDENTIALS
   ============================================ */
.credential-box {
    background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius);
    padding: 0.75rem 1rem; font-family: "SF Mono", Monaco, "Cascadia Code", "Fira Code", monospace;
    font-size: 1rem; display: flex; justify-content: space-between; align-items: center;
    letter-spacing: 0.02em; color: var(--text-primary);
}

/* ============================================
   STATS & GRIDS
   ============================================ */
.grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1.25rem; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.stat-card {
    background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-lg);
    padding: 1.5rem; text-align: center; box-shadow: var(--shadow-sm);
}
.stat-card .stat-value { font-size: 2rem; font-weight: 900; color: var(--text-primary); letter-spacing: -0.02em; }
.stat-card .stat-label { color: var(--text-muted); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.1em; margin-top: 0.25rem; }

/* ============================================
   PAGINATION
   ============================================ */
.pagination { display: flex; gap: 0.4rem; justify-content: center; margin-top: 2rem; }
.pagination a, .pagination span {
    padding: 0.45rem 0.9rem; border: 1px solid var(--border); border-radius: var(--radius);
    color: var(--text-secondary); font-size: 0.85rem; transition: all var(--transition);
}
.pagination a:hover { border-color: var(--accent); color: var(--accent); }
.pagination .active { background: var(--accent); color: #fff; border-color: var(--accent); }

/* ============================================
   DIVIDER
   ============================================ */
.section-divider {
    height: 1px; background: linear-gradient(90deg, transparent, var(--border), transparent);
    max-width: 600px; margin: 0 auto;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    .container { padding: 0 1.25rem; }
    .section { padding: 4rem 0; }
    .hero { min-height: 80vh; }
    .hero h1 { font-size: 2.5rem; }
    .hero-stats { gap: 1.5rem; }
    .hero-actions { flex-direction: column; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; margin: 0 auto; }
    .network-features { grid-template-columns: 1fr; }
    .value-prop h2 { font-size: 1.85rem; }
    .value-prop .tagline { flex-direction: column; gap: 0.75rem; align-items: center; }
    .nav-left, .nav-right { gap: 1rem; }
    .brand img { height: 40px; }
}
@media (max-width: 480px) {
    .features-grid { grid-template-columns: 1fr; }
    .hero h1 { font-size: 2rem; }
    .hero-stats { flex-direction: column; gap: 1rem; }
    .nav-left { display: none; }
    .nav-right a:not(.btn) { display: none; }
}
