/*
 * We Simplify Complexity — shared stylesheet.
 *
 * Single source of truth for the whole site. Every page links this file
 * instead of carrying its own inline <style> block (which is what let the
 * old pages drift apart from each other).
 *
 * Design language follows planning.fr2.com.au: Libre Franklin, uppercase
 * letter-spaced labels, a two-column editorial layout (small label left,
 * prose right), light-weight statement text, and no heavy chrome.
 */

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

:root {
    --text: #333333;
    --text-strong: #222222;
    --text-soft: #666666;
    --bg: #ffffff;
    --bg-soft: #fafafa;
    --bg-band: #f4f4f4;
    --line: #eaeaea;
    --accent: #0052cc;
    --shell: 945px;
    --label-col: 306px;
    --gap: 56px;
}

html { scroll-behavior: smooth; scroll-padding-top: 130px; -webkit-font-smoothing: antialiased; }

body {
    /* System stack only — no webfont request to a third-party CDN, so the
       site renders fully offline and depends on nothing external. */
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.66;
    color: var(--text);
    background: var(--bg);
}

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

/* ── Header ──────────────────────────────────────────────── */

/* Sticky sitewide so the nav stays reachable on long product pages. Solid
   background, since content scrolls underneath it. Padding is tighter than a
   static header would use, to keep the sticky bar from eating the screen. */
.site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
    padding: 26px 0 0;
}

/* Logo mark + wordmark + build version, top left. */
.brand-row { display: flex; align-items: center; gap: 13px; }
.brand-mark { flex-shrink: 0; }

.version {
    font-size: 10px;
    font-weight: 600;
    letter-spacing: .07em;
    color: var(--text-soft);
    border: 1px solid var(--line);
    border-radius: 2px;
    padding: 2px 6px;
    white-space: nowrap;
    background: var(--bg);
}

.site-title {
    font-size: 25px;
    font-weight: 800;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--text-strong);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 11px;
    line-height: 1.2;
}

.site-title .brand-mark { color: var(--text-strong); }
.site-title:hover { color: var(--accent); }
.site-title:hover .brand-mark { color: var(--accent); }

.site-tagline {
    font-size: 16px;
    color: var(--text-soft);
    margin-top: 8px;
}

.site-nav {
    margin-top: 40px;
    border-top: 1px solid var(--line);
}

.site-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 34px;
    padding: 18px 0;
}

.site-nav a {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-strong);
    text-decoration: none;
}

.site-nav a:hover { color: var(--accent); }

/* Dropdown — CSS only, matching the reference site's nav behaviour. */
.nav-has-children { position: relative; }

.nav-children {
    display: none;
    position: absolute;
    top: 100%;
    left: -16px;
    background: var(--bg);
    border: 1px solid var(--line);
    padding: 10px 0;
    min-width: 230px;
    z-index: 50;
    box-shadow: 0 10px 26px rgba(0,0,0,0.07);
}

.nav-has-children:hover .nav-children,
.nav-has-children:focus-within .nav-children { display: block; }

.nav-children a {
    display: block;
    padding: 8px 20px;
    font-weight: 400;
    white-space: nowrap;
}

.nav-children a:hover { background: var(--bg-soft); }

/* ── Page layout ─────────────────────────────────────────── */

main { padding: 76px 0 96px; }

/* The signature two-column block: small uppercase label on the left,
   content on the right. Collapses to one column on narrow screens. */
.block {
    display: grid;
    grid-template-columns: var(--label-col) minmax(0, 1fr);
    gap: var(--gap);
    padding-bottom: 64px;
}

.block + .block { padding-top: 8px; }

.block-label {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.96px;
    text-transform: uppercase;
    color: var(--text-strong);
    line-height: 1.5;
}

.block-body > * + * { margin-top: 22px; }

/* ── Type ────────────────────────────────────────────────── */

.statement {
    font-size: 26px;
    font-weight: 300;
    line-height: 1.5;
    color: var(--text);
}

.page-title {
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 2.4px;
    text-transform: uppercase;
    color: var(--text-strong);
    line-height: 1.25;
}

.page-intro { font-size: 20px; font-weight: 300; line-height: 1.6; color: var(--text); }

h2 {
    font-size: 14px;
    font-weight: 800;
    letter-spacing: 1.96px;
    text-transform: uppercase;
    color: var(--text-strong);
}

h3 { font-size: 18px; font-weight: 600; color: var(--text-strong); }

p { color: var(--text); }

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

strong { color: var(--text-strong); font-weight: 600; }

ul, ol { padding-left: 20px; }
li { margin-bottom: 8px; }

/* ── Bands ───────────────────────────────────────────────── */

.band { background: var(--bg-band); padding: 72px 0; margin: 0 0 76px; }
.band-tight { padding: 48px 0; }

/* ── Lists of products / links ───────────────────────────── */

.linklist { border-top: 1px solid var(--line); }

.linklist-item {
    display: block;
    padding: 22px 0;
    border-bottom: 1px solid var(--line);
    text-decoration: none;
    color: inherit;
}

.linklist-item:hover { text-decoration: none; }
.linklist-item:hover .linklist-name { color: var(--accent); }

.linklist-name { font-size: 18px; font-weight: 600; color: var(--text-strong); }
.linklist-desc { font-size: 15px; color: var(--text-soft); margin-top: 4px; line-height: 1.6; }

.badge {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    color: var(--text-soft);
    border: 1px solid var(--line);
    padding: 3px 9px;
    margin-left: 10px;
    vertical-align: 2px;
    text-decoration: none;
}

a.badge:hover { color: var(--accent); border-color: var(--accent); }

/* ── Cards (categories) ──────────────────────────────────── */

.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1px; background: var(--line); }

.grid-cell {
    background: var(--bg);
    padding: 28px 24px;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.grid-cell:hover { background: var(--bg-soft); text-decoration: none; }
.grid-cell h3 { font-size: 16px; }
.grid-cell p { font-size: 14px; color: var(--text-soft); line-height: 1.6; }

/* ── Detail rows (product meta) ──────────────────────────── */

.meta { border-top: 1px solid var(--line); margin-top: 8px; }
.meta-row { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 20px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.meta-key { font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-soft); padding-top: 2px; }

/* ── Buttons ─────────────────────────────────────────────── */

.btn {
    display: inline-block;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 1.4px;
    text-transform: uppercase;
    padding: 14px 26px;
    text-decoration: none;
    border: 2px solid var(--text-strong);
    color: var(--text-strong);
    background: transparent;
    transition: background .15s ease, color .15s ease;
}

.btn:hover { background: var(--text-strong); color: #fff; text-decoration: none; }
.btn-solid { background: var(--text-strong); color: #fff; }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); }
.btn[disabled] { opacity: .45; cursor: not-allowed; }
.btn-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ── FAQ ─────────────────────────────────────────────────── */

.faq-item { border-bottom: 1px solid var(--line); padding: 16px 0; }
.faq-item summary {
    cursor: pointer;
    font-weight: 600;
    color: var(--text-strong);
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item .chev { flex-shrink: 0; stroke: var(--text-soft); transition: transform .18s ease; }
.faq-item[open] .chev { transform: rotate(180deg); }
.faq-item p { margin-top: 10px; color: var(--text-soft); }

/* ── Screenshots ─────────────────────────────────────────── */

.shots { display: flex; flex-direction: column; gap: 28px; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
.shots figcaption { font-size: 14px; color: var(--text-soft); margin-top: 8px; }
.shot-btn { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: pointer; line-height: 0; }

.lightbox { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 30px; }
.lightbox[hidden] { display: none; }
.lightbox-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.78); }
.lightbox-content { position: relative; background: #fff; padding: 18px; max-width: min(940px, 100%); max-height: 100%; overflow-y: auto; }
.lightbox-content img { max-width: 100%; max-height: 70vh; display: block; }
.lightbox-content p { font-size: 14px; color: var(--text-soft); margin-top: 10px; text-align: center; }
.lightbox-close { position: absolute; top: 8px; right: 10px; border: 0; background: none; padding: 4px; line-height: 0; cursor: pointer; color: var(--text-soft); }
.lightbox-close:hover { color: var(--text-strong); }

/* ── Filters (products page) ─────────────────────────────── */

.controls { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 20px; margin-bottom: 34px; }
.control label { display: block; font-size: 12px; font-weight: 800; letter-spacing: 1.4px; text-transform: uppercase; color: var(--text-soft); margin-bottom: 8px; }
.control input, .control select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); background: #fff; font: inherit; font-size: 15px; color: var(--text); }
.control input:focus, .control select:focus { outline: none; border-color: var(--text-strong); }
.results-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; font-size: 14px; color: var(--text-soft); }
.clear-btn { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--accent); cursor: pointer; }
.empty { padding: 56px 0; text-align: center; color: var(--text-soft); }

/* ── Footer ──────────────────────────────────────────────── */

.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); padding: 60px 0 34px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 34px; }
.site-footer h4 { font-size: 12px; font-weight: 800; letter-spacing: 1.8px; text-transform: uppercase; color: var(--text-strong); margin-bottom: 14px; }
.site-footer a { display: block; font-size: 14px; color: var(--text-soft); margin-bottom: 9px; text-decoration: none; }
.site-footer a:hover { color: var(--accent); }
.footer-bottom { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--text-soft); }

/* ── Legal pages ─────────────────────────────────────────── */

.legal { max-width: 680px; }
.legal h2 { margin: 34px 0 12px; }
.legal p, .legal li { color: var(--text); }
.legal .updated { font-size: 14px; color: var(--text-soft); margin-bottom: 30px; }
.callout { background: var(--bg-soft); border-left: 3px solid var(--text-strong); padding: 18px 22px; margin: 20px 0; }
.callout p + p { margin-top: 12px; }

.draft-banner {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.6px;
    text-transform: uppercase;
    color: #b3005e;
    border: 1px solid #ffc8e2;
    background: #fff5fa;
    padding: 8px 14px;
    margin-bottom: 26px;
}

/* ── 404 ─────────────────────────────────────────────────── */

.error-page { text-align: center; padding: 80px 0 40px; }
.error-code { font-size: 72px; font-weight: 800; letter-spacing: 4px; color: var(--text-strong); line-height: 1; }

/* ── Responsive ──────────────────────────────────────────── */

@media (max-width: 860px) {
    .block { grid-template-columns: 1fr; gap: 16px; padding-bottom: 46px; }
    .site-header { padding-top: 16px; }
    .site-title { font-size: 17px; letter-spacing: 1.2px; gap: 8px; }
    .site-title .brand-mark { width: 21px; height: 21px; }
    .site-tagline { display: none; }
    .page-title { font-size: 26px; }
    .statement { font-size: 21px; }
    main { padding: 48px 0 64px; }
    .site-nav ul { gap: 20px; }
    .nav-children { position: static; border: 0; box-shadow: none; padding: 6px 0 6px 14px; min-width: 0; }
    .meta-row { grid-template-columns: 1fr; gap: 4px; }
}

/* ── Sticky header, compact state ─────────────────────────────────────
   Set by the small inline script in the footer once the page scrolls. The
   header is deliberately roomy at the top of a page and tight thereafter,
   so a persistent bar never costs a fifth of the viewport. */

.site-header { transition: padding .16s ease; }
.site-header .site-title,
.site-header .site-tagline { transition: font-size .16s ease, opacity .12s ease; }

.site-header.is-compact { padding-top: 12px; }
.site-header.is-compact .site-tagline { display: none; }
.site-header.is-compact .site-title { font-size: 19px; }
.site-header.is-compact .brand-mark { width: 22px; height: 22px; }
.site-header.is-compact .site-nav { margin-top: 12px; }
.site-header.is-compact .site-nav ul { padding: 11px 0; }

@media (prefers-reduced-motion: reduce) {
    .site-header, .site-header .site-title, .site-header .site-tagline { transition: none; }
}

/* ── Breadcrumbs ──────────────────────────────────────────────────────
   The JSON-LD trail told search engines the hierarchy while the page
   showed none. These give a visitor landing on a deep product page a way
   back up to its category. */
.crumbs {
    font-size: 13px;
    line-height: 1.5;
    padding: 14px 0 2px;
    color: #666;
}
.crumbs a { color: #666; text-decoration: none; }
.crumbs a:hover { color: #111; text-decoration: underline; }
.crumbs [aria-current] { color: #111; }
.crumb-sep { padding: 0 7px; color: #bbb; }

/* The catalogue filter hides server-rendered rows rather than rebuilding
   the list, so the hidden attribute has to beat .linklist-item's display. */
.linklist-item[hidden] { display: none !important; }

@media (prefers-color-scheme: dark) {
    .crumbs, .crumbs a { color: #999; }
    .crumbs a:hover, .crumbs [aria-current] { color: #f2f2f2; }
    .crumb-sep { color: #555; }
}
