/* =====================================================
   MENTALITÀ VICHINGA — Sito in costruzione
   Forgia rituale: stylesheet
   ===================================================== */

:root {
  /* Palette: nero profondo, arancione bruciato, bronzo antico */
  --bg: #0a0a0a;
  --bg-warm: #1a0d05;
  --orange: #ff6b1a;
  --orange-bright: #ff8a3d;
  --orange-deep: #c84a0e;
  --bronze: #b8860b;
  --bronze-light: #d4a017;
  --white-warm: #f5e6d3;
  --white: #ffffff;

  /* Type */
  --font-display: 'Bebas Neue', 'Impact', sans-serif;
  --font-runic-display: 'MedievalSharp', serif;
  --font-runic-text: 'Noto Sans Runic', serif;
  --font-body: 'Cormorant Garamond', Georgia, serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--white-warm);
  font-family: var(--font-body);
  min-height: 100vh;
  min-height: 100dvh;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: default;
  /* Safe zones per gli elementi fixed (audio-toggle in alto, instagram in basso) */
  padding: 80px 0 80px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Atmospheric vignette + warm centre glow */
.vignette {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse at center, var(--bg-warm) 0%, transparent 55%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0,0,0,0.85) 100%);
  pointer-events: none;
  z-index: 1;
}

#embers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}

/* =====================================================
   La Forgia: composition area
   ===================================================== */
.forge {
  /* La forgia si adatta all'altezza disponibile dopo padding e tagline+status */
  --forge-size: min(88vmin, calc(100vh - 280px), 720px);
  width: var(--forge-size);
  height: var(--forge-size);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 3;
}

.runic-circle {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 0 40px rgba(255, 107, 26, 0.18));
  overflow: visible;
}

.runic-circle .ring-outer {
  filter: drop-shadow(0 0 8px rgba(255, 107, 26, 0.55));
}
.runic-circle .ring-inner {
  filter: drop-shadow(0 0 5px rgba(255, 107, 26, 0.5));
}
.runic-circle .runes text {
  filter: drop-shadow(0 0 6px rgba(255, 107, 26, 0.6));
}
.runic-circle .ticks line {
  filter: drop-shadow(0 0 3px rgba(255, 107, 26, 0.4));
}

/* =====================================================
   Logo
   ===================================================== */
.logo {
  position: relative;
  z-index: 5;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  user-select: none;
  pointer-events: none;
}

.mentalita {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 7.5vmin, 5.5rem);
  letter-spacing: 0.09em;
  color: var(--orange);
  font-weight: 400;
  text-shadow:
    0 0 22px rgba(255, 107, 26, 0.55),
    0 0 4px rgba(255, 200, 120, 0.4);
  line-height: 1;
}

.logo-divider {
  width: 70%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--bronze) 30%, var(--bronze-light) 50%, var(--bronze) 70%, transparent);
  opacity: 0.7;
  transform-origin: center;
}

.vichinga {
  /* Nota: per matching più fedele alla maglietta, sostituibile con un font runico
     custom tipo "Norse" (dafont) tramite @font-face. MedievalSharp dà un look
     carved/medievale che funziona bene con l'estetica forgia. */
  font-family: var(--font-runic-display);
  font-size: clamp(2.1rem, 6.4vmin, 4.6rem);
  letter-spacing: 0.16em;
  color: var(--orange);
  font-weight: 400;
  text-shadow:
    0 0 22px rgba(255, 107, 26, 0.55),
    0 0 4px rgba(255, 200, 120, 0.4);
  line-height: 1;
}

/* =====================================================
   Tagline & status
   ===================================================== */
.tagline {
  position: relative;
  z-index: 4;
  margin-top: 28px;
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(1rem, 1.7vmin, 1.25rem);
  color: var(--white-warm);
  letter-spacing: 0.06em;
  text-align: center;
  padding: 0 1rem;
}

.status {
  position: relative;
  z-index: 4;
  margin-top: 22px;
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 1.8vmin, 1.25rem);
  letter-spacing: 0.5em;
  color: var(--bronze-light);
  text-indent: 0.5em;
  text-align: center;
  text-shadow:
    0 0 12px rgba(212, 160, 23, 0.4),
    0 0 24px rgba(212, 160, 23, 0.15);
}

/* =====================================================
   Contatti & UI controls
   ===================================================== */
.instagram {
  position: fixed;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--white-warm);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: color 0.4s ease, text-shadow 0.4s ease;
  z-index: 10;
  white-space: nowrap;
}

.instagram:hover {
  color: var(--orange);
  text-shadow: 0 0 12px rgba(255, 107, 26, 0.5);
}
.instagram:hover svg { color: var(--orange); }
.instagram svg { transition: color 0.4s ease; }

.audio-toggle {
  position: fixed;
  top: 24px;
  right: 24px;
  background: transparent;
  border: 1px solid rgba(255, 107, 26, 0.35);
  border-radius: 50%;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--orange);
  transition: all 0.4s ease;
  z-index: 10;
  padding: 0;
}

.audio-toggle:hover {
  border-color: var(--orange);
  background: rgba(255, 107, 26, 0.08);
  box-shadow: 0 0 16px rgba(255, 107, 26, 0.3);
}

.audio-toggle .sound-off { display: none; }
.audio-toggle.muted .sound-on { display: none; }
.audio-toggle.muted .sound-off { display: inline; }
.audio-toggle.muted { color: var(--white-warm); opacity: 0.6; }

.brand-footer {
  position: fixed;
  bottom: 10px;
  right: 18px;
  font-family: var(--font-body);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  color: var(--white-warm);
  z-index: 10;
}

.brand-footer span {
  color: var(--orange);
  font-weight: 600;
}

/* =====================================================
   Initial states (hidden until timeline runs)
   ===================================================== */
.runic-circle .runes text { opacity: 0; }
.mentalita,
.vichinga,
.logo-divider,
.tagline,
.status {
  visibility: hidden;
  opacity: 0;
}
.instagram,
.audio-toggle,
.brand-footer {
  visibility: hidden;
  opacity: 0;
}

/* =====================================================
   Start overlay
   ===================================================== */
.start-overlay {
  position: fixed;
  inset: 0;
  background: var(--bg);
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.9s ease;
}

.start-overlay::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(255, 107, 26, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.start-content {
  text-align: center;
  position: relative;
  animation: pulseStart 2.4s ease-in-out infinite;
}

.start-rune {
  font-family: var(--font-runic-text);
  font-size: clamp(4rem, 10vmin, 6rem);
  color: var(--orange);
  text-shadow:
    0 0 30px rgba(255, 107, 26, 0.7),
    0 0 60px rgba(255, 107, 26, 0.3);
  margin-bottom: 1.6rem;
  line-height: 1;
}

.start-text {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2.2vmin, 1.5rem);
  letter-spacing: 0.35em;
  text-indent: 0.35em;
  color: var(--white-warm);
  margin-bottom: 0.8rem;
}

.start-hint {
  font-family: var(--font-body);
  font-style: italic;
  font-size: clamp(0.8rem, 1.4vmin, 0.95rem);
  letter-spacing: 0.18em;
  color: var(--bronze-light);
  opacity: 0.75;
}

@keyframes pulseStart {
  0%, 100% { transform: scale(1); opacity: 0.9; }
  50%      { transform: scale(1.025); opacity: 1; }
}

/* =====================================================
   Mobile
   ===================================================== */
@media (max-width: 600px) {
  body { padding: 60px 0 70px; }
  .forge { --forge-size: min(92vmin, calc(100vh - 240px)); }
  .instagram { font-size: 0.88rem; bottom: 26px; }
  .audio-toggle { top: 18px; right: 18px; width: 40px; height: 40px; }
  .brand-footer { font-size: 0.65rem; }
  .tagline { margin-top: 22px; }
  .status { letter-spacing: 0.4em; text-indent: 0.4em; margin-top: 16px; }
}

@media (max-height: 600px) and (orientation: landscape) {
  body { padding: 50px 0 50px; }
  .forge { --forge-size: min(70vmin, calc(100vh - 180px)); }
  .tagline { margin-top: 14px; }
  .status { margin-top: 10px; }
  .instagram { bottom: 18px; }
}

/* Reduced motion: skip animations, show end state */
@media (prefers-reduced-motion: reduce) {
  .start-content { animation: none; }
}
