/* =========================================================
   Vestiti usati — Milano
   Direzione: "Servizio di quartiere Milano" — grotesque
   utilitario, verde-operativo, signature cartellino prezzo.
   ========================================================= */

:root {
  /* Colore */
  --bg:           oklch(0.972 0.006 150);
  --surface:      oklch(0.995 0.003 150);
  --tint:         oklch(0.952 0.013 152);
  --ink:          oklch(0.25 0.030 158);
  --ink-soft:     oklch(0.44 0.024 155);
  --green:        oklch(0.55 0.130 152);
  --green-strong: oklch(0.44 0.115 153);
  --green-deep:   oklch(0.30 0.055 159);
  --green-deeper: oklch(0.255 0.045 160);
  --amber:        oklch(0.80 0.135 72);
  --on-dark:      oklch(0.972 0.010 150);
  --on-dark-soft: oklch(0.83 0.022 150);
  --line:         oklch(0.90 0.013 150);
  --line-dark:    oklch(0.42 0.040 158);

  /* Tipografia */
  --font-display: 'Bricolage Grotesque', system-ui, -apple-system, sans-serif;
  --font-body:    'Hanken Grotesk', system-ui, -apple-system, sans-serif;
  --font-mono:    'DM Mono', ui-monospace, 'SFMono-Regular', monospace;

  /* Misure */
  --wrap: 1140px;
  --gutter: clamp(1.15rem, 5vw, 2.5rem);
  --section-y: clamp(3.75rem, 9vw, 7rem);
  --radius: 14px;
  --radius-lg: 22px;
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;        /* 17px */
  line-height: 1.62;
  font-weight: 400;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: inherit; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1.04;
  letter-spacing: -0.02em;
  margin: 0;
  text-wrap: balance;
}
/* Heading con <br> manuali: niente balance, rispetta le spezzature volute */
.hero-title,
.dietro-text h2,
.section-head-light h2 { text-wrap: wrap; }

p { margin: 0; }

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--ink);
  color: var(--on-dark);
  padding: 0.7rem 1.1rem;
  border-radius: 0 0 10px 0;
  z-index: 10000;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ----- Bottoni ----- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 52px;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 1.02rem;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}
.btn-primary {
  background: var(--green-strong);
  color: var(--on-dark);
  box-shadow: 0 10px 24px -12px oklch(0.44 0.115 153 / 0.7);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--green-deep); }

/* ----- Cartellino prezzo (signature) ----- */
.tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: var(--amber);
  color: var(--ink);
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  padding: 0.5rem 0.95rem 0.5rem 1.4rem;
  border-radius: 6px 12px 12px 6px;
  transform: rotate(-2.5deg);
  white-space: nowrap;
  box-shadow: 0 6px 16px -10px oklch(0.55 0.12 70 / 0.8);
}
.tag-hole {
  position: absolute;
  left: 0.5rem;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: inset 0 0 0 1.5px oklch(0.55 0.05 72);
}

/* =========================================================
   Header / Nav
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.is-stuck {
  border-bottom-color: var(--line);
  box-shadow: 0 6px 22px -18px oklch(0.25 0.03 158 / 0.5);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 68px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  display: grid;
  place-items: center;
  width: 38px; height: 38px;
  border-radius: 11px;
  background: var(--green-strong);
  color: var(--on-dark);
  flex: none;
}
.brand-text {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  line-height: 1;
  display: flex;
  flex-direction: column;
}
.brand-city {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-strong);
  margin-top: 2px;
}

.nav-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.nav-list a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.4rem 0.9rem;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  color: var(--ink);
  border-radius: 999px;
  transition: background-color 0.16s ease, color 0.16s ease;
}
.nav-list a:hover { background: var(--tint); }
.nav-cta {
  background: var(--ink);
  color: var(--on-dark) !important;
}
.nav-cta:hover { background: var(--green-deep); }

.nav-toggle {
  display: none;
  width: 48px; height: 48px;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle-bars { position: relative; width: 22px; height: 16px; display: block; }
.nav-toggle-bars span {
  position: absolute; left: 0;
  width: 100%; height: 2.5px;
  background: currentColor;
  border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.nav-toggle-bars span:nth-child(1) { top: 0; }
.nav-toggle-bars span:nth-child(2) { top: 6.5px; }
.nav-toggle-bars span:nth-child(3) { top: 13px; }

/* =========================================================
   Hero
   ========================================================= */
.hero { padding-top: clamp(2.2rem, 6vw, 4rem); }
.hero-kicker {
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.04em;
  color: var(--green-strong);
  font-weight: 500;
  margin-bottom: 1.1rem;
}
.hero-title {
  font-size: clamp(2.85rem, 12vw, 6rem);
  letter-spacing: -0.035em;
  line-height: 0.96;
}
.hero-title .hl { color: var(--green-strong); }
.hero-lead {
  max-width: 46ch;
  margin-top: 1.5rem;
  font-size: clamp(1.06rem, 2.4vw, 1.3rem);
  color: var(--ink-soft);
}
.hero-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 1.1rem 1.4rem;
  margin-top: 2rem;
}
.hero-figure {
  margin: clamp(2.5rem, 6vw, 4rem) 0 0;
  position: relative;
}
.hero-figure img {
  width: 100%;
  max-height: 64vh;
  object-fit: cover;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
}

/* =========================================================
   Sezioni generiche
   ========================================================= */
.section { padding-block: var(--section-y); }
.section-tint { background: var(--tint); }
.section-head { max-width: 40ch; margin-bottom: clamp(2rem, 5vw, 3rem); }
.section-head h2 { font-size: clamp(1.95rem, 5.5vw, 3.1rem); }
.section-head p {
  margin-top: 0.9rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
}

/* ----- Steps (come funziona) ----- */
.steps {
  list-style: none;
  margin: 0; padding: 0;
  display: grid;
  gap: 1.1rem;
}
.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.5rem;
}
.step-verb {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
  margin-bottom: 0.55rem;
  color: var(--ink);
}
.step p { color: var(--ink-soft); }

/* ----- Cards (perché conviene) ----- */
.cards {
  display: grid;
  gap: 1.1rem;
}
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
}
.card h3 { font-size: 1.28rem; margin-bottom: 0.55rem; }
.card p { color: var(--ink-soft); }
.card-accent { border-color: oklch(0.80 0.10 72); background: oklch(0.985 0.012 75); }
.card-accent .tag { position: absolute; top: -0.85rem; right: 1.2rem; }
.card-accent h3 { margin-top: 0.4rem; }

/* ----- Chi c'è dietro ----- */
.dietro-grid {
  display: grid;
  gap: clamp(1.8rem, 4vw, 3rem);
  align-items: center;
}
.dietro-figure { margin: 0; }
.dietro-figure img {
  width: 100%;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.dietro-text h2 { font-size: clamp(1.9rem, 5vw, 2.9rem); margin-bottom: 1.1rem; }
.dietro-text p { color: var(--ink-soft); margin-bottom: 0.95rem; max-width: 52ch; }
.dietro-text strong { color: var(--ink); }

/* ----- Contatti (sezione verde) ----- */
.contatti {
  background: var(--green-deep);
  color: var(--on-dark);
}
.section-head-light h2 { color: var(--on-dark); }
.section-head-light p { color: var(--on-dark-soft); }
.contact-card {
  background: var(--green-deeper);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius-lg);
  padding: clamp(1.8rem, 5vw, 2.8rem);
  max-width: 560px;
}
.contact-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--on-dark-soft);
}
.contact-number {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 7vw, 3.1rem);
  letter-spacing: -0.02em;
  color: var(--on-dark);
  margin: 0.4rem 0 0.9rem;
  -webkit-user-select: all;
  user-select: all;        /* un tap/click seleziona tutto il numero, pronto da copiare */
}
.contact-note { color: var(--on-dark-soft); max-width: 44ch; }
.contact-vinted {
  margin-top: 1.6rem;
  color: var(--on-dark-soft);
  font-size: 1.02rem;
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  background: var(--green-deeper);
  color: var(--on-dark);
  padding-block: clamp(2.4rem, 5vw, 3.4rem);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem 2rem;
  justify-content: space-between;
  align-items: flex-end;
}
.footer-brand-name { color: var(--on-dark); }
.footer-brand .brand-city { color: var(--amber); }
.footer-brand p {
  margin-top: 0.7rem;
  color: var(--on-dark-soft);
  max-width: 40ch;
  font-size: 0.98rem;
}
.footer-copy { color: var(--on-dark-soft); font-size: 0.9rem; }

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 767px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    position: fixed;
    inset: 0;
    background: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
    z-index: 90;
  }
  body.nav-open .nav {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease;
  }
  body.nav-open { overflow: hidden; }
  .nav-list {
    flex-direction: column;
    gap: 0.4rem;
    text-align: center;
    width: min(86vw, 360px);
  }
  .nav-list a {
    justify-content: center;
    min-height: 56px;
    width: 100%;
    font-size: 1.25rem;
  }
  body.nav-open .nav-toggle-bars span:nth-child(1) { top: 6.5px; transform: rotate(45deg); }
  body.nav-open .nav-toggle-bars span:nth-child(2) { opacity: 0; }
  body.nav-open .nav-toggle-bars span:nth-child(3) { top: 6.5px; transform: rotate(-45deg); }
}

@media (min-width: 600px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 768px) {
  .hero-figure img { max-height: 70vh; }
}

@media (min-width: 900px) {
  .dietro-grid { grid-template-columns: 1fr 1fr; }
  .cards { grid-template-columns: repeat(4, 1fr); }
}

/* =========================================================
   Accessibilità / focus / motion
   ========================================================= */
:focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
  border-radius: 4px;
}
.contatti :focus-visible { outline-color: var(--amber); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Reveal on scroll (progressive enhancement) */
.reveal { opacity: 0; transform: translateY(18px); }
body.js .reveal { transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* =========================================================
   Weeby attribution badge (snippet canonico)
   ========================================================= */
.weeby-badge {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(10, 10, 10, 0.92);
  color: #fff;
  padding: 8px 16px 8px 8px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  box-shadow: 0 12px 32px -8px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, padding 0.25s ease;
  animation: weebyBadgeIn 0.6s ease 1.5s both;
}
.weeby-badge:hover { transform: translateY(-2px); padding-right: 20px; }
.weeby-badge img { width: 26px; height: 26px; border-radius: 7px; display: block; }
.weeby-badge .label { color: rgba(255, 255, 255, 0.9); }
.weeby-badge .label strong { color: #fff; font-weight: 700; }
.weeby-badge .cta {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  color: #ffb547;
  font-weight: 600;
  margin-left: -6px;
  transition: max-width 0.3s ease, opacity 0.2s ease 0.05s, margin-left 0.3s ease;
}
.weeby-badge:hover .cta { max-width: 200px; opacity: 1; margin-left: 0; }
@keyframes weebyBadgeIn {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (max-width: 720px) {
  .weeby-badge { bottom: 14px; right: 14px; padding: 6px 14px 6px 6px; font-size: 12px; }
  .weeby-badge img { width: 22px; height: 22px; border-radius: 6px; }
}
@media (prefers-reduced-motion: reduce) {
  .weeby-badge { animation: none; }
}
