/*
 * The landing page. One idea per section: what it is (hero), what it does
 * (features), how to start (steps), and the door again (call to action).
 */

.f-landing-page .f-page {
    padding-block: var(--space-6) var(--space-7);
}

/* Hero */

.f-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    gap: var(--space-7);
    align-items: center;
    padding-block: var(--space-6) var(--space-7);
}

.f-hero__copy > * {
    animation: f-rise 560ms var(--ease) both;
}

.f-hero__copy > :nth-child(2) { animation-delay: 60ms; }
.f-hero__copy > :nth-child(3) { animation-delay: 120ms; }
.f-hero__copy > :nth-child(4) { animation-delay: 180ms; }
.f-hero__copy > :nth-child(5) { animation-delay: 240ms; }

.f-hero__eyebrow {
    display: inline-block;
    margin-bottom: var(--space-4);
    padding: var(--space-1) var(--space-3);
    font-size: var(--text-xs);
    font-weight: var(--weight-medium);
    color: var(--accent-strong);
    background: var(--accent-soft);
    border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
    border-radius: var(--radius-pill);
}

.f-hero__title {
    margin-bottom: var(--space-4);
    font-size: clamp(var(--text-3xl), 5.2vw, calc(var(--text-3xl) * 1.75));
    line-height: 1.25;
    letter-spacing: -0.01em;
}

.f-hero__accent {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.f-hero__lede {
    max-width: 46ch;
    margin-bottom: var(--space-5);
    font-size: var(--text-lg);
    color: var(--text-secondary);
}

.f-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.f-hero__note {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-tertiary);
}

/* The drawn exam card. Built from the runner's vocabulary -- the bar, meta
 * chips in their information hues, lettered choices, the explanation panel --
 * with grey bars where the words would be. */

.f-hero__stage {
    position: relative;
    padding: var(--space-5) var(--space-5) var(--space-7);
    animation: f-rise 700ms var(--ease) 160ms both;
}

.f-hero__stage::before {
    content: "";
    position: absolute;
    inset: 6% 4% 10%;
    background: radial-gradient(closest-side, var(--aura-1), transparent);
    filter: blur(8px);
    z-index: -1;
}

.f-demo {
    position: relative;
    padding: var(--space-4);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-strong);
    transform: rotate(-1.5deg);
    animation: f-float 7s ease-in-out infinite;
}

@keyframes f-float {
    0%, 100% { transform: rotate(-1.5deg) translateY(0); }
    50% { transform: rotate(-1deg) translateY(-8px); }
}

.f-demo__bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-3);
    border-bottom: 1px solid var(--border);
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

.f-demo__step b {
    color: var(--text-primary);
}

.f-demo__timer {
    padding: 2px var(--space-3);
    font-variant-numeric: tabular-nums;
    font-weight: var(--weight-medium);
    color: var(--accent-strong);
    background: var(--accent-soft);
    border-radius: var(--radius-pill);
}

.f-demo__meta {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
}

.f-demo__chip {
    padding: 1px var(--space-3);
    font-size: var(--text-2xs);
    font-weight: var(--weight-medium);
    border-radius: var(--radius-pill);
}

.f-demo__chip--subject { color: var(--hue-subject); background: var(--hue-subject-soft); }
.f-demo__chip--difficulty { color: var(--hue-difficulty); background: var(--hue-difficulty-soft); }
.f-demo__chip--source { color: var(--hue-source); background: var(--hue-source-soft); }

.f-demo__stem,
.f-demo__explain {
    display: grid;
    gap: 7px;
    margin-bottom: var(--space-4);
}

.f-demo__stem span,
.f-demo__explain span,
.f-demo__choices li span {
    display: block;
    height: 9px;
    border-radius: var(--radius-pill);
    background: var(--surface-strong);
}

.f-demo__stem .is-short,
.f-demo__explain .is-short {
    width: 62%;
}

.f-demo__choices {
    display: grid;
    gap: var(--space-2);
    margin: 0 0 var(--space-4);
    padding: 0;
    list-style: none;
}

.f-demo__choices li {
    position: relative;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--surface-muted);
}

.f-demo__choices li span {
    flex: 1;
    max-width: 70%;
}

.f-demo__choices i {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    font-style: normal;
    font-size: var(--text-2xs);
    font-weight: var(--weight-medium);
    color: var(--text-secondary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
}

.f-demo__choices li.is-right {
    border-color: color-mix(in srgb, var(--success) 45%, transparent);
    background: var(--success-soft);
}

.f-demo__choices li.is-right i {
    color: var(--text-on-accent);
    background: var(--success);
    border-color: var(--success);
}

.f-demo__choices li.is-right span {
    background: color-mix(in srgb, var(--success) 28%, transparent);
}

.f-demo__tick {
    margin-inline-start: auto;
    width: 20px;
    height: 20px;
    fill: none;
    stroke: var(--success);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    animation: f-draw 520ms var(--ease) 900ms forwards;
}

@keyframes f-draw {
    to { stroke-dashoffset: 0; }
}

.f-demo__explain {
    margin: 0;
    padding: var(--space-3);
    border-radius: var(--radius-md);
    background: var(--hue-tag-soft);
}

.f-demo__explain strong {
    font-size: var(--text-xs);
    color: var(--hue-tag);
}

.f-demo__explain span {
    background: color-mix(in srgb, var(--hue-tag) 18%, transparent);
}

/* The question map, peeking out under the card. */
.f-demo-rail {
    position: absolute;
    inset-inline-start: 12%;
    bottom: var(--space-3);
    display: flex;
    gap: 6px;
    padding: var(--space-2) var(--space-3);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-soft);
    transform: rotate(1deg);
}

.f-demo-rail span {
    width: 18px;
    height: 18px;
    border-radius: var(--radius-pill);
    background: var(--surface-strong);
}

.f-demo-rail .is-done { background: var(--accent-soft); box-shadow: inset 0 0 0 2px var(--accent); }
.f-demo-rail .is-wrong { background: var(--danger-soft); box-shadow: inset 0 0 0 2px var(--danger); }
.f-demo-rail .is-current { background: var(--accent-gradient); box-shadow: var(--shadow-accent); }

/* Features */

.f-features {
    padding-block: var(--space-6);
}

.f-features__grid {
    display: grid;
    gap: var(--space-4);
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.f-feature {
    --hue: var(--accent);
    --hue-soft: var(--accent-soft);
    position: relative;
    padding: var(--space-5);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
    overflow: hidden;
    transition: transform var(--motion-base) var(--ease), box-shadow var(--motion-base) var(--ease);
}

.f-feature::after {
    content: "";
    position: absolute;
    inset-inline-end: -40px;
    top: -40px;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    background: var(--hue-soft);
}

.f-feature:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-strong);
}

.f-feature--subject { --hue: var(--hue-subject); --hue-soft: var(--hue-subject-soft); }
.f-feature--tag { --hue: var(--hue-tag); --hue-soft: var(--hue-tag-soft); }
.f-feature--difficulty { --hue: var(--hue-difficulty); --hue-soft: var(--hue-difficulty-soft); }
.f-feature--source { --hue: var(--hue-source); --hue-soft: var(--hue-source-soft); }

.f-feature__icon {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: var(--space-4);
    color: var(--hue);
    background: var(--hue-soft);
    border-radius: var(--radius-md);
}

.f-feature__icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.f-feature h3 {
    font-size: var(--text-lg);
    margin-bottom: var(--space-2);
}

.f-feature p {
    margin: 0;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Steps */

.f-steps {
    padding-block: var(--space-6);
}

.f-steps__list {
    position: relative;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
    margin: 0;
    padding: 0;
    list-style: none;
}

/* The line the three steps sit on. */
.f-steps__list::before {
    content: "";
    position: absolute;
    top: 24px;
    inset-inline: 16%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--border-strong) 15%, var(--border-strong) 85%, transparent);
}

.f-step {
    position: relative;
    display: grid;
    justify-items: center;
    gap: var(--space-3);
    text-align: center;
}

.f-step__num {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    font-size: var(--text-xl);
    font-weight: var(--weight-strong);
    color: var(--text-on-accent);
    background: var(--accent-gradient);
    border: 4px solid var(--bg-body);
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-accent);
}

.f-step h3 {
    margin-bottom: var(--space-1);
}

.f-step p {
    margin: 0;
    max-width: 28ch;
    font-size: var(--text-sm);
    color: var(--text-secondary);
}

/* Call to action */

.f-cta {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-5);
    margin-top: var(--space-6);
    padding: var(--space-6);
    color: var(--text-on-accent);
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-accent);
    overflow: hidden;
}

.f-cta::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 34px),
        repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.06) 0 1px, transparent 1px 68px);
    pointer-events: none;
}

.f-cta h2 {
    margin-bottom: var(--space-1);
}

.f-cta p {
    margin: 0;
    opacity: 0.88;
}

.f-cta > * {
    position: relative;
}

@media (max-width: 900px) {
    .f-hero {
        grid-template-columns: 1fr;
        gap: var(--space-5);
        padding-block: var(--space-4) var(--space-5);
        text-align: center;
    }

    .f-hero__lede {
        margin-inline: auto;
    }

    .f-hero__actions {
        justify-content: center;
    }

    .f-hero__stage {
        width: min(100%, 420px);
        margin-inline: auto;
    }

    .f-features__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .f-hero__actions .f-btn {
        flex: 1;
    }

    .f-features__grid,
    .f-steps__list {
        grid-template-columns: 1fr;
    }

    .f-steps__list::before {
        top: 0;
        bottom: 0;
        inset-inline: auto;
        inset-inline-start: 23px;
        width: 2px;
        height: auto;
        background: var(--border-strong);
    }

    .f-step {
        grid-template-columns: auto 1fr;
        justify-items: start;
        text-align: start;
    }

    .f-cta {
        flex-direction: column;
        text-align: center;
    }

    .f-cta .f-btn {
        width: 100%;
    }
}

/* ------------------------------------------------------------ sheet language */

/* No glow behind the demo, no blobs in the cards, no lit band: the page
   is set on the paper like the rest of FANOOS. */
.f-hero__stage::before {
    content: none;
}

.f-demo-rail .is-current {
    background: var(--accent);
    box-shadow: none;
}

.f-feature {
    --hue: var(--accent);
    --hue-soft: var(--accent-soft);
    border-radius: var(--radius-md);
    box-shadow: none;
    transition: border-color var(--motion-fast) var(--ease);
}

.f-feature--subject,
.f-feature--tag,
.f-feature--difficulty,
.f-feature--source {
    --hue: var(--accent);
    --hue-soft: var(--accent-soft);
}

.f-feature::after {
    content: none;
}

.f-feature:hover {
    transform: none;
    box-shadow: none;
    border-color: var(--border-strong);
}

.f-step__num {
    width: 40px;
    height: 40px;
    font-size: var(--text-base);
    color: var(--accent);
    background: var(--bg-body);
    border: 1px solid var(--accent);
    box-shadow: none;
}

.f-cta {
    color: var(--text-primary);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    box-shadow: none;
}

.f-cta::before {
    content: none;
}

.f-cta p {
    color: var(--text-secondary);
    opacity: 1;
}

.f-cta .f-btn--light {
    background: var(--accent);
    color: var(--text-on-accent);
    box-shadow: none;
}

.f-cta .f-btn--light:hover:not(:disabled) {
    background: var(--accent-strong);
    transform: none;
    box-shadow: none;
}

/* A spacious editorial front door, with the product example as its focal point. */
.f-landing-page .f-page {
    padding-top: 0;
}

.f-hero {
    min-height: 560px;
    gap: clamp(32px, 6vw, 80px);
    padding-block: clamp(48px, 8vw, 104px);
}

.f-hero__eyebrow {
    padding: 0;
    color: var(--accent-strong);
    background: none;
    border: 0;
    font-weight: 700;
}

.f-hero__title {
    font-size: clamp(calc(var(--text-3xl) * 1.43), 5.5vw, calc(var(--text-3xl) * 2.57));
    line-height: 1.3;
}

.f-hero__accent {
    color: var(--accent);
    background: none;
}

.f-hero__lede {
    line-height: 2;
}

.f-hero__stage {
    padding: 32px 32px 56px;
    border-radius: 28px;
    background: var(--accent-soft);
}

.f-demo {
    transform: none;
    animation: none;
}

.f-features,
.f-steps {
    padding-block: clamp(40px, 6vw, 72px);
    border-top: 1px solid var(--border-strong);
}

.f-section-title {
    margin-bottom: 32px;
    font-size: clamp(var(--text-2xl), 3vw, calc(var(--text-3xl) * 1.28));
}

.f-features__grid {
    gap: 0;
    border-block: 1px solid var(--border-strong);
}

.f-feature {
    padding: 28px 20px;
    background: transparent;
    border: 0;
    border-radius: 0;
    border-inline-start: 1px solid var(--border-strong);
}

.f-feature:first-child {
    border-inline-start: 0;
}

.f-feature__icon {
    margin-bottom: 24px;
}

.f-cta {
    padding: clamp(28px, 5vw, 56px);
    background: var(--accent-soft);
    border: 0;
    border-radius: 24px;
}

@media (max-width: 900px) {
    .f-hero { min-height: 0; }
    .f-feature:nth-child(3) { border-inline-start: 0; }
    .f-feature:nth-child(n+3) { border-top: 1px solid var(--border-strong); }
}

@media (max-width: 560px) {
    .f-hero__stage { padding: 20px 20px 48px; }
    .f-feature { border-inline-start: 0; }
    .f-feature + .f-feature { border-top: 1px solid var(--border-strong); }
}
