/* ==========================================================================
   Swegbot — Midnight Intelligence (Mobile-First)
   Typography: Syne (display) + Manrope (body)
   Palette: Deep midnight base, electric cyan accent, soft violet secondary
   ========================================================================== */

:root {
    --midnight: #08090d;
    --surface: #0f1117;
    --surface-raised: #151820;
    --border: rgba(255, 255, 255, 0.06);
    --border-glow: rgba(0, 212, 255, 0.15);

    --cyan: #00d4ff;
    --cyan-dim: rgba(0, 212, 255, 0.5);
    --cyan-glow: rgba(0, 212, 255, 0.08);
    --violet: #7c5cfc;
    --violet-glow: rgba(124, 92, 252, 0.12);
    --amber: #f59e0b;

    --text: #e8eaed;
    --text-dim: #8b8fa3;
    --text-faint: #505368;

    --font-display: 'Syne', 'Helvetica Neue', sans-serif;
    --font-body: 'Manrope', 'Helvetica Neue', sans-serif;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   Reset & Global Mobile Defaults
   ========================================================================== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-text-size-adjust: 100%;
}

body {
    background: var(--midnight);
    color: var(--text);
    font-family: var(--font-body);
    font-weight: 400;
    line-height: 1.65;
    overflow-x: hidden;
    overscroll-behavior-y: none;
}

a { color: inherit; text-decoration: none; }

a, button, .btn, .pgp-toggle, .pgp-copy {
    -webkit-tap-highlight-color: transparent;
}

/* Touch targets */
.btn,
.nav-cta,
.pgp-toggle,
.pgp-copy {
    min-height: 44px;
}

.nav-links a,
.footer-nav a {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

/* ==========================================================================
   Grid Background Atmosphere
   ========================================================================== */
.grid-bg {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--border) 1px, transparent 1px),
        linear-gradient(90deg, var(--border) 1px, transparent 1px);
    background-size: 80px 80px;
    mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, black 20%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse 70% 50% at 50% 30%, black 20%, transparent 70%);
    opacity: 0.5;
}

/* ==========================================================================
   Navigation (mobile base)
   ========================================================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 0 max(1rem, env(safe-area-inset-right));
    padding-left: max(1rem, env(safe-area-inset-left));
    transition: background 0.4s ease, border-color 0.4s ease;
    border-bottom: 1px solid transparent;
}

.nav.scrolled {
    background: rgba(8, 9, 13, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom-color: var(--border);
}

.nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-display);
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.nav-icon {
    display: inline-block;
    width: 28px;
    height: 28px;
    vertical-align: middle;
}

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

.nav-links a {
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.nav-links a:not(.nav-cta) {
    display: none;
}

.nav-links a:hover {
    color: var(--text);
}

.nav-cta {
    background: var(--surface-raised);
    border: 1px solid var(--border);
    padding: 0.4rem 1.2rem !important;
    border-radius: 8px;
    color: var(--text) !important;
    transition: border-color 0.3s ease, background 0.3s ease !important;
}

.nav-cta:hover {
    border-color: var(--border-glow) !important;
    background: var(--surface) !important;
}

/* ==========================================================================
   Hero (mobile base)
   ========================================================================== */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 5.5rem 1rem 3rem;
}

.hero-orb {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -55%);
    width: 260px;
    height: 260px;
    pointer-events: none;
    overflow: hidden;
    border-radius: 50%;
    will-change: transform, opacity;
}

.orb-core {
    position: absolute;
    inset: 25%;
    border-radius: 50%;
    background: radial-gradient(circle at 40% 40%,
        var(--cyan) 0%,
        var(--violet) 50%,
        transparent 70%
    );
    opacity: 0.2;
    filter: blur(60px);
    animation: orbPulse 6s ease-in-out infinite alternate;
}

.orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
}

.orb-ring-1 {
    inset: 10%;
    border-color: rgba(0, 212, 255, 0.08);
    animation: orbSpin 25s linear infinite;
}

.orb-ring-2 {
    inset: 20%;
    border-color: rgba(124, 92, 252, 0.06);
    animation: orbSpin 35s linear infinite reverse;
}

.orb-ring-3 {
    inset: 30%;
    border-color: rgba(0, 212, 255, 0.04);
    animation: orbSpin 20s linear infinite;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 100%;
    width: 100%;
}

.hero-title {
    font-family: var(--font-display);
    font-weight: 800;
    line-height: 1.0;
    margin-bottom: 1.5rem;
}

.hero-title span {
    display: block;
}

.hero-title span:first-child {
    font-size: clamp(1.6rem, 7vw, 2.2rem);
    letter-spacing: -0.03em;
    color: var(--text);
}

.hero-accent {
    font-size: clamp(2rem, 11vw, 2.8rem);
    letter-spacing: -0.04em;
    background: linear-gradient(135deg, var(--cyan) 0%, var(--violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    padding: 0.05em 0.15em;
}

.hero-title .hero-dot {
    display: inline;
    -webkit-text-fill-color: var(--cyan);
    background: none;
}

.hero-sub {
    font-size: 0.9rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-dim);
    max-width: 420px;
    margin: 0 auto 2rem;
}

.hero-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.hero-actions .btn {
    width: 100%;
    max-width: 100%;
    justify-content: center;
}

.hero-fade {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(to top, var(--midnight), transparent);
    z-index: 1;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.75rem 1.6rem;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(135deg, var(--cyan), #0099cc);
    color: var(--midnight);
    border-color: transparent;
}

.btn-primary:hover {
    box-shadow: 0 0 24px var(--cyan-dim);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    border-color: var(--border);
    color: var(--text-dim);
}

.btn-ghost:hover {
    border-color: var(--border-glow);
    color: var(--text);
}

.btn-lg {
    padding: 0.9rem 2rem;
    font-size: 0.9rem;
}

/* ==========================================================================
   Social Proof (mobile base)
   ========================================================================== */
.proof {
    position: relative;
    z-index: 2;
    padding: 2rem 1rem;
    text-align: center;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.proof-label {
    font-size: 0.65rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--text-faint);
    margin-bottom: 1rem;
}

.proof-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.proof-logo {
    font-family: var(--font-display);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: var(--text-faint);
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.proof-logo:hover {
    opacity: 0.8;
}

/* ==========================================================================
   Section Shared (mobile base)
   ========================================================================== */
.section-label {
    display: inline-block;
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--cyan);
    margin-bottom: 1rem;
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 5vw, 2.2rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.section-title em {
    font-style: italic;
    font-weight: 700;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0.05em 0.15em;
    display: inline-block;
}

.section-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

/* ==========================================================================
   Bento Feature Grid (mobile base: single column)
   ========================================================================== */
.features {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
}

.bento {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.bento-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s ease, box-shadow 0.4s ease, transform 0.4s var(--ease-out-quart);
}

.bento-card::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: radial-gradient(ellipse at 50% 0%, var(--cyan-glow) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.bento-card:hover {
    border-color: var(--border-glow);
    transform: translateY(-3px);
    box-shadow: 0 8px 32px rgba(0, 212, 255, 0.06);
}

.bento-card:hover::before {
    opacity: 1;
}

.card-icon {
    width: 40px;
    height: 40px;
    color: var(--cyan);
    margin-bottom: 1.5rem;
}

.card-icon svg {
    width: 100%;
    height: 100%;
}

.bento-card h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}

.bento-card p {
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-dim);
}

.card-tag {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--cyan);
    background: var(--cyan-glow);
    padding: 0.25rem 0.65rem;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.1);
}

/* ==========================================================================
   How It Works (mobile base: single column)
   ========================================================================== */
.how {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
}

.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.step {
    position: relative;
    padding: 1.5rem 0;
}

.step-num {
    font-family: var(--font-display);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    opacity: 0.2;
    margin-bottom: 1.5rem;
}

.step-line {
    width: 40px;
    height: 2px;
    background: linear-gradient(to right, var(--cyan), transparent);
    margin-bottom: 1.5rem;
}

.step h3 {
    font-family: var(--font-display);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

.step p {
    font-size: 0.88rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-dim);
}

/* ==========================================================================
   Testimonial (mobile base)
   ========================================================================== */
.testimonial {
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem 3rem;
    text-align: center;
}

.testimonial blockquote {
    border: none;
    padding: 0;
}

.testimonial blockquote p {
    font-family: var(--font-display);
    font-size: clamp(1.1rem, 3.5vw, 1.5rem);
    font-weight: 500;
    font-style: italic;
    line-height: 1.5;
    color: var(--text);
    margin-bottom: 2rem;
}

.testimonial footer {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.testimonial footer strong {
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text);
}

.testimonial footer span {
    font-size: 0.8rem;
    color: var(--text-faint);
}

/* ==========================================================================
   Security (mobile base: single column, stacked features)
   ========================================================================== */
.security {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    padding: 3rem 1rem;
    border-top: 1px solid var(--border);
}

.security-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    align-items: start;
}

.security-left {
    position: static;
}

.security-right {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.security-feature {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface);
    transition: border-color 0.3s ease;
}

.security-feature:hover {
    border-color: var(--border-glow);
}

.sf-icon {
    width: 36px;
    height: 36px;
    color: var(--cyan);
    flex-shrink: 0;
    margin-top: 0.15rem;
}

.sf-icon svg {
    width: 100%;
    height: 100%;
}

.security-feature h4 {
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.security-feature p {
    font-size: 0.85rem;
    font-weight: 400;
    line-height: 1.7;
    color: var(--text-dim);
}

/* ==========================================================================
   PGP Key Reveal Panel (mobile base: stacked header)
   ========================================================================== */
.pgp-reveal {
    margin-top: 1rem;
}

.pgp-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-dim);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.6rem 1.2rem;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease;
}

.pgp-toggle:hover {
    border-color: var(--border-glow);
    color: var(--text);
}

.pgp-chevron {
    transition: transform 0.3s var(--ease-out-quart);
}

.pgp-toggle[aria-expanded="true"] .pgp-chevron {
    transform: rotate(180deg);
}

.pgp-panel {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transition: max-height 0.5s var(--ease-out-expo), opacity 0.4s ease, margin 0.4s ease;
    margin-top: 0;
}

.pgp-panel.is-open {
    max-height: 600px;
    opacity: 1;
    margin-top: 1rem;
}

.pgp-panel-header {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-bottom: none;
    border-radius: 10px 10px 0 0;
}

.pgp-fingerprint {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.pgp-fp-label {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.pgp-fingerprint code {
    font-family: var(--font-body);
    font-size: 0.62rem;
    font-weight: 500;
    color: var(--cyan);
    letter-spacing: 0.06em;
    word-break: break-all;
}

.pgp-copy {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-family: var(--font-body);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-dim);
    background: var(--surface-raised);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0.4rem 0.9rem;
    cursor: pointer;
    transition: border-color 0.3s ease, color 0.3s ease, background 0.3s ease;
}

.pgp-copy:hover {
    border-color: var(--border-glow);
    color: var(--cyan);
}

.pgp-copy.copied {
    border-color: #34d399;
    color: #34d399;
    background: rgba(52, 211, 153, 0.06);
}

.pgp-key {
    background: var(--midnight);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 1.25rem;
    margin: 0;
    font-family: 'Manrope', monospace;
    font-size: 0.62rem;
    font-weight: 400;
    line-height: 1.6;
    color: var(--text-faint);
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 300px;
    overflow-y: auto;
}

.pgp-key::-webkit-scrollbar {
    width: 4px;
}

.pgp-key::-webkit-scrollbar-track {
    background: transparent;
}

.pgp-key::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 2px;
}

/* ==========================================================================
   CTA (mobile base: stacked buttons)
   ========================================================================== */
.cta {
    position: relative;
    z-index: 2;
    padding: 3rem 1rem;
    text-align: center;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(600px, 100vw);
    height: 400px;
    background: radial-gradient(ellipse, var(--cyan-glow) 0%, var(--violet-glow) 40%, transparent 70%);
    opacity: 0.6;
    pointer-events: none;
    filter: blur(40px);
}

.cta-content {
    position: relative;
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: var(--font-display);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.cta-content h2 em {
    font-style: italic;
    background: linear-gradient(135deg, var(--cyan), var(--violet));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding: 0.05em 0.15em;
    display: inline-block;
}

.cta-content > p {
    font-size: 0.95rem;
    color: var(--text-dim);
    line-height: 1.7;
    margin-bottom: 2.5rem;
}

.cta-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.cta-actions .btn {
    width: 100%;
    max-width: 280px;
    justify-content: center;
}

.cta-fine {
    font-size: 0.72rem;
    color: var(--text-faint);
}

/* ==========================================================================
   Footer (mobile base: column layout)
   ========================================================================== */
.site-footer {
    position: relative;
    z-index: 2;
    border-top: 1px solid var(--border);
    padding: 2rem max(1rem, env(safe-area-inset-right)) max(2rem, env(safe-area-inset-bottom));
    padding-left: max(1rem, env(safe-area-inset-left));
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.5rem;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-display);
    font-size: 0.95rem;
    font-weight: 600;
}

.footer-logo .nav-icon {
    width: 22px;
    height: 22px;
}

.footer-copy {
    font-size: 0.72rem;
    color: var(--text-faint);
}

.footer-nav {
    display: flex;
    gap: 1.2rem;
    flex-wrap: wrap;
}

.footer-nav a {
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--text-dim);
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: var(--text);
}

.footer-pgp {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
}

.pgp-label {
    font-size: 0.62rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-faint);
}

.footer-pgp code {
    font-family: 'Manrope', monospace;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-dim);
    letter-spacing: 0.04em;
    word-break: break-all;
}

/* ==========================================================================
   Pull-to-Refresh (mobile)
   ========================================================================== */
.ptr {
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    z-index: 99;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    height: 0;
    overflow: hidden;
    pointer-events: none;
    transition: height 0.3s var(--ease-out-quart);
    perspective: 600px;
}

.ptr.ptr-active {
    transition: none;
}

.ptr-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-top: 12px;
    opacity: var(--ptr-progress, 0);
    transform: scale(calc(0.3 + 0.7 * var(--ptr-progress, 0)));
    transform-style: preserve-3d;
    flex-shrink: 0;
}

.ptr-icon.flipping {
    opacity: 1;
    animation: ptrFlip 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

@keyframes ptrFlip {
    0%   { transform: scale(1) rotateY(0deg); }
    100% { transform: scale(1) rotateY(360deg); }
}

/* ==========================================================================
   Scroll Reveal
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}

.reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger delays */
.bento .reveal:nth-child(1) { transition-delay: 0s; }
.bento .reveal:nth-child(2) { transition-delay: 0.06s; }
.bento .reveal:nth-child(3) { transition-delay: 0.12s; }
.bento .reveal:nth-child(4) { transition-delay: 0.18s; }
.bento .reveal:nth-child(5) { transition-delay: 0.10s; }
.bento .reveal:nth-child(6) { transition-delay: 0.16s; }

.steps .reveal:nth-child(1) { transition-delay: 0s; }
.steps .reveal:nth-child(2) { transition-delay: 0.08s; }
.steps .reveal:nth-child(3) { transition-delay: 0.16s; }

/* Hero exit stagger — reverse order (bottom exits first) */
.hero-content .hero-actions { transition-delay: 0s; }
.hero-content .hero-sub { transition-delay: 0.15s; }
.hero-title .reveal:nth-child(2) { transition-delay: 0.3s; }
.hero-title .reveal:nth-child(1) { transition-delay: 0.45s; }

/* Hero entrance stagger — top enters first */
.hero-title .reveal.is-visible:nth-child(1) { transition-delay: 0.2s; }
.hero-title .reveal.is-visible:nth-child(2) { transition-delay: 0.35s; }
.hero-content .hero-sub.is-visible { transition-delay: 0.5s; }
.hero-content .hero-actions.is-visible { transition-delay: 0.65s; }

/* ==========================================================================
   Keyframes
   ========================================================================== */
@keyframes orbPulse {
    0%   { transform: scale(1); opacity: 0.15; }
    100% { transform: scale(1.15); opacity: 0.25; }
}

@keyframes orbSpin {
    from { transform: rotate(0deg); }
    to   { transform: rotate(360deg); }
}

@keyframes dotPulse {
    0%, 100% { opacity: 1; }
    50%      { opacity: 0.4; }
}

/* ==========================================================================
   Accessibility
   ========================================================================== */

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    html { scroll-behavior: auto; }

    .reveal {
        opacity: 1;
        transform: none;
    }

    .hero-orb { display: none; }
}

/* Touch devices — prevent sticky hover */
@media (hover: none) {
    .nav-links a:hover { color: var(--text-dim); }
    .nav-cta:hover { border-color: var(--border) !important; background: var(--surface-raised) !important; }
    .btn-primary:hover { box-shadow: none; transform: none; }
    .btn-ghost:hover { border-color: var(--border); color: var(--text-dim); }
    .proof-logo:hover { opacity: 0.5; }
    .bento-card:hover { border-color: var(--border); transform: none; box-shadow: none; }
    .bento-card:hover::before { opacity: 0; }
    .security-feature:hover { border-color: var(--border); }
    .pgp-toggle:hover { border-color: var(--border); color: var(--text-dim); }
    .pgp-copy:hover { border-color: var(--border); color: var(--text-dim); }
    .footer-nav a:hover { color: var(--text-dim); }
}

/* ==========================================================================
   Responsive — min-width: 481px (large phone / phablet)
   ========================================================================== */
@media (min-width: 481px) {

    /* Nav */
    .nav {
        padding: 0 max(1.5rem, env(safe-area-inset-right));
        padding-left: max(1.5rem, env(safe-area-inset-left));
    }
    .nav-inner { height: 64px; }
    .nav-brand { font-size: 1.05rem; }

    /* PTR */
    .ptr { top: 64px; }

    /* Hero */
    .hero { padding: 6rem 1.5rem 4rem; min-height: 100vh; }
    .hero-orb { width: 350px; height: 350px; }
    .hero-title span:first-child { font-size: clamp(2.5rem, 8vw, 3.5rem); }
    .hero-accent { font-size: clamp(3rem, 10vw, 4.5rem); }
    .hero-sub { font-size: 1rem; }
    .hero-actions .btn { max-width: 280px; }

    /* Proof */
    .proof { padding: 3rem 2rem; }
    .proof-logos { gap: 1.5rem; }
    .proof-logo { font-size: 0.88rem; }
    .proof-label { font-size: 0.72rem; margin-bottom: 1.5rem; }

    /* Section shared */
    .section-label { font-size: 0.7rem; }
    .section-title { font-size: clamp(2rem, 4vw, 3.2rem); }
    .section-header { margin-bottom: 4rem; }

    /* Bento — still single column but with more padding */
    .features { padding: 4rem 1.5rem; }
    .bento-card { padding: 2rem; }

    /* Steps — still single column */
    .how { padding: 3rem 1.5rem 4rem; }
    .step { padding: 2rem 0; }
    .step-num { font-size: 3rem; }

    /* Testimonial */
    .testimonial { padding: 4rem 2rem 6rem; }
    .testimonial blockquote p { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

    /* Security */
    .security { padding: 4rem 1.5rem; }

    /* CTA */
    .cta { padding: 4rem 1.5rem; }

    /* Footer */
    .site-footer {
        padding: 3rem max(2rem, env(safe-area-inset-right)) max(3rem, env(safe-area-inset-bottom));
        padding-left: max(2rem, env(safe-area-inset-left));
    }
    .footer-brand { flex-direction: row; align-items: baseline; gap: 1.5rem; }
}

/* ==========================================================================
   Responsive — min-width: 769px (tablet portrait and up)
   ========================================================================== */
@media (min-width: 769px) {

    /* Nav */
    .nav {
        padding: 0 max(1.5rem, env(safe-area-inset-right));
        padding-left: max(1.5rem, env(safe-area-inset-left));
    }
    .nav-inner { height: 64px; }
    .nav-brand { font-size: 1.05rem; }
    .nav-links a:not(.nav-cta) { display: inline-flex; }

    /* Hero */
    .hero { padding: 6rem 1.5rem 4rem; min-height: 100vh; }
    .hero-orb { width: 350px; height: 350px; }
    .hero-content { max-width: 820px; }
    .hero-title span:first-child { font-size: clamp(2.5rem, 8vw, 3.5rem); }
    .hero-accent { font-size: clamp(3rem, 10vw, 4.5rem); }
    .hero-sub { font-size: 1rem; max-width: 420px; }
    .hero-actions { flex-direction: row; }
    .hero-actions .btn { width: auto; max-width: 280px; }

    /* Proof */
    .proof { padding: 3rem 2rem; }

    /* Section shared */
    .section-label { font-size: 0.7rem; }
    .section-title { font-size: clamp(2rem, 4vw, 3.2rem); }
    .section-header { margin-bottom: 4rem; }

    /* Bento */
    .features { padding: 4rem 1.5rem; }
    .bento { grid-template-columns: repeat(8, 1fr); }
    .bento-card { grid-column: span 4; padding: 2rem; }
    .bento-wide { grid-column: span 8; }
    .bento-card.bento-mid { grid-column: span 4; }

    /* Steps */
    .how { padding: 3rem 1.5rem 4rem; }
    .steps { grid-template-columns: repeat(3, 1fr); gap: 2rem; }
    .step { padding: 2rem 1.5rem; }
    .step-num { font-size: 3.5rem; }

    /* Testimonial */
    .testimonial { padding: 4rem 2rem 6rem; }
    .testimonial blockquote p { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }

    /* Security */
    .security { padding: 4rem 1.5rem; }
    .security-feature { flex-direction: row; gap: 1.5rem; }

    /* PGP */
    .pgp-panel-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 0;
    }
    .pgp-fingerprint code { font-size: 0.72rem; word-break: normal; }

    /* CTA */
    .cta { padding: 4rem 1.5rem; }
    .cta-content h2 { font-size: clamp(2rem, 4vw, 3rem); }
    .cta-actions { flex-direction: row; }
    .cta-actions .btn { width: auto; max-width: none; }

    /* Footer */
    .site-footer {
        padding: 3rem max(2rem, env(safe-area-inset-right)) max(3rem, env(safe-area-inset-bottom));
        padding-left: max(2rem, env(safe-area-inset-left));
    }
    .footer-inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 2rem;
    }
    .footer-brand { flex-direction: row; align-items: baseline; gap: 1.5rem; }
    .footer-nav { gap: 1.8rem; flex-wrap: nowrap; }
    .footer-pgp { align-items: flex-end; }
    .footer-pgp code { font-size: 0.68rem; word-break: normal; }
}

/* ==========================================================================
   Responsive — min-width: 1024px (desktop)
   ========================================================================== */
@media (min-width: 1024px) {

    /* Nav */
    .nav {
        padding: 0 max(3rem, env(safe-area-inset-right));
        padding-left: max(3rem, env(safe-area-inset-left));
    }

    /* Hero */
    .hero { padding: 8rem 2rem 6rem; }
    .hero-orb { width: 600px; height: 600px; }
    .hero-title span:first-child { font-size: clamp(3rem, 8vw, 5.5rem); }
    .hero-accent { font-size: clamp(3.5rem, 10vw, 7rem); }
    .hero-sub { font-size: 1.1rem; max-width: 520px; margin: 0 auto 2.5rem; }
    .hero-actions .btn { max-width: none; }

    /* Proof */
    .proof-logos { gap: 3.5rem; }
    .proof-logo { font-size: 1rem; }

    /* Bento */
    .features { padding: 6rem 2rem; }
    .bento { grid-template-columns: repeat(12, 1fr); }
    .bento-card { grid-column: span 4; }
    .bento-wide { grid-column: span 8; }
    .bento-card.bento-mid { grid-column: span 6; }

    /* Steps */
    .how { padding: 4rem 2rem 6rem; }

    /* Security */
    .security { padding: 6rem 2rem; }
    .security-inner { grid-template-columns: 1fr 1.5fr; gap: 5rem; }
    .security-left { position: sticky; top: 6rem; }

    /* CTA */
    .cta { padding: 6rem 2rem; }
}
