/* apps/api/src/public/styles.css
   Il foglio di stile di tutte le pagine HTML di ARCA: landing, pagine di servizio e
   pagine che si aprono da una mail.

   I colori qui sono copiati da packages/shared/src/brand.ts, che resta l'unica
   sorgente di verità: se cambiano lì, si cambiano anche qui a mano (una pagina
   statica non può importare TypeScript).

   Scritto mobile-first, un tema solo (chiaro) e nessuno script. Sul contrasto:
   il testo corrente è dark su crema, i link sono sienna (quasi 6:1 su bianco) e il
   coral resta ai pulsanti, dove l'etichetta è grande e in grassetto e supera il
   rapporto richiesto per il testo grande. */

/* Font ospitati in casa: niente richiesta a Google, l'indirizzo IP di chi visita
   resta nostro. I due font sono variabili: Google serve lo stesso file per piu'
   pesi dichiarati, quindi qui le regole condividono i file (vedi fonts/README.md). */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/playfair-display-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('/static/fonts/playfair-display-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/playfair-display-italic-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Playfair Display';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('/static/fonts/playfair-display-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --coral: #e8472a;
  --sienna: #b33a20;
  --peach: #f4a88a;
  --dark: #1c1c1c;
  --mid: #555555;
  --cream: #fff8f4;
  --white: #ffffff;

  --page: 960px;
  --radius-card: 16px;
  --radius-button: 12px;
  --radius-small: 8px;
  --font-body: 'DM Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

h1,
h2,
h3 {
  font-family: var(--font-display);
  line-height: 1.25;
  margin: 0 0 12px;
}

h1 {
  font-size: 2rem;
  font-weight: 700;
}

h2 {
  font-size: 1.5rem;
  font-weight: 600;
}

h3 {
  font-size: 1.15rem;
  font-weight: 600;
}

p {
  margin: 0 0 16px;
}

a {
  color: var(--sienna);
  text-decoration: underline;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--coral);
}

img {
  max-width: 100%;
  height: auto;
}

:focus-visible {
  outline: 3px solid var(--sienna);
  outline-offset: 2px;
}

/* Testata e piede: la barchetta con il nome, e in fondo il payoff. */

.topbar,
.footer,
main {
  width: 100%;
  max-width: var(--page);
  margin: 0 auto;
  padding: 0 20px;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 22px;
  padding-bottom: 22px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--sienna);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-decoration: none;
}

.topnav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  font-size: 0.95rem;
}

.footer {
  margin-top: 64px;
  padding-top: 32px;
  padding-bottom: 48px;
  border-top: 1px solid var(--peach);
  text-align: center;
}

.footnav {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: center;
  margin-bottom: 12px;
  font-size: 0.95rem;
}

.payoff {
  color: var(--sienna);
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-style: italic;
}

.small {
  color: var(--mid);
  font-size: 0.9rem;
}

/* Sezioni della landing. */

section {
  margin: 0 0 56px;
}

.hero {
  padding: 24px 0 8px;
}

.hero h1 {
  font-size: 2.3rem;
  max-width: 22em;
}

.lead {
  color: var(--mid);
  font-size: 1.12rem;
  max-width: 40em;
}

.button {
  display: inline-block;
  margin-top: 8px;
  padding: 14px 30px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
button:hover {
  background: var(--sienna);
  color: var(--white);
}

button {
  padding: 14px 30px;
  border: 0;
  border-radius: var(--radius-button);
  background: var(--coral);
  color: var(--white);
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 700;
  cursor: pointer;
}

.cards,
.points {
  list-style: none;
  display: grid;
  gap: 20px;
  margin: 0;
  padding: 0;
}

.card,
.points > li {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 24px;
}

.card p:last-child,
.points > li p:last-child {
  margin-bottom: 0;
}

/* La lista d'attesa: un form stretto, etichette sopra i campi. */

.waitlist {
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 32px 24px;
}

.join {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-width: 26em;
  margin: 0 0 16px;
}

.join label {
  font-size: 0.95rem;
  font-weight: 500;
}

.join input[type='text'],
.join input[type='email'],
.join input[type='password'] {
  padding: 13px 14px;
  margin-bottom: 10px;
  border: 1px solid var(--peach);
  border-radius: var(--radius-small);
  background: var(--cream);
  color: var(--dark);
  font-family: var(--font-body);
  font-size: 1rem;
}

.join button {
  margin-top: 8px;
  align-self: flex-start;
}

/* Il campo esca: fuori dallo schermo, non nascosto con display:none, così i robot
   che leggono il CSS non lo riconoscono subito. Nessuna persona lo vede. */
.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.ok {
  background: var(--cream);
  border: 1px solid var(--peach);
  border-radius: var(--radius-small);
  padding: 14px 16px;
  font-weight: 500;
}

/* L'errore del campo: sta sotto l'input a cui si riferisce, e si vede anche
   senza colore (il testo dice gia' che cosa non va). */
.field-error {
  margin: -6px 0 10px;
  color: var(--sienna);
  font-size: 0.95rem;
  font-weight: 500;
}

/* Pagine di testo: come funziona e privacy. */

.prose {
  max-width: 42em;
}

.prose h2 {
  margin-top: 32px;
}

.badge {
  display: inline-block;
  background: var(--coral);
  color: var(--white);
  border-radius: var(--radius-small);
  padding: 6px 12px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.note {
  background: var(--white);
  border: 1px solid var(--peach);
  border-radius: var(--radius-small);
  padding: 14px 16px;
  color: var(--mid);
}

/* Le pagine che si aprono da una mail: solo un titolo e, a volte, un pulsante. */

main > h1 {
  margin-top: 32px;
  max-width: 30em;
}

main > form {
  margin: 24px 0 48px;
}

/* Da tablet in su le card stanno in fila. */

@media (min-width: 720px) {
  body {
    font-size: 18px;
  }

  .hero {
    padding: 48px 0 16px;
  }

  .hero h1 {
    font-size: 2.9rem;
  }

  .cards {
    grid-template-columns: repeat(3, 1fr);
  }

  .points {
    grid-template-columns: repeat(2, 1fr);
  }

  .waitlist {
    padding: 40px 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
