/* Krit website. Palette mirrors the app's Dracula theme (krit repo: src/theme/colors.ts).
   Orange = CTAs and accents, cyan = AI suggestions/citations, green = "go" actions. */
:root {
    --bg: #282A36;
    --surface: #343746;
    --elevated: #3D4058;
    --border: #44475A;
    --text: #F8F8F2;
    --text-muted: #BFC3D6; /* lighter than Dracula comment (#6272A4) for body-text contrast */
    --text-faint: #9AA0BC;
    --orange: #FFB86C;          /* app accent: text, links, small details only */
    --orange-strong: #FFA54A;
    --orange-fill: #C9864D;     /* muted orange for large filled areas (buttons) - the app orange glares at size */
    --orange-fill-hover: #D69459;
    --on-orange: #1E1F29;
    --cyan: #8BE9FD;
    --green: #50FA7B;
    --red: #FF5555;
    --font-ui: 'Archivo', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --font-chat: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --radius: 14px;
    --gutter: clamp(1rem, 4vw, 2rem);
}

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

html { scroll-behavior: smooth; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 1.0625rem;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; }

a { color: var(--orange); }
a:hover { color: var(--orange-strong); }

:focus-visible {
    outline: 3px solid var(--orange);
    outline-offset: 2px;
}

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.skip-link {
    position: absolute;
    left: 1rem; top: -3rem;
    background: var(--orange-fill);
    color: var(--on-orange);
    padding: .5rem 1rem;
    border-radius: 8px;
    z-index: 10;
    font-weight: 600;
}
.skip-link:focus { top: 1rem; }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding-inline: var(--gutter);
}
.narrow { max-width: 720px; }

h1, h2, h3 {
    line-height: 1.15;
    margin: 0 0 1rem;
    letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.3rem, 5.5vw, 3.6rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.5vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.35rem; font-weight: 700; }
p { margin: 0 0 1rem; }

section { padding-block: clamp(3.5rem, 8vw, 6rem); }

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

/* Buttons */
.btn {
    display: inline-block;
    border: 0;
    border-radius: 10px;
    background: var(--orange-fill);
    color: var(--on-orange);
    font: 700 1rem/1 var(--font-ui);
    padding: 1rem 1.4rem;
    cursor: pointer;
    text-decoration: none;
    white-space: nowrap;
    transition: background .15s;
}
.btn:hover { background: var(--orange-fill-hover); color: var(--on-orange); }
.btn:disabled { opacity: .6; cursor: progress; }
.btn-small { padding: .6rem 1rem; font-size: .9rem; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 5;
    background: rgba(40, 42, 54, .92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--border);
}
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: .8rem;
}
.wordmark {
    font-weight: 800;
    font-size: 1.7rem;
    letter-spacing: -0.03em;
    color: var(--text);
    text-decoration: none;
}
.wordmark:hover { color: var(--text); }
.wordmark-dot { color: var(--orange); }
.wordmark-small { font-size: 1.3rem; }

/* Hero */
.hero { padding-block: clamp(3rem, 8vw, 6.5rem); }
.hero-inner {
    display: grid;
    grid-template-columns: 1.15fr .85fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}
.eyebrow {
    color: var(--orange);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .9rem;
    margin-bottom: .8rem;
}
.hero-subtitle {
    color: var(--text-muted);
    font-size: 1.2rem;
    max-width: 36rem;
    margin-bottom: 2rem;
}

/* Signup form */
.signup { max-width: 30rem; }
.signup-center { margin: 0 auto; }
.signup-row { display: flex; gap: .6rem; }
.signup input[type="email"] {
    flex: 1;
    min-width: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font: 400 1rem var(--font-chat);
    padding: .95rem 1rem;
}
.signup input[type="email"]::placeholder { color: var(--text-faint); }
.signup input[type="email"]:focus { border-color: var(--orange); outline: none; box-shadow: 0 0 0 3px rgba(255, 184, 108, .25); }

.platform {
    border: 0;
    margin: .9rem 0 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: .4rem 1.1rem;
    align-items: center;
    color: var(--text-muted);
    font-size: .95rem;
}
.platform legend { float: left; margin-right: .3rem; padding: 0; }
.platform label { display: inline-flex; align-items: center; gap: .35rem; cursor: pointer; }
.platform input { accent-color: var(--orange); width: 1.05rem; height: 1.05rem; margin: 0; }

.friction { color: var(--text-faint); font-size: .9rem; margin: .8rem 0 0; }
.signup-center .platform { justify-content: center; }
.signup-center .friction, .signup-center .signup-status { text-align: center; }

.signup-status { margin: .6rem 0 0; font-weight: 600; min-height: 1.5em; }
.signup-status.ok { color: var(--green); }
.signup-status.error { color: var(--red); }

/* Honeypot: hidden from people, visible to naive bots */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Mock app UI */
.phone {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 32px;
    padding: 1.4rem 1.1rem 1.1rem;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .45), 0 0 0 8px #1f2029;
    max-width: 22rem;
    margin-left: auto;
    display: flex;
    flex-direction: column;
    gap: .8rem;
}
.phone-top { display: flex; justify-content: space-between; font-size: .85rem; }
.phone-label { font-weight: 700; }
.phone-meta { color: var(--text-faint); }

.exercise-card, .card {
    background: var(--surface);
    border-radius: var(--radius);
    padding: 1rem 1.1rem;
}
.exercise-name { font-weight: 700; margin-bottom: .5rem; }
.set-row { display: flex; align-items: baseline; gap: .6rem; margin-bottom: .4rem; }
.set-value {
    background: var(--elevated);
    border-radius: 8px;
    padding: .35rem .7rem;
    font-weight: 800;
    font-size: 1.4rem;
}
.set-value small { font-size: .75rem; font-weight: 500; color: var(--text-muted); }
.set-x { color: var(--text-faint); }
.set-target { font-size: .85rem; color: var(--text-faint); margin: 0; }
.cyan { color: var(--cyan); }

.bubble {
    font-family: var(--font-chat);
    font-size: .92rem;
    line-height: 1.45;
    padding: .7rem .9rem;
    border-radius: 14px;
    max-width: 90%;
}
.bubble-user {
    align-self: flex-end;
    margin-left: auto;
    background: var(--elevated);
    border-bottom-right-radius: 4px;
}
.bubble-coach {
    background: var(--border);
    border-left: 3px solid var(--orange);
    border-bottom-left-radius: 4px;
}
.card .bubble + .bubble { margin-top: .6rem; }
.card .bubble-user { width: fit-content; }

.mic {
    align-self: center;
    width: 3.4rem; height: 3.4rem;
    border-radius: 50%;
    background: var(--orange-fill);
    box-shadow: 0 0 0 0 rgba(201, 134, 77, .5);
    animation: glow 2s ease-in-out infinite;
    display: grid;
    place-items: center;
    margin-top: .3rem;
}
.mic span {
    width: .8rem; height: 1.3rem;
    border-radius: .5rem;
    background: var(--bg);
}
@keyframes glow {
    0%, 100% { box-shadow: 0 0 10px 2px rgba(201, 134, 77, .3); }
    50% { box-shadow: 0 0 22px 6px rgba(201, 134, 77, .55); }
}
@media (prefers-reduced-motion: reduce) {
    .mic { animation: none; }
    html { scroll-behavior: auto; }
}

.card-kicker {
    color: var(--cyan);
    text-transform: uppercase;
    font-size: .78rem;
    letter-spacing: .08em;
    font-weight: 700;
    margin-bottom: .5rem;
}
.card-body { font-family: var(--font-chat); font-size: .95rem; margin-bottom: .8rem; }
.citation {
    display: inline-block;
    font-size: .82rem;
    color: var(--cyan);
    border: 1px solid rgba(139, 233, 253, .4);
    border-radius: 999px;
    padding: .2rem .7rem;
    margin: 0;
}
.rest { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: .6rem; }
.rest-label { color: var(--text-faint); text-transform: uppercase; font-size: .8rem; letter-spacing: .08em; font-weight: 700; }
.rest-time { font-size: 2.6rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.voice-line { font-family: var(--font-chat); color: var(--orange); margin: 0; }
.transcript { font-family: var(--font-chat); color: var(--text-muted); font-style: italic; margin-bottom: .6rem; }
.btn-go {
    display: inline-block;
    margin-top: .5rem;
    background: var(--green);
    color: var(--bg);
    font-weight: 700;
    border-radius: 8px;
    padding: .5rem 1rem;
    font-size: .9rem;
}

/* Problem */
.problem { background: var(--surface); }
.problem h2 { text-align: center; }
.problem p { color: var(--text-muted); }

/* Features */
.feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(1.5rem, 5vw, 4rem);
    align-items: center;
    margin-bottom: clamp(3rem, 7vw, 5rem);
}
.feature:last-child { margin-bottom: 0; }
.feature-reverse .feature-text { order: 2; }
.feature-text p { color: var(--text-muted); }
.feature-visual .card {
    max-width: 24rem;
    margin: 0 auto;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}
.feature-visual .card .bubble-user { align-self: flex-end; }

/* Callout */
.callout {
    background: linear-gradient(rgba(255, 184, 108, .08), rgba(255, 184, 108, .08)), var(--bg);
    border-block: 1px solid rgba(255, 184, 108, .25);
    text-align: center;
    padding-block: clamp(4rem, 9vw, 7rem);
}
.callout-lead { color: var(--orange); font-size: clamp(1.5rem, 3.2vw, 2.1rem); font-weight: 800; line-height: 1.2; margin-bottom: 1.2rem; }
.callout p:last-child { color: var(--text-muted); font-size: 1.15rem; margin: 0; }

/* Plans */
.plan-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    max-width: 820px;
    margin: 0 auto;
}
.plan {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.8rem;
}
.plan-paid { border-color: var(--orange); }
.plan-desc { color: var(--text-muted); }
.plan ul { padding-left: 1.2rem; margin: 0; }
.plan li { margin-bottom: .5rem; }
.plan li::marker { color: var(--orange); }
.plan-note { color: var(--text-faint); font-size: .9rem; margin: 1rem 0 0; }

/* FAQ */
.faq { background: var(--surface); }
.faq details {
    border-bottom: 1px solid var(--border);
    padding: 1.1rem 0;
}
.faq summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 1.1rem;
    list-style: none;
    display: flex;
    justify-content: space-between;
    gap: 1rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--orange); font-size: 1.4rem; line-height: 1; }
.faq details[open] summary::after { content: '\2212'; }
.faq details p { color: var(--text-muted); margin: .8rem 0 0; }

/* Final CTA */
.final-cta { text-align: center; padding-block: clamp(4.5rem, 10vw, 7.5rem); }
.final-sub { color: var(--text-muted); font-size: 1.15rem; margin-bottom: 2rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding-block: 2rem 2.5rem; }
.footer-inner { display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between; }
.site-footer nav { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.site-footer nav a { color: var(--text-muted); text-decoration: none; }
.site-footer nav a:hover { color: var(--orange); }
.disclaimer { flex-basis: 100%; color: var(--text-faint); font-size: .85rem; margin: 0; }

/* Simple content pages (privacy, thanks) */
.page { padding-block: clamp(3rem, 7vw, 5rem); }
.page h1 { font-size: clamp(2rem, 4.5vw, 2.8rem); }
.page h2 { font-size: 1.35rem; margin-top: 2rem; }
.page p, .page li { color: var(--text-muted); }
.page .updated { color: var(--text-faint); font-size: .9rem; }

/* Tablet */
@media (max-width: 900px) {
    .hero-inner { grid-template-columns: 1fr; }
    .phone { margin: 0 auto; }
    .feature, .feature-reverse { grid-template-columns: 1fr; text-align: center; }
    .feature-reverse .feature-text { order: 0; }
    .feature-text { max-width: 36rem; margin: 0 auto; }
}

/* Phone */
@media (max-width: 600px) {
    body { font-size: 1rem; }
    .signup-row { flex-direction: column; }
    .btn { width: 100%; }
    .btn-small { width: auto; }
    .plan-grid { grid-template-columns: 1fr; }
    .hero-subtitle { font-size: 1.08rem; }
}
