/* ===================================================================
   Cargopooling — landing "lista d'attesa"
   Palette ricavata dal layout in /resources/layout.png
   =================================================================== */
:root {
  --gold: #fdba31;
  --gold-deep: #f3a91a;
  --blue: #036bac;        /* onda hero */
  --blue-bright: #0a86d0; /* accento blu vivace */
  --blue-deep: #0a5e9e;   /* footer */
  --navy: #0a1730;        /* titoli / testo scuro */
  --teal: #2bb6e0;        /* accento logo "Cargo" */
  --ink: #33414f;         /* testo campi */
  --muted: #7b8794;       /* sottotitoli grigi */
  --placeholder: #9aa6b2;
  --field-border: #e4e8ee;
  --field-border-focus: #cdd6e0;
  --white: #ffffff;

  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial,
    sans-serif;
  --font-display: 'Space Grotesk', 'Inter', system-ui, sans-serif;

  --maxw: 1120px;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  font-family: var(--font-body);
  color: var(--navy);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; }
}

/* =============================== HERO =============================== */
.hero {
  position: relative;
  /* fondo oro con leggera profondità */
  background:
    radial-gradient(120% 90% at 12% 0%, #ffce5a 0%, rgba(255, 206, 90, 0) 55%),
    linear-gradient(158deg, #fec544 0%, #fdba31 46%, #f7b023 100%);
  overflow: hidden;
  isolation: isolate;
}

/* Onda blu in basso: path SVG ricalcato dal layout (preserveAspectRatio none) */
.hero__wave {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 -2px 14px rgba(4, 60, 100, 0.12));
}

.hero__inner {
  position: relative;
  z-index: 2;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 48px 48px 52px;
  min-height: 620px;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
}

/* ---- colonna testo ---- */
.hero__content {
  display: flex;
  flex-direction: column;
}

.hero__top { padding-top: 12px; }

.hero__title {
  margin: 0 0 26px;
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 700;
  font-size: clamp(44px, 5.8vw, 68px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  animation: heroUp 0.7s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero__title-accent {
  position: relative;
  background: linear-gradient(95deg, #0a78be, #0b9ad8);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
/* sottolineatura a pennello sotto "is back." */
.hero__title-accent::after {
  content: '';
  position: absolute;
  left: 2px;
  right: 6px;
  bottom: -0.12em;
  height: 0.1em;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--blue-bright), transparent);
  opacity: 0.55;
}

.hero__lead {
  margin: 0;
  max-width: 32ch;
  color: #20304d;
  font-size: clamp(15px, 1.45vw, 18px);
  line-height: 1.6;
  font-weight: 500;
  animation: heroUp 0.7s 0.1s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes heroUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* blocco testo sul triangolo blu -> spinto in basso */
.hero__note {
  margin-top: auto;
  padding-top: 56px;
  max-width: 38ch;
  color: rgba(236, 245, 252, 0.94);
  font-size: 14.5px;
  line-height: 1.65;
  animation: heroUp 0.7s 0.22s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}
.hero__note p { margin: 0 0 12px; }
.hero__note p:first-child { font-weight: 500; color: #fff; }
.hero__note p:last-child { margin-bottom: 0; }

/* ---- colonna grafica ---- */
.hero__art {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: heroUp 0.8s 0.06s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.hero__swoosh {
  position: relative;
  z-index: 1;
  width: clamp(240px, 35vw, 400px);
  height: auto;
  margin-top: 26px;
  filter: drop-shadow(0 18px 34px rgba(4, 40, 80, 0.18));
  animation: floaty 7s ease-in-out 0.8s infinite;
}

.hero__shipon {
  position: absolute;
  right: 4px;
  bottom: 6px;
  z-index: 2;
  font-family: var(--font-display);
  color: var(--white);
  font-style: italic;
  font-weight: 600;
  font-size: clamp(24px, 2.8vw, 32px);
  letter-spacing: -0.01em;
  text-shadow: 0 2px 10px rgba(4, 40, 80, 0.25);
}

/* icone decorative sfumate dietro il logo */
.hero__icon {
  position: absolute;
  width: 34px;
  height: 34px;
  fill: none;
  stroke: var(--white);
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.16;
}
.hero__icon--pencil { top: 6%;  left: 6%;  }
.hero__icon--truck  { top: 2%;  right: 22%; }
.hero__icon--shirt  { top: 20%; right: 4%;  }
.hero__icon--mail1  { top: 48%; right: 2%;  }
.hero__icon--mail2  { bottom: 14%; right: 16%; }
.hero__icon--glass  { bottom: 8%; left: 2%; opacity: 0.22; }

/* ========================= LISTA D'ATTESA ========================= */
.waitlist {
  background: var(--white);
  padding: 58px 24px 64px;
}

.waitlist__inner {
  max-width: 540px;
  margin: 0 auto;
  text-align: center;
}

.waitlist__title {
  margin: 0;
  font-family: var(--font-display);
  color: var(--navy);
  font-weight: 700;
  font-size: clamp(27px, 3.2vw, 34px);
  letter-spacing: -0.025em;
}

.waitlist__underline {
  display: block;
  width: 54px;
  height: 4px;
  margin: 14px auto 22px;
  border-radius: 4px;
  background: var(--gold);
}

.waitlist__subtitle {
  margin: 0 auto 30px;
  max-width: 30rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}

/* --------------------------- form (React) --------------------------- */
.form { display: flex; flex-direction: column; gap: 14px; }

.field {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--white);
  border: 1px solid var(--field-border);
  border-radius: 10px;
  padding: 0 16px;
  height: 54px;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.field:focus-within {
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(253, 186, 49, 0.18);
}
.field--error { border-color: #e2574c; }

.field__icon {
  width: 20px;
  height: 20px;
  flex: none;
  margin-right: 12px;
  fill: none;
  stroke: #9aa6b2;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field input,
.field select {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  height: 100%;
}
.field input::placeholder { color: var(--placeholder); }

/* select custom */
.field--select select {
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  padding-right: 24px;
}
.field--select select.is-placeholder { color: var(--placeholder); }
.field__chevron {
  position: absolute;
  right: 16px;
  width: 18px;
  height: 18px;
  pointer-events: none;
  fill: none;
  stroke: #6c7682;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.field__msg {
  margin: -6px 2px 0;
  text-align: left;
  color: #d4453a;
  font-size: 12.5px;
}

.form__submit {
  margin-top: 6px;
  height: 56px;
  border: none;
  border-radius: 10px;
  background: var(--gold);
  color: var(--navy);
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  cursor: pointer;
  transition: background 0.15s, transform 0.05s;
}
.form__submit:hover { background: var(--gold-deep); }
.form__submit:active { transform: translateY(1px); }
.form__submit:disabled { opacity: 0.65; cursor: progress; }

.form__alert {
  margin: 2px 0 0;
  padding: 10px 14px;
  border-radius: 9px;
  background: #fdecea;
  border: 1px solid #f3c2bd;
  color: #b4332a;
  font-size: 13.5px;
  text-align: center;
}

.note {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 8px;
  margin: 16px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}
.note__lock {
  width: 15px;
  height: 15px;
  margin-top: 2px;
  flex: none;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* messaggio di conferma dopo l'invio */
.success {
  text-align: center;
  padding: 8px 0 4px;
  animation: pop 0.35s ease;
}
.success__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  margin-bottom: 16px;
  border-radius: 50%;
  background: rgba(253, 186, 49, 0.18);
}
.success__check {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: var(--gold-deep);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.success__title {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.success__text {
  margin: 0 auto;
  max-width: 30rem;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
}
.success__text strong { color: var(--ink); }
@keyframes pop {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ----------------------- checkbox privacy ----------------------- */
.check {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  margin: 2px 2px 0;
  text-align: left;
  cursor: pointer;
  user-select: none;
}
.check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.check__box {
  flex: none;
  width: 20px;
  height: 20px;
  margin-top: 1px;
  border: 1px solid var(--field-border);
  border-radius: 5px;
  background: var(--white);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, border-color 0.15s;
}
.check__box svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--white);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0;
  transition: opacity 0.12s;
}
.check input:checked + .check__box {
  background: var(--gold);
  border-color: var(--gold);
}
.check input:checked + .check__box svg { opacity: 1; }
.check input:focus-visible + .check__box {
  box-shadow: 0 0 0 3px rgba(253, 186, 49, 0.25);
}
.check__label {
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--muted);
}
.check__label a { color: var(--blue); font-weight: 600; text-decoration: none; }
.check__label a:hover { text-decoration: underline; }
.check--error .check__box { border-color: #e2574c; }

/* textarea (modal) */
.field--area {
  height: auto;
  align-items: stretch;
  padding: 12px 16px;
}
.field--area textarea {
  flex: 1;
  border: none;
  outline: none;
  resize: vertical;
  min-height: 96px;
  background: transparent;
  font: inherit;
  font-size: 15px;
  color: var(--ink);
}
.field--area textarea::placeholder { color: var(--placeholder); }

/* ============================== MODAL ============================== */
.modal__overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(8, 23, 45, 0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade 0.18s ease;
}
.modal {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  background: var(--white);
  border-radius: 16px;
  padding: 34px 32px 30px;
  box-shadow: 0 24px 60px rgba(8, 23, 45, 0.3);
  animation: pop 0.25s ease;
}
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, color 0.15s;
}
.modal__close:hover { background: #f1f3f7; color: var(--navy); }
.modal__close svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.modal__title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--navy);
}
.modal__subtitle {
  margin: 0 0 20px;
  font-size: 14.5px;
  line-height: 1.5;
  color: var(--muted);
}
.modal__sent { text-align: center; padding: 6px 0; }
.modal__sent .form__submit { margin-top: 18px; }

@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* modal privacy: più larga, con testo scorrevole */
.modal--privacy { max-width: 640px; }
.modal--privacy .modal__title { margin-bottom: 2px; }

.privacy-text {
  margin: 18px 0 22px;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 12px;
  text-align: left;
  color: var(--ink);
  font-size: 14.5px;
  line-height: 1.65;
}
.privacy-text h4 {
  margin: 20px 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--navy);
}
.privacy-text p { margin: 0 0 10px; }
.privacy-text strong { color: var(--navy); }
.privacy-text__note {
  margin-top: 18px;
  padding: 12px 14px;
  background: #f6f8fb;
  border-radius: 10px;
  font-size: 13px;
  color: var(--muted);
}
/* scrollbar discreta */
.privacy-text::-webkit-scrollbar { width: 8px; }
.privacy-text::-webkit-scrollbar-thumb {
  background: #d8dee7;
  border-radius: 8px;
}

/* ============================== FOOTER ============================== */
.footer {
  background: var(--blue-deep);
  color: var(--white);
  padding: 30px 24px 26px;
}
.footer__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer__logo {
  margin: 0;
  font-family: var(--font-display);
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.footer__logo span { color: var(--teal); }
.footer__shipon {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 600;
  font-size: 18px;
  color: rgba(255, 255, 255, 0.95);
}
.footer__nav {
  display: flex;
  gap: 34px;
  flex-wrap: wrap;
}
.footer__nav a {
  color: var(--white);
  text-decoration: none;
  font-size: 15px;
  font-weight: 500;
  opacity: 0.95;
  transition: opacity 0.15s;
}
.footer__nav a:hover { opacity: 0.7; }

.footer__copy {
  max-width: var(--maxw);
  margin: 26px auto 0;
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
  font-size: 13px;
}
.footer__copy a {
  color: rgba(255, 255, 255, 0.85);
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255, 255, 255, 0.35);
  transition: color 0.15s, border-color 0.15s;
}
.footer__copy a:hover {
  color: #fff;
  border-color: #fff;
}

/* ============================ RESPONSIVE ============================ */
@media (max-width: 860px) {
  .hero__inner {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 30px 24px 44px;
  }
  /* su mobile l'onda diventa una fascia in basso */
  .hero__wave {
    inset: auto 0 0 0;
    height: 58%;
    min-height: 300px;
  }
  .hero__art {
    order: -1;
    min-height: 220px;
    margin-bottom: 4px;
  }
  .hero__swoosh { width: 188px; margin-top: 8px; }
  .hero__shipon { position: static; align-self: flex-end; margin-top: 10px; }
  .hero__note { padding-top: 34px; max-width: none; }

  .footer__inner { flex-direction: column; align-items: center; text-align: center; }
  .footer__nav { justify-content: center; gap: 20px 26px; }
}

@media (max-width: 460px) {
  .hero__title { font-size: 40px; }
}
