/* ──────────────────────────────────────────────────────────
   Connectable Marketing Site — Styles
   ────────────────────────────────────────────────────────── */

/* ─── Reset & Variables ───────────────────────────────── */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --brand:       #005fcc;
    --brand-dark:  #004da8;
    --brand-light: #eff6ff;
    --text:        #1a1a2e;
    --text-muted:  #555;
    --bg:          #ffffff;
    --bg-alt:      #f8f9fb;
    --bg-dark:     #0d1117;
    --border:      #e2e5ea;
    --radius:      8px;
    --radius-lg:   16px;
    --shadow:      0 2px 8px rgba(0,0,0,0.06);
    --shadow-lg:   0 8px 32px rgba(0,0,0,0.10);
    --font:        -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    --max-w:       1120px;
    --transition:  0.2s ease;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a   { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 24px;
}

/* ─── Buttons ─────────────────────────────────────────── */
.btn {
    display: inline-block;
    padding: 12px 28px;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.4;
    border-radius: var(--radius);
    border: 2px solid var(--brand);
    background: var(--brand);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), color var(--transition);
}

.btn:hover {
    background: var(--brand-dark);
    border-color: var(--brand-dark);
    text-decoration: none;
    color: #fff;
}

.btn--outline {
    background: transparent;
    color: var(--brand);
}
.btn--outline:hover {
    background: var(--brand);
    color: #fff;
}

.btn--white {
    background: #fff;
    border-color: #fff;
    color: var(--brand);
}
.btn--white:hover {
    background: var(--brand-light);
    border-color: var(--brand-light);
    color: var(--brand-dark);
}

.btn--outline-white {
    background: transparent;
    border-color: #fff;
    color: #fff;
}
.btn--outline-white:hover {
    background: rgba(255,255,255,0.15);
}

.btn--sm {
    padding: 8px 20px;
    font-size: 14px;
}
.btn--lg {
    padding: 16px 36px;
    font-size: 17px;
}
.btn--block {
    display: block;
    width: 100%;
    text-align: center;
}

/* ─── Navigation ──────────────────────────────────────── */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}

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

.nav__brand {
    font-size: 20px;
    font-weight: 700;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 6px;
}
.nav__brand:hover { text-decoration: none; }

.nav__icon {
    font-size: 24px;
}

.nav__links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 28px;
}

.nav__links a {
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
}
.nav__links a:hover {
    color: var(--brand);
    text-decoration: none;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: transform var(--transition), opacity var(--transition);
}

/* ─── Hero ────────────────────────────────────────────── */
.hero {
    padding: 100px 0 80px;
    text-align: center;
    background: linear-gradient(170deg, var(--bg) 40%, var(--brand-light) 100%);
}

.hero__inner {
    max-width: 720px;
    margin: 0 auto;
}

.hero__title {
    font-size: clamp(32px, 5vw, 52px);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.hero__sub {
    font-size: 18px;
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 36px;
}

.hero__actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ─── Sections ────────────────────────────────────────── */
.section {
    padding: 80px 0;
}
.section--alt {
    background: var(--bg-alt);
}
.section--cta {
    background: var(--bg-dark);
    color: #fff;
}

.section__title {
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700;
    text-align: center;
    margin-bottom: 12px;
}

.section__sub {
    text-align: center;
    color: var(--text-muted);
    font-size: 17px;
    max-width: 600px;
    margin: 0 auto 48px;
}

.section__subtitle {
    text-align: center;
    font-size: 22px;
    font-weight: 600;
    margin: 56px 0 32px;
    color: var(--brand);
}

/* ─── Features Grid ───────────────────────────────────── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    position: relative;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 28px;
    transition: box-shadow var(--transition), transform var(--transition);
}
.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.feature-card--pro {
    border-color: var(--brand);
    border-width: 2px;
}

.feature-card__badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--brand);
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.05em;
}
.feature-card__badge--pro { background: #6366f1; }
.feature-card__badge--agency { background: #8b5cf6; }

.feature-card__icon {
    font-size: 32px;
    margin-bottom: 14px;
}

.feature-card h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 8px;
}

.feature-card p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* ─── Audience cards ──────────────────────────────────── */
.audience-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 32px; }
.audience-card { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px 24px; text-align: center; }
.audience-card__icon { font-size: 36px; margin-bottom: 12px; }
.audience-card h3 { font-size: 18px; margin-bottom: 8px; }
.audience-card p { font-size: 14px; color: var(--text-muted); }
@media (max-width: 700px) { .audience-grid { grid-template-columns: 1fr; } }

/* ─── Trust bar ───────────────────────────────────────── */
.trust-bar { display: flex; flex-wrap: nowrap; justify-content: center; gap: 24px; margin-top: 16px; font-size: 13px; color: var(--text-muted); }
.trust-bar span { display: flex; align-items: center; gap: 4px; white-space: nowrap; }
.trust-bar .check { color: #27ae60; font-weight: 700; }
@media (max-width: 800px) { .trust-bar { flex-wrap: wrap; gap: 12px; font-size: 12px; } }

/* ─── Marketplace callout ─────────────────────────────── */
.marketplace-callout { background: linear-gradient(135deg, #0d1117, #161b22); color: #fff; border-radius: var(--radius-lg); padding: 48px 40px; text-align: center; margin-top: 48px; }
.marketplace-callout h3 { font-size: 26px; margin-bottom: 12px; }
.marketplace-callout p { font-size: 16px; opacity: 0.85; max-width: 600px; margin: 0 auto 20px; }

/* ─── FAQ (homepage mini) ─────────────────────────────── */
.faq-mini { max-width: 700px; margin: 0 auto; }
.faq-mini details { border-bottom: 1px solid var(--border); }
.faq-mini summary { padding: 16px 0; font-weight: 600; cursor: pointer; font-size: 15px; list-style: none; display: flex; justify-content: space-between; align-items: center; }
.faq-mini summary::after { content: '+'; font-size: 20px; color: var(--text-muted); }
.faq-mini details[open] summary::after { content: '-'; }
.faq-mini details p { padding: 0 0 16px; font-size: 14px; color: var(--text-muted); }

/* ─── Download modal ──────────────────────────────────── */
.dl-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 10000; display: none; align-items: center; justify-content: center; }
.dl-overlay.active { display: flex; }
.dl-modal { background: #fff; border-radius: var(--radius-lg); padding: 40px 32px; max-width: 420px; width: 90%; text-align: center; position: relative; }
.dl-modal h3 { margin-bottom: 8px; font-size: 22px; }
.dl-modal p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.dl-modal input[type="email"] { width: 100%; padding: 12px 16px; font-size: 16px; border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 12px; font-family: var(--font); }
.dl-modal input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(0,95,204,0.15); }
.dl-modal .dl-close { position: absolute; top: 12px; right: 16px; background: none; border: none; font-size: 22px; cursor: pointer; color: #999; }
.dl-modal .dl-success { color: #27ae60; font-weight: 600; }
.dl-modal .dl-error { color: var(--brand); font-size: 13px; }

/* ─── CTA Section ─────────────────────────────────────── */
.cta {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}
.cta h2 {
    font-size: clamp(26px, 3.5vw, 38px);
    font-weight: 700;
    margin-bottom: 16px;
}
.cta p {
    font-size: 17px;
    opacity: 0.85;
    margin-bottom: 32px;
    line-height: 1.7;
}

/* ─── Footer ──────────────────────────────────────────── */
.footer {
    background: var(--bg-dark);
    color: rgba(255,255,255,0.7);
    padding: 48px 0 32px;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer__inner {
    display: flex;
    justify-content: space-between;
    gap: 40px;
    flex-wrap: wrap;
}

.footer__brand {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
}

.footer__copy {
    font-size: 13px;
    color: rgba(255,255,255,0.4);
    margin-top: 8px;
    font-weight: 400;
}

.footer__links {
    display: flex;
    gap: 56px;
}

.footer__links h4 {
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 12px;
}

.footer__links ul { list-style: none; }
.footer__links li { margin-bottom: 8px; }
.footer__links a { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer__links a:hover { color: #fff; text-decoration: none; }

/* ─── Pricing ─────────────────────────────────────────── */
.pricing-hero {
    padding: 80px 0 40px;
    text-align: center;
    background: linear-gradient(170deg, var(--bg) 40%, var(--brand-light) 100%);
}
.pricing-hero h1 {
    font-size: clamp(30px, 4.5vw, 46px);
    font-weight: 800;
    margin-bottom: 12px;
}
.pricing-hero p {
    font-size: 18px;
    color: var(--text-muted);
}

/* ─── Pricing Toggle ─────────────────────────────────── */
.pricing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 32px;
}
.pricing-toggle__label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    transition: color 0.2s;
}
.pricing-toggle__label--active {
    color: var(--text);
    font-weight: 600;
}
.pricing-toggle__switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
}
.pricing-toggle__switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.pricing-toggle__slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: var(--border);
    border-radius: 26px;
    transition: background 0.25s;
}
.pricing-toggle__slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: transform 0.25s;
}
.pricing-toggle__switch input:checked + .pricing-toggle__slider {
    background: var(--brand);
}
.pricing-toggle__switch input:checked + .pricing-toggle__slider::before {
    transform: translateX(22px);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.pricing-grid--3 {
    grid-template-columns: repeat(3, 1fr);
    max-width: 960px;
}

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

.pricing-card--featured {
    border: 2px solid var(--brand);
    box-shadow: var(--shadow-lg);
}

.pricing-card__ribbon {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--brand);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 20px;
    border-radius: 0 0 var(--radius) var(--radius);
    letter-spacing: 0.03em;
}

.pricing-card__header {
    text-align: center;
    margin-bottom: 28px;
}

.pricing-card__header h2 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
}

.pricing-card__price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
}

.pricing-card__amount {
    font-size: 48px;
    font-weight: 800;
    color: var(--text);
    line-height: 1;
}

.pricing-card__period {
    font-size: 16px;
    color: var(--text-muted);
}

.pricing-card__desc {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.5;
}

.pricing-card__features {
    list-style: none;
    flex: 1;
    margin-bottom: 28px;
}

.pricing-card__features li {
    font-size: 14px;
    padding: 8px 0 8px 28px;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.pricing-card__features li:last-child { border-bottom: none; }

.pricing-card__features li.yes::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: #27ae60;
    font-weight: 700;
    font-size: 15px;
}

.pricing-card__features li.no {
    color: var(--text-muted);
    opacity: 0.5;
}

.pricing-card__features li.no::before {
    content: "\2717";
    position: absolute;
    left: 0;
    color: #ccc;
    font-weight: 700;
    font-size: 15px;
}

/* ─── FAQ Accordion ───────────────────────────────────── */
.faq { max-width: 720px; margin: 0 auto; }
.faq__item { border-bottom: 1px solid var(--border); }

.faq__question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 20px 0;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    background: none;
    border: none;
    cursor: pointer;
    text-align: left;
    font-family: var(--font);
    line-height: 1.4;
}
.faq__question:hover { color: var(--brand); }

.faq__icon {
    font-size: 22px;
    font-weight: 400;
    color: var(--text-muted);
    flex-shrink: 0;
    margin-left: 16px;
    transition: transform var(--transition);
}

.faq__item.is-open .faq__icon { transform: rotate(45deg); }

.faq__answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; }
.faq__answer p { padding-bottom: 20px; font-size: 15px; color: var(--text-muted); line-height: 1.7; }

/* ─── Billing toggle ──────────────────────────────────── */
.billing-toggle {
    display: inline-flex;
    gap: 2px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2px;
    margin: 8px 0 4px;
}
.billing-btn {
    padding: 6px 16px;
    font-size: 13px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all var(--transition);
    background: var(--bg);
    color: var(--text);
}
.billing-btn.active {
    background: var(--brand);
    color: #fff;
}

/* ─── Admin & Account Styles ─────────────────────────── */
.admin-wrap {
    max-width: 960px;
    margin: 40px auto;
    padding: 0 24px;
    font-family: var(--font);
    color: var(--text);
}

.admin-wrap h1 {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 24px;
}

.admin-wrap h2 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 16px;
}

.admin-card {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    margin-bottom: 24px;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

.stat-box {
    background: var(--bg-alt);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
}

.stat-box__num {
    font-size: 32px;
    font-weight: 800;
    color: var(--brand);
}

.stat-box__label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.admin-table th,
.admin-table td {
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-weight: 600;
    background: var(--bg-alt);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}

.admin-table td {
    vertical-align: middle;
}

.admin-table code {
    font-size: 13px;
    background: var(--bg-alt);
    padding: 2px 6px;
    border-radius: 3px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge--active  { background: #d4edda; color: #155724; }
.badge--expired { background: #f8d7da; color: #721c24; }
.badge--pro     { background: var(--brand-light); color: var(--brand-dark); }
.badge--std     { background: #e2e5ea; color: #555; }

.form-row {
    margin-bottom: 16px;
}

.form-row label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 6px;
}

.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="password"],
.form-row textarea,
.form-row select {
    width: 100%;
    padding: 10px 14px;
    font-size: 15px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font);
    background: var(--bg);
}

.form-row input:focus,
.form-row textarea:focus,
.form-row select:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 3px rgba(0,95,204,0.15);
}

.alert {
    padding: 14px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: 14px;
}

.alert--success { background: #d4edda; color: #155724; }
.alert--error   { background: #f8d7da; color: #721c24; }
.alert--info    { background: #d1ecf1; color: #0c5460; }

/* ─── Responsive ──────────────────────────────────────── */
@media (max-width: 768px) {
    .nav__toggle { display: flex; }

    .nav__links {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        background: #fff;
        flex-direction: column;
        padding: 20px 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }

    .nav__links.is-open { display: flex; }

    .hero { padding: 64px 0 56px; }
    .hero__sub { font-size: 16px; }
    .section { padding: 56px 0; }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
    }

    .footer__inner { flex-direction: column; gap: 24px; }
    .footer__links { gap: 32px; }

    .admin-table { font-size: 12px; }
    .admin-table th, .admin-table td { padding: 8px 6px; }
}

@media (max-width: 480px) {
    .hero__actions { flex-direction: column; align-items: center; }
    .btn--lg { width: 100%; text-align: center; }
}
