@font-face { font-family: "Instrument Sans"; src: url("assets/fonts/instrument-sans-variable.woff2") format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Pixelify Sans"; src: url("assets/fonts/pixelify-sans.woff2") format("woff2"); font-weight: 500 600; font-style: normal; font-display: swap; }
:root { --paper: #f6ead0; --ink: #0b0c0b; --blue: #223acb; --coral: #f35b45; --rule: #77796c; --accent: #f29a56; --rail: clamp(112px, 9.67vw, 156px); font-family: "Instrument Sans", sans-serif; color-scheme: light; scroll-behavior: smooth; scrollbar-color: var(--blue) var(--paper); }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); font-size: 18px; line-height: 1.5; }
::selection { color: var(--paper); background: var(--blue); }
a { color: inherit; text-underline-offset: .2em; }
button, summary { font: inherit; cursor: pointer; }
button { color: inherit; }
p, figure { margin: 0; }
h1, h2, h3 { margin: 0; font-weight: 700; line-height: .98; letter-spacing: -.04em; }
h2 { font-size: clamp(3rem, 5.7vw, 5.4rem); text-wrap: balance; }
h3 { font-size: clamp(1.8rem, 3vw, 2.8rem); line-height: 1.04; }
section { scroll-margin-top: 24px; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 5px; }
.icon { width: 28px; height: 28px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: fixed; top: 12px; left: 12px; z-index: 100; padding: 12px 20px; background: var(--blue); color: white; transform: translateY(-160%); }
.skip-link:focus { transform: none; }
.opening { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); border-bottom: 1px solid var(--rule); }
.contents-rail { position: relative; border-right: 1px solid var(--rule); padding: 22px clamp(18px, 1.95vw, 28px); }
.wordmark { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: 36px; line-height: 1; letter-spacing: -.04em; text-decoration: none; }
.desktop-nav { display: flex; flex-direction: column; margin-top: 27px; }
.desktop-nav a { display: flex; align-items: center; min-height: 48px; font-size: 17px; text-decoration: none; }
.desktop-nav a:hover { color: var(--blue); text-decoration: underline; }
.desktop-nav .faq-nav { margin-top: 20px; font-size: 14px; }
.mobile-nav { display: none; }
.paper-swatch { position: absolute; left: 20%; right: 20%; bottom: 74px; aspect-ratio: 1; background: #f4f88b; border: 1px dashed var(--rule); }
.opening-spread { min-width: 0; padding: 0 clamp(24px, 2.5vw, 38px); }
.hero { display: grid; grid-template-columns: minmax(0, 53%) minmax(0, 47%); align-items: start; min-height: 686px; padding-top: 82px; }
.hero-copy { position: relative; z-index: 1; }
h1 { font-size: clamp(4rem, 8.17vw, 8rem); line-height: .86; }
h1 span { display: block; white-space: nowrap; }
.hero-copy > p { font-size: clamp(1.3rem, 2.23vw, 2.1rem); line-height: 1.22; letter-spacing: -.025em; margin-top: 37px; max-width: 31ch; }
.project-link { display: inline-flex; align-items: center; justify-content: space-between; gap: 40px; min-height: 62px; padding: 12px 30px; margin-top: 32px; color: white; background: var(--blue); text-decoration: none; font-size: 22px; line-height: 1.2; }
.project-link:hover { background: #122694; }
.project-link .icon { width: 36px; height: 36px; stroke-width: 1.5; }
.reasoning-study { margin-top: -39px; }
.diagram-example + .diagram-example { margin-top: 25px; }
.interactive-diagram .mirror-state { display: none; }
.interactive-diagram:has(#diagram-mirror:checked) .rotation-state { display: none; }
.interactive-diagram:has(#diagram-mirror:checked) .mirror-state { display: inline; }
.diagram-controls { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 18px; border: 0; margin: 8px 0 0; padding: 0; }
.diagram-controls legend { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.diagram-controls label { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; font-size: 14px; font-weight: 600; cursor: pointer; }
.diagram-controls input { width: 16px; height: 16px; margin: 0; accent-color: var(--blue); }
.diagram-controls label:has(input:checked) { color: var(--blue); }
.interactive-diagram figcaption { font-size: 14px; letter-spacing: .08em; }
.interactive-diagram figcaption a { gap: 12px; }
.interactive-diagram figcaption .icon { width: 20px; height: 20px; }
.reasoning-diagram { display: block; width: 100%; overflow: visible; }
.construction { fill: none; stroke: #62675a; stroke-width: 1; stroke-dasharray: 3 3; }
.registration { fill: none; stroke: var(--ink); stroke-width: 1; }
.letter-shapes { fill: var(--blue); }
.coral-line { fill: none; stroke: var(--coral); stroke-width: 3; stroke-linejoin: miter; }
.mirror-axis { fill: none; stroke: var(--coral); stroke-width: 1.5; stroke-dasharray: 7 5; }
.angle-label { fill: var(--ink); font: 500 18px "Instrument Sans", sans-serif; }
.diagram-example figcaption { text-align: center; font-size: 21px; font-weight: 700; line-height: 1.3; letter-spacing: .14em; text-transform: uppercase; }
.diagram-example figcaption a { display: inline-flex; min-height: 44px; align-items: center; text-decoration: none; }
.diagram-example:hover .construction, .diagram-example:focus-within .construction { stroke: var(--ink); }
.diagram-example:hover figcaption a, .diagram-example:focus-within figcaption a { color: var(--blue); }
.tool-links { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; padding: 24px 0 26px; border-top: 1px solid var(--rule); }
.tool-link { display: grid; grid-template-columns: minmax(64px, 132px) minmax(0, 1fr) 40px; align-items: center; column-gap: 17px; min-height: 133px; color: var(--ink); text-decoration: none; }
.tool-link + .tool-link { border-left: 1px solid var(--rule); padding-left: 35px; }
.gem-mark { display: block; width: 100%; }
.gem-mark circle { fill: var(--coral); }
.gem-mark path { fill: none; stroke: var(--ink); stroke-width: 2; stroke-linejoin: miter; }
.blue-gem circle { fill: var(--blue); }
.blue-gem path { stroke: white; stroke-width: 1.7; }
.tool-name { padding-top: 5px; font-size: clamp(1.45rem, 2.65vw, 2.6rem); font-weight: 700; letter-spacing: -.035em; line-height: 1.1; white-space: nowrap; }
.tool-rule { display: block; height: 1px; background: var(--rule); margin-top: 23px; }
.tool-link > .icon { width: 40px; height: 40px; align-self: end; margin-bottom: 8px; stroke-width: 1.6; }
.tool-link:hover .tool-name { color: var(--blue); }
.tool-link:hover .tool-rule { background: var(--blue); }
.folio-section { padding: clamp(52px, 5vw, 80px) clamp(24px, 3.2vw, 64px); }
.services { padding-top: 34px; }
.services h2 { font-size: clamp(3rem, 5.65vw, 5.6rem); white-space: nowrap; }
.section-name { display: block; margin-bottom: 8px; font-size: 18px; line-height: 1.5; font-weight: 500; letter-spacing: 0; }
.layer-index { display: grid; grid-template-columns: 1fr 1fr 1.08fr .65fr; margin: 22px 0 50px; }
.layer-index > div { border-left: 1px solid var(--rule); padding: 0 14%; display: flex; flex-direction: column; justify-content: space-between; gap: 22px; }
.layer-index > div:last-child { padding-right: 0; }
.layer-shape { display: block; height: 140px; width: 100%; }
.interface-shape { background: var(--blue); border-radius: 50% 50% 0 0; }
.connection-shape { background: var(--coral); }
.application-shape { border: 1px solid var(--rule); border-radius: 50% 50% 0 0; }
.operations-shape { background: var(--blue); }
.layer-index > div > span:last-child { font-size: 15px; }
.service-entry { display: grid; grid-template-columns: .65fr 1.15fr 1.25fr; column-gap: 6%; align-items: start; border-top: 1px solid var(--rule); padding: 38px 0 44px; }
.service-entry:last-child { padding-bottom: 0; }
.margin-note { font: 13px/1.65 ui-monospace, monospace; letter-spacing: -.01em; }
.service-entry > div > p:first-child { max-width: 60ch; }
.technical-note { color: #474c42; font-size: 14px; margin-top: 20px; }
.field-notes { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12%; border-top: 1px solid var(--rule); }
.field-intro > p { max-width: 40ch; margin-top: 28px; }
.product-notes article { padding: 0 0 32px; }
.product-notes article + article { padding-top: 32px; border-top: 1px solid var(--rule); }
.product-notes h3 { margin-bottom: 18px; }
.product-notes p { max-width: 65ch; }
.inline-link { display: inline-flex; align-items: center; justify-content: space-between; min-height: 44px; gap: 24px; margin-top: 20px; color: var(--blue); font-weight: 600; }
.inline-link:hover { text-decoration-thickness: 2px; }
.process { display: grid; grid-template-columns: 1.05fr 1fr; gap: 12%; background: var(--coral); border-top: 1px solid var(--ink); }
.process-intro > p { margin-top: 30px; max-width: 39ch; }
.process-list { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.process-list li { position: relative; padding: 25px 0 28px 48px; border-top: 1px solid #783426; counter-increment: step; }
.process-list li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 30px; font: 14px/1 ui-monospace, monospace; }
.process-list h3 { font-size: 30px; margin-bottom: 16px; }
.process-list p { max-width: 59ch; }
.about { display: grid; grid-template-columns: 1.5fr 1fr; gap: 13%; align-items: center; background: var(--blue); color: var(--paper); }
.about h2 { font-size: clamp(3rem, 6vw, 6rem); }
.about-copy > p { max-width: 55ch; margin-top: 30px; }
.about-copy > p + p { margin-top: 20px; }
.portrait { padding: 20px; width: min(100%, 430px); justify-self: end; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 4px 38% 4px 4px; transform: rotate(2deg); }
.portrait canvas { display: block; width: 100%; aspect-ratio: 1; image-rendering: pixelated; cursor: pointer; }
.portrait figcaption { display: flex; justify-content: space-between; gap: 12px; padding: 14px 6px 2px; font: 500 14px/1.3 "Pixelify Sans", monospace; }
.portrait > p { margin: 12px 6px 0; font-size: 13px; line-height: 1.4; }
.questions { display: grid; grid-template-columns: 1fr 1.3fr; gap: 11%; border-bottom: 1px solid var(--rule); }
.faq-list details { padding: 20px 0; border-top: 1px solid var(--rule); }
.faq-list details:last-child { border-bottom: 1px solid var(--rule); }
.faq-list summary { min-height: 44px; font-size: 24px; line-height: 1.35; padding: 6px 0; }
.faq-list summary::marker { color: var(--blue); }
.faq-list details[open] summary { margin-bottom: 16px; }
.faq-list p { max-width: 68ch; }
.contact { display: grid; grid-template-columns: 1fr 1fr; align-items: start; gap: 12%; padding-block: 90px; }
.contact h2 { font-size: clamp(4rem, 7.3vw, 7rem); }
.contact-copy > p { max-width: 46ch; font-size: 23px; line-height: 1.4; }
.contact .project-link { font-size: 18px; min-height: 56px; padding-inline: 22px; gap: 28px; }
.email-address { display: flex; width: fit-content; align-items: center; min-height: 44px; margin-top: 20px; font-size: 24px; }
#copy-email { min-height: 44px; padding: 8px 16px; margin-top: 10px; border: 1px solid var(--ink); background: transparent; font-size: 15px; }
#copy-email:hover { color: white; background: var(--blue); border-color: var(--blue); }
#copy-status { display: block; min-height: 1.5em; margin-top: 12px; font-size: 15px; }
.site-footer { display: grid; grid-template-columns: .5fr 1fr 1fr; gap: 30px; padding: 30px 3.2%; border-top: 1px solid var(--rule); font-size: 14px; }
.site-footer nav { display: flex; justify-content: flex-end; align-items: flex-start; gap: 25px; }
.site-footer nav a { display: flex; align-items: center; min-height: 44px; }
/* Existing pet behavior owns the viewport canvas, play dock and ball controls. */
body.pyxel-active { padding-bottom: 160px; }
.pyxel-roam { position: fixed; left: 0; bottom: 0; width: 100vw; height: 100vh; height: 100dvh; z-index: 30; pointer-events: none; color: var(--ink); opacity: 0; transition: opacity .4s ease; }
.pyxel-roam.on { opacity: 1; }
.pyxel-play { position: fixed; left: 0; bottom: 0; z-index: 29; width: 100%; height: 160px; border-top: 1px solid var(--rule); background: var(--paper); opacity: 0; pointer-events: none; transition: opacity .4s ease; }
.pyxel-play.on { opacity: 1; pointer-events: auto; }
.pyxel-play p { position: absolute; left: 3.2%; bottom: 15px; font-size: 13px; }
.pyxel-ball { position: fixed; z-index: 31; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 50%; background: transparent; cursor: grab; touch-action: none; }
.pyxel-ball:active { cursor: grabbing; }
.pyxel-ball[hidden] { display: none; }
.pyxel-toggle { position: absolute; right: 16px; bottom: 12px; z-index: 32; min-height: 44px; font: 500 13px/1 "Pixelify Sans", monospace; color: var(--ink); background: var(--paper); border: 1px solid var(--rule); border-radius: 999px; padding: 9px 14px; }
.pyxel-toggle:hover { border-color: var(--blue); }
@media (min-width: 1650px) { .hero { min-height: 740px; } }
@media (max-width: 1200px) {
  .hero { min-height: 610px; padding-top: 72px; }
  .hero-copy > p { font-size: 24px; margin-top: 30px; }
  .project-link { font-size: 18px; padding-inline: 22px; gap: 20px; min-height: 56px; }
  .reasoning-study { margin-top: -22px; }
  .diagram-example figcaption { font-size: 17px; }
  .tool-links { gap: 20px; }
  .tool-link { grid-template-columns: 90px minmax(0, 1fr) 30px; column-gap: 14px; min-height: 105px; }
  .tool-link + .tool-link { padding-left: 20px; }
  .tool-name { font-size: 24px; white-space: normal; }
  .tool-link > .icon { width: 30px; height: 30px; }
  .services h2 { white-space: normal; }
  .service-entry { grid-template-columns: .6fr 1.05fr 1.25fr; gap: 4%; }
}
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: 0; padding: 45px 0 35px; }
  h1 { font-size: clamp(3.7rem, 9.5vw, 5.8rem); }
  .hero-copy > p { font-size: 25px; }
  .reasoning-study { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; margin-top: 46px; }
  .diagram-example + .diagram-example { margin-top: 0; }
  .diagram-example figcaption { font-size: 13px; letter-spacing: .09em; }
  .tool-links { grid-template-columns: 1fr; gap: 0; }
  .tool-link { grid-template-columns: 88px minmax(0, 1fr) 32px; padding-block: 18px; min-height: 115px; }
  .tool-link + .tool-link { border-left: 0; border-top: 1px solid var(--rule); padding-left: 0; }
  .tool-name { font-size: 30px; }
  .tool-rule { margin-top: 16px; }
  .tool-link > .icon { align-self: center; margin: 0; }
  .service-entry { grid-template-columns: 1fr 2fr; gap: 24px; }
  .margin-note { grid-column: 1 / -1; }
  .field-notes, .process, .about, .questions, .contact { gap: 6%; }
  h2 { font-size: 48px; }
  .about h2 { font-size: 52px; }
  .contact-copy > p { font-size: 20px; }
  .contact .project-link { width: 100%; gap: 10px; padding-inline: 16px; }
  .email-address { font-size: 20px; }
  .site-footer { grid-template-columns: .6fr 1fr; }
  .site-footer nav { grid-column: 1 / -1; justify-content: flex-start; }
}
@media (max-width: 640px) {
  :root { --rail: 0px; }
  .opening { display: block; }
  .contents-rail { display: flex; align-items: center; justify-content: space-between; border-right: 0; border-bottom: 1px solid var(--rule); padding: 16px 22px; }
  .wordmark { font-size: 32px; }
  .desktop-nav, .paper-swatch { display: none; }
  .mobile-nav { display: block; }
  .mobile-nav summary { min-height: 44px; display: flex; align-items: center; gap: 9px; list-style: none; }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav nav { position: absolute; top: 77px; right: 22px; z-index: 20; width: 230px; display: grid; padding: 10px 20px; background: var(--paper); border: 1px solid var(--rule); }
  .mobile-nav nav a { display: flex; align-items: center; min-height: 48px; text-decoration: none; }
  .mobile-nav nav a:hover { color: var(--blue); text-decoration: underline; }
  .opening-spread { padding-inline: 22px; }
  .hero { padding-top: 38px; }
  h1 { font-size: clamp(3.25rem, 12.2vw, 4.6rem); line-height: .92; }
  .hero-copy > p { font-size: 23px; margin-top: 28px; }
  .desktop-break { display: none; }
  .project-link { margin-top: 26px; font-size: 17px; min-height: 56px; padding-inline: 20px; gap: 18px; }
  .project-link .icon { width: 30px; height: 30px; }
  .reasoning-study { grid-template-columns: 1fr; gap: 24px; margin-top: 36px; }
  .diagram-example { width: 100%; max-width: 480px; margin-inline: auto; }
  .diagram-example figcaption { font-size: 17px; }
  .tool-link { grid-template-columns: 76px minmax(0, 1fr) 28px; gap: 14px; }
  .tool-name { font-size: 25px; }
  .tool-link > .icon { width: 28px; height: 28px; }
  .folio-section { padding: 48px 22px; }
  h2, .services h2 { font-size: 43px; line-height: 1.02; }
  .services { padding-top: 28px; }
  .section-name { font-size: 17px; margin-bottom: 12px; }
  .layer-index { grid-template-columns: 1fr 1fr; gap: 26px 0; margin-bottom: 36px; }
  .layer-index > div { padding-inline: 15%; }
  .layer-index > div:last-child { padding-right: 15%; }
  .layer-shape { height: 95px; }
  .service-entry { display: block; padding-block: 28px; }
  .service-entry h3 { margin: 18px 0 20px; font-size: 32px; }
  .field-notes, .process, .about, .questions, .contact { display: block; }
  .product-notes, .process-list, .faq-list, .contact-copy { margin-top: 34px; }
  .field-intro > p { margin-top: 22px; }
  .product-notes h3 { font-size: 30px; }
  .about h2 { font-size: 48px; }
  .portrait { width: min(100%, 360px); margin: 45px auto 0; }
  .questions h2 br, .contact h2 br { display: none; }
  .faq-list summary { font-size: 22px; }
  .contact h2 { font-size: 58px; }
  .contact .project-link { max-width: 390px; }
  .email-address { font-size: 23px; }
  .site-footer { padding: 24px 22px; gap: 20px; }
  .site-footer nav { flex-wrap: wrap; gap: 22px; }
  body.pyxel-active { padding-bottom: 120px; }
  .pyxel-play { height: 120px; }
  .pyxel-play p { left: 16px; bottom: 64px; max-width: 45%; line-height: 1.3; }
  .pyxel-toggle { right: 12px; bottom: 12px; }
}
@media (max-width: 360px) {
  h1 { font-size: 46px; }
  .project-link { width: 100%; gap: 8px; padding-inline: 15px; font-size: 16px; }
  .tool-link { grid-template-columns: 64px minmax(0, 1fr) 24px; gap: 10px; }
  .tool-name { font-size: 23px; }
  .portrait figcaption { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .pyxel-roam, .pyxel-play { transition: none; }
}
