/* ── Variables ─────────────────────────────────────────────── */
:root {
  --bg:            #f6f3ee;
  --bg-alt:        #eeeae3;
  --surface:       #ffffff;
  --ink:           #1a1714;
  --ink-2:         #4a453f;
  --ink-3:         #8a857d;
  --accent:        #c8921e;
  --accent-dim:    #f0e4cc;
  --border:        rgba(26,23,20,0.1);
  --border-strong: rgba(26,23,20,0.22);

  --font-display:  'Cormorant', serif;
  --font-body:     'DM Sans', sans-serif;

  --max-w:   1140px;
  --pad-x:   2rem;
}

/* ── Reset ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

/* ── Utility ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.rule {
  border: none;
  border-top: 1px solid var(--border);
  margin: 0;
}
.label {
  font-family: var(--font-body);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ── Reveal animation ────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }

/* ── Nav ─────────────────────────────────────────────────────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(246,243,238,0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  gap: 2rem;
}
.nav__logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  white-space: nowrap;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.55rem;
}
.nav__logo-img {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  flex-shrink: 0;
}
.nav__logo span {
  font-weight: 300;
  font-size: 0.95rem;
  color: var(--ink-3);
  margin-left: 0.4rem;
}
.nav__links {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}
.nav__links a {
  font-size: 0.8rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--ink-2);
  transition: color 0.2s;
}
.nav__links a:hover { color: var(--ink); }
.nav__cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1.2rem;
  background: var(--ink);
  color: var(--bg);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  border-radius: 2px;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
}
.nav__cta:hover { background: var(--accent); }

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
  min-height: calc(100vh - 4rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 6rem var(--pad-x) 5rem;
  max-width: var(--max-w);
  margin: 0 auto;
  position: relative;
}
.hero__eyebrow {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 2.5rem;
}
.hero__eyebrow::after {
  content: '';
  flex: 1;
  max-width: 120px;
  height: 1px;
  background: var(--border-strong);
}
.hero__headline {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 8vw, 7rem);
  font-weight: 400;
  line-height: 1.06;
  letter-spacing: -0.01em;
  margin-bottom: 2.5rem;
  max-width: 14ch;
}
.hero__headline em {
  font-style: italic;
  color: var(--accent);
}
.hero__body {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 4rem;
  flex-wrap: wrap;
}
.hero__sub {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink-2);
  max-width: 42ch;
}
.hero__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.75rem;
  flex-shrink: 0;
}
.hero__scroll {
  position: absolute;
  bottom: 2.5rem;
  left: var(--pad-x);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--ink-3);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.hero__scroll::before {
  content: '';
  display: block;
  width: 1px;
  height: 2.5rem;
  background: var(--border-strong);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
  border: 1px solid transparent;
}
.btn--primary {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.btn--primary:hover { background: var(--accent); border-color: var(--accent); }
.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--border-strong);
}
.btn--outline:hover { border-color: var(--ink); }
.btn__arrow { transition: transform 0.2s; }
.btn:hover .btn__arrow { transform: translateX(3px); }

/* ── Section base ────────────────────────────────────────────── */
.section {
  padding: 7rem var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
}
.section--alt {
  background: var(--bg-alt);
  max-width: none;
  padding: 7rem 0;
}
.section--alt .section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
}
.section__header {
  margin-bottom: 4rem;
}
.section__title {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  font-weight: 400;
  line-height: 1.15;
  margin-top: 0.75rem;
}

/* ── Come funziona ───────────────────────────────────────────── */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border: 1px solid var(--border);
}
.step {
  padding: 2.5rem 2rem;
  border-right: 1px solid var(--border);
  position: relative;
}
.step:last-child { border-right: none; }
.step__num {
  font-family: var(--font-display);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--border-strong);
  line-height: 1;
  margin-bottom: 1.25rem;
}
.step__title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.step__text {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.65;
}

/* ── Funzionalità ────────────────────────────────────────────── */
.features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.feature {
  background: var(--bg);
  padding: 2rem 1.75rem;
  position: relative;
  transition: background 0.2s;
}
.feature:hover { background: var(--surface); }
.feature__num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 300;
  color: var(--ink-3);
  margin-bottom: 1.25rem;
}
.feature__icon {
  font-size: 1.4rem;
  margin-bottom: 0.75rem;
  display: block;
}
.feature__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
  line-height: 1.25;
}
.feature__text {
  font-size: 0.865rem;
  color: var(--ink-2);
  line-height: 1.65;
}
.feature--accent { background: var(--ink); color: var(--bg); }
.feature--accent:hover { background: #2c2824; }
.feature--accent .feature__num,
.feature--accent .feature__text { color: rgba(246,243,238,0.55); }
.feature--accent .feature__title { color: var(--bg); }

/* ── App mockup ──────────────────────────────────────────────── */
.mockup-wrap {
  border-radius: 6px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(26,23,20,0.18), 0 2px 8px rgba(26,23,20,0.1);
  border: 1px solid rgba(26,23,20,0.25);
  background: #141210;
}
.mockup-bar {
  background: #1a1816;
  padding: 0.6rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.mockup-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.mockup-dot:nth-child(1) { background: #ff5f57; }
.mockup-dot:nth-child(2) { background: #febc2e; }
.mockup-dot:nth-child(3) { background: #28c840; }
.mockup-url {
  flex: 1;
  background: rgba(255,255,255,0.06);
  border-radius: 3px;
  height: 20px;
  margin: 0 0.5rem;
  max-width: 220px;
}
.mockup-body { padding: 1rem; }


/* ── Use case sections ───────────────────────────────────────── */
.usecase {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.usecase--reverse { direction: rtl; }
.usecase--reverse > * { direction: ltr; }
.usecase__content {}
.usecase__quote {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-style: italic;
  font-weight: 300;
  color: var(--ink-2);
  line-height: 1.4;
  padding-left: 1.5rem;
  border-left: 2px solid var(--accent);
  margin-bottom: 1.5rem;
}
.usecase__title {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}
.usecase__text {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.7;
}

/* ── Territorio ──────────────────────────────────────────────── */
.territorio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 1rem;
}
.territorio-card {
  background: var(--surface);
  border: 1px solid var(--border);
  padding: 2rem 1.75rem;
  border-radius: 2px;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.territorio-card:hover {
  border-color: var(--accent);
  box-shadow: 0 4px 20px rgba(200,146,30,0.1);
}
.territorio-card__icon {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  display: block;
}
.territorio-card__title {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.6rem;
}
.territorio-card__text {
  font-size: 0.875rem;
  color: var(--ink-2);
  line-height: 1.65;
}
.territorio-intro {
  max-width: 60ch;
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-top: 0.5rem;
}
.territorio-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--accent-dim);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.3rem 0.7rem;
  border-radius: 2px;
  margin-bottom: 1rem;
}

/* ── CTA section ─────────────────────────────────────────────── */
.cta-section {
  text-align: center;
  padding: 7rem var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
}
.cta-section__title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 4vw, 3.5rem);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 1rem;
  margin-top: 0.75rem;
}
.cta-section__sub {
  font-size: 1rem;
  color: var(--ink-2);
  max-width: 50ch;
  margin: 0 auto 2.5rem;
  line-height: 1.7;
}
.cta-section__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
}

/* ── Form ────────────────────────────────────────────────────── */
.form-section {
  background: var(--bg-alt);
  padding: 7rem 0;
}
.form-section__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad-x);
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 6rem;
  align-items: start;
}
.form-section__info {}
.form-section__title {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  line-height: 1.2;
  margin-top: 0.75rem;
  margin-bottom: 1rem;
}
.form-section__text {
  font-size: 0.9rem;
  color: var(--ink-2);
  line-height: 1.7;
  margin-bottom: 2rem;
}
.form-section__contact {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.form-section__contact a {
  font-size: 0.875rem;
  color: var(--ink-2);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.form-section__contact a:hover { color: var(--accent); }

.form { display: flex; flex-direction: column; gap: 1rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: 0.35rem; }
.field label {
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input,
.field select,
.field textarea {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: 2px;
  padding: 0.7rem 0.9rem;
  font-size: 0.9rem;
  color: var(--ink);
  transition: border-color 0.2s;
  outline: none;
  width: 100%;
  appearance: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 110px; }
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%238a857d' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.8rem center;
  padding-right: 2rem;
}
.form__submit { margin-top: 0.5rem; }
.form__success {
  display: none;
  background: #f0fdf4;
  border: 1px solid #86efac;
  border-radius: 2px;
  padding: 1rem;
  font-size: 0.875rem;
  color: #166534;
  text-align: center;
}

/* ── Footer ──────────────────────────────────────────────────── */
.footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem var(--pad-x);
  max-width: var(--max-w);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer__brand {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 400;
}
.footer__brand span { color: var(--ink-3); font-weight: 300; }
.footer__links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}
.footer__links a {
  font-size: 0.78rem;
  color: var(--ink-3);
  transition: color 0.2s;
}
.footer__links a:hover { color: var(--ink); }
.footer__copy {
  font-size: 0.75rem;
  color: var(--ink-3);
}

/* ── Divider section ─────────────────────────────────────────── */
.divider-section {
  padding: 0;
  border-top: 1px solid var(--border);
}

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 900px) {
  .nav__links { display: none; }
  .hero__headline { font-size: clamp(2.8rem, 10vw, 4.5rem); }
  .hero__body { flex-direction: column; gap: 2rem; }
  .steps { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--border); }
  .step:last-child { border-bottom: none; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .usecase { grid-template-columns: 1fr; gap: 2.5rem; }
  .usecase--reverse { direction: ltr; }
  .territorio-grid { grid-template-columns: 1fr; }
  .form-section__inner { grid-template-columns: 1fr; gap: 3rem; }
  .form-row { grid-template-columns: 1fr; }
  .footer { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 600px) {
  :root { --pad-x: 1.25rem; }
  .features { grid-template-columns: 1fr; }
  .hero__actions { flex-direction: row; flex-wrap: wrap; }
}
