/*
 * Powers Accounting - public website.
 * Tokens are the firm's mark, carried over from the WorkHub: black, gold and card stock.
 * Type is the same family the firm already uses: Source Serif 4 for display,
 * IBM Plex Sans for reading, IBM Plex Mono for dates and figures.
 * One corner radius (4px) everywhere. One accent (gold). Light and dark follow the system.
 */

@font-face {
  font-family: 'Source Serif 4';
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
  src: url('assets/fonts/source-serif-4-latin-standard-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Source Serif 4';
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
  src: url('assets/fonts/source-serif-4-latin-standard-italic.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'IBM Plex Mono';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('assets/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
}

:root {
  color-scheme: light dark;

  --bg: #f5f6f6;
  --bg-tint: #eceeee;
  --surface: #ffffff;
  --ink: #1a1a1d;
  --muted: #56595c;
  --line: #dcdfdf;
  --field: #878c8c;
  --brand: #8a6a12; /* the gold, deepened until it carries text */
  --gold: #c9a227; /* the mark's own gold: fills only */
  --gold-wash: #f3ecd6;
  --plate: #17171a;
  --on-plate: #ecebe8;
  --on-plate-muted: #a4a7a9;
  --on-plate-gold: #e0be63;
  --btn: #1a1a1d;
  --btn-ink: #f5f6f6;
  --error: #b42318;
  --nav-bg: rgb(245 246 246 / 0.82);
  --shadow: 0 1px 2px rgb(26 26 29 / 0.05), 0 12px 32px -12px rgb(26 26 29 / 0.14);

  --serif: 'Source Serif 4', Georgia, 'Times New Roman', serif;
  --sans: 'IBM Plex Sans', ui-sans-serif, system-ui, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'Cascadia Mono', Consolas, monospace;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --radius: 4px;
  --nav-h: 68px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --bg-tint: #18191b;
    --surface: #1c1d20;
    --ink: #ecebe8;
    --muted: #a4a7a9;
    --line: #2e3034;
    --field: #6b7074;
    --brand: #e0be63;
    --gold-wash: #2b2617;
    --plate: #222329;
    --btn: #ecebe8;
    --btn-ink: #141416;
    --error: #f07065;
    --nav-bg: rgb(20 20 22 / 0.8);
    --shadow: 0 1px 2px rgb(0 0 0 / 0.3), 0 12px 32px -12px rgb(0 0 0 / 0.6);
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1,
h2,
h3,
p,
ul,
ol,
dl,
dd {
  margin: 0;
}
ul,
ol {
  padding: 0;
  list-style: none;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
svg {
  display: block;
}
.defs {
  position: absolute;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-optical-sizing: auto;
  letter-spacing: -0.022em;
  text-wrap: balance;
}
h2 {
  font-size: clamp(1.9rem, 3.6vw, 3rem);
  line-height: 1.08;
}
h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.35;
}

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

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--btn);
  color: var(--btn-ink);
  border-radius: var(--radius);
  transform: translateY(-200%);
}
.skip:focus {
  transform: none;
}

.wrap {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* The mark */
.mark-plate {
  fill: var(--plate);
}
.mark-knock {
  fill: var(--plate);
  stroke: var(--plate);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.6rem 1.1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.975rem;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    transform 140ms var(--ease-out),
    background-color 180ms ease,
    border-color 180ms ease;
}
.btn:active {
  transform: scale(0.97);
}
.btn-lg {
  min-height: 52px;
  padding: 0.8rem 1.4rem;
  font-size: 1.0125rem;
}
.btn-primary {
  background: var(--btn);
  color: var(--btn-ink);
}
.btn-ghost {
  border-color: var(--field);
  color: var(--ink);
  background: transparent;
}
.btn-arrow {
  display: inline-block;
  transition: transform 220ms var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
    background: color-mix(in srgb, var(--btn) 86%, var(--gold));
  }
  .btn-ghost:hover {
    border-color: var(--ink);
  }
  .btn:hover .btn-arrow {
    transform: translateX(4px);
  }
}

/* Request a quote: the button opens two direct ways to reach the firm. */
.quote {
  position: relative;
  display: inline-flex;
}
.quote-menu {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 60;
  min-width: 17rem;
  padding: 0.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  visibility: hidden;
  opacity: 0;
  transform: scale(0.96);
  transform-origin: top left;
  transition:
    opacity 140ms ease,
    transform 140ms ease,
    visibility 0s linear 140ms;
}
.quote-nav .quote-menu {
  left: auto;
  right: 0;
  transform-origin: top right;
}
.quote.is-open .quote-menu {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    opacity 180ms var(--ease-out),
    transform 180ms var(--ease-out),
    visibility 0s;
}
.quote-opt {
  display: grid;
  gap: 0.1rem;
  padding: 0.7rem 0.85rem;
  border-radius: 2px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.35;
  transition: background-color 140ms ease;
}
.quote-opt strong {
  font-weight: 600;
  font-size: 1rem;
}
.quote-opt span {
  font-size: 0.875rem;
  color: var(--muted);
}
.quote-opt + .quote-opt {
  border-top: 1px solid var(--line);
}
@media (hover: hover) and (pointer: fine) {
  .quote-opt:hover {
    background: var(--bg-tint);
  }
}
@media (prefers-reduced-motion: reduce) {
  .quote-menu {
    transform: none !important;
  }
}

/* Navigation */
.nav-sentinel {
  position: absolute;
  top: 0;
  height: 24px;
  width: 1px;
}
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  height: var(--nav-h);
  border-bottom: 1px solid transparent;
  transition:
    background-color 240ms ease,
    border-color 240ms ease;
}
.nav.is-stuck {
  background: var(--nav-bg);
  border-bottom-color: var(--line);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
}
.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 34.6px;
  flex: none;
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.4vw, 2rem);
}
.nav-links > a {
  position: relative;
  padding: 0.4rem 0;
  font-size: 0.95rem;
  color: var(--muted);
  text-decoration: none;
  transition: color 180ms ease;
}
.nav-links > a::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 260ms var(--ease-out);
}
.nav-links > a[aria-current='true'] {
  color: var(--ink);
}
.nav-links > a[aria-current='true']::after {
  transform: scaleX(1);
}
@media (hover: hover) and (pointer: fine) {
  .nav-links > a:hover {
    color: var(--ink);
  }
}
.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  cursor: pointer;
  border-radius: var(--radius);
}
.nav-toggle-bars,
.nav-toggle-bars::before {
  display: block;
  width: 22px;
  height: 2px;
  margin-inline: auto;
  background: var(--ink);
  transition: transform 220ms var(--ease-out);
}
.nav-toggle-bars {
  transform: translateY(-4px);
}
.nav-toggle-bars::before {
  content: '';
  transform: translateY(8px);
}
.nav-toggle[aria-expanded='true'] .nav-toggle-bars {
  transform: rotate(45deg);
}
.nav-toggle[aria-expanded='true'] .nav-toggle-bars::before {
  transform: rotate(-90deg);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: block;
  }
  .nav-links {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem var(--gutter) 1.25rem;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px);
    transition:
      opacity 200ms var(--ease-out),
      transform 200ms var(--ease-out),
      visibility 0s linear 200ms;
  }
  .nav-links.is-open {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition-delay: 0s;
  }
  .nav.is-open {
    background: var(--bg);
  }
  .nav-links > a {
    padding: 0.9rem 0;
    font-size: 1.05rem;
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .nav-links > a::after {
    display: none;
  }
  .quote-nav {
    display: block;
    margin-top: 1rem;
  }
  .quote-nav > .btn {
    display: none;
  }
  .quote-nav .quote-menu {
    position: static;
    visibility: visible;
    opacity: 1;
    transform: none;
    min-width: 0;
    box-shadow: none;
  }
}

/* Hero */
.hero {
  padding-top: calc(var(--nav-h) + clamp(1rem, 3vh, 2rem));
  padding-bottom: clamp(2rem, 5vh, 4rem);
  min-height: min(100dvh, 880px);
  display: flex;
  align-items: center;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center;
  gap: clamp(1rem, 4vw, 4rem);
}
.hero-title {
  font-size: clamp(2.7rem, 6.1vw, 5.25rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-wrap: nowrap;
}
.hero-title em {
  font-style: italic;
  font-weight: 400;
  color: var(--brand);
}
.line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
}
.line-inner {
  display: block;
}
.hero-sub {
  margin-top: 1.6rem;
  max-width: 34rem;
  font-size: clamp(1.075rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  color: var(--muted);
}
.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.hero-art {
  position: relative;
  justify-self: end;
  width: 100%;
  max-width: 600px;
}
.hero-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}
.cell-line {
  fill: none;
  stroke: var(--field);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}
.cell-fill {
  fill: var(--gold);
}
.cell-text {
  font-family: var(--mono);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  fill: var(--muted);
  text-anchor: middle;
  dominant-baseline: central;
}
.cell,
.hm-plate,
.hm-a,
.hm-p {
  transform-box: fill-box;
  transform-origin: center;
}

/* Hero entrance: runs once on load. Explanation and delight budget lives here. */
.js .line-inner {
  transform: translateY(110%);
}
.js [data-hero-fade] {
  opacity: 0;
  transform: translateY(14px);
}
.js .cell {
  opacity: 0;
  transform: scale(0.82);
}
.js .hm-plate {
  opacity: 0;
  transform: scale(0.92);
}
.js .hm-a {
  opacity: 0;
  transform: translateX(10px);
}
.js .hm-p {
  opacity: 0;
  transform: translateX(-10px);
}
.js.is-ready .line-inner {
  transform: none;
  transition: transform 900ms var(--ease-out);
}
.js.is-ready .line:nth-child(2) .line-inner {
  transition-delay: 90ms;
}
.js.is-ready [data-hero-fade] {
  opacity: 1;
  transform: none;
  transition:
    opacity 700ms var(--ease-out) 320ms,
    transform 700ms var(--ease-out) 320ms;
}
.js.is-ready .hero-actions[data-hero-fade] {
  transition-delay: 420ms;
}
.js.is-ready .hm-plate {
  opacity: 1;
  transform: none;
  transition:
    opacity 600ms var(--ease-out) 150ms,
    transform 800ms var(--ease-out) 150ms;
}
.js.is-ready .hm-a,
.js.is-ready .hm-p {
  opacity: 1;
  transform: none;
  transition:
    opacity 600ms var(--ease-out) 520ms,
    transform 800ms var(--ease-out) 520ms;
}
.js.is-ready .hm-p {
  transition-delay: 400ms;
}
.js.is-ready .cell {
  opacity: var(--o, 1);
  transform: none;
  transition:
    opacity 700ms var(--ease-out) var(--d, 0ms),
    transform 900ms var(--ease-out) var(--d, 0ms);
}
/* A few lit cells breathe, slowly. Decorative, so it stops for reduced motion. */
.cell-fill {
  opacity: 0.1;
  animation: breathe 6s ease-in-out infinite;
  animation-delay: var(--bd, 0s);
}
@keyframes breathe {
  0%,
  100% {
    opacity: 0.08;
  }
  50% {
    opacity: 0.34;
  }
}

@media (max-width: 860px) {
  .hero {
    min-height: 0;
    padding-bottom: 1rem;
  }
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .hero-title {
    font-size: clamp(2.5rem, 11.5vw, 4rem);
  }
  .hero-art {
    justify-self: center;
    max-width: 420px;
    margin-top: 0.5rem;
  }
}

/* Reveal on scroll */
.js [data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 700ms var(--ease-out) var(--rd, 0ms),
    transform 800ms var(--ease-out) var(--rd, 0ms);
}
.js [data-reveal].is-in {
  opacity: 1;
  transform: none;
}

/* Facts */
.facts {
  border-block: 1px solid var(--line);
}
.facts-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.fact {
  padding: clamp(1.75rem, 4vw, 3rem) 0;
  padding-inline: clamp(1rem, 3vw, 2.5rem);
  border-left: 1px solid var(--line);
}
.fact:first-child {
  border-left: 0;
  padding-left: 0;
}
.fact-num {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums lining-nums;
}
.fact-label {
  margin-top: 0.75rem;
  max-width: 16rem;
  color: var(--muted);
  font-size: 0.975rem;
  line-height: 1.45;
}
@media (max-width: 700px) {
  .facts-row {
    grid-template-columns: 1fr;
  }
  .fact,
  .fact:first-child {
    display: flex;
    align-items: baseline;
    gap: 1.25rem;
    padding: 1.4rem 0;
    border-left: 0;
    border-top: 1px solid var(--line);
  }
  .fact:first-child {
    border-top: 0;
  }
  .fact-num {
    min-width: 7.5rem;
    font-size: 2.6rem;
  }
  .fact-label {
    margin-top: 0;
  }
}

/* Sections */
.section {
  padding-block: clamp(4.5rem, 10vw, 8.5rem);
}
.section-tint {
  background: var(--bg-tint);
}
.section-head {
  max-width: 46rem;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-head p,
.process-head p,
.contact-copy > p {
  margin-top: 1.1rem;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1.125rem;
}

/* Services: a list that drives one detail panel on desktop, a plain stack on mobile. */
.services {
  position: relative;
  border-top: 1px solid var(--line);
}
.svc h3 {
  font: inherit;
}
.svc-tab {
  display: flex;
  align-items: baseline;
  width: 100%;
  padding: 1.1rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: none;
  text-align: left;
  font-family: var(--serif);
  font-size: clamp(1.4rem, 2.4vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.015em;
  line-height: 1.2;
  color: var(--muted);
  cursor: pointer;
  transition:
    color 200ms ease,
    transform 300ms var(--ease-out);
}
.svc.is-active .svc-tab {
  color: var(--ink);
}
.svc-bill {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--brand);
}
.svc-lede {
  margin-top: 0.9rem;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 1.9vw, 1.5rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
}
.svc-detail ul {
  margin-top: 1.5rem;
  border-top: 1px solid var(--line);
}
.svc-detail li {
  position: relative;
  padding: 0.75rem 0 0.75rem 1.6rem;
  color: var(--muted);
}
.svc-detail li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 1.15rem;
  width: 10px;
  height: 11.5px;
  background: var(--gold);
  clip-path: polygon(50% 0, 100% 25%, 100% 75%, 50% 100%, 0 75%, 0 25%);
}

@media (min-width: 861px) {
  .services {
    padding-right: 54%;
    min-height: 34rem;
  }
  .svc-tab {
    padding-left: 0;
  }
  .svc.is-active .svc-tab {
    transform: translateX(14px);
  }
  .svc-detail {
    position: absolute;
    top: 0;
    right: 0;
    width: 48%;
    height: 100%;
    padding: clamp(1.75rem, 3vw, 2.75rem);
    background: var(--surface);
    border: 1px solid var(--line);
    border-top: 0;
    border-radius: 0 0 var(--radius) var(--radius);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition:
      opacity 180ms ease,
      transform 180ms ease,
      visibility 0s linear 180ms;
  }
  .svc.is-active .svc-detail {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition:
      opacity 320ms var(--ease-out) 80ms,
      transform 420ms var(--ease-out) 80ms,
      visibility 0s;
  }
}
@media (max-width: 860px) {
  .svc-tab {
    color: var(--ink);
    border-bottom: 0;
    padding-bottom: 0.4rem;
    cursor: default;
  }
  .svc {
    border-bottom: 1px solid var(--line);
    padding-bottom: 1.25rem;
  }
  .svc-lede {
    font-family: var(--sans);
    font-size: 1.0625rem;
    line-height: 1.55;
    letter-spacing: 0;
    color: var(--muted);
    margin-top: 0.4rem;
  }
  .svc-detail ul {
    display: none;
  }
}

/* Process */
.process-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.process-head {
  position: sticky;
  top: calc(var(--nav-h) + 2.5rem);
}
.steps {
  position: relative;
  padding-left: 3.25rem;
}
.rail {
  position: absolute;
  left: 10px;
  top: 0.9rem;
  bottom: 2rem;
  width: 2px;
  background: var(--line);
}
.rail-fill {
  position: absolute;
  inset: 0;
  background: var(--gold);
  transform-origin: top;
}
.step {
  position: relative;
  padding-bottom: clamp(2rem, 4vw, 3.25rem);
}
.step:last-child {
  padding-bottom: 0;
}
.step-node {
  position: absolute;
  left: -3.25rem;
  top: 0.2rem;
  width: 22px;
  height: 25.4px;
  fill: var(--bg-tint);
  stroke: var(--field);
  stroke-width: 7;
  overflow: visible;
  transition:
    fill 500ms var(--ease-out) 150ms,
    stroke 500ms var(--ease-out) 150ms;
}
.step.is-in .step-node,
html:not(.js) .step-node {
  fill: var(--gold);
  stroke: var(--gold);
}
.step h3 {
  font-family: var(--serif);
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.step p {
  margin-top: 0.6rem;
  max-width: 34rem;
  color: var(--muted);
}
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .rail-fill {
      animation: rail-grow linear both;
      animation-timeline: view();
      animation-range: cover 18% cover 70%;
    }
  }
}
@keyframes rail-grow {
  from {
    transform: scaleY(0);
  }
  to {
    transform: scaleY(1);
  }
}
@media (max-width: 860px) {
  .process-grid {
    grid-template-columns: 1fr;
  }
  .process-head {
    position: static;
  }
}

/* Deadlines bento: four items, four cells. */
.bento {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 1rem;
}
.tile {
  grid-column: span 5;
  display: flex;
  flex-direction: column;
  min-height: 17rem;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.tile:nth-child(1),
.tile:nth-child(4) {
  grid-column: span 7;
}
.tile-tag {
  font-family: var(--mono);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}
.tile-tag span {
  display: block;
  margin-top: 0.2rem;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.9rem;
  letter-spacing: 0;
  color: var(--muted);
}
.tile-date {
  margin-top: auto;
  padding-top: 2rem;
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: lining-nums;
  text-wrap: balance;
}
.tile-in {
  margin-top: 0.5rem;
  font-family: var(--mono);
  font-size: 0.875rem;
  color: var(--brand);
  min-height: 1.4em;
}
.tile-in:empty {
  display: none;
}
.tile-note {
  margin-top: 0.9rem;
  max-width: 34rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--muted);
}
.tile-ink {
  background-color: var(--plate);
  border-color: var(--plate);
  color: var(--on-plate);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='346' viewBox='0 0 100 115.47'%3E%3Cpath d='M50 0L100 28.87L100 86.6L50 115.47L0 86.6L0 28.87Z' fill='none' stroke='%23c9a227' stroke-opacity='.22' stroke-width='.6'/%3E%3Cpath d='M50 22L81 40L81 75.5L50 93.5L19 75.5L19 40Z' fill='none' stroke='%23c9a227' stroke-opacity='.12' stroke-width='.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right -70px top -80px;
}
.tile-ink .tile-tag span,
.tile-ink .tile-note {
  color: var(--on-plate-muted);
}
.tile-ink .tile-in {
  color: var(--on-plate-gold);
}
.tile-gold {
  background: var(--gold-wash);
  border-color: color-mix(in srgb, var(--gold) 35%, var(--line));
}
.tile-lined {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'%3E%3Cpath d='M28 0L56 16.2V48.5L28 64.7L0 48.5V16.2ZM28 64.7V97M0 48.5L-28 64.7M56 48.5L84 64.7' fill='none' stroke='%23878c8c' stroke-opacity='.16'/%3E%3C/svg%3E");
  background-position: right top;
}
.fineprint {
  margin-top: 1.5rem;
  max-width: 44rem;
  font-size: 0.9rem;
  color: var(--muted);
}
@media (max-width: 860px) {
  .tile,
  .tile:nth-child(1),
  .tile:nth-child(4) {
    grid-column: 1 / -1;
    min-height: 0;
  }
}

/* Trust */
.trust {
  text-align: left;
}
.trust-line {
  font-family: var(--serif);
  font-size: clamp(2.1rem, 5.2vw, 4.25rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.trust-points {
  margin-top: clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-top: 1.75rem;
  border-top: 1px solid var(--ink);
}
.trust-points p {
  margin-top: 0.5rem;
  color: var(--muted);
  max-width: 24rem;
}
@media (max-width: 760px) {
  .trust-points {
    grid-template-columns: 1fr;
  }
}

/* Questions */
.faq-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 6vw, 6rem);
  align-items: start;
}
.faq {
  border-top: 1px solid var(--line);
}
.qa {
  border-bottom: 1px solid var(--line);
}
.qa h3 {
  font: inherit;
}
.qa button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  width: 100%;
  padding: 1.25rem 0;
  border: 0;
  background: none;
  text-align: left;
  font-size: 1.125rem;
  font-weight: 500;
  cursor: pointer;
}
.qa button::after {
  content: '';
  flex: none;
  width: 12px;
  height: 12px;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 100% 2px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 2px 100% no-repeat;
  transition: transform 300ms var(--ease-out);
}
.qa button[aria-expanded='true']::after {
  transform: rotate(45deg);
}
.qa-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 320ms var(--ease-out);
}
.qa-body > div {
  overflow: hidden;
  visibility: hidden;
  opacity: 0;
  transition:
    opacity 240ms ease,
    visibility 0s linear 320ms;
}
.qa.is-open .qa-body {
  grid-template-rows: 1fr;
}
.qa.is-open .qa-body > div {
  visibility: visible;
  opacity: 1;
  transition:
    opacity 320ms ease 60ms,
    visibility 0s;
}
.qa-body p {
  padding-bottom: 1.4rem;
  max-width: 38rem;
  color: var(--muted);
}
html:not(.js) .qa-body {
  grid-template-rows: 1fr;
}
html:not(.js) .qa-body > div {
  visibility: visible;
  opacity: 1;
}
@media (max-width: 860px) {
  .faq-grid {
    grid-template-columns: 1fr;
  }
}

/* Contact */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
}
.contact-list {
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
}
.contact-list > div {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
.contact-list dt {
  color: var(--muted);
  font-size: 0.95rem;
}
.contact-list a {
  text-decoration-color: var(--gold);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}
.form {
  display: grid;
  gap: 1.25rem;
  padding: clamp(1.5rem, 3.5vw, 2.5rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.field {
  display: grid;
  gap: 0.45rem;
}
.field label {
  font-size: 0.95rem;
  font-weight: 500;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.85rem;
  background: var(--bg);
  border: 1px solid var(--field);
  border-radius: var(--radius);
  transition: border-color 160ms ease;
}
.field textarea {
  resize: vertical;
  min-height: 7rem;
}
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline-offset: 1px;
  border-color: var(--brand);
}
.field [aria-invalid='true'] {
  border-color: var(--error);
}
.field-help {
  font-size: 0.875rem;
  color: var(--muted);
}
.field-err {
  font-size: 0.875rem;
  color: var(--error);
}
.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}
.form-status {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--brand);
}
.form-status:empty {
  display: none;
}
@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .form-actions .btn {
    flex: 1 1 100%;
  }
}

/* Footer */
.footer {
  border-top: 1px solid var(--line);
  padding-top: clamp(2.5rem, 5vw, 4rem);
  font-size: 0.95rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 2rem;
}
.footer-legal {
  margin-top: 1.1rem;
  color: var(--muted);
  line-height: 1.5;
}
.footer-links {
  display: grid;
  gap: 0.6rem;
  align-content: start;
}
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  width: fit-content;
  transition: color 160ms ease;
}
@media (hover: hover) and (pointer: fine) {
  .footer-links a:hover {
    color: var(--ink);
  }
}
.footer-base {
  margin-top: clamp(2rem, 4vw, 3.5rem);
  padding-block: 1.5rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.875rem;
}
@media (max-width: 700px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

/* Reduced motion: keep the fades that aid comprehension, drop movement and loops. */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .js .line-inner,
  .js [data-hero-fade],
  .js .cell,
  .js .hm-plate,
  .js .hm-a,
  .js .hm-p,
  .js [data-reveal],
  .svc.is-active .svc-tab,
  .svc-detail,
  .nav-links {
    transform: none !important;
  }
  .cell-fill {
    animation: none;
    opacity: 0.16;
  }
  .btn-arrow,
  .btn {
    transition: none;
  }
  .qa-body {
    transition: none;
  }
}
