/* miris.tech - Isometric Whimsy Design */
:root {
  --bg-cream: #f6f2ed;
  --bg-lavender: #ede6f5;
  --surface: #faf7ff;
  --text-head: #3d2c5e;
  --text-body: #4a4063;
  --accent-coral: #f4a896;
  --accent-pistachio: #a8d8b9;
  --accent-periwinkle: #9bb8ed;
  --shadow-mauve: #c4b5d4;
  --lavender-gray: #7e6ba4;
  --iso-angle: 26.565deg;
}

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

html {
  overflow: hidden;
  height: 100vh;
}

body {
  overflow-x: scroll;
  overflow-y: hidden;
  height: 100vh;
  background: var(--bg-cream);
  font-family: 'Nunito', sans-serif;
  font-weight: 400;
  font-size: clamp(0.95rem, 1.8vw, 1.15rem);
  line-height: 1.7;
  letter-spacing: 0.005em;
  color: var(--text-body);
  scrollbar-width: none;
}

body::-webkit-scrollbar {
  display: none;
}

.scroll-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  height: 100vh;
  width: fit-content;
}

/* --- Panels --- */
.panel {
  min-height: 100vh;
  height: 100vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.panel-overture {
  min-width: 100vw;
  background: var(--bg-cream);
}

.panel-philosophy {
  min-width: 120vw;
  background: var(--bg-lavender);
}

.panel-projects {
  min-width: 140vw;
  background: var(--bg-cream);
}

.panel-process {
  min-width: 120vw;
  background: var(--bg-lavender);
}

.panel-contact {
  min-width: 80vw;
  background: var(--bg-cream);
}

.panel-content {
  width: 100%;
  height: 100%;
  position: relative;
  padding: 6vh 5vw;
}

/* --- Typography --- */
.section-title {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.15;
  letter-spacing: -0.01em;
  color: var(--text-head);
  margin-bottom: 1rem;
}

.section-body {
  max-width: 38ch;
  color: var(--text-body);
}

.label-tag {
  font-family: 'Fira Code', monospace;
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lavender-gray);
  margin-right: 0.5em;
}

.logo-text {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-head);
}

.logo-tagline {
  font-family: 'Fira Code', monospace;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--lavender-gray);
  display: block;
  margin-top: 0.5rem;
}

/* --- Overture Panel --- */
.overture-content {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding-left: 8vw;
}

.overture-logo {
  position: relative;
  z-index: 10;
}

.iso-scene {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 1;
}

/* Chimney smoke */
.chimney-smoke {
  position: absolute;
  top: 15%;
  right: 25%;
  z-index: 2;
}

.smoke-puff {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--shadow-mauve);
  position: absolute;
  opacity: 0;
  animation: rise 3s ease-out infinite;
}

.smoke-1 { animation-delay: 0s; left: 0; }
.smoke-2 { animation-delay: 1s; left: 8px; }
.smoke-3 { animation-delay: 2s; left: 4px; }

@keyframes rise {
  0% { opacity: 0.6; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-40px) scale(1.5); }
}

/* Conveyor belt */
.conveyor {
  position: absolute;
  bottom: 28%;
  right: 18%;
  width: 120px;
  height: 20px;
  overflow: hidden;
  z-index: 2;
}

.conveyor-item {
  width: 14px;
  height: 10px;
  border-radius: 2px;
  position: absolute;
  top: 5px;
  animation: convey 4s linear infinite;
}

.ci-1 { background: var(--accent-coral); animation-delay: 0s; }
.ci-2 { background: var(--accent-pistachio); animation-delay: 1.3s; }
.ci-3 { background: var(--accent-periwinkle); animation-delay: 2.6s; }

@keyframes convey {
  from { transform: translateX(-20px); }
  to { transform: translateX(120px); }
}

/* --- Philosophy Panel --- */
.philosophy-content {
  display: flex;
  align-items: center;
  gap: 6vw;
  padding-left: 6vw;
}

.philosophy-building {
  display: flex;
  flex-direction: column-reverse;
  gap: 0;
  width: 340px;
  flex-shrink: 0;
}

.floor {
  padding: 1.2rem 1.5rem;
  border-left: 3px solid var(--shadow-mauve);
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.floor:hover {
  transform: translateX(6px);
}

.floor-craft { background: color-mix(in srgb, var(--accent-coral) 12%, var(--surface)); }
.floor-play { background: color-mix(in srgb, var(--accent-pistachio) 12%, var(--surface)); }
.floor-story { background: color-mix(in srgb, var(--accent-periwinkle) 12%, var(--surface)); }
.floor-code { background: color-mix(in srgb, var(--shadow-mauve) 12%, var(--surface)); }

.floor-label {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  font-size: 1.3rem;
  color: var(--text-head);
  margin-bottom: 0.3rem;
}

.floor-desc {
  font-size: 0.9rem;
  color: var(--text-body);
  line-height: 1.5;
}

.philosophy-text {
  max-width: 480px;
  padding-top: 4vh;
}

/* --- Projects Panel --- */
.projects-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 8vw;
}

.projects-title {
  margin-bottom: 3rem;
}

.iso-shelves {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.shelf-row {
  display: flex;
  gap: 4vw;
  align-items: flex-end;
}

.shelf-row-2 {
  margin-left: 6vw;
}

.shelf-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  cursor: default;
  transition: transform 0.3s ease-out;
}

.shelf-item:hover {
  transform: scale(1.08);
}

.shelf-item:hover .shelf-prism {
  box-shadow: 6px 6px 0 var(--shadow-mauve);
}

.shelf-label {
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--lavender-gray);
}

/* --- Isometric Prism --- */
.iso-prism {
  width: 80px;
  height: var(--h, 80px);
  position: relative;
  transform-style: preserve-3d;
  transition: box-shadow 0.3s ease-out;
}

.iso-prism .face {
  position: absolute;
}

.iso-prism .face.top {
  width: 80px;
  height: 40px;
  bottom: calc(100%);
  left: 0;
  background: var(--color, var(--accent-pistachio));
  clip-path: polygon(0% 50%, 50% 0%, 100% 50%, 50% 100%);
  opacity: 0.9;
}

.iso-prism .face.left {
  width: 40px;
  height: var(--h, 80px);
  left: 0;
  top: 0;
  background: color-mix(in srgb, var(--color, var(--accent-pistachio)) 80%, #000);
  transform: skewY(26.565deg);
  transform-origin: top left;
}

.iso-prism .face.right {
  width: 40px;
  height: var(--h, 80px);
  right: 0;
  top: 0;
  background: color-mix(in srgb, var(--color, var(--accent-pistachio)) 60%, #000);
  transform: skewY(-26.565deg);
  transform-origin: top right;
}

/* --- Process Panel --- */
.process-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-left: 8vw;
}

.process-title {
  margin-bottom: 3rem;
}

.pipeline {
  display: flex;
  align-items: flex-end;
  gap: 0;
}

.pipeline-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.6rem;
  transition: transform 0.3s ease-out;
}

.pipeline-stage:hover {
  transform: scale(1.08);
}

.stage-label {
  font-family: 'Fraunces', serif;
  font-weight: 600;
  font-variation-settings: 'SOFT' 100, 'WONK' 1;
  font-size: 1.1rem;
  color: var(--text-head);
}

.stage-desc {
  font-size: 0.85rem;
  color: var(--text-body);
  max-width: 160px;
  text-align: center;
  line-height: 1.4;
}

.pipeline-connector {
  width: 60px;
  height: 2px;
  background: var(--shadow-mauve);
  margin: 0 1rem;
  align-self: center;
  position: relative;
  flex-shrink: 0;
}

.pipeline-connector::after {
  content: '';
  position: absolute;
  right: -4px;
  top: -3px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--shadow-mauve);
}

/* --- Contact Panel --- */
.contact-content {
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-scene {
  display: flex;
  align-items: flex-end;
  gap: 5vw;
}

.bench-scene {
  position: relative;
  width: 200px;
  height: 200px;
}

.iso-bench {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
}

.bench-seat {
  width: 80px;
  height: 12px;
  background: var(--accent-coral);
  border-radius: 3px;
}

.bench-leg {
  width: 6px;
  height: 24px;
  background: color-mix(in srgb, var(--accent-coral) 70%, #000);
  position: absolute;
  top: 12px;
}

.bench-leg-l { left: 8px; }
.bench-leg-r { right: 8px; }

.pixel-character {
  position: absolute;
  bottom: 42px;
  left: 50%;
  transform: translateX(-50%);
  width: 32px;
  height: 32px;
  display: grid;
  grid-template-columns: repeat(8, 4px);
  grid-template-rows: repeat(8, 4px);
}

.contact-letter {
  max-width: 400px;
}

.contact-title {
  margin-bottom: 0.8rem;
}

.contact-info {
  margin: 1.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.contact-line {
  font-family: 'Nunito', sans-serif;
  font-size: 1rem;
  color: var(--text-body);
}

.colophon {
  margin-top: 2rem;
  font-family: 'Fira Code', monospace;
  font-size: 0.75rem;
  letter-spacing: 0.03em;
  color: var(--shadow-mauve);
}

/* --- Floating Particles --- */
.particles-layer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  pointer-events: none;
  z-index: 100;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 8px;
  height: 8px;
  opacity: 0.2;
  animation: drift linear infinite alternate;
  clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%);
}

@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(-30px, -20px, 0); }
}

/* --- Progress Bar --- */
.progress-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  height: 4px;
  width: 0%;
  background: linear-gradient(90deg, var(--accent-coral), var(--accent-pistachio));
  z-index: 200;
  transition: width 0.1s linear;
}

/* --- Generative Iso Buildings (JS-created) --- */
.iso-building {
  position: absolute;
  transform-style: preserve-3d;
}

.iso-building .bldg-top {
  position: absolute;
  bottom: 100%;
  left: 0;
  opacity: 0.85;
  clip-path: polygon(0% 50%, 50% 0%, 100% 50%, 50% 100%);
}

.iso-building .bldg-left {
  position: absolute;
  left: 0;
  top: 0;
  transform: skewY(26.565deg);
  transform-origin: top left;
}

.iso-building .bldg-right {
  position: absolute;
  right: 0;
  top: 0;
  transform: skewY(-26.565deg);
  transform-origin: top right;
}

.iso-building:hover {
  transform: scale(1.08);
  z-index: 10;
}

.iso-building {
  transition: transform 0.3s ease-out;
  cursor: default;
}

/* --- Pixel character cells (JS-created) --- */
.px-cell {
  width: 4px;
  height: 4px;
}
