/* lawfive.app (SITE-1). The tokens and type are the web app's (web/src/styles.css, DESIGN.md);
   light and dark follow the visitor's system. */

@font-face { font-family: "Barlow"; font-weight: 400; font-display: swap; src: url(fonts/barlow-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 500; font-display: swap; src: url(fonts/barlow-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 600; font-display: swap; src: url(fonts/barlow-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow"; font-weight: 700; font-display: swap; src: url(fonts/barlow-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Barlow Condensed"; font-weight: 700; font-display: swap; src: url(fonts/barlow-condensed-latin-700-normal.woff2) format("woff2"); }

:root {
    --bg: #f4f5f2;
    --surface: #ffffff;
    --surface-2: #f8f9f7;
    --text: #15181a;
    --muted: #5d656c;
    --border: #e1e4de;
    --brand: #0b6b47;
    --brand-strong: #08573a;
    --brand-soft: #e3f1ea;
    --on-brand: #ffffff;
    --yellow: #f5c400;
    --red: #e5484d;
    --pitch-line: rgb(11 107 71 / 14%);
    --shadow: 0 1px 2px rgb(16 24 20 / 6%), 0 1px 1px rgb(16 24 20 / 4%);
    --lift: 0 18px 40px rgb(16 24 20 / 14%);
    --radius: 12px;
    --font: "Barlow", sans-serif;
    --display: "Barlow Condensed", "Barlow", sans-serif;
    color-scheme: light;
}

@media (prefers-color-scheme: dark) {
    :root {
        --bg: #0f1312;
        --surface: #171c1a;
        --surface-2: #1d2321;
        --text: #e9eeeb;
        --muted: #9aa49f;
        --border: #2a312e;
        --brand: #2fae7a;
        --brand-strong: #46c08d;
        --brand-soft: #173a2b;
        --on-brand: #04140d;
        --pitch-line: rgb(47 174 122 / 16%);
        --shadow: none;
        --lift: 0 18px 40px rgb(0 0 0 / 45%);
        color-scheme: dark;
    }
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 17px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
main { overflow-x: clip; }
img, svg { display: block; }
img { max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2 { font-family: var(--display); font-weight: 700; line-height: 1.04; margin: 0; text-wrap: balance; }
h3 { font-size: 18px; font-weight: 700; margin: 0; }
p { margin: 0; }

.wrap { width: min(1120px, 100%); margin: 0 auto; padding-inline: 24px; }
@media (max-width: 600px) { .wrap { padding-inline: 16px; } }

/* Header and buttons */

.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.logo img { height: 34px; width: auto; }
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 44px; padding: 0 18px; border-radius: 10px;
    border: 1px solid var(--border); background: var(--surface); color: var(--text); font-weight: 600; text-decoration: none; white-space: nowrap;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }

/* Hero: the words beside the three screens, which sit on the pitch's center circle */

.hero { position: relative; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 48px; align-items: center; padding-top: 40px; padding-bottom: 72px; }
.pitch { position: absolute; z-index: -1; right: 40px; top: -50px; width: 620px; height: 620px; color: var(--pitch-line); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); }
h1 { font-size: clamp(46px, 6.4vw, 72px); margin: 12px 0 18px; }
.lede { font-size: 19px; color: var(--muted); max-width: 30em; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 26px; }
.note { margin-top: 14px; font-size: 14.5px; color: var(--muted); max-width: 32em; }

.stage { position: relative; padding: 0 0 64px 0; }
.stage .browser { width: 100%; }
.stage .phone { position: absolute; right: -8px; bottom: 0; width: 25%; }
.stage .watch { position: absolute; left: -22px; bottom: 8px; width: 25%; }

/* Device frames: plain, so they read as LawFive rather than anyone's product */

.browser { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--surface); box-shadow: var(--lift); }
.browser::before { content: ""; display: block; height: 22px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.phone { border: 5px solid #15181a; border-radius: 24px; overflow: hidden; background: #15181a; box-shadow: var(--lift); }
.watch { aspect-ratio: 1; border: 8px solid #15181a; border-radius: 50%; overflow: hidden; background: #000; box-shadow: var(--lift), 0 0 0 1px rgb(255 255 255 / 12%); }
.watch img { width: 100%; height: 100%; object-fit: cover; }

/* Sections */

section { padding-top: 56px; padding-bottom: 56px; }
.section-head { margin-bottom: 28px; }
h2 { font-size: clamp(34px, 4.4vw, 46px); margin: 8px 0 10px; }
.section-head p:last-child { color: var(--muted); }
.section-head .eyebrow { color: var(--brand); }

.features { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feature { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.feature .tile { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-strong); margin-bottom: 14px; }
.feature p { margin-top: 6px; color: var(--muted); font-size: 16px; }
.cards { display: inline-flex; gap: 5px; vertical-align: -2px; margin-left: 4px; }
.card-shape { width: 11px; height: 15px; border-radius: 2px; box-shadow: 0 1px 2px rgb(0 0 0 / 25%); }
.card-shape.y { background: var(--yellow); transform: rotate(-8deg); }
.card-shape.r { background: var(--red); transform: rotate(7deg); }

.screens { display: grid; gap: 56px; }
.screen-row h3 { font-family: var(--display); font-size: 28px; }
.screen-row > p { color: var(--muted); margin: 4px 0 22px; max-width: 38em; }
.row-web { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; }
.row-web .browser:first-child { grid-row: span 2; }
.row-phone { display: grid; grid-template-columns: repeat(3, minmax(0, 260px)); gap: 28px; }
.row-watch { display: grid; grid-template-columns: repeat(2, minmax(0, 220px)); gap: 28px; }

/* The closing panel */

.close .actions { margin-top: 0; }
.close { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 36px; display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
.close p { color: var(--muted); max-width: 36em; }
.close h2 { margin-top: 0; }
footer { color: var(--muted); font-size: 14.5px; padding-top: 8px; padding-bottom: 40px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
footer a { text-underline-offset: 3px; }

@media (max-width: 900px) {
    .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; padding-top: 16px; padding-bottom: 40px; }
    .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pitch { display: none; }
    .stage .phone { right: 0; }
    .stage .watch { left: 0; }
}
@media (max-width: 600px) {
    h1 { font-size: 46px; }
    .lede { font-size: 18px; }
    section { padding-top: 40px; padding-bottom: 40px; }
    .features, .row-web { grid-template-columns: minmax(0, 1fr); }
    .row-web .browser:first-child { grid-row: auto; }
    .row-phone { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
    .phone { border-width: 3px; border-radius: 14px; }
    .stage .phone { border-width: 3px; border-radius: 12px; }
    .stage .watch { border-width: 5px; }
    .close { padding: 24px; }
    .actions .btn { flex: 1; }
}

/* Short and quiet, and only for those who haven't asked for less motion (WEB-1). */
@media (prefers-reduced-motion: no-preference) {
    .rise { animation: rise 450ms cubic-bezier(0.2, 0.7, 0.2, 1) both; }
    .stage .phone { animation-delay: 120ms; }
    .stage .watch { animation-delay: 220ms; }
    @keyframes rise { from { opacity: 0; transform: translateY(14px); } }
}
