/* a6c.boo · neomorphic digital playground
   palette: #F0EDF8 #E2DFF0 #B8B5CB #7B7891 #6366A0 #3A3752 #D4789C #F0A07A
   fonts:   Nunito (display), Karla (body), Inconsolata (accent)
*/

:root {
  --c-light:      #F0EDF8;
  --c-base:       #E2DFF0;
  --c-shadow:     #B8B5CB;
  --c-muted:      #7B7891;
  --c-primary:    #6366A0;
  --c-dark:       #3A3752;
  --c-pink:       #D4789C;
  --c-peach:      #F0A07A;

  --neo-raise:    8px 8px 16px #B8B5CB, -8px -8px 16px #F0EDF8;
  --neo-raise-sm: 4px 4px 8px  #B8B5CB, -4px -4px 8px  #F0EDF8;
  --neo-raise-lg: 14px 14px 28px #B8B5CB, -14px -14px 28px #F0EDF8;
  --neo-press:    inset 8px 8px 16px #B8B5CB, inset -8px -8px 16px #F0EDF8;
  --neo-press-sm: inset 4px 4px 8px  #B8B5CB, inset -4px -4px 8px  #F0EDF8;

  --ease-bounce:  cubic-bezier(0.34, 1.56, 0.64, 1);

  --grid-unit:    64px;
  --max-w:        1200px;
  --gutter:       24px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  background: var(--c-base);
  color: var(--c-dark);
  font-family: 'Karla', system-ui, sans-serif;
  font-size: 17px;
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { height: 100%; }

body {
  min-height: 100vh;
  overflow: hidden;
  position: relative;
}

.svg-defs { position: absolute; width: 0; height: 0; pointer-events: none; }

/* ===== Grid Underlay ===== */
.grid-underlay {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(184, 181, 203, 0.32) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(184, 181, 203, 0.32) 1px, transparent 1px);
  background-size: var(--grid-unit) var(--grid-unit);
  opacity: 0.22;
  mix-blend-mode: multiply;
}

/* ===== Scroll Container ===== */
.scroll-container {
  height: 100vh;
  width: 100vw;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  position: relative;
  z-index: 1;
}

.scroll-container::-webkit-scrollbar { width: 0; height: 0; }

/* ===== Room ===== */
.room {
  width: 100vw;
  height: 100vh;
  min-height: 600px;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  background: var(--c-base);
}

.room-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

.room-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px;
}

.room-inner-center {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

/* 8-column grid */
.grid-8 {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: var(--gutter);
  width: 100%;
  align-items: center;
}

/* ===== Divider Line ===== */
.divider-line {
  position: absolute;
  top: 0;
  left: 5%;
  right: 5%;
  height: 1px;
  background: rgba(184, 181, 203, 0.4);
  opacity: 0.08;
  z-index: 3;
  transition: opacity 1.2s ease-in-out;
}

.room.is-near .divider-line { opacity: 0.4; }

/* ===== Typography ===== */
.display-title {
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: clamp(56px, 10vw, 96px);
  letter-spacing: -0.03em;
  line-height: 0.95;
  color: var(--c-muted);
  text-shadow:
    2px 2px 4px rgba(184, 181, 203, 0.9),
    -2px -2px 4px rgba(240, 237, 248, 0.9);
}

.display-title-lg { font-size: clamp(64px, 11vw, 108px); }
.display-title-circle { font-size: clamp(48px, 6vw, 72px); margin-bottom: 6px; }

.body-lead {
  font-family: 'Karla', sans-serif;
  font-size: clamp(17px, 1.4vw, 20px);
  font-weight: 400;
  line-height: 1.72;
  color: var(--c-dark);
  max-width: 42ch;
}

.body-text {
  font-size: 17px;
  line-height: 1.72;
  color: var(--c-dark);
}

.body-text-secondary { color: var(--c-muted); }

.room-tag,
.meta-label,
.meta-chip,
.tile-num,
.tile-name,
.dot-nav-name {
  font-family: 'Inconsolata', monospace;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: lowercase;
  color: var(--c-muted);
}

.room-tag {
  display: inline-block;
  margin-bottom: 14px;
  color: var(--c-primary);
}

.meta-label-dim { color: var(--c-muted); opacity: 0.6; }
.meta-label-signature { display: block; margin-top: 16px; opacity: 0.7; }

.meta-chip {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 10px;
  background: var(--c-base);
  box-shadow: var(--neo-press-sm);
  color: var(--c-muted);
  margin-right: 8px;
}

.meta-chip-accent { color: var(--c-pink); }

.hello-meta { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 8px; }

/* ===== Neomorphic Surfaces ===== */
.neo-raised {
  background: var(--c-base);
  box-shadow: var(--neo-raise);
  border-radius: 24px;
  transition: box-shadow 0.3s var(--ease-bounce), transform 0.3s var(--ease-bounce);
  position: relative;
}

.neo-raised::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  filter: url(#noise);
  opacity: 0.35;
  mix-blend-mode: overlay;
}

.neo-inset {
  background: var(--c-base);
  box-shadow: var(--neo-press);
  border-radius: 24px;
  position: relative;
}

.neo-inset::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  filter: url(#noise);
  opacity: 0.3;
  mix-blend-mode: overlay;
}

/* ===== Room 1 · Hello ===== */
.hello-card {
  grid-column: 1 / span 5;
  padding: 48px 52px;
  position: relative;
}

.hello-spacer {
  grid-column: 6 / span 3;
  display: flex;
  justify-content: center;
  align-items: center;
}

.neo-dot-cluster {
  display: flex;
  gap: 18px;
  padding: 24px;
  border-radius: 32px;
  background: var(--c-base);
  box-shadow: var(--neo-press);
}

.neo-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--c-base);
  box-shadow: var(--neo-raise-sm);
}

.neo-dot:nth-child(2) { background: var(--c-base); box-shadow: 4px 4px 8px #B8B5CB, -4px -4px 8px #F0EDF8, inset 0 0 0 3px rgba(240, 160, 122, 0.2); }

.scroll-nudge {
  position: absolute;
  bottom: 36px;
  left: 52px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.scroll-label {
  font-family: 'Inconsolata', monospace;
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--c-muted);
  text-transform: lowercase;
}

.scroll-arrow {
  width: 14px;
  height: 14px;
  border-right: 2px solid var(--c-muted);
  border-bottom: 2px solid var(--c-muted);
  transform: rotate(45deg);
  animation: scrollBounce 2s ease-in-out infinite;
}

@keyframes scrollBounce {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.9; }
  50%      { transform: rotate(45deg) translate(4px, 4px); opacity: 0.4; }
}

/* ===== Room 2 · What ===== */
.what-grid { align-items: stretch; }

.what-panel-tall {
  grid-column: 1 / span 4;
  padding: 48px 44px;
  min-height: 480px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.what-panel-wide {
  grid-column: 5 / span 4;
  padding: 40px 44px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  justify-content: center;
  margin-top: 80px;
}

.dialog-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.feature-list {
  list-style: none;
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.feature-list li {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Inconsolata', monospace;
  font-size: 14px;
  color: var(--c-muted);
  letter-spacing: 0.04em;
}

.feature-bullet {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--c-base);
  box-shadow: 2px 2px 4px var(--c-shadow), -2px -2px 4px var(--c-light), inset 0 0 0 2px var(--c-primary);
}

.feature-bullet-warm {
  box-shadow: 2px 2px 4px var(--c-shadow), -2px -2px 4px var(--c-light), inset 0 0 0 2px var(--c-peach);
}

.inline-svg-art {
  margin-top: 18px;
  border-radius: 12px;
  padding: 12px 14px;
  background: var(--c-base);
  box-shadow: var(--neo-press-sm);
}

/* ===== Room 3 · How ===== */
.how-wrap {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 48px;
}

.how-header {
  max-width: 480px;
  margin-left: 4%;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 22px;
  max-width: 620px;
  width: 66%;
  margin-left: auto;
  margin-right: 4%;
}

.how-tile {
  aspect-ratio: 1 / 1;
  padding: 12px;
  border-radius: 22px;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
}

.how-tile:hover {
  box-shadow: var(--neo-raise-lg);
  transform: translateY(-3px);
}

.how-tile:active {
  box-shadow: var(--neo-press);
  transform: translateY(0);
}

.tile-art {
  flex: 1;
  border-radius: 16px;
  background: var(--c-base);
  box-shadow: var(--neo-press-sm);
  overflow: hidden;
  position: relative;
}

.tile-art svg,
.tile-art canvas {
  display: block;
  width: 100%;
  height: 100%;
}

.tile-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 10px 6px 4px;
}

.tile-num { color: var(--c-primary); font-weight: 600; }
.tile-name { color: var(--c-muted); }

/* ===== Room 4 · Who ===== */
.compass-lines {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}

.compass-line {
  position: absolute;
  background: rgba(184, 181, 203, 0.5);
  height: 1px;
  transform-origin: 0 50%;
  top: 50%;
  left: 50%;
  opacity: 0;
  transition: opacity 1.2s ease;
}

.room-who.is-active .compass-line { opacity: 0.45; }

.who-circle {
  width: min(620px, 70vmin);
  height: min(620px, 70vmin);
  border-radius: 50%;
  padding: 8%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.who-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  pointer-events: none;
}

.who-content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 60%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.body-lead-circle { font-size: clamp(15px, 1.1vw, 17px); max-width: 100%; }
.body-text-circle { font-size: 14px; color: var(--c-muted); max-width: 100%; }

/* ===== Room 5 · Bye ===== */
.bye-trough {
  padding: 56px 64px 48px;
  margin: 0 4%;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  position: relative;
}

.bye-content {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.bye-sig {
  margin-top: 18px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.wave-signature { opacity: 0.85; }

.bye-actions {
  margin-top: 28px;
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  justify-content: center;
}

/* ===== Buttons ===== */
.neo-btn {
  font-family: 'Nunito', sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  padding: 14px 28px;
  border: none;
  border-radius: 14px;
  background: var(--c-base);
  color: var(--c-primary);
  box-shadow: var(--neo-raise-sm);
  cursor: pointer;
  transition: box-shadow 0.3s var(--ease-bounce), transform 0.3s var(--ease-bounce), color 0.3s ease;
}

.neo-btn:hover {
  box-shadow: var(--neo-raise);
  transform: translateY(-2px);
  color: var(--c-pink);
}

.neo-btn:active {
  box-shadow: var(--neo-press-sm);
  transform: translateY(0);
}

.neo-btn-inset {
  box-shadow: var(--neo-press-sm);
  color: var(--c-muted);
}

.neo-btn-inset:hover {
  box-shadow: var(--neo-raise-sm);
  color: var(--c-primary);
  transform: translateY(-2px);
}

/* ===== Dot Navigation ===== */
.dot-nav {
  position: fixed;
  right: 32px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 50;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 18px 10px;
  border-radius: 22px;
  background: var(--c-base);
  box-shadow: var(--neo-raise-sm);
}

.dot-nav-item {
  border: none;
  background: transparent;
  cursor: pointer;
  padding: 4px 6px;
  display: flex;
  align-items: center;
  gap: 12px;
  position: relative;
}

.dot-nav-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--c-base);
  box-shadow: var(--neo-raise-sm);
  transition: all 0.4s var(--ease-bounce);
  display: block;
}

.dot-nav-name {
  font-size: 11px;
  opacity: 0;
  transform: translateX(-6px);
  transition: all 0.3s ease;
  color: var(--c-muted);
  pointer-events: none;
  position: absolute;
  right: 28px;
  white-space: nowrap;
}

.dot-nav-item:hover .dot-nav-name { opacity: 1; transform: translateX(0); }

.dot-nav-item:hover .dot-nav-dot {
  transform: scale(1.15);
}

.dot-nav-item.is-active .dot-nav-dot {
  box-shadow: var(--neo-press-sm);
  background: var(--c-base);
  position: relative;
}

.dot-nav-item.is-active .dot-nav-dot::after {
  content: "";
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--c-pink);
  box-shadow: 0 0 6px rgba(212, 120, 156, 0.6);
}

/* ===== Corner Tag ===== */
.corner-tag {
  position: fixed;
  left: 28px;
  bottom: 22px;
  z-index: 40;
  display: flex;
  flex-direction: column;
  gap: 2px;
  pointer-events: none;
}

/* ===== Bounce-Enter Animation ===== */
@keyframes bounceIn {
  0%   { opacity: 0; transform: translateY(40px) scale(0.95); }
  50%  { opacity: 1; transform: translateY(-8px) scale(1.02); }
  70%  {              transform: translateY(4px)  scale(0.99); }
  100% {              transform: translateY(0)    scale(1); }
}

.bounce-enter {
  opacity: 0;
  transform: translateY(40px) scale(0.95);
  will-change: transform, opacity;
}

.bounce-enter.is-visible {
  animation: bounceIn 0.7s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.bounce-enter[data-stagger="0"].is-visible { animation-delay: 0ms; }
.bounce-enter[data-stagger="1"].is-visible { animation-delay: 80ms; }
.bounce-enter[data-stagger="2"].is-visible { animation-delay: 160ms; }
.bounce-enter[data-stagger="3"].is-visible { animation-delay: 240ms; }
.bounce-enter[data-stagger="4"].is-visible { animation-delay: 320ms; }

/* ===== Responsive ===== */
@media (max-width: 900px) {
  .room-inner { padding: 36px 28px; }
  .hello-card { grid-column: 1 / span 8; padding: 36px 28px; }
  .hello-spacer { display: none; }
  .what-panel-tall { grid-column: 1 / span 8; min-height: auto; padding: 36px 28px; }
  .what-panel-wide { grid-column: 1 / span 8; margin-top: 18px; padding: 32px 28px; min-height: auto; }
  .how-grid { width: 100%; max-width: 100%; margin: 0; grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 1fr); }
  .how-header { margin-left: 0; }
  .bye-trough { margin: 0; padding: 40px 28px 36px; }
  .dot-nav { right: 12px; padding: 12px 8px; gap: 12px; }
  .dot-nav-dot { width: 11px; height: 11px; }
  .corner-tag { left: 14px; bottom: 12px; }
  .scroll-nudge { left: 28px; bottom: 22px; }
}

@media (max-width: 540px) {
  .display-title { font-size: 48px; }
  .display-title-lg { font-size: 56px; }
  .display-title-circle { font-size: 40px; }
  .room-inner { padding: 28px 20px; }
  .hello-card, .what-panel-tall, .what-panel-wide { padding: 28px 22px; }
  .how-grid { grid-template-columns: 1fr; grid-template-rows: repeat(6, minmax(180px, auto)); }
  .how-tile { aspect-ratio: 1.2 / 1; }
  .bye-actions { flex-direction: column; gap: 12px; width: 100%; }
  .neo-btn { width: 100%; }
  .who-circle { width: 86vw; height: 86vw; }
  .who-content { max-width: 78%; }
  .dot-nav-name { display: none; }
}
