/* ═══════════════════════════════════════════════════════════
   lastmileai.com.au
   A court list, not a landing page.
   Two files, no build step. Edit the HTML for copy, this for form.
   ═══════════════════════════════════════════════════════════ */

:root {
  --paper:  #FAFAF7;  /* background, faintly warm off-white */
  --ink:    #17191C;  /* primary text */
  --slate:  #5A6068;  /* secondary text, captions */
  --rule:   #DCDCD5;  /* hairlines and dividers */
  --accent: #24406B;  /* deep ink blue — links and section numbers */

  /* The dark band. Colour arrives as a field, not as decoration: one inverted
     section and the footer, so the page reads as two acts instead of one long
     document. Nothing else on the page is allowed a background. */
  --deep:      #101C2E;
  --brass:     #CBA05C;              /* warm marker, used ONLY on --deep */
  --on-deep:   rgba(250, 250, 247, 0.72);
  --rule-deep: rgba(250, 250, 247, 0.16);

  --measure: 680px;
  --page:    1.5rem;  /* horizontal page padding */

  /* One spacing scale. Every gap on the page is one of these six values —
     change a step here rather than hunting for a number in a rule below. */
  --s0:  0.65rem;     /* heading to its paragraph */
  --s1:  0.75rem;
  --s2:  1.25rem;     /* between paragraphs */
  --s3:  2rem;        /* between blocks */
  --s4:  2.5rem;      /* between groups */
  --s5:  4.5rem;      /* above the hero */
  --gap: 5rem;        /* between sections */

  --display: "Newsreader", Georgia, "Times New Roman", serif;
  --body:    "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono:    "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
}

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

/* Scroll easing is handled in the script, not here — a CSS smooth scroll can't
   be feature-detected, and a browser that ignores it would leave the arrow-key
   stepper doing nothing at all. */
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  /* Fluid, but every clamp keeps a rem term so browser zoom still works
     (WCAG 1.4.4). Sizes reach their maximum at a 900px viewport. */
  font-size: clamp(1rem, 0.955rem + 0.19vw, 1.0625rem);
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ── Typesetting ──────────────────────────────────────────────
   `balance` evens out headline line lengths; `pretty` stops the last line
   of a paragraph being a single orphaned word. Both no-op where unsupported.
   Worth most at 375px, where a 30-character measure breaks badly by default. */

h1, h2, .lede, .eyebrow, .week dt { text-wrap: balance; }
p, .week dd { text-wrap: pretty; }

/* ── Links ────────────────────────────────────────────────── */

a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  /* A hairline rather than a full-strength rule: it marks the link without
     competing with the serif descenders it passes under. */
  text-decoration-color: color-mix(in srgb, var(--accent) 45%, transparent);
}

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

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 1px;
}

::selection {
  background: rgba(36, 64, 107, 0.14);
}

/* Containers are focused programmatically by the arrow-key stepper.
   Scroll position is the affordance; a ring around a whole section isn't. */
.hero:focus, section:focus, footer:focus { outline: none; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--page);
  top: 0.5rem;
  z-index: 10;
  background: var(--paper);
  padding: 0.5rem var(--s1);
  font-family: var(--mono);
  font-size: 0.75rem;
}

/* ── Sticky contact line ──────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  padding: 0.65rem var(--page);
}

.topbar-in {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--measure);
  margin: 0 auto;
}

.topbar a {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: var(--slate);
  margin-left: auto;
}

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

/* Keyboard hint — only once the script has confirmed it works. */
.hint { display: none; }

.js .hint {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: var(--accent);
}

@media (min-width: 48rem) { .js .hint { display: inline; } }

/* ── Page frame ───────────────────────────────────────────── */

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 var(--page);
  counter-reset: sec;
}

section {
  position: relative;
  padding: var(--gap) 0;
  border-top: 1px solid var(--rule);
  counter-increment: sec;
  scroll-margin-top: 3.25rem;   /* clears the sticky bar when stepping */
}

/* A short accent tick sitting on each divider. */
section::before,
.hero::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 2.5rem;
  height: 2px;
  background: var(--accent);
}

/* ── The dark band ────────────────────────────────────────────
   Bled to the viewport edges with a spread shadow rather than negative
   100vw margins: the box keeps its normal size and measure, so there is
   no scrollbar-width overflow to chase and nothing to re-pad. */

.full,
footer {
  background: var(--deep);
  box-shadow: 0 0 0 100vmax var(--deep);
  clip-path: inset(0 -100vmax);
}

.full {
  color: var(--paper);
  border-top: none;
}

.full::before { top: 0; background: var(--brass); }

/* Where the band ends, the change of ground is the divider — a rule and a
   tick there would just look like debris hanging off the dark edge. */
.full + section { border-top: none; }
.full + section::before { display: none; }

.full .eyebrow { color: var(--paper); }
.full .eyebrow::before { color: var(--brass); }
.full ::selection { background: rgba(250, 250, 247, 0.22); }

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: var(--s5) 0 var(--gap);
  scroll-margin-top: 3.25rem;
}

.hero::before { top: calc(var(--s5) - 1.5rem); }

.headshot {
  display: block;
  width: 148px;
  height: 148px;
  object-fit: cover;
  border-radius: 2px;          /* square, deliberately — a circle reads social */
  background: var(--rule);
  margin-bottom: var(--s3);
}

h1 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(2.1rem, 1.55rem + 2.35vw, 3.1rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 var(--s2);
}

/* Side by side once there's room: the portrait carries the top of the page
   and the name gets to be display type rather than a document title. */
@media (min-width: 40rem) {
  .hero {
    display: grid;
    grid-template-columns: 1fr 168px;
    column-gap: var(--s4);
    align-items: start;
  }
  .headshot {
    grid-column: 2;
    grid-row: 1 / 4;
    width: 168px;
    height: 168px;
    margin-bottom: 0;
  }
  h1       { grid-column: 1; grid-row: 1; }
  .lede    { grid-column: 1; grid-row: 2; }
  .subline { grid-column: 1; grid-row: 3; }
}

.lede {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.2rem, 1.093rem + 0.46vw, 1.35rem);
  line-height: 1.4;
  margin: 0 0 var(--s2);
}

.subline {
  color: var(--slate);
  font-size: 0.9375rem;
  margin: 0;
}

/* ── Sections ─────────────────────────────────────────────── */

.eyebrow {
  font-family: var(--mono);
  font-size: clamp(0.875rem, 0.83rem + 0.19vw, 0.9375rem);
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 var(--s4);
}

/* 01, 02, 03 … numbered like items on a list. */
.eyebrow::before {
  content: counter(sec, decimal-leading-zero);
  color: var(--accent);
  margin-right: 1rem;
}

h2 {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.3rem, 1.157rem + 0.61vw, 1.5rem);
  line-height: 1.3;
  margin: var(--s4) 0 var(--s0);
}

.eyebrow + h2,
.eyebrow + p + h2 { margin-top: 0; }

p { margin: 0 0 var(--s2); }
p:last-child { margin-bottom: 0; }

/* ── The week — signature element ─────────────────────────── */

.week {
  margin: var(--s4) 0 0;
  border-top: 1px solid var(--rule);
}

.week dt {
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--brass);
  padding-top: var(--s2);
}

.week dd {
  margin: 0;
  padding-bottom: var(--s2);
  border-bottom: 1px solid var(--rule);
}

@supports (display: grid) {
  .week {
    display: grid;
    grid-template-columns: 4.5rem 1fr;
  }
  .week dt {
    padding-bottom: var(--s2);
    border-bottom: 1px solid var(--rule);
    line-height: 1.9;           /* optically aligns MON with its first body line */
  }
  .week dd { padding-top: var(--s2); }
}

.full .week,
.full .week dt,
.full .week dd { border-color: var(--rule-deep); }

/* ── Contact ──────────────────────────────────────────────── */

.contact {
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.079rem + 0.3vw, 1.25rem);
  margin-top: var(--s3);
  word-break: break-word;
}

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

footer {
  max-width: var(--measure);
  margin: 0 auto;
  padding: var(--s4) var(--page) var(--s4);
  scroll-margin-top: 3.25rem;
}

footer p {
  font-family: var(--mono);
  font-size: 0.75rem;
  line-height: 1.9;
  color: var(--on-deep);
  margin: 0;
}

footer a {
  color: var(--on-deep);
  text-decoration-color: rgba(250, 250, 247, 0.4);
}

footer a:hover { color: var(--paper); text-decoration-color: var(--paper); }
footer ::selection { background: rgba(250, 250, 247, 0.22); }

/* ── Motion — hero only, on load, nothing on scroll ───────── */

.hero > * {
  animation: rise 0.6s cubic-bezier(0.22, 0.61, 0.36, 1) both;
}
.hero > *:nth-child(2) { animation-delay: 0.06s; }
.hero > *:nth-child(3) { animation-delay: 0.12s; }
.hero > *:nth-child(4) { animation-delay: 0.18s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .hero > * { animation: none; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ── Mobile — type is fluid, so this is spacing only ───────── */

@media (max-width: 34rem) {
  :root {
    --page: 1.25rem;
    --s5:   3rem;
    --gap:  3.5rem;
  }

  .eyebrow { letter-spacing: 0.09em; }
  .eyebrow::before { margin-right: var(--s1); }
  h2 { margin-top: var(--s3); }

  .week { grid-template-columns: 3.75rem 1fr; }
}

/* ── Print ────────────────────────────────────────────────── */

@media print {
  .topbar, .skip { display: none; }
  body { background: #fff; font-size: 10.5pt; }
  a { text-decoration: none; color: var(--ink); }
}
