:root {
  color-scheme: light dark;
  --paper: #f3f0e8;
  --paper-deep: #e8e3d8;
  --ink: #171918;
  --muted: #5d615d;
  --line: rgba(23, 25, 24, 0.17);
  --accent: #d9572b;
  --accent-ink: #fff9f4;
  --surface: rgba(255, 255, 255, 0.54);
  --shadow: rgba(70, 50, 34, 0.14);
  --radius: 18px;
  --max: 1380px;
  font-family: "Avenir Next", Avenir, "Segoe UI", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.55; }
a { color: inherit; }
img { display: block; max-width: 100%; }
button, a { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }

.skip-link { position: fixed; top: 10px; left: 10px; z-index: 10; transform: translateY(-150%); background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 8px; }
.skip-link:focus { transform: translateY(0); }

.site-header { width: min(calc(100% - 40px), var(--max)); height: 72px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.brand { display: inline-flex; align-items: center; gap: 11px; font-weight: 700; letter-spacing: -0.03em; text-decoration: none; }
.brand-mark { width: 26px; height: 26px; border: 2px solid currentColor; border-radius: 50%; display: inline-grid; place-items: center; transform: rotate(-18deg); }
.brand-mark > span { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; transform: translate(4px, -3px); }
.brand-mark-large { width: 58px; height: 58px; border-width: 3px; }
.brand-mark-large > span { width: 16px; height: 16px; transform: translate(9px, -6px); }
.site-nav { display: flex; align-items: center; gap: 30px; }
.site-nav a { color: var(--muted); text-decoration: none; font-size: 0.94rem; }
.site-nav a:hover { color: var(--ink); }
.site-nav .nav-cta { color: var(--accent-ink); background: var(--ink); padding: 10px 16px; border-radius: 999px; }
.menu-button { display: none; border: 1px solid var(--line); background: transparent; color: inherit; border-radius: 999px; padding: 9px 14px; font: inherit; }

.hero { width: min(calc(100% - 40px), var(--max)); min-height: calc(100dvh - 72px); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(32px, 6vw, 96px); align-items: center; padding: 54px 0; }
.hero-copy { max-width: 650px; }
.eyebrow { margin: 0 0 22px; color: var(--accent); font-size: 0.76rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 28px; font-size: clamp(3.2rem, 6.4vw, 6.9rem); line-height: 0.91; letter-spacing: -0.072em; font-weight: 650; }
.hero-lede { color: var(--muted); max-width: 520px; font-size: clamp(1.1rem, 1.6vw, 1.35rem); line-height: 1.45; }
.hero-actions { display: flex; align-items: center; gap: 26px; margin-top: 38px; }
.button { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 999px; text-decoration: none; font-weight: 700; white-space: nowrap; transition: transform 180ms ease, background-color 180ms ease; }
.button:active { transform: translateY(1px) scale(0.99); }
.button-primary { background: var(--accent); color: var(--accent-ink); }
.button-primary:hover { background: #ba4622; }
.text-link { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.hero-visual { margin: 0; border-radius: var(--radius); overflow: hidden; min-height: 64vh; box-shadow: 0 30px 90px var(--shadow); }
.hero-visual img { width: 100%; height: 100%; min-height: 64vh; object-fit: cover; object-position: 58% center; }

.context-strip { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 36px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1.35fr; align-items: center; gap: 30px; }
.context-strip p { margin: 0; max-width: 470px; font-weight: 600; }
.context-items { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.context-items span { padding: 8px 12px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 0.87rem; }

.section { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: clamp(90px, 12vw, 170px) 0; }
.problem-intro, .section-heading { max-width: 780px; margin-bottom: clamp(52px, 7vw, 90px); }
h2 { font-size: clamp(2.4rem, 5vw, 5.2rem); line-height: 0.98; letter-spacing: -0.058em; font-weight: 640; margin-bottom: 24px; }
.problem-intro p, .section-heading p { color: var(--muted); max-width: 620px; font-size: 1.1rem; }
.evidence-map { display: grid; grid-template-columns: 1fr 1.15fr 1fr; min-height: 430px; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.evidence-sources, .evidence-output { padding: 34px; display: flex; flex-direction: column; justify-content: center; gap: 14px; }
.evidence-sources span, .evidence-output span { padding: 14px 16px; border-bottom: 1px solid var(--line); color: var(--muted); }
.evidence-output strong { font-size: 1.55rem; margin-bottom: 14px; }
.evidence-core { background: var(--ink); color: var(--paper); display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 40px; gap: 20px; }
.evidence-core strong { max-width: 300px; font-size: clamp(1.6rem, 3vw, 2.7rem); line-height: 1.04; letter-spacing: -0.04em; }
.evidence-core small { color: rgba(243, 240, 232, 0.66); }

.capabilities { border-top: 1px solid var(--line); }
.capability-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; gap: 16px; }
.capability { min-height: 420px; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(28px, 4vw, 48px); display: flex; flex-direction: column; justify-content: space-between; overflow: hidden; background: var(--surface); }
.capability h3 { font-size: clamp(1.7rem, 3vw, 3rem); line-height: 1; letter-spacing: -0.045em; margin-bottom: 18px; }
.capability p { color: var(--muted); max-width: 520px; }
.capability-wide { grid-column: 1 / -1; min-height: 360px; display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 50px; align-items: center; }
.capability-dark { background: var(--ink); color: var(--paper); }
.capability-dark p { color: rgba(243, 240, 232, 0.68); }
.capability-orange { background: var(--accent); color: var(--accent-ink); border-color: transparent; }
.capability-orange p { color: rgba(255, 249, 244, 0.78); }
.document-stack { display: grid; gap: 12px; transform: rotate(-2deg); }
.document-stack span { background: var(--paper); border: 1px solid var(--line); box-shadow: 0 8px 24px var(--shadow); border-radius: 10px; padding: 19px 20px; font-size: 0.88rem; }
.document-stack span:nth-child(2) { transform: translateX(7%); }
.document-stack span:nth-child(3) { transform: translateX(14%); }
.impact-ring { width: 190px; height: 190px; border: 1px solid rgba(243, 240, 232, 0.32); border-radius: 50%; display: grid; place-items: center; margin: 20px auto 0; box-shadow: inset 0 0 0 25px rgba(243, 240, 232, 0.06), inset 0 0 0 50px rgba(243, 240, 232, 0.04); }
.impact-ring span { font-size: 0.75rem; letter-spacing: 0.12em; text-transform: uppercase; }
.decision-lines { display: grid; gap: 16px; margin-top: 40px; }
.decision-lines span { display: block; height: 10px; background: rgba(255,255,255,0.78); border-radius: 999px; }
.decision-lines span:nth-child(2) { width: 78%; }.decision-lines span:nth-child(3) { width: 55%; }
.revision-track { display: flex; align-items: center; gap: 14px; margin-top: 40px; }
.revision-track span { width: 48px; height: 48px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-weight: 700; }
.revision-track i { flex: 1; height: 1px; background: var(--line); }

.claude { width: 100%; max-width: none; padding-left: max(20px, calc((100vw - var(--max)) / 2)); padding-right: max(20px, calc((100vw - var(--max)) / 2)); background: var(--paper-deep); }
.claude-panel { max-width: 990px; }
.claude-panel > p:not(.eyebrow) { font-size: clamp(1.15rem, 2vw, 1.45rem); max-width: 740px; color: var(--muted); }
.claude-notes { margin-top: 54px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.claude-notes span { padding: 18px 0; border-top: 1px solid var(--line); font-weight: 650; }

.principle-list { display: grid; grid-template-columns: 0.8fr 1.2fr 1fr; gap: 16px; align-items: start; }
.principle-list article { padding: 30px 0; border-top: 1px solid var(--line); }
.principle-list article:nth-child(2) { margin-top: 80px; }
.principle-list article:nth-child(3) { margin-top: 30px; }
.principle-list span { color: var(--accent); font-size: 0.78rem; font-weight: 700; }
.principle-list h3 { font-size: clamp(1.55rem, 2.5vw, 2.5rem); line-height: 1.05; letter-spacing: -0.04em; margin: 22px 0 16px; }
.principle-list p { color: var(--muted); }

.contact { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1.3fr 0.7fr; gap: 70px; align-items: end; }
.contact h2 { margin-bottom: 0; }
.contact-copy p { color: var(--muted); max-width: 650px; margin-top: 26px; }
.contact-action { display: flex; flex-direction: column; align-items: flex-start; gap: 18px; }
.contact-action p { color: var(--muted); font-size: 0.84rem; max-width: 330px; }

.site-footer { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; padding: 38px 0 50px; border-top: 1px solid var(--line); display: grid; grid-template-columns: 0.7fr 1.5fr auto; align-items: center; gap: 28px; color: var(--muted); font-size: 0.88rem; }
.site-footer p { margin: 0; }
.footer-links { display: flex; gap: 20px; }
.copyright { grid-column: 1 / -1; font-size: 0.76rem; }

.legal-page { width: min(calc(100% - 40px), 850px); margin: 0 auto; padding: 100px 0 140px; }
.legal-page h1 { font-size: clamp(2.9rem, 7vw, 5.7rem); }
.legal-page section { padding: 30px 0; border-top: 1px solid var(--line); }
.legal-page h2 { font-size: 1.8rem; letter-spacing: -0.03em; }
.legal-page p { color: var(--muted); max-width: 70ch; }
.legal-updated { margin-bottom: 70px; }

.reveal { opacity: 0; transform: translateY(22px); transition: opacity 680ms cubic-bezier(0.16,1,0.3,1), transform 680ms cubic-bezier(0.16,1,0.3,1); }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-color-scheme: dark) {
  :root { --paper: #1b1d1c; --paper-deep: #222523; --ink: #f0eee8; --muted: #b4b7b2; --line: rgba(240,238,232,0.16); --surface: rgba(255,255,255,0.035); --shadow: rgba(0,0,0,0.28); --accent: #e6683c; --accent-ink: #171918; }
  .hero-visual img { filter: brightness(0.82) saturate(0.82); }
  .document-stack span { background: #292c2a; }
  .site-nav .nav-cta { background: var(--ink); color: var(--paper); }
}

@media (max-width: 900px) {
  .menu-button { display: inline-flex; }
  .site-nav { display: none; position: absolute; top: 62px; left: 0; right: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 16px; flex-direction: column; align-items: stretch; gap: 2px; box-shadow: 0 18px 50px var(--shadow); }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px; }
  .site-nav .nav-cta { text-align: center; margin-top: 6px; }
  .hero { grid-template-columns: 1fr; min-height: auto; padding-top: 70px; }
  .hero-copy { max-width: 760px; }
  h1 { max-width: 760px; }
  .hero-visual, .hero-visual img { min-height: 480px; }
  .context-strip { grid-template-columns: 1fr; }
  .context-items { justify-content: flex-start; }
  .evidence-map { grid-template-columns: 1fr; }
  .evidence-core { min-height: 320px; }
  .capability-grid, .capability-wide { grid-template-columns: 1fr; }
  .capability-wide { grid-column: auto; }
  .claude-notes { grid-template-columns: 1fr 1fr; }
  .principle-list { grid-template-columns: 1fr; }
  .principle-list article:nth-child(2), .principle-list article:nth-child(3) { margin-top: 0; }
  .contact { grid-template-columns: 1fr; align-items: start; }
  .site-footer { grid-template-columns: 1fr 1fr; }
  .site-footer > p:nth-child(2) { grid-column: 1 / -1; }
}

@media (max-width: 560px) {
  .site-header, .hero, .context-strip, .section, .site-footer { width: min(calc(100% - 28px), var(--max)); }
  .hero { padding-top: 48px; gap: 38px; }
  h1 { font-size: clamp(3.1rem, 15vw, 4.6rem); }
  .hero-actions { flex-direction: column; align-items: flex-start; }
  .hero-visual, .hero-visual img { min-height: 360px; }
  .hero-visual img { object-position: 62% center; }
  .context-items { display: grid; grid-template-columns: 1fr 1fr; }
  .context-items span { text-align: center; }
  .capability { min-height: 360px; }
  .claude-notes { grid-template-columns: 1fr; }
  .contact { gap: 38px; }
  .site-footer { grid-template-columns: 1fr; align-items: start; }
  .site-footer > p:nth-child(2), .copyright { grid-column: auto; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
}
