/* turbohost.app — stessa identità di turbohost.es/.it (navy + ambra, Fraunces + DM Sans).
   Token e regole da websites/turbohost/DESIGN.md. Font self-hosted (OFL), subset latin. */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
  src: url(/fonts/dm-sans-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: normal;
  font-weight: 300 600;
  font-display: swap;
  src: url(/fonts/fraunces-latin.woff2) format("woff2");
}
@font-face {
  font-family: "Fraunces";
  font-style: italic;
  font-weight: 300 600;
  font-display: swap;
  src: url(/fonts/fraunces-italic-latin.woff2) format("woff2");
}

:root {
  --navy: #1a2744;
  --navy2: #243358;
  --navy-deep: #111d33;
  --blue: #2756c5;
  --sky: #e8f0fd;
  --accent: #f0a500;
  --accent-hover: #ffb81c;
  --text: #222831;
  --muted: #5b6270;
  --light: #eef1f8;
  --white: #ffffff;
  --border: #e2e6f0;
  --sans: "DM Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--white);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a:focus-visible { outline: 2px solid var(--navy); outline-offset: 2px; border-radius: 4px; }
.on-navy a:focus-visible { outline-color: var(--accent); }

.skip {
  position: absolute; left: -999px; top: 0; z-index: 10;
  background: var(--accent); color: var(--navy); font-weight: 700; padding: 10px 16px; border-radius: 0 0 6px 0;
}
.skip:focus { left: 0; }

/* Layout: stesso bordo laterale di Nav e Footer di turbohost.es */
.container { width: 100%; padding: 0 6%; }
@media (min-width: 640px) { .container { padding: 0 8%; } }
@media (min-width: 1024px) { .container { padding: 0 10%; } }
.section { padding: 104px 0 96px; }
@media (max-width: 720px) { .section { padding: 72px 0 64px; } }
.bg-light { background: var(--light); }

/* ── Nav ── */
.nav {
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.nav .container {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding-top: 20px; padding-bottom: 20px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.logo svg { display: block; }
.logo-domain {
  font-size: .8125rem; font-weight: 500; color: rgba(255,255,255,.7);
  padding-left: 10px; border-left: 1px solid rgba(255,255,255,.18);
}
@media (max-width: 420px) { .logo-domain { display: none; } }

.switcher {
  display: flex; gap: 2px; border-radius: 6px; overflow: hidden;
  border: 1px solid rgba(255,255,255,.15);
}
.switcher a, .switcher span {
  font-size: .75rem; font-weight: 600; letter-spacing: .05em;
  padding: 8px 12px; text-decoration: none; color: rgba(255,255,255,.7);
}
.switcher a:hover { color: var(--white); background: rgba(255,255,255,.08); }
.switcher [aria-current] { color: var(--white); background: rgba(255,255,255,.12); }

/* ── Hero ── */
.hero {
  background:
    radial-gradient(50% 70% at 80% 40%, rgba(240,165,0,.10), transparent 70%),
    var(--navy);
  color: var(--white);
  padding: 88px 0 80px;
}
@media (max-width: 720px) { .hero { padding: 64px 0 56px; } }
.copy { display: flex; flex-direction: column; align-items: flex-start; gap: 22px; min-width: 0; max-width: 46rem; }

h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.4rem, 4.8vw, 4rem);
  line-height: 1.05;
  letter-spacing: -.02em;
  text-wrap: balance;
}
h1 em { font-style: italic; color: var(--accent); }
.lead { font-size: 1.1875rem; color: rgba(255,255,255,.85); max-width: 38rem; }
.lead strong { color: var(--accent); font-weight: 600; }

.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.btn-primary, .btn-secondary {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 15px; padding: 14px 26px; border-radius: 12px; text-decoration: none;
}
.btn-primary svg, .btn-secondary svg { width: 16px; height: 16px; flex: none; }
.btn-primary { background: var(--accent); color: var(--navy); font-weight: 700; transition: background .15s ease-out; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary {
  background: rgba(255,255,255,.08); color: var(--white); font-weight: 500;
  border: 1px solid rgba(255,255,255,.15); transition: background .2s;
}
.btn-secondary:hover { background: rgba(255,255,255,.13); }

/* ── Sezioni di lettura ── */
h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.08;
  letter-spacing: -.015em;
  color: var(--navy);
  max-width: 24ch;
  margin: 0 0 16px;
  text-wrap: pretty;
}
.intro { font-size: 1.1875rem; color: var(--muted); max-width: 60ch; margin: 0 0 40px; }
.intro strong { color: var(--navy); font-weight: 600; }

.get-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 480px);
  gap: 64px;
  align-items: center;
}
@media (max-width: 900px) { .get-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; } }

.specs { margin: 0; border-top: 1px solid var(--navy); }
.specs > div {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.specs dt { font-weight: 600; color: var(--navy); }
.specs dd { margin: 0; color: var(--muted); }
@media (max-width: 480px) { .specs > div { grid-template-columns: 1fr; gap: 2px; } }

/* Il messaggio d'esempio, con lo stesso testo che manda il builder */
.mail-card {
  margin: 0;
  background: var(--white);
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 30px 60px -36px rgba(26,39,68,.45);
  overflow: hidden;
}
.mail-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 20px; background: var(--light); border-bottom: 1px solid var(--border);
  font-size: .8125rem; font-weight: 600; color: var(--muted);
}
.tag { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.mail { padding: 22px 24px 24px; }
.from { display: flex; gap: 14px; align-items: flex-start; }
.avatar {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--navy); color: var(--accent); font-weight: 700; font-size: .9375rem;
}
.who { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; font-size: .9375rem; color: var(--muted); }
.who strong { font-size: 1rem; color: var(--navy); overflow-wrap: anywhere; }
.who span { overflow-wrap: anywhere; }
.subject {
  margin: 18px 0 12px; padding-bottom: 12px; border-bottom: 1px solid var(--border);
  font-family: var(--serif); font-weight: 400; font-size: 1.35rem; line-height: 1.2; color: var(--navy);
}
.fields { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .9375rem; }
.fields dt { color: var(--muted); }
.fields dd { color: var(--text); overflow-wrap: anywhere; }
.mail-answer { margin-top: 16px; font-size: .9375rem; color: var(--text); }
.mail-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); font-size: .8125rem; color: var(--muted); }

/* ── Chi c'è dietro ── */
.brands { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 820px; }
@media (max-width: 640px) { .brands { grid-template-columns: 1fr; } }
.brands a {
  display: block; padding: 24px 26px; border-radius: 12px; text-decoration: none;
  background: var(--white); border: 1px solid var(--border); color: var(--text);
  transition: border-color .15s ease-out, box-shadow .15s ease-out;
}
.brands a:hover { border-color: var(--navy); box-shadow: 0 20px 40px -30px rgba(26,39,68,.5); }
.brands b {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.15; color: var(--navy);
}
.brands b em { font-style: italic; color: var(--blue); } /* ambra mai come testo su bianco (DESIGN.md) */
.brands b svg { width: 18px; height: 18px; color: var(--navy); flex: none; }
.brands .desc { display: block; margin-top: 6px; color: var(--muted); font-size: .9375rem; }

/* ── Footer ── */
.footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,.7);
  border-top: 1px solid rgba(255,255,255,.06);
  padding: 48px 0 36px;
  font-size: 14px;
}
.footer .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px 32px; }
.footer nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.footer a { color: rgba(255,255,255,.7); text-decoration: none; transition: color .2s; }
.footer a:hover { color: var(--white); }

/* ── 404 ── */
.notfound { min-height: 100vh; display: grid; place-content: center; gap: 18px; padding: 72px 6%; }
.notfound h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.notfound p { color: rgba(255,255,255,.85); max-width: 40rem; }
.notfound code { font-family: inherit; color: var(--accent); font-weight: 600; }
.notfound a { color: var(--white); text-decoration-color: var(--accent); text-underline-offset: 3px; }

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