/*
 * The 12website.co.za face ("Highveld Light"): the seven static pages published instead of the plain main page when the
 * brand sets `mainPageFace: 'coza'` (docs/BRANDING.md). Copy is the signed-off file in ../COPY.md; art is the nine
 * hand-drawn capitals in ../assets (landscape for wide screens, portrait for phones), published under /face/.
 *
 * Rules the face keeps (brand book, "12website.co.za face"): solid white top bar; on inner pages one capital full-bleed
 * behind the page with a white fade (clear at the top, white from about two thirds down) and the content on the lower
 * part; buttons over art are a solid fill with a 3 px white ring and a soft shadow; 4.5:1 text contrast, one main action
 * per screen, 4/8 px spacing, nothing clipped at 390 px. Same habits as the plain page and Swiss Speed: no remote asset,
 * no inline style, no emoji, system fonts only (the logo is outlined SVG, so no font file is needed).
 */
/* Manrope, self-hosted (font-src 'self'): 500 body, 700 buttons and labels, 800 headlines (adamant-content 2026-11-13; OFL). */
@font-face { font-family: "Manrope"; src: url(/face/fonts/manrope-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(/face/fonts/manrope-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Manrope"; src: url(/face/fonts/manrope-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }
:root {
  --ink: #0f2233;      /* the logo's Ink */
  --muted: #5a6b7a;    /* the logo's sub line: 5.5:1 on white */
  --sun: #ffc83d;      /* Mzansi Yellow: the sun and the main action fill only (never text on white) */
  --sun-deep: #f2b705; /* the main action on hover (Jaco 2026-11-13) */
  --paper: #ffffff;
  --line: #d9dee3;
  --card-line: #d5dce4; /* the how-it-works cards' 1 px border (H90) */
  --maxw: 64rem;      /* ONE container width and gutter for the bar, hero panel, sections and footer: they all share the logo's left edge (A90) */
  --gutter: 1rem;
  --edge: max(var(--gutter), calc((100% - var(--maxw)) / 2 + var(--gutter))); /* that left edge, for absolutely placed things */
  --fade: 0;           /* hero art: 0 full colour .. 1 outline only, set from rotate.js on scroll (desktop) */
  --font: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 1rem/1.55 var(--font); color: var(--ink); background: var(--paper); }
img { max-width: 100%; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: clamp(1.75rem, 1rem + 3vw, 2.375rem); letter-spacing: -0.01em; }
h2 { font-size: 1.375rem; }
h3 { font-size: 1.125rem; }
p { margin: 0 0 .75rem; }
a { color: var(--ink); }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.wrap > p, .wrap > .lede, .wrap > dl { max-width: 46rem; } /* readable measure, still from the shared left edge */

/* Top bar: solid white on every page (the face's look over art), 4/8 px spacing, wraps instead of clipping at 390 px. */
.bar { background: var(--paper); border-bottom: 2px solid var(--ink); }
.bar-in { max-width: var(--maxw); margin: 0 auto; padding: .5rem var(--gutter); display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem; }
.bar .logo { display: block; height: 2.75rem; width: auto; margin-right: auto; }
.bar-links { display: flex; flex-wrap: wrap; gap: .25rem .75rem; font-weight: 600; }
.bar-links a { text-decoration: none; padding: .25rem 0; }
.bar-links a[aria-current="page"] { box-shadow: 0 .125rem 0 var(--ink); }
.lang { color: var(--muted); font-weight: 600; padding: .25rem 0; }

/* The phone menu (max-width 899px, H90): the inline nav hides and a no-script <details> menu takes the pages; the
   summary is the ≡ control named "Menu", the links stay one list, and focus keeps the global :focus-visible ring.
   The row itself must still hold 390 px on one line, so phones tighten the bar's gaps and padding and step the logo
   down to 2rem (the desktop bar is unchanged). From 900 px the inline nav is back and the menu is gone. */
.menu { display: none; position: relative; }
.menu summary { display: inline-block; list-style: none; cursor: pointer; padding: .25rem .75rem; font-weight: 600; border: 1px solid var(--ink); border-radius: .25rem; }
.menu summary::-webkit-details-marker { display: none; }
.menu nav { position: absolute; right: 0; top: calc(100% + .5rem); min-width: 9rem; padding: .5rem; background: var(--paper); border: 2px solid var(--ink); border-radius: .25rem; box-shadow: 0 .25rem .75rem rgba(15, 34, 51, .35); z-index: 1; }
.menu-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .25rem; font-weight: 600; }
.menu-list a { display: block; text-decoration: none; padding: .25rem 0; }
.menu-list a[aria-current="page"] { box-shadow: 0 .125rem 0 var(--ink); }
@media (max-width: 899px) {
  .bar-in { padding: .5rem .75rem; column-gap: .5rem; }
  .bar-in { flex-wrap: nowrap; }
  .bar .logo { height: 2rem; min-width: 0; flex-shrink: 1; }
  .lang { display: none; }
  .bar-links { display: none; }
  .menu { display: block; }
}

/* The main action: solid fill, 3 px white ring (the ring shows over art), soft shadow. */
/* The main action: Sun yellow with ink text, about 12:1 (Jaco 2026-11-13, via adamant-content). Over art: solid, a 3 px white ring and a
 * soft shadow; on white (the top bar) a 1 px ink border instead, so it doesn't wash out. Links and step labels stay ink. */
.button { display: inline-block; padding: .75rem 1.5rem; background: var(--sun); color: var(--ink); font: inherit; font-weight: 700; text-decoration: none; border: 3px solid var(--paper); border-radius: .25rem; box-shadow: 0 .25rem .75rem rgba(15, 34, 51, .35); }
.button:hover { background: var(--sun-deep); box-shadow: 0 .375rem 1rem rgba(15, 34, 51, .45); }
.button:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.bar .button { border: 1px solid var(--ink); box-shadow: none; }
.button.small { padding: .25rem .75rem; font-size: .875rem; }
.cta { margin: 1.5rem 0 0; }

/* Home hero: one capital full width; the nine rotate every 4 s (rotate.js), the sun stays fixed in the art, and the
   panel's headline and city change with each; dots show the place in the cycle. Without the script (or with
   prefers-reduced-motion) the markup already shows Johannesburg and the first tagline, and nothing moves. */
/* A90: the art is a sticky layer before the hero (desktop), so it stays put while the page content scrolls up over it; --fade
   (rotate.js, on scroll) washes the colour fills out to the outline, and a gradient melts its lower edge into the page. */
:root { --hero-h: max(min(88svh, 44rem), 26rem); }
.hero { position: relative; height: var(--hero-h); }
.hero-art { position: absolute; inset: 0; }
.over { position: relative; background: var(--paper); }
.over::before { content: ""; position: absolute; left: 0; right: 0; top: -6rem; height: 6rem; background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--paper)); pointer-events: none; } /* where the page meets the fixed art: the lines melt into the page, never a hard cut */ /* everything under the hero: opaque, so text reads over the fixed art */
.hero-art .shot { position: absolute; inset: 0; display: block; width: 100%; height: 100%; opacity: 0; transition: opacity .6s linear; }
.hero-art .shot.is-on { opacity: 1; }
.hero-art .shot img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.panel { position: absolute; left: 1rem; right: 1rem; bottom: 1rem; max-width: 26rem; background: var(--paper); border-radius: .25rem; box-shadow: 0 .5rem 1.5rem rgba(15, 34, 51, .35); padding: 1rem; }
.tagline { margin: 0 0 .25rem; font-size: clamp(1.75rem, 1rem + 3vw, 2rem); font-weight: 800; } /* about twice the 1rem body (H90); the system stack carries the 800, no font file */
.tagline { margin-bottom: .75rem; }
/* A90: two lines, "City, Province" over "South Africa", kept faint and smaller than the header wordmark's weight of voice. W2 (B118): the place name is a watermark on the postcard, to the right of the panel, not a line in it. Real text (no aria-live);
   it fades with the art. Ink at about 35% so the postcard shows through. */
.place { position: absolute; right: 2rem; bottom: 2rem; margin: 0; display: flex; flex-direction: column; align-items: flex-end; text-align: right; transition: opacity .3s linear; pointer-events: none; }
.place.is-out { opacity: 0; }
.place .city-name { font-size: 1.125rem; font-weight: 800; line-height: 1; letter-spacing: -0.01em; color: var(--ink); opacity: .35; }
.place .city-province { margin-top: .25rem; font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ink); opacity: .35; }
.sub { margin: 0 0 1rem; }
.dots { display: flex; gap: .5rem; margin-top: 1rem; }
.dot { width: .5rem; height: .5rem; border-radius: 50%; border: 1px solid var(--ink); opacity: .45; }
.dot.is-on { background: var(--ink); opacity: 1; }

/* Phones (HomeA2 phone layout, adamant-content 2026-11-13): the art is a landscape strip, about 200 px tall with the city in view,
   and the panel sits below it, never over the landmark. Rotation, dots and reduced motion are unchanged. */
@media (max-width: 899px) {
  .hero { height: auto; }
  .hero-art { position: relative; height: 260px; overflow: hidden; }
  .hero-art .shot img { object-position: center bottom; }
  .place { position: static; flex-direction: column; align-items: flex-end; gap: 0; padding: .5rem 1rem 0; font-size: .875rem; }
  .place .city-name, .place .city-province { font-size: .875rem; letter-spacing: 0; opacity: 1; margin: 0; line-height: 1.55; }
  .place .city-name { font-weight: 800; }
  .place .city-province { font-weight: 700; letter-spacing: .12em; text-transform: uppercase; } /* line 2: the same small caps as desktop */
  .panel { position: relative; left: auto; right: auto; bottom: auto; max-width: none; margin: 0 1rem 1rem; box-shadow: none; border: 1px solid var(--card-line); }
}

/* Below the hero and on inner pages: the content, on 4/8 px spacing. */
.section { padding-top: 2rem; padding-bottom: 1rem; }
.section h2 a { text-decoration: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: .75rem; align-items: stretch; }
.step { border: 1px solid var(--card-line); border-radius: .75rem; background: var(--paper); padding: 1rem; display: flex; gap: 1rem; align-items: baseline; }
@media (max-width: 899px) { .step { padding: .75rem; } } /* phones: tighter cards (W4) */
.step-no { font-size: .875rem; font-weight: 700; white-space: nowrap; color: var(--ink); }
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: .5rem 0 0; padding: 0; list-style: none; }
.chip { border: 1px solid var(--ink); border-radius: 1rem; padding: .25rem .75rem; font-size: .875rem; }
.tile-row { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem; }
.tile { aspect-ratio: 4 / 3; border: 2px dashed var(--line); border-radius: .25rem; background: var(--paper); }
.note { color: var(--muted); font-size: .875rem; }
.faq dt, .makes dt { font-weight: 700; margin-top: 1rem; }
.faq dd, .makes dd { margin: 0 0 .25rem; }
.lede { font-size: 1.25rem; font-weight: 600; }

/* Inner pages: one capital full-bleed behind the page (portrait on phones, landscape from 900 px), a white fade clear at
   the top and white from about two thirds down, and the content on the lower part. The backdrop is capped at the first
   viewport, so longer content simply continues on the white page below it. */
.stage { position: relative; }
:root { --band: max(40svh, 18rem); } /* W4: the art band on inner pages, so the title sits above the fold */
.backdrop { position: absolute; top: 0; left: 0; right: 0; height: var(--band); background-repeat: no-repeat; background-position: center top; background-size: cover; }
.backdrop::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(255, 255, 255, 0) 15%, rgba(255, 255, 255, .55) 55%, #ffffff 100%); }
.page-main { position: relative; min-height: 100svh; max-width: var(--maxw); margin: 0 auto; padding: calc(var(--band) + 2rem) var(--gutter) 3rem; }
.page-main .sheet { max-width: 44rem; }

/* Each inner page's own capital (order and names from ../assets/cities.txt). Events, Questions, About and Contact are the
   locked board's (BRAND.md); How it works and What we make take the next two cities in cities.txt order (OPEN-QUESTIONS.md). */
.page-how-it-works .backdrop { background-image: url(/face/portrait/pietermaritzburg.svg); }
.page-what-we-make .backdrop { background-image: url(/face/portrait/bloemfontein.svg); }
.page-events .backdrop { background-image: url(/face/portrait/cape-town.svg); }
.page-questions .backdrop { background-image: url(/face/portrait/kimberley.svg); }
.page-about .backdrop { background-image: url(/face/portrait/johannesburg.svg); }
.page-contact .backdrop { background-image: url(/face/portrait/mbombela.svg); }
@media (min-width: 900px) {
  .page-how-it-works .backdrop { background-image: url(/face/capitals/pietermaritzburg.svg); }
  .page-what-we-make .backdrop { background-image: url(/face/capitals/bloemfontein.svg); }
  .page-events .backdrop { background-image: url(/face/capitals/cape-town.svg); }
  .page-questions .backdrop { background-image: url(/face/capitals/kimberley.svg); }
  .page-about .backdrop { background-image: url(/face/capitals/johannesburg.svg); }
  .page-contact .backdrop { background-image: url(/face/capitals/mbombela.svg); }
  .panel { left: var(--edge); right: auto; bottom: 2rem; }
  .home-main { position: relative; }
  .hero-art { position: sticky; top: 0; z-index: 0; height: var(--hero-h); margin-bottom: calc(-1 * var(--hero-h)); overflow: hidden;
    filter: grayscale(var(--fade)) contrast(calc(1 + var(--fade) * 1.6)) brightness(calc(1 + var(--fade) * .5)); }
  .hero-art::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 45%; background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--paper)); pointer-events: none; }
  .hero-art { -webkit-mask-image: linear-gradient(to bottom, var(--ink) 60%, transparent); mask-image: linear-gradient(to bottom, var(--ink) 60%, transparent); } /* the lines fade out at the bottom, never a hard cut */
  .place { right: var(--edge); max-width: calc(100% - 2 * var(--edge) - 26rem - 2rem); opacity: calc(1 - var(--fade)); } /* A90: the watermark's right edge is the content column's right edge, and it never reaches the panel (column minus the 26rem panel minus a 2rem gap; a long name wraps), and it fades out with the art (static opacity 1 when --fade is never set) */
  .hero { z-index: 1; }
  /* How it works cards (H90): the three steps side by side on Home and on the How it works page, the step label over the text. */
  .steps { grid-template-columns: repeat(3, 1fr); }
  .step { flex-direction: column; justify-content: flex-start; gap: .5rem; }
}

/* Footer: solid white so the credit lines are readable over the fixed page look. */
footer { border-top: 2px solid var(--ink); background: var(--paper); margin-top: 2rem; }
.foot-in { max-width: var(--maxw); margin: 0 auto; padding: 1.5rem var(--gutter); display: grid; gap: .25rem; }
footer .logo { height: 2.25rem; width: auto; }
.foot-in p { margin: 0; font-size: .875rem; }
.foot-in .credit, .foot-in .power { color: var(--muted); }

/* Reduced motion: the hero crossfade stops (the rotation itself never starts; rotate.js checks the same media query). */
@media (prefers-reduced-motion: reduce) {
  .hero-art .shot { transition: none; }
  .hero-art { filter: none; } /* no scroll-driven change: the art stays as drawn */
}

/* The Adamant Tech logo in the footer (adamant-content 2026-11-13): never recoloured or stretched, at least 80 px wide. */
.power .adamant-logo { display: inline-block; width: 80px; height: auto; vertical-align: middle; }

/* Legal pages (/terms, /privacy, /paia-manual): long text on a plain white page under the same top bar, no art behind it. */
.legal { max-width: var(--maxw); margin: 0 auto; padding: 2rem var(--gutter) 1rem; }
.legal > p, .legal > ul, .legal > ol { max-width: 46rem; }
.legal h2 { margin: 2rem 0 .5rem; }
.legal h3 { margin: 1.5rem 0 .5rem; }
.legal ul, .legal ol { padding-left: 1.5rem; }
.legal .mute { color: var(--muted); }
.legal .card { margin: 1.5rem 0; padding: .5rem 1.25rem; border: 1px solid var(--card-line); border-radius: .5rem; }
.legal table { border-collapse: collapse; width: 100%; }
.legal th, .legal td { padding: .5rem; border: 1px solid var(--line); text-align: left; vertical-align: top; }

/* Launch copy (adamant-content 2026-11-17): the one-line steps summary, and (W8, B118) the Alpha notice strip under the top bar on every page:
   a 4 px Ink bar on the left on white, never red. */
.alpha { background: var(--paper); }
.alpha-in { max-width: var(--maxw); margin: 0 auto; padding: .75rem var(--gutter); }
.alpha-label, .alpha-body { border-left: 4px solid var(--ink); padding-left: .75rem; margin: 0; }
.alpha-label { font-size: .875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.alpha-body { font-size: 1.125rem; }
.alpha-body a { font-weight: 700; }
.steps-line { font-weight: 700; margin: 0 0 1rem; }
