@font-face {
  font-family: "IBM Plex Sans";
  src: url("assets/ibm-plex-sans.ttf") format("truetype");
  font-weight: 100 700;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #f3efe4;
  --ink: #202722;
  --muted: #515b53;
  --line: #bcb8a7;
  --orange: #bd361c;
  --accent: #ff764d;
  --pine: #243632;
  --ease: cubic-bezier(.16, 1, .3, 1);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 1rem/1.6 "IBM Plex Sans", sans-serif; }
::selection { color: var(--ink); background: #ffb097; }
a { color: inherit; text-decoration: none; text-underline-offset: .24em; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #095a85; outline-offset: 4px; }
h1,h2,p,figure { margin: 0; }
h1,h2 { line-height: .98; letter-spacing: -.04em; text-wrap: balance; }
p { text-wrap: pretty; }
[hidden] { display: none !important; }
.wrap { width: min(100% - 6rem, 1260px); margin-inline: auto; }
.skip { position: fixed; top: .65rem; left: .75rem; z-index: 10; padding: .6rem .8rem; background: var(--ink); color: var(--paper); }
.skip:not(:focus) { clip-path: inset(50%); overflow: hidden; width: 1px; height: 1px; }
.reading-line { position: fixed; z-index: 9; inset: 0 0 auto; height: 3px; background: var(--orange); transform: scaleX(var(--progress, 0)); transform-origin: left; pointer-events: none; }
.masthead { border-bottom: 1px solid var(--line); }
.header-inner,.footer-inner { min-height: 78px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.brand { display: inline-flex; margin-left: -.65rem; }
.brand img { display: block; height: auto; max-width: 100%; }
nav { display: flex; gap: clamp(.8rem,3.4vw,2.8rem); }
nav a,.footer-inner > a:last-child { min-height: 44px; display: inline-flex; align-items: center; gap: .45rem; font-weight: 500; }
nav a:hover,.footer-inner > a:last-child:hover { text-decoration: underline; }
.hero { display: grid; grid-template-columns: 1fr 1.04fr; align-items: center; gap: clamp(1.75rem,5vw,5rem); padding-block: clamp(3.6rem,7vw,7rem) clamp(3.5rem,6vw,6rem); }
.hero-copy { min-width: 0; }
h1 { font-size: clamp(3.35rem,6.7vw,5.35rem); font-weight: 650; }
h1 span { display: block; }
h1 span+span { color: var(--orange); }
.hero-copy p { margin-block: 1.5rem 1.8rem; max-width: 49ch; color: var(--muted); font-size: clamp(1.05rem,1.5vw,1.22rem); }
.hero-copy strong { color: var(--ink); font-weight: 600; }
.primary,.inline-link { display: inline-flex; align-items: center; gap: .7rem; min-height: 48px; font-weight: 600; }
.primary { padding: .65rem .9rem; background: var(--ink); color: var(--paper); border-radius: 4px; }
.primary:hover { background: #3f5048; }
.primary svg,.inline-link svg,.index-links svg { transition: transform .3s var(--ease); }
.primary:hover svg,.inline-link:hover svg,.index-links a:hover svg { transform: translateX(4px); }
.bench { min-width: 0; }
.bench-frame { background: var(--pine); color: #eaece2; border-radius: 13px; overflow: hidden; }
.bench-label,.bench-foot,.demo-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .65rem 1rem; }
.bench-label { font-size: .76rem; font-weight: 600; letter-spacing: .12em; border-bottom: 1px solid #5d7067; }
.assembly { display: block; width: 100%; height: auto; }
.plate { transition: transform .72s var(--ease); }
.bench[data-assembled="true"] .plate-middle { transform: translateY(70px); }
.bench[data-assembled="true"] .plate-top { transform: translateY(140px); }
.bench-foot { border-top: 1px solid #5d7067; min-height: 60px; font-size: .88rem; }
.bench-foot button { display: inline-flex; align-items: center; gap: .5rem; min-height: 40px; padding: .2rem .6rem; background: #e3eadc; color: #1b2e26; border: 1px solid #e3eadc; border-radius: 4px; font-weight: 600; }
.bench-foot button:hover { background: #fff7e5; }
.bench-foot button:focus-visible { outline-color: #f9a486; }
.bench figcaption,.demo-controls .demo-play { margin-left: auto; border-color: transparent; text-decoration: underline; text-underline-offset: .23em; }
.demo figcaption { font-size: .875rem; color: var(--muted); }
.bench figcaption { margin-top: .55rem; }
.project-index { background: var(--ink); color: #faf5ea; }
.index-inner { display: flex; justify-content: space-between; align-items: center; gap: 1.2rem 2.5rem; padding-block: 1.65rem; }
.index-inner h2 { font-size: clamp(1.7rem,3vw,2.5rem); font-weight: 600; }
.index-links { display: flex; flex-wrap: wrap; gap: .35rem 1.65rem; }
.index-links a { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; }
.index-links a:hover { text-decoration: underline; }
.index-links a:focus-visible { outline-color: #f8a48b; }
.project { display: grid; grid-template-columns: .83fr 1.17fr; align-items: center; gap: clamp(1.65rem,6vw,6rem); padding-block: clamp(4rem,8vw,8rem); scroll-margin-top: .5rem; }
.project-copy h2,.about h2 { font-size: clamp(2.75rem,6vw,5.3rem); font-weight: 650; }
.project-type { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .5rem; font-size: .87rem; font-weight: 600; color: var(--muted); }
.project-type span { width: 5px; height: 5px; border-radius: 50%; background: var(--orange); }
.project-copy h2 { margin-top: .7rem; }
.project-copy p,.about p { margin-top: 1rem; max-width: 50ch; color: var(--muted); font-size: 1.08rem; }
.inline-link { margin-top: .75rem; color: #8a2b18; }
.inline-link:hover { text-decoration: underline; }
.demo { min-width: 0; background: #e9e5d8; border: 1px solid #afa991; border-radius: 14px; overflow: hidden; }
.demo-head { min-height: 47px; border-bottom: 1px solid #bfb9a5; font-weight: 600; font-size: .86rem; }
.demo-head span+span { font-weight: 400; color: var(--muted); }
.chat-surface { display: grid; grid-template-columns: 56px 1fr; min-height: 220px; margin: .8rem; border-radius: 8px; overflow: hidden; background: #243632; color: #eff5e9; }
.chat-sidebar { display: flex; flex-direction: column; align-items: center; gap: .7rem; padding: .9rem .4rem; background: #1b2b27; }
.chat-sidebar span { width: 19px; height: 2px; background: #81948a; }
.chat-room { min-width: 0; padding: 1rem; }
.room-heading { display: flex; align-items: center; gap: .5rem; padding-bottom: .75rem; border-bottom: 1px solid #54695f; font-weight: 600; }
.live-dot { width: 7px; height: 7px; border-radius: 50%; background: #abcfb1; }
.chat-message { display: grid; grid-template-columns: 30px 1fr; gap: .7rem; align-items: start; padding-top: 1rem; font-size: .94rem; }
.chat-message p { color: #d5e4d8; }
.avatar { display: grid; place-items: center; min-height: 29px; border-radius: 4px; font-weight: 700; background: #b2cdbb; color: #20392e; }
.avatar.agent { background: #f9b693; color: #3e261c; }
.avatar.memory { background: #e9d5a3; color: #3b321e; }
.demo-controls { display: flex; flex-wrap: wrap; gap: .3rem; padding: 0 .8rem .8rem; }
.demo-controls button { min-height: 41px; padding: .25rem .7rem; border: 1px solid #aaa590; border-radius: 4px; color: var(--ink); background: transparent; font-size: .9rem; }
.demo-controls button:hover { background: #ddd8c8; }
.demo-controls button[aria-pressed="true"] { color: #f7f2e6; background: var(--ink); border-color: var(--ink); }
.demo-controls .demo-play { margin-left: auto; border-color: transparent; text-decoration: underline; text-underline-offset: .23em; }
.demo figcaption { padding: .65rem .8rem; border-top: 1px solid #bfb9a5; }
.studio-band { background: #eee3d4; border-block: 1px solid #c6b5a0; }
.studio-project .project-copy { order: 2; }
.studio-project .demo { order: 1; }
.studio-project { grid-template-columns: 1.17fr .83fr; }
.studio-demo { background: #eee4ce; border-color: #baa88c; }
.world { display: block; width: 100%; max-height: 265px; margin-inline: auto; padding: .5rem 1rem 0; }
.world-blocks,.world-path { transition: transform .55s var(--ease), opacity .35s; }
.studio-demo[data-step="0"] .world-blocks,.studio-demo:not([data-step="2"]) .world-path { transform: translateY(-13px); opacity: 0; }
.studio-notes { min-height: 2.8rem; padding: .5rem .8rem; color: var(--muted); font-size: .91rem; }
.about { display: grid; grid-template-columns: 1fr 1fr; align-items: center; gap: 1.5rem 4rem; padding-block: clamp(4rem,8vw,8rem); }
.about p { margin-top: 0; }
footer { border-top: 1px solid var(--line); }
[data-reveal] { opacity: 1; }
@media (max-width: 960px) {
  .wrap { width: calc(100% - 3.5rem); }
  h1 { font-size: clamp(2.7rem,7.1vw,4.5rem); }
  .hero { gap: 1.6rem; }
}
@media (max-width: 690px) {
  .wrap { width: calc(100% - 2.25rem); }
  .header-inner,.footer-inner { min-height: 67px; }
  .brand img { width: 165px; }
  nav { gap: .65rem; font-size: .9rem; }
  .hero,.project,.about { grid-template-columns: 1fr; }
  .hero { gap: 2.2rem; padding-block: 3.4rem 3rem; }
  h1 { font-size: clamp(2.55rem,11vw,4.2rem); }
  .index-inner { display: grid; }
  .index-links { gap: .15rem 1rem; }
  .project { padding-block: 3.8rem; }
  .studio-project .project-copy,.studio-project .demo { order: initial; }
  .chat-surface { grid-template-columns: 39px 1fr; min-height: 197px; }
  .chat-room { padding: .8rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .plate,.world-blocks,.world-path,.primary svg,.inline-link svg,.index-links svg { transition: none; }
  .primary:hover svg,.inline-link:hover svg,.index-links a:hover svg { transform: none; }
}

.studio-name { display: flex; align-items: center; gap: .8rem; margin-top: .7rem; }
.studio-name img { border-radius: 8px; flex: 0 0 auto; }
.studio-name h2 { margin-top: 0; min-width: 0; }
