/* ============================================================
   gaglioneandrea.com — landing "offerta" (light brutalist)
   ============================================================ */

:root {
  --ink:        #0a0a0a;
  --ink-soft:   #1a1a1a;
  --paper:      #f7f5ee;     /* avorio sporco */
  --paper-alt:  #efebde;     /* sezione alternata */
  --line:       #0a0a0a;
  --accent:     #ff3b00;     /* rosso segnaletico */
  --accent-ink: #ffffff;
  --muted:      #6b6b62;
  --good:       #1a7a2b;
  --bad:        #b3261e;

  --b1:         1px;          /* bordo standard */
  --b2:         2px;          /* bordo enfatico */
  --shadow-off: 4px 4px 0 var(--ink); /* offset solido brutalist */

  --maxw:       980px;
  --maxw-text:  720px;

  --f-sans:     "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --f-mono:     "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

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

/* -------- Base -------- */
html {
  background: var(--paper);
  overscroll-behavior: none;
}
body {
  font-family: var(--f-sans);
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--accent); color: var(--accent-ink); }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  z-index: 999;
  font-weight: 700;
}
.skip-link:focus { left: 12px; top: 12px; }

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 22px;
}

/* -------- Typography -------- */
.h-display {
  font-weight: 800;
  font-size: clamp(30px, 6.4vw, 68px);
  line-height: 1.22;
  letter-spacing: -0.022em;
  margin: 8px 0 16px;
}
@media (min-width: 720px) {
  .h-display { line-height: 1.35; margin: 16px 0 22px; }
}
.h-display em {
  font-style: normal;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 1px .14em 3px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.h-section {
  font-weight: 800;
  font-size: clamp(26px, 4.2vw, 40px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  margin: 6px 0 0;
}
.h-section .muted { color: var(--muted); font-weight: 600; }

.eyebrow {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-soft);
  display: inline-block;
  border: var(--b1) solid var(--ink);
  padding: 6px 10px 5px;
  margin-bottom: 28px;
}

.section-num {
  font-family: var(--f-mono);
  font-size: 12.5px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.lede {
  font-size: clamp(15px, 1.7vw, 18px);
  line-height: 1.5;
  max-width: 640px;
  margin: 0 0 14px;
  color: var(--ink-soft);
}
.lede:last-of-type { margin-bottom: 22px; }
.lede-strong {
  font-size: clamp(17px, 2.1vw, 24px);
  line-height: 1.55;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 14px;
}
@media (min-width: 720px) {
  .lede { margin-bottom: 20px; }
  .lede:last-of-type { margin-bottom: 30px; }
  .lede-strong { margin-bottom: 18px; }
}

q { quotes: "“" "”" "‘" "’"; }
q::before { content: open-quote; }
q::after  { content: close-quote; }

.u {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent);
  text-underline-offset: 3px;
  text-decoration-skip-ink: none;
}
.h-display .u {
  text-decoration-thickness: 4px;
  text-underline-offset: 6px;
}
.hl {
  background: var(--accent);
  color: var(--accent-ink);
  font-style: normal;
  padding: 2px .2em 4px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
strong { font-weight: 700; }

/* -------- Topbar -------- */
.topbar {
  position: relative;
  background: var(--paper);
  border-bottom: var(--b1) solid var(--ink);
}
.topbar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
}
.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: var(--ink);
}
.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.005em;
}

/* -------- Buttons -------- */
.btn {
  --bg: var(--ink);
  --fg: var(--paper);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--bg);
  color: var(--fg);
  border: var(--b2) solid var(--ink);
  padding: 13px 20px;
  font-weight: 700;
  font-size: 15.5px;
  letter-spacing: -0.005em;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease, background .15s ease;
  position: relative;
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-off); }
.btn:active { transform: translate(0, 0); box-shadow: none; }
.btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }

.btn-primary {
  --bg: var(--accent);
  --fg: var(--accent-ink);
}
.btn-ghost {
  --bg: transparent;
  --fg: var(--ink);
}
.btn-sm { padding: 9px 14px; font-size: 14px; border-width: var(--b1); }
.btn-block { width: 100%; }
.btn-arrow { display: inline-block; transition: transform .15s ease; }
.btn:hover .btn-arrow { transform: translateX(3px); }

/* -------- Hero -------- */
.hero {
  min-height: 100svh;
  padding: 36px 0 48px;
  border-bottom: var(--b1) solid var(--ink);
  position: relative;
  display: flex;
  align-items: center;
}
.hero-inner { width: 100%; }
.hero .eyebrow { margin-bottom: 18px; }

@media (min-width: 720px) {
  .hero-photo img { width: 172px; height: 172px; }
  .hero-photo { margin-bottom: 30px; }
}

.hero-eyebrow {
  display: block;
  width: max-content;
  max-width: 100%;
  margin: 0 auto 18px;
}
.hero-photo {
  display: flex;
  justify-content: center;
  margin: 0 0 26px;
}
.hero-photo img {
  width: 156px;
  height: 156px;
  border-radius: 50%;
  object-fit: cover;
  border: var(--b1) solid var(--ink);
  background: var(--paper);
  display: block;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 4px;
}
.cta-row .btn { flex: 0 1 auto; }

@media (min-width: 720px) {
  .hero { padding: 64px 0 72px; min-height: 0; align-items: flex-start; }
}

/* -------- Block (section) -------- */
.block {
  padding: 72px 0;
  border-bottom: var(--b1) solid var(--ink);
}
.block-alt {
  background: var(--paper-alt);
}
.block-head {
  margin-bottom: 36px;
  max-width: var(--maxw-text);
}
.block-head .section-num { margin-bottom: 10px; }
.block-sub {
  font-size: 17px;
  color: var(--muted);
  margin-top: 12px;
}
.block-close {
  margin-top: 36px;
  font-size: clamp(18px, 2vw, 22px);
  font-weight: 500;
  max-width: var(--maxw-text);
}
.block-close strong { font-weight: 800; }

/* -------- Cards (problem / service) -------- */
.cards-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.card {
  background: var(--paper);
  border: var(--b1) solid var(--ink);
  padding: 24px 22px 26px;
  position: relative;
}
.block-alt .card { background: #fff; }
.card h3 {
  font-weight: 700;
  font-size: clamp(18px, 1.9vw, 21px);
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 6px 0 10px;
}
.card p { font-size: 16px; line-height: 1.55; }
.card-num {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: 12px;
  display: inline-block;
  border: var(--b1) solid var(--ink);
  padding: 3px 7px 2px;
  background: transparent;
  color: var(--ink);
}
.block-alt .card-num { background: transparent; }

.card-flag .card-num {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
  font-weight: 600;
}

.card-logos {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 16px;
  padding-top: 14px;
  border-top: var(--b1) dashed var(--ink);
}
.card-logos img {
  filter: brightness(0);
  opacity: 0.75;
  width: auto;
  max-height: 22px;
}

@media (min-width: 720px) {
  .cards-list { grid-template-columns: repeat(3, 1fr); gap: 22px; }
}

/* -------- Lavori (portfolio) -------- */
.work-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 22px;
}
.work-card {
  background: var(--paper);
  border: var(--b1) solid var(--ink);
  overflow: hidden;
  transition: transform .15s ease, box-shadow .15s ease;
}
.block-alt .work-card { background: #fff; }
.work-card:hover { transform: translate(-2px, -2px); box-shadow: var(--shadow-off); }
.work-link {
  display: block;
  text-decoration: none;
  color: var(--ink);
}
.work-shot {
  aspect-ratio: 16 / 10;
  background: var(--paper-alt);
  border-bottom: var(--b1) solid var(--ink);
  position: relative;
  overflow: hidden;
}
.block-alt .work-shot { background: var(--paper); }
.work-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.work-shot-hint { display: none; }
.work-shot-placeholder {
  display: grid;
  place-items: center;
  background-image:
    linear-gradient(45deg, rgba(10,10,10,.04) 25%, transparent 25%),
    linear-gradient(-45deg, rgba(10,10,10,.04) 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, rgba(10,10,10,.04) 75%),
    linear-gradient(-45deg, transparent 75%, rgba(10,10,10,.04) 75%);
  background-size: 20px 20px;
  background-position: 0 0, 0 10px, 10px -10px, -10px 0;
}
.work-shot-placeholder .work-shot-hint {
  display: inline-block;
  font-family: var(--f-mono);
  font-size: 12px;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  background: var(--paper);
  border: var(--b1) solid var(--ink);
  padding: 6px 10px;
}
.work-body {
  padding: 18px 20px 22px;
}
.work-domain {
  font-family: var(--f-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.04em;
  margin-bottom: 4px;
  word-break: break-all;
}
.work-temp {
  text-transform: none;
  letter-spacing: 0;
  font-size: 11px;
  color: var(--muted);
}
.work-title {
  font-weight: 700;
  font-size: clamp(19px, 2vw, 22px);
  letter-spacing: -0.01em;
  line-height: 1.2;
  margin: 4px 0 8px;
}
.work-desc {
  font-size: 15.5px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 12px;
}
.work-cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  font-size: 14.5px;
  border-bottom: var(--b1) solid var(--accent);
  padding-bottom: 1px;
  color: var(--ink);
}
.work-card:hover .work-cta { background: var(--accent); color: var(--accent-ink); border-bottom-color: var(--ink); }

@media (min-width: 720px) {
  .work-grid { grid-template-columns: 1fr 1fr; gap: 26px; }
}

/* -------- Reasons (why me) -------- */
.reason-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  border-top: var(--b1) solid var(--ink);
}
.reason {
  border-bottom: var(--b1) solid var(--ink);
  padding: 22px 0;
}
.reason h3 {
  font-weight: 700;
  font-size: clamp(17px, 1.9vw, 20px);
  letter-spacing: -0.01em;
  margin-bottom: 6px;
  line-height: 1.25;
}
.reason p { font-size: 16px; color: var(--ink-soft); }

@media (min-width: 720px) {
  .reason-grid {
    grid-template-columns: 1fr 1fr;
    border-top: var(--b1) solid var(--ink);
    border-left: var(--b1) solid var(--ink);
  }
  .reason {
    border-right: var(--b1) solid var(--ink);
    border-bottom: var(--b1) solid var(--ink);
    padding: 26px 24px;
  }
}

.ulink {
  color: var(--ink);
  text-decoration: none;
  border-bottom: var(--b1) solid var(--accent);
  padding-bottom: 1px;
  font-weight: 700;
}
.ulink:hover { background: var(--accent); color: var(--accent-ink); border-bottom-color: var(--ink); }

/* -------- Steps -------- */
.steps-list {
  display: grid;
  gap: 18px;
  counter-reset: step;
}
.step {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 18px;
  align-items: start;
  border: var(--b1) solid var(--ink);
  background: var(--paper);
  padding: 22px;
}
.block-alt .step { background: #fff; }
.step-num {
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: clamp(26px, 3.6vw, 38px);
  line-height: 1;
  color: var(--accent);
  letter-spacing: -0.02em;
}
.step h3 {
  font-weight: 700;
  font-size: clamp(18px, 1.9vw, 21px);
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.step p { font-size: 16px; }

/* -------- Prezzo -------- */
.price-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.price-card {
  background: var(--paper);
  border: var(--b1) solid var(--ink);
  padding: 24px;
}
.block-alt .price-card { background: #fff; }
.price-title {
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  letter-spacing: -0.018em;
  line-height: 1.15;
  margin: 0 0 14px;
}
.price-tag {
  font-weight: 800;
  font-size: clamp(28px, 4.6vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.price-tag .from {
  display: block;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 6px;
}
.slash {
  color: var(--accent);
  font-weight: 800;
  margin: 0 .08em;
}

@media (min-width: 720px) {
  .price-grid { grid-template-columns: 1fr 1fr; gap: 22px; }
}

/* -------- About -------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 26px;
  align-items: start;
}
.about-photo img {
  border: var(--b1) solid var(--ink);
  width: 220px;
  max-width: 60vw;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  background: var(--paper);
}
.about-text .section-num { margin-bottom: 8px; display: block; }
.about-text p { font-size: 17px; margin-bottom: 14px; max-width: 640px; }
.about-text .about-fluff {
  font-style: italic;
  color: var(--ink-soft);
}

@media (min-width: 720px) {
  .about-grid { grid-template-columns: 240px 1fr; gap: 40px; }
  .about-photo img { width: 240px; }
}

/* -------- Conversione (form) -------- */
.lead-toggle {
  display: inline-flex;
  border: var(--b1) solid var(--ink);
  margin: 0 0 22px;
  background: var(--paper);
}
.toggle-btn {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 11px 16px;
  font-weight: 600;
  font-size: 14.5px;
  color: var(--ink);
  border-right: var(--b1) solid var(--ink);
}
.toggle-btn:last-child { border-right: 0; }
.toggle-btn.is-active { background: var(--ink); color: var(--paper); }
.toggle-btn:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.lead-cards { display: grid; gap: 18px; }
.lead-card {
  border: var(--b1) solid var(--ink);
  background: #fff;
  padding: 26px 22px 26px;
}
.lead-card[hidden] { display: none; }
.lead-card.is-active { display: block; }

.lead-card h3 {
  font-weight: 800;
  font-size: clamp(21px, 2.4vw, 26px);
  letter-spacing: -0.015em;
  line-height: 1.18;
  margin: 8px 0 10px;
}
.lead-card > p { font-size: 16px; margin-bottom: 18px; max-width: 640px; }

.lead-form {
  display: grid;
  gap: 14px;
  margin-top: 6px;
}
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}
.field { display: grid; gap: 6px; }
.field label {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.005em;
}
.field .hint {
  font-weight: 500;
  color: var(--muted);
  font-size: 13.5px;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="url"] {
  border: var(--b1) solid var(--ink);
  background: var(--paper);
  padding: 12px 14px;
  font-size: 16px;
  border-radius: 0;
  -webkit-appearance: none;
}
.field input:focus {
  outline: 3px solid var(--accent);
  outline-offset: 0;
  background: #fff;
}
.field input:user-invalid {
  border-color: var(--bad);
}

.field-check label {
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 10px;
  align-items: start;
  font-weight: 500;
  font-size: 14px;
  color: var(--ink-soft);
}
.field-check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  appearance: none;
  -webkit-appearance: none;
  border: var(--b1) solid var(--ink);
  background: var(--paper);
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  margin-top: 1px;
  border-radius: 0;
}
.field-check input[type="checkbox"]:checked {
  background: var(--accent);
}
.field-check input[type="checkbox"]:checked::after {
  content: "✓";
  color: var(--accent-ink);
  font-weight: 900;
  font-size: 14px;
  line-height: 1;
}
.field-check input[type="checkbox"]:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}

.form-micro {
  font-size: 13px;
  color: var(--muted);
  margin-top: 4px;
}
.form-status {
  font-weight: 700;
  font-size: 14.5px;
  min-height: 1.2em;
  margin-top: 4px;
}
.form-status.is-ok { color: var(--good); }
.form-status.is-error { color: var(--bad); }

.converti-alt {
  margin-top: 28px;
  text-align: center;
  font-size: 16.5px;
}

/* -------- Footer -------- */
.site-footer {
  background: var(--ink);
  color: var(--paper);
  padding: 36px 0;
  border-top: var(--b1) solid var(--ink);
}
.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 22px;
  align-items: center;
  text-align: center;
}
.foot-left {
  font-family: var(--f-mono);
  font-size: 13px;
  line-height: 1.6;
  color: #d6d2c4;
}
.foot-links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.foot-links a {
  color: var(--paper);
  text-decoration: none;
  font-weight: 700;
  font-size: 14.5px;
  border-bottom: var(--b1) solid var(--accent);
  padding-bottom: 2px;
}
.foot-links a:hover { background: var(--accent); }

@media (min-width: 720px) {
  .site-footer { padding: 40px 0; }
}

/* -------- CTA inline nelle price card -------- */
.price-cta {
  margin-top: 18px;
  align-self: flex-start;
}

/* -------- Utilities -------- */
.hide-sm { display: none; }
@media (min-width: 600px) {
  .hide-sm { display: inline-flex; }
}

/* -------- Reveal on scroll (sobrio) -------- */
.reveal {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .55s ease, transform .55s ease;
}
.reveal.is-in {
  opacity: 1;
  transform: translateY(0);
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .btn-arrow { transition: none; }
}
