/* PrepGap — light glassmorphic theme.

   Self-hosted only: fonts live in assets/fonts, so the CSP stays at 'self' and
   nothing appears in a visitor's network tab but our own domain.

   Type scale is deliberately larger than a typical marketing page: the audience
   reads this on a phone, at night, quickly. 16px body / 15px card copy is the
   floor, never below.

   Motion uses transform + opacity only, and every transition is disabled under
   prefers-reduced-motion. */

/* ------------------------------------------------------------------ fonts */

@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/pjs-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/pjs-500.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/pjs-600.woff2") format("woff2");
    font-weight: 600;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/pjs-700.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
    font-style: normal;
}
@font-face {
    font-family: "Plus Jakarta Sans";
    src: url("../fonts/pjs-800.woff2") format("woff2");
    font-weight: 800;
    font-display: swap;
    font-style: normal;
}

/* ------------------------------------------------------------------ tokens */

:root {
    --teal-50:  #f0fdfa;
    --teal-100: #ccfbf1;
    --teal-200: #99f6e4;
    --teal-300: #5eead4;
    --teal-400: #2dd4bf;
    --teal-500: #14b8a6;
    --teal-600: #0d9488;
    --teal-700: #0f766e;
    --teal-800: #115e59;
    --teal-900: #134e4a;

    --ink-900: #0c2925;
    --ink-800: #14342f;
    --ink-700: #244741;
    --ink-600: #37564f;
    --ink-500: #4d6b64;
    --ink-400: #6f8c85;

    --surface:        rgba(255, 255, 255, 0.74);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --surface-line:   rgba(15, 118, 110, 0.13);
    --surface-line-2: rgba(15, 118, 110, 0.19);

    --shadow-sm: 0 1px 2px rgba(12, 60, 55, 0.06);
    --shadow-md: 0 6px 18px -6px rgba(12, 60, 55, 0.14), 0 2px 6px -2px rgba(12, 60, 55, 0.07);
    --shadow-lg: 0 22px 48px -16px rgba(12, 60, 55, 0.2), 0 8px 18px -8px rgba(12, 60, 55, 0.09);

    --r-sm: 10px;
    --r-md: 14px;
    --r-lg: 18px;
    --r-xl: 24px;

    --ease:      cubic-bezier(0.4, 0, 0.2, 1);
    --ease-out:  cubic-bezier(0.16, 1, 0.3, 1);
    --dur:       200ms;

    --maxw: 700px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100dvh;
    font-family: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont,
                 "Segoe UI", Roboto, sans-serif;
    font-size: 1rem;
    font-weight: 500;
    line-height: 1.55;
    color: var(--ink-800);
    background:
        radial-gradient(1200px 640px at 10% -10%, var(--teal-100) 0%, transparent 56%),
        radial-gradient(900px 520px at 94% 2%,   #dbeafe 0%, transparent 52%),
        radial-gradient(800px 640px at 50% 110%, var(--teal-50) 0%, transparent 58%),
        linear-gradient(180deg, #fbfffe 0%, #f3faf8 100%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ------------------------------------------------------------------ layout */

.wrap {
    width: 100%;
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 14px 18px 60px;
}

.wrap--wide { max-width: 880px; }

.site-head {
    display: flex;
    align-items: center;
    padding: 14px 0 18px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    font-size: 1.0625rem;
    letter-spacing: -0.022em;
    color: var(--ink-900);
    text-decoration: none;
}

.brand-mark {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--teal-400), var(--teal-700));
    box-shadow: 0 2px 8px -2px rgba(13, 148, 136, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.4);
    flex: none;
}

/* ------------------------------------------------------------------- glass */

.glass {
    position: relative;
    background: var(--surface);
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border: 1px solid var(--surface-line);
    border-radius: var(--r-xl);
    box-shadow: var(--shadow-lg);
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .glass { background: #fff; }
}

.glass::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(155deg, rgba(255, 255, 255, 0.95), rgba(255, 255, 255, 0) 52%);
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.card { padding: 22px 22px; }

/* ------------------------------------------------------------------- type */

h1, h2, h3 {
    margin: 0 0 8px;
    line-height: 1.2;
    letter-spacing: -0.024em;
    color: var(--ink-900);
    font-weight: 800;
}

h1 { font-size: clamp(1.5rem, 5.4vw, 1.95rem); }
h2 { font-size: clamp(1.15rem, 3.6vw, 1.3rem); }
h3 { font-size: 1.0625rem; font-weight: 700; }

p { margin: 0 0 10px; }
p:last-child { margin-bottom: 0; }

.lede    { font-size: 1.0625rem; line-height: 1.5; color: var(--ink-700); }
.muted   { color: var(--ink-500); }
.small   { font-size: 0.9375rem; }
.tiny    { font-size: 0.875rem; }

.eyebrow {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--teal-700);
    margin-bottom: 7px;
}

/* ----------------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 24px;
    font: inherit;
    font-weight: 700;
    font-size: 1rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform var(--dur) var(--ease),
                box-shadow var(--dur) var(--ease),
                filter var(--dur) var(--ease);
}

.btn:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 3px; }

.btn--primary {
    background: linear-gradient(135deg, var(--teal-600), var(--teal-800));
    color: #fff;
    box-shadow: 0 10px 22px -10px rgba(13, 148, 136, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn--primary:hover  { transform: translateY(-1.5px); filter: brightness(1.06); box-shadow: 0 14px 28px -10px rgba(13, 148, 136, 0.66); }
.btn--primary:active { transform: translateY(0) scale(0.99); }

.btn--ghost {
    background: var(--surface-strong);
    color: var(--ink-800);
    border-color: var(--surface-line-2);
    box-shadow: var(--shadow-sm);
}
.btn--ghost:hover  { transform: translateY(-1.5px); box-shadow: var(--shadow-md); }
.btn--ghost:active { transform: translateY(0) scale(0.99); }

.btn--sm    { padding: 10px 18px; font-size: 0.9375rem; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; transform: none; }

/* -------------------------------------------------------------------- quiz */

.progress { display: flex; align-items: center; gap: 11px; margin-bottom: 18px; }

.progress-track {
    flex: 1;
    height: 6px;
    border-radius: 999px;
    background: rgba(15, 118, 110, 0.12);
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, var(--teal-400), var(--teal-700));
    transition: width 420ms var(--ease-out);
}

.progress-label {
    font-size: 0.8125rem;
    font-weight: 700;
    color: var(--ink-500);
    font-variant-numeric: tabular-nums;
    flex: none;
}

.q-title { margin-bottom: 16px; }

.opts { display: grid; gap: 9px; margin: 0 0 18px; }

.opt {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px 17px;
    border-radius: var(--r-md);
    border: 1px solid var(--surface-line-2);
    background: var(--surface-strong);
    cursor: pointer;
    transition: transform 160ms var(--ease),
                border-color 160ms var(--ease),
                box-shadow 160ms var(--ease),
                background-color 160ms var(--ease);
}
.opt:hover { transform: translateY(-1.5px); border-color: var(--teal-300); box-shadow: var(--shadow-md); }
.opt:active { transform: scale(0.995); }

.opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }

.opt-dot {
    width: 21px; height: 21px;
    border-radius: 50%;
    border: 2px solid var(--surface-line-2);
    flex: none;
    position: relative;
    transition: border-color 160ms var(--ease);
}
.opt-dot::after {
    content: "";
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: var(--teal-600);
    transform: scale(0);
    transition: transform 200ms var(--ease-out);
}

.opt input:checked ~ .opt-dot { border-color: var(--teal-600); }
.opt input:checked ~ .opt-dot::after { transform: scale(1); }
.opt:has(input:checked) { border-color: var(--teal-500); background: var(--teal-50); }
.opt input:focus-visible ~ .opt-dot { outline: 2px solid var(--teal-700); outline-offset: 3px; }

.opt-label { font-weight: 600; font-size: 1rem; line-height: 1.4; }

.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 0.9375rem; margin-bottom: 7px; }

.select {
    width: 100%;
    padding: 15px 17px;
    font: inherit;
    font-size: 1rem;
    font-weight: 600;
    color: var(--ink-800);
    background: var(--surface-strong);
    border: 1px solid var(--surface-line-2);
    border-radius: var(--r-md);
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath fill='none' stroke='%230f766e' stroke-width='2' stroke-linecap='round' stroke-linejoin='round' d='M1 1l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 44px;
}
.select:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; }

.nav-row { display: flex; gap: 10px; align-items: center; }
.nav-row .spacer { flex: 1; }

/* ------------------------------------------------------------------ result */

.result-hero { padding: 20px 22px; }

.gap-name {
    background: linear-gradient(135deg, var(--teal-600) 10%, var(--teal-800));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.calib {
    margin: 12px 0 0;
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: rgba(20, 184, 166, 0.09);
    border: 1px solid var(--surface-line);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--ink-700);
    line-height: 1.45;
}

/* Two next steps, above the fold. The compact answer to "where do I even
   start" without making the reader scroll two sections to find out. */
.nextsteps { display: grid; gap: 8px; margin-top: 14px; }

.step {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 14px;
    border-radius: var(--r-md);
    background: var(--surface-strong);
    border: 1px solid var(--surface-line-2);
    text-decoration: none;
    color: inherit;
    box-shadow: var(--shadow-sm);
    transition: transform 160ms var(--ease), box-shadow 160ms var(--ease);
}
.step:hover  { transform: translateY(-1.5px); box-shadow: var(--shadow-md); }
.step:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 3px; }

.step-num {
    width: 24px; height: 24px;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 0.75rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, var(--teal-500), var(--teal-700));
}

.step-body { min-width: 0; }
.step-kicker { font-size: 0.75rem; font-weight: 700; color: var(--ink-500); text-transform: uppercase; letter-spacing: 0.05em; }
.step-name   { font-size: 1rem; font-weight: 800; color: var(--ink-900); letter-spacing: -0.015em; }
.step-arrow  { margin-left: auto; flex: none; color: var(--teal-700); font-weight: 800; }

.section { margin-top: 20px; }
.section-head { margin-bottom: 11px; }
.section-head h2 { margin-bottom: 3px; }

.cards { display: grid; gap: 9px; }

/* Compact row layout on phones: name + role on one line, note beneath. Three
   tall stacked cards per section is what made this page a scroll marathon. */
.rec {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas:
        "head tag"
        "note note";
    gap: 2px 10px;
    align-items: start;
    padding: 13px 15px;
    border-radius: var(--r-md);
    background: var(--surface-strong);
    border: 1px solid var(--surface-line-2);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition: transform 160ms var(--ease), box-shadow 160ms var(--ease), border-color 160ms var(--ease);
    opacity: 0;
    animation: rise 460ms var(--ease-out) forwards;
}
.rec:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); border-color: var(--teal-300); }
.rec:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 3px; }

.rec-head { grid-area: head; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 9px; }
.rec-name { font-weight: 800; font-size: 1.0625rem; letter-spacing: -0.018em; color: var(--ink-900); }
.rec-role { font-size: 0.875rem; font-weight: 700; color: var(--teal-700); }
.rec-note { grid-area: note; font-size: 0.9375rem; color: var(--ink-600); line-height: 1.45; margin-top: 3px; }
.rec-tags { grid-area: tag; display: flex; gap: 5px; flex: none; }

.rec-tag, .pill-free {
    font-size: 0.6875rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 999px;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
.rec-tag  { background: var(--teal-100); color: var(--teal-800); }
.pill-free { background: #ecfdf5; color: #047857; border: 1px solid #a7f3d0; }

.rec--flat { cursor: default; }
.rec--flat:hover { transform: none; box-shadow: var(--shadow-sm); border-color: var(--surface-line-2); }

@keyframes rise {
    from { opacity: 0; transform: translateY(9px); }
    to   { opacity: 1; transform: translateY(0); }
}

.rec:nth-child(1) { animation-delay: 30ms; }
.rec:nth-child(2) { animation-delay: 85ms; }
.rec:nth-child(3) { animation-delay: 140ms; }
.rec:nth-child(4) { animation-delay: 195ms; }
.rec:nth-child(5) { animation-delay: 250ms; }

.more { margin-top: 9px; }
.more > summary {
    cursor: pointer;
    font-size: 0.9375rem;
    font-weight: 700;
    color: var(--teal-700);
    list-style: none;
    padding: 7px 0;
}
.more > summary::-webkit-details-marker { display: none; }
.more > summary::before { content: "\25B8  "; }
.more[open] > summary::before { content: "\25BE  "; }
.more > summary:focus-visible { outline: 2px solid var(--teal-700); outline-offset: 2px; }
.more .cards { margin-top: 8px; }

.freeblock {
    margin-top: 20px;
    padding: 18px;
    border-radius: var(--r-lg);
    background: linear-gradient(140deg, rgba(204, 251, 241, 0.62), rgba(240, 253, 250, 0.5));
    border: 1px solid var(--teal-200);
}

.ladder { display: grid; gap: 9px; margin-top: 13px; }

.site-foot {
    margin-top: 28px;
    padding-top: 16px;
    border-top: 1px solid var(--surface-line);
    font-size: 0.875rem;
    color: var(--ink-400);
}
.site-foot a { color: var(--ink-500); }

/* ------------------------------------------------------------- responsive */

@media (min-width: 720px) {
    .cards { grid-template-columns: repeat(3, 1fr); gap: 11px; }

    /* Back to stacked cards where there is room for three across. */
    .rec {
        grid-template-columns: 1fr;
        grid-template-areas: "tag" "head" "note";
        padding: 16px;
    }
    .rec-tags { justify-content: flex-start; margin-bottom: 3px; }
    .rec-head { flex-direction: column; gap: 1px; }

    .nextsteps { grid-template-columns: 1fr 1fr; }
    .card, .result-hero { padding: 26px 26px; }
    .wrap { padding: 18px 20px 72px; }
}

@media (max-width: 400px) {
    .wrap { padding: 12px 13px 48px; }
    .card, .result-hero { padding: 18px 16px; }
    .rec { padding: 12px 13px; }
}

/* ------------------------------------------------------------------- a11y */

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    .rec { opacity: 1; transform: none; }
}

/* ------------------------------------------------- CSP-safe utilities

   The CSP is `style-src 'self'` with no 'unsafe-inline', so a style="" attribute
   is refused by the browser. Anything that would have been an inline style must
   be a class. Discrete progress widths rather than a computed one, because the
   quiz has a fixed number of steps. */

.progress-fill--0 { width: 4%; }
.progress-fill--1 { width: 11%; }
.progress-fill--2 { width: 22%; }
.progress-fill--3 { width: 33%; }
.progress-fill--4 { width: 44%; }
.progress-fill--5 { width: 55%; }
.progress-fill--6 { width: 67%; }
.progress-fill--7 { width: 78%; }
.progress-fill--8 { width: 89%; }
.progress-fill--9 { width: 100%; }

.mt-0    { margin-top: 0; }
.mt-tight { margin-top: -5px; }
.mt-sm   { margin-top: 10px; }
.mt-md   { margin-top: 16px; }
.mt-lg   { margin-top: 22px; }
.center  { text-align: center; }
