/* Public navigation and motion, shared without changing each product's palette. */
@view-transition { navigation: auto; }
::view-transition-old(root) { animation: site-exit 140ms ease both; }
::view-transition-new(root) { animation: site-enter 220ms ease both; }
@keyframes site-exit { to { opacity: 0; } }
@keyframes site-enter { from { opacity: 0; transform: translateY(5px); } }
/* Keep the navigation visible while the page content changes. */
.home-header, .product-site-nav, .topbar { view-transition-name: site-navigation; }
::view-transition-group(site-navigation) { animation: none; }
::view-transition-old(site-navigation) { animation: none; opacity: 0; }
::view-transition-new(site-navigation) { animation: none; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--site-header-height, 84px) + 16px); }
.home-section, .gold-page-section, .oikos-section { scroll-margin-top: 0; }
.site-skip-link {
  position: fixed; top: 12px; left: 12px; z-index: 10000;
  padding: 12px 16px; border-radius: 8px; background: #efc778; color: #101810;
  font: 600 14px/1.4 system-ui, sans-serif; text-decoration: none;
  transform: translateY(-160%);
}
.site-skip-link:focus { transform: none; }
:where(a, button, summary, input, textarea, select):focus-visible {
  outline: 2px solid #e9b963; outline-offset: 4px;
}
.home-nav a[aria-current="page"], .product-switcher-menu a[aria-current="page"] {
  box-shadow: inset 3px 0 #dca452;
}
.home-products-menu > div, .product-switcher-menu {
  max-height: min(70svh, 520px); overflow-y: auto; overscroll-behavior: contain;
}
.product-site-nav { z-index: 100; }
.home-brand { min-width: 0; }
.home-menu-toggle { flex-shrink: 0; }
.topnav .home-products-menu { position: relative; }
.topnav .home-products-menu summary { cursor: pointer; padding: 10px; list-style: none; }
.topnav .home-products-menu > div {
  position: absolute; top: 100%; right: 0; z-index: 100;
  display: grid; width: min(320px, calc(100vw - 32px)); padding: 8px;
  border: 1px solid #705b35; border-radius: 10px; background: #101810;
  box-shadow: 0 16px 36px #0006;
}
.topnav .home-products-menu a { display: grid; gap: 4px; min-height: 44px; padding: 12px; white-space: normal; }
.topnav .home-products-menu small { opacity: .7; font-size: 11px; }
@media (max-width: 900px) {
  .topbar .topnav { overflow: visible; flex-wrap: wrap; gap: 2px; }
  .topbar .topnav > a { min-height: 44px; padding: 12px 10px; }
  .topbar .topnav .home-products-menu { position: static; }
  .topbar .topnav .home-products-menu > div { position: absolute; top: 100%; left: 16px; right: 16px; width: auto; }
}
@media (max-width: 1100px) {
  .home-header { min-height: 64px; padding: 10px 16px; }
  :is(.home-page, .gold-page, .oikos-page) .home-header .home-menu-toggle { display: grid; }
  :is(.home-page, .gold-page, .oikos-page) .home-header .home-nav {
    position: absolute; top: calc(100% + 6px); left: 12px; right: 12px;
    display: none; width: auto; max-height: calc(100svh - 90px);
    overflow: auto; padding: 12px; border: 1px solid #705b35;
    border-radius: 12px; background: rgba(8, 12, 9, .98);
    box-shadow: 0 18px 40px #0006; white-space: normal;
  }
  :is(.home-page, .gold-page, .oikos-page) .home-header .home-nav.is-open { display: grid; grid-template-columns: 1fr; gap: 4px; }
  :is(.home-page, .gold-page, .oikos-page) .home-header .home-nav > a, :is(.home-page, .gold-page, .oikos-page) .home-header .home-products-menu > summary {
    display: flex; align-items: center; min-height: 44px; padding: 12px;
  }
  :is(.home-page, .gold-page, .oikos-page) .home-header .home-products-menu > div {
    position: static; width: 100%; min-width: 0; max-height: none;
    box-shadow: none; margin: 4px 0; overflow: visible;
  }
  :is(.home-page, .gold-page, .oikos-page) .home-header .home-products-menu > div a { white-space: normal; }
}
@media (max-width: 540px) {
  .product-site-brand { min-width: 0; }
  .product-site-brand > span { min-width: 0; }
  .product-site-brand strong { font-size: 12px; }
  .product-site-brand small { white-space: normal; font-size: 8px; }
  .product-site-nav { gap: 6px; }
  .product-site-home, .product-switcher summary { padding: 0 8px; }
  .product-site-home { display: flex; flex-shrink: 0; min-height: 40px; }
  .product-site-brand img { width: 34px; height: 34px; }
  .product-site-brand { gap: 7px; }
  .product-site-brand strong { font-size: 11px; }
}
@media (max-width: 360px) {
  .product-site-brand strong { font-size: 10px; white-space: normal; overflow-wrap: anywhere; line-height: 1.2; }
}
.avatar-card canvas.gold-puppet {
  width: 100%; height: 100%; padding: 4%; object-fit: contain; object-position: center;
  filter: drop-shadow(0 10px 24px #0005);
}
canvas.waterfall-cutout {
  /* Screen blending erased the darker moving pigments against the still. */
  mix-blend-mode: normal;
  opacity: 1;
}
/* Preserve the painted controls; feedback moves the original artwork. */
.chat-stage .gold-panel {
  display: flex;
  flex-direction: column;
  left: 7.4%; top: 26%; width: 56.6%; height: 55.5%;
  border: 1px solid #cba35b18; border-radius: 18px;
  background: linear-gradient(140deg, #25241432, #080c083d 55%, #080a0733);
  box-shadow: inset 0 1px #ffe1a10d, inset 0 -18px 30px #0003, 0 12px 36px #0002;
}
.chat-stage .gold-development-notice {
  flex: 0 0 auto;
  margin: 8px 8px 0;
  padding: 7px 10px;
  border: 1px solid #af5555;
  border-left: 3px solid #ed8580;
  border-radius: 8px;
  color: #fff0ee;
  background: #4b1e22;
  font-size: .8125rem;
  line-height: 1.4;
}
.chat-stage .gold-development-notice strong {
  display: block;
  color: #ffc6be;
}
.chat-stage .conversation {
  position: static;
  flex: 1;
  height: auto;
  padding: clamp(12px, 1.3vw, 22px);
  overscroll-behavior: contain;
  mask-image: linear-gradient(transparent, #000 10px, #000 calc(100% - 10px), transparent);
}
.chat-stage .message {
  max-width: 89%; padding: clamp(12px, 1.1vw, 18px) clamp(14px, 1.35vw, 22px);
  margin-bottom: 16px; border-color: #c5a16345; border-radius: 16px 16px 16px 5px;
  background: linear-gradient(135deg, #343225b8, #141b13e8 85%);
  box-shadow: inset 0 1px #ffedc814, 0 4px 0 #03060375, 0 12px 24px #0003;
  backdrop-filter: blur(10px);
  animation: chat-message-arrive 320ms cubic-bezier(.16, 1, .3, 1) both;
}
.chat-stage .message::before {
  content: 'GOLD'; display: block; margin-bottom: 7px;
  color: #e0b86e; font: 700 9px/1.2 Inter, system-ui, sans-serif; letter-spacing: 1.7px;
}
.chat-stage .message--user {
  border-color: #96b78347; border-radius: 16px 16px 5px 16px;
  background: linear-gradient(135deg, #3a4c2ed9, #1c2d20ee);
}
.chat-stage .message--user::before { content: 'VOCÊ'; color: #bdd0a6; }
.chat-stage .message--thinking::before { content: none; }
.chat-stage .message p {
  font-size: clamp(13px, 1.12vw, 17px); line-height: 1.65;
  color: #eee8d5;
}
.chat-stage .chat-back:active { transform: translateY(1px); }
.scene-toggle {
  position: absolute; z-index: 9; top: clamp(14px, 2vw, 28px); right: clamp(14px, 2vw, 28px);
  display: grid; place-items: center; width: 44px; height: 44px;
  padding: 8px; border: 1px solid #e2a63f8a; border-radius: 4px;
  color: #f5bd4d; background: #070805ad; box-shadow: 0 0 18px #d5831821;
  backdrop-filter: blur(8px); cursor: pointer;
  transition: border-color 180ms, transform 180ms;
}
.scene-toggle[hidden] { display: none; }
.scene-toggle:hover { border-color: #efc778; transform: translateY(-1px); }
.scene-toggle:active { transform: translateY(2px); }
.scene-toggle svg { width: 22px; height: 22px; }
.scene-toggle__play, .scene-toggle[aria-pressed='true'] .scene-toggle__pause { display: none; }
.scene-toggle[aria-pressed='true'] .scene-toggle__play { display: block; }
.scene-is-paused .chat-stage__breath { animation-play-state: paused; }
canvas.scene-motion { pointer-events: none; }
@keyframes chat-message-arrive { from { opacity: 0; transform: translateY(9px); } to { opacity: 1; transform: none; } }
@media (min-width: 761px), (orientation: landscape) {
  .chat-stage .composer { background: none; }
  .chat-stage .composer::before {
    content: ''; position: absolute; inset: 0; pointer-events: none;
    background: url('Assets/composer-strip-empty.png') center / 100% 100% no-repeat;
    /* Leave the original painted circle to its interactive layer below. */
    mask-image: radial-gradient(ellipse 4.4444% 32% at 85.4444% 60.8%, transparent 98%, #000 100%);
    transition: filter 180ms ease;
  }
  .chat-stage .composer:focus-within::before { filter: brightness(1.08); }
  .chat-stage .composer textarea:focus-visible { outline: none; }
  .chat-stage .send-button { filter: none; transform: none; }
  .chat-stage .send-button::after {
    content: ''; position: absolute; left: 13.7439%; top: 8.0357%; width: 71.3969%; height: 71.4286%;
    border-radius: 50%; pointer-events: none;
    /* The very same circle and arrow, cropped from the original 900 × 125 strip. */
    background: url('Assets/composer-strip-empty.png') 89.02439% 80% / 1125% 156.25% no-repeat;
    transition: transform 160ms ease, filter 160ms ease;
  }
  .chat-stage .send-button:hover:not(:disabled)::after { filter: brightness(1.13); transform: translateY(-1px); }
  .chat-stage .send-button:active:not(:disabled)::after { filter: brightness(.92); transform: translateY(1px) scale(.98); }
  .chat-stage .send-button:focus-visible { outline: none; }
  .chat-stage .send-button:focus-visible::after { outline: 2px solid #e9b963; outline-offset: 3px; }
  .chat-stage .avatar-card {
    /* Center of the painted oval: 84% across, 37.8% down the 1672 × 941 art. */
    left: 73.2%; top: 18.45%; width: 21.6%; height: 38.7%;
    border-radius: 50%; clip-path: ellipse(49% 49%); background: radial-gradient(ellipse, #dbab4020, transparent 68%);
  }
  .chat-stage .avatar-card :is(img, canvas) { width: 100%; height: 100%; object-fit: contain; padding: 3%; }
}
@media (max-width: 760px) and (orientation: portrait) {
  .chat-stage .gold-panel {
    left: 12px; right: 12px; top: 76px; width: auto;
    height: calc(100svh - 176px - env(safe-area-inset-bottom)); border-radius: 18px;
  }
  .chat-stage .avatar-card { left: 25px; right: auto; top: 86px; width: 54px; height: 54px; border-radius: 17px; }
  .chat-stage .gold-mobile-chat-header { padding-left: 80px; }
  .chat-stage .gold-mobile-chat-header img { display: none; }
  .chat-stage .conversation { padding: 14px 12px; }
  .chat-stage .message { max-width: 95%; padding: 13px 14px; }
  .chat-stage .message p { font-size: 14px; }
  .scene-toggle, canvas.scene-motion { display: none; }
}
@media (max-height: 560px) and (orientation: landscape) {
  .chat-stage .gold-panel { height: 52%; }
  .chat-stage .message { padding: 10px 12px; margin-bottom: 10px; }
  .chat-stage .message::before { margin-bottom: 4px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .chat-stage .message { animation: none; }
  .chat-stage :is(.composer, .send-button, .chat-back, .scene-toggle), .chat-stage .composer::before, .chat-stage .send-button::after { transition: none; }
}
