/* ============================================
   CredClock — Landing Page CSS
   ============================================ */

:root {
    --cc-primary: #0d6efd;
    --cc-primary-hover: #0b5ed7;
    --cc-dark: #0f172a;
    --cc-text: #334155;
    --cc-muted: #556677;
    --cc-light: #f8fafc;
    --cc-border: #e2e8f0;
    --cc-white: #fff;
    --cc-green: #059669;
    --cc-red: #dc2626;
    --cc-amber: #d97706;
    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--cc-text);
    background: var(--cc-white);
}

a { color: var(--cc-primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* --- Focus styles --- */
a:focus-visible,
button:focus-visible,
input:focus-visible {
    outline: 2px solid var(--cc-primary);
    outline-offset: 2px;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

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

/* --- Skip link --- */
.skip-link {
    position: absolute;
    top: -100%;
    left: 0;
    padding: 0.5rem 1rem;
    background: var(--cc-primary);
    color: var(--cc-white);
    z-index: 10000;
    font-size: 0.9rem;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* --- Nav --- */
.landing-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1100px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    position: relative;
}

.landing-brand {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--cc-dark);
    text-decoration: none;
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.nav-toggle-bar {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--cc-dark);
    border-radius: 1px;
    transition: transform 0.2s, opacity 0.2s;
}

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.landing-nav-links a {
    font-size: 0.95rem;
    color: var(--cc-text);
    text-decoration: none;
}

.landing-nav-links a:hover {
    color: var(--cc-primary);
    text-decoration: none;
}

.nav-btn {
    padding: 0.45rem 1.1rem;
    border-radius: 6px;
    font-weight: 500;
    font-size: 0.9rem;
    transition: background-color 0.15s, border-color 0.15s, color 0.15s;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

.nav-btn-outline {
    border: 1px solid var(--cc-border);
    color: var(--cc-text);
}

.nav-btn-outline:hover {
    border-color: var(--cc-primary);
    color: var(--cc-primary);
    text-decoration: none;
}

.nav-btn-primary {
    background: var(--cc-primary);
    color: var(--cc-white) !important;
    border: 1px solid var(--cc-primary);
}

.nav-btn-primary:hover {
    background: var(--cc-primary-hover);
    text-decoration: none;
}

/* --- Hero --- */
.hero {
    padding: 4rem 1.5rem 3rem;
    background: linear-gradient(180deg, var(--cc-white) 0%, var(--cc-light) 100%);
    overflow: hidden;
}

.hero-split {
    display: flex;
    align-items: center;
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.hero-content {
    flex: 1;
    min-width: 0;
}

.hero-visual {
    flex: 0 0 360px;
    position: relative;
    height: 420px;
}

.hero h1 {
    font-size: 3rem;
    font-weight: 800;
    line-height: 1.15;
    color: var(--cc-dark);
    margin-bottom: 1.25rem;
}

.hero-accent {
    color: var(--cc-primary);
    display: block;
}

.hero-sub {
    font-size: 1.1rem;
    color: var(--cc-muted);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.cta-btn {
    display: inline-block;
    padding: 0.85rem 2rem;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: background-color 0.15s, border-color 0.15s, transform 0.1s;
    text-decoration: none;
    min-height: 48px;
}

.cta-btn:hover {
    transform: translateY(-1px);
}

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

.cta-primary {
    background: var(--cc-primary);
    color: var(--cc-white) !important;
    border: 2px solid var(--cc-primary);
}

.cta-primary:hover {
    background: var(--cc-primary-hover);
    border-color: var(--cc-primary-hover);
    text-decoration: none;
}

.cta-secondary {
    background: transparent;
    color: var(--cc-text);
    border: 2px solid var(--cc-border);
}

.cta-secondary:hover {
    border-color: var(--cc-primary);
    color: var(--cc-primary);
    text-decoration: none;
}

.hero-trust {
    font-size: 0.9rem;
    color: var(--cc-green);
    font-weight: 500;
}

/* --- Credential Ticker --- */
.ticker-window {
    position: absolute;
    inset: 0;
    overflow: hidden;
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(248,250,252,0) 0%, rgba(248,250,252,1) 100%);
    mask-image: linear-gradient(180deg, transparent 0%, black 8%, black 85%, transparent 100%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 8%, black 85%, transparent 100%);
}

.ticker-track {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    animation: ticker-scroll 20s linear infinite;
}

@keyframes ticker-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

.ticker-card {
    background: var(--cc-white);
    border: 1px solid var(--cc-border);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    border-left: 4px solid var(--cc-border);
    flex-shrink: 0;
}

.ticker-expired { border-left-color: #dc2626; }
.ticker-urgent { border-left-color: #f97316; }
.ticker-warning { border-left-color: #eab308; }
.ticker-ok { border-left-color: #22c55e; }

.ticker-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.35rem;
}

.ticker-label {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cc-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-right: 0.5rem;
}

.ticker-badge {
    display: inline-block;
    padding: 0.1rem 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    white-space: nowrap;
    flex-shrink: 0;
}

.badge-ssl { background: #d1fae5; color: #065f46; }
.badge-api { background: #fef3c7; color: #92400e; }
.badge-pw { background: #e8f0fe; color: #1a56db; }
.badge-ssh { background: #ede9fe; color: #5b21b6; }
.badge-token { background: #ffedd5; color: #9a3412; }
.badge-sa { background: #fce7f3; color: #9d174d; }

.ticker-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ticker-days {
    font-size: 0.8rem;
    font-weight: 600;
}

.ticker-days-red { color: #dc2626; }
.ticker-days-orange { color: #f97316; }
.ticker-days-yellow { color: #ca8a04; }
.ticker-days-green { color: #16a34a; }

.ticker-org {
    font-size: 0.75rem;
    color: var(--cc-muted);
}

/* Pause ticker on hover */
.ticker-window:hover .ticker-track {
    animation-play-state: paused;
}

/* --- Problem strip --- */
.problem-strip {
    background: var(--cc-dark);
    color: var(--cc-white);
    padding: 4rem 1.5rem;
}

.pain-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.pain-card {
    text-align: center;
}

.pain-icon {
    width: 40px;
    height: 40px;
    margin: 0 auto 0.75rem;
    display: block;
}

.pain-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #f87171;
    margin-bottom: 0.4rem;
}

.pain-card p {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* --- Features --- */
.features {
    padding: 5rem 1.5rem;
    background: var(--cc-white);
}

.features h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cc-dark);
    margin-bottom: 3rem;
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.feature-card {
    padding: 1.75rem;
    border: 1px solid var(--cc-border);
    border-radius: 10px;
    transition: box-shadow 0.2s, transform 0.2s;
}

.feature-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.feature-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 0.75rem;
    color: var(--cc-primary);
}

.feature-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--cc-dark);
    margin-bottom: 0.5rem;
}

.feature-card p {
    font-size: 0.92rem;
    color: var(--cc-muted);
    line-height: 1.6;
}

/* --- How it works --- */
.how-it-works {
    padding: 5rem 1.5rem;
    background: var(--cc-light);
}

.how-it-works h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cc-dark);
    margin-bottom: 3rem;
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2.5rem;
    max-width: 900px;
    margin: 0 auto;
    list-style: none;
    counter-reset: none;
    position: relative;
}

/* Connecting line between steps */
.steps::before {
    content: "";
    position: absolute;
    top: 24px;
    left: calc(16.67% + 24px);
    right: calc(16.67% + 24px);
    height: 2px;
    background: var(--cc-border);
}

.step {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-num {
    width: 48px;
    height: 48px;
    line-height: 48px;
    border-radius: 50%;
    background: var(--cc-primary);
    color: var(--cc-white);
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 auto 1rem;
}

.step h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--cc-dark);
    margin-bottom: 0.5rem;
}

.step p {
    font-size: 0.92rem;
    color: var(--cc-muted);
    line-height: 1.6;
}

/* --- MSP Section --- */
.msp-section {
    padding: 5rem 1.5rem;
    background: var(--cc-dark);
    color: var(--cc-white);
}

.msp-section h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.msp-sub {
    text-align: center;
    color: #94a3b8;
    font-size: 1.05rem;
    margin-bottom: 3rem;
}

.msp-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.msp-card {
    text-align: center;
    padding: 1.5rem;
    border: 1px solid #334155;
    border-radius: 10px;
}

.msp-icon {
    width: 36px;
    height: 36px;
    margin: 0 auto 0.75rem;
    display: block;
    color: #6ea8fe;
}

.msp-card h3 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--cc-white);
    margin-bottom: 0.4rem;
}

.msp-card p {
    font-size: 0.9rem;
    color: #94a3b8;
    line-height: 1.6;
}

/* --- Differentiator --- */
.differentiator {
    padding: 5rem 1.5rem;
    background: var(--cc-white);
}

.differentiator h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cc-dark);
    margin-bottom: 2.5rem;
}

.diff-grid {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.diff-col {
    padding: 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--cc-border);
}

.diff-col-highlight {
    border-color: var(--cc-green);
    background: #f0fdf4;
}

.diff-label {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid;
}

.diff-them { border-color: var(--cc-red); color: var(--cc-red); }
.diff-spread { border-color: var(--cc-amber); color: var(--cc-amber); }
.diff-us { border-color: var(--cc-green); color: var(--cc-green); }

.diff-col ul {
    list-style: none;
    padding: 0;
}

.diff-col ul li {
    padding: 0.4rem 0;
    font-size: 0.92rem;
    color: var(--cc-text);
    padding-left: 1.6rem;
    position: relative;
}

.diff-col:nth-child(1) ul li::before {
    content: "\2717";
    position: absolute;
    left: 0;
    color: var(--cc-red);
    font-weight: 600;
}

.diff-col:nth-child(2) ul li::before {
    content: "\2717";
    position: absolute;
    left: 0;
    color: var(--cc-amber);
    font-weight: 600;
}

.diff-col:nth-child(3) ul li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--cc-green);
    font-weight: 600;
}

.diff-note {
    text-align: center;
    margin-top: 2rem;
    font-size: 0.95rem;
    color: var(--cc-muted);
    font-style: italic;
}

/* --- Pricing --- */
.pricing {
    padding: 5rem 1.5rem;
    background: var(--cc-light);
}

.pricing h2 {
    text-align: center;
    font-size: 2rem;
    font-weight: 700;
    color: var(--cc-dark);
    margin-bottom: 0.5rem;
}

.pricing-sub {
    text-align: center;
    color: var(--cc-muted);
    margin-bottom: 3rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
}

.price-card {
    background: var(--cc-white);
    border: 1px solid var(--cc-border);
    border-radius: 10px;
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    transition: box-shadow 0.2s;
}

.price-card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.price-card-highlight {
    border-color: var(--cc-primary);
    box-shadow: 0 0 0 1px var(--cc-primary);
}

.price-card h3 {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--cc-dark);
    margin-bottom: 0.75rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--cc-dark);
    margin-bottom: 1.5rem;
}

.price span {
    font-size: 1rem;
    font-weight: 400;
    color: var(--cc-muted);
}

.price-card ul {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
    text-align: left;
}

.price-card ul li {
    padding: 0.35rem 0;
    font-size: 0.9rem;
    color: var(--cc-text);
    padding-left: 1.4rem;
    position: relative;
}

.price-card ul li::before {
    content: "\2713";
    position: absolute;
    left: 0;
    color: var(--cc-green);
    font-weight: 600;
}

.price-cta {
    display: inline-block;
    padding: 0.55rem 1.5rem;
    border: 2px solid var(--cc-primary);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cc-primary);
    text-decoration: none;
    transition: background-color 0.15s, color 0.15s;
    min-height: 44px;
    line-height: 1.5;
}

.price-cta:hover {
    background: var(--cc-primary);
    color: var(--cc-white);
    text-decoration: none;
}

.price-cta-fill {
    background: var(--cc-primary);
    color: var(--cc-white) !important;
}

.price-cta-fill:hover {
    background: var(--cc-primary-hover);
}

/* Waitlist form */
.waitlist-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
}

.waitlist-input {
    width: 100%;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    font-family: var(--font);
    border: 1px solid var(--cc-border);
    border-radius: 4px;
    text-align: center;
    color: var(--cc-text);
}

.waitlist-input:focus {
    border-color: var(--cc-primary);
    outline: none;
    box-shadow: 0 0 0 3px rgba(13, 110, 253, 0.15);
}

.price-cta-waitlist {
    display: inline-block;
    padding: 0.55rem 1.5rem;
    border: 2px solid var(--cc-primary);
    border-radius: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--cc-primary);
    background: none;
    cursor: pointer;
    font-family: var(--font);
    transition: background-color 0.15s, color 0.15s;
    min-height: 44px;
}

.price-cta-waitlist:hover {
    background: var(--cc-primary);
    color: var(--cc-white);
}

/* --- Final CTA --- */
.final-cta {
    padding: 5rem 1.5rem;
    text-align: center;
    background: var(--cc-dark);
    color: var(--cc-white);
}

.final-cta h2 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.final-cta p {
    font-size: 1.1rem;
    color: #94a3b8;
    margin-bottom: 2rem;
}

.final-cta .cta-primary {
    font-size: 1.1rem;
    padding: 0.85rem 2.5rem;
}

/* --- Footer --- */
.landing-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--cc-border);
    background: var(--cc-white);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-brand {
    font-weight: 700;
    color: var(--cc-dark);
    font-size: 1rem;
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.9rem;
    color: var(--cc-muted);
}

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

.footer-copy {
    font-size: 0.85rem;
    color: var(--cc-muted);
}

/* --- Responsive --- */
@media (max-width: 900px) {
    .feature-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .diff-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
    }
}

@media (max-width: 768px) {
    .nav-toggle {
        display: flex;
    }

    .landing-nav-links {
        display: none;
        flex-direction: column;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--cc-white);
        border-bottom: 1px solid var(--cc-border);
        padding: 1rem 1.5rem;
        gap: 0.75rem;
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
        z-index: 100;
        align-items: stretch;
        text-align: center;
    }

    .landing-nav-links.nav-open {
        display: flex;
    }

    .hero-split {
        flex-direction: column;
        text-align: center;
    }

    .hero-visual {
        flex: none;
        width: 100%;
        max-width: 340px;
        height: 300px;
        margin: 0 auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero h1 {
        font-size: 2.2rem;
    }

    .hero-sub {
        font-size: 1rem;
    }

    .feature-grid,
    .steps,
    .msp-grid,
    .pain-grid {
        grid-template-columns: 1fr;
    }

    .steps::before {
        display: none;
    }

    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 380px;
        margin: 0 auto;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        transition: none !important;
    }
}
