/* Homepage rooms following the category map. The map and Rescue Line own their own visual systems. */
@font-face {
  font-family: "Studio Instrument Serif";
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/instrument-serif-italic.woff2") format("woff2");
}

.room, .room-contact, #apps {
  --room-accent: #c9ec9b;
  --room-rule: #435b4e;
  scroll-margin-top: 0;
}
.room {
  position: relative;
  display: grid;
  align-content: center;
  min-block-size: 100vh;
  min-block-size: 100svh;
  padding-block: clamp(3.5rem, 9vh, 7.5rem);
}
.room .shell, #apps .shell { width: min(88%, 1350px); }
.room h2, #apps .app-guide-choices h2, .room-contact h2 {
  font-size: clamp(3.6rem, 6.7vw, 6rem);
  font-weight: 530;
  line-height: 1;
  letter-spacing: -.04em;
  text-wrap: balance;
}
.room h2 em, .room-contact h2 em {
  font-family: "Studio Instrument Serif", Georgia, serif;
  font-style: italic;
  font-weight: 400;
  color: var(--room-accent);
}
.room-copy > p, .exhibit-copy > p {
  color: var(--room-muted);
  margin: 1.4rem 0 1.55rem;
  max-width: 39ch;
  font-size: clamp(1.05rem, 1.45vw, 1.35rem);
  line-height: 1.5;
}
.room-link {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  min-height: 44px;
  color: var(--cta-fill);
  font-weight: 620;
  text-decoration: underline;
  text-underline-offset: .35em;
  text-decoration-thickness: 1px;
}
.room-link svg { width: 1.05em; height: 1.05em; }
.room-link:hover { color: var(--cta-hover); text-decoration-thickness: 2px; }
.room a:focus-visible, .room button:focus-visible { outline-color: var(--room-accent); }
.room [hidden] { display: none !important; }

/* The guide uses the same labeled nodes as the map while retaining native select and fragment navigation. */
#apps { border: 0; background: #101c20; }
#apps .app-guide-layout {
  min-height: 100vh;
  min-height: 100svh;
  align-items: center;
  grid-template-columns: minmax(0, .86fr) minmax(0, 1.05fr);
  gap: clamp(3rem, 9vw, 10rem);
  padding-block: clamp(4rem, 10vh, 8rem);
}
#apps .app-guide-choices h2 { max-width: 11ch; }
#apps .guide-return { margin-bottom: 1.6rem; }
#apps .app-guide-picker { margin-block: 2rem .65rem; max-width: 31rem; }
#apps .app-guide-details { position: relative; isolation: isolate; padding: 1rem 0; }
#apps .guide-lens {
  display: grid; position: relative; place-items: center;
  width: clamp(7.5rem, 11vw, 10rem); aspect-ratio: 1; margin: 0 0 1.25rem;
  background: #203639; border: 1px solid #4f7373; border-radius: 50%;
}
#apps .guide-lens::before, #apps .guide-lens::after {
  content: ""; position: absolute; pointer-events: none;
  inset: -15% -32%; border: 1px solid #39595b; border-radius: 50%;
  transform: rotate(-21deg) scaleY(.68);
}
#apps .guide-lens::after { inset: -14% -24%; transform: rotate(33deg) scaleY(.73); border-color: #425d5d; }
#apps .guide-lens img { width: 48%; height: 48%; object-fit: contain; z-index: 1; }
#apps .guide-lens span { position: absolute; inset: 9%; border: 1px solid #3f6264; border-radius: 50%; }
#apps .app-guide-detail { scroll-margin-top: 10vh; }
#apps .app-guide-detail h3 { color: #e6faf1; font-size: clamp(3rem, 5.5vw, 5.4rem); }
#apps .app-guide-detail > p { max-width: 48ch; color: #c2d4d0; }
#apps .app-guide-flow { border-color: #385556; }
#apps:not(.is-enhanced) .app-guide-detail:not(:first-of-type):not(:target),
#apps:not(.is-enhanced):has(.app-guide-detail:target) .app-guide-detail:not(:target) { display: none; }

/* Each service sits on a branch of the engineering map. */
.room-services { background: #101713; --room-muted: #c0cec0; }
.room-grid, .studio-room-inner {
  display: grid; align-items: center;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1.12fr);
  gap: clamp(2rem, 4vw, 5.5rem);
}
.room-services .room-copy { max-width: 35rem; }
.service-constellation {
  position: relative; min-width: 0; width: 100%;
  aspect-ratio: 1.25; isolation: isolate;
}
.service-routes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; pointer-events: none; }
.route-orbits { stroke: #2a3930; stroke-width: 1; }
.route-pipes { stroke: #739484; stroke-width: 1.6; }
.route-pulses { stroke: #d8ffa4; stroke-width: 2.7; stroke-dasharray: 4 340; stroke-linecap: round; }
.service-core, .service-mark {
  display: grid; place-items: center; border-radius: 100%; aspect-ratio: 1; background: #22342a;
}
.service-core {
  position: absolute; left: 50%; top: 50%; width: clamp(3.5rem, 6.6vw, 6.1rem);
  transform: translate(-50%, -50%); border: 1px solid #839c7e; outline: 1px solid #425546; outline-offset: .5rem;
}
.service-core img { width: 60%; height: 60%; object-fit: contain; }
.service-node {
  position: absolute; width: clamp(6rem, 12vw, 11rem); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
  text-align: center; font-size: clamp(.83rem, 1.15vw, 1.08rem); font-weight: 610; line-height: 1.24;
}
.service-mark { width: clamp(3.1rem, 5.8vw, 5.4rem); border: 1px solid #667d68; }
.service-mark img { width: 49%; height: 49%; object-fit: contain; }
.service-ai { left: 17%; top: 10%; }
.service-wp { left: 82%; top: 19%; }
.service-api { left: 20%; top: 61%; }
.service-app { left: 76%; top: 68%; }
.service-node:hover .service-mark, .service-node:focus-visible .service-mark { border-color: var(--room-accent); background: #344c39; }
.service-node:hover > span:last-child, .service-node:focus-visible > span:last-child { text-decoration: underline; }

/* One large exhibit at a time with native keyboard-operable product selection. */
.room-products { background: #13171e; --room-muted: #bdc7d4; --room-accent: #e3ebff; }
.room-product-shell { display: grid; gap: clamp(1.4rem, 3.1vh, 2.6rem); }
.product-room-heading { display: flex; justify-content: space-between; align-items: end; gap: 1.25rem; }
.product-room-heading h2 { font-size: clamp(3.15rem, 5.6vw, 5.5rem); }
.product-selector { display: flex; width: 100%; flex-wrap: wrap; gap: .35rem clamp(1.2rem, 3vw, 3.6rem); border-bottom: 1px solid #3d4651; }
.product-selector button {
  padding: .6rem 0 .8rem; border: 0; border-bottom: 2px solid transparent; background: none;
  color: #aebaca; min-height: 44px; font-size: clamp(.89rem, 1.15vw, 1.05rem); text-align: left;
}
.product-selector button[aria-selected=true] { color: #f3f6fc; border-bottom-color: #e2ecff; }
.studio-exhibit { display: grid; align-items: center; grid-template-columns: minmax(0,.65fr) minmax(0,1.45fr); gap: clamp(1.5rem,4.3vw,5rem); }
.exhibit-copy h3 { color: #f3f5fa; font-size: clamp(2.8rem,5.5vw,5rem); line-height: .99; text-wrap: balance; }
.exhibit-art { min-width: 0; }
.exhibit-art img { width: 100%; height: auto; max-height: 51svh; object-fit: contain; object-position: right center; }
.exhibit-art figcaption { text-align: right; margin-top: .55rem; font-size: .88rem; color: #bac5d0; }

/* Walk the receipt across three real systems on a quieter, daylight surface. */
.room-studio { --room-accent: #315138; --room-muted: #3a4c40; color: #1d3127; background: #dbe5d6; }
.studio-room-inner { grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); }
.studio-example { align-self: center; }
.studio-example figcaption { color: #354b3a; font-size: 1.07rem; margin-bottom: 1.6rem; }
.studio-example ol { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); list-style: none; margin: 0; padding: 0; }
.studio-example li { position: relative; min-width: 0; }
.studio-example li:not(:last-child)::before { content: ""; position: absolute; left: 4.6rem; right: .4rem; top: 2.05rem; border-top: 1px solid #7d967d; }
.studio-example a { display: inline-flex; flex-direction: column; gap: 1rem; color: inherit; position: relative; }
.studio-example a:hover strong { text-decoration: underline; }
.studio-example img { width: 4.1rem; height: 4.1rem; padding: .9rem; border: 1px solid #92a78d; border-radius: 50%; background: #eef3e8; object-fit: contain; }
.studio-example strong, .studio-example small { display: block; }
.studio-example strong { font-size: clamp(1.15rem, 1.9vw, 1.7rem); font-weight: 570; }
.studio-example small { color: #435441; font-size: .89rem; margin-top: .1rem; }
.studio-advice { grid-column: 1/-1; display: flex; flex-wrap: wrap; gap: .2rem 2rem; border-top: 1px solid #a7b8a2; padding-top: .65rem; margin-top: clamp(.8rem, 3vw, 3rem); }
.room-studio .room-link { color: var(--cta-on-light); }
.studio-advice a { display: inline-flex; align-items: center; min-height: 44px; color: var(--cta-on-light); text-decoration: underline; }

.room-contact { width: min(88%, 1350px); min-height: 100vh; min-height: 100svh; align-items: center; border-top: 0; }
.room-contact .inquiry-intro { --inq-accent: #c6e6b8; }
.room-contact .inquiry-intro h2 { font-size: clamp(3.65rem, 6.8vw, 6rem); max-width: 10ch; }
.room-contact .inquiry-intro h2 em { color: var(--inq-accent); }
.room-contact .inquiry-panel { border: 0; border-top: 1px solid #4a6252; background: #18211c; padding: clamp(1.25rem, 3vw, 3rem); }
.room-contact .inquiry-channels a span { font-size: .83rem; }
.room-contact .inquiry-channels strong { overflow-wrap: anywhere; }
.room-contact .inquiry-lead { font-size: clamp(1.06rem, 1.43vw, 1.33rem); }

@media (prefers-reduced-motion: no-preference) {
  .room-in-view .route-pulses use { animation: route-pulse 6s linear infinite; }
  .route-pulses use:nth-child(2) { animation-delay: -2s; }
  .route-pulses use:nth-child(3) { animation-direction: reverse; animation-delay: -3.6s; }
  .route-pulses use:nth-child(4) { animation-delay: -1s; }
  @keyframes route-pulse { to { stroke-dashoffset: -344; } }
  .service-mark { transition: background .2s, border-color .2s, transform .25s; }
  .service-node:is(:hover,:focus-visible) .service-mark { transform: translateY(-3px); }
  .studio-exhibit:not([hidden]) .exhibit-art { animation: exhibit-arrive .45s cubic-bezier(.18,.72,.25,1); }
  @keyframes exhibit-arrive { from { opacity: .6; transform: translateY(.6rem); } }
}
@media (max-width: 800px) {
  .room, .room-contact { padding-block: clamp(3.75rem,9svh,6.2rem); }
  .room .shell, #apps .shell, .room-contact { width: 89%; }
  #apps .app-guide-layout, .room-grid, .studio-room-inner { grid-template-columns: minmax(0,1fr); gap: clamp(2rem,7vw,4rem); }
  #apps .app-guide-layout { padding-block: clamp(3rem,8vh,5rem); }
  #apps .guide-return { margin-bottom: .9rem; }
  #apps .app-guide-picker { margin-top: 1.3rem; }
  #apps .app-guide-detail { scroll-margin-top: 1.5rem; }
  #apps .guide-lens { width: 5rem; margin: 0 0 .8rem .85rem; }
  #apps .app-guide-choices h2 { max-width: 15ch; }
  .service-constellation { width: min(100%, 35rem); justify-self: center; }
  .service-node { width: clamp(5.5rem,22vw,9rem); font-size: .89rem; }
  .service-mark { width: clamp(3rem,9vw,4.4rem); }
  .service-core { width: clamp(3.3rem,10vw,4.85rem); }
  .studio-exhibit { grid-template-columns: minmax(0,1fr); gap: 1.5rem; }
  .exhibit-art { grid-row: 1; }
  .exhibit-art img { max-height: 40svh; object-position: left center; }
  .exhibit-art figcaption { text-align: left; }
  .studio-example ol { max-width: 39rem; }
  .studio-advice { margin-top: 0; }
}
@media (max-width: 490px) {
  .room h2, #apps .app-guide-choices h2, .room-contact .inquiry-intro h2 { font-size: clamp(3.05rem,13vw,4.35rem); }
  .room h2 { max-width: 12ch; }
  .product-room-heading { display: block; }
  .product-room-heading h2 { max-width: none; }
  .product-room-heading .room-link { margin-top: .3rem; }
  .product-selector { gap: 0 1.1rem; }
  .product-selector button { min-height: 44px; padding: .35rem 0; }
  .service-node { font-size: .78rem; }
  .studio-example img { width: 3.4rem; height: 3.4rem; padding: .72rem; }
  .studio-example li:not(:last-child)::before { top: 1.68rem; left: 3.68rem; }
  .studio-advice { gap: 0 1.2rem; }
  .room-contact .inquiry-intro h2 { max-width: 12ch; }
}

.room-products:has([data-active-product=tir]) { background: #101c20; --room-accent: #c2e9d8; }
.room-products:has([data-active-product=importer-kit]) { background: #181e14; --room-accent: #d3ed9e; }
.room-products:has([data-active-product=imagenious]) { background: #211b1c; --room-accent: #f5d1b3; }
.room-products:has([data-active-product=ai-database-analytics]) { background: #1b1925; --room-accent: #ded3ff; }
.exhibit-art img {
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent), linear-gradient(to bottom, transparent, black 7%, black 92%, transparent);
  mask-composite: intersect;
}
