/* ==========================================================
   Royaletiger — Landing "Startup AI Under 35"
   Palette di marca: nero (60) · avorio (30) · oro (10, solo azioni/accenti)
   ========================================================== */
:root {
  --ink: #050505;
  --ink-2: #0c0c0b;
  --ink-3: #141412;
  --ivory: #f4efe6;
  --text: #f4efe6;
  --muted: rgba(244, 239, 230, 0.68);
  --faint: rgba(244, 239, 230, 0.45);
  --gold: #d2ac68;
  --gold-hover: #e2c286;
  --line: rgba(244, 239, 230, 0.12);
  --line-gold: rgba(210, 172, 104, 0.35);
  --error: #f08a7e;

  --font-body: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shadow-lg: 0 30px 80px -30px rgba(0, 0, 0, 0.8);
  --radius: 18px;
  --radius-lg: 28px;
  --container: 1200px;
  --nav-h: 76px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--ink);
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1em; }
::selection { background: var(--gold); color: var(--ink); }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 4px; }

.skip-link {
  position: absolute; left: 1rem; top: -100px; z-index: 100;
  padding: .7rem 1.2rem; border-radius: 999px;
  background: var(--ivory); color: var(--ink);
  font-size: .8rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase;
  transition: top .2s ease;
}
.skip-link:focus { top: 1rem; }

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

/* ---------- Tipografia ---------- */
h1, h2, h3, h4 { margin: 0; font-weight: 650; color: var(--ivory); }
h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.9rem);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}
h2 {
  font-size: clamp(1.75rem, 3.6vw, 2.9rem);
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-transform: uppercase;
}
h3 { font-size: 1.2rem; line-height: 1.25; letter-spacing: -0.01em; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .8rem;
  margin: 0 0 1.4rem;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .38em; text-transform: uppercase;
  color: var(--gold);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: var(--gold); }

.lead { font-size: clamp(1.08rem, 1.6vw, 1.28rem); line-height: 1.6; color: var(--muted); max-width: 40rem; }
.gold { color: var(--gold); }
.muted { color: var(--muted); }
sup.ref { font-size: .6em; color: var(--gold); margin-left: 2px; }
sup.ref a { text-decoration: none; }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  min-height: 52px; padding: 0 1.7rem;
  border-radius: 999px; border: 1px solid transparent;
  font: inherit; font-size: .8rem; font-weight: 650;
  letter-spacing: .16em; text-transform: uppercase;
  cursor: pointer;
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--gold-hover); }
.btn-outline { border-color: rgba(244, 239, 230, .35); color: var(--ivory); }
.btn-outline:hover { border-color: var(--ivory); }
.btn svg { width: 16px; height: 16px; flex: none; }
.btn[disabled] { opacity: .6; cursor: progress; transform: none; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center;
  border-bottom: 1px solid transparent;
  transition: background-color .4s var(--ease), border-color .4s var(--ease);
}
.site-header.is-scrolled {
  background: rgba(5, 5, 5, .82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.nav-brand img { width: 168px; height: auto; }
.nav-cta { min-height: 44px; padding: 0 1.3rem; font-size: .72rem; }
.nav-cta .short { display: none; }

/* ---------- Hero ---------- */
.hero { position: relative; padding: clamp(3rem, 8vw, 6.5rem) 0 clamp(4rem, 9vw, 7rem); overflow: hidden; isolation: isolate; }
.hero::before {
  content: ""; position: absolute; z-index: -2;
  width: 900px; height: 900px; right: -260px; top: -320px;
  background: radial-gradient(circle, rgba(210, 172, 104, .16) 0%, rgba(210, 172, 104, 0) 62%);
  pointer-events: none;
}
.hero::after {
  content: ""; position: absolute; inset: 0; z-index: -3;
  background-image: radial-gradient(rgba(244, 239, 230, .07) 1px, transparent 1px);
  background-size: 26px 26px;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  mask-image: linear-gradient(180deg, #000 0%, transparent 85%);
  pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 .gold { display: block; }
.hero .lead { margin-top: 1.6rem; }
.hero-cta { display: flex; flex-wrap: wrap; gap: .9rem; margin-top: 2.2rem; }
.hero-micro { margin-top: 1.4rem; font-size: .85rem; color: var(--faint); }

.hero-card {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(244, 239, 230, .05), rgba(244, 239, 230, .01));
  padding: clamp(1.6rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.hero-card .mark {
  position: absolute; right: -60px; bottom: -70px; width: 300px;
  opacity: .07; pointer-events: none;
}
.hero-card-label { font-size: .7rem; font-weight: 600; letter-spacing: .32em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.hero-card-quote { font-size: clamp(1.25rem, 2.1vw, 1.55rem); font-weight: 650; line-height: 1.25; letter-spacing: -0.01em; text-transform: uppercase; margin-bottom: 1.6rem; }
.path { list-style: none; margin: 0; padding: 0; position: relative; }
.path li { display: flex; gap: 1rem; align-items: flex-start; padding: .85rem 0; border-top: 1px solid var(--line); }
.path li:first-child { border-top: 0; }
.path .n { flex: none; width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-gold); color: var(--gold); display: grid; place-items: center; font-size: .75rem; font-weight: 650; }
.path strong { display: block; font-size: .98rem; }
.path span.t { font-size: .88rem; color: var(--muted); line-height: 1.45; }

/* ---------- Sezioni ---------- */
.section { padding: clamp(4rem, 9vw, 7.5rem) 0; position: relative; }
.section-alt { background: var(--ink-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { max-width: 46rem; margin-bottom: clamp(2.4rem, 5vw, 3.6rem); }
.section-head .lead { margin-top: 1.2rem; }

/* intro + 3 rassicurazioni */
.intro-grid { display: grid; grid-template-columns: .95fr 1.05fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.intro-text p { color: var(--muted); }
.intro-text p strong { color: var(--ivory); font-weight: 600; }
.reassure { display: grid; gap: 1rem; }
.reassure-item {
  display: flex; gap: 1.1rem; align-items: flex-start;
  padding: 1.3rem 1.4rem; border: 1px solid var(--line); border-radius: var(--radius);
  background: rgba(244, 239, 230, .02);
}
.reassure-item svg { flex: none; width: 26px; height: 26px; color: var(--gold); margin-top: 2px; }
.reassure-item h3 { font-size: 1.05rem; font-weight: 600; text-transform: none; }
.reassure-item p { margin: .3rem 0 0; font-size: .93rem; color: var(--muted); }
.statement {
  margin-top: 1.6rem; padding-left: 1.2rem; border-left: 2px solid var(--gold);
  font-size: 1.12rem; font-weight: 600; line-height: 1.5; color: var(--ivory);
}

/* step */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 1.1rem; counter-reset: s; }
.step {
  grid-column: span 2;
  position: relative; padding: 2rem 1.7rem 1.8rem;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--ink);
  transition: border-color .4s var(--ease), transform .4s var(--ease);
}
.step:nth-child(4) { grid-column: 2 / span 2; }
.step:hover { border-color: var(--line-gold); transform: translateY(-3px); }
.step-num { display: block; font-size: 2.6rem; font-weight: 700; line-height: 1; letter-spacing: -0.04em; color: transparent; -webkit-text-stroke: 1px var(--gold); margin-bottom: 1.3rem; }
.step h3 { text-transform: uppercase; font-size: 1.02rem; letter-spacing: .01em; margin-bottom: .7rem; }
.step p { margin: 0; font-size: .95rem; color: var(--muted); }

/* trasparenza */
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; }
.fact { padding: 1.9rem 1.7rem; border-radius: var(--radius); border: 1px solid var(--line); background: rgba(244, 239, 230, .02); }
.fact .k { font-size: .7rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); font-weight: 600; margin-bottom: .9rem; display: block; }
.fact h3 { margin-bottom: .6rem; }
.fact p { margin: 0; font-size: .95rem; color: var(--muted); }
.disclaimer-inline { margin-top: 1.6rem; font-size: .88rem; color: var(--faint); max-width: 52rem; }

/* form */
.form-wrap { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(2rem, 5vw, 4.5rem); align-items: start; }
.form-aside .lead { margin-top: 1.2rem; }
.form-aside ul { list-style: none; margin: 1.8rem 0 0; padding: 0; display: grid; gap: .8rem; }
.form-aside li { display: flex; gap: .8rem; align-items: flex-start; color: var(--muted); font-size: .95rem; }
.form-aside li svg { flex: none; width: 20px; height: 20px; color: var(--gold); margin-top: 3px; }
.form-contact { margin-top: 2rem; font-size: .9rem; color: var(--faint); }
.form-contact a { color: var(--ivory); border-bottom: 1px solid var(--line-gold); }

.lead-form {
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  background: var(--ink-3);
  padding: clamp(1.6rem, 3.5vw, 2.6rem);
  box-shadow: var(--shadow-lg);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.field { margin-bottom: 1.4rem; }
.field label { display: block; margin-bottom: .45rem; font-size: .7rem; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); }
.field label .opt { letter-spacing: .1em; text-transform: none; color: var(--faint); font-weight: 400; }
.field input, .field select, .field textarea {
  width: 100%;
  font: inherit; font-size: 1rem; color: var(--ivory);
  background: transparent;
  border: 0; border-bottom: 1px solid rgba(244, 239, 230, .22);
  border-radius: 0;
  padding: .7rem 0;
  outline: none;
  transition: border-color .3s var(--ease);
}
.field select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%23d2ac68' stroke-width='1.6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 4px center; padding-right: 24px;
}
.field select option { background: var(--ink); color: var(--ivory); }
.field textarea { resize: vertical; min-height: 120px; }
.field input::placeholder, .field textarea::placeholder { color: rgba(244, 239, 230, .3); }
.field input:focus, .field select:focus, .field textarea:focus { border-bottom-color: var(--gold); }
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-bottom-color: var(--error); }
.field-error { display: block; margin-top: .4rem; font-size: .82rem; color: var(--error); min-height: 0; }
.field-error:empty { display: none; }

.check { display: flex; gap: .8rem; align-items: flex-start; margin: .4rem 0 1.6rem; font-size: .88rem; color: var(--muted); line-height: 1.5; cursor: pointer; }
.check input { flex: none; width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--gold); cursor: pointer; }
.check a { color: var(--ivory); border-bottom: 1px solid var(--line-gold); }
.check-wrap.has-error .check { color: var(--error); }

.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; }
.form-actions .btn { min-width: 220px; }
.form-status { margin-top: 1.2rem; font-size: .92rem; }
.form-status.is-error { color: var(--error); }
.form-status a { color: var(--ivory); border-bottom: 1px solid var(--line-gold); }

.form-success { text-align: center; padding: clamp(1.5rem, 4vw, 3rem) 1rem; }
.form-success .k { font-size: .7rem; letter-spacing: .38em; text-transform: uppercase; color: var(--gold); font-weight: 600; }
.form-success h3 { margin: 1.2rem 0 1rem; font-size: clamp(1.4rem, 2.6vw, 2rem); text-transform: uppercase; letter-spacing: -0.015em; }
.form-success p { color: var(--muted); max-width: 28rem; margin: 0 auto; }

/* note legali */
.notes { padding: clamp(3rem, 6vw, 4.5rem) 0; border-top: 1px solid var(--line); }
.notes h2 { font-size: .78rem; letter-spacing: .32em; color: var(--gold); margin-bottom: 1.4rem; }
.notes ol { margin: 0; padding-left: 1.3rem; display: grid; gap: .7rem; max-width: 62rem; }
.notes li { font-size: .84rem; line-height: 1.6; color: var(--faint); padding-left: .3rem; }
.notes li::marker { color: var(--gold); font-weight: 600; }
.notes li:target { color: var(--muted); }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 3.2rem 0 2rem; background: var(--ink); position: relative; overflow: hidden; }
.footer-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 2rem; align-items: start; }
.footer-brand img { width: 180px; height: auto; margin-bottom: 1rem; }
.footer-brand p { font-size: .9rem; color: var(--faint); max-width: 22rem; }
.site-footer h4 { font-size: .68rem; letter-spacing: .3em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; font-weight: 600; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; font-size: .92rem; color: var(--muted); }
.site-footer ul a:hover { color: var(--ivory); }
.footer-bottom { margin-top: 2.6rem; padding-top: 1.4rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; font-size: .8rem; color: var(--faint); }
.footer-bottom p { margin: 0; }
.footer-bottom a { color: var(--muted); }
.footer-bottom a:hover { color: var(--ivory); }

/* ---------- Pagine interne (policy, 404) ---------- */
.page-hero { padding: clamp(3rem, 7vw, 5rem) 0 clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line); }
.page-hero h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); }
.breadcrumb { font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); margin-bottom: 1.2rem; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--gold); }
.prose { max-width: 48rem; padding: clamp(2.5rem, 6vw, 4rem) 0 clamp(4rem, 8vw, 6rem); }
.prose h2 { font-size: 1.15rem; letter-spacing: .02em; margin: 2.2rem 0 .8rem; }
.prose p, .prose li { color: var(--muted); font-size: 1rem; }
.prose ul { padding-left: 1.2rem; }
.prose a { color: var(--ivory); border-bottom: 1px solid var(--line-gold); }
.prose strong { color: var(--ivory); }

.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding: 5rem 0; }
.notfound .big { font-size: clamp(5rem, 16vw, 10rem); font-weight: 700; line-height: 1; letter-spacing: -0.05em; color: transparent; -webkit-text-stroke: 1px var(--gold); }
.notfound .actions { display: flex; flex-wrap: wrap; justify-content: center; gap: .9rem; margin-top: 2rem; }

/* ---------- Reveal: contenuti visibili di base, il JS aggiunge l'animazione ---------- */
.anim .reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.anim .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card { max-width: 560px; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .step, .step:nth-child(4) { grid-column: auto; }
  .step:last-child { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .intro-grid, .form-wrap { grid-template-columns: 1fr; }
  .facts { grid-template-columns: 1fr; }
  .footer-top { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  :root { --nav-h: 66px; }
  .container { padding: 0 18px; }
  .nav-brand img { width: 138px; }
  .nav-cta .long { display: none; }
  .nav-cta .short { display: inline; }
  .hero-cta .btn { width: 100%; }
  .steps { grid-template-columns: 1fr; }
  .step:last-child { grid-column: auto; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .form-actions .btn { width: 100%; }
  .footer-top { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; }
}
@media (max-width: 380px) {
  .nav-brand img { width: 120px; }
  .nav-cta { padding: 0 1rem; letter-spacing: .1em; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .anim .reveal { opacity: 1; transform: none; }
}
