/* The home FV is one continuous space; archive/detail layouts keep site.css. */
.home-page>.masthead { position: absolute; inset: 0 5% auto 7%; width: auto; margin-inline: 0; z-index: 10; color: #223f59; border: 0; height: 104px; }
.home-page>.masthead .wordmark { position: relative; top: 24px; width: clamp(196px,12vw,224px); }
.home-page>.masthead .mission { display: none; }
.home-page>.masthead nav a:hover { color: #087a9c; }
.home-page .home-main { width: 100%; margin: 0; animation: none; }
.portal-leaving .home-main { transform: none; }
.home-space { --world-x: 0px; --world-y: 0px; --model-x: 0px; --model-y: 0px; --accent: #1b6585; position: relative; isolation: isolate; display: flex; align-items: center; width: 100%; height: 100svh; min-height: 710px; padding: 0; gap: 0; overflow: clip; background: #f6efdf; color: #233f58; }
.hero-atmosphere { position: absolute; inset: 0; overflow: hidden; pointer-events: none; background: radial-gradient(ellipse at 46% 0%,#efd0e3c7 0%,#efd0e300 50%),radial-gradient(ellipse at 8% 36%,#fff5dbe6 0%,#fff5db00 63%),radial-gradient(ellipse at 95% 5%,#add7f0b8 0%,#add7f000 51%),linear-gradient(178deg,#fbede7 4%,#faf0e0 46%,#a8cfe5 78%,#86aacb 100%); }
.hero-atmosphere::after { content: ""; position: absolute; inset: 0; background: url("./assets/paper-fiber.svg") repeat; background-size: 384px 384px; opacity: .32; mix-blend-mode: multiply; }
.space-light { position: absolute; inset: -20%; background: radial-gradient(ellipse at 67% 37%,#fffbefb3,transparent 39%),radial-gradient(ellipse at 87% 58%,#78d3e342,transparent 35%); transform: translate3d(var(--world-x),var(--world-y),0); transition: transform .9s ease-out; }
.space-floor { position: absolute; width: 155%; height: 58%; left: -20%; bottom: -26%; border-radius: 50%; background: radial-gradient(ellipse at 60% 12%,#fff1d078 0%,#b9d9ec24 34%,transparent 67%); box-shadow: 0 -30px 100px #d7e6ec24; transform: perspective(650px) rotateX(34deg) translate3d(var(--world-x),0,0); filter: blur(9px); transition: transform .9s ease-out; }
.space-shadow { position: absolute; left: 59%; top: 81%; width: 25%; height: 8%; border-radius: 50%; background: radial-gradient(ellipse,#2b507977 0%,#42638430 40%,transparent 72%); filter: blur(14px); animation: shadow-breathe 12s ease-in-out infinite paused; }
.space-foreground { position: absolute; inset: -10%; background: radial-gradient(ellipse at -10% 102%,#e9bdcb42 0%,transparent 54%),radial-gradient(ellipse at 106% 108%,#365f8747 0%,transparent 47%); transform: translate3d(calc(var(--world-x) * -1.5),calc(var(--world-y) * -1.5),0); transition: transform .9s ease-out; }
.home-space .hero-copy { position: relative; z-index: 3; width: 46%; margin-left: 7%; padding: 112px 0 140px; display: flex; flex-direction: column; align-items: flex-start; pointer-events: none; }
.home-space .hero-copy>* { pointer-events: auto; }
.home-page>.masthead nav,.home-space .hero-copy,.home-space .stage-caption,.home-space .model-status,.home-space .hero-scroll { text-shadow: 0 0 2px #fff9ed,0 0 10px #fff9edb3; }
.home-space .hero-explore { text-shadow: none; }
.hero-eyebrow { font-size: 9px; letter-spacing: .19em; color: #415c72; margin-bottom: 30px; }
.home-space .hero-copy h1 { font-family: "Yu Mincho","Hiragino Mincho ProN",serif; font-size: clamp(26px,2.7vw,43px); line-height: 1.6; letter-spacing: .045em; font-weight: 500; margin: 0; white-space: nowrap; }
.hero-service { font-size: clamp(64px,min(7.8vw,calc((100svh - 600px)/3)),116px); line-height: 1.02; letter-spacing: -.045em; font-weight: 300; margin-top: 23px; color: #28506f; }
.home-space .hero-copy .statement { color: #344e66; font-size: 13px; line-height: 2.1; margin-top: 28px; }
.home-space .hero-explore { margin-top: 30px; background: #285576; color: #fffdf5; min-height: 54px; padding: 16px 23px; gap: 34px; border: 1px solid #285576; font-size: 12px; transition: background .25s,transform .25s; }
.home-space .hero-explore:hover { background: #183f60; transform: translateY(-2px); }
.home-space .hero-explore-note { margin-top: 11px; color: #354f66; font-size: 10px; }
.home-space .hero-stage { position: absolute; inset: 0; z-index: 2; display: block; background: transparent; overflow: visible; pointer-events: none; }
.hero-model-space { position: absolute; top: -64px; left: -64px; width: calc(140% + 128px); height: calc(128% + 128px); transform: translate3d(var(--model-x),var(--model-y),0); transition: transform .65s ease-out; }
.hero-model-drift { width: 100%; height: 100%; animation: archive-float 12s ease-in-out infinite paused; }
.home-space model-viewer { display: block; width: 100%; height: 100%; min-height: 0; background: transparent; pointer-events: auto; --poster-color: transparent; --progress-bar-color: #2689a7; }
.home-space model-viewer:focus-visible { outline: 1px solid #36637a88; outline-offset: -18px; }
.home-space .model-loading { left: 50%; bottom: 20%; transform: translateX(-50%); color: #284a65; white-space: nowrap; }
.home-space .model-error { inset: 22% 8% 25% 50%; background: #faf5e9f2; color: #253f55; border: 1px solid #73899a; pointer-events: auto; }
.home-space .model-error button { border-color: #41637a; }
.home-space .stage-caption { position: absolute; z-index: 1; bottom: 5.5%; left: 7%; padding: 0; gap: 36px; align-items: end; pointer-events: auto; }
.hero-record-label { display: block; font-size: 8px; letter-spacing: .14em; color: #35536e; margin-bottom: 10px; }
.home-space .stage-caption h2 { font-size: 17px; letter-spacing: .04em; }
.home-space .stage-caption h2 small { font-size: 10px; color: #2d4c66; }
.home-space .stage-caption p { color: #2e4b65; font-size: 9px; margin-top: 2px; }
.home-space .stage-caption .model-detail-link { font-size: 10px; min-height: 33px; gap: 23px; border-color: #43657f77; }
.home-space .model-detail-link:hover { color: #0c5277; border-color: #264e6b; }
.home-space .stage-controls { position: absolute; z-index: 1; right: 5%; bottom: 5.5%; margin: 0; padding: 0; border: 0; flex-direction: column; align-items: end; gap: 13px; pointer-events: auto; }
.home-space .model-status { font-size: 9px; color: #254865; }
.home-space .viewer-buttons { gap: 9px; }
.home-space .viewer-buttons button { display: grid; place-items: center; padding: 0; width: 43px; min-width: 43px; height: 43px; min-height: 43px; border: 1px solid #42688973; border-radius: 50%; background: #f7f7eed9; color: #183f60; transition: background .2s,border-color .2s; }
.home-space .viewer-buttons button:hover { border-color: #285b7b; background: #c3e3edb3; }
.home-space .viewer-buttons button[aria-pressed=true] { border-color: #547a60; background: #dce9b6e6; }
.home-space .viewer-buttons .control-symbol { padding: 0; font-size: 20px; font-weight: 300; }
.home-space .viewer-buttons [data-motion-symbol] { font-size: 15px; }
.control-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-scroll { position: absolute; bottom: 0; left: 50%; z-index: 4; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 17px; padding: 15px 20px 0; color: #294b68; }
.hero-scroll>span:first-child { font-size: 8px; letter-spacing: .17em; }
.scroll-line { height: 42px; width: 1px; background: linear-gradient(#385d808c,#385d8014); }
.space-in-motion .hero-model-drift,.space-in-motion .space-shadow { animation-play-state: running; }
@keyframes archive-float { 0%,100% { transform: translate3d(0,5px,0) rotate(-.6deg); } 50% { transform: translate3d(0,-13px,0) rotate(.5deg); } }
@keyframes shadow-breathe { 0%,100% { transform: scale(1.02); opacity: .65; } 50% { transform: scale(.9); opacity: .42; } }
/* Expanded inspection uses a steady viewport and the same model instance. */
.home-page.viewer-expanded>.masthead { visibility: hidden; }
.home-page.viewer-expanded .home-space { overflow: visible; isolation: auto; }
.home-page.viewer-expanded .hero-copy,.home-page.viewer-expanded .hero-scroll { visibility: hidden; }
.home-space .hero-stage.is-expanded { position: fixed; inset: 0; z-index: 100; isolation: isolate; display: flex; flex-direction: column; width: 100%; height: 100dvh; background: radial-gradient(ellipse at 40% 30%,#fff8e8,#efe0e6 47%,#aecade 100%); padding: 20px 5% 30px; overflow: clip; pointer-events: auto; }
.home-space .hero-stage.is-expanded::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; background: url("./assets/paper-fiber.svg") repeat; background-size: 384px 384px; opacity: .32; mix-blend-mode: multiply; }
.hero-stage.is-expanded .hero-model-space { position: absolute; inset: -64px; width: auto; height: auto; transform: none; transition: none; }
.hero-stage.is-expanded .hero-model-drift { animation: none; transform: none; }
.hero-stage.is-expanded model-viewer { width: 100%; height: 100%; min-height: 0; }
.home-space .hero-stage.is-expanded .stage-caption { position: absolute; inset: auto 5% 98px; padding: 14px 0; }
.home-space .hero-stage.is-expanded .stage-controls { position: absolute; inset: auto 5% 30px; flex-direction: row; align-items: center; margin: 0; padding-top: 12px; border-top: 1px solid #43657f4d; }
.home-space .hero-stage.is-expanded .hero-record-label { display: none; }
.home-space .hero-stage.is-expanded [data-space-motion] { display: none; }
.home-space .hero-stage.is-expanded .model-error { inset: 15%; }
@media (min-width:761px) and (max-height:780px) {
  .home-space { min-height: 720px; }
  .home-space .hero-copy { padding-block: 140px 100px; }
  .hero-eyebrow { margin-bottom: 17px; }
  .home-space .hero-copy h1 { font-size: 28px; }
  .home-space .hero-service { font-size: 68px; margin-top: 16px; }
  .home-space .hero-copy .statement { margin-top: 16px; font-size: 12px; line-height: 1.8; }
  .home-space .hero-explore { margin-top: 16px; }
}
@media (min-width:761px) and (max-width:1100px) {
  .home-page>.masthead { inset-inline-start: 5%; }
  .hero-model-space { height: calc(108% + 128px); }
  .home-space .hero-copy { margin-left: 5%; width: 48%; }
  .home-space .hero-copy h1 { font-size: 28px; }
  .hero-service { font-size: 76px; }
  .home-space .stage-caption { left: 5%; gap: 20px; }
  .hero-scroll>span:first-child { display: none; }
}
@media (max-width:760px) {
  .home-page>.masthead { height: 82px; inset-inline: 6%; }
  .home-page>.masthead .wordmark { top: 10px; width: 144px; }
  .home-page>.masthead nav { font-size: 9px; gap: 15px; }
  .home-page>.masthead .nav-updates { display: none; }
  .home-space { height: 100svh; min-height: 740px; display: block; }
  .hero-atmosphere { background: radial-gradient(ellipse at 72% 0%,#edd0e1cf 0%,transparent 50%),radial-gradient(ellipse at 8% 22%,#fff7e4e6 0%,#fff7e400 57%),radial-gradient(ellipse at 95% 14%,#aed9ec99 0%,transparent 49%),linear-gradient(172deg,#f8e2e6 0%,#faeedc 35%,#b4d8e9 68%,#86afce 100%); }
  .space-light { background: radial-gradient(ellipse at 64% 38%,#fffcf0a6,transparent 43%),radial-gradient(ellipse at 85% 61%,#83d5e84d,transparent 32%); }
  .space-shadow { left: 26%; width: 50%; top: 71%; height: 5%; filter: blur(12px); }
  .space-foreground { background: radial-gradient(ellipse at -45% 100%,#e6bece4d,transparent 70%); }
  .home-space .hero-copy { position: absolute; inset: 97px 6% 71px; width: auto; margin: 0; padding: 0; display: block; }
  .hero-eyebrow { font-size: 8px; letter-spacing: .14em; margin-bottom: 10px; }
  .home-space .hero-copy h1 { font-size: clamp(21px,6.2vw,35px); line-height: 1.5; letter-spacing: .025em; margin: 0; }
  .hero-service { font-size: 28px; letter-spacing: -.04em; margin-top: 8px; line-height: 1.05; }
  .home-space .hero-copy .statement { display: none; }
  .home-space .hero-explore { position: absolute; bottom: 0; left: 0; right: 0; display: flex; margin: 0; padding: 16px 19px; min-height: 52px; font-size: 11px; }
  .home-space .hero-explore-note { position: absolute; left: 0; right: 0; bottom: -27px; margin: 0; text-align: center; font-size: 9px; }
  .hero-model-space { width: calc(100% + 128px); height: calc(100% + 128px); }
  .home-space .stage-caption { left: 6%; right: 6%; bottom: 195px; gap: 18px; }
  .hero-record-label { display: none; }
  .home-space .stage-caption h2 { font-size: 16px; line-height: 1.6; }
  .home-space .stage-caption h2 small { display: inline; font-size: 9px; padding-left: 7px; }
  .home-space .stage-caption p { font-size: 8px; }
  .home-space .stage-caption .model-detail-link { font-size: 9px; gap: 10px; }
  .home-space .stage-controls { right: 6%; left: 6%; bottom: 137px; display: flex; flex-direction: row; justify-content: end; margin: 0; padding: 0; }
  .home-space .model-status { position: absolute; left: 0; max-width: calc(100% - 214px); font-size: 8px; line-height: 1.7; }
  .home-space .viewer-buttons { gap: 8px; }
  .home-space .viewer-buttons button { width: 44px; min-width: 44px; height: 44px; min-height: 44px; flex: none; }
  .home-space .viewer-buttons .control-symbol { font-size: 18px; }
  .home-space .model-error { inset: 250px 6% 230px; font-size: 12px; }
  .hero-scroll { padding: 5px 25px 0; bottom: 0; }
  .hero-scroll>span:first-child { display: none; }
  .scroll-line { height: 24px; }
  .home-space .hero-stage.is-expanded { padding: 10px 6% 20px; }
  .hero-stage.is-expanded .hero-model-space { inset: -64px; }
  .home-space .hero-stage.is-expanded .stage-caption { inset: auto 6% 84px; padding: 10px 0; }
  .home-space .hero-stage.is-expanded .stage-controls { inset: auto 6% 20px; justify-content: end; padding-top: 14px; }
  .home-space .hero-stage.is-expanded .model-status { max-width: calc(100% - 166px); }
}
@media (max-width:380px) {
  .home-space .hero-copy { top: 94px; }
  .hero-service { font-size: 28px; }
  .home-space .model-status { max-width: calc(100% - 205px); }
  .home-space .viewer-buttons { gap: 5px; }
}
@media (prefers-reduced-motion:reduce) {
  .hero-model-drift,.space-shadow { animation: none; }
  .hero-model-space,.space-light,.space-floor,.space-foreground { transform: none; transition: none; }
  .space-floor { transform: perspective(650px) rotateX(34deg); }
}
