/**
 * home.css — homepage foundation (#458, spec: docs/chorustr-website-refresh-spec.md).
 *
 * Loaded after chrome.css, which owns the tokens (colour, type scale, spacing, gradients).
 * Everything here is scoped under body.home so legal, setup, join and blog layouts are untouched.
 * Components are named for repeated design patterns, not for single sections.
 */

body.home {
    /* The mock-up and the store frames use navy ink, not black. Scoped to the homepage for now. */
    --light-text-primary: #142343;
    --light-text-secondary: #46506B;
    background: var(--bg-warm);
    color: var(--light-text-primary);
    font-size: var(--fs-body);
    line-height: 1.6;
    /* Fixed header is ~5.75rem; first section starts below it. */
    padding-top: 5.75rem;
}

@media (max-width: 768px) {
    body.home {
        padding-top: 4.5rem;
    }
}

/* ============ LAYOUT ============ */
.home .container {
    width: 100%;
    max-width: var(--container);
    margin-inline: auto;
    padding-inline: var(--gutter);
}

.home .container--wide {
    max-width: var(--container-wide);
}

.home .section {
    padding-block: var(--section-y);
}

.home .section--tight {
    padding-block: calc(var(--section-y) * 0.6);
}

/* Two-up layout that stacks (copy first) on narrow screens. */
.home .split {
    display: grid;
    gap: clamp(2rem, 5vw, 5rem);
    align-items: center;
}

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

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

/* ============ TYPE ============ */
.home h1,
.home h2,
.home h3 {
    font-family: 'DM Sans', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

.home .display {
    font-weight: 700;
    font-size: var(--fs-display);
    line-height: 1.04;
    letter-spacing: -0.03em;
}

.home h2,
.home .h2 {
    font-weight: 700;
    font-size: var(--fs-h2);
    line-height: 1.1;
}

.home h3,
.home .h3 {
    font-weight: 700;
    font-size: var(--fs-h3);
    line-height: 1.2;
}

.home .lead {
    font-size: var(--fs-lead);
    line-height: 1.5;
    color: var(--light-text-secondary);
    text-wrap: pretty;
    max-width: 38em;
}

.home .eyebrow {
    font-size: var(--fs-small);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--purple-ink);
}

/* Words picked out in the brand gradient. Decorative emphasis only: keep to large type. */
.home .gradient-text {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ============ ACTIONS ============ */
/* PrimaryCTA. One label site-wide (see START_LABEL in chrome.js). */
.home .btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    min-height: 3rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-btn);
    font: inherit;
    font-weight: 600;
    font-size: 1.0625rem;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    border: 2px solid transparent;
    transition: background 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.home .btn--primary {
    background: var(--cta-bg);
    color: var(--cta-text);
    box-shadow: 0 6px 18px rgba(209, 67, 74, 0.28);
}

.home .btn--primary:hover {
    background: var(--cta-bg-hover);
    transform: translateY(-1px);
}

.home .btn--lg {
    min-height: 3.5rem;
    padding: 1rem 2.25rem;
    font-size: 1.125rem;
}

/* On a gradient panel the button inverts. */
.home .btn--light {
    background: #fff;
    color: var(--cta-bg-hover);
}

.home .btn--light:hover {
    background: var(--bg-warm);
    transform: translateY(-1px);
}

/* SecondaryLink: a quiet text link with an arrow, for "See how it works ↓". */
.home .link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    min-height: 3rem;
    font-weight: 600;
    color: var(--purple-ink);
    text-decoration: none;
    border-radius: var(--radius-sm);
}

.home .link-arrow:hover {
    text-decoration: underline;
    text-underline-offset: 0.25em;
}

.home .actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1.75rem;
}

/* ============ BRAND ============ */
/* BrandNotes: the five notes from the logo, one colour (currentColor). Decorative: always
   aria-hidden. The notes evoke; they do not encode, so never colour them individually. */
.home .brand-notes {
    display: block;
    width: var(--notes-width, 8rem);
    aspect-ratio: 688 / 331;
    background-color: currentColor;
    -webkit-mask: url('/assets/brand-notes.svg') center / contain no-repeat;
    mask: url('/assets/brand-notes.svg') center / contain no-repeat;
    pointer-events: none;
}

/* GradientPanel: a large soft-cornered brand shape that sits behind product imagery. */
.home .gradient-panel {
    background: var(--gradient-app);
    border-radius: var(--radius-lg);
}

/* Text-bearing gradient (final CTA): deepened stops keep white text above 4.5:1. */
.home .gradient-bg {
    background: var(--gradient-panel);
    color: #fff;
}

/* ============ PRODUCT IMAGERY ============ */
/* ProductDevice: phone frame for the hero, where it helps show this is an app. Screenshots
   are exported without the status bar, so the frame starts at the app header. */
.home .device {
    position: relative;
    width: min(100%, 22rem);
    margin-inline: auto;
    padding: 0.55rem;
    background: #17141a;
    border-radius: 2.75rem;
    box-shadow: 0 30px 60px rgba(60, 20, 80, 0.28), 0 8px 18px rgba(0, 0, 0, 0.12);
}

.home .device img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 2.25rem;
}

/* ProductCrop: a real UI fragment or full screen without a device, softly rounded. */
.home .product-crop {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius-md);
    background: #fff;
    box-shadow: 0 18px 40px rgba(60, 20, 80, 0.14), 0 4px 10px rgba(0, 0, 0, 0.06);
}

/* ============ UTILITIES ============ */
.home .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

@media (prefers-reduced-motion: reduce) {
    .home .btn {
        transition: none;
    }

    .home .btn--primary:hover,
    .home .btn--light:hover {
        transform: none;
    }
}


/* ============ HOMEPAGE SECTIONS (Milestone 2, following the concept mock-up) ============ */
.home .band--white { background: #fff; }
.home .stack > * + * { margin-top: 1.25rem; }
.home .fineprint { font-size: var(--fs-small); color: var(--light-text-secondary); }
.home p a:not(.btn) { color: var(--purple-ink); text-underline-offset: 0.2em; }
.home p a:not(.btn):hover { text-decoration-thickness: 2px; }

/* Accent words in headlines. Large text only (see --accent). */
.home .accent { color: var(--accent); }

/* Decorative single note from the logo. One colour, always aria-hidden. */
.home .brand-note {
    display: block;
    width: var(--note-width, 2.5rem);
    aspect-ratio: 122 / 323;
    background-color: currentColor;
    -webkit-mask: url('/assets/brand-note.svg') center / contain no-repeat;
    mask: url('/assets/brand-note.svg') center / contain no-repeat;
    pointer-events: none;
}

/* Coming-soon pricing page */
.home .pricing-soon .container { max-width: 46rem; }
.home .pricing-soon .container > * + * { margin-top: 1.25rem; }
.home .pricing-soon .actions { margin-top: 2rem; }

/* ---- Hero + six days share one soft background ---- */
.home .lead-in { background: linear-gradient(180deg, var(--bg-warm) 0%, #FDF1F0 60%, var(--bg-warm) 100%); }

/* ---- 1. Hero ---- */
.home .hero { position: relative; padding-top: clamp(1rem, 3vw, 3rem); overflow-x: clip; }
.home .hero__grid { position: relative; z-index: 1; gap: clamp(2rem, 4vw, 4rem); }

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

.home .hero__copy > * + * { margin-top: 1.5rem; }
.home .hero__copy .actions { margin-top: 2.25rem; }
.home .hero__stage { position: relative; }

/* The orb bleeds off the right edge; the phone sits in front and fades out at the bottom. */
.home .hero__orb {
    position: absolute;
    z-index: 0;
    width: 135%;
    aspect-ratio: 1;
    right: -38%;
    top: -14%;
    border-radius: 50%;
    background:
        radial-gradient(circle at 28% 22%, #FF8076 0%, rgba(255, 128, 118, 0) 55%),
        linear-gradient(150deg, #F2625F 0%, #C45A94 48%, #8E4FB8 100%);
}

.home .hero__note { position: absolute; z-index: 1; color: #fff; }
.home .hero__note--a { --note-width: 2.4rem; color: var(--brand-coral); left: -9%; top: 40%; transform: rotate(-10deg); }
.home .hero__note--b { --note-width: 2.4rem; right: 2%; top: 6%; transform: rotate(14deg); }
.home .hero__note--c { --note-width: 3.1rem; right: -2%; top: 26%; transform: rotate(8deg); }
.home .hero__note--d { --note-width: 2.2rem; right: 8%; top: 52%; transform: rotate(-6deg); }

.home .hero__visual {
    position: relative;
    z-index: 2;
    height: clamp(27rem, 58vw, 42rem);
    overflow: hidden;
    -webkit-mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
    mask-image: linear-gradient(to bottom, #000 80%, transparent 100%);
}

.home .hero__visual .device { width: min(80%, 23rem); margin: 0 auto; }

@media (max-width: 899px) {
    .home .hero__orb { width: 118%; right: -14%; top: 5%; }
    .home .hero__note--a { left: 2%; }
    .home .hero__note--b, .home .hero__note--c, .home .hero__note--d { display: none; }
}

/* ---- 2. Six days ---- */
.home .six-days { padding-block: clamp(2.5rem, 4vw, 4rem) var(--section-y); }
.home .six-days__grid { align-items: center; gap: clamp(2rem, 5vw, 5rem); }
.home .six-days__copy h2 { font-size: var(--fs-h2); line-height: 1.1; }
.home .six-days__story { margin-top: 1.75rem; }
.home .six-days__story p { font-size: var(--fs-lead); color: var(--light-text-secondary); }
.home .six-days__story p + p { margin-top: 0.35rem; }
.home .six-days__story strong { color: var(--accent); }
.home .six-days__conclusion {
    max-width: 24ch;
    line-height: 1.35;
    margin: clamp(3rem, 6vw, 5rem) auto 0;
    text-align: center;
    font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.25rem);
}
.home .six-days__conclusion .gradient-text { white-space: nowrap; }

.home .week { list-style: none; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); position: relative; }
.home .week::before {
    content: "";
    position: absolute;
    left: 6%;
    right: 6%;
    top: calc(1.4rem + 1.4rem);          /* label row + half the rehearsal circle */
    height: 2px;
    background: repeating-linear-gradient(90deg, rgba(20, 35, 67, 0.28) 0 6px, transparent 6px 13px);
}
.home .week__item { position: relative; display: flex; flex-direction: column; align-items: center; }
.home .week__top { height: 1.4rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--light-text-secondary); }
.home .week__mark { height: 2.8rem; display: grid; place-items: center; }
.home .week__dot { width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #fff; border: 2px solid rgba(20, 35, 67, 0.35); }
.home .week__item--rehearsal .week__mark { width: 2.8rem; border-radius: 50%; background: var(--cta-bg); color: #fff; box-shadow: 0 6px 16px rgba(209, 67, 74, 0.3); }
.home .week__item--rehearsal .week__mark .brand-note { --note-width: 0.8rem; }
.home .week__name { margin-top: 0.7rem; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--light-text-secondary); }
.home .week__note { margin-top: 0.7rem; height: 2.2rem; display: grid; place-items: start center; color: var(--brand-purple); opacity: 0.75; }
.home .week__note::before { content: ""; position: absolute; width: 0; height: 0.6rem; margin-top: -0.65rem; border-left: 2px dotted rgba(20, 35, 67, 0.3); }
.home .week__note .brand-note { --note-width: 0.9rem; }

@media (max-width: 899px) {
    .home .week { max-width: 34rem; margin-inline: auto; }
}

@media (max-width: 640px) {
    .home .week { grid-template-columns: 1fr; max-width: 19rem; gap: 0.2rem; margin-inline: 0; }
    .home .week::before { left: 1.4rem; right: auto; top: 1.4rem; bottom: 1.4rem; width: 2px; height: auto; background: repeating-linear-gradient(180deg, rgba(20, 35, 67, 0.28) 0 6px, transparent 6px 13px); }
    .home .week__item { flex-direction: row; gap: 0.9rem; min-height: 2.8rem; }
    .home .week__top { display: none; }
    .home .week__mark { order: 1; width: 2.8rem; }
    .home .week__name { order: 2; margin: 0; }
    .home .week__item--rehearsal .week__name::after { content: "Rehearsal"; }
    .home .week__item--rehearsal .week__name .d { display: none; }
    .home .week__note { order: 3; margin: 0 0 0 auto; height: auto; place-items: center; }
    .home .week__note::before { display: none; }
}

/* ---- 3. Practise · Rehearse · Perform ---- */
.home .journey { padding-block: var(--section-y); }
.home .journey__intro { text-align: center; max-width: 46rem; margin-inline: auto; }
.home .journey__intro .lead { margin: 1.25rem auto 0; }

/* Three side by side with Practise widest. Rehearse and Perform stay deliberately shorter. */
.home .trio { display: grid; gap: clamp(1.5rem, 3vw, 3rem); grid-template-columns: 1.55fr 1fr 1fr; align-items: start; margin-top: clamp(2.5rem, 5vw, 4rem); }
.home .col > * + * { margin-top: 1.25rem; }
.home .col + .col { border-left: 1px solid rgba(20, 35, 67, 0.12); padding-left: clamp(1.5rem, 3vw, 3rem); }
.home .col__head { display: flex; align-items: center; gap: 0.85rem; }
.home .col__icon { flex: none; width: 2.9rem; height: 2.9rem; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.home .col__icon svg { width: 1.4rem; height: 1.4rem; }
.home .col__icon--practise { background: var(--brand-coral); }
.home .col__icon--rehearse { background: var(--brand-purple); }
.home .col__icon--perform { background: #F0A030; }
.home .col__icon .brand-note { --note-width: 0.8rem; }
.home .col__head h3 { font-size: 1.6rem; line-height: 1.1; }
.home .col__head p { font-size: var(--fs-small); color: var(--light-text-secondary); }
.home .col p, .home .col li { color: var(--light-text-secondary); }
.home .col h4 { font-size: 1.1rem; line-height: 1.25; letter-spacing: -0.01em; font-weight: 700; color: var(--light-text-primary); }
.home .col strong { color: var(--light-text-primary); }

@media (max-width: 1100px) {
    .home .trio { grid-template-columns: 1fr 1fr; }
    .home .trio .col--practise { grid-column: 1 / -1; }
    .home .col + .col { border-left: 0; padding-left: 0; }
    .home .col--perform { border-left: 1px solid rgba(20, 35, 67, 0.12); padding-left: clamp(1.5rem, 3vw, 3rem); }
}

@media (max-width: 720px) {
    .home .trio { grid-template-columns: 1fr; }
    .home .col--perform { border-left: 0; padding-left: 0; }
    .home .col + .col { border-top: 1px solid rgba(20, 35, 67, 0.12); padding-top: 2rem; }
}

/* Practise: player behind, mixer in front. */
.home .stage { position: relative; display: flex; align-items: flex-start; justify-content: center; }
.home .stage .stage__back { width: 50%; flex: none; margin: 0; }
.home .stage .stage__front { position: relative; z-index: 2; width: 58%; flex: none; margin-left: -12%; margin-top: 14%; }
@media (max-width: 720px) {
    .home .stage .stage__back { display: none; }
    .home .stage .stage__front { width: min(100%, 22rem); margin: 0 auto; }
}

.home .practise-more {
    display: grid; gap: clamp(2rem, 5vw, 5rem); align-items: center;
    margin-top: clamp(3rem, 6vw, 5rem); padding-top: clamp(2.5rem, 5vw, 4rem);
    border-top: 1px solid rgba(20, 35, 67, 0.12);
}
@media (min-width: 900px) { .home .practise-more { grid-template-columns: 1fr 1.1fr; } }
.home .practise-more h4 { font-size: var(--fs-h3); line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; }
.home .practise-more p { color: var(--light-text-secondary); max-width: 34em; }
.home .practise-more .eyebrow { color: var(--purple-ink); }
.home .practise-more strong { color: var(--light-text-primary); }
@media (max-width: 1100px) { .home .col--practise .stage { max-width: 32rem; margin-inline: auto; } }
.home .pair { display: grid; gap: 1rem; }
.home .pair .product-crop:nth-child(2) { width: 88%; margin-left: auto; }
.home .getapp { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.home .getapp img { height: 2.6rem; width: auto; display: block; }
.home .getapp .gp img { height: 3.2rem; margin-block: -0.3rem; } /* Play badge has built-in padding */

/* Rehearse */
.home .screen-stack { position: relative; padding-bottom: 2.25rem; }
.home .screen-stack__phone { position: absolute; right: 2%; bottom: 0; width: 46%; }
.home .caption { margin-top: 0.75rem; font-size: 0.8rem; line-height: 1.45; color: var(--light-text-secondary); }
/* Perform */
.home .duo { position: relative; padding-bottom: 0.5rem; }
.home .duo__a { width: 78%; }
.home .duo__b { width: 78%; margin-left: auto; margin-top: -3.5rem; position: relative; }

/* ---- 4. People: full-bleed band with the rehearsal photograph ---- */
.home .people { position: relative; background: #142343; color: #fff; overflow: hidden; }
.home .people__photo img { display: block; width: 100%; height: 100%; object-fit: cover; }
.home .people .container { position: relative; z-index: 1; padding-block: clamp(2.5rem, 5vw, 5rem); }
.home .people__grid { display: grid; gap: clamp(1.25rem, 3vw, 3rem); align-items: start; }
.home .people h2 { color: #fff; font-size: var(--fs-h2); }
.home .people p { font-size: 1.1rem; line-height: 1.55; color: rgba(255, 255, 255, 0.95); }
.home .people p + p { margin-top: 0.75rem; }
.home .people .people__more { margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid rgba(255, 255, 255, 0.3); }

@media (min-width: 900px) {
    .home .people { min-height: 30rem; display: flex; align-items: center; }
    .home .people__photo { position: absolute; inset: 0; }
    .home .people__photo img { object-position: 72% 30%; }
    /* Navy fade keeps the copy on the dark left; faces stay clear on the right. */
    .home .people__photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(20, 35, 67, 0.95) 0%, rgba(20, 35, 67, 0.9) 42%, rgba(20, 35, 67, 0.45) 62%, rgba(20, 35, 67, 0) 82%); }
    .home .people .container { width: 100%; }
    .home .people__grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); max-width: 46rem; margin-right: auto; }
}

/* On a phone the photo sits above the copy so nothing is laid over faces. */
@media (max-width: 899px) {
    .home .people__photo { height: clamp(13rem, 55vw, 20rem); }
    .home .people__photo img { object-position: 60% 30%; }
}

/* ---- 5. Leader: admin -> welcome screen ---- */
.home .leader { padding-block: var(--section-y); }
.home .leader__head { max-width: 44rem; }
.home .leader__head h2 { font-size: var(--fs-h2); line-height: 1.1; }
.home .leader__head .lead { margin-top: 1.25rem; }
.home .leader__statement { margin-top: 1.5rem; font-size: var(--fs-h3); font-weight: 700; line-height: 1.2; letter-spacing: -0.02em; }
.home .leader__flow { margin-top: clamp(2.5rem, 5vw, 4rem); display: grid; gap: 1.25rem; align-items: center; grid-template-columns: minmax(0, 1.35fr) auto minmax(0, 1fr); }
.home .leader__flow figcaption { margin-top: 0.9rem; color: var(--light-text-secondary); font-size: 0.95rem; }
.home .leader__flow figcaption strong { color: var(--light-text-primary); }
.home .leader__arrow { width: 2.75rem; color: var(--purple-ink); }
@media (max-width: 900px) {
    .home .leader__flow { grid-template-columns: 1fr; }
    .home .leader__arrow { transform: rotate(90deg); justify-self: center; }
}

/* ---- 6. Final CTA with the footer inside the same gradient ---- */
.home .finale { position: relative; overflow: hidden; background: var(--gradient-panel); color: #fff; }
.home .finale::before {
    content: ""; position: absolute; inset: auto 0 0 0; height: 55%; pointer-events: none; opacity: 0.18;
    background: repeating-radial-gradient(ellipse at 50% 140%, transparent 0 28px, rgba(255, 255, 255, 0.9) 28px 29px);
}
.home .finale__note { position: absolute; color: rgba(255, 255, 255, 0.95); }
.home .finale__note--l { --note-width: 2.8rem; left: clamp(1rem, 6vw, 6rem); top: 18%; transform: rotate(-8deg); }
.home .finale__note--r { --note-width: 2.4rem; right: clamp(1rem, 6vw, 6rem); top: 24%; transform: rotate(10deg); }
.home .final { position: relative; z-index: 1; text-align: center; padding-block: clamp(4rem, 8vw, 7rem) clamp(2.5rem, 5vw, 4rem); }
.home .final .container > * + * { margin-top: 1.5rem; }
.home .final h2 { color: #fff; font-size: var(--fs-h2); }
.home .final .lead { color: #fff; margin-inline: auto; }
.home .final .actions { justify-content: center; margin-top: 2.25rem; }
@media (max-width: 640px) { .home .finale__note { display: none; } }

.home .finale footer { position: relative; z-index: 1; background: transparent; border-top: 1px solid rgba(255, 255, 255, 0.3); color: #fff; padding-block: 2.5rem; }
.home .finale .footer-logo { background: none; -webkit-text-fill-color: #fff; color: #fff; }
.home .finale .footer-tagline { color: #fff; font-size: var(--fs-h3); letter-spacing: -0.02em; }
.home .finale .footer-links a { color: rgba(255, 255, 255, 0.95); }
.home .finale .footer-links a:hover { color: #fff; text-decoration: underline; }
.home .finale .footer-bottom { color: rgba(255, 255, 255, 0.9); border-top-color: rgba(255, 255, 255, 0.3); }
.home .finale :focus-visible { outline-color: #fff; }
