/*
 * WindowReel landing page (windowreel.com, D-038). Same look as the web app (D-034, docs/design.md):
 * black header, warm greige page, Playfair Display headings, Manrope text, sharp corners, copper accents.
 * The one bold element is the header drawn as a shop awning, with the scalloped edge of the logo.
 */

:root {
    color-scheme: light;
    --wr-ink: #1a1514;
    --wr-ink-muted: #6f6461;
    --wr-header: #000;
    --wr-page: #e3dedb;
    --wr-panel: #fff;
    --wr-panel-soft: #f7f4f2;
    --wr-footer: #c8beb7;
    --wr-footer-ink: #483737;
    --wr-line-strong: #c8beb7;
    --wr-accent: #c58462;
    --wr-ease: cubic-bezier(.22, .61, .36, 1);
    --wr-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
    --wr-sans: Manrope, 'Helvetica Neue', Arial, sans-serif;
    --scallop: 18px;
    --gutter: 24px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--wr-page);
    color: var(--wr-ink);
    font-family: var(--wr-sans);
    font-size: 17px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
    font-family: var(--wr-serif);
    font-weight: 400;
    letter-spacing: -.005em;
    margin: 0;
}

p {
    margin: 0;
}

a {
    color: inherit;
}

:focus-visible {
    outline: 2px solid var(--wr-accent);
    outline-offset: 3px;
}

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

/* Header: the awning. The scallops are half circles hanging from its bottom edge. */

.awning {
    position: relative;
    background: var(--wr-header);
    color: #fff;
    margin-bottom: var(--scallop);
}

.awning::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: var(--scallop);
    background: radial-gradient(circle at 50% 0, var(--wr-header) calc(var(--scallop) - .5px), transparent var(--scallop)) 50% 0 / calc(var(--scallop) * 2) var(--scallop) repeat-x;
}

.awning-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    min-height: 76px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: #fff;
    text-decoration: none;
}

.logo-mark {
    width: 38px;
    height: 38px;
    flex: none;
}

.wordmark {
    font-family: var(--wr-serif);
    font-size: 19px;
    text-transform: uppercase;
    letter-spacing: .22em;
}

/* Buttons (same as the web app: uppercase, tracked, outlined or black, copper on hover). */

.btn {
    display: inline-block;
    padding: 12px 26px;
    border: 1px solid currentColor;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .14em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color .25s var(--wr-ease), border-color .25s var(--wr-ease), color .25s var(--wr-ease);
}

.btn-light {
    color: #fff;
}

.btn-light:hover {
    background: #fff;
    border-color: #fff;
    color: var(--wr-ink);
}

.btn-dark {
    background: var(--wr-ink);
    border-color: var(--wr-ink);
    color: #fff;
}

.btn-dark:hover {
    background: var(--wr-accent);
    border-color: var(--wr-accent);
}

.text-link {
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .12em;
    text-transform: uppercase;
    text-decoration: underline;
    text-decoration-color: var(--wr-accent);
    text-underline-offset: 5px;
}

.text-link:hover {
    color: var(--wr-accent);
}

/* Hero: the copy on the left, the shop window with the TV on the right. */

.hero {
    display: grid;
    grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
    align-items: center;
    gap: 64px;
    padding-top: 72px;
    padding-bottom: 96px;
}

.hero h1 {
    font-size: clamp(36px, 4.6vw, 60px);
    line-height: 1.08;
    max-width: 13ch;
}

.not-found {
    grid-template-columns: minmax(0, 1fr);
    min-height: 60vh;
}

.lead {
    margin: 28px 0 36px;
    max-width: 34em;
    color: var(--wr-ink-muted);
    font-size: 18px;
    line-height: 1.7;
}

/* The shop window: frame sides and sill like the logo, glass in the soft panel colour, the TV inside. */

.shop-window {
    --window-scallop: 10px;
    position: relative;
    margin: 0;
    padding: calc(28px + var(--window-scallop) * 2) 36px 28px;
    border: 2px solid var(--wr-ink);
    border-top: 0;
    background: var(--wr-panel-soft);
}

/* A small awning over the window, like the logo: a band with the same scalloped edge. */
.shop-window::before {
    content: "";
    position: absolute;
    left: -2px;
    right: -2px;
    top: 0;
    height: calc(var(--window-scallop) * 2);
    background:
        linear-gradient(var(--wr-ink), var(--wr-ink)) 0 0 / 100% var(--window-scallop) no-repeat,
        radial-gradient(circle at 50% 0, var(--wr-ink) calc(var(--window-scallop) - .5px), transparent var(--window-scallop)) 50% var(--window-scallop) / calc(var(--window-scallop) * 2) var(--window-scallop) repeat-x;
}

.tv {
    background: #000;
    padding: 10px;
    box-shadow: 0 24px 40px -28px rgba(26, 21, 20, .55);
}

.tv-screen {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #000;
    object-fit: cover;
}

.shop-window figcaption {
    margin-top: 20px;
    color: var(--wr-ink-muted);
    font-size: 14px;
}

/* Steps: a real sequence, so the numbers carry meaning. */

.steps {
    background: var(--wr-panel);
    padding: 88px 0 96px;
}

.steps h2,
.facts h2 {
    font-size: clamp(28px, 3vw, 38px);
    line-height: 1.15;
    margin-bottom: 48px;
}

.step-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 48px;
    counter-reset: step;
}

.step-list li {
    counter-increment: step;
}

.step-list li::before {
    content: counter(step);
    display: block;
    font-family: var(--wr-serif);
    font-size: 56px;
    line-height: 1;
    color: var(--wr-accent);
    margin-bottom: 20px;
}

.step-list h3,
.fact h3 {
    font-size: 23px;
    line-height: 1.25;
    margin-bottom: 12px;
}

.step-list p,
.fact p {
    color: var(--wr-ink-muted);
    max-width: 36em;
}

/* Facts */

.facts {
    padding-top: 88px;
    padding-bottom: 104px;
}

.fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 44px 64px;
}

.fact {
    border-top: 1px solid var(--wr-line-strong);
    padding-top: 24px;
}

/* Footer */

.site-footer {
    background: var(--wr-footer);
    color: var(--wr-footer-ink);
    font-size: 14px;
}

.footer-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px 24px;
    padding-top: 28px;
    padding-bottom: 28px;
}

/* Narrow screens */

@media (max-width: 900px) {
    .hero {
        grid-template-columns: minmax(0, 1fr);
        gap: 48px;
        padding-top: 48px;
        padding-bottom: 72px;
    }

    .step-list {
        grid-template-columns: minmax(0, 1fr);
        gap: 40px;
    }
}

@media (max-width: 640px) {
    :root {
        --gutter: 16px;
        --scallop: 12px;
    }

    .awning-bar {
        min-height: 64px;
    }

    .logo-mark {
        width: 32px;
        height: 32px;
    }

    .wordmark {
        font-size: 16px;
        letter-spacing: .18em;
    }

    .btn {
        padding: 10px 18px;
    }

    .shop-window {
        --window-scallop: 7px;
        padding: calc(18px + var(--window-scallop) * 2) 16px 18px;
    }

    .tv {
        padding: 6px;
    }

    .steps,
    .facts {
        padding-top: 64px;
        padding-bottom: 72px;
    }

    .steps h2,
    .facts h2 {
        margin-bottom: 36px;
    }

    .fact-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .btn,
    .text-link {
        transition: none;
    }
}
