/* ============================================================
   ST Explorer — landing page
   Glass / liquid Apple-style aesthetic
   ============================================================ */

:root {
    /* Surfaces */
    --bg: #F5F5F7;
    --bg-tinted: #FAFAFC;
    --bg-dark: #0A0A0C;
    --bg-dark-soft: #14141A;

    /* Text */
    --text: #1D1D1F;
    --text-muted: #6E6E73;
    --text-faint: #A1A1A6;
    --text-on-dark: #F5F5F7;
    --text-on-dark-muted: #A1A1A6;

    /* Accents */
    --accent: #0071E3;
    --accent-hover: #0066D6;
    --accent-purple: #BF5AF2;
    --accent-cyan: #62B6FF;
    --accent-green: #30D158;

    /* Glass */
    --glass-bg: rgba(255, 255, 255, 0.55);
    --glass-bg-strong: rgba(255, 255, 255, 0.75);
    --glass-bg-dark: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-border-dark: rgba(255, 255, 255, 0.08);

    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 24px 64px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 40px 80px rgba(0, 0, 0, 0.18);

    /* Radii */
    --r-sm: 12px;
    --r-md: 20px;
    --r-lg: 28px;
    --r-pill: 980px;
}

/* ============================================================
   Reset / base
   ============================================================ */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
                 "Segoe UI", "Inter", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.5;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease;
}
a:hover {
    color: var(--accent-hover);
}

img {
    max-width: 100%;
    display: block;
}

kbd {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
    font-size: 0.85em;
    color: var(--text);
}

/* ============================================================
   Typography
   ============================================================ */
h1, h2, h3 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.05;
}
h1 {
    font-size: clamp(48px, 8vw, 104px);
    letter-spacing: -0.05em;
}
h2 {
    font-size: clamp(36px, 5.2vw, 72px);
    letter-spacing: -0.04em;
    line-height: 1.08;
}
h3 {
    font-size: 22px;
    letter-spacing: -0.02em;
}

p {
    margin: 0;
}

.lead {
    font-size: clamp(18px, 2vw, 22px);
    color: var(--text-muted);
    max-width: 600px;
    margin: 24px auto 0;
    line-height: 1.5;
}

.section-lead {
    font-size: clamp(17px, 1.5vw, 20px);
    color: var(--text-muted);
    max-width: 560px;
    margin: 20px auto 0;
}

.eyebrow {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.12em;
    margin: 0 0 16px;
}
.eyebrow-dark {
    color: var(--accent-cyan);
}

.gradient-text {
    background: linear-gradient(120deg, #0A84FF 0%, #BF5AF2 50%, #FF375F 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.small-print {
    font-size: 13px;
    color: var(--text-faint);
    margin-top: 28px;
}

/* ============================================================
   Layout primitives
   ============================================================ */
.container {
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 32px;
    position: relative;
}
.container.narrow {
    max-width: 760px;
}
.container.center,
.center {
    text-align: center;
}

.section {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.section-tinted {
    background: var(--bg-tinted);
}

.section-dark {
    background: var(--bg-dark);
    color: var(--text-on-dark);
}
.section-dark .lead,
.section-dark .section-lead {
    color: var(--text-on-dark-muted);
}
.section-dark p {
    color: var(--text-on-dark-muted);
}
.section-dark kbd {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--text-on-dark);
}
.section-dark a {
    color: var(--accent-cyan);
}

/* ============================================================
   Glass surface
   ============================================================ */
.glass {
    background: var(--glass-bg);
    -webkit-backdrop-filter: blur(40px) saturate(180%);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid var(--glass-border);
    border-radius: var(--r-lg);
    box-shadow: var(--shadow-md);
}

.section-dark .glass {
    background: var(--glass-bg-dark);
    border: 1px solid var(--glass-border-dark);
    backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* ============================================================
   Ambient gradient blobs (the "liquid" feel)
   ============================================================ */
.ambient {
    position: absolute;
    width: 720px;
    height: 720px;
    border-radius: 50%;
    filter: blur(140px);
    opacity: 0.55;
    pointer-events: none;
    z-index: 0;
    will-change: transform;
    animation: float 24s ease-in-out infinite alternate;
}
.ambient-blue {
    background: radial-gradient(circle, #0A84FF 0%, transparent 70%);
    top: -180px;
    left: -160px;
}
.ambient-purple {
    background: radial-gradient(circle, #BF5AF2 0%, transparent 70%);
    bottom: -200px;
    right: -120px;
    animation-delay: -12s;
}
.ambient-cyan {
    background: radial-gradient(circle, #62B6FF 0%, transparent 70%);
    top: 30%;
    left: 50%;
    width: 480px;
    height: 480px;
    opacity: 0.35;
    animation-delay: -6s;
}
.ambient-dim {
    opacity: 0.28;
}
.ambient-right {
    left: auto;
    right: -160px;
}
@keyframes float {
    0%   { transform: translate(0, 0) scale(1); }
    50%  { transform: translate(80px, 40px) scale(1.08); }
    100% { transform: translate(-40px, 60px) scale(0.96); }
}

/* ============================================================
   Top nav
   ============================================================ */
.topnav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}
.topnav.scrolled {
    background: rgba(245, 245, 247, 0.72);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
    border-bottom-color: rgba(0, 0, 0, 0.06);
}
.topnav-inner {
    max-width: 1180px;
    margin: 0 auto;
    padding: 14px 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.topnav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-weight: 600;
    font-size: 16px;
}
.topnav-brand:hover {
    color: var(--text);
}
.topnav-brand img {
    border-radius: 6px;
}
.topnav-links {
    display: flex;
    align-items: center;
    gap: 28px;
}
.topnav-links a {
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    opacity: 0.85;
}
.topnav-links a:hover {
    opacity: 1;
}
.topnav-cta {
    padding: 8px 16px;
    border-radius: var(--r-pill);
    background: var(--accent);
    color: white !important;
    opacity: 1 !important;
}
.topnav-cta:hover {
    background: var(--accent-hover);
}

/* ============================================================
   Buttons
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--r-pill);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: transform 0.2s ease, background 0.2s ease, color 0.2s ease, opacity 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}
.btn-large {
    padding: 16px 36px;
    font-size: 17px;
}
.btn-primary {
    background: var(--accent);
    color: #fff;
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: scale(1.02);
}
.btn-ghost {
    color: var(--accent);
    background: transparent;
}
.btn-ghost:hover {
    color: var(--accent-hover);
}
.btn-ghost-dark {
    color: var(--accent-cyan);
}
.btn-ghost-dark:hover {
    color: #93C5FD;
}
.section-dark .btn-primary {
    background: #fff;
    color: #000;
}
.section-dark .btn-primary:hover {
    background: rgba(255, 255, 255, 0.92);
}

/* ============================================================
   Hero
   ============================================================ */
.hero {
    min-height: 100vh;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 24px 80px;
    overflow: hidden;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 920px;
}
.hero-image {
    position: relative;
    z-index: 2;
    margin-top: 72px;
    width: 100%;
    max-width: 1100px;
}
.cta-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    margin-top: 36px;
}
.cta-row.centered {
    justify-content: center;
}

/* ============================================================
   Screenshot frames
   ============================================================ */
.screenshot {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(135deg, #E5E5EA, #C7C7CC);
    border-radius: var(--r-lg);
    overflow: hidden;
    border: 1px solid rgba(0, 0, 0, 0.08);
}
.screenshot img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 2;
}
.screenshot-fallback {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: rgba(0, 0, 0, 0.5);
    font-family: "SF Mono", Menlo, Monaco, Consolas, monospace;
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.4), rgba(255,255,255,0.4) 12px, transparent 12px, transparent 24px),
        linear-gradient(135deg, #E5E5EA, #C7C7CC);
}
.screenshot-fallback .fb-title {
    font-size: 16px;
    font-weight: 600;
    color: rgba(0, 0, 0, 0.6);
}
.screenshot-fallback .fb-spec {
    font-size: 12px;
    color: rgba(0, 0, 0, 0.4);
    font-family: inherit;
}
.screenshot-fallback.small .fb-title {
    font-size: 13px;
}
.screenshot-fallback.dark {
    color: rgba(255, 255, 255, 0.5);
    background:
        repeating-linear-gradient(45deg, rgba(255,255,255,0.05), rgba(255,255,255,0.05) 12px, transparent 12px, transparent 24px),
        linear-gradient(135deg, #1B1B1F, #2A2A2E);
}
.screenshot-fallback.dark .fb-title {
    color: rgba(255, 255, 255, 0.75);
}
.screenshot-fallback.dark .fb-spec {
    color: rgba(255, 255, 255, 0.45);
}
.screenshot-shadow {
    box-shadow: var(--shadow-xl), 0 0 0 1px rgba(0,0,0,0.04);
}
.section-dark .screenshot-shadow {
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(255, 255, 255, 0.04);
}

.screenshot-hero {
    aspect-ratio: 16 / 9.5;
}
.screenshot-mini {
    aspect-ratio: 16 / 11;
    border-radius: var(--r-md);
}

/* ============================================================
   View grid (Icons / List / Columns cards)
   ============================================================ */
.view-grid {
    margin-top: 80px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}
.view-card {
    overflow: hidden;
    padding: 12px;
    display: flex;
    flex-direction: column;
}
.view-card-body {
    padding: 20px 12px 12px;
}
.view-card-body h3 {
    margin-bottom: 8px;
}
.view-card-body p {
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.5;
}

/* ============================================================
   Split sections (text + image)
   ============================================================ */
.split {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 80px;
    align-items: center;
}
.split-reverse .split-text {
    order: 2;
}
.split-reverse .split-image {
    order: 1;
}
.split-text h2 {
    margin-bottom: 24px;
}
.split-text p {
    color: var(--text-muted);
    font-size: 18px;
    max-width: 480px;
    margin-bottom: 24px;
}
.section-dark .split-text p {
    color: var(--text-on-dark-muted);
}

.feature-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.feature-list li {
    position: relative;
    padding-left: 26px;
    color: var(--text-muted);
    font-size: 16px;
}
.feature-list li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 8px;
    width: 16px;
    height: 9px;
    border-left: 2px solid var(--accent);
    border-bottom: 2px solid var(--accent);
    transform: rotate(-45deg);
}
.section-dark .feature-list li {
    color: var(--text-on-dark-muted);
}
.section-dark .feature-list li::before {
    border-color: var(--accent-cyan);
}

/* ============================================================
   Stats grid
   ============================================================ */
.stats-grid {
    margin-top: 64px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.stat {
    padding: 32px 24px;
    text-align: center;
}
.stat-value {
    font-size: 40px;
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1;
    background: linear-gradient(135deg, #0A84FF, #BF5AF2);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}
.stat-unit {
    font-size: 22px;
    font-weight: 600;
    letter-spacing: -0.01em;
}
.stat-label {
    margin-top: 16px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.4;
}

/* ============================================================
   Shortcuts grid
   ============================================================ */
.shortcut-grid {
    margin-top: 56px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
.shortcut {
    background: white;
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: var(--r-md);
    padding: 20px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.shortcut:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.shortcut-keys {
    display: flex;
    justify-content: center;
    gap: 4px;
    margin-bottom: 12px;
}
.shortcut-keys kbd {
    font-size: 13px;
    padding: 4px 10px;
}
.shortcut-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* ============================================================
   Final CTA
   ============================================================ */
.cta-section {
    text-align: center;
}
.cta-section h2 {
    margin-bottom: 12px;
}

/* ============================================================
   Footer
   ============================================================ */
footer {
    background: var(--bg-tinted);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 48px 0 32px;
}
.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}
.footer-brand img {
    border-radius: 6px;
}
.footer-links {
    display: flex;
    gap: 28px;
    flex-wrap: wrap;
    justify-content: center;
}
.footer-links a {
    color: var(--text-muted);
    font-size: 14px;
}
.footer-links a:hover {
    color: var(--text);
}
.footer-meta {
    font-size: 13px;
    color: var(--text-faint);
}

/* ============================================================
   Reveal-on-scroll animations
   ============================================================ */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.8s cubic-bezier(0.22, 0.61, 0.36, 1),
                transform 0.8s cubic-bezier(0.22, 0.61, 0.36, 1);
}
.reveal.in-view {
    opacity: 1;
    transform: translateY(0);
}
.reveal-delay {
    transition-delay: 0.12s;
}
.reveal-delay-2 {
    transition-delay: 0.24s;
}
.reveal-delay-3 {
    transition-delay: 0.36s;
}

@media (prefers-reduced-motion: reduce) {
    .reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
    .ambient {
        animation: none;
    }
    html {
        scroll-behavior: auto;
    }
}

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 960px) {
    .section {
        padding: 80px 0;
    }
    .hero {
        padding-top: 120px;
    }
    .view-grid,
    .stats-grid,
    .shortcut-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .split {
        grid-template-columns: 1fr;
        gap: 48px;
    }
    .split-reverse .split-text {
        order: 1;
    }
    .split-reverse .split-image {
        order: 2;
    }
    .topnav-links a:not(.topnav-cta) {
        display: none;
    }
}

@media (max-width: 640px) {
    .container {
        padding: 0 20px;
    }
    .cta-row {
        flex-direction: column;
        align-items: stretch;
    }
    .btn {
        justify-content: center;
    }
    .view-grid,
    .stats-grid,
    .shortcut-grid {
        grid-template-columns: 1fr;
    }
    .ambient {
        width: 460px;
        height: 460px;
    }
    .hero-image {
        margin-top: 48px;
    }
}
