@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/fonts/bricolage-grotesque-latin.woff2") format("woff2");
}

@font-face {
  font-family: "Hanken Grotesk";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/hanken-grotesk-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
}

@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
}

:root {
  --paper: #f1eee7;
  --ink: #17140f;
  --accent: #2c4a45;
  --accent-light: #3f6960;
  --petrol: #0f2e2b;
  --muted: #6f6a60;
  --line: #d8d2c7;
  --highlight: #b4664a;
  --white: #fff;
  --radius: 20px;
  --font-heading: "Bricolage Grotesque", Arial, sans-serif;
  --font-body: "Hanken Grotesk", Arial, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, monospace;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { min-width: 320px; margin: 0; background: var(--paper); color: var(--ink); }
a { color: inherit; }
p, h1, h2, h3 { text-wrap: pretty; }

.frame { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.skip-link { position: fixed; top: -100px; left: 16px; z-index: 100; padding: 10px 14px; border-radius: 8px; color: var(--paper); background: var(--ink); }
.skip-link:focus { top: 16px; }

.tools-header { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 1.02rem; font-weight: 650; letter-spacing: -0.02em; text-decoration: none; }
.brand svg { width: 25px; height: 25px; color: var(--accent); overflow: visible; }
.brand svg circle, .brand svg line { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; }
.brand svg .brand-fill { fill: currentColor; stroke: none; }
.portfolio-link { font-size: 0.82rem; text-decoration-thickness: 1px; text-underline-offset: 4px; }

.tools-hero { position: relative; overflow: hidden; color: var(--paper); background-color: var(--petrol); background-image: radial-gradient(115% 95% at 8% 0%, rgba(96, 148, 137, 0.45), rgba(15, 46, 43, 0) 60%), radial-gradient(95% 85% at 100% 100%, rgba(28, 90, 83, 0.75), rgba(15, 46, 43, 0) 58%), linear-gradient(180deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0) 20%, rgba(0, 0, 0, 0.22)); }
.hero-grid { min-height: 610px; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(270px, 0.6fr); gap: 72px; align-items: end; padding-top: 80px; padding-bottom: 72px; }
.eyebrow { margin: 0 0 16px; color: var(--accent-light); font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; }
.tools-hero .eyebrow { color: rgba(241, 238, 231, 0.58); }
h1, h2, h3 { margin: 0; font-family: var(--font-heading); font-weight: 600; letter-spacing: -0.025em; }
h1 { max-width: 850px; font-size: clamp(3.7rem, 8.2vw, 7.4rem); line-height: 0.91; }
.hero-copy { max-width: 650px; margin: 32px 0 0; color: rgba(241, 238, 231, 0.74); font-size: clamp(1.05rem, 1.7vw, 1.3rem); line-height: 1.55; }
.value-path { display: grid; gap: 14px; padding: 24px 0 4px; border-top: 1px solid rgba(241, 238, 231, 0.22); }
.value-path span, .value-path strong { font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.value-path span { color: rgba(241, 238, 231, 0.53); }
.value-path strong { color: var(--paper); }
.value-path i { width: 1px; height: 18px; margin-left: 4px; background: rgba(241, 238, 231, 0.24); }

.tools-section { padding-top: 100px; padding-bottom: 112px; }
.section-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 0.62fr); gap: 70px; align-items: end; margin-bottom: 46px; }
.section-heading h2 { max-width: 690px; font-size: clamp(2.5rem, 5vw, 4.7rem); line-height: 0.98; }
.section-heading > p { margin: 0; color: var(--muted); line-height: 1.65; }

.tool-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.tool-card { min-height: 650px; display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.64); transition: transform 180ms ease, box-shadow 180ms ease; }
.tool-card:hover { transform: translateY(-3px); box-shadow: 0 24px 60px rgba(23, 20, 15, 0.08); }
.card-topline { min-height: 68px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 0 26px; border-bottom: 1px solid var(--line); }
.card-index { color: var(--muted); font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.1em; }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 999px; font-family: var(--font-mono); font-size: 0.6rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; }
.status-soon { color: #79573f; background: #efe3d8; }
.status-live { color: var(--accent); background: #dfe9e5; }
.status-live i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-light); }
.tool-visual { height: 235px; position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }

.portfolio-visual { background: linear-gradient(rgba(44, 74, 69, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(44, 74, 69, 0.055) 1px, transparent 1px), #e8e5dd; background-size: 34px 34px; }
.portfolio-axis { position: absolute; inset: 20px; border-left: 1px solid rgba(44, 74, 69, 0.34); border-bottom: 1px solid rgba(44, 74, 69, 0.34); }
.portfolio-item { position: absolute; z-index: 1; width: 118px; padding: 11px; border: 1px solid rgba(44, 74, 69, 0.23); border-radius: 10px; background: rgba(255, 255, 255, 0.88); box-shadow: 0 10px 25px rgba(23, 20, 15, 0.08); }
.portfolio-item span, .portfolio-item b { display: block; height: 5px; border-radius: 4px; background: var(--accent); }
.portfolio-item span { width: 62%; margin-bottom: 8px; }
.portfolio-item b { width: 88%; opacity: 0.18; }
.item-one { left: 14%; bottom: 18%; }
.item-two { left: 44%; bottom: 48%; }
.item-three { right: 7%; top: 14%; }
.item-three span { background: var(--highlight); }

.chapter-visual { display: grid; grid-template-columns: repeat(6, 1fr); align-content: center; gap: 4px; padding: 30px 25px 14px; color: rgba(241, 238, 231, 0.55); background-color: var(--petrol); background-image: radial-gradient(90% 100% at 100% 100%, rgba(63, 105, 96, 0.72), transparent 62%); }
.chapter-line { position: absolute; top: 49%; right: 42px; left: 42px; height: 1px; background: rgba(241, 238, 231, 0.28); }
.chapter-visual span { position: relative; padding-top: 48px; font-family: var(--font-mono); font-size: 0.52rem; letter-spacing: 0.04em; text-align: center; text-transform: uppercase; }
.chapter-visual span::before { position: absolute; top: 29px; left: 50%; width: 12px; height: 12px; border: 2px solid rgba(241, 238, 231, 0.72); border-radius: 50%; background: var(--petrol); content: ""; transform: translateX(-50%); }
.chapter-visual span:last-child::before { border-color: var(--paper); background: var(--paper); }

.card-copy { padding: 32px 30px 24px; }
.card-copy .eyebrow { margin-bottom: 11px; }
.card-copy h3 { font-size: clamp(2rem, 3.5vw, 3.15rem); line-height: 1; }
.card-copy > p:last-child { margin: 19px 0 0; color: var(--muted); line-height: 1.62; }
.card-link { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: auto; padding: 0 30px; border-top: 1px solid var(--line); color: var(--accent); font-size: 0.86rem; font-weight: 650; text-decoration: none; transition: color 160ms, background 160ms; }
.card-link:hover { color: var(--paper); background: var(--accent); }

.principle-band { color: var(--paper); background-color: var(--petrol); background-image: radial-gradient(80% 140% at 50% 0%, rgba(96, 148, 137, 0.32), transparent 62%), radial-gradient(70% 120% at 100% 100%, rgba(28, 90, 83, 0.6), transparent 60%); }
.principle-grid { min-height: 390px; display: grid; grid-template-columns: 110px minmax(0, 1.15fr) minmax(260px, 0.6fr); gap: 56px; align-items: center; }
.principle-grid svg { width: 96px; color: rgba(241, 238, 231, 0.45); }
.principle-grid svg line, .principle-grid svg circle { fill: none; stroke: currentColor; stroke-width: 2.5; }
.principle-grid svg .principle-fill { fill: currentColor; stroke: none; }
.principle-grid h2 { max-width: 660px; font-size: clamp(2.25rem, 4.2vw, 4rem); line-height: 1; }
.principle-grid p { margin: 0; color: rgba(241, 238, 231, 0.68); line-height: 1.65; }
.tools-footer { min-height: 120px; display: flex; align-items: center; justify-content: space-between; gap: 28px; color: var(--muted); font-size: 0.75rem; }
.tools-footer a { color: var(--ink); text-underline-offset: 4px; }

.preview-main { min-height: calc(100vh - 80px); display: grid; grid-template-columns: minmax(0, 0.72fr) minmax(420px, 1.28fr); gap: 70px; align-items: center; padding-top: 72px; padding-bottom: 82px; }
.preview-copy h1 { color: var(--ink); font-size: clamp(3.8rem, 7vw, 6.8rem); }
.preview-copy > p:last-of-type { max-width: 560px; margin: 28px 0 0; color: var(--muted); font-size: 1.08rem; line-height: 1.65; }
.primary-link { min-height: 48px; display: inline-flex; align-items: center; gap: 24px; margin-top: 34px; padding: 0 20px; border-radius: 999px; color: var(--paper); background: var(--accent); font-size: 0.82rem; font-weight: 650; text-decoration: none; }
.preview-board { padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255, 255, 255, 0.58); box-shadow: 0 24px 70px rgba(23, 20, 15, 0.09); }
.board-heading { display: flex; align-items: center; justify-content: space-between; padding-bottom: 20px; color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.65rem; letter-spacing: 0.08em; text-transform: uppercase; }
.board-heading strong { color: var(--accent); }
.board-canvas { position: relative; min-height: 470px; overflow: hidden; border-left: 1px solid rgba(44, 74, 69, 0.36); border-bottom: 1px solid rgba(44, 74, 69, 0.36); background: linear-gradient(rgba(44, 74, 69, 0.055) 1px, transparent 1px), linear-gradient(90deg, rgba(44, 74, 69, 0.055) 1px, transparent 1px); background-size: 42px 42px; }
.axis-label { position: absolute; z-index: 2; color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.55rem; letter-spacing: 0.08em; text-transform: uppercase; }
.axis-value { top: 10px; left: 12px; }
.axis-ready { right: 10px; bottom: 10px; }
.board-card { position: absolute; width: min(210px, 43%); display: grid; gap: 7px; padding: 17px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, 0.94); box-shadow: 0 12px 28px rgba(23, 20, 15, 0.1); }
.board-card span, .board-card small { color: var(--muted); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 0.56rem; text-transform: uppercase; }
.board-card strong { font-size: 0.82rem; }
.card-a { right: 8%; top: 16%; }
.card-b { left: 30%; bottom: 26%; }
.card-c { left: 7%; bottom: 8%; }

@media (max-width: 880px) {
  .hero-grid, .section-heading, .principle-grid, .preview-main { grid-template-columns: 1fr; }
  .hero-grid { min-height: 650px; gap: 50px; align-content: end; }
  .value-path { max-width: 430px; grid-template-columns: repeat(7, auto); align-items: center; gap: 10px; }
  .value-path i { width: 18px; height: 1px; margin: 0; }
  .tool-grid { grid-template-columns: 1fr; }
  .tool-card { min-height: 600px; }
  .principle-grid { min-height: 470px; align-content: center; gap: 28px; }
  .preview-main { align-content: center; }
}

@media (max-width: 560px) {
  .frame { width: min(100% - 24px, 1180px); }
  .tools-header { min-height: 68px; }
  .portfolio-link { font-size: 0.72rem; }
  .tools-hero { width: 100%; }
  .hero-grid { min-height: 590px; padding-top: 56px; padding-bottom: 48px; }
  h1 { font-size: clamp(3.4rem, 18vw, 5.5rem); }
  .value-path { grid-template-columns: 1fr; gap: 8px; }
  .value-path i { width: 1px; height: 10px; margin-left: 4px; }
  .tools-section { padding-top: 72px; padding-bottom: 80px; }
  .section-heading { gap: 22px; }
  .tool-card { min-height: 0; }
  .tool-visual { height: 195px; }
  .chapter-visual { padding-inline: 10px; }
  .chapter-visual span { font-size: 0.42rem; }
  .card-copy { padding: 28px 22px 22px; }
  .card-link, .card-topline { padding-inline: 22px; }
  .principle-grid { padding-top: 70px; padding-bottom: 70px; }
  .tools-footer { align-items: flex-start; flex-direction: column; justify-content: center; padding: 24px 0; }
  .preview-main { padding-top: 55px; }
  .preview-board { padding: 14px; }
  .board-canvas { min-height: 400px; }
  .board-card { width: 52%; padding: 12px; }
}

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