.experience {
  --cell-size: 35px;
  --animation-opacity: 0.18;
  --enquiry-height: clamp(210px, calc(100svh - var(--cell-size) * 10), 630px);
  --enquiry-width: 490px;
  --layout-end: calc(var(--cell-size) * 2);
  display: flex;
  flex-direction: column;
  position: relative;
  isolation: isolate;
  min-height: 640px;
  min-height: max(640px, 100svh);
  overflow: hidden;
  background-image: linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: var(--cell-size) var(--cell-size);
}
.field, .wash { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.field { z-index: -2; transition: opacity 1.2s; }
.experience:not([data-phase="identity"]) .field { opacity: var(--animation-opacity); }
.wash {
  z-index: -1;
  background: var(--wash);
  transition: opacity 1.2s;
}
.masthead { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.masthead, .home-layout, .footer { width: 100%; max-width: 1820px; margin-inline: auto; transition: opacity 1.3s, transform 1.3s; }
.masthead { position: relative; z-index: 4; min-height: calc(var(--cell-size) * 3); padding: 16px calc(var(--cell-size) * 2); }
.wordmark { font-size: 16px; font-weight: 800; letter-spacing: -.055em; }
h1, h2, .wordmark { font-family: var(--font-heading); }
.wordmark-dot { color: var(--text-subtle); }
.colour-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--border); background: var(--surface); color: var(--control-text); }
.colour-toggle svg { filter: grayscale(1); }
.colour-toggle:hover { border-color: var(--border-focus); }
.colour-toggle[aria-pressed="true"] { border-color: var(--border-focus); background: var(--surface-selected); }
.colour-toggle[aria-pressed="true"] svg { filter: none; }
.home-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--enquiry-width);
  gap: var(--cell-size);
  align-items: center;
  min-height: calc(100svh - var(--cell-size) * 6);
  padding: calc(var(--cell-size) * 2) var(--layout-end) calc(var(--cell-size) * 2) calc(var(--cell-size) * 2);
}
.hero {
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  align-self: center;
  min-width: 0;
}
.eyebrow { margin: 0 0 30px; font-size: 12px; letter-spacing: .16em; color: var(--text-muted); line-height: 1.8; }
h1 { margin: 0; font-size: clamp(32px, 3.5vw, 60px); font-weight: 600; line-height: 1.12; text-wrap: balance; }
.hero h1 { font-size: clamp(32px, 7.5cqi, 72px); }
.mobile-intro { display: none; }
:root[data-welcome="pending"] [data-welcome-headline],
:root:is([data-welcome="pending"], [data-welcome="headline"], [data-welcome="waiting"]) [data-welcome-question] { opacity: 0; }
.enquiry { display: flex; flex-direction: column; gap: 24px; min-width: 0; min-height: var(--enquiry-height); max-height: var(--enquiry-height); overflow-y: auto; padding: 20px; border: 1px solid var(--border-muted); background: var(--chat-bg); scroll-margin-block: 24px; }
.enquiry-conversation { margin-top: auto; }
.enquiry-composer { display: flex; align-items: flex-end; gap: 8px; padding: 6px 8px; border: 1px solid var(--border); background: var(--page-bg); }
.enquiry-composer:focus-within { border-color: var(--border-focus); box-shadow: 0 0 0 1px var(--border-focus); }
.enquiry textarea { display: block; flex: 1; width: 100%; min-width: 0; min-height: 40px; max-height: calc(2lh + 16px); resize: none; overflow-y: auto; padding: 8px; border: 0; border-radius: 0; background: transparent; color: var(--text); font-size: 16px; line-height: 24px; }
.enquiry textarea:focus-visible { outline: none; }
.enquiry textarea { scrollbar-width: thin; scrollbar-color: var(--scrollbar) transparent; }
.enquiry textarea::-webkit-scrollbar { width: 6px; }
.enquiry textarea::-webkit-scrollbar-track { background: transparent; }
.enquiry textarea::-webkit-scrollbar-thumb { background: var(--scrollbar); }
.enquiry textarea::-webkit-scrollbar-button { display: none; }
.enquiry textarea::placeholder { color: var(--text-placeholder); opacity: 1; }
.chat-send { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 40px; padding: 0; border: 0; border-radius: 50%; background: var(--text); color: var(--page-bg); }
.chat-send:disabled { background: var(--disabled-bg); color: var(--text-placeholder); }
.footer { position: relative; margin-top: auto; min-height: calc(var(--cell-size) * 3); padding: 20px calc(var(--cell-size) * 2); display: flex; align-items: center; }
.version { color: var(--text-subtle); font-size: 12px; letter-spacing: .08em; }
.experience:is([data-phase="identity"], [data-phase="emergence"]) :is(.masthead, .home-layout, .footer) { visibility: hidden; opacity: 0; transform: translateY(22px); pointer-events: none; }
.experience[data-phase="identity"] .wash, .experience[data-phase="emergence"] .wash { opacity: 0; }
@media (max-width: 1199px), (pointer: coarse) and (max-width: 1366px) {
  .masthead, .home-layout, .footer { padding-inline: 24px; }
  .masthead, .footer { padding-block: 18px; min-height: 80px; }
  .wordmark { line-height: 1.1; }
  .wordmark-word { display: block; }
  .home-layout { display: flex; flex-direction: column; gap: 32px; min-height: 0; padding-block: 24px 40px; }
  .hero { width: 100%; }
  h1 { max-width: 1000px; font-size: clamp(32px, 5vw, 52px); }
  .hero h1 { font-size: clamp(32px, 5vw, 52px); }
  .desktop-break { display: none; }
}
@media (max-width: 600px), (max-width: 960px) and (max-height: 500px) {
  .hero { display: none; }
  .mobile-intro { display: block; }
  .mobile-intro h1 { max-width: 34ch; font-size: 22px; line-height: 1.35; font-weight: 500; }
  .home-layout { gap: 24px; padding-top: 12px; }
  .eyebrow { font-size: 11px; letter-spacing: .12em; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

.experience:is([data-phase="identity"], [data-phase="emergence"]) {
  height: 100svh;
  min-height: 100svh;
}
