/* Hero: full-bleed photo with the copy and signup form laid over it */
.hero {
    position: relative;
    min-height: min(88vh, 780px);
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.hero-media {
    position: absolute;
    inset: 0;
}

.hero-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 55%;
}

/* Darkens the photo enough for text contrast without flattening it. */
.hero-scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(8, 9, 11, 0.55) 0%,
        rgba(8, 9, 11, 0.35) 35%,
        rgba(8, 9, 11, 0.88) 100%
    );
}

.hero-content {
    position: relative;
    padding-top: calc(var(--nav-height) + var(--space-3xl));
    padding-bottom: var(--space-3xl);
}

.hero-icon {
    border-radius: 20px;
    margin-bottom: var(--space-lg);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.45);
}

/* The hero sits on a dark photo in both themes, so its text stays light. */
.hero h1 {
    color: #ffffff;
    max-width: 16ch;
    text-shadow: 0 2px 20px rgba(0, 0, 0, 0.5);
}

.hero-pitch {
    color: rgba(255, 255, 255, 0.82);
    font-size: clamp(1.0625rem, 2vw, 1.25rem);
    margin-top: var(--space-md);
    max-width: 52ch;
    text-shadow: 0 1px 12px rgba(0, 0, 0, 0.5);
}

.hero .signup-form input[type="email"] {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero .signup-form input[type="email"]::placeholder {
    color: rgba(255, 255, 255, 0.55);
}

.hero .signup-form input[type="email"]:hover,
.hero .signup-form input[type="email"]:focus {
    background: rgba(255, 255, 255, 0.18);
}

.hero .form-message {
    color: rgba(255, 255, 255, 0.85);
}

/* Device section */
.device {
    padding: var(--space-3xl) 0;
}

.device-grid {
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: var(--space-2xl);
    align-items: center;
}

.device-image {
    width: 100%;
    max-width: 320px;
    justify-self: center;
}

.device-text p {
    color: var(--color-text-secondary);
    margin-top: var(--space-md);
    max-width: 56ch;
}

/* The offer, not the button, carries the number. Body-weight text so it reads as
   the page talking rather than as a banner. */
.device-text .device-offer {
    color: var(--color-text);
    margin-top: var(--space-lg);
}

.device-cta {
    margin-top: var(--space-md);
}

/* Outlined in the accent rather than filled: the page has one primary action and
   the signup is it, so this reads as the secondary path without disappearing.
   The first attempt used --color-surface over --color-border, which is 0.05 and
   0.12 alpha white; on the near-black background that is invisible. */
.button-referral {
    display: inline-block;
    padding: 0.75rem var(--space-lg);
    border: 1.5px solid var(--color-accent);
    border-radius: var(--border-radius-sm);
    background: transparent;
    color: var(--color-accent);
    font-weight: 600;
    text-decoration: none;
    transition: background var(--transition-fast), color var(--transition-fast);
}

/* Tint on hover rather than filling with the accent. White on #FF5A1F measures
   3.12:1, which is fine for large text and not for a 16px label. */
.button-referral:hover,
.button-referral:focus-visible {
    background: rgba(255, 90, 31, 0.14);
}

@media (prefers-color-scheme: light) {
    /* --color-accent is #E04409 in light, 4.20:1 on white: enough for large text,
       short of the 4.5:1 this label needs. The hover shade clears it at 5.88:1. */
    .button-referral {
        color: var(--color-accent-hover);
        border-color: var(--color-accent-hover);
    }

    .button-referral:hover,
    .button-referral:focus-visible {
        background: rgba(224, 68, 9, 0.1);
    }
}

/* Smaller than the offer above it, but the contrast stays put: secondary text
   measures about 7:1 here, where tertiary would fall under 4.5:1. Size can carry
   the hierarchy; a disclosure is the worst place to save contrast. */
.device-text .device-disclosure {
    color: var(--color-text-secondary);
    font-size: 0.8125rem;
    margin-top: var(--space-sm);
}

@media (max-width: 768px) {
    .hero {
        min-height: 0;
    }

    .device-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
        text-align: center;
    }

    .device-text p {
        margin-left: auto;
        margin-right: auto;
    }
}
