/* KeyWise — keywiseai.com
   Hand-written stylesheet. No framework, no build step: Cloudflare Pages
   serves the repository root as static files. */

/* ---------- tokens ---------- */

:root {
    --violet-700: #5B21B6;
    --violet-600: #6D28D9;
    --violet-500: #7C3AED;
    --purple-400: #A855F7;
    --gradient: linear-gradient(135deg, #6D28D9 0%, #A855F7 100%);

    --bg: #F5F4FA;
    --bg-alt: #EFEDF7;
    --surface: #FFFFFF;
    --ink: #12101A;
    --ink-2: #55506B;
    --ink-3: #837DA0;
    --line: rgba(18, 16, 26, 0.09);
    --shadow-sm: 0 1px 2px rgba(18, 16, 26, 0.05), 0 4px 16px rgba(18, 16, 26, 0.04);
    --shadow-lg: 0 24px 64px -16px rgba(91, 33, 182, 0.28);

    --radius: 20px;
    --radius-lg: 28px;
    --measure: 62ch;
    --gutter: clamp(1.25rem, 5vw, 3rem);
    --section: clamp(4rem, 9vw, 7.5rem);
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0D0A15;
        --bg-alt: #14101F;
        --surface: #191428;
        --ink: #F6F3FF;
        --ink-2: #B4ADD0;
        --ink-3: #8B84A8;
        --line: rgba(255, 255, 255, 0.1);
        --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 24px 64px -16px rgba(0, 0, 0, 0.6);
    }
}

/* ---------- reset ---------- */

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

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: 6rem;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

img,
svg {
    display: block;
    max-width: 100%;
    height: auto;
}

h1,
h2,
h3 {
    line-height: 1.12;
    letter-spacing: -0.025em;
    font-weight: 800;
    margin: 0;
    text-wrap: balance;
}

h1 {
    font-size: clamp(2.4rem, 6.2vw, 4.1rem);
}

h2 {
    font-size: clamp(1.9rem, 4.2vw, 2.9rem);
}

h3 {
    font-size: 1.2rem;
    letter-spacing: -0.015em;
}

p {
    margin: 0;
    text-wrap: pretty;
}

a {
    color: var(--violet-500);
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}

@media (prefers-color-scheme: dark) {
    a {
        color: var(--purple-400);
    }
}

/* ---------- layout ---------- */

.wrap {
    width: min(100% - var(--gutter) * 2, 1160px);
    margin-inline: auto;
}

section {
    padding-block: var(--section);
}

.eyebrow {
    display: block;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--violet-500);
    margin-bottom: 0.75rem;
}

@media (prefers-color-scheme: dark) {
    .eyebrow {
        color: var(--purple-400);
    }
}

.lede {
    font-size: clamp(1.0625rem, 1.9vw, 1.25rem);
    color: var(--ink-2);
    max-width: var(--measure);
}

.section-head {
    max-width: 46rem;
    margin-bottom: clamp(2.5rem, 5vw, 4rem);
}

.section-head .lede {
    margin-top: 1rem;
}

.center {
    margin-inline: auto;
    text-align: center;
}

.center .lede {
    margin-inline: auto;
}

/* ---------- skip link ---------- */

.skip {
    position: absolute;
    left: 50%;
    top: 0;
    translate: -50% -150%;
    z-index: 100;
    background: var(--surface);
    color: var(--ink);
    padding: 0.75rem 1.25rem;
    border-radius: 0 0 12px 12px;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    transition: translate 0.15s ease;
}

.skip:focus-visible {
    translate: -50% 0;
}

:where(a, button, summary, input, textarea):focus-visible {
    outline: 2px solid var(--violet-500);
    outline-offset: 3px;
    border-radius: 6px;
}

/* ---------- header ---------- */

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(180%) blur(14px);
    border-bottom: 1px solid transparent;
    transition: border-color 0.2s ease;
}

@supports not (backdrop-filter: blur(1px)) {
    .site-header {
        background: var(--bg);
    }
}

.site-header .wrap {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 4.5rem;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.02em;
    color: var(--ink);
    text-decoration: none;
    margin-right: auto;
}

.brand svg {
    width: 30px;
    height: 30px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: clamp(1rem, 2.4vw, 2rem);
}

.site-nav a {
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9375rem;
}

.site-nav a:hover {
    color: var(--ink);
}

/* No hamburger, no JS: on narrow screens drop the in-page anchors and keep
   the two links that actually lead somewhere. */
@media (max-width: 700px) {
    .site-nav .nav-anchor {
        display: none;
    }

    .site-nav .nav-cta {
        background: var(--gradient);
        color: #fff;
        padding: 0.5rem 1rem;
        border-radius: 999px;
    }
}

/* ---------- buttons ---------- */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.95rem 1.6rem;
    border-radius: 999px;
    font-weight: 700;
    font-size: 1rem;
    text-decoration: none;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 10px 30px -8px rgba(109, 40, 217, 0.55);
}

.btn-primary:hover {
    box-shadow: 0 18px 40px -10px rgba(109, 40, 217, 0.6);
}

.btn-ghost {
    background: var(--surface);
    color: var(--ink);
    border-color: var(--line);
    box-shadow: var(--shadow-sm);
}

.btn svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
}

.btn-store {
    padding: 0.7rem 1.5rem 0.75rem;
    text-align: left;
    line-height: 1.15;
}

.btn-store small {
    display: block;
    font-size: 0.7rem;
    font-weight: 600;
    opacity: 0.85;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.btn-store strong {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    align-items: center;
}

/* ---------- hero ---------- */

.hero {
    position: relative;
    padding-block: clamp(3rem, 7vw, 6rem) 0;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -12rem -10% auto -10%;
    height: 52rem;
    background:
        radial-gradient(45% 55% at 22% 40%, rgba(168, 85, 247, 0.28), transparent 70%),
        radial-gradient(40% 50% at 78% 25%, rgba(109, 40, 217, 0.22), transparent 70%);
    filter: blur(20px);
    /* the element is clipped at its own bottom edge; fade it so no straight seam shows */
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

.hero-grid {
    display: grid;
    gap: clamp(2.5rem, 6vw, 4rem);
    align-items: center;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }
}

.hero h1 .grad {
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero .lede {
    margin-block: 1.5rem 2rem;
}

.hero-note {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    color: var(--ink-3);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.hero-note svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

/* phone showcase */

.showcase {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(0.75rem, 2vw, 1.25rem);
    align-items: start;
}

.showcase img {
    width: 100%;
    border-radius: clamp(18px, 3vw, 26px);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
    background: var(--surface);
}

.showcase img:first-child {
    translate: 0 clamp(-2rem, -4vw, -1rem);
}

@media (max-width: 899px) {
    .showcase {
        max-width: 30rem;
        margin-inline: auto;
    }
}

/* ---------- features ---------- */

.cards {
    display: grid;
    gap: clamp(1rem, 2.2vw, 1.5rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
}

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 3vw, 2rem);
    box-shadow: var(--shadow-sm);
}

.card h3 {
    margin-bottom: 0.6rem;
}

.card p {
    color: var(--ink-2);
    font-size: 0.9875rem;
}

.icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: var(--gradient);
    color: #fff;
    margin-bottom: 1.25rem;
}

.icon svg {
    width: 24px;
    height: 24px;
}

/* ---------- steps ---------- */

.band {
    background: var(--bg-alt);
}

.steps {
    display: grid;
    gap: clamp(1rem, 2.2vw, 1.5rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
    counter-reset: step;
}

.step {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: clamp(1.5rem, 3vw, 2rem);
    box-shadow: var(--shadow-sm);
}

.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    background: var(--gradient);
    color: #fff;
    font-weight: 800;
    font-size: 1.1rem;
    margin-bottom: 1.25rem;
}

.step h3 {
    margin-bottom: 0.5rem;
}

.step p {
    color: var(--ink-2);
    font-size: 0.9875rem;
}

/* ---------- tones ---------- */

.tones {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 1.75rem;
}

.tone {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 0.5rem 1.1rem;
    font-weight: 600;
    font-size: 0.9375rem;
    box-shadow: var(--shadow-sm);
}

.split {
    display: grid;
    gap: clamp(2.5rem, 6vw, 4.5rem);
    align-items: center;
    grid-template-columns: 1fr;
}

@media (min-width: 900px) {
    .split {
        grid-template-columns: minmax(0, 1fr) minmax(0, 0.8fr);
    }

    .split.reverse {
        grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr);
    }

    .split.reverse > :first-child {
        order: 2;
    }
}

.split h2 + .lede,
.split h2 + p {
    margin-top: 1.25rem;
}

.split img {
    /* phone screenshots are 1179x2556 — cap the height, not the width,
       or a tall image alone decides how tall the whole section is */
    max-height: 32rem;
    width: auto;
    margin-inline: auto;
    border-radius: clamp(18px, 3vw, 26px);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--line);
}

.checks {
    list-style: none;
    padding: 0;
    margin: 1.75rem 0 0;
    display: grid;
    gap: 0.75rem;
}

.checks li {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    color: var(--ink-2);
}

.checks svg {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--violet-500);
    margin-top: 0.15rem;
}

@media (prefers-color-scheme: dark) {
    .checks svg {
        color: var(--purple-400);
    }
}

/* ---------- CTA ---------- */

.cta-panel {
    background: var(--gradient);
    border-radius: var(--radius-lg);
    padding: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 5vw, 4rem);
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow-lg);
}

.cta-panel h2 {
    margin-bottom: 1rem;
}

.cta-panel p {
    color: rgba(255, 255, 255, 0.88);
    max-width: 42ch;
    margin-inline: auto;
    margin-bottom: 2rem;
}

.cta-panel .actions {
    justify-content: center;
}

.cta-panel .btn-ghost {
    background: #fff;
    color: var(--violet-700);
    border-color: transparent;
}

/* ---------- FAQ ---------- */

.faq {
    display: grid;
    gap: 0.75rem;
    max-width: 48rem;
}

.faq details {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.faq summary {
    cursor: pointer;
    list-style: none;
    padding: 1.15rem clamp(1.15rem, 3vw, 1.65rem);
    font-weight: 700;
    font-size: 1.0625rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.faq summary::-webkit-details-marker {
    display: none;
}

.faq summary::after {
    content: "";
    margin-left: auto;
    flex-shrink: 0;
    width: 11px;
    height: 11px;
    border-right: 2.5px solid var(--ink-3);
    border-bottom: 2.5px solid var(--ink-3);
    rotate: 45deg;
    translate: 0 -3px;
    transition: rotate 0.2s ease, translate 0.2s ease;
}

.faq details[open] summary::after {
    rotate: -135deg;
    translate: 0 2px;
}

.faq .answer {
    padding: 0 clamp(1.15rem, 3vw, 1.65rem) 1.4rem;
    color: var(--ink-2);
    display: grid;
    gap: 0.85rem;
}

.faq .answer ol {
    margin: 0;
    padding-left: 1.25rem;
    display: grid;
    gap: 0.35rem;
}

/* ---------- footer ---------- */

.site-footer {
    background: var(--bg-alt);
    border-top: 1px solid var(--line);
    padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}

.footer-grid {
    display: grid;
    gap: clamp(2rem, 5vw, 3rem);
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
}

.footer-grid h2 {
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--ink-3);
    margin-bottom: 1rem;
}

.footer-grid ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.6rem;
}

.footer-grid a {
    color: var(--ink-2);
    text-decoration: none;
    font-size: 0.9375rem;
}

.footer-grid a:hover {
    color: var(--ink);
    text-decoration: underline;
}

.footer-brand p {
    color: var(--ink-2);
    font-size: 0.9375rem;
    margin-top: 0.9rem;
    max-width: 26rem;
}

.legal {
    margin-top: clamp(2.5rem, 5vw, 3.5rem);
    padding-top: 1.75rem;
    border-top: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: space-between;
    align-items: center;
    color: var(--ink-3);
    font-size: 0.8125rem;
}

.disclaimer {
    max-width: 60ch;
}

/* ---------- page hero (subpages) ---------- */

.page-hero {
    padding-block: clamp(3rem, 7vw, 5.5rem) clamp(2rem, 4vw, 3rem);
    position: relative;
}

.page-hero::before {
    content: "";
    position: absolute;
    inset: -12rem 0 auto 0;
    height: 34rem;
    background: radial-gradient(45% 60% at 30% 55%, rgba(168, 85, 247, 0.22), transparent 70%);
    filter: blur(20px);
    mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
    pointer-events: none;
    z-index: -1;
}

.prose {
    max-width: var(--measure);
    display: grid;
    gap: 1.1rem;
    color: var(--ink-2);
}

.prose h2 {
    font-size: 1.35rem;
    color: var(--ink);
    margin-top: 1.5rem;
}
