:root {
  color-scheme: dark;
  --night: #030a21;
  --deep-blue: #061643;
  --ice: #eafcff;
  --cyan: #73f5ff;
  font-family: Inter, "Avenir Next", Avenir, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }

html { min-width: 320px; min-height: 100%; background: var(--night); }

body {
  min-width: 320px;
  min-height: 100svh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(ellipse at 50% 48%, rgba(12, 61, 143, 0.2), transparent 56%),
    linear-gradient(145deg, #020718 0%, #061539 52%, #020719 100%);
  color: var(--ice);
}

.home {
  display: grid;
  min-height: 100svh;
  place-items: center;
  padding: clamp(16px, 3.5vh, 38px) clamp(12px, 4vw, 56px);
}

.scene {
  position: relative;
  isolation: isolate;
  width: min(100%, 1300px, calc((100svh - 76px) * 1.537));
  aspect-ratio: 664 / 432;
  overflow: hidden;
  border: 1px solid rgba(116, 219, 255, 0.22);
  border-radius: 9px;
  background: #061643;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.48), 0 0 56px rgba(19, 105, 229, 0.13);
}

.visual-panel {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.scene-art,
.static-clean-side {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  pointer-events: none;
}

.scene-art { z-index: 0; }

.static-clean-side {
  z-index: 1;
  -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 49%, rgba(0, 0, 0, 0.18) 52%, rgba(0, 0, 0, 0.76) 56%, #000 59%);
  mask-image: linear-gradient(90deg, transparent 0%, transparent 49%, rgba(0, 0, 0, 0.18) 52%, rgba(0, 0, 0, 0.76) 56%, #000 59%);
}

.core-retouch {
  position: absolute;
  z-index: 2;
  top: 50%;
  left: 15.1%;
  width: clamp(136px, 15vw, 200px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  object-fit: cover;
  pointer-events: none;
  border-radius: 50%;
  clip-path: circle(50% at center);
}

.brand-wordmark {
  position: absolute;
  z-index: 3;
  top: 50%;
  left: 15.1%;
  margin: 0;
  transform: translate(-50%, -50%);
  color: #f1ffff;
  font-size: clamp(14px, 2vw, 22px);
  font-weight: 720;
  letter-spacing: 0.035em;
  line-height: 1;
  text-shadow: 0 0 4px rgba(148, 250, 255, 0.72), 0 0 10px rgba(28, 191, 255, 0.38);
  pointer-events: none;
}

.hex-menu {
  position: absolute;
  z-index: 4;
  inset: 0;
  pointer-events: none;
}

.hex-button {
  position: absolute;
  display: grid;
  width: clamp(60px, 9.2vw, 112px);
  aspect-ratio: 1.1 / 1;
  place-items: center;
  padding: 0;
  transform: translate(-50%, -50%);
  clip-path: polygon(26% 3%, 74% 3%, 98% 50%, 74% 97%, 26% 97%, 2% 50%);
  border: 0;
  background: linear-gradient(135deg, #b2fbff, #44c9ff 52%, #8cf5ff);
  color: var(--ice);
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 0 5px rgba(71, 220, 255, 0.44));
  transition: filter 200ms ease, transform 200ms ease;
  -webkit-tap-highlight-color: transparent;
}

.hex-button::before {
  position: absolute;
  z-index: 0;
  inset: 3px;
  clip-path: polygon(26% 3%, 74% 3%, 98% 50%, 74% 97%, 26% 97%, 2% 50%);
  background: linear-gradient(155deg, rgba(5, 35, 86, 0.99), rgba(2, 15, 48, 0.99) 72%);
  content: "";
}

.hex-button::after {
  position: absolute;
  z-index: 1;
  inset: 8px;
  clip-path: polygon(26% 3%, 74% 3%, 98% 50%, 74% 97%, 26% 97%, 2% 50%);
  border: 1px solid rgba(168, 247, 255, 0.34);
  content: "";
  pointer-events: none;
}

.hex-button span {
  position: relative;
  z-index: 2;
  display: block;
  max-width: 88%;
  overflow: hidden;
  color: #efffff;
  font-size: clamp(0.58rem, 0.9vw, 0.78rem);
  font-weight: 720;
  letter-spacing: 0.055em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

.hex-button:nth-child(1) { left: 70%; top: 17%; }
.hex-button:nth-child(2) { left: 90%; top: 14%; }
.hex-button:nth-child(3) { left: 82.5%; top: 30.5%; }
.hex-button:nth-child(4) { left: 76%; top: 76%; }
.hex-button:nth-child(5) { left: 63%; top: 88.5%; }
.hex-button:nth-child(6) { left: 90%; top: 88%; }

.hex-button:hover {
  transform: translate(-50%, -50%) scale(1.045);
  filter: drop-shadow(0 0 9px rgba(110, 246, 255, 0.85));
}

.hex-button:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
  filter: drop-shadow(0 0 10px rgba(110, 246, 255, 0.9));
}

.hex-button:active { transform: translate(-50%, -50%) scale(0.98); }

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 680px) {
  .home { padding: 16px 12px max(20px, env(safe-area-inset-bottom)); }

  .scene {
    display: flex;
    width: 100%;
    aspect-ratio: auto;
    flex-direction: column;
    gap: 10px;
    overflow: visible;
    border: 0;
    border-radius: 14px;
    background: transparent;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.4);
  }

  .visual-panel {
    position: relative;
    flex: none;
    width: 100%;
    aspect-ratio: 664 / 432;
    overflow: hidden;
    border: 1px solid rgba(116, 219, 255, 0.22);
    border-radius: 12px;
    background: #061643;
  }

  .core-retouch { width: clamp(56px, 15vw, 66px); }
  .brand-wordmark { font-size: clamp(13px, 3.8vw, 17px); }

  .hex-menu {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1px 0;
    padding: 3px 2px 4px;
  }

  .hex-button {
    position: relative;
    left: auto;
    top: auto;
    width: min(94%, 94px);
    aspect-ratio: 1.1 / 1;
    justify-self: center;
    transform: none;
  }

  .hex-button:nth-child(n) { left: auto; top: auto; }

  .hex-button span { font-size: clamp(0.65rem, 2.9vw, 0.79rem); }
  .hex-button:hover { transform: scale(1.04); }
  .hex-button:active { transform: scale(0.98); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Integração da animação aprovada: desenho original, sete acessos. */
.scene { aspect-ratio: 3 / 2; }
.visual-panel { background: url('/assets/reference-art.webp') center / 100% 100% no-repeat; }
.hex-button { width: 9.4%; min-width: 52px; background: transparent; clip-path: none; filter: drop-shadow(0 0 5px rgba(71,220,255,.44)); }
.hex-button::before, .hex-button::after { display: none; }
.hex-button svg { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hex-button polygon { fill: rgba(10,48,97,.25); stroke: #8aefff; stroke-width: 2; }
.hex-button:hover polygon, .hex-button:focus-visible polygon { fill: rgba(60,160,210,.25); stroke: #eaffff; }
.hex-button span { font-size: clamp(11px,1.2vw,16px); letter-spacing: .02em; }
.hex-button:nth-child(1) { left:69.3%;top:18.1%; }
.hex-button:nth-child(2) { left:90.4%;top:14.8%; }
.hex-button:nth-child(3) { left:83%;top:31.1%; }
.hex-button:nth-child(4) { left:76.1%;top:75%; }
.hex-button:nth-child(5) { left:63.2%;top:88%; }
.hex-button:nth-child(6) { left:90.1%;top:86.3%; }
.core-button { border:0; padding:10px; background:rgba(8,42,86,.74); color:#edffff; font:inherit; letter-spacing:.08em; border-radius:8px; cursor:pointer; text-shadow:0 0 10px #38cfff; }
.brand-wordmark { pointer-events:auto; }
.motion-toggle { position:absolute; bottom:10px;left:10px;z-index:5;background:#10396b;color:#d8faff;border:1px solid #5cb7dd;border-radius:6px;padding:8px 12px;cursor:pointer; }
#area-message:not(.sr-only) { margin:12px;text-align:center; }
@media(max-width:680px) {
 .scene { aspect-ratio:auto; }
 .visual-panel { aspect-ratio:3/2; }
 .hex-menu { grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; }
 .hex-button { width:min(94%,110px);min-width:0; }
 .hex-button:nth-child(n) { left:auto;top:auto; }
 .hex-button span { font-size:14px; }
 .motion-toggle { position:relative;bottom:auto;left:auto;align-self:center; }
}
