/* ==========================================================================
   Kovis Livarna Kiosk
   Design canvas: 3840 x 2160 (scaled to viewport via JS)
   ========================================================================== */

:root {
  --bg:            #00121b;
  --cyan:          #0abcf9;
  --cyan-soft:     rgba(10, 188, 249, 0.2);
  --cyan-border:   rgba(150, 220, 255, 0.2);
  --ice:           #96dcff;
  --ice-strong:    rgba(150, 220, 255, 1);
  --blue:          #1f5afb;
  --blue-shadow:   rgba(31, 90, 251, 0.4);
  --blue-ring:     rgba(10, 188, 249, 0.5);
  --muted:         #a3a3ad;
  --white:         #ffffff;

  --font-display:  'Space Grotesk', system-ui, sans-serif;
  --font-ui:       'Poppins', system-ui, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
  color: var(--white);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  cursor: default;
}

a { text-decoration: none; color: inherit; cursor: pointer; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
ul { list-style: none; margin: 0; padding: 0; }
img { display: block; max-width: none; }

/* -------------------------------------------------------------------------- */
/* Stage / scaled canvas                                                      */
/* -------------------------------------------------------------------------- */

.stage {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
}

.canvas {
  position: relative;
  width: 3840px;
  height: 2160px;
  overflow: hidden;
  background: var(--bg);
  transform-origin: center center;
  /* --scale set by JS on resize */
  transform: scale(var(--scale, 1));
  flex: none;
}

/* -------------------------------------------------------------------------- */
/* Screens                                                                    */
/* -------------------------------------------------------------------------- */

.screen {
  position: absolute;
  inset: 0;
  display: none;
  z-index: 0;
}
.screen.is-active {
  display: block;
  z-index: 1;
}

/* -------------------------------------------------------------------------- */
/* Background layers                                                          */
/* -------------------------------------------------------------------------- */

.bg {
  position: absolute;
  inset: 0;
  background-image: url('assets/bg-home.png');
  background-size: cover;
  background-position: center;
  pointer-events: none;
}
.bg-video {
  object-fit: cover;
  width: 100%;
  height: 100%;
  background: var(--bg);
}
.bg-video--blur {
  filter: blur(50px) brightness(0.7);
  transform: scale(1.05);
}
/* pre-blurred asset — avoids runtime GPU blur on a 4K surface */
.bg-glow {
  background-image: url('assets/bg-glow.jpg');
}
.bg-glow--dim {
  opacity: 0.4;
}

/* -------------------------------------------------------------------------- */
/* Logo                                                                       */
/* -------------------------------------------------------------------------- */

.logo-bar {
  position: absolute;
  top: 0;
  left: 0;
  padding: 100px;
  z-index: 20;
}
.logo {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 59px;
  width: 400px;
  color: var(--white);
}
.logo__mark {
  width: 44px;
  height: 44px;
  flex: none;
}
.logo__word {
  font-family: var(--font-display);
  font-size: 34px;
  letter-spacing: 1.5px;
  font-weight: 300;
  line-height: 1;
}
.logo__word b {
  font-weight: 600;
  letter-spacing: 1.5px;
}

/* -------------------------------------------------------------------------- */
/* Back button (top-right by default, bottom-left variant)                    */
/* -------------------------------------------------------------------------- */

.back-btn {
  position: absolute;
  top: 80px;
  right: 80px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 40px;
  padding: 40px 120px 40px 80px;
  border: 0.25px solid rgba(255, 255, 255, 0.25);
  border-radius: 1000px;
  color: var(--ice);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: 6.1px;
  text-transform: uppercase;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  transition: background .2s ease, box-shadow .2s ease;
}
.back-btn:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 40px rgba(10, 188, 249, 0.4);
}
.back-btn__icon {
  width: 48px;
  height: 48px;
  transform: rotate(180deg);
}
.back-btn--bottom {
  top: auto;
  right: auto;
  bottom: 80px;
  left: 80px;
}

/* -------------------------------------------------------------------------- */
/* Typography: eyebrow / title / body                                         */
/* -------------------------------------------------------------------------- */

.eyebrow {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 60px;
  line-height: 60px;
  letter-spacing: -1px;
  color: var(--ice);
  text-transform: uppercase;
}
.eyebrow--small {
  font-size: 30px;
  letter-spacing: -1px;
}

.info-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 120px;
  line-height: 140px;
  letter-spacing: -6px;
  color: var(--white);
}

.info-body {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 48px;
  line-height: 60px;
  letter-spacing: -1px;
  color: var(--ice);
}
.info-body p {
  margin: 0 0 60px;
}
.info-body p:last-child { margin-bottom: 0; }
.info-body__strong {
  font-weight: 500;
}

/* -------------------------------------------------------------------------- */
/* HOME                                                                       */
/* -------------------------------------------------------------------------- */

.home-content {
  position: absolute;
  left: 620px;
  top: 334px;
  width: 2600px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 180px;
  z-index: 10;
}

.home-hero {
  width: 1440px;
  display: flex;
  flex-direction: column;
  gap: 80px;
  text-align: center;
}

.home-title {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 160px;
  line-height: 140px;
  letter-spacing: -8px;
  color: var(--white);
}

.home-subtitle {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 48px;
  line-height: 60px;
  letter-spacing: -1px;
  color: var(--ice);
}

.home-buttons {
  width: 100%;
  display: flex;
  gap: 200px;
  align-items: center;
  justify-content: center;
}

/* -- Big pill button (home CTAs) — liquid glass -- */
.pill-big {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 61px;
  width: 1200px;
  height: 480px;
  padding: 120px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.25px solid rgba(255, 255, 255, 0.25);
  border-radius: 1000px;
  overflow: hidden;
  isolation: isolate;
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  box-shadow:
    0 40px 120px rgba(31, 90, 251, 0.45),
    0 10px 40px rgba(0, 0, 0, 0.35);
  transition: transform .25s ease, box-shadow .25s ease, background .25s ease;
}
/* reflective sheen from the -45° light direction */
.pill-big::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    linear-gradient(135deg,
      rgba(255, 255, 255, 0.35) 0%,
      rgba(255, 255, 255, 0.08) 30%,
      rgba(255, 255, 255, 0) 55%,
      rgba(255, 255, 255, 0.06) 85%,
      rgba(255, 255, 255, 0.18) 100%);
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}
/* faint chromatic dispersion on the opposite edge */
.pill-big::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(circle at 92% 88%,
      rgba(10, 188, 249, 0.25) 0%,
      rgba(10, 188, 249, 0) 35%),
    radial-gradient(circle at 8% 12%,
      rgba(255, 255, 255, 0.18) 0%,
      rgba(255, 255, 255, 0) 40%);
  pointer-events: none;
  z-index: 0;
}
.pill-big > * { position: relative; z-index: 1; }
.pill-big:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-6px);
  box-shadow:
    0 50px 140px rgba(31, 90, 251, 0.55),
    0 12px 48px rgba(0, 0, 0, 0.4);
}

.pill-big__label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 40px;
  letter-spacing: 6.1px;
  text-transform: uppercase;
  color: var(--white);
  white-space: nowrap;
}

.pill-big__icon {
  flex: none;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--blue-ring);
  box-shadow: 0 20px 40px var(--blue);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--white);
}
.pill-big__icon svg {
  width: 48px;
  height: 48px;
}

/* -- Stats row -- */
.stats {
  position: absolute;
  left: 620px;
  bottom: 160px;
  display: flex;
  align-items: center;
  gap: 20px;
  z-index: 10;
}
.stat {
  width: 400px;
  text-align: center;
}
.stat__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 80px;
  line-height: 140px;
  letter-spacing: -4px;
  color: var(--ice);
}
.stat__label {
  margin-top: 4px;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 40px;
  letter-spacing: 2.8px;
  color: var(--muted);
  text-transform: uppercase;
}
.stat__divider {
  width: 1px;
  height: 120px;
  background: rgba(255, 255, 255, 0.12);
  align-self: center;
}

/* -------------------------------------------------------------------------- */
/* Info panel (Foundry + Industries right column)                             */
/* -------------------------------------------------------------------------- */

.info-panel {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 80px;
  z-index: 10;
}
.info-panel--right {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1920px;
  padding-left: 20px;
  padding-right: 200px;
}

/* -------------------------------------------------------------------------- */
/* Industries — left pill list                                                */
/* -------------------------------------------------------------------------- */

.industry-list {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}
.industry-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 200px;
  padding: 60px 120px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.25px solid rgba(255, 255, 255, 0.25);
  border-radius: 0 1000px 1000px 0;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  transition: background .25s ease, transform .25s ease, filter .25s ease;
}
.industry-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(20px);
  filter: drop-shadow(50px 0 100px rgba(31, 90, 251, 0.8));
}
.industry-pill__num {
  font-size: 20px;
  letter-spacing: 6.1px;
  opacity: .75;
}
.industry-pill__name {
  margin-top: 14px;
  font-size: 40px;
  letter-spacing: 6.1px;
}

/* -------------------------------------------------------------------------- */
/* Railway                                                                    */
/* -------------------------------------------------------------------------- */

.product-list {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 603px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}
.product-pill {
  display: flex;
  align-items: center;
  gap: 20px;
  height: 160px;
  padding: 0 120px 0 40px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.25px solid rgba(255, 255, 255, 0.25);
  border-radius: 0 1000px 1000px 0;
  color: var(--white);
  font-family: var(--font-display);
  text-transform: uppercase;
  line-height: 1;
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  transition: background .25s ease, transform .25s ease, box-shadow .25s ease;
}
.product-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(16px);
}
.product-pill.is-active {
  background: rgba(10, 188, 249, 0.22);
  box-shadow: 0 0 80px rgba(10, 188, 249, 0.25);
}
.product-pill__thumb {
  width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 8px;
  flex: none;
}
.product-pill__name {
  font-size: 32px;
  letter-spacing: 6.1px;
  font-weight: 400;
}

/* 3D viewer (center) */
.casting-viewer {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 2160px;
  height: 2160px;
  transform: translate(-50%, -50%);
  z-index: 5;
}
.casting-viewer__mv {
  width: 100%;
  height: 100%;
  display: block;
  background-color: transparent;
  --poster-color: transparent;
  --progress-bar-color: rgba(10, 188, 249, 0.7);
  --progress-bar-height: 3px;
  /* subtle cyan halo around the model */
  filter: drop-shadow(0 0 180px rgba(10, 188, 249, 0.22));
}
.industry-preview {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 200px;
  pointer-events: none;
  background: transparent;
  filter: drop-shadow(0 0 180px rgba(10, 188, 249, 0.22));
}
.industry-preview[hidden] { display: none; }
.casting-viewer__mv[hidden] { display: none; }

/* + markers overlaid on the 3D viewer */
.plus-marker {
  position: absolute;
  left: var(--mx, 50%);
  top: var(--my, 50%);
  width: 160px;
  height: 160px;
  margin: -80px 0 0 -80px;
  border-radius: 50%;
  background: var(--blue);
  border: 2px solid var(--blue-ring);
  box-shadow: 0 20px 40px var(--blue);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .2s ease, box-shadow .2s ease;
}
.plus-marker:hover {
  transform: scale(1.08);
  box-shadow: 0 20px 60px var(--blue), 0 0 80px rgba(10, 188, 249, 0.5);
}
.plus-marker svg {
  width: 48px;
  height: 48px;
}

/* Industry info column (right, narrower) */
.info-panel--railway {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1200px;
  padding-left: 20px;
  padding-right: 200px;
  gap: 80px;
}
.info-panel--railway .eyebrow--small {
  letter-spacing: 6px;
}
.info-panel--railway .info-title {
  font-size: 120px;
  line-height: 140px;
}

/* Player controls at bottom center */
.player-controls {
  position: absolute;
  left: 50%;
  top: 1980px;
  transform: translateX(-50%);
  display: flex;
  gap: 40px;
  z-index: 15;
}
.ctrl-btn {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 32px 80px 32px 60px;
  border: 2px solid var(--cyan);
  border-radius: 1000px;
  color: var(--ice);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 6.1px;
  text-transform: uppercase;
  line-height: 1;
  background: rgba(0, 18, 27, 0.4);
  transition: background .2s ease;
}
.ctrl-btn:hover { background: rgba(10, 188, 249, 0.15); }
.ctrl-btn svg { width: 24px; height: 24px; }

/* Toggle between pause and play glyphs based on button state */
.ctrl-btn[data-state="playing"] .ctrl-btn__icon--play  { display: none; }
.ctrl-btn[data-state="paused"]  .ctrl-btn__icon--pause { display: none; }

/* -------------------------------------------------------------------------- */
/* FOUNDRY — left list of stages                                              */
/* -------------------------------------------------------------------------- */

.foundry-list {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1200px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  z-index: 10;
}
.foundry-pill {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  height: 200px;
  padding: 60px 120px;
  background: rgba(255, 255, 255, 0.06);
  border: 0.25px solid rgba(255, 255, 255, 0.25);
  border-radius: 0 1000px 1000px 0;
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: 1;
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  transition: background .25s ease, transform .25s ease, filter .25s ease;
}
a.foundry-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateX(20px);
  filter: drop-shadow(50px 0 100px rgba(31, 90, 251, 0.8));
}
.foundry-pill--disabled {
  opacity: 0.55;
  cursor: default;
}
.foundry-pill__num {
  font-size: 20px;
  letter-spacing: 6.1px;
  opacity: .75;
}
.foundry-pill__name {
  margin-top: 14px;
  font-size: 40px;
  letter-spacing: 6.1px;
}

/* Foundry right info panel — vertically centered */
.info-panel--foundry {
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1920px;
  padding-left: 20px;
  padding-right: 200px;
}

/* Bottom-center certificates / where-we-are buttons */
.foundry-bottom {
  position: absolute;
  left: 50%;
  top: 1980px;
  transform: translateX(-50%);
  display: flex;
  gap: 40px;
  z-index: 15;
}
.small-pill {
  display: inline-flex;
  align-items: center;
  gap: 20px;
  padding: 32px 80px 32px 60px;
  border: 0.25px solid rgba(255, 255, 255, 0.25);
  border-radius: 1000px;
  color: var(--ice);
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 24px;
  letter-spacing: 6.1px;
  text-transform: uppercase;
  line-height: 1;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(20px) saturate(1.35);
  -webkit-backdrop-filter: blur(20px) saturate(1.35);
  transition: background .2s ease, box-shadow .2s ease;
}
.small-pill:hover {
  background: rgba(255, 255, 255, 0.12);
  box-shadow: 0 0 40px rgba(10, 188, 249, 0.3);
}
.small-pill__icon {
  width: 48px;
  height: 48px;
  flex: none;
}

/* -------------------------------------------------------------------------- */
/* Detail screens (Development & Technology / Pattern Shop)                   */
/* -------------------------------------------------------------------------- */

.bg-detail {
  background-size: cover;
  background-position: center;
}
.bg-detail::before,
.bg-detail::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.bg-detail::before {
  background: #00121b;
  opacity: 0.8;
}
.bg-detail::after {
  background: rgba(31, 90, 251, 0.1);
}
.bg-detail--dev    { background-image: url('assets/dev-tech-bg.jpg'); }
.bg-detail--pattern{ background-image: url('assets/pattern-shop-bg.jpg'); }

/* Left-side hero image */
.detail-hero {
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1920px;
  padding: 0 320px;
  z-index: 10;
}
.detail-hero img {
  width: 100%;
  aspect-ratio: 1200 / 800;
  object-fit: cover;
  border-radius: 60px;
  display: block;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.5);
}

/* Right-side text column */
.detail-content {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1920px;
  padding-left: 20px;
  padding-right: 200px;
  display: flex;
  flex-direction: column;
  gap: 80px;
  z-index: 10;
}
.detail-content__head {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.detail-content .eyebrow--small {
  font-size: 30px;
  line-height: 60px;
  letter-spacing: 6px;
}
.detail-content .info-title {
  font-size: 120px;
  line-height: 140px;
  letter-spacing: -6px;
}

/* Bullet list */
.detail-list {
  margin: 0;
  padding-left: 60px;
  list-style: disc outside;
  color: var(--ice);
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 44px;
  line-height: 60px;
  letter-spacing: -1px;
  width: 1440px;
}
.detail-list li { margin-bottom: 0; }
.detail-list li::marker { color: var(--ice); }
.detail-list strong {
  font-weight: 700;
}

/* Stats row with vertical dividers */
.detail-stats {
  display: flex;
  align-items: center;
  gap: 20px;
}
.detail-stats__divider {
  width: 1px;
  align-self: stretch;
  min-height: 180px;
  background: rgba(150, 220, 255, 0.35);
}
.detail-stat {
  width: 400px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.detail-stat--wide {
  width: 1200px;
  text-align: left;
}
.detail-stat__num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 80px;
  line-height: 1;
  letter-spacing: -4px;
  color: var(--ice);
}
.detail-stat__unit {
  font-size: 48px;
  letter-spacing: -2px;
}
.detail-stat__label {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 28px;
  line-height: 32px;
  letter-spacing: 2.8px;
  color: var(--muted);
  text-transform: uppercase;
}
.detail-stat__label--prose {
  text-transform: none;
  letter-spacing: 0;
  font-size: 28px;
  line-height: 36px;
}

