/* efallastapatente.it — home pre-lancio, identità del gioco (palette, font, componenti).
   Non dipende dai file in /gioco/. */

:root {
  --ink: #203c33;
  --green: #246348;
  --green-dark: #164c36;
  --orange: #ed8837;
  --paper: #fff8ed;
  --muted: #6e7b71;
  --line: #e7ddcd;
  --gold: #f5c94d;
  --car-color: #f18a38;
  --wheel-color: #dbd2ba;
  --white: #fffdf8;
  --max: 46rem;
  font-family: "Trebuchet MS", ui-rounded, "Arial Rounded MT Bold", system-ui, -apple-system, sans-serif;
  color: var(--ink);
  font-size: 16px;
  font-synthesis: none;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #e5eddc url("../img/landscape.svg") center bottom / cover no-repeat;
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
}

button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: var(--green); }
button:focus-visible,
a:focus-visible,
input:focus-visible {
  outline: 3px solid #1674b6;
  outline-offset: 4px;
}
img { max-width: 100%; height: auto; display: block; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

.skip {
  position: absolute;
  left: .75rem;
  top: -3rem;
  background: var(--green-dark);
  color: #fff;
  padding: .5rem .8rem;
  border-radius: .6rem;
  z-index: 20;
}
.skip:focus { top: .75rem; }

.wrap {
  width: min(calc(100% - 2rem), var(--max));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 8;
  background: #fff8edf2;
  border-bottom: 1px solid #eddfcb;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
  text-align: left;
  flex-shrink: 0;
}
.brand > img {
  width: 61px;
  height: auto;
}
.brand > span {
  position: relative;
  font-size: 16px;
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -.7px;
}
.brand b {
  font-size: 23px;
  letter-spacing: -.8px;
}
.brand i {
  display: block;
  height: 4px;
  background: var(--orange);
  border-radius: 80%;
  transform: rotate(-3deg);
  margin-top: 3px;
}

.nav-links {
  display: flex;
  gap: .9rem;
  font-size: .95rem;
  font-weight: 700;
}
.nav-links a {
  color: var(--muted);
  text-decoration: none;
}
.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--green-dark);
}

.hero { padding: 2rem 0 1.2rem; }

.hero-grid {
  display: grid;
  gap: 1rem;
  align-items: center;
}

.eyebrow {
  font-size: 12px;
  letter-spacing: 2.5px;
  font-weight: 800;
  color: #53725b;
  margin: 0 0 .4rem;
}

.hero h1 {
  font-size: clamp(2.3rem, 9vw, 4.2rem);
  line-height: 1.05;
  letter-spacing: -2px;
  margin: 0 0 .85rem;
  font-weight: 900;
}
.hero h1 span { color: #357151; }

.lede {
  font-size: 1.12rem;
  line-height: 1.65;
  color: #617461;
  margin: 0 0 1.5rem;
  max-width: 36rem;
}

.hero-art {
  display: flex;
  justify-content: center;
}
.hero-car {
  width: min(100%, 260px);
  transform: rotate(-4deg);
  filter: drop-shadow(0 12px 18px #29462b30);
}

.countdown {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .5rem;
  margin: 0 0 1rem;
}
.cd-cell {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 16px;
  text-align: center;
  padding: .75rem .2rem .55rem;
  box-shadow: 0 8px 24px #29462b14;
}
.cd-cell strong {
  display: block;
  font-size: clamp(1.4rem, 5vw, 2rem);
  font-variant-numeric: tabular-nums;
  letter-spacing: -.03em;
  line-height: 1;
  font-weight: 900;
}
.cd-cell span {
  display: block;
  margin-top: .25rem;
  font-size: .68rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  font-weight: 700;
}
.cd-caption {
  margin: 0;
  color: var(--muted);
  font-size: .95rem;
}

.kicker {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: #8b755e;
  margin: 0 0 9px;
}

section { padding: 1rem 0 1.6rem; }
section h2 {
  font-size: clamp(1.55rem, 4vw, 2rem);
  letter-spacing: -.04em;
  line-height: 1.15;
  font-weight: 900;
  margin: 0 0 .55rem;
}
section .intro {
  color: var(--muted);
  margin: 0 0 1.15rem;
  line-height: 1.55;
}

.coming {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: .75rem;
}
.coming li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 21px;
  padding: 18px;
  box-shadow: 0 8px 24px #29462b12;
}
.coming strong {
  display: block;
  margin: .45rem 0 .2rem;
  font-size: 1.08rem;
  letter-spacing: -.02em;
}
.coming p { margin: 0; color: #61715d; }

.pill {
  display: inline-flex;
  gap: 5px;
  align-items: center;
  border-radius: 30px;
  padding: 6px 10px;
  background: #e7eedc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--green-dark);
}
.pill.orange {
  background: #ffdfb2;
  color: #8b491b;
}

.preview-layout {
  display: grid;
  gap: 1.25rem;
  align-items: center;
}
.preview { margin: 0; }
.preview-frame {
  background: var(--paper);
  border: 1px solid #fff9;
  box-shadow: 0 22px 80px #29462b30, 0 0 0 7px #fff3;
  border-radius: 30px;
  overflow: hidden;
}
.preview-head {
  padding: 18px 20px 8px;
}
.preview-head p {
  margin: 10px 0 0;
  font-size: 1.45rem;
  font-weight: 900;
  letter-spacing: -.04em;
}
.road-preview {
  position: relative;
  height: 280px;
  background: linear-gradient(#f7f4e8, #e5eddc);
}
.road-svg {
  position: absolute;
  inset: 12px 8px 8px;
  width: calc(100% - 16px);
  height: calc(100% - 20px);
}
.node-wrap {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 2;
}
.level-node {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #f6f7ee;
  border: 5px solid white;
  box-shadow: 0 0 0 2.5px #9ea99c, 0 5px 0 #768372;
  color: #8e9a8a;
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 900;
}
.level-node.done {
  background: var(--green);
  color: white;
  box-shadow: 0 0 0 2.5px #244e35, 0 5px 0 #244e35;
}
.level-node.current {
  background: var(--orange);
  color: white;
  box-shadow: 0 0 0 3px #a8632c, 0 5px 0 #a8632c;
  position: relative;
}
.level-node.current::after {
  content: "";
  position: absolute;
  inset: -9px;
  border: 2px solid #ee9c54;
  border-radius: 50%;
  opacity: .4;
  pointer-events: none;
  animation: pulse 2.5s infinite;
}
.node-label {
  position: absolute;
  left: 50%;
  top: -28px;
  transform: translateX(-50%);
  background: #fff6e7;
  color: #92521e;
  padding: 5px 9px;
  border-radius: 9px;
  font-size: 10px;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 2px 8px #304a2220;
}
.node-car {
  position: absolute;
  left: 58%;
  top: -6px;
  width: 86px;
  height: auto;
  transform: rotate(-8deg);
  pointer-events: none;
  z-index: 3;
  filter: drop-shadow(0 4px 6px #29462b33);
}
.preview figcaption {
  margin-top: .7rem;
  text-align: center;
  font-size: .85rem;
  color: var(--muted);
}

@keyframes pulse {
  50% { transform: scale(1.08); opacity: .12; }
}

.card {
  border: 1px solid var(--line);
  background: var(--white);
  border-radius: 21px;
  padding: 18px;
  box-shadow: 0 8px 24px #29462b12;
}

.waitlist-form { display: grid; gap: .75rem; }
.waitlist-form label, .consent { font-size: .95rem; }
.waitlist-form input[type="email"] {
  display: block;
  width: 100%;
  margin-top: .35rem;
  border: 1.5px solid #c5cdbb;
  border-radius: 13px;
  padding: .8rem .85rem;
  background: var(--paper);
  color: var(--ink);
}
.waitlist-form input:disabled { opacity: .7; }
.consent {
  display: flex;
  gap: .55rem;
  align-items: flex-start;
  color: var(--muted);
}
.consent input {
  margin-top: .2rem;
  width: 18px;
  height: 18px;
  accent-color: var(--green);
  flex-shrink: 0;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  border: 0;
  border-radius: 16px;
  padding: 16px 18px;
  min-height: 53px;
  font-weight: 800;
  font-size: 15px;
  letter-spacing: .3px;
  background: var(--green);
  color: #fff;
  box-shadow: 0 4px 0 var(--green-dark);
  cursor: pointer;
  transition: transform .12s, background .12s;
}
.btn:hover { background: #2c7553; }
.btn:active {
  transform: translateY(2px);
  box-shadow: 0 2px 0 var(--green-dark);
}
.btn:disabled,
.btn[aria-disabled="true"] {
  background: #bcc7b8;
  box-shadow: 0 4px 0 #a4b09f;
  color: #fff;
  cursor: default;
}

.msg { margin: .2rem 0 0; font-size: .95rem; }
.msg.ok { color: var(--green); }
.msg.warn {
  background: #ffedce;
  color: #92622c;
  padding: 13px 15px;
  border-radius: 14px;
  font-size: .88rem;
  line-height: 1.55;
}

.legal {
  font-size: .95rem;
  color: #61715d;
  padding: 2rem 0 2.4rem;
}
.legal h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  letter-spacing: -.04em;
  font-weight: 900;
  color: var(--ink);
  margin: 0 0 .6rem;
}
.legal h2 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  color: var(--ink);
}
.legal .wrap {
  background: var(--paper);
  border: 1px solid #fff9;
  box-shadow: 0 16px 50px #29462b22, 0 0 0 6px #fff3;
  border-radius: 30px;
  padding: 1.5rem 1.25rem 1.75rem;
}

.site-footer { margin-top: 1.5rem; }
.site-footer .wrap { padding: 1.3rem 0 2.2rem; }
.site-footer p {
  margin: 0 0 .55rem;
  color: var(--muted);
  font-size: .88rem;
}
.tiny { font-size: .8rem; }

@media (min-width: 720px) {
  :root { --max: 68rem; }
  body { background-attachment: fixed; }
  .hero { padding-top: 2.6rem; }
  .hero-grid {
    grid-template-columns: 1.15fr .85fr;
    gap: 2rem;
  }
  .hero-car { width: min(100%, 340px); }
  .coming { grid-template-columns: repeat(3, 1fr); }
  .preview-layout {
    grid-template-columns: 1fr 1.05fr;
    gap: 2.2rem;
  }
  .card { padding: 1.4rem 1.5rem 1.5rem; }
  .legal .wrap { padding: 2rem 2.1rem 2.2rem; }
}

@media (max-width: 420px) {
  .brand > img { width: 49px; }
  .brand > span { font-size: 14px; }
  .brand b { font-size: 21px; }
  .nav-links { gap: .65rem; font-size: .85rem; }
  .level-node { width: 46px; height: 46px; font-size: 17px; }
  .node-car { width: 72px; }
}
