/* =========================================================
   ANDÚRIL — La Fiamma dell'Ovest
   Foglio di stile principale
   ========================================================= */

:root {
  --bg:        #0b0d12;
  --bg-2:      #0f121a;
  --bg-3:      #141926;
  --panel:     #161b27;
  --gold:      #c8a24a;
  --gold-soft: #d8b65e;
  --gold-bri:  #f2dd9b;
  --steel:     #cdd3dc;
  --steel-dk:  #7c8595;
  --text:      #ddd6c4;
  --muted:     #9a9384;
  --ember:     #e89a45;
  --line:      rgba(200,162,74,.18);

  --ff-display: "Cinzel Decorative", serif;
  --ff-head:    "Cinzel", serif;
  --ff-body:    "EB Garamond", Georgia, serif;

  --maxw: 1140px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    radial-gradient(1200px 700px at 50% -200px, #1a2030 0%, transparent 60%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 100%);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 1.18rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

h1, h2, h3 { font-family: var(--ff-head); font-weight: 600; line-height: 1.2; color: #f4eedd; }

a { color: var(--gold-soft); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-bri); }

em { color: var(--gold-soft); font-style: italic; }
strong { color: #efe7d2; font-weight: 600; }

::selection { background: rgba(200,162,74,.30); color: #fff; }

.overline {
  font-family: var(--ff-head);
  text-transform: uppercase;
  letter-spacing: .32em;
  font-size: .74rem;
  color: var(--gold);
  margin: 0 0 14px;
}

.center { text-align: center; }

/* =================== HEADER =================== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,13,18,0);
  backdrop-filter: blur(0px);
  transition: background .3s ease, backdrop-filter .3s ease, box-shadow .3s ease;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled {
  background: rgba(10,12,17,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 8px 30px rgba(0,0,0,.35);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: #f4eedd; }
.brand-mark { color: var(--gold); display: inline-flex; filter: drop-shadow(0 0 6px rgba(200,162,74,.4)); }
.brand-text {
  font-family: var(--ff-head); font-weight: 700;
  letter-spacing: .28em; font-size: 1.12rem;
}
.brand-text .dot { color: var(--gold); }

.main-nav { display: flex; gap: 34px; }
.main-nav a {
  font-family: var(--ff-head); font-size: .82rem; letter-spacing: .14em;
  text-transform: uppercase; color: var(--text); position: relative; padding: 6px 0;
}
.main-nav a::after {
  content: ""; position: absolute; left: 0; bottom: 0; height: 1px; width: 0;
  background: var(--gold); transition: width .25s ease;
}
.main-nav a:hover { color: var(--gold-bri); }
.main-nav a:hover::after { width: 100%; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px; background: none; border: 0;
  cursor: pointer; padding: 8px;
}
.nav-toggle span { width: 26px; height: 2px; background: var(--gold-soft); transition: .3s; border-radius: 2px; }
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* =================== HERO =================== */
.hero { position: relative; min-height: 100vh; display: flex; align-items: center; overflow: hidden; }
.embers { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.hero-glow {
  position: absolute; left: 50%; top: 40%; transform: translate(-50%,-50%);
  width: 700px; height: 700px; z-index: 0; pointer-events: none;
  background: radial-gradient(circle, rgba(200,162,74,.16) 0%, rgba(232,154,69,.07) 35%, transparent 70%);
  filter: blur(8px);
}

.hero-inner {
  position: relative; z-index: 2;
  display: grid; grid-template-columns: 1.1fr .9fr; align-items: center; gap: 30px;
  padding: 110px 24px 90px;
}
.hero-copy { max-width: 560px; }
.hero-title {
  font-family: var(--ff-display); font-weight: 900;
  font-size: clamp(3.6rem, 11vw, 7.5rem); margin: 0; line-height: .95;
  background: linear-gradient(180deg, #fbf3da 0%, #e6c878 45%, #b98a2f 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  text-shadow: 0 0 50px rgba(200,162,74,.25);
  letter-spacing: .02em;
}
.hero-sub {
  font-family: var(--ff-head); font-size: clamp(1.1rem, 3vw, 1.7rem);
  letter-spacing: .26em; text-transform: uppercase; color: var(--gold-soft);
  margin: 14px 0 0;
}
.hero-lede { margin: 26px 0 32px; color: #cfc8b6; font-size: 1.22rem; }

.hero-actions { display: flex; gap: 16px; flex-wrap: wrap; }
.btn {
  display: inline-block; font-family: var(--ff-head); font-size: .82rem;
  letter-spacing: .16em; text-transform: uppercase; padding: 15px 30px; border-radius: 2px;
  transition: transform .2s ease, box-shadow .25s ease, background .25s ease, color .2s ease;
}
.btn-gold {
  background: linear-gradient(135deg, #d8b65e, #b98a2f);
  color: #1a130a; border: 1px solid #e6c878; font-weight: 600;
  box-shadow: 0 8px 26px rgba(200,162,74,.28);
}
.btn-gold:hover { transform: translateY(-2px); color: #14100a; box-shadow: 0 12px 34px rgba(200,162,74,.45); }
.btn-ghost { border: 1px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--gold); color: var(--gold-bri); transform: translateY(-2px); }

.hero-sword { display: flex; justify-content: center; }
.sword-svg {
  height: min(78vh, 700px); width: auto;
  animation: floatSword 6s ease-in-out infinite;
  filter: drop-shadow(0 22px 40px rgba(0,0,0,.55));
}
.sword-glow-group { animation: bladePulse 5s ease-in-out infinite; }
@keyframes floatSword { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes bladePulse { 0%,100% { filter: drop-shadow(0 0 4px rgba(207,214,224,.25)); } 50% { filter: drop-shadow(0 0 14px rgba(232,237,244,.55)); } }

.scroll-cue {
  position: absolute; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 3;
  width: 26px; height: 42px; border: 1px solid var(--line); border-radius: 14px;
  display: flex; justify-content: center; padding-top: 8px;
}
.scroll-cue span { width: 4px; height: 8px; border-radius: 2px; background: var(--gold); animation: scrollDot 1.6s ease infinite; }
@keyframes scrollDot { 0% { opacity: 0; transform: translateY(-4px); } 50% { opacity: 1; } 100% { opacity: 0; transform: translateY(12px); } }

/* =================== SEZIONI =================== */
.section { padding: 110px 0; position: relative; }
.section-head { max-width: 740px; margin: 0 auto 60px; }
.section-head.center { text-align: center; }
.section-head h2 { font-size: clamp(1.9rem, 4.5vw, 3rem); margin: 0; }
.section-intro { color: var(--muted); margin-top: 18px; font-size: 1.18rem; }

.section-name  { background: linear-gradient(180deg, transparent, rgba(20,25,38,.5)); border-top: 1px solid var(--line); }
.section-inscription { background:
  radial-gradient(800px 400px at 50% 0, rgba(232,154,69,.06), transparent 70%), var(--bg-2);
  border-top: 1px solid var(--line); }
.section-history { border-top: 1px solid var(--line); }
.section-spec { background: var(--bg-2); border-top: 1px solid var(--line); }

/* Nome / cards */
.name-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.name-card {
  background: linear-gradient(180deg, rgba(22,27,39,.9), rgba(16,19,27,.9));
  border: 1px solid var(--line); border-radius: 4px; padding: 32px 28px;
  position: relative; overflow: hidden;
}
.name-card::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
  opacity: .6;
}
.name-card h3 { font-size: 1.3rem; margin: 0 0 12px; color: var(--gold-soft); }
.name-card p { margin: 0; color: #cfc8b6; font-size: 1.1rem; }

/* =================== ISCRIZIONE =================== */
.device {
  display: flex; align-items: center; justify-content: center; gap: 22px;
  margin: 0 auto 52px; color: var(--gold); font-size: 1.5rem; opacity: .9;
}
.device-stars { letter-spacing: .35em; font-size: 1rem; color: var(--gold-soft);
  text-shadow: 0 0 14px rgba(200,162,74,.6); }
.device-moon, .device-sun { font-size: 1.9rem; filter: drop-shadow(0 0 10px rgba(200,162,74,.5)); }

.inscriptions { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; max-width: 940px; margin: 0 auto; }
.inscription-card {
  background:
    linear-gradient(180deg, rgba(24,21,15,.7), rgba(15,13,9,.7));
  border: 1px solid var(--line); border-radius: 4px; padding: 36px 34px; margin: 0;
  text-align: center; position: relative;
}
.inscription-card figcaption {
  font-family: var(--ff-head); text-transform: uppercase; letter-spacing: .2em;
  font-size: .72rem; color: var(--gold); margin-bottom: 22px;
}
.elvish {
  font-family: var(--ff-head); font-size: 1.32rem; font-style: italic; color: #efe3c2;
  margin: 0 0 20px; line-height: 1.7; letter-spacing: .02em;
  text-shadow: 0 0 18px rgba(200,162,74,.25);
}
.translation { color: var(--muted); margin: 0; font-size: 1.06rem; }

/* =================== TIMELINE =================== */
.timeline { list-style: none; padding: 0; margin: 0 auto; max-width: 840px; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 24px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(180deg, transparent, var(--line) 12%, var(--line) 88%, transparent);
}
.timeline-item { position: relative; padding: 0 0 46px 70px; }
.timeline-item::before {
  content: ""; position: absolute; left: 16px; top: 6px; width: 18px; height: 18px;
  border-radius: 50%; background: radial-gradient(circle at 35% 35%, var(--gold-bri), var(--gold) 55%, #7a5b1e);
  box-shadow: 0 0 0 5px rgba(200,162,74,.12), 0 0 16px rgba(200,162,74,.55);
}
.timeline-item:last-child { padding-bottom: 0; }
.timeline-era {
  font-family: var(--ff-head); text-transform: uppercase; letter-spacing: .18em;
  font-size: .72rem; color: var(--gold);
}
.timeline-item h3 { font-size: 1.4rem; margin: 6px 0 8px; }
.timeline-item p { margin: 0; color: #cfc8b6; }

/* =================== CITAZIONE GRANDE =================== */
.section-quote { padding: 120px 0; text-align: center;
  background:
    radial-gradient(700px 320px at 50% 50%, rgba(200,162,74,.08), transparent 70%); }
.grand-quote { max-width: 880px; margin: 0 auto; }
.grand-quote p {
  font-family: var(--ff-head); font-style: italic; font-size: clamp(1.4rem, 3.4vw, 2.1rem);
  line-height: 1.5; color: #f1e8cf; margin: 0;
}
.grand-quote p::before, .grand-quote p::after { content: "«»"; }
.grand-quote p::before { content: "«"; color: var(--gold); margin-right: 6px; }
.grand-quote p::after  { content: "»"; color: var(--gold); margin-left: 6px; }
.grand-quote cite {
  display: block; margin-top: 28px; font-family: var(--ff-head); font-style: normal;
  letter-spacing: .2em; text-transform: uppercase; font-size: .85rem; color: var(--gold-soft);
}

/* =================== SCHEDA =================== */
.spec-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: 4px; overflow: hidden; }
.spec-item { background: var(--bg-3); padding: 26px 24px; display: flex; flex-direction: column; gap: 8px; }
.spec-k { font-family: var(--ff-head); text-transform: uppercase; letter-spacing: .14em;
  font-size: .68rem; color: var(--gold); }
.spec-v { font-size: 1.1rem; color: #efe7d2; }

/* =================== FOOTER =================== */
.site-footer { border-top: 1px solid var(--line); background: #080a0e; padding: 56px 0 40px; }
.footer-inner { display: grid; grid-template-columns: 1fr auto; gap: 28px 40px; align-items: start; }
.footer-brand .brand-text { font-size: 1.3rem; letter-spacing: .26em; }
.footer-brand p { margin: 8px 0 0; color: var(--gold-soft); font-style: italic; font-size: 1rem; }
.footer-nav { display: flex; gap: 26px; flex-wrap: wrap; }
.footer-nav a { font-family: var(--ff-head); font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.footer-legal { grid-column: 1 / -1; margin: 18px 0 0; color: #6b6657; font-size: .92rem; line-height: 1.6;
  border-top: 1px solid rgba(255,255,255,.05); padding-top: 22px; }

/* =================== TORNA SU =================== */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: rgba(22,27,39,.9); border: 1px solid var(--line); color: var(--gold-soft);
  font-size: 1.2rem; opacity: 0; pointer-events: none; transform: translateY(10px);
  transition: opacity .3s ease, transform .3s ease, background .2s, color .2s;
}
.to-top.show { opacity: 1; pointer-events: auto; transform: translateY(0); }
.to-top:hover { background: var(--gold); color: #14100a; }

/* =================== REVEAL ON SCROLL =================== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .8s ease, transform .8s ease; }
.reveal.in { opacity: 1; transform: none; }

/* =================== RESPONSIVE =================== */
@media (max-width: 900px) {
  body { font-size: 1.1rem; }
  .hero-inner { grid-template-columns: 1fr; text-align: center; padding-top: 120px; }
  .hero-copy { max-width: 100%; margin: 0 auto; }
  .hero-actions { justify-content: center; }
  .hero-sword { order: -1; margin-bottom: 10px; }
  .sword-svg { height: 46vh; }
  .name-grid { grid-template-columns: 1fr; }
  .inscriptions { grid-template-columns: 1fr; }
  .spec-grid { grid-template-columns: repeat(2, 1fr); }

  .main-nav {
    position: fixed; inset: 72px 0 auto 0; flex-direction: column; gap: 0;
    background: rgba(10,12,17,.97); backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    max-height: 0; overflow: hidden; transition: max-height .35s ease;
  }
  .main-nav.open { max-height: 320px; }
  .main-nav a { padding: 18px 24px; border-top: 1px solid rgba(255,255,255,.04); font-size: .95rem; }
  .nav-toggle { display: flex; }
  .footer-inner { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .section { padding: 80px 0; }
  .spec-grid { grid-template-columns: 1fr; }
  .device { gap: 12px; }
  .device-stars { letter-spacing: .2em; }
}

/* Rispetto delle preferenze di movimento ridotto */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
