@font-face {
    font-family: 'Manrope';
    src: url('/assets/fonts/manrope-latin-wght-normal.woff2') format('woff2');
    font-weight: 200 800;
    font-display: swap;
}

:root {
    --navy: #1e1e2f;
    --navy-glow: #3a3582;
    --navy-muted: #c9cbe0;
    --accent-light: #b8b4f5;
    --primary: #554fd1;
    --primary-hover: #3f3aa8;
    --bg: #f5f7fb;
    --surface: #ffffff;
    --surface-muted: #eef0ff;
    --text: #1f2433;
    --text-muted: #606779;
    --border: #d8dce8;
    --radius: 20px;
    --section-space: clamp(3.5rem, 8vw, 6rem);
}

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

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

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: 'Manrope', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
}

h1,
h2,
h3,
p,
dl,
dd {
    margin: 0;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-underline-offset: 0.15em;
}

a:hover {
    color: var(--primary-hover);
}

:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 3px;
    border-radius: 4px;
}

.wrap {
    width: min(100% - 2.5rem, 68rem);
    margin-inline: auto;
}

.skip-link {
    position: absolute;
    top: -4rem;
    left: 1rem;
    z-index: 1;
    padding: 0.5rem 1rem;
    background: var(--surface);
    color: var(--text);
    border-radius: 8px;
}

.skip-link:focus {
    top: 1rem;
}

/* Header */

.hero {
    padding-block: 1.5rem clamp(4rem, 11vw, 8rem);
    background:
        radial-gradient(60rem 34rem at 82% -8%, var(--navy-glow) 0%, transparent 70%),
        var(--navy);
    color: #ffffff;
}

.hero :focus-visible {
    outline-color: #ffffff;
}

.topbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem 2rem;
    margin-bottom: clamp(3.5rem, 10vw, 7rem);
}

.wordmark {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    color: #ffffff;
    font-size: 1.125rem;
    font-weight: 700;
    text-decoration: none;
}

.wordmark:hover {
    color: #ffffff;
}

.wordmark::before {
    content: '';
    width: 1.1rem;
    height: 1.1rem;
    border: 0.25rem solid var(--accent-light);
    border-radius: 50%;
}

.topbar ul {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.topbar li a {
    display: inline-block;
    padding-block: 0.25rem;
    color: var(--navy-muted);
    font-weight: 600;
    text-decoration: none;
}

.topbar li a:hover {
    color: #ffffff;
    text-decoration: underline;
}

.hero h1 {
    max-width: 16em;
    font-size: clamp(2.5rem, 7vw, 4.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.08;
    text-wrap: balance;
}

.lead {
    max-width: 36em;
    margin-top: 1.5rem;
    color: var(--navy-muted);
    font-size: clamp(1.125rem, 2.2vw, 1.3125rem);
}

/* Sections */

.section {
    padding-block: var(--section-space);
}

.section h2 {
    margin-bottom: 1.75rem;
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.section + .section {
    padding-top: 0;
}

/* Products: one article per product */

.products {
    display: grid;
    gap: 1.5rem;
}

.product {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    align-items: center;
    gap: clamp(2rem, 6vw, 4.5rem);
    padding: clamp(1.5rem, 5vw, 3.5rem);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.product-name {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    margin-bottom: 1rem;
}

.product-name img {
    width: 3rem;
    height: 3rem;
    border-radius: 12px;
}

.product h3 {
    font-size: clamp(1.375rem, 3vw, 1.75rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.2;
}

.product-body p {
    max-width: 30em;
    color: var(--text-muted);
}

.button {
    display: inline-block;
    margin-top: 1.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: #ffffff;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
}

.button:hover {
    background: var(--primary-hover);
    color: #ffffff;
}

/* The product's score sheet, drawn like the one on its share image */

.sheet {
    padding: 1.25rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 18px 40px -18px rgb(30 30 47 / 35%);
    font-size: 0.9375rem;
    transform: rotate(1.5deg);
}

.sheet-title {
    margin-bottom: 0.75rem;
    font-weight: 800;
}

.sheet table {
    width: 100%;
    border-collapse: collapse;
    font-variant-numeric: tabular-nums;
}

.sheet th,
.sheet td {
    padding: 0.45rem 0.6rem;
    border: 1px solid var(--border);
    font-weight: 500;
    text-align: center;
}

.sheet th:first-child {
    text-align: left;
}

.sheet thead th {
    background: var(--surface-muted);
    font-weight: 700;
}

.sheet thead th:first-child {
    color: var(--text-muted);
    font-weight: 500;
}

.sheet tfoot th,
.sheet tfoot td {
    border-top: 3px solid var(--navy);
    font-weight: 800;
}

.sheet tfoot td:nth-child(3) {
    color: var(--primary);
}

/* Contact */

.contact {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 24rem);
    gap: clamp(2rem, 6vw, 4.5rem);
}

.email {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: clamp(1.25rem, 3.6vw, 1.75rem);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.company {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.625rem 1.5rem;
    align-content: start;
    padding-top: 0.25rem;
}

.company dt {
    color: var(--text-muted);
}

.company dd {
    font-weight: 600;
}

/* Footer */

.footer {
    padding-block: 1.75rem;
    background: var(--navy);
    color: var(--navy-muted);
    font-size: 0.9375rem;
}

/* The not-found page */

.not-found {
    display: grid;
    gap: 2.5rem;
}

.not-found h2 {
    margin-bottom: 0.5rem;
}

@media (max-width: 52rem) {
    .product,
    .contact {
        grid-template-columns: minmax(0, 1fr);
    }

    .sheet {
        transform: none;
    }
}

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