/* archedigm.au: site styles.
   Colours come from tokens.css (the Archedigm PM design system); this file adds
   only the site's type, layout and components, per the website visual specification. */

:root {
  --night: #16181b;                 /* = the design system's dark bg */
  --font-head: "Jost", "Futura", "Century Gothic", system-ui, sans-serif;
  --font-text: "Public Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --page: 1120px;
  --gutter: 24px;
  --reading: 680px;
  --section: 96px;
}
@media (max-width: 720px) {
  :root { --gutter: 16px; --section: 56px; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 17px/27px var(--font-text);
  overflow-x: hidden;
}
img, svg { max-width: 100%; display: block; }

a { color: var(--accent); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: var(--gutter); top: 8px; background: var(--panel); color: var(--ink); padding: 8px 12px; z-index: 20; border-radius: var(--radius-md); }
[hidden] { display: none !important; }

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

/* ---- Type scale (spec: display 48/52, heading 30/36, subheading 21/28, body 17/27, small 14/21) ---- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 600; margin: 0 0 16px; color: var(--ink); letter-spacing: 0; }
h1 { font-size: 48px; line-height: 52px; }
h2 { font-size: 30px; line-height: 36px; }
h3 { font-size: 21px; line-height: 28px; }
@media (max-width: 720px) {
  h1 { font-size: 32px; line-height: 38px; }
  h2 { font-size: 26px; line-height: 32px; }
}
p { margin: 0 0 16px; max-width: var(--reading); }
.lede { color: var(--muted); max-width: var(--reading); }
.small { font-size: 14px; line-height: 21px; color: var(--muted); }
code, .code { font-family: var(--font-code); font-size: 0.88em; }

/* ---- Header ---- */
.site-head { background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; min-height: 72px; }
.logo-link { display: block; padding: 8px 0; flex: none; }          /* clear space: the ring's diameter */
.logo-link img { width: 168px; height: auto; }
.site-nav { display: flex; align-items: center; gap: 8px 24px; flex-wrap: wrap; font-size: 15px; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-weight: 500; padding: 10px 0; }
.site-nav a:not(.btn):hover, .site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--ink); }
.site-nav .who { color: var(--muted); font-size: 14px; }
.menu-btn { display: none; }

@media (max-width: 720px) {
  .js .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; border: 1px solid var(--line); border-radius: var(--radius-md);
    background: var(--panel); color: var(--ink); cursor: pointer; padding: 0;
  }
  .logo-link img { width: 136px; }
  .js .site-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    background: var(--panel); border-bottom: 1px solid var(--line);
    flex-direction: column; align-items: stretch; gap: 0; padding: 8px var(--gutter) 16px;
  }
  .js .site-nav.open { display: flex; }
  .js .site-nav a:not(.btn) { padding: 12px 0; min-height: 44px; border-bottom: 1px solid var(--line); }
  .js .site-nav a:not(.btn):hover { box-shadow: none; }
  .js .site-nav .btn { margin-top: 12px; }
  .js .site-nav .who { padding: 12px 0 4px; }
}

/* ---- Footer (night) ---- */
.site-foot { background: var(--night); color: var(--muted); font-size: 14px; line-height: 21px; }
.site-foot .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 24px; padding-top: 48px; padding-bottom: 48px; }
.site-foot .logo { width: 300px; max-width: 100%; height: auto; margin: 12px 0; }   /* clear space: the ring's diameter */
.site-foot .logo.mark { width: 150px; }
.site-foot p { margin: 0; }
.site-foot .lines { display: flex; flex-direction: column; gap: 6px; }
.site-foot a { color: var(--accent); }

/* ---- Buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 10px 20px; border-radius: var(--radius-md);
  font: 600 16px/1.2 var(--font-text); text-decoration: none; cursor: pointer;
  border: 1px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { filter: brightness(0.92); }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-quiet:hover { background: var(--bg); }
.btn[disabled] { opacity: 0.6; cursor: progress; }

/* ---- Panels ---- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.panel > :last-child { margin-bottom: 0; }

/* ---- Status pills: words on a tinted ground ---- */
.pill { display: inline-block; font-size: 12px; line-height: 16px; font-weight: 600; border-radius: var(--radius-pill); padding: 3px 10px; }
.pill.received { background: var(--line); color: var(--ink); }
.pill.review { background: var(--warn-bg); color: var(--warn); }
.pill.replied { background: var(--ok-bg); color: var(--ok); }

/* ---- Forms ---- */
form.fb { display: grid; gap: 16px; max-width: 760px; }
.field { display: grid; gap: 6px; }
.field label, .field legend { font-size: 14px; line-height: 21px; font-weight: 600; }
.field .hint { font-size: 14px; line-height: 21px; color: var(--muted); margin: 0; }
input[type="text"], input[type="url"], input[type="email"], select, textarea {
  font: 400 16px/24px var(--font-text); color: var(--ink); background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius-md);
  padding: 10px 12px; width: 100%; min-height: 44px;
}
textarea { min-height: 120px; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
select.inline { width: auto; }
fieldset { border: 0; padding: 0; margin: 0; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { font-weight: 400; display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius-md); padding: 8px 12px; cursor: pointer; min-height: 44px; background: var(--bg); }
.choices input { accent-color: var(--accent); }
.choices label:has(input:checked) { border-color: var(--accent); }
.row2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } }

.notice { padding: 12px 16px; border-radius: var(--radius-md); border: 1px solid; margin: 0; max-width: none; }
.notice.ok { border-color: var(--ok); background: var(--ok-bg); color: var(--ink); }
.notice.err { border-color: var(--bad); background: var(--bad-bg); color: var(--bad); }

/* ======================================================================
   Page sections still in their pre-brand layout. Slices 2 to 4 replace
   these with the mock-up layouts; they are restyled here only so every
   page reads in the new type and colour meanwhile.
   ====================================================================== */
section { padding: var(--section) 0; }
section + section { border-top: 1px solid var(--line); }



.who { font-size: 14px; color: var(--muted); }
.subs { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.subs > li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 24px; }
.subs .meta { font-size: 14px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin-bottom: 4px; }
.subs .what { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; max-width: none; }
.status { font-weight: 600; }

.filters { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin-bottom: 16px; }
.filters .field { min-width: 180px; }

/* ======================================================================
   Home page
   ====================================================================== */
.band { background: var(--bg); }
.band.alt { background: var(--panel); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
section.band + section.band { border-top: 1px solid var(--line); }
.intro { max-width: var(--reading); margin-bottom: 40px; }
.intro p { color: var(--muted); }

.hero { background: var(--night); color: var(--ink); padding: 96px 0 104px; border-bottom: 1px solid var(--line); }
.hero-logo { width: 100%; max-width: 620px; height: auto; margin: 0 0 40px; }   /* clear space: the ring's diameter (~25px here) */
.hero-body { display: flex; flex-wrap: wrap; gap: 32px 64px; align-items: flex-end; }
.hero-text { flex: 1 1 460px; min-width: 0; }
.hero-text h1 { max-width: 15em; }
.hero-text p { color: var(--muted); margin: 0; max-width: 600px; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 720px) {
  .hero { padding: 48px 0 56px; }
  .hero-logo { margin-bottom: 24px; }
  .hero .actions { flex-direction: column; width: 100%; }
}

.trio { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.trio .panel { display: flex; flex-direction: column; gap: 12px; }
.trio h3, .trio p { margin: 0; }
.trio p { font-size: 16px; line-height: 25px; color: var(--muted); }
.notes { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px 48px; margin-top: 40px; }
.notes p { margin: 0; color: var(--muted); font-size: 16px; line-height: 25px; }
.notes strong { color: var(--ink); }

.showcase { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; }
.showcase-text { max-width: var(--reading); }
.showcase-text p { color: var(--muted); }
.shot { margin: 0; min-width: 0; }
.shot-frame { border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; background: var(--panel); }
.shot-frame img { width: 100%; height: auto; }
.shot figcaption { margin-top: 8px; font-size: 14px; line-height: 21px; color: var(--muted); }
@media (max-width: 720px) {
  .shot-frame { overflow-x: auto; }
  .shot-frame img { width: 640px; max-width: none; }
}

/* Line with stations: filled = done (here, in testing), hollow = to come */
.stations { list-style: none; margin: 0; padding: 0; position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.stations::before { content: ""; position: absolute; left: 16px; right: 0; top: 13px; height: 4px; border-radius: 2px; background: var(--lane-2); }
.stations li { position: relative; display: flex; flex-direction: column; gap: 8px; }
.stations .stop { width: 30px; height: 30px; border-radius: 50%; background: var(--bg); border: 4px solid var(--lane-2); box-shadow: 0 0 0 5px var(--bg); }
.stations li.done .stop { background: var(--lane-2); }
.stations .when { font: 400 13px/18px var(--font-code); color: var(--muted); margin-top: 6px; }
.stations li.done .when { color: var(--ok); }
.stations h3 { font-size: 20px; line-height: 26px; margin: 0; }
.stations p { margin: 0; font-size: 15px; line-height: 23px; color: var(--muted); }
@media (max-width: 860px) {
  .stations { grid-template-columns: 1fr; gap: 0; }
  .stations::before { display: none; }
  .stations li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 30px; bottom: 0; width: 4px; background: var(--lane-2); }
  .stations li { display: grid; grid-template-columns: 30px 1fr; column-gap: 16px; row-gap: 4px; padding-bottom: 24px; }
  .stations .stop { grid-row: 1 / span 3; }
  .stations .when { margin-top: 4px; }
  .stations li:last-child { padding-bottom: 0; }
}

.join { display: flex; flex-wrap: wrap; gap: 40px; align-items: flex-start; }
.join-text { flex: 1 1 420px; min-width: 0; }
.join-text p, .join-text ul { color: var(--muted); }
.join-text ul { margin: 0; padding-left: 20px; }
.join-panel { flex: 1 1 340px; min-width: 0; background: var(--bg); padding: 28px; }
.join-panel h3 { margin-bottom: 8px; }
.join-panel p { font-size: 16px; line-height: 25px; color: var(--muted); }
.join-panel .address { font: 400 16px/24px var(--font-code); color: var(--ink); user-select: all; }
.join-panel .small { margin: 0; }
@media (max-width: 720px) { .join-panel .btn { width: 100%; } }
.phone-only { display: none; }
@media (max-width: 720px) { .phone-only { display: inline; } }

/* ======================================================================
   Tester area
   ====================================================================== */
main.tester { padding: 48px 0 80px; }
.tester-wrap { display: flex; flex-direction: column; gap: 32px; }
.tester section { padding: 0; }
.tester section + section { border-top: 0; }
.round-head h1 { font-size: 40px; line-height: 44px; margin-bottom: 12px; }
.round-head p { color: var(--muted); margin: 0; }
.round-head .round-line { font: 400 13px/18px var(--font-code); color: var(--lane-2); margin-bottom: 8px; }
@media (max-width: 720px) { main.tester { padding-top: 32px; } .round-head h1 { font-size: 30px; line-height: 36px; } }

.round-grid { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.tester .try { flex: 3 1 520px; min-width: 0; padding: 28px; }
.rules { flex: 2 1 320px; min-width: 0; background: var(--night); border-color: var(--line); color: var(--ink); padding: 28px; }
.rules ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: 15px; line-height: 23px; display: grid; gap: 8px; }
.panel h2 { font-size: 24px; line-height: 30px; margin-bottom: 16px; }
.rules h2 { font-size: 21px; line-height: 28px; }

.steps { list-style: none; margin: 0; padding: 0; }
.steps li { position: relative; display: grid; grid-template-columns: 28px 1fr; gap: 14px; padding-bottom: 18px; }
.steps li:last-child { padding-bottom: 0; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 12px; top: 22px; bottom: 0; width: 4px; background: var(--lane-2); }
.steps .stop { width: 16px; height: 16px; margin: 5px 0 0 6px; border-radius: 50%; border: 3px solid var(--lane-2); background: var(--panel); position: relative; z-index: 1; }
.steps b { display: block; }
.steps li span:not(.stop) { display: block; color: var(--muted); font-size: 15px; line-height: 23px; }

#feedback { padding: 28px; }
form.fb { max-width: none; }
.err-text { color: var(--bad) !important; }
textarea[aria-invalid="true"] { border-color: var(--bad); }

.yours h2 { font-size: 24px; line-height: 30px; }
.subs .meta b { color: var(--ink); }
.subs .date { color: var(--muted); font-size: 14px; }
.subs .what + .what { margin-top: 6px; color: var(--muted); font-size: 15px; line-height: 23px; }
.reply { margin-top: 12px; background: var(--bg); border-radius: var(--radius-md); padding: 12px 14px; font-size: 15px; line-height: 23px; }
.reply b { font-family: var(--font-head); font-weight: 600; }
.reply .what { margin-top: 4px; }
.empty { color: var(--muted); }

/* ======================================================================
   Feedback inbox
   ====================================================================== */
.filters-panel { padding: 20px 24px; }
.filters-panel .filters { margin-bottom: 12px; }
.filters-panel .small { margin: 0; max-width: none; }
.filters-panel .pill { vertical-align: 1px; }
.inbox .meta a { color: var(--accent); }
.inbox .extra { margin-top: 6px; font-size: 15px; line-height: 23px; color: var(--muted); }
.inbox .extra b { color: var(--ink); font-weight: 600; }
.respond { display: grid; grid-template-columns: 1fr auto; gap: 12px 16px; align-items: end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line); }
.respond textarea { min-height: 88px; }
.respond .save-row { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.respond .saved { color: var(--muted); }
@media (max-width: 640px) {
  .respond { grid-template-columns: 1fr; }
  .respond select.inline { width: 100%; }
}

/* Test environment panel (testers page) and its control (inbox) */
.env { display: flex; flex-wrap: wrap; gap: 16px 24px; align-items: center; justify-content: space-between; padding: 20px 24px; }
.env-state { display: flex; gap: 12px; align-items: baseline; flex: 1 1 320px; min-width: 0; }
.env-state p { margin: 0; }
.env-admin { padding: 20px 24px; display: grid; gap: 12px; }
.env-admin h2 { font-size: 21px; line-height: 28px; margin: 0; }
.env-admin .small { margin: 0; }
.env-admin .save-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
