.home-page { overflow-x: clip; }
.home-narrative { height: 520svh; }
.home-stage { position: sticky; top: 0; height: 100svh; overflow: clip; --intro: 1; --work: 0; --ai: 0; --split: 0; --exit: 0; --orb-width: 100%; --orb-height: 100%; --orb-radius: 4%; --eye-offset: 0%; }
.scene-canvas { position: absolute; inset: var(--site-header) 0 0; transform: translateY(calc(var(--exit) * -84%)); will-change: transform; }
.character-field { position: absolute; inset: 0 50% 0 0; overflow: hidden; background: linear-gradient(180deg, #707e97 0%, #d1c2bb 100%); opacity: 0; animation: reveal-field 2.4s .3s ease forwards; }
.character { position: absolute; inset: 0; transform: translate(var(--gaze-x, 0px), var(--gaze-y, 0px)); transition: transform .2s ease-out; cursor: pointer; }
.character:focus-visible { outline: 1px solid #ffffff80; outline-offset: -8px; }
.eye { position: absolute; left: 50%; top: 50%; width: var(--orb-width); height: var(--orb-height); transform: translate(calc(-50% - var(--eye-offset)), -50%); will-change: width, height, transform; }
.eye-right { opacity: var(--split); transform: translate(calc(-50% + var(--eye-offset)), -50%); }
.eye-surface { width: 100%; height: 100%; top: 50%; transform: translateY(-50%); background: #000; border-radius: var(--orb-radius); transition: border-radius .6s ease, height .65s cubic-bezier(.22,1,.36,1); position: relative; }
.eye-surface::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 4px 9px 28.6px rgba(255,255,255,.76); opacity: var(--split); }
/* Expressions follow the Figma domes, cups and capsules. The eye axes stay vertical. */
.character[data-expression='happy'] .eye-surface { height: 54.4%; border-radius: 52% 52% 8% 8% / 60% 60% 8% 8%; }
.character[data-expression='curious'] .eye-surface { height: 54.4%; border-radius: 8% 8% 52% 52% / 8% 8% 60% 60%; }
.character[data-expression='sleepy'] .eye-surface { height: 27.3%; border-radius: 100px; }
.character[data-expression='surprised'] .eye-surface { height: 72%; border-radius: 100px; }
.character[data-expression='thinking'] .eye-left .eye-surface { height: 42%; border-radius: 100px; }
.character[data-expression='thinking'] .eye-right .eye-surface { height: 30%; border-radius: 100px; }
.character.is-blinking .eye-surface { height: 8%; border-radius: 100px; transition-duration: .13s; }
.ai-atmosphere { position: absolute; inset: 0 0 0 50%; opacity: var(--ai); background: linear-gradient(180deg, #282e3e 0%, rgba(27,31,42,.58) 59%, rgba(9,10,14,0) 100%); }
.scene-copy { position: absolute; left: 62.1%; width: 31.3%; font-size: clamp(16px, 1.45vw, 26px); line-height: 1.503; font-weight: 500; letter-spacing: .01em; color: rgba(222,222,222,.8); }
.intro-copy { left: 55%; width: 40%; text-align: center; top: 45%; opacity: var(--intro); transform: translateY(calc((1 - var(--intro)) * 36px)); }
.phrase-window { overflow: hidden; min-height: 4.8em; position: relative; }
.intro-phrase { position: absolute; width: 100%; margin: 0; opacity: 0; transform: translateY(-120%); transition: transform 1.1s cubic-bezier(.22,1,.36,1), opacity .7s ease; }
.intro-phrase.is-current { opacity: 1; transform: translateY(0); }
.intro-phrase.is-leaving { opacity: 0; transform: translateY(120%); }
.mobile-break { display: none; }
.work-copy { top: 34.7%; opacity: var(--work); transform: translateY(calc((1 - var(--work)) * 28px)); }
.work-copy > p { margin: 0 0 1.5em; }
.home-marquee { width: 90%; overflow: hidden; margin-bottom: clamp(35px, 3.8vw, 65px); padding: 4px 0; }
.home-marquee-track, .bridge-rail { display: flex; gap: clamp(12px, 1.0767vw, 19px); width: max-content; will-change: transform; }
.home-project { display: block; width: clamp(76px, 7.11vw, 123px); aspect-ratio: 1; flex: 0 0 auto; overflow: hidden; border-radius: clamp(10px, .98vw, 17px); background: #eee; }
.home-project img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s ease; }
.home-project:hover img, .home-project:focus-visible img { transform: scale(1.06); }
.home-project:focus-visible { outline-offset: -4px; }
.work-fallback { text-underline-offset: 5px; }
.conversation { position: absolute; inset: 0 5.56% 0 55.56%; opacity: var(--ai); transform: translateY(calc((1 - var(--ai)) * 40px)); }
.ai-welcome { position: absolute; top: 31%; left: 3%; width: 94%; padding: clamp(26px, 3vw, 52px); background: #000; border-radius: clamp(32px, 3.65vw, 63px); transition: opacity .35s; }
.ai-welcome p { margin: 0; font-size: clamp(14px, 1.25vw, 21px); line-height: 1.503; font-weight: 500; color: rgba(222,222,222,.8); }
.conversation.has-messages .ai-welcome { opacity: 0; pointer-events: none; }
[data-ai-embed] { height: 100%; }
.home-page #yu-ai-widget-root.is-embedded { position: absolute; inset: 0; z-index: 2; width: 100%; }
.home-page .yu-ai-widget.is-embedded { width: 100%; height: 100%; letter-spacing: .01em; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-panel { display: flex; flex-direction: column; position: absolute; inset: clamp(16px, 2.5vh, 28px) 0 calc(5% + 20px); width: 100%; height: auto; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; backdrop-filter: none; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-content { flex: 1 1 0; min-height: 0; margin: 0 0 18px; padding: 0; height: auto !important; max-height: none !important; overflow: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-suggestions,
.home-page #yu-ai-widget-root.is-embedded .yu-ai-composer { flex-shrink: 0; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-content.is-empty { display: none; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-row { width: 94%; margin: 0 auto 18px; padding: clamp(22px, 2.2vw, 38px) clamp(24px, 3vw, 52px); border-radius: clamp(28px, 3.65vw, 63px); background: #000; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-row.user { background: rgba(255,255,255,.035); margin: 0 auto 18px; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-text { font-size: clamp(14px, 1.25vw, 21px); line-height: 1.503; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-row > .yu-ai-star { display: none; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-suggestions { margin: auto 0 18px; gap: 8px; flex-wrap: wrap; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-suggestion-btn { font-size: clamp(12px, .96vw, 15px); opacity: .75; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-input-wrap { flex-shrink: 0; height: clamp(60px, 6vw, 104px); padding: 0 clamp(20px, 2.5vw, 44px); border: 0; border-radius: 99px; background: rgba(255,255,255,.05); }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-input { font-size: clamp(13px, 1.28vw, 21px); letter-spacing: .08em; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-send { font-size: 24px; width: 38px; height: 38px; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-nav-chip { margin-bottom: 16px; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-history-toggle { margin-bottom: 12px; }
.home-page #yu-ai-widget-root.is-embedded .yu-ai-panel::before, .home-page #yu-ai-widget-root.is-embedded .yu-ai-pill { display: none; }
.project-bridge { position: absolute; top: calc(100% - var(--exit) * 47%); left: 0; width: 100%; padding: 0 3.4%; color: #dedede; text-decoration: none; opacity: var(--exit); }
.bridge-rail { margin-bottom: 38px; }
.bridge-rail img { width: clamp(76px, 7.11vw, 123px); aspect-ratio: 1; object-fit: cover; }
.bridge-label { display: flex; justify-content: space-between; font-size: clamp(18px, 1.6vw, 28px); }
.home-controls { position: absolute; left: 50%; right: 0; bottom: 8px; display: flex; justify-content: center; align-items: center; gap: 18px; font: 400 11px 'Outfit', sans-serif; letter-spacing: .1em; color: #999; mix-blend-mode: difference; }
.home-controls button { background: none; border: 0; padding: 8px 0; cursor: pointer; font: inherit; letter-spacing: inherit; }
.scene-next { display: flex; gap: 20px; align-items: center; }
.home-page.is-leaving { opacity: 0; transition: opacity .45s ease; }
.no-script { position: fixed; inset: 35% 10%; background: #000; z-index: 90; }
@keyframes reveal-field { to { opacity: 1; } }
@media (max-width: 680px) {
  .scene-canvas { display: block; }
  .character-field { inset: 0 0 50%; }
  .ai-atmosphere { inset: 50% 0 0; }
  .eye { max-width: none; }
  .eye-surface::after { box-shadow: inset 3px 6px 17px rgba(255,255,255,.76); }
  .scene-copy { left: 9%; width: 82%; font-size: 18px; }
  .intro-copy { top: 65%; }
  .work-copy { top: 56%; }
  .work-copy > p { margin-bottom: 1em; }
  .home-marquee { width: 100%; margin-bottom: 24px; }
  .home-project { width: 60px; border-radius: 10px; }
  .conversation { inset: 48% 7% 0; }
  .ai-welcome { top: 12%; padding: 25px; border-radius: 30px; }
  .ai-welcome p { font-size: 15px; }
  .home-page #yu-ai-widget-root.is-embedded .yu-ai-panel { inset: 12px 0 calc(12% + 12px); }
  .home-page #yu-ai-widget-root.is-embedded .yu-ai-row { padding: 20px 24px; }
  .home-page #yu-ai-widget-root.is-embedded .yu-ai-text { font-size: 14px; }
  .home-page #yu-ai-widget-root.is-embedded .yu-ai-input-wrap { height: 58px; padding: 0 20px; }
  .home-page #yu-ai-widget-root.is-embedded .yu-ai-input { font-size: 13px; letter-spacing: .03em; }
  .home-page #yu-ai-widget-root.is-embedded .yu-ai-suggestions { margin-bottom: 10px; }
  .home-page #yu-ai-widget-root.is-embedded .yu-ai-suggestion-btn { font-size: 12px; padding: 7px 11px; }
  .home-controls { left: 9%; right: 7%; justify-content: flex-end; bottom: max(4px, env(safe-area-inset-bottom)); font-size: 10px; }
  .project-bridge { padding: 0 7%; }
  .bridge-rail { margin-bottom: 28px; }
}
@media (max-height: 600px) and (min-width: 681px) {
  :root { --site-header: 60px; }
  .home-page #yu-ai-widget-root.is-embedded .yu-ai-panel { inset: 12px 0 calc(8% + 12px); }
  .home-page #yu-ai-widget-root.is-embedded .yu-ai-input-wrap { height: 56px; }
}
@media (prefers-reduced-motion: reduce) {
  .character-field { opacity: 1; }
}

.home-project[hidden] { display: none; }

.home-page #yu-ai-widget-root.is-embedded .yu-ai-stage,
.home-page #yu-ai-widget-root.is-embedded .yu-ai-toolbar { display: none; }

/* The embedded conversation uses one bubble surface, without nested bubble padding. */
.home-page #yu-ai-widget-root.is-embedded .yu-ai-text {
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: #c1c1c1;
}
.home-page #yu-ai-widget-root.is-embedded .yu-ai-row.user .yu-ai-text {
  background: transparent;
  color: #a8a8a8;
}
.home-page #yu-ai-widget-root.is-embedded .yu-ai-body { gap: 18px; }
