/* illawarraescarpment.au: "Landscape" design language.
   Eucalypt olive on paper, teal links, serif headings, contour-line dividers. */
:root {
  --olive: #3f4a2e;        /* headings, dark bands; 8.3:1 on --paper */
  --olive-deep: #2c3420;
  --ink: #262b1f;          /* body text */
  --ink-soft: #4f5744;     /* secondary text; 6.7:1 on --paper */
  --paper: #f3f1e8;
  --card: #fbfaf5;
  --line: #d9d5c3;
  --teal: #1d6b6b;         /* links; 6.2:1 on white */
  --moss: #c9d3a8;         /* accents on olive */
  --font-head: "Source Serif 4", Georgia, serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --wrap: 1120px;
  --measure: 68ch;
  --gutter: clamp(16px, 4vw, 40px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.7 var(--font-body);
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal); text-underline-offset: 3px; }
a:hover { color: var(--olive-deep); }
a:focus-visible, summary:focus-visible { outline: 3px solid var(--teal); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--font-head); color: var(--olive); line-height: 1.2; font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.6vw, 1.9rem); margin: 2.6em 0 .6em; }
h3 { font-size: 1.2rem; margin: 1.6em 0 .4em; }
p, ul, ol { margin: 0 0 1.1em; }
li { margin-bottom: .45em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.skip-link { position: absolute; left: -9999px; }
.skip-link:focus { left: 16px; top: 16px; z-index: 10; background: var(--card); padding: 8px 12px; }

/* masthead */
.masthead { background: var(--olive); color: #fff; }
.masthead-inner { display: flex; flex-wrap: wrap; gap: 8px 24px; align-items: center; justify-content: space-between; min-height: 64px; padding-block: 10px; }
.masthead-name { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; color: #fff; text-decoration: none; }
.masthead-nav { display: flex; gap: 20px; }
.masthead-nav a { color: var(--moss); text-decoration: none; font-weight: 600; }
.masthead-nav a:hover { color: #fff; text-decoration: underline; }

/* hero: full-bleed photograph */
.hero { position: relative; color: #fff; background: var(--olive-deep); }
.hero img { width: 100%; height: clamp(320px, 56vw, 560px); object-fit: cover; opacity: .55; }
.hero-copy { position: absolute; inset: auto 0 0 0; padding-bottom: clamp(24px, 5vw, 56px); }
.hero h1 { color: #fff; font-size: clamp(2rem, 5vw, 3.3rem); max-width: 18ch; margin: 0 0 .4em; }
.hero .dek { font-size: clamp(1.05rem, 1.6vw, 1.25rem); max-width: 56ch; margin: 0; }
@media (max-width: 700px) {
  .hero img { height: 240px; opacity: 1; }
  .hero-copy { position: static; padding: 24px 0 32px; }
}
.hero-plain { background: var(--olive); color: #fff; padding: clamp(40px, 7vw, 80px) 0; }
.hero-plain h1 { color: #fff; font-size: clamp(2rem, 4.5vw, 3rem); max-width: 22ch; margin: 0 0 .4em; }
.hero-plain .dek { max-width: 60ch; margin: 0; }
.kicker { font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--moss); margin: 0 0 .8em; font-weight: 600; }

.byline-bar { border-bottom: 1px solid var(--line); background: var(--card); }
.byline-bar p { margin: 0; padding: 14px 0; font-size: .95rem; color: var(--ink-soft); display: flex; flex-wrap: wrap; gap: 4px 18px; }

/* contour divider */
.contour { height: 28px; margin: 3em 0 0; background:
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='28'%3E%3Cg fill='none' stroke='%233f4a2e' stroke-opacity='.35'%3E%3Cpath d='M0 20 C40 4 80 4 120 14 S160 22 160 20'/%3E%3Cpath d='M0 26 C40 12 80 12 120 20 S160 28 160 26'/%3E%3Cpath d='M0 14 C40 -2 80 -2 120 8 S160 16 160 14'/%3E%3C/g%3E%3C/svg%3E") repeat-x center; }

/* figures */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 0; margin: 0; padding: 0; list-style: none; border-block: 1px solid var(--line); }
.figures li { margin: 0; padding: 22px 18px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin-bottom: -1px; }
.figures li:last-child { border-right: 0; }
.fig-num { display: block; font-family: var(--font-head); font-size: 2rem; color: var(--olive); font-weight: 700; }
.fig-label { font-size: .95rem; color: var(--ink-soft); }
.note { font-size: .92rem; color: var(--ink-soft); }
.figures-wrap { padding-top: 32px; }

/* article */
.article { display: grid; gap: 40px; padding-block: 48px 24px; }
@media (min-width: 960px) { .article { grid-template-columns: 220px minmax(0, 1fr); } }
.toc { font-size: .95rem; }
@media (min-width: 960px) { .toc { position: sticky; top: 24px; align-self: start; } }
.toc-title { font-weight: 600; color: var(--olive); margin-bottom: .4em; }
.toc ol { padding-left: 1.8em; margin: 0; }
.prose { max-width: var(--measure); min-width: 0; }
.prose > h2:first-child { margin-top: 0; }

.callout { border-left: 4px solid var(--teal); background: var(--card); padding: 18px 22px; margin: 1.6em 0; }
.callout-title { font-weight: 600; color: var(--olive); margin-bottom: .3em; }

.table-wrap { overflow-x: auto; margin: 1.4em 0; }
table { border-collapse: collapse; width: 100%; font-size: .95rem; background: var(--card); }
caption { text-align: left; font-weight: 600; color: var(--olive); padding-bottom: 8px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { background: var(--olive); color: #fff; }

figure { margin: 1.8em 0; }
figcaption { font-size: .9rem; color: var(--ink-soft); margin-top: 8px; }

.sources { font-size: .93rem; padding-left: 1.2em; }

/* project entries */
.project { border-top: 1px solid var(--line); padding-top: 8px; }
.project-facts { display: grid; grid-template-columns: max-content 1fr; gap: 4px 16px; font-size: .95rem; margin: 0 0 1.2em; }
.project-facts dt { font-weight: 600; color: var(--olive); }
.project-facts dd { margin: 0; }

/* author card */
.author { display: grid; grid-template-columns: 96px 1fr; gap: 18px; align-items: start; background: var(--card); border: 1px solid var(--line); padding: 20px; margin-top: 2.6em; }
.author img { border-radius: 50%; width: 96px; height: 96px; object-fit: cover; }
.author-name { font-family: var(--font-head); font-weight: 700; color: var(--olive); margin: 0 0 .3em; }
.author p { font-size: .95rem; }
.author-links { font-size: .9rem; margin: 0; }
@media (max-width: 520px) { .author { grid-template-columns: 1fr; } }

/* FAQ */
.faq { background: var(--olive); color: #fff; padding: 56px 0; margin-top: 40px; }
.faq h2 { color: #fff; margin-top: 0; }
.faq-list { max-width: 820px; }
.faq details { border-top: 1px solid rgba(255,255,255,.25); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 1.08rem; color: var(--moss); }
.faq details p { margin: .8em 0 0; }
.faq .byline { margin-top: 28px; font-size: .95rem; color: #e6e9d9; }

/* call to action */
.cta { padding: 56px 0; text-align: left; }
.cta h2 { margin-top: 0; }
.btn { display: inline-block; padding: 12px 20px; border-radius: 2px; font-weight: 600; text-decoration: none; margin: 6px 10px 6px 0; }
.btn-solid { background: var(--olive); color: #fff; }
.btn-solid:hover { background: var(--olive-deep); color: #fff; }
.btn-line { border: 2px solid var(--olive); color: var(--olive); }

/* colophon */
.colophon { background: var(--olive-deep); color: #dfe3cf; padding: 44px 0; font-size: .92rem; }
.colophon a { color: var(--moss); }
.colophon-grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .colophon-grid { grid-template-columns: 1fr 2fr 1fr; } }
.colophon-brand { display: flex; gap: 10px; align-items: center; font-family: var(--font-head); font-weight: 700; color: #fff; }
.colophon-mark { width: 40px; height: 24px; color: var(--moss); flex: none; }
.colophon-label { font: 600 .72rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .12em; text-transform: uppercase; color: #aab296; }
.colophon-meta { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
@media (min-width: 860px) { .colophon-meta { text-align: right; } }
.colophon p { margin: 0 0 .7em; }

/* reader offer card (markup: src/partials/offer.html, behaviour: /assets/js/offer.js) */
.offer { position: fixed; right: 20px; bottom: 20px; width: min(340px, calc(100vw - 32px)); background: var(--card); color: var(--ink); border: 1px solid var(--olive); border-radius: 2px; box-shadow: 0 12px 44px rgba(11, 32, 53, .18); padding: 20px 20px 18px; z-index: 50; font-size: .92rem; }
.offer[hidden] { display: none; }
.offer.in { animation: offer-up .35s ease both; }
@keyframes offer-up { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .offer.in { animation: none; } }
.offer-lbl { font: 500 .68rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-soft); margin: 0 0 10px; }
.offer-h { font-family: var(--font-head); font-weight: 700; font-size: 1.1rem; line-height: 1.3; color: var(--ink); margin: 0 0 8px; }
.offer-pitch { margin: 0 0 12px; color: var(--ink-soft); }
.offer-x { position: absolute; top: 8px; right: 8px; background: none; border: 0; color: var(--ink-soft); font: 400 1.2rem/1 inherit; cursor: pointer; padding: 6px 8px; }
.offer-x:hover { color: var(--ink); }
.offer-btn { display: inline-block; background: var(--olive); color: #fff; text-decoration: none; font-weight: 600; padding: 10px 16px; border-radius: 2px; }
.offer-btn:hover { opacity: .9; color: #fff; }
.offer-cta { margin: 0 0 9px; }
.offer-alt { margin: 0; font-size: .84rem; }
@media (max-width: 520px) { .offer { left: 12px; right: 12px; bottom: 12px; width: auto; padding: 18px; } }
