/* ────────────────────────────────────────────────────────────────────
   SpekeProcure — marketing landing page
   Aurora-themed, html + css only. No JS, no build step.
   ──────────────────────────────────────────────────────────────────── */

/* ── Design tokens ──────────────────────────────────────────────── */
:root {
    --bg-base: #0b1220;
    --slate-900: #0f172a;
    --slate-800: #1e293b;
    --slate-400: #94a3b8;
    --slate-200: #e2e8f0;

    --sky-200: #bfdbfe;
    --sky-300: #93c5fd;
    --sky-400: #60a5fa;
    --blue-500: #3b82f6;
    --blue-600: #2563eb;
    --blue-700: #1d4ed8;
    --blue-900: #1e3a8a;

    --fg: var(--slate-200);
    --fg-muted: var(--slate-400);
    --fg-subtle: #64748b;

    --border: rgba(96, 165, 250, 0.22);
    --border-muted: rgba(96, 165, 250, 0.12);
    --glow: 0 0 38px -10px rgba(59, 130, 246, 0.28);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
}

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

html {
    scroll-behavior: smooth;
}

html,
body {
    min-height: 100%;
}

body {
    font-family:
        "Inter",
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        "Helvetica Neue",
        sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: var(--fg);
    background-color: var(--bg-base);
    /* Same Aurora arc the app uses */
    background-image:
        radial-gradient(1100px 620px at 50% -8%, rgba(147, 197, 253, 0.32), transparent 65%),
        radial-gradient(820px 600px at 5% -5%, rgba(59, 130, 246, 0.5), transparent 60%),
        radial-gradient(820px 600px at 95% -5%, rgba(59, 130, 246, 0.5), transparent 60%),
        radial-gradient(1800px 700px at 50% 115%, rgba(30, 58, 138, 0.65), transparent 60%);
    background-attachment: fixed;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: inherit;
}

/* ── Skip link (a11y / SEO signal) ──────────────────────────────── */
.skip-link {
    position: absolute;
    top: -40px;
    left: 8px;
    z-index: 200;
    padding: 8px 14px;
    background: #fff;
    color: #0b1220;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 12px;
    outline: 2px solid var(--sky-400);
    outline-offset: 2px;
}

/* ── Top navigation ─────────────────────────────────────────────── */
.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 32px;
    background: rgba(15, 23, 42, 0.6);
    border-bottom: 1px solid var(--border-muted);
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
}

.brand {
    display: flex;
    align-items: center;
    gap: 2px;
    font-weight: 700;
    font-size: 22px;
    letter-spacing: -0.015em;
    color: #fff;
    text-decoration: none;
}

.brand .logo {
    width: 44px;
    height: 44px;
    display: inline-block;
    filter: drop-shadow(0 0 12px rgba(96, 165, 250, 0.45));
}

.brand.small {
    font-size: 16px;
}

.brand.small .logo {
    width: 26px;
    height: 26px;
}

.topnav-cta {
    color: var(--sky-400);
    text-decoration: none;
    font-weight: 500;
    font-size: 14px;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    transition: all 0.2s ease;
}

.topnav-cta:hover {
    background: rgba(96, 165, 250, 0.1);
    border-color: rgba(96, 165, 250, 0.45);
}

/* ── Hero ──────────────────────────────────────────────────────── */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 140px 24px 100px;
    overflow: hidden;
}

.hero-backdrop {
    position: absolute;
    inset: -6%;
    /* WebP first; JPEG fallback for browsers that don't support image-set
       with type() (some older WebKit). */
    background-image: url("login-background.jpeg");
    background-image: image-set(url("login-background.webp") type("image/webp") 1x, url("login-background.jpeg") type("image/jpeg") 1x);
    background-image: -webkit-image-set(url("login-background.webp") type("image/webp") 1x, url("login-background.jpeg") type("image/jpeg") 1x);
    background-size: cover;
    background-position: center;
    animation: ken-burns 42s ease-in-out infinite alternate;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    /* Layered: a radial "focus" behind the centered text content for
       readability, on top of the base top→bottom darkening. */
    background:
        radial-gradient(
            ellipse 62% 52% at 50% 52%,
            rgba(11, 18, 32, 0.55),
            transparent 72%
        ),
        linear-gradient(
            180deg,
            rgba(11, 18, 32, 0.5) 0%,
            rgba(11, 18, 32, 0.72) 60%,
            rgba(11, 18, 32, 0.92) 100%
        );
}

.hero-pulse {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sky-400);
    box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.7);
    animation: pulse 4.5s ease-in-out infinite;
    pointer-events: none;
}

.pulse-2 {
    top: 32%;
    left: 78%;
    animation-delay: 1.1s;
}
.pulse-3 {
    top: calc(64% + 90px);
    left: 28%;
    animation-delay: 2.3s;
}
.pulse-4 {
    top: 72%;
    left: 82%;
    animation-delay: 3.4s;
}

@keyframes pulse {
    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(96, 165, 250, 0.6);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 0 18px rgba(96, 165, 250, 0);
        transform: scale(1.4);
    }
}

@keyframes ken-burns {
    0% {
        transform: scale(1) translate(0, 0);
    }
    100% {
        transform: scale(1.12) translate(-2%, -2%);
    }
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 820px;
    margin: 0 auto;
    animation: rise 1s ease-out both;
}

/* Hero-specific text lift — soft dark glow so kicker and lead stay
   readable on the busier parts of the network photo. */
.hero .kicker {
    font-size: 15px;
    letter-spacing: 0.18em;
    margin-bottom: 20px;
    text-shadow: 0 1px 12px rgba(11, 18, 32, 0.8);
}

.hero .lead {
    color: #cbd5e1;
    text-shadow: 0 1px 14px rgba(11, 18, 32, 0.85);
}

@keyframes rise {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Typography ─────────────────────────────────────────────────── */
.kicker {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--sky-400);
    margin-bottom: 16px;
}

h1 {
    font-size: clamp(2.4rem, 6vw, 4.5rem);
    font-weight: 600;
    line-height: 1.08;
    letter-spacing: -0.025em;
    margin-bottom: 24px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

h2 {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 600;
    line-height: 1.15;
    letter-spacing: -0.022em;
    margin-bottom: 16px;
    color: #ffffff;
}

h3 {
    font-size: 1.05rem;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--fg);
}

.lead {
    font-size: clamp(1rem, 1.5vw, 1.15rem);
    color: var(--slate-400);
    max-width: 640px;
    margin: 0 auto 40px;
    line-height: 1.65;
}

.lead-muted {
    font-size: 1.02rem;
    color: var(--fg-muted);
    max-width: 660px;
    margin-bottom: 56px;
    line-height: 1.65;
}

/* ── Buttons ────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 26px;
    border-radius: var(--radius-sm);
    font-weight: 500;
    font-size: 15px;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    transition:
        background-image 300ms ease,
        background-color 300ms ease,
        box-shadow 300ms ease,
        border-color 200ms ease,
        transform 200ms ease;
    font-family: inherit;
}

.btn-primary {
    color: #ffffff;
    background-image: linear-gradient(135deg, var(--blue-600) 0%, var(--blue-500) 50%, var(--sky-400) 100%);
    box-shadow: 0 4px 14px -6px rgba(59, 130, 246, 0.45);
}

.btn-primary:hover {
    background-image: linear-gradient(135deg, var(--blue-900) 0%, var(--blue-600) 50%, var(--blue-500) 100%);
    box-shadow: 0 6px 22px -6px rgba(59, 130, 246, 0.6);
}

.btn-secondary {
    color: var(--sky-300);
    border-color: var(--border);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.btn-secondary:hover {
    background: rgba(96, 165, 250, 0.12);
    border-color: rgba(96, 165, 250, 0.55);
}

.btn-full {
    width: 100%;
}

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

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

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

/* ── Glass card ─────────────────────────────────────────────────── */
.glass-card {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow:
        0 14px 30px -10px rgba(0, 0, 0, 0.55),
        var(--glow);
}

/* ── Speke section ──────────────────────────────────────────────── */
.speke-grid {
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 48px;
    align-items: start;
}

.speke-card-chat {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 280px;
}

.chat-line {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    max-width: 92%;
    line-height: 1.5;
    animation: rise 0.6s ease-out both;
}

.chat-line.you {
    background: rgba(96, 165, 250, 0.18);
    align-self: flex-end;
    border: 1px solid rgba(96, 165, 250, 0.32);
    color: var(--sky-200);
    animation-delay: 0.1s;
}

.chat-line.speke {
    background: rgba(15, 23, 42, 0.55);
    border: 1px solid rgba(96, 165, 250, 0.18);
    align-self: flex-start;
    color: var(--fg);
    animation-delay: 0.4s;
}

.chat-line.speke-thinking {
    padding: 10px 14px;
    animation-delay: 0.7s;
}

.speke-typing {
    display: inline-flex;
    gap: 5px;
    align-items: center;
}

.speke-typing span {
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--sky-400);
    animation: speke-dot 1.4s ease-in-out infinite;
}

.speke-typing span:nth-child(2) {
    animation-delay: 0.18s;
}

.speke-typing span:nth-child(3) {
    animation-delay: 0.36s;
}

@keyframes speke-dot {
    0%,
    80%,
    100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1);
    }
}

.speke-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.speke-features li {
    padding-left: 22px;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.speke-features li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sky-400);
    box-shadow: 0 0 12px -1px var(--sky-400);
}

.speke-features strong {
    color: var(--fg);
    font-weight: 600;
    font-size: 1rem;
}

.speke-features span {
    color: var(--fg-muted);
    font-size: 14px;
    line-height: 1.5;
}

/* ── Flow strip ─────────────────────────────────────────────────── */
.flow-strip {
    position: relative;
    margin-top: 8px;
}

.flow-line {
    position: absolute;
    top: 32px;
    left: 5%;
    right: 5%;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(96, 165, 250, 0.3) 12%, rgba(96, 165, 250, 0.3) 88%, transparent 100%);
    z-index: 0;
}

.flow-spark {
    position: absolute;
    top: -3px;
    left: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--sky-400);
    box-shadow: 0 0 22px 4px rgba(96, 165, 250, 0.7);
    animation: spark-travel 7s ease-in-out infinite;
}

@keyframes spark-travel {
    0% {
        left: 0%;
        opacity: 0;
    }
    8% {
        opacity: 1;
    }
    92% {
        opacity: 1;
    }
    100% {
        left: 100%;
        opacity: 0;
    }
}

.flow-steps {
    list-style: none;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    position: relative;
    z-index: 1;
}

.flow-steps li {
    padding: 24px 20px;
    text-align: left;
    transition:
        transform 220ms ease,
        box-shadow 220ms ease;
}

.flow-steps li:hover {
    transform: translateY(-3px);
    box-shadow:
        0 22px 40px -14px rgba(0, 0, 0, 0.6),
        0 0 50px -10px rgba(59, 130, 246, 0.4);
}

.step-num {
    font-size: 11px;
    font-weight: 600;
    color: var(--sky-400);
    letter-spacing: 0.16em;
    margin-bottom: 14px;
}

.flow-steps h3 {
    font-size: 0.98rem;
    margin-bottom: 8px;
}

.flow-steps p {
    font-size: 13px;
    color: var(--fg-muted);
    line-height: 1.55;
}

/* ── Trust strip ────────────────────────────────────────────────── */
.trust {
    padding-top: 60px;
}

.trust-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
}

.trust-item {
    padding: 36px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-muted);
    background: rgba(15, 23, 42, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition:
        border-color 220ms ease,
        background-color 220ms ease,
        transform 220ms ease;
}

.trust-item:hover {
    border-color: var(--border);
    background: rgba(15, 23, 42, 0.55);
    transform: translateY(-2px);
}

.trust-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--sky-400);
    background: rgba(96, 165, 250, 0.12);
    border: 1px solid rgba(96, 165, 250, 0.22);
    margin-bottom: 16px;
}

.trust-item h3 {
    margin-bottom: 10px;
    font-size: 1.1rem;
}

.trust-item p {
    color: var(--fg-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── Contact ────────────────────────────────────────────────────── */
.contact-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 32px;
}

/* Honeypot — hidden from humans, present in the DOM for bots that
   auto-fill every field. Web3Forms rejects the submission if truthy. */
.contact-form .honeypot {
    display: none !important;
}

/* Kill Chrome's autofill yellow/white background — repaint with the
   same dark glass fill as the unfilled state. */
.contact-form input:-webkit-autofill,
.contact-form input:-webkit-autofill:hover,
.contact-form input:-webkit-autofill:focus,
.contact-form input:-webkit-autofill:active,
.contact-form textarea:-webkit-autofill,
.contact-form textarea:-webkit-autofill:hover,
.contact-form textarea:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.85) inset !important;
    box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.85) inset !important;
    -webkit-text-fill-color: #e2e8f0 !important;
    caret-color: #e2e8f0;
    border-color: rgba(96, 165, 250, 0.32) !important;
    /* Delay the autofill animation so the yellow flash never shows */
    transition: background-color 5000s ease-in-out 0s;
}

.contact-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.contact-form label > span {
    font-size: 13px;
    font-weight: 500;
    color: var(--fg-muted);
}

.contact-form input,
.contact-form textarea {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(148, 163, 184, 0.22);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--fg);
    font-family: inherit;
    font-size: 14px;
    transition:
        border-color 200ms ease,
        background 200ms ease,
        box-shadow 200ms ease;
}

.contact-form input::placeholder,
.contact-form textarea::placeholder {
    color: rgba(148, 163, 184, 0.55);
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: rgba(96, 165, 250, 0.7);
    box-shadow: 0 0 0 1px rgba(96, 165, 250, 0.5);
    background: rgba(255, 255, 255, 0.06);
}

.contact-form textarea {
    resize: vertical;
    min-height: 110px;
    font-family: inherit;
}

.contact-form .btn {
    margin-top: 8px;
}

/* ── Footer ─────────────────────────────────────────────────────── */
footer {
    padding: 40px 24px;
    border-top: 1px solid var(--border-muted);
}

.footer-inner {
    max-width: 1120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

footer p {
    font-size: 13px;
    color: var(--fg-subtle);
}

.footer-brand {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.01em;
    color: #fff;
    text-shadow: 0 0 14px rgba(96, 165, 250, 0.45);
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 900px) {
    .speke-grid,
    .trust-grid,
    .contact-inner {
        grid-template-columns: 1fr;
        gap: 36px;
    }

    .flow-steps {
        grid-template-columns: 1fr 1fr;
    }

    .flow-line {
        display: none;
    }
}

@media (max-width: 600px) {
    section {
        padding: 70px 20px;
    }

    .topnav {
        padding: 14px 20px;
    }

    .hero {
        padding: 120px 20px 80px;
    }

    .flow-steps {
        grid-template-columns: 1fr;
    }

    .contact-form {
        padding: 24px;
    }
}

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