/* Folded Futures. Layout idea: one printed world map, folded like an atlas sheet, carries the hero; everything else is quiet, left-aligned type on porcelain paper. */

@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Serif";
  src: url("../fonts/instrument-serif-latin-400-italic.woff2") format("woff2");
  font-weight: 400; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-500-normal.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("../fonts/instrument-sans-latin-600-normal.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --paper: #EDEFEC;
  --sheet: #FAFAF6;
  --sheet-shade: #D5D9D3;
  --ink: #111A2C;
  --ink-2: #4A5367;
  --rule: #D2D6D1;
  --accent: #2A46C2;
  --accent-tint: #DCE2F7;
  --brass: #A2742B;
  --map-dot: rgba(17, 26, 44, 0.62);
  --map-shadow: rgba(17, 26, 44, 0.18);
  --crease: rgba(17, 26, 44, 0.035);
  --map-ridge: rgba(255, 255, 255, 0.95);
  --map-valley: rgba(17, 26, 44, 0.12);
  --map-edge: rgba(17, 26, 44, 0.07);
  --band-bg: #111A2C;
  --band-fg: #EDEFEC;
  --band-muted: #A9B1C2;
  --band-accent: #AFBDFF;

  --f-display: "Instrument Serif", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --f-body: "Instrument Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;

  --gutter: clamp(16px, 4vw, 40px);
  --radius: 22px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0D121D;
    --sheet: #1A2232;
    --sheet-shade: #101725;
    --ink: #E7EBF3;
    --ink-2: #A4ADBF;
    --rule: #263049;
    --accent: #9AAEFF;
    --accent-tint: #222C55;
    --brass: #D8B06A;
    --map-dot: rgba(231, 235, 243, 0.72);
    --map-shadow: rgba(0, 0, 0, 0.5);
    --crease: rgba(0, 0, 0, 0.22);
    --map-ridge: rgba(255, 255, 255, 0.10);
    --map-valley: rgba(0, 0, 0, 0.45);
    --map-edge: rgba(255, 255, 255, 0.06);
    --band-bg: #151C2B;
    --band-fg: #E7EBF3;
    --band-muted: #A4ADBF;
    --band-accent: #9AAEFF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0D121D;
  --sheet: #1A2232;
  --sheet-shade: #101725;
  --ink: #E7EBF3;
  --ink-2: #A4ADBF;
  --rule: #263049;
  --accent: #9AAEFF;
  --accent-tint: #222C55;
  --brass: #D8B06A;
  --map-dot: rgba(231, 235, 243, 0.72);
  --map-shadow: rgba(0, 0, 0, 0.5);
  --crease: rgba(0, 0, 0, 0.22);
  --map-ridge: rgba(255, 255, 255, 0.10);
  --map-valley: rgba(0, 0, 0, 0.45);
  --map-edge: rgba(255, 255, 255, 0.06);
  --band-bg: #151C2B;
  --band-fg: #E7EBF3;
  --band-muted: #A4ADBF;
  --band-accent: #9AAEFF;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--f-display); font-weight: 400; text-wrap: balance; color: var(--ink); }
a { color: inherit; }
img, svg, canvas { display: block; max-width: 100%; }
::selection { background: var(--accent-tint); color: var(--ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(100% - 2 * var(--gutter), 74rem); margin-inline: auto; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: var(--gutter); top: -4rem; z-index: 10;
  background: var(--ink); color: var(--paper); padding: 0.6rem 1rem; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 1rem; }

/* Header */
.site-header { padding-block: 1.4rem; }
.header-row { display: flex; align-items: center; gap: 2rem; }
.brand { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; margin-right: auto; }
.brand-mark { flex: none; }
.mark-a { fill: var(--ink); }
.mark-b { fill: var(--accent); }
.mark-c { fill: var(--ink); opacity: 0.55; }
.brand-name { font-family: var(--f-display); font-size: 1.55rem; line-height: 1; letter-spacing: 0.005em; }
.site-nav { display: flex; gap: 1.75rem; }
.site-nav a { text-decoration: none; color: var(--ink-2); font-size: 0.98rem; font-weight: 500; padding-block: 0.25rem; }
.site-nav a:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 2.9rem; padding: 0.7rem 1.3rem;
  border-radius: 8px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper);
  font: 500 1rem/1.2 var(--f-body); text-decoration: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn-quiet:hover { background: transparent; color: var(--accent); border-color: var(--accent); }
.btn-small { min-height: 2.5rem; padding: 0.5rem 1rem; font-size: 0.95rem; }

/* Hero */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  padding-block: clamp(2rem, 5vw, 4.5rem) clamp(3.5rem, 7vw, 6.5rem);
}
.hero h1 {
  font-size: clamp(2.9rem, 1.2rem + 4.2vw, 4.75rem);
  line-height: 0.98;
  letter-spacing: -0.012em;
}
.hero h1 em { font-style: italic; color: var(--accent); }
.lead {
  margin-top: 1.6rem;
  max-width: 34ch;
  font-size: clamp(1.125rem, 1rem + 0.45vw, 1.32rem);
  line-height: 1.5;
  color: var(--ink-2);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 2.2rem; }
.hero-note { margin-top: 1.4rem; font-size: 0.95rem; color: var(--ink-2); }
.hero-map { position: relative; aspect-ratio: 1.24 / 1; margin-right: calc(-0.5 * var(--gutter)); }
.hero-map canvas { width: 100%; height: 100%; }

/* Sections */
.section { padding-block: clamp(4rem, 8vw, 7.5rem); }
.section > h2 { font-size: clamp(2.3rem, 1.6rem + 2.4vw, 3.6rem); line-height: 1.02; margin-bottom: clamp(1.75rem, 3vw, 2.75rem); }
[id] { scroll-margin-top: 1.5rem; }

/* Services */
.lead-services { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1rem, 2vw, 1.5rem); }
.lead-service {
  display: grid; align-content: start; gap: 1rem;
  padding: clamp(1.75rem, 3.5vw, 2.75rem);
  border-radius: var(--radius);
  background:
    linear-gradient(101deg, transparent 0 57%, var(--crease) 57.2% 70%, transparent 86%),
    var(--sheet);
}
.lead-service h3 { font-size: clamp(2rem, 1.4rem + 1.8vw, 2.8rem); line-height: 1; }
.lead-service > p { color: var(--ink-2); font-size: 1.08rem; max-width: 42ch; }
.deliverables { display: grid; gap: 0.85rem; margin-top: 0.5rem; }
.deliverables li { display: grid; grid-template-columns: 1.6rem 1fr; align-items: baseline; font-weight: 500; }
.deliverables li::before {
  content: ""; width: 0.95rem; height: 2px; background: var(--accent);
  transform: translateY(-0.3em);
}
.sub-head { margin-top: clamp(3rem, 6vw, 4.5rem); font-size: clamp(1.6rem, 1.3rem + 1vw, 2.1rem); line-height: 1.1; }
.practice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 1.25rem;
  border-top: 1px solid var(--rule);
}
.practice-grid article { padding: 1.4rem 1.6rem 0.5rem 0; }
.practice-grid article + article { padding-left: 1.6rem; border-left: 1px solid var(--rule); }
.practice-grid h4 { margin: 0; font-family: var(--f-display); font-weight: 400; font-size: 1.45rem; line-height: 1.12; color: var(--ink); }
.practice-grid p { margin-top: 0.55rem; color: var(--ink-2); font-size: 0.98rem; }

/* Approach */
.approach {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}
.steps { border-bottom: 1px solid var(--rule); }
.step {
  display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.25rem; align-items: baseline;
  width: 100%; padding: 1.15rem 0; margin: 0;
  background: none; border: 0; border-top: 1px solid var(--rule);
  font: inherit; color: inherit; text-align: left; cursor: pointer;
}
.step-num { font-family: var(--f-display); font-size: 1.9rem; line-height: 1; color: var(--ink-2); transition: color 0.2s; }
.step-text { display: grid; gap: 0.2rem; }
.step-title { font-weight: 600; font-size: 1.08rem; }
.step-desc { color: var(--ink-2); font-size: 0.98rem; }
.step:hover .step-title { color: var(--accent); }
.step[aria-pressed="true"] .step-num { color: var(--accent); font-style: italic; }
.step[aria-pressed="true"] .step-title { color: var(--accent); }

.sort-figure { padding: clamp(1rem, 3vw, 1.75rem); border-radius: var(--radius); background: var(--sheet); }
.fan { width: 100%; height: auto; overflow: visible; }
.fan-axis { stroke: var(--rule); stroke-width: 1; }
.fan-now { stroke: var(--ink-2); stroke-width: 1; stroke-dasharray: 3 4; opacity: 0.7; }
.fan-note { font-family: var(--f-body); font-size: 15px; font-weight: 500; fill: var(--ink-2); text-anchor: middle; }
.fan-note.end { text-anchor: end; }
.fan-q {
  font-family: var(--f-display); font-style: italic; font-size: 72px;
  fill: var(--ink-2); text-anchor: middle; opacity: 0; transition: opacity 0.4s;
}
.fan[data-state="1"] .fan-q { opacity: 0.45; }
.history { fill: none; stroke: var(--ink); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.fan-dots circle { fill: var(--ink); stroke: var(--sheet); stroke-width: 1.5; opacity: 0; transition: opacity 0.4s; }
.fan[data-state="2"] .fan-dots circle,
.fan[data-state="3"] .fan-dots circle,
.fan[data-state="4"] .fan-dots circle { opacity: 1; }
.fan-bands {
  opacity: 0; transform: scaleX(0.02);
  transform-box: view-box; transform-origin: 250px 170px;
  transition: transform 0.8s var(--ease), opacity 0.5s;
}
.fan[data-state="3"] .fan-bands { opacity: 1; transform: none; }
.fan[data-state="4"] .fan-bands { opacity: 0.4; transform: none; }
.band-outer { fill: var(--accent-tint); }
.band-inner { fill: var(--accent); opacity: 0.22; }
.central { fill: none; stroke: var(--accent); stroke-width: 2; stroke-dasharray: 5 5; }
.fan-labels { opacity: 0; transition: opacity 0.4s; }
.fan[data-state="3"] .fan-labels { opacity: 1; }
.fan-chosen { opacity: 0; transition: opacity 0.3s; }
.fan[data-state="4"] .fan-chosen { opacity: 1; }
.chosen {
  fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round;
  stroke-dasharray: 260; stroke-dashoffset: 260;
  transition: stroke-dashoffset 0.9s var(--ease) 0.1s;
}
.fan[data-state="4"] .chosen { stroke-dashoffset: 0; }
.fan-chosen circle { fill: var(--sheet); stroke: var(--accent); stroke-width: 2; }
.fan.no-anim, .fan.no-anim * { transition: none !important; }

/* About */
.about {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(1.5rem, 5vw, 4.5rem);
  align-items: start;
}
.person { font-family: var(--f-display); font-size: clamp(2.3rem, 1.7rem + 2vw, 3.4rem); line-height: 1; }
.role { margin-top: 0.6rem; color: var(--ink-2); }
.about-body > p { max-width: 58ch; font-size: 1.12rem; line-height: 1.62; }
.credentials { margin-top: 2rem; border-bottom: 1px solid var(--rule); }
.credentials li { padding: 0.85rem 0; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 0.98rem; }

/* Contact */
.contact { background: var(--band-bg); color: var(--band-fg); padding-block: clamp(4.5rem, 9vw, 7.5rem); }
.contact-inner { display: grid; gap: 1.2rem; justify-items: start; }
.contact h2 { color: var(--band-fg); font-size: clamp(2.6rem, 1.7rem + 3.4vw, 4.8rem); line-height: 1; }
.contact p { color: var(--band-muted); max-width: 46ch; font-size: 1.12rem; }
.contact-email {
  margin-top: 0.6rem;
  font-family: var(--f-display); font-size: clamp(1.8rem, 1.3rem + 2vw, 2.9rem); line-height: 1.1;
  color: var(--band-fg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 0.16em;
  overflow-wrap: anywhere;
}
.contact-email:hover { color: var(--band-accent); }
.contact .contact-note { font-size: 0.95rem; }

/* Footer */
.site-footer { padding-block: 1.75rem; font-size: 0.92rem; color: var(--ink-2); }
.footer-row { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.site-footer a { color: var(--ink-2); text-underline-offset: 0.2em; }
.site-footer a:hover { color: var(--ink); }

/* Responsive */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; }
  .hero-map { margin-right: 0; aspect-ratio: 1.45 / 1; }
  .approach, .about { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  .lead-services { grid-template-columns: 1fr; }
  .practice-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 0; }
  .practice-grid article, .practice-grid article + article { padding: 1.3rem 1.6rem 1.3rem 0; border-left: 0; border-top: 1px solid var(--rule); }
  .practice-grid article:nth-child(2n) { padding-left: 1.6rem; border-left: 1px solid var(--rule); }
}
@media (max-width: 640px) {
  .site-nav { display: none; }
  .practice-grid { grid-template-columns: 1fr; }
  .practice-grid article:nth-child(2n) { padding-left: 0; border-left: 0; }
  .practice-grid article, .practice-grid article + article { padding-right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; transition-delay: 0s !important; animation: none !important; }
}

/* Not found page */
.notfound { min-height: 70vh; display: grid; align-content: center; gap: 0; padding-block: 4rem; }
.notfound h1 { font-size: clamp(2.6rem, 1.6rem + 4vw, 4.5rem); line-height: 1; }
