/* ===========================================================
   ALEC FARRUGIA — alecfarrugia.com
   Hand-written CSS. No framework, no build step.

   Sections, in order:
     1.  Tokens
     2.  Reset & base
     3.  Typography helpers
     4.  Buttons & links
     5.  Layout bands
     6.  Header / nav
     7.  Hero + enquiry form
     8.  Ticker
     9.  Work
     10. Statement
     11. Services
     12. Process
     13. About
     14. Marquee
     15. Writing
     16. FAQ
     17. CTA & footer
     18. Reveal animation
     19. Responsive
   =========================================================== */

/* ---------- 1. TOKENS ------------------------------------- */
:root {
  /* Ground */
  --ink:          #0B111E;   /* deep navy-black */
  --ink-2:        #121A2B;   /* raised card on dark */
  --ink-3:        #182237;   /* hover state on dark */
  --ink-line:     rgba(244, 239, 231, 0.13);

  --cream:        #F5F0E8;   /* warm paper */
  --paper:        #FFFDF9;   /* raised card on cream */
  --cream-line:   rgba(11, 17, 30, 0.13);

  /* Accent */
  --rust:         #DD5B37;
  --rust-soft:    #EE8A6B;
  --rust-deep:    #B8431F;
  --clay:         #EBCDBE;

  /* Text */
  --on-ink:       #F4EFE7;
  --on-ink-mute:  #96A0B5;
  --on-cream:     #0F1626;
  --on-cream-mute:#59627A;

  /* Type */
  --sans: "Plus Jakarta Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --serif: "Instrument Serif", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --d1: clamp(2.55rem, 6.4vw, 5rem);
  --d2: clamp(2rem, 4.4vw, 3.5rem);
  --d3: clamp(1.32rem, 2.1vw, 1.75rem);
  --lead: clamp(1.02rem, 1.15vw, 1.14rem);

  /* Space */
  --gutter: clamp(20px, 5vw, 56px);
  --band-y: clamp(72px, 9vw, 140px);
  --radius: 20px;
  --radius-sm: 12px;

  color-scheme: light;
}

/* ---------- 2. RESET & BASE ------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--on-ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { max-width: 100%; display: block; }
h1, h2, h3, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
button { font: inherit; color: inherit; }

a { color: inherit; }

:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 3px;
  border-radius: 4px;
}

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--rust);
  color: #fff;
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip:focus { left: 0; }

.wrap {
  width: min(1180px, 100%);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- 3. TYPOGRAPHY --------------------------------- */
.d1, .d2, .d3 {
  font-weight: 800;
  letter-spacing: -0.028em;
  line-height: 1.02;
  text-wrap: balance;
}
.d1 { font-size: var(--d1); }
.d2 { font-size: var(--d2); line-height: 1.04; }
.d3 { font-size: var(--d3); line-height: 1.15; letter-spacing: -0.02em; }

.ital {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--rust);
  letter-spacing: 0;
  /* the serif sits smaller at the same px — nudge it back up */
  font-size: 1.08em;
  padding-inline-end: 0.02em;
}

.lead {
  font-size: var(--lead);
  color: var(--on-ink-mute);
  max-width: 54ch;
}
.lead strong { color: var(--on-ink); font-weight: 700; }

.mono-label {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-ink-mute);
  display: inline-block;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--on-ink-mute);
  display: inline-block;
  margin-bottom: 20px;
}
.eyebrow::before { content: "— "; }

.eyebrow--chip {
  border: 1px solid var(--cream-line);
  border-radius: 999px;
  padding: 7px 16px 6px;
  background: var(--paper);
}
.eyebrow--chip::before {
  content: "";
  display: inline-block;
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rust);
  margin-right: 10px;
  vertical-align: 1px;
}

.section-head { margin-bottom: clamp(38px, 4.5vw, 64px); }
.section-head .d2 { max-width: 18ch; }
.section-sub {
  margin-top: 20px;
  color: var(--on-ink-mute);
  max-width: 56ch;
  font-size: var(--lead);
}
.section-head--center {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.section-head--center .eyebrow { margin-bottom: 22px; }
.section-head--center .d2 { max-width: 22ch; }
.section-head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

/* ---------- 4. BUTTONS & LINKS ---------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 15px 26px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.92rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform .2s ease, background-color .2s ease, border-color .2s ease, color .2s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn .arr { font-size: 0.85em; transition: transform .2s ease; }
.btn:hover .arr { transform: translate(2px, -2px); }

.btn--primary { background: var(--rust); color: #FFF6F2; }
.btn--primary:hover { background: var(--rust-deep); }

.btn--ghost { background: transparent; color: var(--on-ink); border-color: var(--ink-line); }
.btn--ghost:hover { border-color: var(--on-ink); background: rgba(244,239,231,.06); }

.btn--dark { background: var(--ink); color: var(--on-ink); }
.btn--dark:hover { background: var(--ink-3); }

.btn--sm { padding: 11px 20px; font-size: 0.84rem; }
.btn--full { width: 100%; justify-content: center; }

.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 36px; }
.btn-row--center { justify-content: center; }

.text-link {
  font-weight: 700;
  text-decoration: none;
  border-bottom: 2px solid var(--rust);
  padding-bottom: 2px;
  transition: color .2s ease;
}
.text-link:hover { color: var(--rust); }

.code-link {
  font-family: var(--mono);
  font-size: 0.78rem;
  text-decoration: none;
  color: var(--on-ink-mute);
  border-bottom: 1px solid var(--ink-line);
  padding-bottom: 3px;
  transition: color .2s ease, border-color .2s ease;
}
.code-link:hover { color: var(--rust); border-color: var(--rust); }

/* ---------- 5. BANDS -------------------------------------- */
.band { padding-block: var(--band-y); position: relative; }
section[id], [id="enquiry"] { scroll-margin-top: 88px; }
.band--tight { padding-block: clamp(56px, 6vw, 96px); }

.band--dark { background: var(--ink); color: var(--on-ink); }

.band--cream { background: var(--cream); color: var(--on-cream); }
.band--cream .eyebrow,
.band--cream .mono-label,
.band--cream .section-sub { color: var(--on-cream-mute); }
.band--cream .lead { color: var(--on-cream-mute); }

/* ---------- 6. HEADER ------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding-block: 14px;
  padding-top: calc(14px + env(safe-area-inset-top, 0px));
  background: rgba(11, 17, 30, 0);
  transition: background-color .3s ease, border-color .3s ease, backdrop-filter .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-stuck {
  background: rgba(11, 17, 30, 0.88);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom-color: var(--ink-line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  text-decoration: none;
  color: var(--on-ink);
}
.brand-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--on-ink);
  box-shadow: 0 0 0 3px rgba(244,239,231,.14);
}

.nav { display: flex; gap: 28px; }
.nav a {
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--on-ink-mute);
  transition: color .2s ease;
}
.nav a:hover { color: var(--on-ink); }
.nav-cta { display: none; }

.header-actions { display: flex; align-items: center; gap: 12px; }

.nav-toggle {
  display: none;
  width: 42px; height: 42px;
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  background: transparent;
  cursor: pointer;
  padding: 0;
  place-items: center;
  align-content: center;
  gap: 5px;
}
.nav-toggle span {
  display: block;
  width: 16px; height: 1.5px;
  background: var(--on-ink);
  margin-inline: auto;
  transition: transform .25s ease, opacity .25s ease;
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.25px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.25px) rotate(-45deg); }

/* ---------- 7. HERO --------------------------------------- */
.hero {
  padding-top: clamp(48px, 6vw, 88px);
  padding-bottom: clamp(64px, 8vw, 120px);
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: -20% 40% 40% -10%;
  background: radial-gradient(45% 50% at 30% 40%, rgba(221, 91, 55, .18), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(40px, 5vw, 72px);
  align-items: start;
}

.hero-copy .d1 { max-width: 15ch; }
.hero-copy .lead { margin-top: 30px; }

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 36px;
  margin-top: 46px;
  padding-top: 26px;
  border-top: 1px solid var(--ink-line);
}
.hero-meta li { font-size: 0.92rem; font-weight: 600; }
.hero-meta .mono-label { display: block; margin-bottom: 4px; }

/* Enquiry card */
.enquiry {
  background: var(--cream);
  color: var(--on-cream);
  border-radius: var(--radius);
  padding: clamp(24px, 3vw, 34px);
  box-shadow: 0 30px 70px -30px rgba(0,0,0,.65);
  scroll-margin-top: 90px;
}
.enquiry-top {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 18px;
  margin-bottom: 22px;
  border-bottom: 1px solid var(--cream-line);
}
.enquiry-top .mono-label { color: var(--on-cream-mute); }
.enquiry .d3 { margin-bottom: 26px; }

.form { display: grid; gap: 18px; }
.field { display: grid; gap: 7px; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.field label {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--on-cream-mute);
}

.field input,
.field select,
.field textarea {
  font-family: var(--sans);
  font-size: 0.94rem;
  color: var(--on-cream);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--cream-line);
  border-radius: 0;
  padding: 9px 0;
  width: 100%;
  transition: border-color .2s ease;
}
.field textarea { resize: vertical; line-height: 1.55; }
.field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%2359627A' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 2px center;
  padding-right: 22px;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(89, 98, 122, .6); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--rust);
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--rust);
  outline-offset: 4px;
}

.form .btn { margin-top: 6px; }

.form-note {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--on-cream-mute);
  text-align: center;
}
.form-note.is-ok { color: var(--rust-deep); font-weight: 500; }
.form-note.is-error { color: #B3261E; }

/* ---------- 8. TICKER ------------------------------------- */
.ticker {
  border-block: 1px solid var(--ink-line);
  padding-block: 18px;
  overflow: hidden;
}
.ticker-track {
  display: flex;
  align-items: center;
  gap: 34px;
  width: max-content;
  animation: slide 38s linear infinite;
}
.ticker-track span {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-ink-mute);
  white-space: nowrap;
}
.ticker-track .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--rust);
  flex: none;
}
@keyframes slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- 9. WORK --------------------------------------- */
.work-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.2vw, 28px);
}

.work-card {
  background: var(--paper);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s ease, box-shadow .3s ease;
}
.work-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 50px -30px rgba(11,17,30,.5);
}

.work-body {
  padding: clamp(22px, 2.4vw, 32px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}
.work-body p { color: var(--on-cream-mute); font-size: 0.95rem; }
.work-body .mono-label { color: var(--rust-deep); }

.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 6px; }
.tags li {
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 1px solid var(--cream-line);
  border-radius: 999px;
  padding: 5px 11px;
  color: var(--on-cream-mute);
}

.work-link {
  font-family: var(--mono);
  font-size: 0.74rem;
  text-decoration: none;
  color: var(--rust-deep);
  border-bottom: 1px solid currentColor;
  align-self: flex-start;
  padding-bottom: 2px;
}

/* Previews */
.work-preview {
  height: 170px;
  border-bottom: 1px solid var(--cream-line);
  display: flex;
  overflow: hidden;
  background: var(--cream);
}

.work-preview--swatch { padding: 0; }
.work-preview--swatch .sw { flex: 1; background: var(--c); }
.work-preview--swatch .sw--torn {
  background:
    repeating-linear-gradient(135deg, var(--cream) 0 7px, #E7E0D4 7px 14px);
}
.work-preview--swatch .sw--light { background: var(--paper); }

/* Unused right now — a type-specimen tile for a brand project that has
   no palette to show. Add `work-preview--type` to a card to use it. */
.work-preview--type {
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 8px;
  background: linear-gradient(160deg, #1B2438, #0E1524);
}
.specimen {
  font-family: var(--serif);
  font-style: italic;
  font-size: 4.2rem;
  line-height: 1;
  color: var(--clay);
}
.specimen-meta {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--on-ink-mute);
}

.work-preview--split { background: var(--paper); }
.half {
  flex: 1;
  display: grid;
  place-items: center;
  font-family: var(--mono);
  font-size: 0.64rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}
.half--before {
  background: repeating-linear-gradient(0deg, #EDE6DA 0 5px, #E6DED0 5px 10px);
  color: var(--on-cream-mute);
}
.half--after {
  background: var(--ink);
  color: var(--clay);
  border-left: 3px solid var(--rust);
}

.work-preview--code {
  background: var(--ink);
  flex-direction: column;
  padding: 0;
}
.code-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--ink-line);
}
.code-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); }
.code-bar span {
  font-family: var(--mono);
  font-size: 0.62rem;
  color: var(--on-ink-mute);
  margin-left: 8px;
}
.work-preview--code pre {
  margin: 0;
  padding: 16px 18px;
  font-family: var(--mono);
  font-size: 0.74rem;
  line-height: 1.6;
  color: var(--on-ink-mute);
  overflow: hidden;
}
.c-t { color: var(--rust-soft); }
.c-a { color: var(--clay); }
.c-s { color: #8FB3E0; }

/* The closing tile runs the full width of the grid so it never sits
   alone in a half-empty row. Add a fifth project and it still works. */
.work-card--cta {
  grid-column: 1 / -1;
  background: var(--ink);
  color: var(--on-ink);
  border-color: transparent;
}
.work-card--cta .work-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 14px clamp(28px, 5vw, 64px);
  padding-block: clamp(30px, 3.4vw, 44px);
}
.work-card--cta .mono-label { color: var(--rust-soft); grid-column: 1; }
.work-card--cta .d3 { grid-column: 1; font-size: clamp(1.6rem, 3vw, 2.3rem); }
.work-card--cta p { color: var(--on-ink-mute); grid-column: 2; grid-row: 1 / span 3; align-self: center; }
.work-card--cta .btn { grid-column: 1; justify-self: start; margin-top: 8px; background: var(--rust); color: #FFF6F2; }
.work-card--cta .btn:hover { background: var(--rust-deep); }

@media (max-width: 720px) {
  .work-card--cta .work-body { grid-template-columns: 1fr; }
  .work-card--cta .mono-label,
  .work-card--cta .d3,
  .work-card--cta p,
  .work-card--cta .btn { grid-column: 1; grid-row: auto; }
}

/* ---------- 10. STATEMENT --------------------------------- */
.statement { padding-block: clamp(90px, 12vw, 180px); }
.statement-text { max-width: 14ch; }
.pill {
  display: inline-block;
  background: var(--cream);
  color: var(--ink);
  border-radius: 999px;
  padding: 0.04em 0.42em 0.14em;
}
.pill .ital { color: var(--ink); }

/* ---------- 11. SERVICES ---------------------------------- */
.svc-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.2vw, 28px);
}
.svc {
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: clamp(24px, 2.8vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 16px;
  transition: background-color .3s ease, border-color .3s ease;
}
.svc:hover { background: var(--ink-3); border-color: rgba(244,239,231,.2); }
.svc .mono-label { color: var(--rust-soft); }
.svc > p { color: var(--on-ink-mute); font-size: 0.96rem; }

.ticks { display: grid; gap: 10px; margin-top: 4px; }
.ticks li {
  position: relative;
  padding-left: 26px;
  font-size: 0.92rem;
  color: var(--on-ink);
}
.ticks li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--rust);
  font-size: 0.9em;
}

.svc-foot {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 22px;
  border-top: 1px solid var(--ink-line);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-ink-mute);
}
.svc-foot span:last-child { color: var(--rust-soft); }

/* ---------- 12. PROCESS ----------------------------------- */
.process {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 2.2vw, 28px);
  counter-reset: none;
}
.step {
  background: var(--paper);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius);
  padding: clamp(24px, 2.6vw, 34px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  position: relative;
}
.step-num {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--rust-deep);
}
.step p { color: var(--on-cream-mute); font-size: 0.95rem; }
.step-meta {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--cream-line);
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--on-cream-mute);
}

/* ---------- 13. ABOUT ------------------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}

.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  max-width: 100%;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(165deg, #1C2740, #0D1422);
  border: 1px solid var(--ink-line);
}
.portrait-frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait-fallback {
  position: absolute;
  inset: 0;
  display: none;
  place-items: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: 4.5rem;
  color: var(--clay);
}
.portrait-frame.is-empty .portrait-fallback { display: grid; }
.portrait-tag {
  position: absolute;
  left: 16px; top: 16px;
  background: rgba(11,17,30,.72);
  backdrop-filter: blur(6px);
  border: 1px solid var(--ink-line);
  border-radius: 999px;
  padding: 6px 13px 5px;
  color: var(--on-ink);
}

.about-copy { display: flex; flex-direction: column; gap: 18px; }
.about-copy .d2 { margin-bottom: 8px; }
.about-copy p { color: var(--on-ink-mute); font-size: var(--lead); max-width: 56ch; }
.about-copy p strong { color: var(--on-ink); }
.about-copy p a { color: var(--on-ink); text-decoration: none; border-bottom: 1px solid var(--rust); }
.about-copy p a:hover { color: var(--rust); }

.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin-top: 14px;
  border-top: 1px solid var(--ink-line);
}
.stats > div {
  padding: 20px 22px 20px 0;
  border-bottom: 1px solid var(--ink-line);
}
.stats > div:nth-child(odd) { border-right: 1px solid var(--ink-line); }
.stats > div:nth-child(even) { padding-left: 22px; }
.stats dt {
  font-family: var(--mono);
  font-size: 0.63rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--on-ink-mute);
  margin-bottom: 6px;
}
.stats dd {
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.about-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
  margin-top: 10px;
}

/* ---------- 14. MARQUEE ----------------------------------- */
.principles { overflow: hidden; }
.marquee {
  display: flex;
  width: 100%;
  overflow: hidden;
  margin-top: 22px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.marquee-track {
  display: flex;
  gap: 20px;
  width: max-content;
  animation: slide var(--speed, 46s) linear infinite;
}
.marquee--reverse .marquee-track { animation-direction: reverse; }
.marquee:hover .marquee-track { animation-play-state: paused; }

.quote {
  width: clamp(270px, 30vw, 330px);
  background: var(--paper);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius-sm);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: none;
  position: relative;
}
.quote::after {
  content: "”";
  position: absolute;
  top: 8px; right: 18px;
  font-family: var(--serif);
  font-size: 3rem;
  line-height: 1;
  color: var(--clay);
}
.quote p {
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--on-cream);
  max-width: 30ch;
}
.quote cite {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-style: normal;
  color: var(--on-cream-mute);
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--cream-line);
}

/* ---------- 15. WRITING ----------------------------------- */
.posts {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: clamp(20px, 2.2vw, 28px);
}
.post {
  background: var(--ink-2);
  border: 1px solid var(--ink-line);
  border-radius: var(--radius);
  padding: clamp(24px, 2.8vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-decoration: none;
  transition: background-color .3s ease, transform .3s ease;
}
a.post:hover { background: var(--ink-3); transform: translateY(-3px); }
.post-meta { display: flex; gap: 18px; }
.post p { color: var(--on-ink-mute); font-size: 0.96rem; max-width: 52ch; }
.post-foot {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--ink-line);
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.1em;
  color: var(--rust-soft);
}
.post--next { background: transparent; border-style: dashed; }
.post--next .text-link { align-self: flex-start; margin-top: auto; }

/* ---------- 16. FAQ --------------------------------------- */
.faq-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: clamp(32px, 4vw, 72px);
  align-items: start;
}
.faq-grid .section-head { margin-bottom: 0; position: sticky; top: 100px; }

.faq-list { border-top: 1px solid var(--cream-line); }
.faq-item { border-bottom: 1px solid var(--cream-line); }
.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 44px 22px 0;
  font-weight: 700;
  font-size: 1.04rem;
  letter-spacing: -0.015em;
  position: relative;
  transition: color .2s ease;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--rust-deep); }
.chev {
  position: absolute;
  right: 4px; top: 50%;
  width: 11px; height: 11px;
  margin-top: -7px;
  border-right: 2px solid var(--rust);
  border-bottom: 2px solid var(--rust);
  transform: rotate(45deg);
  transition: transform .25s ease;
}
.faq-item[open] .chev { transform: rotate(-135deg); margin-top: -3px; }
.faq-a { padding: 0 44px 24px 0; }
.faq-a p { color: var(--on-cream-mute); font-size: 0.97rem; max-width: 60ch; }

/* ---------- 17. CTA & FOOTER ------------------------------ */
.cta { padding-block: clamp(80px, 10vw, 150px); }
.cta-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.cta-inner .d1 { margin-bottom: 26px; }
.cta-inner .lead { max-width: 48ch; }

.site-footer {
  border-top: 1px solid var(--ink-line);
  padding-block: clamp(48px, 6vw, 76px) 28px;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
  padding-bottom: 42px;
}
.footer-brand { max-width: 34ch; display: flex; flex-direction: column; gap: 16px; }
.footer-brand p { color: var(--on-ink-mute); font-size: 0.92rem; }

.footer-nav { display: flex; gap: clamp(40px, 6vw, 88px); }
.footer-nav > div { display: flex; flex-direction: column; gap: 11px; }
.footer-nav .mono-label { margin-bottom: 5px; }
.footer-nav a {
  text-decoration: none;
  font-size: 0.92rem;
  color: var(--on-ink-mute);
  transition: color .2s ease;
}
.footer-nav a:hover { color: var(--rust-soft); }

.footer-base {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding-top: 24px;
  border-top: 1px solid var(--ink-line);
  font-size: 0.82rem;
  color: var(--on-ink-mute);
}

/* ---------- 18. MOTION ------------------------------------ */
/* Everything here is gated on `html.js`, so if a script is blocked the
   page renders fully visible and static rather than empty. */

:root { --ease: cubic-bezier(.22, .61, .36, 1); }

/* Scroll reveal */
html.js .reveal {
  opacity: 0;
  transform: translateY(22px) scale(.988);
  transition:
    opacity .8s var(--ease),
    transform .8s var(--ease);
}
html.js .reveal.is-in { opacity: 1; transform: none; }

/* Hero entrance — runs once, on load, top to bottom */
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: none; }
}
/* `both` fill holds the from-state during the delay and the to-state
   afterwards, so no JS class is needed to arm or finish this. If the
   tab is in the background the animation simply completes unseen. */
html.js .hero-copy > *,
html.js .enquiry {
  animation: rise .85s var(--ease) both;
}
html.js .hero-copy > *:nth-child(1) { animation-delay: .05s; }
html.js .hero-copy > *:nth-child(2) { animation-delay: .16s; }
html.js .hero-copy > *:nth-child(3) { animation-delay: .25s; }
html.js .hero-copy > *:nth-child(4) { animation-delay: .33s; }
html.js .enquiry { animation-delay: .22s; }

/* The hero glow drifts, very slowly */
@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(4%, 3%, 0) scale(1.12); }
}
.hero::before { animation: drift 22s ease-in-out infinite; }

/* Scroll progress, along the bottom edge of the header */
.scroll-progress {
  position: absolute;
  left: 0; right: 0; bottom: -1px;
  height: 2px;
  pointer-events: none;
}
.scroll-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--rust-deep), var(--rust), var(--rust-soft));
  transform-origin: left;
  transition: width .12s linear;
}

/* Nav underline */
.nav a { position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 1.5px;
  background: var(--rust);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .4s var(--ease);
}
.nav a:hover::after,
.nav a:focus-visible::after { transform: scaleX(1); transform-origin: left; }

/* Cards settle a little more slowly, and the preview breathes */
.work-card { transition: transform .5s var(--ease), box-shadow .5s var(--ease); }
.work-preview { transition: transform .7s var(--ease); }
.work-card:hover .work-preview { transform: scale(1.045); }
.svc, a.post { transition: background-color .4s var(--ease), border-color .4s var(--ease), transform .5s var(--ease); }

/* FAQ — JS animates the panel height; these make it look intentional */
.faq-a { overflow: hidden; }
html.js .faq-a { transition: height .42s var(--ease), opacity .3s var(--ease); }
html.js .faq-item:not([open]) .faq-a { opacity: 0; }

/* Anyone who asked for less motion gets none of it */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  html.js .hero-copy > *,
  html.js .enquiry { opacity: 1; animation: none; }
  html.js .faq-a { transition: none; }
  html.js .faq-item:not([open]) .faq-a { opacity: 1; }
  .hero::before { animation: none; }
  .ticker-track, .marquee-track { animation: none; }
  .nav a::after { display: none; }
  .btn:hover, .work-card:hover, a.post:hover,
  .work-card:hover .work-preview { transform: none; }
  * { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}

/* ---------- 19. RESPONSIVE -------------------------------- */
@media (max-width: 1000px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-copy .d1 { max-width: 18ch; }
  .about-grid { grid-template-columns: 1fr; }
  .about-portrait { max-width: 340px; }
  .faq-grid { grid-template-columns: 1fr; }
  .faq-grid .section-head { position: static; margin-bottom: 8px; }
  .posts { grid-template-columns: 1fr; }
  .process { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .nav {
    position: absolute;
    left: var(--gutter);
    right: var(--gutter);
    top: calc(100% + 8px);
    flex-direction: column;
    gap: 0;
    background: var(--ink-2);
    border: 1px solid var(--ink-line);
    border-radius: var(--radius-sm);
    padding: 8px;
    box-shadow: 0 24px 50px -24px rgba(0,0,0,.8);
  }
  .nav:not(.is-open) { display: none; }
  .nav a { padding: 13px 14px; border-radius: 8px; font-size: 0.98rem; }
  .nav a:hover { background: var(--ink-3); }
  .nav a::after { display: none; } /* the sliding underline is a desktop thing */
  .nav-cta {
    display: block;
    margin-top: 6px;
    border-top: 1px solid var(--ink-line);
    color: var(--rust-soft);
    font-weight: 700;
  }
  .nav-toggle { display: grid; }
  .header-actions .btn--sm { display: none; }
}

@media (max-width: 720px) {
  .work-grid, .svc-grid { grid-template-columns: 1fr; }
  .section-head--row { align-items: flex-start; }
}

@media (max-width: 520px) {
  .field-row { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr; }
  .stats > div:nth-child(odd) { border-right: none; }
  .stats > div:nth-child(even) { padding-left: 0; }
  .footer-nav { gap: 36px; }
  .btn { width: 100%; justify-content: center; }
  .btn-row { flex-direction: column; }
  .header-actions .btn { width: auto; }
  .work-card--cta .btn, .post--next .text-link { align-self: stretch; }
}
