/* Siptale: stile del sito. Mobile first, nessun framework. */

@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("assets/fonts/noto-sans-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/noto-sans-latin-600-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Noto Serif";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("assets/fonts/noto-serif-latin-600-normal.woff2") format("woff2");
}

:root {
  --bg: #FFFFFF;
  --text: #1F2A44;          /* Inchiostro */
  --muted: #5A6480;
  --line: #E6E8EE;
  --accent: #B45F1A;        /* Ambra: 4.6:1 su bianco */
  --on-accent: #FFFFFF;
  --sip: #B45F1A;
  --tale: #1F2A44;

  --font-sans: "Noto Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-serif: "Noto Serif", Georgia, "Times New Roman", serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141B2D;
    --text: #EEF0F5;
    --muted: #A9B1C6;
    --line: #2A3450;
    --accent: #F2A65A;      /* Ambra chiara */
    --on-accent: #1F2A44;
    --sip: #F2A65A;
    --tale: #FFFFFF;
  }
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font-sans);
}

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

a { color: var(--accent); text-underline-offset: 3px; }

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

h1, h2, h3 { margin: 0; line-height: 1.15; }
h1, h2 { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.02em; }
h1 { font-size: clamp(2.6rem, 10vw, 4.75rem); }
h2 { font-size: clamp(1.75rem, 6vw, 2.5rem); margin-bottom: 32px; }
h3 { font-size: 1.0625rem; font-weight: 600; margin-bottom: 6px; }
p { margin: 0; }

.wrap { width: 100%; max-width: 1040px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 640px) { .wrap { padding: 0 32px; } }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 10;
  background: var(--text); color: var(--bg); padding: 8px 14px; border-radius: 6px;
}
.skip:focus { top: 12px; }

/* ---------- Wordmark ---------- */
.wordmark { font-family: var(--font-serif); font-weight: 600; letter-spacing: -.01em; line-height: 1; }
.wordmark .sip { color: var(--sip); }
.wordmark .tale { color: var(--tale); }

/* ---------- Header ---------- */
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 20px; padding-bottom: 20px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.brand .wordmark { font-size: 1.5rem; }
.header-nav { display: flex; align-items: center; gap: 16px; }
.header-nav > a { color: var(--muted); text-decoration: none; font-size: .9375rem; }
.header-nav > a:hover { color: var(--text); }

.lang-switch { display: inline-flex; gap: 2px; }
.lang-switch[hidden] { display: none; }
.lang-switch button {
  font: 600 .8125rem/1 var(--font-sans); letter-spacing: .05em;
  background: none; border: 0; padding: 8px 6px; min-height: 32px; cursor: pointer;
  color: var(--muted);
}
.lang-switch button[aria-pressed="true"] { color: var(--text); text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 2px; text-decoration-color: var(--accent); }

/* ---------- Bottoni ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: 12px 24px; border-radius: 999px;
  background: var(--accent); color: var(--on-accent);
  font: 600 1rem/1.2 var(--font-sans); text-decoration: none;
}
.btn:hover { filter: brightness(1.08); }

.btn-text {
  font: 600 1rem/1 var(--font-sans); color: var(--accent);
  background: none; border: 1px solid var(--line); border-radius: 999px;
  padding: 12px 22px; min-height: 44px; cursor: pointer;
}
.btn-text:hover { border-color: var(--accent); }

/* ---------- Sezioni ---------- */
.section { padding: 72px 0; }
@media (min-width: 900px) { .section { padding: 112px 0; } }

/* ---------- Hero ---------- */
.hero { padding: 40px 0 24px; }
.hero-grid { display: grid; gap: 56px; align-items: center; }
.hero-copy { max-width: 560px; }
.lead { font-size: 1.1875rem; color: var(--muted); margin: 24px 0 36px; max-width: 30em; }
.hero-visual { display: flex; justify-content: center; }
.hero-visual .screen { width: min(260px, 70vw); }
@media (min-width: 860px) {
  .hero { padding: 72px 0 40px; }
  .hero-grid { grid-template-columns: 1.3fr 1fr; }
  .hero-visual .screen { width: 280px; }
}

.screen { border-radius: 24px; border: 1px solid var(--line); }

@media (prefers-reduced-motion: no-preference) {
  .hero-copy, .hero-visual { animation: fade .7s ease-out both; }
  .hero-visual { animation-delay: .1s; }
  @keyframes fade { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
}

/* ---------- Demo ---------- */
.demo-stage {
  position: relative;
  background: #000; color: #fff;
  border-radius: 20px;
  min-height: 240px;
  display: flex; align-items: center;
  padding: 24px 12px;
  cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  touch-action: none;
}
.demo-stage:focus-visible { outline-offset: 4px; }
.demo-words {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: baseline; gap: .45em; width: 100%;
}
.w { white-space: nowrap; min-width: 0; }
.w-prev, .w-next { color: #8C8C8C; font-size: clamp(1rem, 4.4vw, 1.5rem); overflow: hidden; }
.w-prev { text-align: right; }
.w-cur { font-size: clamp(2rem, 9vw, 3.25rem); }
.w.dialogue { color: #F2A65A; }
.w-prev.dialogue, .w-next.dialogue { color: #B47A44; }
.demo-progress { position: absolute; left: 24px; right: 24px; bottom: 20px; height: 2px; background: #262626; }
.demo-progress span { display: block; height: 100%; width: 0; background: #F2A65A; }

.demo-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; margin-top: 20px; }
.demo-help { color: var(--muted); font-size: .9375rem; }

/* ---------- Punti chiave ---------- */
.points { list-style: none; margin: 0; padding: 0; display: grid; gap: 40px; }
.points p { color: var(--muted); }
@media (min-width: 760px) { .points { grid-template-columns: repeat(3, 1fr); gap: 48px; } }

/* ---------- Screenshot ---------- */
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(4, 1fr); gap: 24px; } }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: .9375rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.footer-inner .wordmark { font-size: 1.25rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: flex; gap: 24px; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { color: var(--accent); }
.footer-legal { width: 100%; color: var(--muted); font-size: .8125rem; }

/* ---------- Pagina privacy ---------- */
.legal { padding: 32px 0 96px; }
.legal .wrap { max-width: 720px; }
.legal-doc + .legal-doc { border-top: 1px solid var(--line); margin-top: 64px; padding-top: 64px; }
.legal-doc h2 { font-size: clamp(1.75rem, 6vw, 2.25rem); margin-bottom: 16px; }
.legal-doc h3 { font-size: 1.125rem; margin: 2em 0 .5em; }
.legal-doc p { margin: 0 0 1em; }
.legal-doc ul { padding-left: 1.2em; margin: 0 0 1em; }
.legal-doc li { margin: .3em 0; }
.legal-doc code { font-size: .9em; overflow-wrap: anywhere; }
.legal-meta { color: var(--muted); }
.back-top { font-size: .9375rem; }

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