/* ═══════════════════════════════════════════════════════════
   Vanaga Ligzda · 3D tūre — UI
   Dark forest / warm amber, Fraunces + Jost
   ═══════════════════════════════════════════════════════════ */

:root {
  --ink:        #f2ead8;
  --ink-dim:    rgba(242, 234, 216, 0.62);
  --pine:       #10160f;
  --pine-glass: rgba(14, 20, 13, 0.72);
  --amber:      #e8a84b;
  --amber-soft: rgba(232, 168, 75, 0.32);
  --hairline:   rgba(242, 234, 216, 0.14);
  --serif: "Fraunces", Georgia, serif;
  --sans:  "Jost", "Segoe UI", sans-serif;
}

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

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--pine);
  font-family: var(--sans);
  color: var(--ink);
}

#app, #app canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
}

/* ── brand ─────────────────────────────────────────────── */

.brand {
  position: fixed;
  top: 22px;
  left: 26px;
  display: flex;
  align-items: center;
  gap: 13px;
  z-index: 10;
  pointer-events: none;
  animation: fadeDown 0.9s 0.25s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.brand-mark, .splash-mark { width: 46px; height: 46px; }
.mark-ring { fill: var(--pine-glass); stroke: var(--amber-soft); stroke-width: 1.4; }
.mark-hawk { fill: var(--amber); }

.brand-name {
  display: block;
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 14px rgba(0, 0, 0, 0.55);
}

.brand-sub {
  display: block;
  font-size: 10.5px;
  font-weight: 400;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-dim);
  margin-top: 2px;
  text-shadow: 0 1px 10px rgba(0, 0, 0, 0.55);
}

/* ── minimap ───────────────────────────────────────────── */

.minimap-wrap {
  position: fixed;
  top: 20px;
  right: 22px;
  z-index: 10;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(246, 240, 224, 0.94);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.42), inset 0 0 0 1px rgba(28, 34, 22, 0.18);
  cursor: pointer;
  animation: fadeDown 0.9s 0.4s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

#minimap { display: block; width: 260px; height: 190px; }

.minimap-label {
  position: absolute;
  bottom: 6px;
  right: 10px;
  font-size: 9.5px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: rgba(28, 34, 22, 0.78);
  pointer-events: none;
}

/* ── info panel ────────────────────────────────────────── */

.panel {
  position: fixed;
  left: 26px;
  bottom: 26px;
  z-index: 10;
  width: min(392px, calc(100vw - 52px));
  padding: 22px 24px 18px;
  border-radius: 16px;
  background: var(--pine-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 14px 44px rgba(0, 0, 0, 0.45), inset 0 0 0 1px var(--hairline);
  animation: fadeUp 0.9s 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.panel-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 10.5px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--amber);
}

.eyebrow-line { flex: 1; height: 1px; background: var(--hairline); }

.panel-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: 33px;
  line-height: 1.08;
  margin: 9px 0 8px;
  transition: opacity 0.3s;
}

.panel-desc {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink-dim);
  min-height: 3.1em;
  transition: opacity 0.3s;
}

.panel.switching .panel-name,
.panel.switching .panel-desc { opacity: 0; }

.panel-nav {
  display: flex;
  gap: 8px;
  margin-top: 15px;
}

.nav-btn {
  font-family: var(--sans);
  font-size: 14px;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: rgba(242, 234, 216, 0.07);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 9px 17px;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, color 0.25s;
}

.nav-btn:hover { background: rgba(232, 168, 75, 0.16); border-color: var(--amber-soft); }

.nav-play { flex: 1; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; }
.nav-play span { margin-left: 4px; }
.nav-play.on { background: var(--amber); border-color: var(--amber); color: #241806; font-weight: 500; }

/* ── chips ─────────────────────────────────────────────── */

.chips {
  position: fixed;
  right: 22px;
  bottom: 26px;
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 7px;
  animation: fadeUp 0.9s 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.chip {
  font-family: var(--sans);
  font-size: 12.5px;
  font-weight: 400;
  letter-spacing: 0.05em;
  color: var(--ink-dim);
  background: var(--pine-glass);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 7px 15px;
  cursor: pointer;
  transition: all 0.25s;
}

.chip:hover { color: var(--ink); border-color: var(--amber-soft); transform: translateX(-3px); }

.chip.active {
  color: #241806;
  background: var(--amber);
  border-color: var(--amber);
  font-weight: 500;
  transform: translateX(-6px);
}

/* ── hint + credits ────────────────────────────────────── */

.hint {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  font-size: 11.5px;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--ink-dim);
  background: var(--pine-glass);
  backdrop-filter: blur(10px);
  border: 1px solid var(--hairline);
  border-radius: 999px;
  padding: 8px 18px;
  white-space: nowrap;
  transition: opacity 1.2s;
  animation: fadeDown 0.9s 1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hint.gone { opacity: 0; pointer-events: none; }

.credits {
  position: fixed;
  bottom: 9px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9;
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: rgba(242, 234, 216, 0.78);
  white-space: nowrap;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.6);
}

/* ── splash ────────────────────────────────────────────── */

#splash {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background:
    radial-gradient(120% 90% at 50% 12%, rgba(58, 74, 48, 0.55), transparent 60%),
    var(--pine);
  transition: opacity 0.9s ease, visibility 0.9s;
}

#splash.gone { opacity: 0; visibility: hidden; }

.splash-mark { width: 84px; height: 84px; animation: markFloat 3.2s ease-in-out infinite; }

.splash-name {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(38px, 7vw, 58px);
  letter-spacing: 0.02em;
}

.splash-sub {
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--ink-dim);
  text-align: center;
  padding: 0 20px;
}

.splash-bar {
  width: 148px;
  height: 2px;
  margin-top: 18px;
  border-radius: 2px;
  background: rgba(242, 234, 216, 0.12);
  overflow: hidden;
}

.splash-bar span {
  display: block;
  height: 100%;
  width: 40%;
  border-radius: 2px;
  background: var(--amber);
  animation: barSlide 1.1s ease-in-out infinite;
}

/* ── animations ────────────────────────────────────────── */

@keyframes fadeUp   { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
@keyframes markFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes barSlide { 0% { margin-left: -42%; } 100% { margin-left: 102%; } }

/* ── responsive ────────────────────────────────────────── */

/* planšetēs hint josla vairs neietilpst starp logo un karti */
@media (max-width: 1200px) {
  .hint { display: none; }
}

@media (max-width: 760px), (max-height: 520px) {
  .brand { top: 14px; left: 14px; gap: 10px; }
  .brand-mark { width: 38px; height: 38px; }
  .brand-name { font-size: 17px; }
  .hint { display: none; }
  .credits { display: none; }

  .minimap-wrap { top: 104px; right: 12px; transform: scale(0.64); transform-origin: top right; }

  .chips {
    left: 14px;
    right: 14px;
    bottom: auto;
    top: 62px;
    flex-direction: row;
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: none;
    align-items: center;
    padding-bottom: 4px;
  }
  .chips::-webkit-scrollbar { display: none; }
  .chip { flex: 0 0 auto; font-size: 11.5px; padding: 6px 12px; }
  .chip.active, .chip:hover { transform: none; }

  .panel { left: 14px; right: 14px; bottom: 14px; width: auto; padding: 16px 18px 14px; }
  .panel-name { font-size: 25px; }
  .panel-desc { font-size: 13px; min-height: 0; }
}

/* horizontāls telefons — vēl kompaktāk, lai nekas nepārklājas */
@media (max-height: 520px) {
  .minimap-wrap { transform: scale(0.5); }
  .panel { right: auto; width: min(340px, 60vw); }
  .panel-desc { display: none; }
}
