/* gabs.games - Horizontal Arcade Experience */
/* Colors: #3d3a34 #b87d6a #e8dcc8 #d4c9b5 #2a2520 #e8c97a #7a6f5f #6b8278 #8b7e6a #c2a67d */
/* Fonts: Space Grotesk 700, Inter 400/500, Archivo 400/500, Victor Mono italic 400 */

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

:root {
  --bg-dark: #2a2520;
  --bg-medium: #3d3a34;
  --bg-warm: #7a6f5f;
  --text-light: #e8dcc8;
  --text-muted: #d4c9b5;
  --accent-terracotta: #b87d6a;
  --accent-gold: #e8c97a;
  --accent-sage: #6b8278;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --accent-warm-brown: #8b7e6a;
  --accent-camel: #c2a67d;
  --font-annotation: 'Victor Mono', monospace;
  --font-archivo: 'Archivo', sans-serif;
}

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

body {
  font-family: var(--font-body);
  background: var(--bg-dark);
  color: var(--text-light);
  height: 100%;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
}

/* Grain Overlay */
.grain-overlay {
  position: fixed;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  filter: url(#grain);
  opacity: 0.12;
  mix-blend-mode: overlay;
  pointer-events: none;
  z-index: 1000;
  background: transparent;
}

/* Rail Track */
.rail-track {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  width: 60vw;
  height: 3px;
  background: rgba(212, 201, 181, 0.15);
  z-index: 100;
  border-radius: 2px;
}

.rail-progress {
  height: 100%;
  width: 0%;
  background: var(--accent-terracotta);
  border-radius: 2px;
  transition: width 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.rail-markers {
  position: absolute;
  top: 50%;
  left: 0;
  width: 100%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
}

.rail-marker {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg-warm);
  border: 2px solid var(--text-muted);
  transition: all 0.3s ease;
  cursor: pointer;
}

.rail-marker.active {
  background: var(--accent-gold);
  border-color: var(--accent-gold);
  transform: scale(1.3);
}

/* Panel Counter */
.panel-counter {
  position: fixed;
  top: 32px;
  right: 40px;
  z-index: 100;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.counter-current {
  color: var(--accent-gold);
  font-size: 1.1rem;
}

.counter-divider {
  margin: 0 4px;
  opacity: 0.4;
}

/* Scroll Container */
.scroll-container {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  height: 100vh;
  overflow-x: scroll;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.scroll-container::-webkit-scrollbar {
  display: none;
}

/* Panels */
.panel {
  min-width: 85vw;
  height: 100vh;
  scroll-snap-align: center;
  position: relative;
  flex-shrink: 0;
  padding: 0 4vw;
}

.panel:first-child {
  margin-left: 7.5vw;
}

.panel:last-child {
  margin-right: 7.5vw;
}

.panel-inner {
  width: 100%;
  height: 90vh;
  margin-top: 5vh;
  border-radius: 8px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.panel-content {
  position: relative;
  z-index: 10;
  max-width: 680px;
  padding: 3rem;
}

/* Geometric Shapes */
.geo-shape {
  position: absolute;
  pointer-events: none;
  opacity: 0.08;
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.panel:hover .geo-shape {
  opacity: 0.15;
}

.shape-circle {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: var(--accent-terracotta);
  top: -60px;
  right: -40px;
}

.shape-diamond {
  width: 180px;
  height: 180px;
  background: var(--accent-gold);
  transform: rotate(45deg);
  bottom: 80px;
  left: 60px;
}

.shape-rect-outline {
  width: 260px;
  height: 360px;
  border: 3px solid var(--accent-sage);
  top: 40px;
  right: 80px;
  transform: rotate(-5deg);
}

.shape-grid {
  width: 300px;
  height: 300px;
  top: 30px;
  right: 40px;
  background-image:
    linear-gradient(var(--accent-terracotta) 1px, transparent 1px),
    linear-gradient(90deg, var(--accent-terracotta) 1px, transparent 1px);
  background-size: 30px 30px;
}

.shape-triangle {
  width: 0;
  height: 0;
  border-left: 150px solid transparent;
  border-right: 150px solid transparent;
  border-bottom: 260px solid var(--accent-sage);
  bottom: 40px;
  right: 60px;
  opacity: 0.06;
}

.shape-circle-outline {
  width: 400px;
  height: 400px;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  top: -80px;
  right: -100px;
}

.shape-cross {
  width: 200px;
  height: 200px;
  top: 60px;
  right: 120px;
}

.shape-cross::before,
.shape-cross::after {
  content: '';
  position: absolute;
  background: var(--accent-terracotta);
}

.shape-cross::before {
  width: 100%;
  height: 40px;
  top: 50%;
  transform: translateY(-50%);
}

.shape-cross::after {
  height: 100%;
  width: 40px;
  left: 50%;
  transform: translateX(-50%);
}

.shape-dot-cluster {
  width: 150px;
  height: 150px;
  bottom: 80px;
  left: 100px;
  background-image: radial-gradient(circle, var(--accent-gold) 3px, transparent 3px);
  background-size: 20px 20px;
}

/* Panel Title Card */
.panel-title .panel-inner {
  background: linear-gradient(135deg, var(--bg-dark), var(--bg-medium));
}

.title-ko {
  font-size: clamp(6rem, 15vw, 14rem);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--accent-terracotta);
  opacity: 0.15;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -55%);
  z-index: 1;
  line-height: 1;
  pointer-events: none;
}

.title-main {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text-light);
  text-shadow: 1px 0 0 rgba(194, 166, 125, 0.3), -1px 0 0 rgba(107, 130, 120, 0.3);
  position: relative;
  z-index: 2;
}

.title-dot {
  color: var(--accent-gold);
}

.title-sub {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: clamp(0.9rem, 1.5vw, 1.2rem);
  color: var(--text-muted);
  margin-top: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.scroll-hint {
  margin-top: 3rem;
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--accent-sage);
  font-family: var(--font-body);
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  animation: hintPulse 2s ease-in-out infinite;
}

@keyframes hintPulse {
  0%, 100% { opacity: 0.5; transform: translateX(0); }
  50% { opacity: 1; transform: translateX(8px); }
}

.scroll-hint-arrow {
  font-size: 1.2rem;
}

/* Panel Backgrounds */
.panel-value .panel-inner {
  background: linear-gradient(135deg, #2a2520, #3d3a34 60%, #2a2520);
}

.panel-arcade .panel-inner {
  border-top: 1px solid #8b7e6a;
  background: linear-gradient(160deg, var(--bg-medium), #2a2520);
}

.panel-digital .panel-inner {
  border-top: 1px solid #c2a67d;
  background: linear-gradient(145deg, #2a2520, var(--bg-medium));
}

.panel-time .panel-inner {
  border-top: 1px solid #8b7e6a;
  background: linear-gradient(130deg, var(--bg-medium), #2a2520 70%);
}

.panel-final .panel-inner {
  border-top: 1px solid #c2a67d;
  background: linear-gradient(135deg, #2a2520, var(--bg-medium), #2a2520);
}

/* Panel Tags */
.panel-tag {
  font-family: var(--font-annotation);
  font-style: italic;
  font-weight: 700;
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent-terracotta);
  display: block;
  margin-bottom: 1.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid rgba(184, 125, 106, 0.3);
  width: fit-content;
}

/* Panel Headings */
.panel-heading {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5vw, 4.8rem);
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text-light);
  text-shadow: 1px 0 0 rgba(194, 166, 125, 0.3), -1px 0 0 rgba(107, 130, 120, 0.3);
  margin-bottom: 1.5rem;
}

/* Panel Text */
.panel-text {
  font-family: var(--font-archivo);
  font-weight: 400;
  font-size: clamp(0.95rem, 1.2vw, 1.1rem);
  line-height: 1.7;
  color: var(--text-muted);
  max-width: 520px;
}

/* Accent Line */
.panel-accent-line {
  width: 60px;
  height: 3px;
  background: var(--accent-gold);
  margin-top: 2rem;
  border-radius: 2px;
}

/* Coin Stack */
.coin-stack {
  display: flex;
  gap: 12px;
  margin-top: 2rem;
}

.coin {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 3px solid var(--accent-gold);
  background: rgba(232, 201, 122, 0.1);
  position: relative;
  animation: coinFloat 3s ease-in-out infinite;
}

.coin:nth-child(2) { animation-delay: 0.5s; }
.coin:nth-child(3) { animation-delay: 1s; }

.coin::after {
  content: 'A5';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent-gold);
}

@keyframes coinFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

/* Pixel Grid */
.pixel-grid {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  gap: 3px;
  width: 200px;
  margin-top: 2rem;
}

/* Time Bars */
.time-bars {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 2rem;
  width: 100%;
  max-width: 400px;
}

.time-bar {
  height: 32px;
  background: rgba(212, 201, 181, 0.08);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}

.time-bar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--accent-terracotta), var(--accent-gold));
  border-radius: 4px;
  transition: width 1.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.time-bar.animated::before {
  width: var(--bar-width);
}

.time-bar span {
  position: relative;
  z-index: 2;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
  line-height: 32px;
  padding-left: 12px;
}

/* Final Panel */
.final-ko {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4rem;
  color: var(--accent-terracotta);
  opacity: 0.3;
  margin-top: 2rem;
  line-height: 1;
}

.final-cta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 2rem;
  padding: 12px 24px;
  border: 2px solid var(--accent-sage);
  border-radius: 4px;
  width: fit-content;
  cursor: pointer;
  transition: all 0.3s ease;
}

.final-cta:hover {
  background: rgba(107, 130, 120, 0.15);
  border-color: var(--accent-gold);
}

.cta-text {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-light);
}

.cta-arrow {
  font-size: 1.2rem;
  color: var(--accent-gold);
  transition: transform 0.3s ease;
}

.final-cta:hover .cta-arrow {
  transform: translateX(4px);
}

/* Panel Enter Animation */
.panel-content {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}

.panel.in-view .panel-content {
  opacity: 1;
  transform: translateY(0);
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .panel {
    min-width: 92vw;
    padding: 0 2vw;
  }
  .panel:first-child { margin-left: 4vw; }
  .panel:last-child { margin-right: 4vw; }
  .panel-inner { height: 92vh; margin-top: 4vh; }
  .panel-content { padding: 2rem; }
  .rail-track { width: 80vw; bottom: 20px; }
  .panel-counter { top: 20px; right: 20px; }
  .geo-shape { display: none; }
  .title-ko { font-size: clamp(4rem, 12vw, 8rem); }
}

.scroll-hint-text {
  font-family: var(--font-annotation);
  font-style: italic;
}

.counter-divider {
  font-family: var(--font-annotation);
  font-style: italic;
}
