/* =============================================================================
   style.css

   the one stylesheet for metrove.app: a light, neutral product page.
   - system font, near-black text on white, light gray bands between sections
   - .phone frames a screenshot or the live board's video as an iphone, its
     island drawn over the top of the picture
   - .feature rows put text beside a phone (.flip puts the phone first) on
     wide screens, stacked on narrow ones
   - .looks lays the five looks side by side (a row to swipe on a phone), with
     a widget in each; .steps are ride, earn and build as cards; .board-film
     and .boards show the model railway; .duo-frame is the unfolded iphone duo
     on its side; .cards are the everyday uses
   - .prose sets the privacy policy and support pages as plain reading

   usage:
    <link rel="stylesheet" href="/style.css">
   ============================================================================= */

:root {
    --text: #1d1d1f;
    --muted: #6e6e73;
    --band: #f5f5f7;
    --line: #d2d2d7;
    --accent: #009952;
    --link: #0066cc;
    --page: 1080px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Helvetica, Arial, sans-serif;
    color: var(--text);
    background: #fff;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

img, video { display: block; max-width: 100%; }

.wrap {
    max-width: var(--page);
    margin: 0 auto;
    padding: 0 24px;
}

/* header */

.top {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(18px);
    -webkit-backdrop-filter: saturate(180%) blur(18px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.top .wrap {
    display: flex;
    align-items: center;
    gap: 24px;
    height: 56px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 17px;
    color: var(--text);
}

.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand:hover { text-decoration: none; }

.top nav {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 14px;
}

.top nav a { color: var(--text); opacity: 0.8; }
.top nav a:hover { opacity: 1; text-decoration: none; }
.top nav .button { color: #fff; opacity: 1; }

/* buttons */

.button {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 980px;
    background: var(--text);
    color: #fff;
    font-weight: 600;
    font-size: 17px;
}

.button:hover { background: #000; text-decoration: none; }
.top .button { padding: 7px 16px; font-size: 14px; }

.more { font-size: 17px; }
.more::after { content: " \203A"; }

/* hero */

.hero { padding: 72px 0 96px; }

.hero .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 64px;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-weight: 600;
    font-size: 15px;
}

h1, h2, h3 {
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1.08;
}

h1 { font-size: clamp(44px, 7vw, 76px); font-weight: 700; }
h2 { font-size: clamp(34px, 5vw, 52px); font-weight: 700; }
h3 { font-size: 24px; font-weight: 600; }

.lead {
    margin: 20px 0 32px;
    max-width: 30em;
    font-size: clamp(19px, 2.2vw, 23px);
    color: var(--muted);
}

.actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}

.fine {
    margin: 18px 0 0;
    font-size: 14px;
    color: var(--muted);
}

/* the phone frame */

.phone {
    position: relative;
    width: 295px;
    padding: 9px;
    border-radius: 50px;
    background: #1d1d1f;
    box-shadow: inset 0 0 0 2px #48484a, 0 40px 80px -30px rgba(0, 0, 0, 0.45);
}

.phone::before {
    content: "";
    position: absolute;
    z-index: 1;
    top: 20px;
    left: 50%;
    width: 31%;
    height: 26px;
    border-radius: 13px;
    background: #000;
    transform: translateX(-50%);
}

.phone img, .phone video {
    width: 100%;
    aspect-ratio: 1206 / 2622;
    object-fit: cover;
    border-radius: 41px;
    background: #000;
}

.phone.small { width: 220px; border-radius: 38px; padding: 7px; }
.phone.small::before { top: 15px; height: 19px; border-radius: 10px; }
.phone.small img { border-radius: 31px; }

/* features */

.band { background: var(--band); }

.feature { padding: 96px 0; }

.feature .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 80px;
}

.feature.flip .media { order: -1; }

.feature p {
    margin: 20px 0 0;
    max-width: 28em;
    font-size: 19px;
    color: var(--muted);
}

main { overflow-x: clip; }

.media { position: relative; width: fit-content; }

/* looks */

.looks, .duo, .loop, .railway, .everyday { padding: 96px 0; text-align: center; }
.looks .lead, .duo .lead, .loop .lead, .railway .lead, .everyday .lead { margin-left: auto; margin-right: auto; }

.gallery {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.gallery figure {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.gallery .phone.small { width: 100%; max-width: 190px; border-radius: 32px; padding: 6px; }
.gallery .phone.small::before { top: 13px; height: 15px; border-radius: 8px; }
.gallery .phone.small img { border-radius: 26px; }

.gallery figcaption {
    margin-top: 18px;
    font-size: 15px;
    color: var(--muted);
}

.gallery figcaption strong { display: block; font-size: 17px; color: var(--text); }

.widgets {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 64px;
}

.widgets img {
    width: 132px;
    border-radius: 16%;
    box-shadow: 0 14px 30px -14px rgba(0, 0, 0, 0.4);
}

/* ride, earn, build */

.steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
    margin-top: 56px;
    text-align: left;
}

.steps article {
    display: flex;
    flex-direction: column;
    padding: 32px 28px;
    border-radius: 28px;
    background: var(--band);
}

.step {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    margin: 0 0 18px;
    border-radius: 50%;
    background: var(--text);
    color: #fff;
    font-weight: 600;
}

.steps h3, .cards h3 { font-size: 26px; }

.steps p:not(.step), .cards p {
    margin: 10px 0 0;
    font-size: 17px;
    color: var(--muted);
}

.steps article > p:last-of-type { margin-bottom: 32px; }
.steps .phone.small { width: 200px; margin: auto auto 0; }
.steps .phone.small, .cards .phone.small { border-radius: 34px; padding: 6px; }
.steps .phone.small::before, .cards .phone.small::before { top: 14px; height: 16px; }
.steps .phone.small img, .cards .phone.small img { border-radius: 28px; }

/* the model railway */

.board-film {
    width: min(560px, 100%);
    margin: 48px auto 0;
    border-radius: 28px;
    overflow: hidden;
    background: #ECEAE6;
    box-shadow: 0 30px 60px -32px rgba(0, 0, 0, 0.35);
}

.board-film video { width: 100%; aspect-ratio: 800 / 1096; }

.boards-title { margin-top: 88px; font-size: 30px; }

.boards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    align-items: end;
    gap: 32px;
    margin-top: 40px;
}

.boards figure { margin: 0; }
.boards img { width: 100%; filter: drop-shadow(0 18px 22px rgba(0, 0, 0, 0.28)); }
.boards figcaption { margin-top: 16px; font-weight: 600; }

/* everyday */

.cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
    margin-top: 56px;
    text-align: left;
}

.cards article {
    padding: 32px;
    border-radius: 28px;
    background: #fff;
}

.cards .phone.small { width: 200px; margin: 0 auto 28px; }
.cards .shot { width: 100%; margin-bottom: 28px; border-radius: 22px; }

/* the unfolded iphone duo, on its side */

.duo-frame {
    width: min(880px, 100%);
    margin: 48px auto 0;
    padding: 12px;
    border-radius: 42px;
    background: #1d1d1f;
    box-shadow: inset 0 0 0 2px #48484a, 0 40px 80px -30px rgba(0, 0, 0, 0.45);
}

.duo-frame video {
    width: 100%;
    aspect-ratio: 2853 / 2007;
    object-fit: cover;
    border-radius: 31px;
    background: #000;
}

/* cities */

.cities { padding: 96px 0; text-align: center; }

.cities .grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 56px;
}

.city { display: flex; flex-direction: column; align-items: center; }
.city h3 { margin-top: 28px; }

.city p {
    margin: 8px 0 0;
    max-width: 17em;
    color: var(--muted);
}

/* join */

.join { padding: 112px 0; text-align: center; }

.join .lead { margin-left: auto; margin-right: auto; }

/* footer */

footer {
    padding: 32px 0 48px;
    border-top: 1px solid var(--line);
    font-size: 13px;
    color: var(--muted);
}

footer .links { display: flex; flex-wrap: wrap; gap: 20px; margin-bottom: 12px; }
footer .links a { color: var(--text); }
footer p { margin: 6px 0 0; max-width: 46em; }

/* privacy and support */

.prose {
    max-width: 720px;
    margin: 0 auto;
    padding: 64px 24px 96px;
}

.prose h1 { font-size: clamp(36px, 5vw, 48px); }
.prose h2 { margin-top: 48px; font-size: 26px; }
.prose h3 { margin-top: 28px; font-size: 19px; }
.prose p, .prose li { font-size: 17px; }
.prose .updated { margin-top: 12px; color: var(--muted); }
.prose ul { padding-left: 22px; }
.prose li + li { margin-top: 6px; }

.prose .card {
    margin-top: 28px;
    padding: 20px 24px;
    border-radius: 18px;
    background: var(--band);
}

.prose .card p { margin: 0; }
.prose .card p + p { margin-top: 8px; }

/* narrow screens */

@media (max-width: 860px) {
    .top nav a:not(.button) { display: none; }

    .hero { padding: 48px 0 72px; }
    .hero .wrap, .feature .wrap { grid-template-columns: 1fr; gap: 48px; text-align: center; }
    .hero .lead, .feature p { margin-left: auto; margin-right: auto; }
    .actions { justify-content: center; }
    .phone, .media { margin: 0 auto; }
    .feature.flip .media { order: 0; }
    .feature { padding: 72px 0; }

    .gallery {
        grid-template-columns: repeat(5, 146px);
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        margin: 40px -24px 0;
        padding: 0 24px 8px;
    }
    .gallery figure { scroll-snap-align: center; }
    .widgets img { width: 96px; }
    .widgets { gap: 14px; }
    .duo-frame { padding: 7px; border-radius: 24px; }
    .duo-frame video { border-radius: 18px; }

    .cities .grid { grid-template-columns: 1fr; gap: 56px; }

    .looks, .duo, .loop, .railway, .everyday { padding: 72px 0; }
    .steps, .cards { grid-template-columns: 1fr; gap: 20px; }
    .boards { grid-template-columns: repeat(2, 1fr); gap: 24px; }
    .boards-title { margin-top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
}
