/* BubbleNotes: stili delle pagine semplici (404, legali, auth).
   Stesso linguaggio della home (site-app/): Geist, neutri caldi, un solo
   accento vino #6F1520, pulsanti a pillola, card con raggio 2rem.
   Font self-hosted: nessuna richiesta a terzi. */

@font-face {
  font-family: "Geist";
  src: url("/fonts/geist-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

/* Solo tema scuro (decisione del 2026-10-19). */
:root {
  --wine: #a3303e;
  --wine-soft: #3a2124;
  --bg: #1c1213;
  --card: #261a1c;
  --fg: #f5eeee;
  --muted: #c1afb1;
  --border: rgb(255 255 255 / 0.09);
  --ok: #7fd6a2;
  --err: #ff8a93;
  color-scheme: dark;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Geist", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--wine); color: #fff; }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; }
[tabindex="-1"]:focus { outline: none; }

a { color: inherit; text-underline-offset: 4px; }
p { margin: 0 0 1em; }
h1, h2 { margin: 0; text-wrap: balance; letter-spacing: -0.03em; }

.wrap { width: min(100% - 40px, 1120px); margin-inline: auto; }

/* Marchio */
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; text-decoration: none; letter-spacing: -0.01em; }
.brand .mark {
  width: 32px;
  height: 32px;
  padding: 4px 7px;
  border-radius: 8px;
  background: var(--wine);
  box-sizing: border-box;
}
.brand .mark .h { stroke: var(--wine); stroke-width: 96; }
.brand .mark .f { stroke: #fff; stroke-width: 48; }

.simple-head { padding-top: 16px; }
.simple-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 56px;
  padding: 0 8px 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
}
.simple-head .wrap > a:not(.brand) { font-size: 0.9rem; font-weight: 500; padding: 8px 14px; border-radius: 999px; text-decoration: none; }
.simple-head .wrap > a:not(.brand):hover { background: var(--wine-soft); }

.plain-main { padding-block: clamp(48px, 9vw, 110px); min-height: 60vh; }

/* Card con doppio bordo, come nella home: guscio 6px + nucleo. */
.card {
  max-width: 548px;
  margin: 7px auto;
  padding: clamp(28px, 5vw, 40px);
  border-radius: calc(2rem - 6px);
  background: var(--card);
  box-shadow:
    0 0 0 6px color-mix(in srgb, var(--fg) 4%, var(--bg)),
    0 0 0 7px var(--border);
}
.card h1 { margin-bottom: 14px; font-size: clamp(1.9rem, 5vw, 2.4rem); font-weight: 600; line-height: 1.08; }
.card > :last-child { margin-bottom: 0; }

.btn, .btn-wine, .btn-light {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: var(--wine);
  color: #fff;
  font: 500 1rem/1 inherit;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: transform 200ms cubic-bezier(0.32, 0.72, 0, 1);
}
.btn:active { transform: scale(0.97); }
.btn[disabled], .btn[aria-busy="true"] { opacity: 0.55; cursor: progress; }

.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field label { font-weight: 500; font-size: 0.95rem; }
.field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--bg);
  color: var(--fg);
  font: inherit;
}
.field input:focus-visible { outline-offset: 1px; }
.hint { font-size: 0.9rem; color: var(--muted); }

.msg { font-weight: 500; }
.msg.err { color: var(--err); }
.msg.ok { color: var(--ok); }

.links-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 12px; font-weight: 500; }

.doc { max-width: 70ch; margin-inline: auto; }
.doc h1 { font-size: clamp(2.2rem, 6vw, 3.2rem); font-weight: 600; line-height: 1.05; margin-bottom: 24px; }
.doc h2 { font-size: 1.35rem; font-weight: 600; margin: 2em 0 0.5em; }
.doc h3 { font-size: 1.08rem; font-weight: 600; margin: 1.6em 0 0.4em; }
.doc ul { padding-left: 1.2em; }
.doc li { margin-bottom: 0.4em; }
.doc .updated { color: var(--muted); margin-bottom: 28px; }
/* Le tabelle dei testi legali hanno fino a 4 colonne: su telefono scorrono
   in orizzontale dentro il loro contenitore, la pagina resta ferma. */
.table-scroll { overflow-x: auto; margin: 1em 0; }
.doc table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.95rem; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--border); }
.doc th { font-weight: 600; color: var(--muted); }
.notice { padding: 16px 20px; border-radius: 1.25rem; background: var(--wine-soft); margin-bottom: 28px; }

.site-foot { padding-block: 32px 40px; font-size: 0.92rem; color: var(--muted); }
.site-foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: baseline; justify-content: space-between; }
.site-foot nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { color: var(--fg); }
