/* ── SaaS Detail Page (shared template, lighter than Olynx) ── */

:root {
    --sd-bg: #000000;
    --sd-card: #0a0a0c;
    --sd-border: #1f1f23;
    --sd-text: #ffffff;
    --sd-muted: #a1a1aa;
    --sd-dim: #71717a;
    --sd-accent: #3b82f6;
    --sd-accent-2: #8b5cf6;
}

body.saas-detail {
    background: var(--sd-bg);
    color: var(--sd-text);
    font-family: 'Inter', -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    letter-spacing: -0.01em;
}

body.saas-detail h1,
body.saas-detail h2,
body.saas-detail h3,
body.saas-detail h4 {
    font-family: 'Inter', sans-serif;
    letter-spacing: -0.04em;
    color: var(--sd-text);
}

/* Per-app accent tints */
body.saas-detail.tint-red    { --sd-accent: #ef4444; --sd-accent-2: #f97316; }
body.saas-detail.tint-blue   { --sd-accent: #3b82f6; --sd-accent-2: #8b5cf6; }
body.saas-detail.tint-emerald{ --sd-accent: #10b981; --sd-accent-2: #06b6d4; }
body.saas-detail.tint-amber  { --sd-accent: #f59e0b; --sd-accent-2: #ef4444; }
body.saas-detail.tint-violet { --sd-accent: #8b5cf6; --sd-accent-2: #ec4899; }

/* ── Hero ── */
.sd-hero {
    position: relative;
    min-height: 92vh; /* fallback */
    min-height: 92svh; /* respects mobile chrome */
    padding: 140px 24px 80px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.sd-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, black, transparent);
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 0%, black, transparent);
}

.sd-hero-glow {
    position: absolute;
    top: -180px;
    left: 50%;
    transform: translateX(-50%);
    width: 720px;
    height: 460px;
    background: radial-gradient(ellipse at center, var(--sd-accent), transparent 70%);
    opacity: 0.18;
    filter: blur(90px);
    pointer-events: none;
    z-index: 0;
}

.sd-hero-pill {
    position: relative;
    z-index: 2;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--sd-muted);
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 28px;
    -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.sd-hero-pill-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sd-accent);
    box-shadow: 0 0 10px var(--sd-accent);
}

.sd-hero-logo {
    position: relative;
    z-index: 2;
    width: 104px;
    height: 104px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 28px;
    padding: 18px;
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.6),
                0 0 60px var(--sd-accent);
    -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
}

.sd-hero-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.sd-hero-title {
    position: relative;
    z-index: 2;
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.02;
    letter-spacing: -0.045em;
    margin-bottom: 22px;
    background: linear-gradient(180deg, #ffffff 30%, rgba(255, 255, 255, 0.45) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    max-width: 880px;
}

.sd-hero-tagline {
    position: relative;
    z-index: 2;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: var(--sd-muted);
    max-width: 640px;
    line-height: 1.6;
    margin-bottom: 40px;
}

.sd-hero-ctas {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Buttons ── */
.sd-btn-primary,
.sd-btn-secondary {
    padding: 12px 26px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1),
                background 0.25s ease,
                box-shadow 0.25s ease,
                border-color 0.25s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: none;
    font-family: inherit;
}

.sd-btn-primary {
    background: #ffffff;
    color: #000000;
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12),
                0 8px 22px rgba(255, 255, 255, 0.1);
}

.sd-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.22),
                0 14px 32px rgba(255, 255, 255, 0.18);
}

.sd-btn-secondary {
    background: rgba(255, 255, 255, 0.04);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.1);
    -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
}

.sd-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.18);
}

/* ── Stats strip ── */
.sd-stats-wrap {
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 900px;
    margin: 56px auto 0;
}

.sd-stats {
    display: grid;
    /* min(140px, 100%) lets the cell shrink to viewport at <320px instead of overflowing */
    grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr));
    gap: 1px;
    background: var(--sd-border);
    border: 1px solid var(--sd-border);
    border-radius: 16px;
    overflow: hidden;
}

.sd-stat {
    background: var(--sd-card);
    padding: 22px 18px;
    text-align: center;
}

.sd-stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    background: linear-gradient(180deg, #ffffff 25%, rgba(255, 255, 255, 0.4) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 4px;
    letter-spacing: -0.025em;
}

.sd-stat-label {
    color: var(--sd-dim);
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Sections ── */
.sd-section {
    padding: 110px 24px;
    position: relative;
}

.sd-section-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.sd-section-header {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 56px;
}

.sd-section-label {
    display: inline-block;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.72rem;
    letter-spacing: 0.08em;
    color: var(--sd-accent);
    text-transform: uppercase;
    margin-bottom: 14px;
}

.sd-section-title {
    font-size: clamp(1.8rem, 3.5vw, 2.6rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.08;
    margin-bottom: 16px;
    color: #ffffff;
}

.sd-section-subtitle {
    color: var(--sd-muted);
    font-size: 1rem;
    line-height: 1.65;
}

/* ── Bento Grid ── */
.sd-bento {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 16px;
}

.sd-bento-card {
    background: var(--sd-card);
    border: 1px solid var(--sd-border);
    border-radius: 16px;
    padding: 28px;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s, transform 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: transform, opacity;
}

.sd-bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle 360px at var(--mx, 50%) var(--my, 50%), var(--sd-accent), transparent 55%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.sd-bento-card:hover {
    border-color: rgba(255, 255, 255, 0.18);
    transform: translateY(-3px);
}

.sd-bento-card:hover::before { opacity: 0.12; }

.sd-bento-card > * { position: relative; z-index: 1; }

.sd-bento-card.span-2 { grid-column: span 2; }
.sd-bento-card.span-3 { grid-column: span 3; }
.sd-bento-card.span-4 { grid-column: span 4; }
.sd-bento-card.span-6 { grid-column: span 6; }

.sd-bento-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--sd-accent);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 18px;
}

.sd-bento-title {
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #ffffff;
    letter-spacing: -0.015em;
}

.sd-bento-text {
    color: var(--sd-muted);
    font-size: 0.92rem;
    line-height: 1.65;
}

.sd-bento-text strong {
    color: #ffffff;
    font-weight: 600;
}

/* ── CTA Section ── */
.sd-cta {
    text-align: center;
    padding: 100px 24px 140px;
    position: relative;
    overflow: hidden;
}

.sd-cta::before {
    content: '';
    position: absolute;
    inset: -10% -10% auto -10%;
    height: 70%;
    background: radial-gradient(ellipse 60% 100% at 50% calc(50% + var(--cta-glow-y, 0%)), var(--sd-accent), transparent 70%);
    opacity: 0.12;
    filter: blur(70px);
    pointer-events: none;
    will-change: transform;
}

.sd-cta-inner {
    position: relative;
    max-width: 720px;
    margin: 0 auto;
}

.sd-cta-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.05;
    margin-bottom: 16px;
    color: #ffffff;
}

.sd-cta-text {
    color: var(--sd-muted);
    font-size: 1.05rem;
    margin-bottom: 32px;
    line-height: 1.6;
}

.sd-cta-actions {
    display: inline-flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

/* ── Back link ── */
.sd-back {
    position: relative;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--sd-muted);
    font-size: 0.85rem;
    text-decoration: none;
    margin-bottom: 24px;
    transition: color 0.25s ease;
}

.sd-back:hover { color: #ffffff; }

/* ── Responsive ── */
@media (max-width: 900px) {
    .sd-bento { grid-template-columns: repeat(2, 1fr); }
    .sd-bento-card.span-2,
    .sd-bento-card.span-3,
    .sd-bento-card.span-4,
    .sd-bento-card.span-6 { grid-column: span 2; }
    .sd-section { padding: 70px 20px; }
}

@media (max-width: 600px) {
    .sd-bento { grid-template-columns: 1fr; }
    .sd-bento-card.span-2,
    .sd-bento-card.span-3,
    .sd-bento-card.span-4,
    .sd-bento-card.span-6 { grid-column: span 1; }
    .sd-hero {
        padding: 110px 20px 60px;
        min-height: auto;
    }
    .sd-hero-logo { width: 88px; height: 88px; padding: 14px; }
}
