/*
 * The public homepage. It borrows the lesson screen's own look: the
 * purple-to-violet panel, the orange nudge, the stone board, rounded
 * paper cards and chunky buttons. Colours and type come from app.css.
 */

.home {
    display: grid;
    gap: clamp(3rem, 2rem + 5vw, 5.5rem);
    padding-block: clamp(1.5rem, 1rem + 3vw, 3.5rem) clamp(2rem, 1rem + 4vw, 4rem);
}

.home h2 {
    font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.25rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 0.6rem;
}

.home h3 {
    font-size: 1.12rem;
    margin-bottom: 0.3rem;
}

.home-eyebrow {
    margin: 0 0 0.6rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand-orange-deep, #c97a00);
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.home-actions--centre {
    justify-content: center;
}

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

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(2rem, 1rem + 4vw, 3.5rem);
    align-items: center;
}

.home-hero__title {
    font-size: clamp(2.3rem, 1.5rem + 3.4vw, 3.8rem);
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.home-hero__lead {
    font-size: clamp(1.05rem, 1rem + 0.35vw, 1.22rem);
    color: var(--color-muted);
    max-width: 34rem;
    margin: 0;
}

.home-hero__note {
    margin: 0.9rem 0 0;
    font-size: 0.92rem;
    color: var(--color-muted);
}

@media (min-width: 60rem) {
    .home-hero {
        grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    }
}

/* A lesson, drawn. A window with the stone board and the orange chat. */
.home-shot {
    position: relative;
    border-radius: 22px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-lg, 0 24px 56px rgba(42, 30, 110, 0.2));
    transform: rotate(-1.2deg);
}

.home-shot::before {
    content: "";
    position: absolute;
    inset: -1.25rem -1.25rem auto auto;
    width: 9rem;
    height: 9rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(244, 162, 30, 0.35), transparent 70%);
    z-index: -1;
}

.home-shot::after {
    content: "";
    position: absolute;
    inset: auto auto -1.5rem -1.5rem;
    width: 11rem;
    height: 11rem;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(106, 90, 224, 0.3), transparent 70%);
    z-index: -1;
}

.home-shot__bar {
    display: flex;
    gap: 0.4rem;
    padding: 0.7rem 0.9rem;
    border-radius: 22px 22px 0 0;
    background: var(--brand-gradient);
}

.home-shot__bar span {
    width: 0.6rem;
    height: 0.6rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
}

.home-shot__bar span:last-child {
    background: var(--brand-orange);
}

.home-shot__screen {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
    border-radius: 0 0 22px 22px;
    overflow: hidden;
    font-size: 0.82rem;
    line-height: 1.4;
}

.home-shot__board {
    display: grid;
    gap: 0.6rem;
    align-content: start;
    padding: 0.9rem;
    background: var(--color-stone, #f3efe8);
}

.home-shot__board > * {
    margin: 0;
}

.home-shot__title {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.25;
}

.home-shot__callout {
    padding: 0.5rem 0.65rem;
    border-left: 4px solid var(--color-accent);
    border-radius: 8px;
    background: var(--color-accent-soft, #eeeaff);
}

.home-shot__demo {
    display: grid;
    grid-template-columns: 4.2rem minmax(0, 1fr);
    gap: 0.75rem;
    align-items: end;
    padding: 0.65rem;
    border-radius: 10px;
    background: var(--color-surface);
    border: 1px solid var(--color-stone-line, #ddd5c7);
}

.home-tank {
    position: relative;
    height: 5.6rem;
    border: 2px solid var(--brand-ink);
    border-top: 0;
    border-radius: 0 0 6px 6px;
    overflow: hidden;
}

.home-tank span {
    position: absolute;
    inset: auto 0 0;
    height: 46%;
    background: linear-gradient(180deg, #7c6cf0, var(--color-accent));
    animation: home-fill 5s ease-in-out infinite;
}

@keyframes home-fill {
    0%, 100% { height: 24%; }
    50% { height: 70%; }
}

.home-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border: 1px solid var(--color-stone-line, #ddd5c7);
    border-radius: 8px;
    overflow: hidden;
    font-size: 0.78rem;
}

.home-table th,
.home-table td {
    padding: 0.18rem 0.5rem;
    text-align: left;
    border-bottom: 1px solid var(--color-stone-line, #ddd5c7);
}

.home-table tr:last-child td { border-bottom: 0; }
.home-table th { background: var(--color-stone-deep, #e9e3d8); font-weight: 700; }
.home-table .is-marked td { background: #fff3c9; }

.home-slider {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.5rem;
    align-items: center;
    font-weight: 700;
}

.home-slider__track {
    position: relative;
    height: 0.4rem;
    border-radius: 999px;
    background: var(--color-stone-deep, #e9e3d8);
}

.home-slider__track span {
    position: absolute;
    top: 50%;
    left: 40%;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    background: var(--color-accent);
    transform: translate(-50%, -50%);
    box-shadow: 0 2px 6px rgba(90, 63, 208, 0.4);
    animation: home-slide 5s ease-in-out infinite;
}

@keyframes home-slide {
    0%, 100% { left: 18%; }
    50% { left: 78%; }
}

.home-question {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    padding: 0.55rem 0.65rem;
    border-radius: 10px;
    background: var(--color-surface);
    border: 1.5px solid var(--color-accent);
    font-weight: 700;
}

.home-question__box {
    min-width: 2.6rem;
    padding: 0.15rem 0.5rem;
    border-radius: 8px;
    border: 2px solid var(--color-success, #14805a);
    background: var(--color-success-soft, #e3f6ee);
    text-align: center;
}

.home-question__check {
    margin-left: auto;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 3px 0 #3b1d92;
}

.home-shot__chat {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
    padding: 0.9rem 0.75rem;
    background: #fff8ec;
    border-left: 1px solid var(--color-border);
}

.home-bubble {
    max-width: 92%;
    margin: 0;
    padding: 0.45rem 0.65rem;
    border-radius: 14px;
}

.home-bubble--tutor {
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    background: linear-gradient(135deg, #ffc65e, var(--brand-orange));
    color: var(--brand-ink);
    box-shadow: 0 3px 8px rgba(201, 122, 0, 0.2);
}

.home-bubble--student {
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    background: var(--brand-gradient);
    color: #fff;
    box-shadow: 0 3px 8px rgba(90, 63, 208, 0.22);
}

.home-bubble--thinking {
    align-self: flex-start;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    border-bottom-left-radius: 4px;
    background: var(--color-spark-soft, #fff3dc);
    border: 1px solid #f6dfb4;
    color: var(--brand-orange-deep, #c97a00);
    font-weight: 700;
}

.home-bubble--thinking img {
    width: 1.5rem;
    height: auto;
    animation: nudge-bob 1.6s ease-in-out infinite;
}

.home-dots span {
    display: inline-block;
    animation: home-hop 1.2s ease-in-out infinite;
}

.home-dots span:nth-child(2) { animation-delay: 0.15s; }
.home-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes home-hop {
    0%, 60%, 100% { transform: translateY(0); }
    30% { transform: translateY(-4px); }
}

/* The cheer for a right answer, popping out of the bottom of the window. */
.home-cheer {
    position: absolute;
    bottom: -1rem;
    left: 30%;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin: 0;
    padding: 0.3rem 0.8rem 0.3rem 0.35rem;
    border-radius: 999px;
    background: var(--color-success, #14805a);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(20, 128, 90, 0.35);
    transform: translateX(-50%);
}

.home-cheer span {
    display: grid;
    place-items: center;
    width: 1.3rem;
    height: 1.3rem;
    border-radius: 50%;
    background: #fff;
    color: var(--color-success, #14805a);
    font-size: 0.8rem;
}

@media (max-width: 34rem) {
    .home-shot {
        transform: none;
    }

    .home-shot__screen {
        grid-template-columns: 1fr;
    }

    .home-shot__chat {
        border-left: 0;
        border-top: 1px solid var(--color-border);
    }

    .home-cheer {
        left: 50%;
    }
}

/* ---------------------------------------------------------------- sections */

.home-section__head {
    max-width: 40rem;
    margin: 0 auto 2rem;
    text-align: center;
}

.home-section__head p:last-child {
    margin: 0;
    color: var(--color-muted);
    font-size: 1.05rem;
}

/* How a lesson goes: four numbered cards joined by a line. */
.home-steps {
    position: relative;
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13.5rem, 1fr));
    gap: 1rem;
}

.home-steps li {
    position: relative;
    padding: 1.6rem 1.15rem 1.15rem;
    border-radius: var(--radius, 18px);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.home-steps p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.97rem;
}

.home-steps__n {
    position: absolute;
    top: -0.9rem;
    left: 1.1rem;
    display: grid;
    place-items: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: 50%;
    background: var(--brand-gradient);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    box-shadow: 0 4px 0 #3b1d92;
}

.home-steps li:last-child .home-steps__n {
    background: var(--brand-orange);
    color: var(--brand-ink);
    box-shadow: 0 4px 0 var(--brand-orange-deep, #c97a00);
}

/* What you get. */
.home-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
    gap: 1rem;
}

.home-feature {
    padding: 1.35rem 1.25rem;
    border-radius: var(--radius, 18px);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s, box-shadow 0.18s;
}

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

.home-feature p {
    margin: 0;
    color: var(--color-muted);
    font-size: 0.97rem;
}

.home-feature__icon {
    display: grid;
    place-items: center;
    width: 2.9rem;
    height: 2.9rem;
    margin-bottom: 0.85rem;
    border-radius: 14px;
}

.home-feature__icon svg {
    width: 1.5rem;
    height: 1.5rem;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-feature__icon--violet { background: var(--color-accent-soft, #eeeaff); color: var(--color-accent); }
.home-feature__icon--orange { background: var(--color-spark-soft, #fff3dc); color: var(--brand-orange-deep, #c97a00); }
.home-feature__icon--green { background: var(--color-success-soft, #e3f6ee); color: var(--color-success, #14805a); }

/* ---------------------------------------------------------------- split panels */

.home-split {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: clamp(1.75rem, 1rem + 3vw, 3rem);
    align-items: center;
    padding: clamp(1.5rem, 1rem + 3vw, 3rem);
    border-radius: 28px;
}

.home-split__words > p {
    color: var(--color-muted);
    font-size: 1.05rem;
}

@media (min-width: 56rem) {
    .home-split--homework { grid-template-columns: minmax(0, 1.25fr) minmax(0, 0.75fr); }
    .home-split--parents { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); }
}

/* Homework: the chat's warm orange wash. */
.home-split--homework {
    background: #fff8ec;
    border: 1px solid #f6dfb4;
}

/* Parents: the board's stone. */
.home-split--parents {
    background: var(--color-stone, #f3efe8);
    border: 1px solid var(--color-stone-line, #ddd5c7);
}

.home-ticks {
    list-style: none;
    counter-reset: tick;
    margin: 1.1rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.7rem;
}

.home-ticks li {
    position: relative;
    padding-left: 2.4rem;
    counter-increment: tick;
}

.home-ticks li::before {
    content: counter(tick);
    position: absolute;
    left: 0;
    top: 0.05rem;
    display: grid;
    place-items: center;
    width: 1.65rem;
    height: 1.65rem;
    border-radius: 50%;
    background: var(--brand-orange);
    color: var(--brand-ink);
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 0.9rem;
}

.home-ticks--plain li::before {
    content: "✓";
    background: var(--color-success, #14805a);
    color: #fff;
    font-size: 0.85rem;
}

.home-promise {
    margin: 1.25rem 0 0;
    padding: 0.8rem 1rem;
    border-left: 4px solid var(--brand-orange);
    border-radius: 12px;
    background: var(--color-surface);
    color: var(--color-text) !important;
    font-weight: 700;
}

/* A phone with the page for adding homework on it. */
.home-phone {
    justify-self: center;
    width: min(100%, 15rem);
    padding: 0.6rem;
    border-radius: 2.2rem;
    background: var(--brand-ink);
    box-shadow: var(--shadow-lg, 0 24px 56px rgba(42, 30, 110, 0.2));
    transform: rotate(3deg);
}

.home-phone__screen {
    display: grid;
    justify-items: center;
    gap: 0.6rem;
    padding: 1.4rem 0.9rem 1.1rem;
    border-radius: 1.7rem;
    background: var(--color-page, #f8f6f2);
    text-align: center;
}

.home-phone__screen img {
    width: 2.75rem;
    height: auto;
}

.home-phone__screen p {
    margin: 0;
}

.home-phone__title {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.05rem;
}

.home-phone__button {
    width: 100%;
    padding: 0.6rem;
    border-radius: 999px;
    background: var(--brand-orange);
    color: var(--brand-ink);
    font-weight: 800;
    box-shadow: 0 4px 0 var(--brand-orange-deep, #c97a00);
}

.home-phone__pages {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    width: 100%;
    margin-top: 0.35rem;
}

.home-phone__pages span {
    position: relative;
    display: grid;
    align-content: start;
    gap: 0.4rem;
    aspect-ratio: 3 / 4;
    padding: 0.6rem 0.45rem;
    border-radius: 10px;
    background: #fff;
    border: 2px solid var(--color-success, #14805a);
}

.home-phone__pages i {
    height: 0.22rem;
    border-radius: 999px;
    background: var(--color-stone-deep, #e9e3d8);
}

.home-phone__pages i:nth-child(2) { width: 80%; }
.home-phone__pages i:nth-child(4) { width: 60%; }

.home-phone__pages b {
    position: absolute;
    right: 0.25rem;
    bottom: 0.25rem;
    padding: 0 0.35rem;
    border-radius: 999px;
    background: var(--color-success-soft, #e3f6ee);
    color: var(--color-success, #14805a);
    font-size: 0.62rem;
}

.home-phone__done {
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--color-success, #14805a);
}

/* What a parent sees: the lesson list's own coloured dots. */
.home-progress {
    padding: 1.15rem 1.15rem 1rem;
    border-radius: var(--radius, 18px);
    background: var(--color-surface);
    box-shadow: 0 1px 2px rgba(60, 45, 20, 0.06), 0 10px 26px rgba(60, 45, 20, 0.1);
    transform: rotate(-1.5deg);
}

.home-progress__title {
    margin: 0 0 0.6rem;
    font-family: var(--font-display);
    font-weight: 700;
}

.home-progress ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 0.15rem;
}

.home-progress li {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 0.6rem;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: 0.93rem;
}

.home-progress li:last-child {
    border-bottom: 0;
}

.home-progress b {
    font-size: 0.78rem;
    color: var(--color-muted);
    white-space: nowrap;
}

.home-progress__note {
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
    color: var(--color-muted);
}

.home-dot {
    width: 0.8rem;
    height: 0.8rem;
    border-radius: 50%;
}

.home-dot--got { background: #14805a; }
.home-dot--wobbly { background: #e08a00; }
.home-dot--going { background: #5a3fd0; }
.home-dot--stuck { background: #c42b4b; }

@media (max-width: 34rem) {
    .home-phone,
    .home-progress {
        transform: none;
    }
}

/* ---------------------------------------------------------------- straight answers */

.home-faq {
    max-width: 46rem;
    margin-inline: auto;
    display: grid;
    gap: 0.65rem;
}

.home-faq details {
    border-radius: var(--radius-sm, 12px);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    box-shadow: var(--shadow-sm);
}

.home-faq summary {
    position: relative;
    padding: 0.95rem 3rem 0.95rem 1.15rem;
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.05rem;
    cursor: pointer;
    list-style: none;
}

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

.home-faq summary::after {
    content: "+";
    position: absolute;
    right: 1rem;
    top: 50%;
    display: grid;
    place-items: center;
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 50%;
    background: var(--color-spark-soft, #fff3dc);
    color: var(--brand-orange-deep, #c97a00);
    font-weight: 800;
    transform: translateY(-50%);
    transition: transform 0.2s;
}

.home-faq details[open] summary::after {
    transform: translateY(-50%) rotate(45deg);
}

.home-faq details p {
    margin: 0;
    padding: 0 1.15rem 1.1rem;
    color: var(--color-muted);
}

/* ---------------------------------------------------------------- the way in */

/* The left menu's deep gradient, with the mascot bobbing on it. */
.home-cta {
    position: relative;
    overflow: hidden;
    padding: clamp(2rem, 1.5rem + 3vw, 3.5rem) 1.5rem;
    border-radius: 28px;
    background: var(--brand-gradient);
    color: #fff;
    text-align: center;
    box-shadow: var(--shadow-lg, 0 24px 56px rgba(42, 30, 110, 0.2));
}

.home-cta::before,
.home-cta::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.home-cta::before {
    inset: auto -4rem -6rem auto;
    width: 18rem;
    height: 18rem;
    background: radial-gradient(circle, rgba(244, 162, 30, 0.45), transparent 68%);
}

.home-cta::after {
    inset: -5rem auto auto -4rem;
    width: 15rem;
    height: 15rem;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
}

.home-cta > * {
    position: relative;
    z-index: 1;
}

.home-cta__mascot {
    width: 5rem;
    height: auto;
    margin-bottom: 0.5rem;
    padding: 0.5rem;
    border-radius: 50%;
    background: #fff;
    animation: nudge-bob 3.2s ease-in-out infinite;
}

.home-cta h2 {
    color: #fff;
}

.home-cta p {
    margin: 0;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.88);
}

.button--glass {
    background: rgba(255, 255, 255, 0.16);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    box-shadow: none;
}

.button--glass:hover {
    background: rgba(255, 255, 255, 0.26);
    box-shadow: none;
}
