/* Weather21 website: a calm, text-led light theme in the style of hpc-dash.au,
   in the Centre for 21st Century Weather's colours (its 21CW-2023 theme).
   System fonts only. */
:root {
  --paper: #f7f6f2;
  --paper-2: #efede6;
  --card: #fffefb;
  --ink: #231F20;        /* Centre black */
  --muted: #5d6370;
  --rule: #e2dfd6;
  /* Centre palette */
  --pink-light: #F4857F;
  --pink-dark: #B7533D;
  --blue-light: #05C1E8;
  --blue-dark: #0C93BD;
  /* Roles. Text colours are checked for at least 4.5:1 contrast on --paper. */
  --warm: var(--pink-dark);  /* 4.5:1 */
  --cool: #0A7397;           /* Centre blue-dark, deepened for link text: 5.0:1 */
  --brand: linear-gradient(90deg, var(--pink-light), var(--pink-dark) 35%, var(--blue-dark) 70%, var(--blue-light));
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 14px;
  color-scheme: light;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--cool); text-underline-offset: 3px; }
a:hover { color: var(--pink-dark); }
:focus-visible { outline: 2px solid var(--blue-dark); outline-offset: 3px; border-radius: 4px; }
::selection { background: #04A4CC; color: #fff; }

h1, h2, h3 { line-height: 1.15; letter-spacing: -0.02em; font-weight: 650; }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 28px; }
h3 { font-size: 1.15rem; margin: 0 0 8px; letter-spacing: -0.01em; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px 88px; }
.narrow { max-width: 740px; }

.eyebrow, .label, .num, .note, .status {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
}
.eyebrow { color: var(--warm); margin: 0 0 14px; font-weight: 600; }
.label { color: var(--cool); margin: 0 0 14px; }

/* Header */
.top { padding-top: 4px; border-bottom: 1px solid var(--rule); background: rgba(247, 246, 242, 0.92); position: sticky; top: 0; z-index: 5; backdrop-filter: saturate(1.2) blur(8px); }
/* The Centre's pink-to-blue stripe, along the top of every page and above the footer. */
.top::before, footer::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px; background: var(--brand); }
.bar { display: flex; align-items: center; gap: 28px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -0.01em; }
.brand img { border-radius: 7px; }
.top nav { display: flex; gap: 22px; margin-left: auto; }
.top nav a { color: var(--muted); text-decoration: none; font-size: 0.95rem; }
.top nav a:hover, .top nav a[aria-current="page"] { color: var(--ink); }
@media (max-width: 640px) { .top nav { display: none; } .bar .button { margin-left: auto; } }

/* Buttons */
.button {
  display: inline-block; padding: 11px 20px; border-radius: 10px;
  background: linear-gradient(135deg, var(--pink-dark), #9C4532); color: #fff; text-decoration: none; font-weight: 600; font-size: 0.95rem;
  border: 1px solid #9C4532; transition: filter 0.15s ease, transform 0.15s ease, background 0.15s ease;
  box-shadow: 0 6px 18px -10px rgba(183, 83, 61, 0.7);
}
.button:hover { color: #fff; filter: brightness(1.08); transform: translateY(-1px); }
.button.small { padding: 7px 14px; font-size: 0.88rem; }
.button.ghost { background: transparent; color: var(--ink); border-color: #cfcbc0; box-shadow: none; }
.button.ghost:hover { background: rgba(12, 147, 189, 0.08); border-color: var(--blue-dark); filter: none; }
.button.disabled { color: var(--muted); cursor: default; transform: none; }

/* Hero */
.hero { padding-top: 96px; padding-bottom: 56px; }
.hero h1 { font-size: clamp(2.5rem, 6.2vw, 4.6rem); margin: 0 0 22px; max-width: 12em; font-weight: 680; letter-spacing: -0.035em; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 34em; margin: 0 0 30px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin: 0 0 18px; }
.note { color: var(--muted); margin: 0; }

/* The chart, shown like a product screenshot */
.shot { margin: 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); padding: 28px 28px 20px; box-shadow: 0 1px 0 rgba(0, 0, 0, 0.02), 0 18px 40px -28px rgba(28, 31, 36, 0.25); }
.shot figcaption { color: var(--muted); font-size: 0.9rem; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--rule); }
.shot figcaption .label { margin-right: 6px; }
.plume { width: 100%; height: auto; display: block; }
.plume .grid { stroke: #e7e4dc; stroke-width: 1; }
.plume .grid.faint { stroke-dasharray: 2 4; }
.plume .axis { fill: var(--muted); font-size: 11px; font-family: var(--mono); }
.plume .band-full { fill: rgba(244, 133, 127, 0.22); }
.plume .band-core { fill: rgba(183, 83, 61, 0.42); }
.plume .median { fill: none; stroke: #7E3526; stroke-width: 2.4; stroke-linejoin: round; stroke-dasharray: 2000; animation: draw 2.4s ease-out both; }
@keyframes draw { from { stroke-dashoffset: 2000; } to { stroke-dashoffset: 0; } }

/* Numbered steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.step { padding: 28px 28px 8px 0; }
.step + .step { padding-left: 28px; border-left: 1px solid var(--rule); }
.step p { color: var(--muted); }
.num { color: var(--warm); font-size: 0.85rem; margin: 0 0 18px; }
@media (max-width: 820px) {
  .steps { grid-template-columns: 1fr; }
  .step, .step + .step { padding: 24px 0 4px; border-left: 0; border-bottom: 1px solid var(--rule); }
}
.arrow { font-weight: 600; text-decoration: none; }
.arrow span { display: inline-block; transition: transform 0.15s ease; }
.arrow:hover span { transform: translateX(3px); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; }
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 26px; position: relative; overflow: hidden; transition: border-color 0.2s ease, transform 0.2s ease; }
/* A Centre-blue accent bar, as on the Centre's banners. */
.card::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: linear-gradient(180deg, var(--blue-light), var(--blue-dark)); opacity: 0; transition: opacity 0.2s ease; }
.card:hover { border-color: #cfe6ee; transform: translateY(-2px); }
.card:hover::before { opacity: 1; }
.card p { color: var(--muted); }
.card .links { margin: 18px 0 0; }

.contact p { max-width: 40em; }
.contact p { color: var(--muted); font-size: 1.1rem; }

/* Long-form pages */
.doc { padding-top: 72px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); margin: 0 0 16px; letter-spacing: -0.03em; }
.doc h2 { margin: 2.2em 0 0.5em; font-size: 1.6rem; }
.doc h3 { margin-top: 1.6em; }
.doc p, .doc li { color: #30343c; }
.doc .eyebrow { color: var(--warm); }
.doc .status { color: var(--muted); }
.doc .status.draft { color: var(--warm); }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--rule); }
.doc th { font-family: var(--mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); font-weight: 500; }
.table { overflow-x: auto; margin: 1em 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--card); }
.table tr:last-child td { border-bottom: 0; }
code { font-family: var(--mono); font-size: 0.88em; background: var(--paper-2); border: 1px solid var(--rule); padding: 1px 6px; border-radius: 6px; }

.toc { background: var(--card); border: 1px solid var(--rule); border-radius: var(--radius); padding: 6px 26px; margin: 32px 0 8px; }
.toc ol { padding-left: 1.2em; }
.toc li::marker { font-family: var(--mono); color: var(--blue-dark); }
.explainer { scroll-margin-top: 90px; border-top: 1px solid var(--rule); margin-top: 48px; }
.explainer h2 { margin-top: 1.2em; }
.explainer ul { padding-left: 1.2em; }
.explainer li::marker { color: var(--blue-dark); }
.status { color: var(--muted); margin: -0.4em 0 1.2em; }
.status.draft { color: var(--warm); }

/* Footer: Centre black, as on the Centre's site */
footer { position: relative; background: var(--ink); color: #d8d4d2; padding-top: 4px; }
.foot { padding-top: 40px; padding-bottom: 48px; display: grid; gap: 10px; }
.foot .brand { color: #fff; }
.foot nav { display: flex; flex-wrap: wrap; gap: 20px; margin: 6px 0 10px; }
.foot nav a { color: #fff; text-decoration: none; }
.foot nav a:hover { color: var(--blue-light); }
.foot p { margin: 0; color: #b9b4b1; font-size: 0.9rem; max-width: 60em; }
.foot a { color: var(--blue-light); }
.foot a:hover { color: var(--pink-light); }

@media (prefers-reduced-motion: reduce) {
  .plume .median { animation: none; }
  .button, .arrow span, .card, .card::before { transition: none; }
}
