/* ==========================================================
   main.css — base styles, variables, layout
   ========================================================== */

:root {
  /* Logo colors */
  --color-gold:   #C4A800;
  --color-orange: #EFA500;
  --color-blue:   #7B98AA;
  --color-dark:   #4e5b36;

  /* UI colors */
  --color-bg:             #FAF5F0;
  --color-panel-bg:       #f5f0e8;
  --color-text:           #2c2c2c;
  --color-text-light:     #6b6b6b;
  --color-border:         #ddd5c0;
  --color-highlight:      rgba(238, 164, 0, 0.15);
  --color-overlay:        rgba(30, 25, 15, 0.5);
  --color-green-progress: #4a9e6b;
  --color-slider-bg:      #e8e0d0;

  /* Font */
  --font-main: "Onest", serif;

  /* Transitions */
  --transition-main:  0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-fast:  0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  --transition-slow:  0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);

  /* Layout */
  --panel-width:     75%;
  --logo-width-full: 100%;
  --logo-width-open: 38%;
  --lang-btn-size:   60px;
}

/* ----------------------------------------------------------
   Reset and base styles
   ---------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
  background-color: var(--color-bg);
  font-family: var(--font-main);
  color: var(--color-text);
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
}

/* ----------------------------------------------------------
   Root application container
   ---------------------------------------------------------- */
#app {
  position: relative;
  width: 100vw;
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* ----------------------------------------------------------
   Logo container
   ---------------------------------------------------------- */
.logo-container {
  position: relative;
  width: var(--logo-width-full);
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: width var(--transition-main), transform var(--transition-main);
  will-change: transform;
  overflow: visible; 
}

#app.state-active .logo-container {
  width: var(--logo-width-open);
}

#valeni-logo {
  width: auto;
  height: 75vh;
  max-width: 90%;
  display: block;
  overflow: visible; 
}

/* ----------------------------------------------------------
   Prompt caption (IDLE screen)
   ---------------------------------------------------------- */
.idle-hint {
	width: 100%;
	color: var(--color-text-light);
	padding: 1rem 0;
	text-align: center;
}

#app.state-active .idle-hint {
  opacity: 0;
}

/* ----------------------------------------------------------
   Information panel — positioning
   ---------------------------------------------------------- */
.info-panel {
  position: fixed;
  top: 0;
  right: 0;
  width: var(--panel-width);
  height: 100vh;
  background-color: var(--color-bg);
  transform: translateX(100%);
  transition: transform var(--transition-main);
  will-change: transform;
  z-index: 100;
	-webkit-box-shadow: -5px 0 5px 0px rgba(0, 0, 0, 0.2);
	-moz-box-shadow: -5px 0 5px 0px rgba(0,0,0,0.2);
	box-shadow: -5px 0 5px 0px rgba(0, 0, 0, 0.2); 
}

#app.state-active .info-panel {
  transform: translateX(0);
}

/* ----------------------------------------------------------
   Language switcher
   ---------------------------------------------------------- */
.lang-switcher {
  position: fixed;
  top: 2rem;
  left: 2rem;
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.lang-btn {
  min-width: var(--lang-btn-size);
  min-height: var(--lang-btn-size);
  padding: 0 1rem;
  background: transparent;
  border: 2px solid var(--color-border);
  border-radius: 4px;
  font-family: var(--font-main);
  font-size: 1rem;
  font-weight: 600;
  color: var(--color-text-light);
  cursor: pointer;
  transition: all var(--transition-fast);
  touch-action: none;
  letter-spacing: 0.05em;
}

.lang-btn:hover,
.lang-btn:focus {
  border-color: var(--color-orange);
  color: var(--color-dark);
  outline: none;
}

.lang-btn.active {
  background-color: var(--color-dark);
  border-color: var(--color-dark);
  color: var(--color-bg);
}


/* ----------------------------------------------------------
   Touch optimization for kiosk mode
   ---------------------------------------------------------- */

#valeni-logo {
  -webkit-touch-callout: none;
}

.panel-text {
  -webkit-user-select: text;
  user-select: text;
}

.panel-close,
.slider-dot,
.panel-audio-btn {
  touch-action: none;
}

/* ==========================================================
   RESPONSIVENESS
   ========================================================== */

@media (max-width: 1280px) and (orientation: landscape) {
  :root {
    --panel-width:     75%;
    --logo-width-open: 35%;
  }

  #valeni-logo {
    height: 70vh;
  }
  .panel-audio-btn {
	  width: 100% !important;
  }
}

@media (max-width: 992px) and (orientation: portrait) {
  :root {
    --panel-width: 100%;
  }

  #app {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-y: auto;
    overflow-x: hidden;
  }

  .logo-container {
    width: 100% !important;
	height: 90vh;
    flex-shrink: 0;
    transition: height var(--transition-main);
  }

  #app.state-active .logo-container {
    height: 32vh;
    width: 100% !important;
  }

  #valeni-logo {
    height: 38vh;
    max-width: 70%;
  }

  #app.state-active #valeni-logo {
    height: 26vh;
  }

  .info-panel {
    top: auto;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60vh;
    transform: translateY(100%);
    border-left: none;
    border-top: 1px solid var(--color-border);
  }
  
  #app.state-active .info-panel {
    transform: translateY(0);
  }

  .idle-hint {
    bottom: auto;
    top: 41vh;
    font-size: clamp(12px, 1.8vw, 16px);
  }
}

@media (max-width: 767px) and (orientation: portrait) {
  :root {
    --panel-width: 100%;
  }

  #app {
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    overflow-x: hidden;
  }

  .logo-container {
    width: 100% !important;
    flex-shrink: 0;
    transition: height var(--transition-main);
  }

  #app.state-active .logo-container {
    height: 28vh;
    width: 100% !important;
  }

  #valeni-logo {
    height: 36vh;
    max-width: 75%;
  }

  #app.state-active #valeni-logo {
    height: 22vh;
  }

  .info-panel {
    top: auto;
    bottom: -10px;
    left: 0;
    right: 0;
    width: 100%;
    height: 85vh;
    transform: translateY(100%);
    border-left: none;
    border-top: 2px solid var(--color-border);
    border-radius: 16px 16px 0 0;
  }

  #app.state-active .info-panel {
    transform: translateY(0);
  }

  .idle-hint {
    bottom: auto;
    top: 38vh;
    white-space: normal;
    text-align: center;
    width: 100%;
    font-size: clamp(11px, 3vw, 14px);
    left: 50%;
	padding: 0;
  }

  .lang-switcher {
    top: 1rem;
    left: 1rem;
  }

  .lang-btn {
    min-width: 44px;
    min-height: 44px;
    font-size: 0.85rem;
    padding: 0 0.75rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  #valeni-logo {
    height: 80vh;
  }

  :root {
    --panel-width:     60%;
    --logo-width-open: 40%;
  }

  .idle-hint {
    font-size: clamp(10px, 1.5vh, 13px);
    bottom: 2vh;
  }
}
