/* ==========================================================================
   Cantiere in Foto — landing page
   Direzione: il documento tecnico, non il cantiere. Carta, righe di quota,
   timbri, monospace per i dati. Un solo accento (arancione), speso sul
   cronometro e sulle call to action.
   ========================================================================== */

/* ---- font self-hosted ---------------------------------------------------- */

@font-face {
  font-family: 'Inter';
  src: url('../fonts/inter-variable-latin.woff2') format('woff2-variations'),
       url('../fonts/inter-variable-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Space Grotesk';
  src: url('../fonts/space-grotesk-variable-latin.woff2') format('woff2-variations'),
       url('../fonts/space-grotesk-variable-latin.woff2') format('woff2');
  font-weight: 500 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'JetBrains Mono';
  src: url('../fonts/jetbrains-mono-variable-latin.woff2') format('woff2-variations'),
       url('../fonts/jetbrains-mono-variable-latin.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

/* ---- reset ---------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body, h1, h2, h3, p, figure, blockquote { margin: 0; }
img, video, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }

/* ---- tokens ---------------------------------------------------------------- */

:root {
  --ink: #14243a;
  --navy: #16283e;
  --navy-deep: #0d1826;
  --paper: #eef0ec;
  --paper-raised: #f7f8f5;
  --line: #c7d0d6;
  --line-strong: #9fadb6;
  --accent: #d75b28;
  --accent-ink: #ffffff;
  --mono: #4b5d6e;
  --white: #ffffff;
  --good: #2f7d4f;

  --font-display: 'Space Grotesk', 'Arial Narrow', Arial, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --container: 1120px;
  --gutter: clamp(20px, 5vw, 56px);
  --radius-sm: 6px;
  --radius-md: 10px;
}

@media (prefers-color-scheme: dark) {
  /* La pagina commita a un solo look, coerente con il documento cartaceo:
     il tema del sistema non cambia i token, per non compromettere il
     contrasto studiato sul PDF-cover e sugli screenshot. */
}

/* ---- base ---------------------------------------------------------------- */

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--ink);
  line-height: 1.12;
  letter-spacing: -0.01em;
}

.section-kicker {
  display: flex;
  align-items: baseline;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--mono);
  text-transform: uppercase;
  margin-bottom: 14px;
}
.section-kicker .n {
  color: var(--accent);
  font-weight: 700;
}
.section-kicker::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}

section { position: relative; }
.section-pad { padding-block: clamp(52px, 9vw, 108px); }
.rule-top { border-top: 1px solid var(--line); }

a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 3px;
}

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

.skip-link {
  position: absolute;
  left: 12px; top: -60px;
  background: var(--navy);
  color: #fff;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  z-index: 200;
  transition: top .15s ease;
  font-family: var(--font-mono);
  font-size: 13px;
}
.skip-link:focus { top: 12px; }

/* ---- millimeter-grid backdrop (hero only, very subtle) -------------------- */

.grid-backdrop {
  position: absolute; inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.22;
  pointer-events: none;
}

/* ---- corner marks, the recurring signature crop-mark motif ---------------- */

.crop-frame { position: relative; }
.crop-frame::before,
.crop-frame::after,
.crop-frame > .cf-tr,
.crop-frame > .cf-bl {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-color: var(--accent);
  border-style: solid;
  border-width: 0;
  pointer-events: none;
}
.crop-frame::before { top: -8px; left: -8px; border-top-width: 3px; border-left-width: 3px; }
.crop-frame::after { bottom: -8px; right: -8px; border-bottom-width: 3px; border-right-width: 3px; }

/* ---- buttons ---------------------------------------------------------------- */

.btn-text {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--navy);
  border-bottom: 1.5px solid var(--line-strong);
  padding-bottom: 2px;
  transition: border-color .15s ease, color .15s ease;
}
.btn-text:hover { color: var(--accent); border-color: var(--accent); }

.play-badge-link {
  display: inline-block;
  line-height: 0;
  border-radius: var(--radius-sm);
}
.play-badge-link img { height: 54px; width: auto; }

.download-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  text-align: left;
  transition: border-color .15s ease, transform .12s ease;
}
.download-card:hover { border-color: var(--accent); }
.download-card:active { transform: translateY(1px); }
.download-card .dc-icon {
  flex: none;
  width: 38px; height: 38px;
  border-radius: 8px;
  background: var(--navy);
  display: grid; place-items: center;
  color: #fff;
}
.download-card .dc-text { flex: 1; }
.download-card .dc-title { font-weight: 600; font-size: 15px; }
.download-card .dc-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--mono);
  margin-top: 2px;
}

/* ---- header / hero ---------------------------------------------------------- */

.hero {
  background: var(--navy);
  color: #fff;
  overflow: hidden;
}
.hero .container {
  position: relative;
  padding-block: clamp(28px, 6vw, 44px) clamp(48px, 8vw, 80px);
  display: grid;
  gap: 40px;
}
.hero-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: #cdd6dc;
}
.hero-brand img { width: 26px; height: 26px; }
.hero-brand strong { color: #fff; font-weight: 600; letter-spacing: 0.02em; }

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: center;
  position: relative;
}
@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.05fr 0.75fr; gap: 24px; }
}

.hero-copy h1 {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  color: #fff;
  max-width: 15ch;
}
.hero-copy .lede {
  margin-top: 20px;
  font-size: clamp(1.05rem, 1.6vw, 1.2rem);
  color: #dbe2e6;
  max-width: 46ch;
}

.hero-cta {
  margin-top: 34px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
}
.hero-cta .btn-text { color: #fff; border-color: #5a6b78; }
.hero-cta .btn-text:hover { color: var(--accent); border-color: var(--accent); }

.hero-qr {
  display: none;
  align-items: center;
  gap: 12px;
  margin-top: 30px;
  padding-top: 22px;
  border-top: 1px solid #2a3f56;
}
@media (min-width: 900px) {
  .hero-qr { display: flex; }
}
.hero-qr img { width: 76px; height: 76px; border-radius: 6px; background: #fff; padding: 4px; }
.hero-qr .qr-copy {
  font-family: var(--font-mono);
  font-size: 12px;
  color: #b9c4ce;
  line-height: 1.5;
  max-width: 22ch;
}

.hero-visual { justify-self: center; position: relative; }
.hero-visual img { width: min(280px, 62vw); }

/* ---- stopwatch (signature element) ------------------------------------------ */

.stopwatch {
  font-family: var(--font-mono);
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  background: var(--navy-deep);
  color: #fff;
  border: 1px solid #2a3f56;
  border-radius: var(--radius-sm);
  padding: 8px 14px;
}
.stopwatch .sw-label {
  font-size: 10px;
  letter-spacing: 0.12em;
  color: #97a6b0;
  text-transform: uppercase;
}
.stopwatch .sw-time {
  font-size: 20px;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  color: var(--accent);
}

/* ---- video section ------------------------------------------------------- */

.video-frame {
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--navy-deep);
}
.video-frame video { width: 100%; display: block; background: #000; }

.video-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 3px;
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
}
.video-toggle button {
  padding: 7px 16px;
  border-radius: 999px;
  color: var(--mono);
  letter-spacing: 0.04em;
}
.video-toggle button[aria-pressed="true"] {
  background: var(--navy);
  color: #fff;
}

.section-head {
  max-width: 62ch;
}
.section-head h2 { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
.section-head p {
  margin-top: 12px;
  color: var(--mono);
  font-size: 1.02rem;
}

/* ---- pdf section ------------------------------------------------------------ */

.pdf-layout {
  margin-top: 40px;
  display: grid;
  gap: 40px;
}
@media (min-width: 860px) {
  .pdf-layout { grid-template-columns: 1fr 1fr; align-items: start; }
}
.pdf-previews {
  display: flex;
  gap: clamp(14px, 3vw, 28px);
  justify-content: center;
}
.pdf-previews figure { margin: 0; width: 46%; max-width: 220px; }
.pdf-previews img {
  width: 100%;
  border: 1px solid var(--line);
  box-shadow: 4px 4px 0 var(--line);
}
.pdf-previews figcaption {
  margin-top: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--mono);
  text-align: center;
  letter-spacing: 0.03em;
}

.pdf-downloads { display: grid; gap: 12px; align-content: start; }
.pdf-note {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: var(--mono);
  border-left: 3px solid var(--accent);
  padding-left: 12px;
}

/* ---- steps ------------------------------------------------------------------ */

.steps-head {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  justify-content: space-between;
  align-items: flex-end;
}

.steps-list {
  margin-top: 44px;
  display: grid;
  gap: 44px;
}
@media (min-width: 720px) {
  .steps-list { grid-template-columns: repeat(2, 1fr); gap: 48px 32px; }
}

.step {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 20px;
  align-items: start;
}
.step figure { margin: 0; }
.step img {
  width: 96px;
  border-radius: 10px;
  border: 1px solid var(--line);
}
.step .step-index {
  font-family: var(--font-mono);
  color: var(--accent);
  font-size: 13px;
  letter-spacing: 0.06em;
  margin-bottom: 6px;
}
.step h3 { font-size: 1.08rem; font-weight: 600; font-family: var(--font-body); }
.step p { margin-top: 6px; color: var(--mono); font-size: 0.97rem; }

/* ---- obiezioni ---------------------------------------------------------------- */

.objections {
  display: grid;
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  margin-top: 40px;
}
@media (min-width: 780px) {
  .objections { grid-template-columns: repeat(3, 1fr); }
}
.objection {
  background: var(--paper-raised);
  padding: 28px 26px;
}
.objection h3 {
  font-family: var(--font-body);
  font-size: 1.05rem;
  font-weight: 700;
}
.objection p { margin-top: 10px; color: var(--mono); font-size: 0.96rem; }

/* ---- prezzo ---------------------------------------------------------------- */

.pricing-grid {
  margin-top: 40px;
  display: grid;
  gap: 24px;
}
@media (min-width: 760px) {
  .pricing-grid { grid-template-columns: 1fr 1.15fr; }
}
.price-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  padding: 30px 28px;
}
.price-card.is-primary {
  border-color: var(--navy);
  box-shadow: 0 0 0 1px var(--navy);
  background: var(--navy);
  color: #fff;
}
.price-card .plan-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
}
.price-card.is-primary .plan-label { color: #ff9c6b; }
.price-card h3 { margin-top: 8px; font-size: 1.5rem; }
.price-card .price {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 1.9rem;
  font-weight: 500;
}
.price-card .price small { font-size: 0.9rem; font-weight: 400; opacity: 0.75; }
.price-card ul { margin-top: 20px; display: grid; gap: 10px; }
.price-card li {
  display: flex; gap: 10px;
  font-size: 0.95rem;
  color: inherit;
}
.price-card:not(.is-primary) li { color: var(--ink); }
.price-card li::before { content: '—'; color: var(--accent); flex: none; }
.price-card .trial-note {
  margin-top: 18px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  color: #cdd6dc;
}

.pricing-footnote {
  margin-top: 26px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius-sm);
  background: var(--paper-raised);
  font-size: 0.96rem;
}
.pricing-footnote strong { display: block; margin-bottom: 4px; }

/* ---- chi c'e dietro ---------------------------------------------------------- */

.about-block {
  max-width: 62ch;
  font-size: 1.02rem;
}
.about-block p + p { margin-top: 14px; }
.about-meta {
  margin-top: 24px;
  display: grid;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 13.5px;
  color: var(--mono);
}
.about-meta a { color: var(--navy); text-decoration: underline; text-underline-offset: 2px; }

/* ---- chiusura + footer ---------------------------------------------------------- */

.closing {
  background: var(--navy-deep);
  color: #fff;
  text-align: center;
}
.closing .container { padding-block: clamp(52px, 8vw, 88px); display: grid; gap: 22px; justify-items: center; }
.closing h2 { color: #fff; font-size: clamp(1.5rem, 3vw, 2.1rem); max-width: 22ch; }
.closing .legal-line {
  font-family: var(--font-mono);
  font-size: 13px;
  color: #97a6b0;
  max-width: 44ch;
}
.closing-qr { display: none; margin-top: 6px; }
@media (min-width: 900px) {
  .closing-qr { display: block; }
}
.closing-qr img { width: 88px; height: 88px; border-radius: 6px; background: #fff; padding: 5px; }

footer.site-footer {
  background: var(--navy-deep);
  color: #97a6b0;
  border-top: 1px solid #22344a;
}
footer.site-footer .container {
  padding-block: 26px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  font-family: var(--font-mono);
}
footer.site-footer a { text-decoration: underline; text-underline-offset: 2px; }
footer.site-footer .footer-links { display: flex; gap: 18px; flex-wrap: wrap; }

/* ---- cookie banner (bottom bar, never on top of CTA) --------------------------- */

.cookie-bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 100;
  background: var(--navy-deep);
  color: #eef0ec;
  border-top: 1px solid #2a3f56;
  padding: 12px var(--gutter);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  align-items: center;
  justify-content: center;
  transform: translateY(0);
  transition: transform .25s ease;
}
.cookie-bar[hidden] { display: none; }
.cookie-bar p {
  font-size: 12.5px;
  line-height: 1.4;
  max-width: 52ch;
  flex: 1 1 260px;
}
.cookie-bar a { text-decoration: underline; }
.cookie-actions { display: flex; gap: 10px; flex: none; }
.cookie-btn {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid #3a4a56;
  white-space: nowrap;
}
.cookie-btn.accept { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.cookie-btn.reject { color: #cdd6dc; }

/* ---- reveal-on-scroll (minimal, single kind of motion) --------------------------- */

.reveal { opacity: 0; transform: translateY(10px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  * { scroll-behavior: auto !important; }
}

/* ---- misc responsive ---------------------------------------------------------- */

@media (max-width: 480px) {
  .step { grid-template-columns: 72px 1fr; }
  .step img { width: 72px; }
  .pdf-previews { flex-direction: column; align-items: center; }
  .pdf-previews figure { width: 78%; max-width: 260px; }
}
