/* ==========================================================
   Heather Allansdottir, Writer
   Direction: classic and established. A bookplate on laid paper,
   oxblood binding, and one line of royal blue fountain pen ink.
   ========================================================== */

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

:root {
  /* Brand palette: oxblood binding cloth, royal blue ink */
  --primary:      #4a1c25;
  --primary-mid:  #6b2a36;
  --primary-dark: #33121a;
  --accent:       #1f4fa8;
  --accent-mid:   #9db9ef;

  /* Neutrals */
  --bg:         #f7f3ea;
  --surface:    #fffdf8;
  --border:     #ddd3c2;
  --text:       #241a1c;
  --text-soft:  #574a4d;
  --text-muted: #6f6164;
  --on-dark:    #f7f0e6;
  --on-dark-soft: #e3d4cf;

  /* Typography */
  --font-display: 'Libre Caslon Text', Georgia, serif;
  --font-body:    'Libre Franklin', 'Helvetica Neue', sans-serif;

  /* Spacing */
  --section-pad: clamp(60px, 8vw, 120px);
  --container:   1200px;
  --radius:      12px;
  --radius-lg:   24px;
  --gutter:      clamp(1rem, 5vw, 2rem);
}

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

body {
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }

a { color: var(--accent); text-underline-offset: 0.2em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: 0;
  color: var(--primary);
}
h1 { font-size: clamp(2.3rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.7rem); }
h3 { font-size: clamp(1.35rem, 2.4vw, 1.75rem); }

p + p { margin-top: 1em; }

[id] { scroll-margin-top: 6rem; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.skip-link {
  position: absolute; left: 1rem; top: -4rem; z-index: 200;
  background: var(--primary); color: var(--on-dark); padding: 0.6rem 1rem;
  border-radius: 6px; text-decoration: none;
}
.skip-link:focus { top: 1rem; }

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section { padding-block: var(--section-pad); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3rem; padding: 0.8rem 1.6rem;
  font-family: var(--font-body); font-size: 1rem; font-weight: 600; line-height: 1.3;
  text-decoration: none; text-align: center;
  border: 1px solid var(--primary); border-radius: 2px;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, transform 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary { background-color: var(--primary); color: var(--on-dark); }
.btn-primary:hover, .btn-primary:focus-visible { background-color: var(--primary-dark); }
.btn-secondary { background-color: transparent; color: var(--primary); }
.btn-secondary:hover, .btn-secondary:focus-visible { background-color: var(--surface); border-color: var(--accent); color: var(--accent); }
.btn-light { background-color: var(--on-dark); color: var(--primary); border-color: var(--on-dark); }
.btn-light:hover, .btn-light:focus-visible { background-color: var(--surface); }
.on-dark .btn:focus-visible { outline-color: var(--accent-mid); }

/* ---------- Header (solid, never see-through) ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background-color: var(--bg);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  max-width: var(--container); margin-inline: auto;
  padding: 0.7rem var(--gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.brand {
  display: inline-flex; align-items: center; gap: 0.7rem;
  text-decoration: none; color: var(--primary); min-width: 0;
}
.brand-mark { width: 2.6rem; height: 2.6rem; flex-shrink: 0; }
.brand-mark circle { fill: none; stroke: var(--primary); }
.brand-mark text { fill: var(--primary); font-family: var(--font-display); }
.brand-mark .mark-nib { fill: var(--accent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-name { font-family: var(--font-display); font-size: 1.08rem; color: var(--primary); }
.brand-role { font-size: 0.8rem; color: var(--text-soft); }

.site-nav { position: static; }
.nav-toggle {
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.9rem; height: 2.9rem; flex-shrink: 0;
  background-color: var(--surface); border: 1px solid var(--border); border-radius: 2px;
  cursor: pointer; transition: border-color 0.2s, background-color 0.2s;
}
.nav-toggle:hover { border-color: var(--primary); }
.nav-toggle-bars, .nav-toggle-bars::before, .nav-toggle-bars::after {
  display: block; width: 1.3rem; height: 2px; background-color: var(--primary);
  transition: transform 0.2s, background-color 0.2s;
}
.nav-toggle-bars { position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background-color: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav-links { list-style: none; display: none; }
.nav-links a {
  display: block; text-decoration: none; color: var(--text);
  font-weight: 500; font-size: 1rem; padding: 0.75rem 0;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="page"] { color: var(--primary); font-weight: 600; }

.header-inner { position: relative; }

/* Mobile open menu panel (only when the button has opened it) */
@media (max-width: 767.98px) {
  .site-header .site-nav .nav-links.is-open {
    display: flex; flex-direction: column;
    position: absolute; left: 0; right: 0; top: 100%;
    background-color: var(--bg);
    border-bottom: 1px solid var(--border);
    padding: 0.5rem var(--gutter) 1.25rem;
    box-shadow: 0 12px 24px rgba(51, 18, 26, 0.08);
  }
  .site-header .site-nav .nav-links.is-open li + li { border-top: 1px solid var(--border); }
  .site-header .site-nav .nav-links.is-open a[aria-current="page"] { color: var(--accent); }
}

/* ---------- Ink line (the signature) ---------- */
.ink-line { display: block; width: min(100%, 26rem); height: auto; margin: 0.6rem auto 0; overflow: visible; }
.ink-line path { fill: none; stroke: var(--accent); stroke-width: 2.4; stroke-linecap: round; }
.ink-line .ink-dot { fill: var(--accent); transform-box: fill-box; transform-origin: center; }

/* Section divider: two ink strokes meeting at a nib */
.ink-rule {
  max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter);
  display: flex; justify-content: center;
}
.ink-rule svg { width: min(100%, 34rem); height: auto; overflow: visible; }
.ink-rule path.stroke { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; }
.ink-rule .nib { fill: var(--accent); transform-box: fill-box; transform-origin: 50% 100%; }
.ink-rule .nib-slit { stroke: var(--bg); stroke-width: 1; }
.ink-rule.is-inked .nib { animation: nib-blot 0.35s ease-out; }
.on-dark .ink-rule path.stroke { stroke: var(--accent-mid); }
.on-dark .ink-rule .nib { fill: var(--accent-mid); }
.on-dark .ink-rule .nib-slit { stroke: var(--primary); }

@keyframes nib-blot {
  0% { transform: scale(1); }
  55% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* ---------- Framed images (bookplate frame with nib mark) ---------- */
.frame {
  position: relative;
  padding: 0.6rem;
  background-color: var(--surface);
  border: 1px solid var(--border);
  box-shadow: 0 0 0 4px var(--bg), 0 0 0 5px var(--border);
}
.frame img { width: 100%; height: 100%; object-fit: cover; }
.frame::after {
  content: ""; position: absolute; left: 50%; bottom: -0.85rem;
  width: 1.7rem; height: 1.7rem; transform: translateX(-50%);
  background: var(--bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 L17 11 L12 21 L7 11 Z' fill='%231f4fa8'/%3E%3Cpath d='M12 11 V17' stroke='%23f7f3ea' stroke-width='1.2'/%3E%3Ccircle cx='12' cy='10.5' r='1.3' fill='%23f7f3ea'/%3E%3C/svg%3E") center / 1.1rem no-repeat;
  border-radius: 50%;
}

/* ---------- Home hero ---------- */
.hero-home { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(3.5rem, 7vw, 5.5rem); }
.hero-plate {
  max-width: 62rem; margin-inline: auto;
  text-align: center;
  display: flex; flex-direction: column; align-items: center;
}
.crest { width: clamp(7.5rem, 18vw, 9.5rem); height: auto; margin-bottom: 1.25rem; }
.crest .ring { fill: none; stroke: var(--primary); }
.crest .ring-text { fill: var(--primary); font-family: var(--font-body); font-weight: 500; }
.crest .mono { fill: var(--primary); font-family: var(--font-display); }
.crest .crest-nib { fill: var(--accent); }

.hero-home h1 { font-size: clamp(2.5rem, 7.2vw, 5.4rem); line-height: 1.15; }
.hero-home h1 .h1-line { display: block; }
.hero-role {
  display: block; margin-top: 0.4rem;
  font-family: var(--font-display); font-style: italic;
  font-size: clamp(1.2rem, 2.4vw, 1.6rem); color: var(--text-soft); line-height: 1.3;
}
.hero-home .ink-line { width: min(92%, 30rem); margin-top: 0.9rem; }
.lede {
  max-width: 38rem; margin: 1.4rem auto 0;
  font-size: clamp(1.08rem, 1.6vw, 1.22rem); color: var(--text-soft);
}
.hero-actions {
  margin-top: 2rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem;
}
.hero-figure {
  margin-top: clamp(2.5rem, 5vw, 3.5rem);
  width: 100%;
  aspect-ratio: 4 / 3;
  max-height: 55vh;
}
.hero-figure img { object-position: 62% 50%; }

/* ---------- Home: two services ---------- */
.on-dark { background-color: var(--primary); color: var(--on-dark); }
.on-dark h2, .on-dark h3 { color: var(--on-dark); }
.on-dark a { color: var(--on-dark); }
.on-dark a.btn-light { color: var(--primary); }
.on-dark a.btn-light:hover, .on-dark a.btn-light:focus-visible { color: var(--primary-dark); }

.services-pair .section-head { text-align: center; max-width: 40rem; margin-inline: auto; }
.services-pair .section-head p { color: var(--on-dark-soft); margin-top: 0.8rem; }
.services-pair .ink-rule { margin-top: 1.5rem; }
.pair {
  margin-top: clamp(2rem, 5vw, 3.5rem);
  display: grid; gap: 2.5rem;
}
.pair-item { text-align: center; padding-inline: clamp(0rem, 3vw, 2.5rem); }
.pair-item h3 { font-size: clamp(1.9rem, 4vw, 3rem); line-height: 1.15; }
.pair-item .pair-sub {
  font-family: var(--font-display); font-style: italic; color: var(--accent-mid);
  font-size: 1.15rem; margin-top: 0.4rem;
}
.pair-item p.pair-body { color: var(--on-dark-soft); margin-top: 1rem; max-width: 30rem; margin-inline: auto; }
.pair-link {
  display: inline-block; margin-top: 1.4rem;
  font-weight: 600; text-decoration: none;
  border-bottom: 1px solid var(--accent-mid); padding-bottom: 0.2rem;
  transition: border-color 0.2s, color 0.2s;
}
.pair-link:hover, .pair-link:focus-visible { color: var(--accent-mid); border-color: var(--on-dark); }
.pair-divider { position: relative; height: 1.8rem; display: flex; justify-content: center; align-items: center; }
.pair-divider::before {
  content: ""; position: absolute; top: 50%; left: 50%;
  width: 10rem; height: 1px; transform: translateX(-50%);
  background-color: var(--accent-mid);
}
.pd-nib {
  position: relative; width: 1.8rem; height: 1.8rem; border-radius: 50%;
  background: var(--primary) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 L17 11 L12 21 L7 11 Z' fill='%239db9ef'/%3E%3Cpath d='M12 11 V17' stroke='%234a1c25' stroke-width='1.2'/%3E%3Ccircle cx='12' cy='10.5' r='1.3' fill='%234a1c25'/%3E%3C/svg%3E") center / 1.2rem no-repeat;
}

/* ---------- Home: statement with correction caret ---------- */
.statement { text-align: center; }
.statement h2 { font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.3; max-width: 22ch; margin-inline: auto; }
.insert {
  position: relative; display: inline-block;
  color: var(--accent); font-style: italic;
  vertical-align: 0.55em; font-size: 0.62em; margin-inline: -0.25em;
  line-height: 1.15;
}
.insert svg {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  width: 1.4em; height: 0.9em; overflow: visible;
}
.insert svg path { fill: none; stroke: var(--accent); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.statement p { max-width: 40rem; margin: 1.6rem auto 0; color: var(--text-soft); font-size: 1.12rem; }

/* ---------- CTA band ---------- */
.cta-band { text-align: center; }
.cta-band h2 { max-width: 24ch; margin-inline: auto; }
.cta-band p { max-width: 36rem; margin: 1rem auto 0; color: var(--on-dark-soft); }
.cta-band .btn { margin-top: 2rem; }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.page-hero .plate {
  max-width: 46rem; margin-inline: auto;
  padding: clamp(1.75rem, 5vw, 3rem) clamp(1.25rem, 5vw, 3.5rem);
  border: 1px solid var(--border);
  box-shadow: inset 0 0 0 5px var(--bg), inset 0 0 0 6px var(--border);
  background-color: var(--surface);
}
.page-hero .plate-mark { width: 3.2rem; height: 3.2rem; margin: 0 auto 1rem; }
.page-hero .lede { margin-top: 1.2rem; }
.page-hero .hero-actions { margin-top: 1.6rem; }

/* ---------- Services page ---------- */
.service-block {
  display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center;
}
.service-block h2 { margin-bottom: 1rem; }
.service-block .service-sub {
  font-family: var(--font-display); font-style: italic; color: var(--accent);
  font-size: 1.15rem; margin-bottom: 1.2rem;
}
.service-block p { color: var(--text-soft); }
.service-block .btn { margin-top: 1.8rem; }

.illustration { width: 100%; aspect-ratio: 5 / 4; max-height: 55vh; }
.illustration svg { width: 100%; height: 100%; display: block; }
.ill-page { fill: var(--surface); stroke: var(--border); }
.ill-shadow { fill: var(--border); }
.ill-line { stroke: #cbbfb0; stroke-width: 5; stroke-linecap: round; }
.ill-rule { stroke: #ebe3d6; stroke-width: 1; }
.ill-margin { stroke: #d9b9be; stroke-width: 1; }
.ill-ink { fill: none; stroke: var(--accent); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.ill-ink-fill { fill: var(--accent); }
.ill-title { stroke: var(--primary); stroke-width: 7; stroke-linecap: round; }

.areas-strip { text-align: center; }
.areas-strip p.areas {
  font-family: var(--font-display); color: var(--primary);
  font-size: clamp(1.4rem, 3.4vw, 2.2rem); line-height: 1.35;
}
.areas-strip p.areas span { color: var(--accent); }
.areas-strip p.areas-note { color: var(--text-soft); margin-top: 0.8rem; }

/* ---------- About page ---------- */
.about-grid { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: center; }
.about-figure { aspect-ratio: 4 / 3; max-height: 55vh; }
.about-figure img { object-position: 40% 55%; }
.about-text h2 + p { margin-top: 1rem; }
.about-text p { color: var(--text-soft); }
.about-text h2:not(:first-child) { margin-top: 2.2rem; }

.ledger {
  max-width: 60rem; margin-inline: auto;
  border-top: 3px double var(--primary); border-bottom: 3px double var(--primary);
}
.ledger-title { text-align: center; margin-bottom: 2rem; }
.ledger dl { display: grid; }
.ledger .ledger-row { padding: 1.4rem 0.5rem; text-align: center; }
.ledger .ledger-row + .ledger-row { border-top: 1px solid var(--border); }
.ledger dt { font-family: var(--font-display); font-style: italic; color: var(--accent); font-size: 1.1rem; }
.ledger dd { margin-top: 0.4rem; color: var(--text); font-size: 1.1rem; }

/* ---------- Testimonials page ---------- */
.awaiting {
  max-width: 44rem; margin-inline: auto; text-align: center;
  padding: clamp(2rem, 5vw, 3rem) clamp(1.25rem, 5vw, 3rem);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.awaiting p { font-family: var(--font-display); font-size: clamp(1.2rem, 2.6vw, 1.5rem); color: var(--primary); line-height: 1.5; }

/* ---------- Contact page ---------- */
.contact-grid { display: grid; gap: clamp(2.5rem, 5vw, 4rem); align-items: start; }
.contact-form-wrap {
  background-color: var(--surface);
  border: 1px solid var(--border);
  padding: clamp(1.5rem, 4vw, 2.75rem);
}
.contact-form-wrap h2 { margin-bottom: 0.4rem; }
.contact-form-wrap .form-intro { color: var(--text-soft); margin-bottom: 1.6rem; }
.field { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.2rem; }
.field label { font-weight: 600; font-size: 0.98rem; color: var(--text); }
.field .optional { font-weight: 400; color: var(--text-muted); }
.field input, .field textarea {
  width: 100%; font: inherit; font-size: 1rem; line-height: 1.5; color: var(--text);
  background-color: var(--bg); border: 1px solid #bfb2a1; border-radius: 2px;
  padding: 0.75rem 0.9rem;
  transition: border-color 0.2s, background-color 0.2s;
}
.field input:hover, .field textarea:hover { border-color: var(--primary-mid); }
.field input:focus, .field textarea:focus { border-color: var(--accent); background-color: var(--surface); }
.field textarea { min-height: 9rem; resize: vertical; }
.form-error { color: #9b1c1c; font-size: 0.95rem; min-height: 1.5em; margin-bottom: 0.6rem; }
.form-thanks { text-align: center; padding-block: 1.5rem; }
.form-thanks h2 { margin-bottom: 0.4rem; }
.form-thanks .ink-line { margin-bottom: 1rem; }
.form-thanks p { color: var(--text-soft); }

.contact-aside {
  border-top: 3px double var(--primary); border-bottom: 3px double var(--primary);
  padding-block: 1.5rem;
}
.contact-aside h2 { font-size: clamp(1.4rem, 2.6vw, 1.8rem); text-align: center; }
.contact-aside dl > div { padding: 1.1rem 0; text-align: center; }
.contact-aside dl > div + div { border-top: 1px solid var(--border); }
.contact-aside dt { font-family: var(--font-display); font-style: italic; color: var(--accent); }
.contact-aside dd { margin-top: 0.3rem; }

/* ---------- Privacy ---------- */
.prose { max-width: 44rem; margin-inline: auto; }
.prose h2 { font-size: clamp(1.4rem, 2.8vw, 1.85rem); margin-top: 2.4rem; margin-bottom: 0.7rem; }
.prose h2:first-child { margin-top: 0; }
.prose p, .prose li { color: var(--text-soft); }
.prose ul { padding-left: 1.3rem; margin-top: 0.7rem; }
.prose li + li { margin-top: 0.4rem; }

/* ---------- Footer ---------- */
.site-footer {
  background-color: var(--primary-dark); color: var(--on-dark-soft);
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
  text-align: center;
}
.site-footer a { color: var(--on-dark); }
.footer-brand .brand-mark { width: 3rem; height: 3rem; margin: 0 auto 0.8rem; }
.footer-brand .brand-mark circle { stroke: var(--on-dark); }
.footer-brand .brand-mark text { fill: var(--on-dark); }
.footer-brand .brand-mark .mark-nib { fill: var(--accent-mid); }
.footer-name { font-family: var(--font-display); font-size: 1.4rem; color: var(--on-dark); line-height: 1.3; }
.footer-tag { margin-top: 0.3rem; }
.footer-rule { display: block; width: 12rem; height: 1.2rem; margin: 1.6rem auto; }
.footer-rule path { fill: none; stroke: var(--accent-mid); stroke-width: 1.3; stroke-linecap: round; }
.footer-nav ul {
  list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.4rem 1.6rem;
}
.footer-nav a { text-decoration: none; display: inline-block; padding: 0.35rem 0; transition: color 0.2s; }
.footer-nav a:hover, .footer-nav a:focus-visible { color: var(--accent-mid); text-decoration: underline; }
.footer-base {
  margin-top: 2rem; padding-top: 1.4rem; border-top: 1px solid rgba(247, 240, 230, 0.18);
  font-size: 0.9rem; display: flex; flex-direction: column; gap: 0.4rem; align-items: center;
}
.footer-base p + p { margin-top: 0; }
.footer-base a:focus-visible, .footer-nav a:focus-visible { outline-color: var(--accent-mid); }

/* ==========================================================
   Entrance (home): starts at 0.1s, name readable by 1.0s,
   ink drawn by 1.8s, buttons by 1.8s, all done by 2.1s.
   Only runs when scripts are on (.js) and motion is allowed.
   ========================================================== */
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes draw { from { stroke-dashoffset: 1; } to { stroke-dashoffset: 0; } }
@keyframes dot-in { 0% { transform: scale(0); } 70% { transform: scale(1.3); } 100% { transform: scale(1); } }

.js .hero-home .crest        { animation: rise 0.6s ease-out 0.1s both; }
.js .hero-home h1            { animation: rise 0.7s ease-out 0.3s both; }
.js .hero-home .lede         { animation: rise 0.5s ease-out 1.0s both; }
.js .hero-home .hero-actions { animation: rise 0.5s ease-out 1.3s both; }
.js .hero-home .hero-figure  { animation: rise 0.6s ease-out 1.5s both; }

.js .ink-line path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 1s cubic-bezier(0.55, 0.1, 0.3, 1) 0.8s both; }
.js .ink-line .ink-dot { animation: dot-in 0.3s ease-out 1.75s both; }
.js .page-hero .ink-line path { animation-delay: 0.15s; animation-duration: 0.8s; }
.js .page-hero .ink-line .ink-dot { animation-delay: 0.9s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .ink-line path { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
}

/* ==========================================================
   Tablet and up
   ========================================================== */
@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav-links { display: flex; gap: 1.8rem; align-items: center; }
  .nav-links a { padding: 0.4rem 0; position: relative; }
  .nav-links a[aria-current="page"]::after {
    content: ""; position: absolute; left: 0; right: 0; bottom: -0.1rem; height: 0.4rem;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 8' preserveAspectRatio='none'%3E%3Cpath d='M2 5 C 30 2, 60 7, 98 3' fill='none' stroke='%231f4fa8' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
  }
  .brand-mark { width: 2.9rem; height: 2.9rem; }
  .brand-name { font-size: 1.2rem; }

  .hero-figure { aspect-ratio: 21 / 9; max-height: 30rem; }

  .pair { grid-template-columns: 1fr auto 1fr; gap: 0; align-items: stretch; }
  .pair-divider { width: 3rem; height: auto; min-height: 14rem; }
  .pair-divider::before { top: 0; bottom: 0; width: 1px; height: auto; }

  .contact-grid { grid-template-columns: 1.6fr 1fr; }
  .ledger dl { grid-template-columns: repeat(3, 1fr); }
  .ledger .ledger-row + .ledger-row { border-top: 0; border-left: 1px solid var(--border); }
  .footer-base { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 1024px) {
  .service-block { grid-template-columns: 1fr 1fr; }
  .service-block.flip .service-text { order: 2; }
  .about-grid { grid-template-columns: 1fr 1fr; }
  .about-figure { max-height: 34rem; aspect-ratio: 4 / 5; }
  .illustration { max-height: 30rem; }
}

/* ==========================================================
   Mobile navigation: hidden under 768px until the menu button
   adds .is-open. Kept last so nothing above can show the links.
   ========================================================== */
@media (max-width: 767.98px) {
  .site-header .site-nav .nav-links:not(.is-open),
  .site-header.scrolled .site-nav .nav-links:not(.is-open) {
    display: none;
  }
}
