/* Structopedia — the company page. It borrows the Onionskin site's system on purpose
   (tokens, typefaces, the one amber accent) so the company and its products read as one
   family. Fonts are self-hosted for the same reason as there: a page for software that
   talks to nobody should not itself phone a font CDN. */

@font-face {
    font-family: "Schibsted Grotesk";
    src: url("assets/fonts/schibsted-grotesk-var.woff2") format("woff2-variations"),
         url("assets/fonts/schibsted-grotesk-var.woff2") format("woff2");
    font-weight: 400 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("assets/fonts/ibm-plex-mono-400.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}
@font-face {
    font-family: "IBM Plex Mono";
    src: url("assets/fonts/ibm-plex-mono-500.woff2") format("woff2");
    font-weight: 500;
    font-display: swap;
}

:root {
    --bg: #08090b;
    --surface: #101215;
    --recessed: #0b0d10;
    --hairline: #1c1e22;
    --border-idle: #2c3037;
    --ink: #f2f1ee;
    --ink-2: #9a9a95;
    --ink-3: #8c8c88;
    --accent: #e8c77a;
    --accent-small: #c9a961;

    --sans: "Schibsted Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI",
            Helvetica, Arial, sans-serif;
    --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

    --wrap: 1200px;
    --gutter: 32px;
    --section: 96px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--ink-2);
    font: 400 16px/1.6 var(--sans);
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: var(--ink); }
h1, h2, h3 { color: var(--ink); font-weight: 700; letter-spacing: -0.03em; line-height: 1.05; }
.mono { font-family: var(--mono); }

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

.eyebrow {
    font: 400 11px/1 var(--mono);
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--accent-small);
    margin-bottom: 18px;
}

.skip-link {
    position: fixed; top: -4rem; left: 1rem; z-index: 100;
    background: var(--ink); color: var(--bg);
    font-weight: 600; padding: 0.7rem 1.1rem; border-radius: 999px;
    text-decoration: none; transition: top 140ms ease;
}
.skip-link:focus-visible { top: 1rem; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

/* ---------- header ---------- */

.site-header {
    position: sticky; top: 0; z-index: 50;
    background: rgba(8, 9, 11, 0.78);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--hairline);
}
.site-header .wrap {
    display: flex; align-items: center; justify-content: space-between;
    height: 60px;
}
.brand {
    display: flex; align-items: center; gap: 10px;
    color: var(--ink); text-decoration: none;
    font-weight: 600; font-size: 16px; letter-spacing: -0.01em;
}
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--ink-2); text-decoration: none; font-size: 14px; }
.nav-links a:hover { color: var(--ink); }

/* ---------- hero ---------- */

.hero {
    padding: 120px 0 var(--section);
    background: radial-gradient(ellipse 70% 60% at 50% 0%, rgba(232, 199, 122, 0.07), transparent 70%);
}
.hero h1 {
    font-size: 62px; line-height: 1.02; letter-spacing: -0.034em;
    max-width: 18ch;
}
.hero .accent { color: var(--accent); }
.hero-sub { margin-top: 26px; font-size: 17px; max-width: 56ch; }

/* ---------- products ---------- */

.products, .company { padding: var(--section) 0; border-top: 1px solid var(--hairline); }
.products h2, .company h2 { font-size: 42px; margin-bottom: 40px; }

.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
    gap: 20px;
}

.product {
    display: flex; flex-direction: column; gap: 18px;
    background: var(--surface);
    border: 1px solid var(--border-idle);
    border-radius: 16px;
    padding: 28px;
    transition: border-color 140ms ease;
}
.product:hover { border-color: var(--accent); }

.product-head { display: flex; align-items: center; gap: 16px; }
.product-icon { width: 56px; height: 56px; flex: none; border-radius: 13px; }
.product h3 { font-size: 22px; letter-spacing: -0.02em; }
.product-line { margin-top: 4px; font-size: 14.5px; color: var(--ink-2); }
.product > p { font-size: 14.5px; }

.facts {
    display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
    background: var(--hairline);
    border: 1px solid var(--hairline); border-radius: 10px; overflow: hidden;
}
.facts div { background: var(--recessed); padding: 10px 14px; }
.facts dt, .details dt {
    font: 400 10.5px/1.4 var(--mono); letter-spacing: 0.14em; text-transform: uppercase;
    color: var(--ink-3);
}
.facts dd { color: var(--ink); font-size: 14px; margin-top: 3px; }

.product-link {
    margin-top: auto;
    align-self: flex-start;
    font-weight: 600; font-size: 15px;
    text-decoration: none;
    color: var(--ink);
    border-bottom: 1px solid var(--border-idle);
    padding-bottom: 2px;
}
.product-link:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- company ---------- */

.company h2 { margin-bottom: 12px; }
.company-sub { margin-bottom: 36px; max-width: 56ch; }

.details {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 1px; background: var(--hairline);
    border: 1px solid var(--hairline); border-radius: 12px; overflow: hidden;
}
.details div { background: var(--recessed); padding: 18px 20px; }
.details dd { color: var(--ink); font-size: 16px; margin-top: 6px; }
.details a { text-decoration: none; border-bottom: 1px solid var(--border-idle); }
.details a:hover { color: var(--accent); border-color: var(--accent); }

/* ---------- footer ---------- */

.site-footer { border-top: 1px solid var(--hairline); padding: 32px 0 48px; font-size: 13px; color: var(--ink-3); }
.site-footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---------- responsive ---------- */

@media (max-width: 860px) {
    .hero h1 { font-size: 44px; }
    .products h2, .company h2 { font-size: 34px; }
}
@media (max-width: 560px) {
    :root { --gutter: 16px; --section: 64px; }
    .hero { padding-top: 72px; }
    .hero h1 { font-size: 34px; }
    .nav-links { gap: 14px; }
    .nav-links a { font-size: 13px; }
    .brand { font-size: 15px; }
    .product-grid { grid-template-columns: 1fr; }
    .facts { grid-template-columns: 1fr; }
    .details { grid-template-columns: 1fr; }
}
