/* ---------- Home ---------- */

.hero {
    display: grid;
    gap: 28px;
    padding: 32px 0 24px;
}

.hero__text {
    gap: 18px;
}

.hero__title {
    font-family: var(--font-display);
    font-size: 46px;
    font-weight: 800;
    line-height: 0.95;
    letter-spacing: var(--tracking-snug);
    text-transform: uppercase;
    text-wrap: balance;
}

.hero__title em {
    font-style: normal;
    color: var(--color-accent);
}

.hero__sub {
    max-width: 52ch;
    font-size: 16px;
    color: var(--color-text-muted);
}

.hero__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Full-width buttons on a phone, natural width once there is room for both on one line */
.hero__ctas .btn {
    flex: 1 1 auto;
}

@media (min-width: 900px) {
    .hero {
        padding: 72px 0 56px;
    }

    .hero__title {
        font-size: 84px;
    }

    .hero__ctas .btn {
        flex: 0 0 auto;
    }
}
/* The front page sells in a few big blocks, more air between them than a normal page has */
.page.home {
    gap: 56px;
}

/* The log card from Log as the picture beside the promise, the tag sits on its edge like a fresh record does */
.hero__shot {
    position: relative;
}

.hero__shot .set-log-card {
    box-shadow: var(--shadow-lg);
}

.hero__shot-tag {
    position: absolute;
    top: -12px;
    right: 12px;
    z-index: 1;
}

.hero__shot .set-log-card__row-input.is-focus {
    border-color: var(--color-accent);
}

.proof-head {
    margin-bottom: 20px;
}

.proof-head__title {
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    text-wrap: balance;
}

.home__free {
    display: flex;
    flex-direction: column;
    gap: 56px;
}

.home__free-intro {
    display: grid;
    gap: 20px;
}

.proof-head .hero__sub {
    margin-top: 10px;
}

.proof {
    display: grid;
    gap: 12px;
}

.proof__cell {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.proof__cell h3 {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    line-height: 1.05;
    text-transform: uppercase;
}

.proof__cell p {
    font-size: 14px;
    line-height: 1.55;
    color: var(--color-text-muted);
}

.proof__chart .chart__line,
.proof__chart .chart__grid {
    vector-effect: non-scaling-stroke;
}

.proof__axis {
    display: flex;
    justify-content: space-between;
    margin-top: -6px;
    font-family: var(--font-mono);
    font-size: 12px;
    color: var(--color-text-muted);
}

.proof__delta {
    font-size: 12px;
}

/* Inside a cell the records lose their own box, the cell already is one */
.proof__cell .records {
    background: none;
    border: 0;
}

.proof__cell .record {
    padding-right: 0;
    padding-left: 0;
}

.home__workouts {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 12px;
}

.cta-band {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 28px 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
}

.cta-band__title {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    text-wrap: balance;
}

@media (min-width: 900px) {
    .page.home {
        gap: 96px;
    }

    .hero {
        grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
        align-items: center;
        gap: 64px;
    }

    .proof-head__title {
        font-size: 44px;
    }

    .home__free {
        gap: 72px;
    }

    .home__free-intro {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        align-items: center;
        gap: 64px;
    }

    /* The graph is the main proof, so it gets the tall column and the other two stack beside it */
    .proof {
        grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
    }

    .proof__cell--big {
        grid-row: 1 / span 2;
        padding: 28px;
    }

    .proof__cell--big .proof__chart {
        margin-top: auto;
    }

    .home__workouts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .cta-band {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 32px 36px;
    }
}

/* ---------- About, legal and contact ---------- */

.prose {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 68ch;
    line-height: 1.65;
}

/* Extra room above each heading, so a long policy reads as sections instead of one block */
.prose h2 {
    margin-top: 16px;
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 700;
    text-transform: uppercase;
}

.prose h2:first-child {
    margin-top: 0;
}

.prose ul {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-left: 20px;
}

.prose a {
    color: var(--color-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* About is built from the front page's parts: the hero, the cells of the proof and the closing band */
.page.about {
    gap: 56px;
}

.about__maker p {
    max-width: 52ch;
}

.about__maker h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.about__beliefs {
    padding: 0;
    list-style: none;
}

.about__story {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 900px) {
    .page.about {
        gap: 96px;
    }

    .about__beliefs {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    /* The heading in a column of its own and the text beside it, so a short text still fills the row */
    .about__story {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
        gap: 64px;
        padding-top: 32px;
        border-top: 1px solid var(--color-border);
    }
}

.legal__draft {
    margin-top: 0;
}

.legal__nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 20px;
    padding-top: 16px;
    border-top: 1px solid var(--color-border);
    font-size: 14px;
}

.legal__nav a {
    color: var(--color-text-muted);
}

.legal__nav a[aria-current] {
    color: var(--color-text);
}

.contact__message {
    min-height: 160px;
}

/* ---------- Install ---------- */

.install__benefits {
    display: grid;
    gap: 1px;
    margin-bottom: 28px;
    background: var(--color-border);
    border: 1px solid var(--color-border);
}

.install__benefit {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 14px 16px;
    background: var(--color-surface);
    font-size: 14px;
    line-height: 1.5;
}

.install__benefit span {
    color: var(--color-text-muted);
}

.install__how {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.install__how .muted {
    margin: 0;
}

.install__steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 0;
    padding-left: 20px;
    font-size: 15px;
    line-height: 1.5;
}

.install__done {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    font-weight: 600;
}

.install__done .icon {
    color: var(--color-logged);
}

/* ---------- Starting without signal (Train and the log) ---------- */

/* One column even on desktop, it is a short list of buttons and a wide row would put Start far from the name */
.offline-start {
    display: flex;
    flex-direction: column;
    gap: 12px;
    max-width: 640px;
}

/* The log keeps an empty slot for the weak-signal notice, without this the page's gap would leave a hole above the title */
[data-log-mode]:empty {
    display: none;
}