/*
  landing.css
  Understudy website

  Created by Yousef Mohamed youseef.elserwey@gmail.com.
  Copyright © 2026 Yousef Mohamed. MIT License.

  The landing page's own layout, from the approved "/ (landing)" and "Landing on a phone"
  boards. Everything shared lives in understudy.css.
*/

/* Sections */

.landing-section {
    display: flex;
    flex-direction: column;
    gap: var(--us-space-32);
    padding-block: var(--us-space-72);
}

.landing-section-intro {
    display: flex;
    flex-direction: column;
    gap: var(--us-space-12);
    max-width: 680px;
}

.landing-section-intro h2,
.landing-example-text h2 {
    font-size: clamp(1.9rem, 3.6vw, 2.5rem);
    letter-spacing: -0.025em;
    line-height: 1.1;
}

.landing-section-intro p:not(.us-eyebrow),
.landing-example-text p:not(.us-eyebrow) {
    margin: 0;
    color: var(--us-text-soft);
    line-height: 1.6;
}

/* Hero */

.landing-hero {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 56px;
    padding-block: 88px var(--us-space-72);
}

.landing-hero-text {
    display: flex;
    flex: 999 1 520px;
    flex-direction: column;
    gap: var(--us-space-24);
    min-width: 0;
}

.landing-hero-text h1 {
    font-size: clamp(2.6rem, 6vw, 4rem);
    line-height: 1.03;
    letter-spacing: -0.035em;
}

.landing-hero-accent {
    color: var(--us-accent);
}

.landing-hero-text .us-lead {
    max-width: 560px;
    margin: 0;
}

.landing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: var(--us-space-12);
}

.landing-hero .us-install-box {
    max-width: 560px;
    background: var(--us-surface);
}

.landing-hero .us-install-box .us-copy-button {
    background: var(--us-bg);
}

.landing-package-quiet {
    color: var(--us-text-muted);
}

.landing-package-string {
    color: var(--us-code-string);
}

/* The mark on its stage, with two lines of a test beside it. */
.landing-stage {
    position: relative;
    display: flex;
    flex: 1 1 340px;
    align-items: center;
    justify-content: center;
    min-width: 0;
    height: 440px;
}

.landing-stage-light {
    position: absolute;
    right: 6%;
    bottom: 18px;
    left: 6%;
    height: 110px;
    border-radius: 50%;
    background: radial-gradient(closest-side, rgb(251 191 36 / 28%), rgb(251 191 36 / 6%) 70%, rgb(251 191 36 / 0%));
}

.landing-stage-mark {
    position: relative;
    width: 300px;
    height: auto;
}

.landing-stage-line {
    position: absolute;
    padding: var(--us-space-8) var(--us-space-12);
    border: 1px solid var(--us-border);
    border-radius: 10px;
    background: var(--us-surface);
    color: var(--us-code-text);
    font-family: var(--us-font-code);
    font-size: 12.5px;
}

.landing-stage-line-script {
    top: 40px;
    right: 0;
}

.landing-stage-line-check {
    bottom: 92px;
    left: 0;
}

.landing-pass-mark {
    color: var(--us-pass);
}

.landing-call {
    color: var(--us-code-call);
}

/* Features */

.landing-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr));
    gap: var(--us-space-16);
}

.landing-feature {
    padding: var(--us-space-24);
}

.landing-feature .us-icon-tile {
    color: var(--us-feature-colour, var(--us-accent));
    font-family: var(--us-font-code);
    font-size: 15px;
    font-weight: 600;
}

.landing-feature-wait {
    --us-feature-colour: var(--us-highlight);
}

.landing-feature-network {
    --us-feature-colour: var(--us-http);
}

.landing-feature-samples {
    --us-feature-colour: var(--us-samples);
}

.landing-feature h3 {
    font-size: 18px;
}

.landing-phone-text {
    display: none;
}

/* Products */

.landing-product-card .us-product-card-body {
    flex-grow: 1;
    padding: 26px var(--us-space-24) 22px;
}

.landing-product-card h3 {
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
}

.landing-product-card .us-product-card-body p {
    flex-grow: 1;
}

.landing-product-subtitle {
    display: none;
}

/* Example */

.landing-example {
    flex-flow: row wrap;
    align-items: flex-start;
    gap: 40px;
}

.landing-example-text {
    display: flex;
    flex: 1 1 320px;
    flex-direction: column;
    gap: 14px;
    min-width: 0;
}

.landing-example .us-code-block {
    flex: 999 1 560px;
    min-width: 0;
    border: 1px solid var(--us-border);
}

.landing-example .us-code-tab {
    min-height: var(--us-target-size);
    padding-inline: 14px;
    font-size: 14px;
}

.landing-example .us-code {
    padding: 18px 20px;
    font-size: 13.5px;
    line-height: 1.75;
}

/* The text beside the code follows the chosen tab. */
.landing-example-copy[hidden] {
    display: none;
}

/* Call to action */

.landing-call-to-action {
    padding-block: var(--us-space-24) var(--us-space-96);
}

.landing-call-to-action-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--us-space-16);
    padding: 56px var(--us-space-32);
    border: 1px solid var(--us-border);
    border-radius: 20px;
    background: var(--us-surface);
    text-align: center;
}

.landing-call-to-action-box h2 {
    font-size: clamp(1.8rem, 3.4vw, 2.25rem);
    letter-spacing: -0.025em;
}

.landing-call-to-action-box p {
    max-width: 520px;
    margin: 0;
    color: var(--us-text-soft);
    line-height: 1.6;
}

.landing-call-to-action-box .landing-actions {
    justify-content: center;
}

/* Footer */

.landing-footer {
    border-top: 1px solid var(--us-surface);
}

.landing-footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--us-space-32);
    padding-block: var(--us-space-48) var(--us-space-24);
}

.landing-footer-about {
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 14px;
}

.landing-footer-name {
    font-size: 18px;
    font-weight: 800;
}

.landing-footer-about p {
    margin: 0;
    color: var(--us-text-muted);
    line-height: 1.5;
}

.landing-footer-about .landing-footer-slogan {
    color: var(--us-text);
}

.landing-footer nav {
    display: flex;
    flex-direction: column;
    gap: var(--us-space-4);
    font-size: 14px;
}

.landing-footer-heading {
    margin: 0;
    padding-bottom: 6px;
    color: var(--us-text-muted);
    font-family: var(--us-font-code);
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.landing-footer nav a {
    padding-block: 6px;
    color: var(--us-text-soft);
    text-decoration: none;
}

.landing-footer nav a:hover {
    color: var(--us-text);
}

.landing-footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: var(--us-space-12);
    padding-block: 20px var(--us-space-32);
    border-top: 1px solid var(--us-surface);
    color: var(--us-text-muted);
    font-size: 13px;
}

/* Phone */

@media (width <= 640px) {
    .us-container {
        padding-inline: 20px;
    }

    .landing-hero {
        gap: 18px;
        padding-block: 40px var(--us-space-32);
    }

    .landing-hero-text {
        gap: 18px;
    }

    .landing-hero-text h1 {
        font-size: 40px;
        line-height: 1.04;
    }

    .landing-hero-text .us-eyebrow,
    .landing-section .us-eyebrow {
        font-size: 12px;
    }

    .landing-hero .us-install-box {
        padding: 4px 4px 4px 12px;
    }

    .landing-hero .us-install-box code {
        font-size: 12px;
    }

    .landing-stage {
        flex-basis: 100%;
        height: 200px;
    }

    .landing-stage-light {
        right: 15%;
        bottom: 6px;
        left: 15%;
        height: 56px;
    }

    .landing-stage-mark {
        width: 150px;
    }

    .landing-stage-line {
        display: none;
    }

    .landing-section {
        gap: 14px;
        padding-block: var(--us-space-24);
    }

    .landing-section-intro h2,
    .landing-example-text h2 {
        font-size: 28px;
    }

    .landing-section-intro p:not(.us-eyebrow) {
        display: none;
    }

    .landing-card-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: var(--us-space-12);
    }

    /* A feature becomes a row: the tile beside a title and one short line. */
    .landing-feature {
        display: grid;
        grid-template-columns: 36px minmax(0, 1fr);
        column-gap: 14px;
        row-gap: var(--us-space-4);
        padding: var(--us-space-16);
        border-radius: 14px;
    }

    .landing-feature .us-icon-tile {
        grid-row: span 2;
        width: 36px;
        height: 36px;
        border-radius: 9px;
    }

    .landing-feature h3 {
        font-size: 16px;
    }

    .landing-feature p {
        font-size: 14px;
        line-height: 1.5;
    }

    .landing-wide-text {
        display: none;
    }

    .landing-phone-text {
        display: inline;
    }

    /* A product becomes a row with a coloured edge on the left. */
    .landing-product-card {
        position: relative;
        border-radius: 14px;
        box-shadow: inset 4px 0 0 var(--us-product, var(--us-accent));
    }

    .landing-product-card .us-product-card-body {
        gap: 2px;
        justify-content: center;
        min-height: 64px;
        padding: 10px 40px 10px var(--us-space-16);
    }

    .landing-product-card h3 {
        font-size: 17px;
    }

    .landing-product-card .us-product-card-import,
    .landing-product-card .us-product-card-body p {
        display: none;
    }

    .landing-product-card .landing-product-subtitle {
        display: block;
        color: var(--us-text-muted);
        font-size: 13.5px;
    }

    .landing-product-card .us-more-link {
        position: absolute;
        inset: 0;
        justify-content: flex-end;
        padding-right: var(--us-space-16);
        font-size: 0;
    }

    .landing-product-card .us-more-link::after {
        font-size: 17px;
        font-weight: 700;
    }

    .landing-example {
        gap: var(--us-space-12);
    }

    .landing-example-text p:not(.us-eyebrow),
    .landing-example-text .us-more-link {
        display: none;
    }

    .landing-example .us-code-tabs {
        padding: 0 0 var(--us-space-12);
        border-bottom: 0;
        background: var(--us-bg);
    }

    .landing-example .us-code-block {
        border: 0;
        border-radius: 0;
        background: transparent;
    }

    .landing-example .us-code-tab {
        border: 1px solid var(--us-border);
        border-radius: var(--us-radius-badge);
        color: var(--us-text-soft);
    }

    .landing-example .us-code-tab[aria-selected="true"] {
        border-color: var(--us-text);
        background: var(--us-text);
        color: var(--us-bg);
    }

    .landing-example .us-code-file-name {
        display: none;
    }

    .landing-example .us-code {
        border: 1px solid var(--us-border);
        border-radius: 14px;
        background: var(--us-surface);
        font-size: 11.5px;
        line-height: 1.7;
    }

    .landing-call-to-action {
        padding-block: var(--us-space-24) 40px;
    }

    .landing-call-to-action-box {
        gap: var(--us-space-12);
        padding: 28px 20px;
        border-radius: 18px;
    }

    .landing-call-to-action-box h2 {
        font-size: 24px;
    }

    .landing-call-to-action-box p {
        font-size: 15px;
    }

    .landing-call-to-action-box .landing-actions {
        width: 100%;
    }

    .landing-call-to-action-box .us-button-secondary,
    .landing-footer nav,
    .landing-footer-name,
    .landing-footer-description {
        display: none;
    }

    .landing-footer-columns {
        padding-block: var(--us-space-24) 0;
    }

    .landing-footer-bottom {
        flex-direction: column;
        gap: 6px;
        padding-block: 6px var(--us-space-24);
        border-top: 0;
    }
}
