/* ========================= */
/* RESET */
/* ========================= */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.bot-mode canvas {
  display: none !important;
}

body.keyboard-open {
  height: calc(var(--vh) * 100);
  overflow: hidden;
}

body.keyboard-open .footer {
  bottom: 20px;
position: fixed;
  width: 100%;
}

/* ========================= */
/* FONTS */
/* ========================= */
@font-face {
  font-family: "Dubai";
  src: url("../assets/fonts/Dubai-Light.woff2") format("woff2");
  font-weight: 300;
}
@font-face {
  font-family: "Dubai";
  src: url("../assets/fonts/Dubai-Regular.woff2") format("woff2");
  font-weight: 400;
}
@font-face {
  font-family: "Dubai";
  src: url("../assets/fonts/Dubai-Medium.woff2") format("woff2");
  font-weight: 500;
}
@font-face {
  font-family: "Dubai";
  src: url("../assets/fonts/Dubai-Bold.woff2") format("woff2");
  font-weight: 700;
}

/* ========================= */
/* BASE */
/* ========================= */
html, body {
  height: auto;
  min-height: 100%;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  background: #0a0a0a;
  color: rgba(255,255,255,0.85);
  font-family: "Dubai", -apple-system, BlinkMacSystemFont, sans-serif;

  display: block;
  overscroll-behavior: none;
}

body.dragging {
  cursor: grabbing;
}

/* ========================= */
/* LAYOUT */
/* ========================= */
.container {
  width: 100%;
  max-width: 1100px;
  padding: 40px 24px;

  margin: 0 auto;

  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;

  min-height: calc(var(--vh) * 100);
  height: auto;
  position: relative;
  z-index: 2;
}

/* ========================= */
/* LOGO */
/* ========================= */
.logo {
  display: flex;
  justify-content: center;
  align-items: center;

  padding-top: 50px;

  opacity: 0.9;
  filter: saturate(0.8) brightness(0.85);

  transition: 0.3s ease;
}


.logo-svg {
  width: 420px;
  height: auto;
  display: block;
}

/* INTRO TEXT (layer2 controlled) */
.intro-text {
  position: absolute;
  top: 24%;
  left: 50%;
  transform: translateX(-50%) translateY(10px);

  font-size: clamp(14px, 1.6vw, 18px);
  letter-spacing: 1px;
  font-weight: 300;

  color: rgb(255, 255, 253);
  text-align: center;

  z-index: 3;
  pointer-events: none;

  opacity: 0;
  transition: opacity 0.8s ease, transform 0.8s ease;
}

body.layer2 .intro-text {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
  transition-delay: 1s;
}

/* ========================= */
/* INTRO STRUCTURE */
/* ========================= */

.intro-title {
  font-size: 18px;
  letter-spacing: 3px;
  font-weight: 500;

  margin-bottom: 10px;

  color: rgba(255, 255, 255, 0.95);
}

.intro-body {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 2px;

  color: rgba(233, 221, 221, 0.767);
}

.intro-entry {
  display: block;

  margin-top: 16px; /* razmik od teksta */

  font-size: 0.9em;
  letter-spacing: 2px;

  color: rgb(255, 255, 255); 

  opacity: 1;
}

/* ========================= */
/* LAYER 3 */
/* ========================= */
.layer3-ui {
  position: absolute;
  inset: 0;
  z-index: 5;

  display: grid;
  place-items: center;

  opacity: 0;
  pointer-events: none;

  transition: opacity 0.6s ease;
}

/* layer3 viden */
body.layer3 .layer3-ui {
  opacity: 1;
  pointer-events: auto;
}

/* layer2 izgine KO je layer3 aktiven */
body.layer3 .layer2-ui {
  opacity: 0;
  pointer-events: none;
}

/* vsebina */
.layer3-content {
  text-align: center;
  max-width: 600px;
  padding: 20px;
}

.layer3-title {
  font-size: clamp(24px, 4vw, 40px);
  letter-spacing: 2px;
  margin-bottom: 20px;
}

.layer3-text {
  font-size: 14px;
  letter-spacing: 2px;
  opacity: 0.7;
  line-height: 1.6;
  margin-bottom: 30px;
}

.layer3-back {
  position: absolute;
  bottom: calc(150px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);

  background: none;
  border: none;

  color: rgba(184,134,44,0.8);
  letter-spacing: 3px;

  cursor: pointer;

  z-index: 200;
}
/* ========================= */
/* SOFT PORTAL TRANSITION */
/* ========================= */

/* rahlo povečanje (brez premika layouta) */
.portal-enter .portal-content {
  transform: scale(1.08);
  transition: transform 0.6s ease;
}

/* ostali portali izginejo */
body.portal-transition .layer2-item {
  opacity: 0;
  transition: opacity 0.9s ease;
}

/* ========================= */
/* DISSOLVE TRANSITION */
/* ========================= */

/* layer2 se raztopi */
body.portal-transition .layer2-ui {
  opacity: 0;
  filter: blur(6px);
  transition: opacity 0.4s ease, filter 0.4s ease;
}

/* triquetra izgine hitreje */
body.portal-transition .triquetra {
  opacity: 0;
  transition: opacity 0.2s ease;
}

/* intro tekst izgine */
body.portal-transition .intro-text {
  opacity: 0;
  filter: blur(4px);
  transition: opacity 0.9s ease, filter 0.9s ease;
}

/* rahlo ugašanje naslovov */
body.portal-transition .layer2-title {
  opacity: 0.3;
}

/* ========================= */
/* HERO */
/* ========================= */
.hero {
  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  gap: 24px;
  flex: 1;

  transition: transform 0.4s ease, opacity 1s ease;

  backface-visibility: hidden;
  transform: none;
}

body.dragging .hero {
  transition: none;
}

/* ========================= */
/* TYPOGRAPHY */
/* ========================= */
.headline {
  font-size: clamp(30px, 4vw, 52px);
  font-weight: 300;
  letter-spacing: 1.2px;
  line-height: 1.2;

  max-width: 800px;
  color: rgb(255, 255, 255);
}

.subheadline {
  font-size: 12px;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: rgba(184, 135, 44, 0.829);
  opacity: 0.9;
}

/* Remove mobile tap highlight */
.layer2-item {
  -webkit-tap-highlight-color: transparent;
}

.layer2-item:active {
  opacity: 0.8;
  transform: translate(-50%, -50%) scale(0.96);
}

/* ========================= */
/* FOOTER */
/* ========================= */
.footer {
  position: absolute;

  left: 50%;
  transform: translateX(-50%);

  width: 100%;
  max-width: 720px;
  padding: 0 20px;

  color: rgba(113, 117, 124, 0.7);
  font-size: 12px;
  text-align: center;

  z-index: 10;
}

/* ========================= */
/* BACKGROUND */
/* ========================= */
.bg {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;

  background:
    radial-gradient(circle at 50% 40%, rgba(40, 90, 255, 0.08), transparent 65%),
    linear-gradient(180deg, #05070d 0%, #070b18 50%, #05070d 100%);
}

#bg-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

/* ========================= */
/* SOUND */
/* ========================= */
#sound-toggle {
  position: absolute;
  left: 50%;
  bottom: calc(80px + env(safe-area-inset-bottom));
  transform: translateX(-50%);

  z-index: 999;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  font-size: 10px;
  letter-spacing: 2px;
  text-transform: uppercase;

  color: rgba(255, 255, 255, 0.925);

  background: transparent;
  border: none;
  cursor: pointer;

  opacity: 0.8;
  transition: opacity 0.3s ease;

  pointer-events: auto;
}

#sound-toggle:hover {
  opacity: 0.8;
}

#sound-toggle.active {
  opacity: 0.85;
  color: rgba(255,255,255,0.85);
}

.sound-state {
  letter-spacing: 3px;
}

/* ========================= */
/* LAYER 2 */
/* ========================= */
.layer2-ui {
  position: absolute;
  inset: 0;
  z-index: 2;

  display: grid;
  place-items: center;

  opacity: 0;
  transition: opacity 1s ease;

  pointer-events: none;
}

body.layer2 .layer2-ui {
  opacity: 1;
  transition-delay: 1.5s;
}

/* ========================= */
/* PORTAL LAYOUT */
/* ========================= */
.portal-group {
  position: relative;
  width: min(900px, 90vw);
  height: min(600px, calc(var(--vh) * 70));
  margin: 0 auto;
}

.layer2-item {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;

  text-align: center;
  text-decoration: none;

  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease;

  pointer-events: none;
}

body.layer2 .layer2-item {
  pointer-events: auto;
}



/* triangle */
.portal-1 { top: 50%; left: 50%; }
.portal-2 { top: 80%; left: 32%; }
.portal-3 { top: 80%; left: 68%; }

/* ========================= */
/* TYPO (PORTALS) */
/* ========================= */
.layer2-title {
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 2px;
  font-weight: 300;
  color: #ffffff;
}

.layer2-sub {
  font-size: 13px;
  letter-spacing: 2px;
  margin-top: 2px;
  color: rgba(236, 181, 80, 0.658);
  
}

.portal-content {
  position: relative;
  z-index: 1;
  text-align: center;
}

.layer2-item:hover .portal-content {
  transform: translateY(-2px);
}

.layer2-item.loading {
  opacity: 0.9;
}

.layer2-item.loading .layer2-title {
  letter-spacing: 3px;
}

.layer2-item.loading .layer2-sub {
  opacity: 0.8;
}



/* naslov */
.form-title {
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: 3px;
  font-weight: 400;
}

/* opis */
.form-text {
  font-size: 13px;
  letter-spacing: 2px;
  opacity: 0.6;
  line-height: 1.6;
}

/* input + button wrapper */
.form {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
}

/* input */
.form input {
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(255,255,255,0.25);

  padding: 10px 6px;
  width: 240px;

  text-align: center;
  font-size: 14px;
  letter-spacing: 2px;

  color: white;
  outline: none;

  transition: border-color 0.3s ease, opacity 0.3s ease;
}

.form input::placeholder {
  color: rgba(255,255,255,0.3);
}

/* focus = activation */
.form input:focus {
  border-bottom: 1px solid rgba(184,134,44,0.8);
  opacity: 1;
}

/* button */
.form button {
  background: none;
  border: none;

  color: rgba(184,134,44,0.8);

  font-size: 12px;
  letter-spacing: 4px;
  text-transform: uppercase;

  cursor: pointer;

  opacity: 0.7;
  transition: opacity 0.3s ease, transform 0.2s ease;
}

.form button:hover {
  opacity: 1;
}

.form button:active {
  transform: scale(0.95);
}

/* spodnji tekst */
.form-note {
  font-size: 11px;
  letter-spacing: 2px;
  opacity: 0.4;
}

/* ========================= */
/* TRANSITIONS */
/* ========================= */
body.transitioning {
  opacity: 0;
  transition: opacity 0.9s ease;
}

body.layer2 .hero {
  opacity: 0;
  pointer-events: none;
}


/* ========================= */
/* FIX: layer3 cleanup */
/* ========================= */
body.layer3 .intro-text {
  opacity: 0;
  pointer-events: none;
}

body.layer3 .hero {
  opacity: 0;
  pointer-events: none;
}

/* ========================= */
/* LAYER 3 FLOW TEXT */
/* ========================= */

.l3-flow {
  font-size: 14px;
  letter-spacing: 2px;
  line-height: 1.6;
  font-weight: 300;

  color: rgb(255, 255, 255);

  max-width: 520px;
  margin: 40px auto 0;

  text-align: center;

  opacity: 0;
  transform: translateY(10px);
  transition: opacity 1s ease, transform 1s ease;
}

/* aktivacija */
body.layer3 .l3-flow {
  opacity: 1;
  transform: translateY(0);
}

/* razmiki med “odstavki” */
.l3-break {
  display: block;
  height: 13px;
}

/* poudarek */
.l3-emphasis {
  display: block;
  margin-top: 18px;

  color: rgb(255, 255, 255);
  font-weight: 300;
}

/* zadnji stavek */
.l3-final {
  display: block;
  margin-top: 20px;

  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  letter-spacing: 3px;
}

.l3-entry {
  display: block;
  margin-top: 18px;

  font-size: 12px;
  letter-spacing: 3px;
  text-transform: uppercase;

  color: rgba(236, 181, 80, 0.658);

  cursor: pointer;

  transition: opacity 0.3s ease, transform 0.3s ease;
}

/* hover (desktop) */
.l3-entry:hover {
  opacity: 1;
  transform: translateY(-2px);
}

/* ========================= */
/* MOBILE */
/* ========================= */
@media (max-width: 767px) {

  .container {
    padding: 30px 18px;
  }

  .logo {
    padding-top: 10px;
  }

  .logo-svg {
    width: clamp(180px, 80vw, 300px);
  }

  .hero {
    gap: 12px;
    transform: translateY(-40px);
  }

  .headline {
    font-size: 24px;
    letter-spacing: 1.4px;
  }

  .intro-text {
    top: 21%;
    font-size: 18px;
    letter-spacing: 1px;
    width: 80%;
    max-width: 720px;
    line-height: 1.3;
  }

  .subheadline {
    font-size: 9px;
    letter-spacing: 4px;
  }

  .portal-group {
    width: 100%;
    height: 55vh;
  }

  .layer2-item {
    transform: translate(-50%, -50%);
    will-change: transform;
  }

  .portal-1 { top: 75%; left: 50%; }
  .portal-2 { top: 95%; left: 28%; }
  .portal-3 { top: 95%; left: 71%; }

  .layer2-title {
    font-size: 20px;
    white-space: nowrap;
    color: rgb(255, 255, 255);
  }

  .layer2-sub {
    font-size: 11px;
    letter-spacing: 1px;
    white-space: nowrap;
    color: rgba(194, 157, 35, 0.685);
    margin-top: 1px;
    
  }

  .layer2-item:hover {
    transform: translate(-50%, -50%);
  }

  .layer3-back {
  bottom: calc(-80px + env(safe-area-inset-bottom));
  font-size: 11px;
  letter-spacing: 2px;
}

.layer3-content {
  transform: translateY(-40px); /* 👈 premik gor */
}
  .portal-content {
    transform: none !important;
  }

  #sound-toggle {
    bottom: calc(40px + env(safe-area-inset-bottom));
    font-size: 9px;
    letter-spacing: 1.5px;
  }

  .footer {
    font-size: 9px;
    line-height: 1.4;
  }

  /* ========================= */
/* LAYER 3 MOBILE FIX */
/* ========================= */

.layer3-text-block {
  max-width: 110%;
  margin: 20px auto 0;
  gap: 10px;
}

.l3-line {
  font-size: 16px;
  letter-spacing: 1.5px;
  line-height: 1.4;

  /* manj “težek” tekst */
  color: rgba(255,255,255,0.8);
}

/* highlight naj ne “kriči” preveč */
.l3-highlight {
  color: rgba(255,255,255,0.95);
}

/* zadnji stavek bolj subtilen */
.l3-final {
  letter-spacing: 2px;
  font-size: 16px;
}

.l3-flow {
  font-size: 16px;
  letter-spacing: 1.5px;
  line-height: 1.4;

  max-width: 120%;
}

.l3-break {
  height: 14px;
}

/* hitrejša animacija (mobile ne mara dolgih delayev) */
body.layer3 .l3-line:nth-child(1) { transition-delay: 0.2s; }
body.layer3 .l3-line:nth-child(2) { transition-delay: 0.4s; }
body.layer3 .l3-line:nth-child(3) { transition-delay: 0.6s; }
body.layer3 .l3-line:nth-child(4) { transition-delay: 0.8s; }
body.layer3 .l3-line:nth-child(5) { transition-delay: 1.0s; }
body.layer3 .l3-line:nth-child(6) { transition-delay: 1.2s; }
body.layer3 .l3-line:nth-child(7) { transition-delay: 1.4s; }
}

/* ========================= */
/* FB BROWSER FIX */
/* ========================= */

body.fb-browser {
  /* izklopi flex sistem */
  display: block;
}

body.fb-browser .container {
  display: flex;
  flex-direction: column;

  justify-content: flex-start; /* ❗ NE center */
  align-items: center;

  padding-top: 120px; /* osnovni offset */

  height: auto; /* ❗ ne full height */
}

body.fb-browser .hero {
  transform: none;
  flex: none;
}

body.fb-browser .logo {
  margin-bottom: 20px;
}

body.fb-browser .headline {
  margin-top: 10px;
}


body.fb-browser .container {
  padding-top: calc(var(--vh) * 12);
}

/* ========================= */
/* FB iOS FIX */
/* ========================= */

body.fb-ios .container {
  height: auto;
  min-height: calc(var(--vh) * 100);

  justify-content: flex-start;

  padding-top: calc(var(--vh) * 10); /* malo več prostora */
  padding-bottom: calc(var(--vh) * 5);
}

body.fb-ios .hero {
  transform: none;
  flex: none;
  margin-top: 20px;
}

body.fb-ios .intro-text {
  top: 18%;
}

body.fb-ios .portal-group {
  height: calc(var(--vh) * 60);
}

body.fb-ios .footer {
  position: fixed;
  
}

body.keyboard-open .footer {
  position: fixed;
}