:root {
  color-scheme: light;
  --orange: #f5a800;
  --ink: #141411;
  --paper: #f8f7f1;
  --white: #ffffff;
  --muted: #66645d;
  --line: #d9d7cf;
  --max: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 1.55; }
a { color: inherit; }
img { max-width: 100%; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--ink); color: white; padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }
.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important; }

.site-header { position: sticky; top: 0; z-index: 50; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; min-height: 78px; padding: 12px max(24px, calc((100vw - var(--max)) / 2)); background: color-mix(in srgb, var(--paper) 92%, transparent); border-bottom: 1px solid var(--line); backdrop-filter: blur(16px); }
.brand { display: inline-flex; width: 172px; text-decoration: none; }
.brand img { display: block; width: 100%; height: 44px; object-fit: contain; }
nav { display: flex; align-items: center; gap: 36px; }
nav a { position: relative; font-size: .86rem; font-weight: 700; text-decoration: none; }
nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: -6px; height: 2px; background: var(--orange); transition: right .25s ease; }
nav a:hover::after { right: 0; }
.site-header > .button { justify-self: end; }
.menu-button { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 20px; min-height: 52px; padding: 13px 20px; border: 2px solid var(--ink); background: var(--orange); color: var(--ink); font-size: .9rem; font-weight: 800; text-decoration: none; box-shadow: 5px 5px 0 var(--ink); transition: transform .18s ease, box-shadow .18s ease; }
.button:hover { transform: translate(3px, 3px); box-shadow: 2px 2px 0 var(--ink); }
.button:focus-visible, a:focus-visible, button:focus-visible { outline: 3px solid #2a64d6; outline-offset: 3px; }
.button-small { min-height: 42px; padding: 8px 15px; gap: 12px; box-shadow: 3px 3px 0 var(--ink); font-size: .8rem; }
.dark-button { background: var(--ink); color: white; border-color: var(--ink); box-shadow: 5px 5px 0 #775000; }

.hero { position: relative; display: grid; grid-template-columns: 1.12fr .88fr; align-items: center; min-height: calc(100vh - 78px); max-width: var(--max); margin: 0 auto; padding: clamp(72px, 9vw, 130px) 24px 120px; overflow: hidden; }
.hero-copy { position: relative; z-index: 2; }
.kicker, .section-number { margin: 0; font-size: .75rem; font-weight: 900; letter-spacing: .13em; }
.kicker { display: flex; align-items: center; gap: 10px; color: #6b4a00; }
.kicker span { width: 9px; height: 9px; background: var(--orange); border: 2px solid var(--ink); border-radius: 50%; }
.hero h1 { max-width: 780px; margin: 20px 0 28px; font-size: clamp(4.2rem, 8vw, 8rem); line-height: .86; letter-spacing: -.075em; }
.hero h1 em { display: block; color: var(--orange); font-style: normal; -webkit-text-stroke: 2px var(--ink); text-shadow: 5px 5px 0 var(--ink); }
.hero-lede { max-width: 650px; margin: 0 0 34px; color: #45443f; font-size: clamp(1.05rem, 1.7vw, 1.28rem); line-height: 1.6; }
.hero-actions { display: flex; align-items: center; gap: 28px; flex-wrap: wrap; }
.text-link { font-size: .9rem; font-weight: 800; text-underline-offset: 5px; }
.scroll-note { position: absolute; bottom: 30px; left: 24px; display: flex; gap: 16px; align-items: center; font-size: .68rem; font-weight: 900; letter-spacing: .12em; }

.hero-lab { position: relative; z-index: 1; width: min(45vw, 570px); margin: 0; justify-self: end; border: 2px solid var(--ink); background: var(--ink); box-shadow: 11px 11px 0 var(--orange), 13px 13px 0 var(--ink); transform: rotate(1.4deg); }
.hero-lab::after { content: ''; position: absolute; z-index: 1; inset: 0; pointer-events: none; background: linear-gradient(115deg, transparent 42%, rgba(255,255,255,.14) 50%, transparent 58%); background-size: 260% 100%; animation: lab-scan 7s ease-in-out infinite; }
.hero-lab > img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border: 7px solid var(--paper); }
.lab-role { position: absolute; z-index: 2; display: grid; gap: 1px; padding: 7px 10px; border: 1.5px solid var(--ink); background: var(--paper); box-shadow: 3px 3px 0 var(--ink); font-family: 'Courier New', monospace; line-height: 1; transform: rotate(-1.4deg); }
.lab-role small { color: #776f62; font-size: .56rem; font-weight: 900; letter-spacing: .11em; }
.lab-role strong { font-size: .68rem; letter-spacing: .05em; }
.role-builder { left: 16px; bottom: 16px; }
.role-operator { right: 16px; top: 16px; grid-template-columns: 1fr auto; column-gap: 8px; }
.role-operator small { grid-column: 1 / -1; }
.role-operator i { width: 8px; height: 8px; align-self: center; border-radius: 50%; background: #1b9f58; box-shadow: 0 0 0 4px #dff4e7; animation: lab-pulse 1.6s ease-in-out infinite; }
@keyframes lab-scan { 0%, 72%, 100% { background-position: 130% 0; } 86% { background-position: -130% 0; } }
@keyframes lab-pulse { 50% { transform: scale(.72); opacity: .55; } }

.manifesto, .contact { display: grid; grid-template-columns: minmax(160px, 1fr) 4fr; gap: 40px; max-width: var(--max); margin: 0 auto; padding: clamp(85px, 11vw, 150px) 24px; border-top: 1px solid var(--line); }
.manifesto h2, .section-head h2, .contact h2 { margin: 0; font-size: clamp(2.6rem, 5.5vw, 5.7rem); line-height: .96; letter-spacing: -.055em; }
.manifesto h2 span { color: #9c9a92; }
.manifesto div > p { max-width: 760px; margin: 38px 0 0 auto; font-size: clamp(1.15rem, 2vw, 1.45rem); }

.work { background: var(--orange); border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); padding: clamp(80px, 10vw, 140px) max(24px, calc((100vw - var(--max)) / 2)); }
.section-head { display: grid; grid-template-columns: minmax(160px, 1fr) 4fr; gap: 28px 40px; }
.section-head h2 { grid-column: 2; }
.section-head > p:last-child { grid-column: 2; max-width: 680px; margin: 0; font-size: 1.08rem; }
.venture-card { display: grid; grid-template-columns: 1fr 1fr; min-height: 590px; margin-top: 64px; background: white; border: 2px solid var(--ink); box-shadow: 10px 10px 0 var(--ink); }
.venture-copy { display: flex; flex-direction: column; padding: clamp(28px, 5vw, 66px); }
.venture-meta { display: flex; justify-content: space-between; align-items: center; font-size: .7rem; font-weight: 900; letter-spacing: .1em; }
.status { display: flex; align-items: center; gap: 8px; }.status i { width: 8px; height: 8px; background: #1b9f58; border-radius: 50%; box-shadow: 0 0 0 5px #dff4e7; }
.clocktrail-logo { width: min(420px, 100%); margin: 70px 0 36px; }
.venture-copy h3 { max-width: 500px; margin: 0 0 16px; font-size: clamp(2rem, 3.2vw, 3.2rem); line-height: 1; letter-spacing: -.045em; }
.venture-copy p { max-width: 540px; margin: 0 0 32px; color: var(--muted); }
.venture-copy .button { align-self: flex-start; margin-top: auto; }
.venture-visual { position: relative; display: grid; place-items: center; min-height: 500px; padding: 45px; overflow: hidden; background: var(--ink); color: white; }
.venture-visual::before { content: ''; position: absolute; inset: 0; opacity: .16; background-image: linear-gradient(#fff 1px, transparent 1px), linear-gradient(90deg, #fff 1px, transparent 1px); background-size: 42px 42px; }
.time-card { position: relative; z-index: 2; width: min(390px, 92%); padding: 28px; background: var(--paper); color: var(--ink); border: 2px solid var(--orange); box-shadow: 12px 12px 0 var(--orange); transform: rotate(3deg); }
.time-card > span { font-size: .66rem; font-weight: 900; letter-spacing: .14em; }
.time-card strong { display: block; margin: 22px 0; font-family: 'Courier New', monospace; font-size: clamp(2.7rem, 5vw, 4.6rem); line-height: 1; letter-spacing: -.08em; }
.time-line { display: flex; align-items: center; margin: 26px 0; }.time-line i { width: 13px; height: 13px; background: var(--orange); border: 2px solid var(--ink); border-radius: 50%; }.time-line i:nth-child(even) { flex: 1; height: 2px; border: 0; border-radius: 0; }
.time-foot { display: flex; justify-content: space-between; font-size: .64rem; font-weight: 900; letter-spacing: .08em; }
.venture-visual > p { position: absolute; right: 22px; bottom: 12px; margin: 0; color: #33332f; font-size: clamp(2rem, 4vw, 4.5rem); font-weight: 900; line-height: .78; text-align: right; }.venture-visual > p span { font-size: .8rem; color: var(--orange); }

.principles { max-width: var(--max); margin: 0 auto; padding: clamp(90px, 11vw, 150px) 24px; }
.section-head.compact { margin-bottom: 70px; }
.principle-grid { display: grid; grid-template-columns: repeat(2, 1fr); border-top: 1px solid var(--ink); border-left: 1px solid var(--ink); }
.principle-grid article { min-height: 310px; padding: 34px; border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transition: background .25s ease, color .25s ease; }
.principle-grid article:hover { background: var(--ink); color: white; }
.principle-grid article > span { font-family: 'Courier New', monospace; color: #8a6c24; font-size: .8rem; font-weight: 800; }
.principle-grid h3 { max-width: 420px; margin: 70px 0 14px; font-size: clamp(1.7rem, 3vw, 2.7rem); line-height: 1; letter-spacing: -.04em; }
.principle-grid p { max-width: 500px; color: var(--muted); }.principle-grid article:hover p { color: #c8c5bc; }

.statement { display: grid; place-items: center; min-height: 640px; padding: 90px 24px; background: var(--ink); color: white; text-align: center; }
.statement p { margin: 0; color: var(--orange); font-size: .72rem; font-weight: 900; letter-spacing: .18em; }
.statement h2 { margin: 34px 0; font-size: clamp(3.3rem, 8vw, 8.5rem); line-height: .9; letter-spacing: -.07em; }

.contact { align-items: start; }
.contact h2 { max-width: 850px; }.contact div > p { max-width: 650px; margin: 30px 0; color: var(--muted); font-size: 1.15rem; }
footer { display: grid; grid-template-columns: 1fr auto; gap: 28px; align-items: end; padding: 60px max(24px, calc((100vw - var(--max)) / 2)); background: var(--orange); border-top: 2px solid var(--ink); }
.footer-brand { width: 210px; }.footer-brand img { height: 54px; }
footer > p { grid-column: 1; margin: 0; font-size: 1.1rem; font-weight: 700; }
footer > div { grid-column: 2; grid-row: 1 / span 2; display: flex; gap: 24px; font-weight: 800; } footer > div a { text-underline-offset: 5px; }
footer small { grid-column: 1 / -1; padding-top: 28px; border-top: 1px solid #9c6b00; font-size: .75rem; }

.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }.reveal.visible { opacity: 1; transform: none; }

.chat-dock { position: fixed; right: 24px; bottom: 24px; z-index: 80; display: grid; justify-items: end; gap: 14px; }
.chat-toggle { display: flex; align-items: center; gap: 12px; min-height: 66px; padding: 6px 16px 6px 6px; border: 2px solid var(--ink); border-radius: 999px; background: var(--orange); color: var(--ink); box-shadow: 6px 6px 0 var(--ink); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.chat-toggle:hover { transform: translate(2px, 2px); box-shadow: 4px 4px 0 var(--ink); }
.chat-eyes, .mini-eyes { position: relative; display: block; }
.chat-eyes { width: 96px; height: 50px; --gaze-x: 0px; --gaze-y: 0px; }
.chat-eyes > img, .mini-eyes img { width: 100%; height: 100%; object-fit: contain; }
.animated-eye { position: absolute; z-index: 2; top: 12px; width: 29px; height: 27px; overflow: hidden; border-radius: 50%; background: white; }
.animated-eye-left { left: 12px; }
.animated-eye-right { right: 12px; }
.pupil { position: absolute; top: 6px; left: 8px; width: 14px; height: 17px; border-radius: 48% 48% 52% 52%; background: var(--ink); transform: translate(var(--gaze-x), var(--gaze-y)); transition: transform .1s ease-out; }
.pupil::after { content: ""; position: absolute; top: 2px; right: 2px; width: 5px; height: 5px; border-radius: 50%; background: white; }
.eyelid { position: absolute; z-index: 3; left: 0; width: 100%; height: 52%; background: var(--orange); transform: scaleY(0); }
.eyelid-top { top: 0; transform-origin: top; border-bottom: 1px solid transparent; }
.eyelid-bottom { bottom: 0; transform-origin: bottom; border-top: 1px solid transparent; }
.chat-toggle.is-blinking .eyelid { animation: eye-blink .3s ease-in-out; }
.chat-toggle:hover .pupil { --gaze-y: -1px; }
.chat-prompt { font-size: .72rem; font-weight: 900; letter-spacing: .1em; white-space: nowrap; }
.chat-panel { display: grid; grid-template-rows: auto minmax(150px, 1fr) auto auto auto; width: min(420px, calc(100vw - 32px)); height: min(620px, calc(100dvh - 120px)); overflow: hidden; background: var(--paper); border: 2px solid var(--ink); box-shadow: 9px 9px 0 var(--ink); }
.chat-panel[hidden] { display: none; }
.chat-panel-head { display: grid; grid-template-columns: 58px 1fr auto; gap: 12px; align-items: center; padding: 17px 18px; border-bottom: 2px solid var(--ink); background: var(--orange); }
.chat-panel-head > div:nth-child(2) { min-width: 0; }
.mini-eyes { width: 58px; height: 38px; }
.chat-panel-head span { display: block; color: #745000; font-size: .62rem; font-weight: 900; letter-spacing: .12em; }
.chat-panel h2 { margin: 2px 0 0; font-size: 1.22rem; line-height: 1.05; letter-spacing: -.03em; }
.chat-head-actions { display: flex; align-items: center; gap: 8px; }
.chat-reset { padding: 7px 9px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font: inherit; font-size: .72rem; font-weight: 800; cursor: pointer; }
.chat-close { width: 32px; height: 32px; padding: 0; border: 1px solid var(--ink); border-radius: 50%; background: transparent; color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.chat-messages { display: flex; flex-direction: column; gap: 13px; min-height: 0; padding: 18px; overflow-y: auto; overscroll-behavior: contain; }
.chat-message { max-width: 86%; padding: 11px 13px; border: 1.5px solid var(--ink); font-size: .9rem; line-height: 1.45; white-space: pre-wrap; overflow-wrap: anywhere; }
.chat-message.assistant { align-self: flex-start; background: white; border-radius: 4px 16px 16px 16px; }
.chat-message.user { align-self: flex-end; background: var(--orange); border-radius: 16px 4px 16px 16px; }
.chat-message.pending::after { content: ""; display: inline-block; width: 7px; height: 7px; margin-left: 6px; border-radius: 50%; background: var(--orange); animation: chat-pulse .9s infinite alternate; }
.chat-message.error { color: #8c2400; border-color: #8c2400; }
.chat-starters { display: flex; gap: 7px; padding: 0 18px 12px; overflow-x: auto; }
.chat-starters[hidden] { display: none; }
.chat-starters button { flex: 0 0 auto; padding: 8px 10px; border: 1px solid var(--ink); border-radius: 999px; background: transparent; color: var(--ink); font: inherit; font-size: .75rem; font-weight: 750; cursor: pointer; }
.chat-starters button:hover { background: #fff3d4; }
.chat-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; margin: 0 18px; padding: 8px 8px 8px 13px; border: 2px solid var(--ink); border-radius: 18px; background: white; }
.chat-form:focus-within { box-shadow: 0 0 0 3px rgba(245,168,0,.35); }
.chat-form textarea { width: 100%; min-width: 0; min-height: 25px; max-height: 96px; padding: 3px 0; resize: none; border: 0; outline: 0; background: transparent; color: var(--ink); font: inherit; font-size: 1rem; line-height: 1.35; }
.chat-send { width: 34px; height: 34px; padding: 0; border: 1.5px solid var(--ink); border-radius: 50%; background: var(--orange); color: var(--ink); font-size: 1.25rem; font-weight: 900; cursor: pointer; }
.chat-send:disabled { cursor: wait; opacity: .55; }
.chat-foot { display: flex; justify-content: space-between; gap: 12px; padding: 11px 18px 14px; color: #6f6b61; font-size: .72rem; }
.chat-foot a { color: var(--ink); font-weight: 800; text-underline-offset: 3px; }
@keyframes chat-pulse { to { opacity: .2; transform: translateY(-2px); } }
@keyframes eye-blink { 0%, 100% { transform: scaleY(0); } 44%, 58% { transform: scaleY(1); border-color: var(--ink); } }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; }.hero-lab::after, .role-operator i, .chat-toggle.is-blinking .eyelid, .chat-message.pending::after { animation: none; }.pupil { transition: none; }.reveal { opacity: 1; transform: none; transition: none; } }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; }.site-header nav, .site-header > .button { display: none; }.menu-button { display: grid; gap: 6px; padding: 12px 5px; background: transparent; border: 0; }.menu-button span { display: block; width: 28px; height: 2px; background: var(--ink); }
  .site-header.open nav { position: absolute; top: 77px; left: 0; right: 0; display: grid; gap: 0; padding: 12px 24px 24px; background: var(--paper); border-bottom: 2px solid var(--ink); }.site-header.open nav a { padding: 16px 0; border-bottom: 1px solid var(--line); font-size: 1.1rem; }
  .hero { grid-template-columns: 1fr; padding-top: 80px; }.hero-lab { width: min(88vw, 650px); margin: 62px auto 0; justify-self: center; }
  .manifesto, .contact, .section-head { grid-template-columns: 1fr; }.manifesto h2, .section-head h2, .section-head > p:last-child { grid-column: 1; }.section-number { margin-bottom: 10px; }
  .venture-card { grid-template-columns: 1fr; }.venture-visual { min-height: 440px; }
}

@media (max-width: 620px) {
  .brand { width: 145px; }.brand img { height: 40px; }
  .hero { min-height: auto; padding: 74px 20px 105px; }.hero h1 { font-size: clamp(3.6rem, 18vw, 5.2rem); }.hero h1 em { -webkit-text-stroke: 1.5px var(--ink); text-shadow: 4px 4px 0 var(--ink); }
  .hero-actions { align-items: flex-start; flex-direction: column; }.hero-lab { width: 92vw; margin-top: 50px; box-shadow: 7px 7px 0 var(--orange), 9px 9px 0 var(--ink); }
  .manifesto, .contact, .principles { padding-left: 20px; padding-right: 20px; }.work { padding-left: 20px; padding-right: 20px; }
  .venture-card { margin-top: 42px; box-shadow: 6px 6px 0 var(--ink); }.venture-copy { padding: 28px 24px 38px; }.clocktrail-logo { margin: 46px 0 30px; }.venture-copy .button { margin-top: 10px; }
  .venture-visual { min-height: 360px; padding: 25px; }.time-card { padding: 22px; }.time-card strong { font-size: 2.4rem; }
  .principle-grid { grid-template-columns: 1fr; }.principle-grid article { min-height: 250px; }.principle-grid h3 { margin-top: 45px; }
  .statement { min-height: 520px; }.statement h2 { font-size: clamp(3.2rem, 15vw, 5rem); }
  footer { grid-template-columns: 1fr; align-items: start; } footer > div { grid-column: 1; grid-row: auto; flex-wrap: wrap; } footer > p { grid-column: 1; }
  .chat-dock { left: 10px; right: 10px; bottom: max(10px, env(safe-area-inset-bottom)); justify-items: stretch; gap: 0; }
  .chat-toggle { min-height: 58px; padding-right: 8px; justify-self: end; }
  .chat-dock.is-open .chat-toggle { display: none; }
  .chat-eyes { transform: scale(.9); }
  .chat-prompt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .chat-panel { width: 100%; height: min(68dvh, 540px); max-height: calc(100dvh - 84px); border-radius: 22px 22px 10px 10px; box-shadow: 5px 5px 0 var(--ink); }
  .chat-panel-head { grid-template-columns: 42px minmax(0, 1fr) auto; gap: 8px; padding: 12px; }
  .mini-eyes { width: 42px; height: 28px; }
  .chat-panel-head span { font-size: .58rem; }
  .chat-panel h2 { overflow: hidden; margin-top: 1px; font-size: 1rem; text-overflow: ellipsis; white-space: nowrap; }
  .chat-head-actions { gap: 5px; }
  .chat-reset { padding: 7px 8px; font-size: .7rem; }
  .chat-close { width: 30px; height: 30px; font-size: 1.25rem; }
  .chat-messages { gap: 10px; padding: 13px; }
  .chat-message { max-width: 92%; padding: 9px 11px; font-size: .875rem; line-height: 1.4; }
  .chat-starters { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; padding: 0 12px 10px; overflow: visible; }
  .chat-starters button { min-width: 0; padding: 7px 8px; font-size: .7rem; line-height: 1.2; white-space: normal; }
  .chat-starters button:last-child { grid-column: 1 / -1; }
  .chat-form { gap: 7px; margin: 0 12px; padding: 7px 7px 7px 11px; border-radius: 16px; }
  .chat-send { width: 36px; height: 36px; }
  .chat-foot { flex-wrap: wrap; gap: 4px 12px; padding: 8px 12px 11px; font-size: .68rem; }
}

@media (max-width: 380px) {
  .mini-eyes { display: none; }
  .chat-panel-head { grid-template-columns: minmax(0, 1fr) auto; }
  .chat-panel-head span { font-size: .55rem; }
}
