/* laylines.games — stile del sito. Palette derivata dalla key art Steam. */

:root {
  --sea-top: #052A40;
  --sea-mid: #0A5578;
  --sea-low: #0E6E97;
  --cyan: #35C7E8;
  --navy: #122036;
  --gold: #F0A83A;
  --ink: #EAF6FB;
  --ink-dim: #A9CBDA;
  --steam: #1B2838;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", sans-serif;
  background: var(--sea-top);
  color: var(--ink);
  line-height: 1.6;
}

img { max-width: 100%; display: block; }

h1, h2 {
  font-weight: 800;
  font-style: italic;
  letter-spacing: 0.01em;
  line-height: 1.15;
}

/* ---------- barra alta ---------- */

.topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.6rem 1.2rem;
  background: color-mix(in srgb, var(--sea-top) 82%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(53, 199, 232, 0.15);
}

.topbar-brand img { height: 34px; width: auto; }

.topbar-nav { display: flex; gap: 1.2rem; flex: 1; }

.topbar-nav a {
  color: var(--ink-dim);
  text-decoration: none;
  font-size: 0.95rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.topbar-nav a:hover { color: var(--cyan); }

.topbar-right { display: flex; align-items: center; gap: 0.8rem; }

select {
  background: var(--navy);
  color: var(--ink);
  border: 1px solid rgba(53, 199, 232, 0.35);
  border-radius: 6px;
  padding: 0.3rem 0.5rem;
  font: inherit;
  font-size: 0.85rem;
}

/* ---------- bottoni ---------- */

.btn {
  display: inline-block;
  padding: 0.85rem 1.7rem;
  border-radius: 10px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover { transform: translateY(-2px); }

.btn-steam {
  background: linear-gradient(135deg, var(--gold), #d98a1c);
  color: #241605;
  box-shadow: 0 6px 24px rgba(240, 168, 58, 0.35);
}

.btn-steam:hover { box-shadow: 0 10px 30px rgba(240, 168, 58, 0.5); }

.btn-ghost {
  border: 2px solid var(--cyan);
  color: var(--cyan);
}

.btn-small { padding: 0.45rem 0.9rem; font-size: 0.8rem; }

.btn-big { font-size: 1.15rem; padding: 1.1rem 2.4rem; }

/* ---------- hero ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg,
    rgba(5, 42, 64, 0.55) 0%,
    rgba(5, 42, 64, 0.35) 45%,
    rgba(5, 42, 64, 0.92) 100%);
}

.hero-content {
  position: relative;
  text-align: center;
  padding: 6rem 1.5rem 4rem;
  max-width: 860px;
  animation: hero-in 0.9s ease both;
}

@keyframes hero-in {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: none; }
}

.hero-logo {
  width: min(420px, 70vw);
  margin: 0 auto 1.6rem;
  filter: drop-shadow(0 10px 30px rgba(0, 0, 0, 0.5));
}

.hero h1 { font-size: clamp(1.6rem, 4vw, 2.6rem); margin-bottom: 1rem; }

.hero p { color: var(--ink-dim); max-width: 640px; margin: 0 auto 1.8rem; }

.hero-cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

.hero-claim {
  margin-top: 2.2rem;
  font-style: italic;
  color: var(--gold) !important;
  letter-spacing: 0.04em;
}

/* ---------- sezioni ---------- */

.section {
  max-width: 1080px;
  margin: 0 auto;
  padding: 5rem 1.5rem;
}

.section h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  margin-bottom: 1.4rem;
  color: var(--ink);
}

.section-trailer { text-align: center; }

.trailer-player {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(53, 199, 232, 0.25);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

/* ---------- feature ---------- */

.feature {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2.2rem 0;
}

.feature img {
  border-radius: 12px;
  border: 1px solid rgba(53, 199, 232, 0.2);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.4);
}

.feature-flip img { order: 2; }

.feature h2 { color: var(--cyan); font-size: 1.5rem; }

.feature p { color: var(--ink-dim); }

/* ---------- la strada per il trofeo ---------- */

.section-road {
  text-align: center;
  position: relative;
  background: linear-gradient(180deg, transparent, rgba(10, 85, 120, 0.25), transparent);
  max-width: none;
}

.section-road h2, .section-road p { position: relative; }

.section-road p { max-width: 640px; margin: 0 auto; color: var(--ink-dim); }

.road-svg {
  width: min(680px, 90vw);
  margin: 0 auto 1rem;
  display: block;
}

.layline {
  stroke: var(--gold);
  stroke-width: 5;
  stroke-linecap: round;
  stroke-dasharray: 16 13;
  opacity: 0.85;
  animation: layline-flow 2.4s linear infinite;
}

@keyframes layline-flow {
  to { stroke-dashoffset: -58; }
}

.road-buoy { fill: #F59F2E; stroke: #fff; stroke-width: 4; }

.road-buoy-glow {
  fill: var(--cyan);
  opacity: 0.18;
  transform-origin: 450px 60px;
  animation: buoy-pulse 2.4s ease-in-out infinite;
}

@keyframes buoy-pulse {
  0%, 100% { transform: scale(1); opacity: 0.18; }
  50% { transform: scale(1.35); opacity: 0.08; }
}

.road-stats {
  display: flex;
  gap: 3.5rem;
  justify-content: center;
  margin-top: 2.4rem;
  flex-wrap: wrap;
}

.road-stats strong {
  display: block;
  font-size: 2.6rem;
  font-style: italic;
  color: var(--gold);
  line-height: 1;
}

.road-stats span {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.85rem;
  color: var(--ink-dim);
}

/* ---------- galleria ---------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
}

.gallery-grid img {
  border-radius: 8px;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border: 1px solid rgba(53, 199, 232, 0.15);
}

.gallery-grid img:hover {
  transform: scale(1.03);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

dialog#lightbox {
  border: none;
  background: transparent;
  max-width: 92vw;
  max-height: 92vh;
  outline: none;
}

dialog#lightbox::backdrop { background: rgba(2, 14, 22, 0.88); }

dialog#lightbox img { max-height: 88vh; border-radius: 10px; cursor: zoom-out; }

/* ---------- chiusa e footer ---------- */

.section-final { text-align: center; }

.section-final h2 { color: var(--gold); margin-bottom: 2rem; }

.footer {
  border-top: 1px solid rgba(53, 199, 232, 0.15);
  padding: 2.5rem 1.5rem;
  text-align: center;
}

.footer-logo { height: 44px; width: auto; margin: 0 auto 1rem; }

.footer-links {
  display: flex;
  gap: 1.5rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 1rem;
}

.footer-links a { color: var(--cyan); text-decoration: none; }

.footer-links a:hover { text-decoration: underline; }

.footer-note { color: var(--ink-dim); font-size: 0.85rem; }

/* ---------- animazione di rivelazione ---------- */

.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s ease, transform 0.7s ease; }

.reveal.is-visible { opacity: 1; transform: none; }

/* ---------- responsive ---------- */

@media (max-width: 820px) {
  .topbar-nav { display: none; }
  .feature { grid-template-columns: 1fr; gap: 1.2rem; }
  .feature-flip img { order: 0; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .layline, .road-buoy-glow, .hero-content { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}
