@import url("tokens.css");

/* ── Reset base ─────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--rem-sans);
  font-weight: var(--rem-w-roman);
  color: var(--rem-ink);
  background: var(--rem-paper);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
::selection { background: var(--rem-rosso); color: #fff; }
:focus-visible { outline: 2px solid var(--rem-rosso); outline-offset: 3px; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 clamp(20px, 5vw, 56px);
}

@keyframes remFadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}
[data-reveal] { animation: remFadeUp 520ms cubic-bezier(.2,.7,.2,1) both; }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { animation: none; }
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--rem-grey-600);
}

.section-title {
  font-weight: var(--rem-w-thin);
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.04;
  letter-spacing: -0.01em;
  margin: 16px 0 0;
  color: var(--rem-ink);
}

.rule {
  border: 0;
  border-top: 2px solid var(--rem-rosso);
  width: 48px;
  margin: 0;
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 26px;
  font-size: 15px;
  text-decoration: none;
  border: 1px solid currentColor;
  min-height: 56px;
  cursor: pointer;
  background: transparent;
  transition: background var(--rem-dur-fast) var(--rem-ease-out),
              color var(--rem-dur-fast) var(--rem-ease-out),
              border-color var(--rem-dur-fast) var(--rem-ease-out);
}
.btn--dark { background: var(--rem-ink); color: #fff; border-color: var(--rem-ink); }
.btn--dark:hover { background: var(--rem-rosso); border-color: var(--rem-rosso); color: #fff; }
.btn--light { background: #fff; color: var(--rem-ink); border-color: #fff; }
.btn--light:hover { background: var(--rem-rosso); border-color: var(--rem-rosso); color: #fff; }
.btn--outline-light { color: #fff; border-color: #fff; background: transparent; }
.btn--outline-light:hover { color: var(--rem-rosso); border-color: var(--rem-rosso); }
.btn--outline-dark { color: var(--rem-ink); border-color: var(--rem-ink); background: transparent; padding: 14px 22px; min-height: 48px; font-size: 14px; }
.btn--outline-dark:hover { color: var(--rem-rosso); border-color: var(--rem-rosso); }

/* ── Header ─────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--rem-grey-100);
}
.site-header__bar {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header__logo { display: flex; align-items: center; text-decoration: none; flex: 0 0 auto; }
.site-header__logo img { height: 26px; width: auto; }

.nav-desktop {
  display: none;
  align-items: center;
  gap: clamp(18px, 3vw, 36px);
}
.nav-link {
  font-size: 14px;
  text-decoration: none;
  color: var(--rem-ink);
  padding: 6px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--rem-dur-fast) var(--rem-ease-out), border-color var(--rem-dur-fast) var(--rem-ease-out);
}
.nav-link:hover { color: var(--rem-rosso); border-bottom-color: var(--rem-rosso); }

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: transparent;
  border: 0;
  cursor: pointer;
}
.nav-toggle span { display: block; height: 1.5px; background: var(--rem-ink); }

.nav-mobile {
  display: none;
  border-top: 1px solid var(--rem-grey-100);
  background: #fff;
  padding: clamp(20px, 5vw, 56px) clamp(20px, 5vw, 56px) 32px;
  flex-direction: column;
  gap: 4px;
}
.nav-mobile.is-open { display: flex; }
.nav-mobile__link {
  font-weight: 200;
  font-size: 30px;
  text-decoration: none;
  color: var(--rem-ink);
  padding: 10px 0;
  border-bottom: 1px solid var(--rem-grey-50);
}
.nav-mobile__cta { margin-top: 20px; justify-content: center; width: 100%; }

@media (min-width: 900px) {
  .nav-desktop { display: flex; }
  .nav-toggle, .nav-mobile { display: none !important; }
}

/* ── Hero ───────────────────────────────────────────────── */
.hero {
  position: relative;
  background: var(--rem-black);
  color: #fff;
  padding: clamp(48px, 7vw, 96px) 0 clamp(56px, 8vw, 112px);
  scroll-margin-top: 76px;
  overflow: hidden;
}
.hero__arcs { position: absolute; left: -180px; top: -260px; width: 620px; transform: rotate(180deg); pointer-events: none; opacity: .07; }
.hero__grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}
.hero__eyebrow-row { display: flex; align-items: center; gap: 14px; margin-bottom: clamp(24px, 4vw, 40px); }
.hero__eyebrow-line { display: block; width: 48px; height: 2px; background: var(--rem-rosso); }
.hero__eyebrow-text { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--rem-grey-200); }
.hero h1 {
  font-family: var(--rem-serif);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(34px, 7.2vw, 104px);
  line-height: 1;
  letter-spacing: -0.015em;
  margin: 0;
  color: #fff;
}
.hero h1 .nowrap { white-space: nowrap; }
.hero h1 .punto { color: var(--rem-rosso); }
.hero__sub { margin: clamp(24px, 4vw, 36px) 0 0; max-width: 34ch; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.55; color: var(--rem-grey-100); }
.hero__ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: clamp(32px, 4vw, 44px); }
.hero__image-wrap { position: relative; display: flex; justify-content: center; align-items: center; min-height: clamp(320px, 42vw, 620px); }
.hero__image { width: clamp(380px, 62vw, 880px); max-width: none; height: auto; opacity: .95; margin-right: clamp(-160px, -8vw, 0px); pointer-events: none; }
.hero__strip-wrap { margin: clamp(40px, 6vw, 72px) auto 0; }
.hero__strip {
  border-top: 1px solid var(--rem-ink-soft);
  padding-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: 13px;
  color: var(--rem-grey-200);
}
.hero__strip span[aria-hidden] { color: var(--rem-grey-600); }

/* ── Sezioni generiche ──────────────────────────────────── */
.section { padding: clamp(72px, 10vw, 140px) 0; scroll-margin-top: 76px; }
.section--soft { background: var(--rem-off-white); }
.section--white { background: var(--rem-paper); }
.section--black { background: var(--rem-black); color: #fff; }
.section-head {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(24px, 4vw, 64px);
  align-items: end;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.section-head p { margin: 0; font-size: 17px; line-height: 1.6; color: var(--rem-grey-600); max-width: 44ch; }

/* ── Servizi ────────────────────────────────────────────── */
.services-list { border-top: 1.5px solid var(--rem-ink); }
.service-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 12px clamp(24px, 4vw, 56px);
  align-items: start;
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--rem-grey-200);
  text-decoration: none;
  color: var(--rem-ink);
  transition: color var(--rem-dur-fast) var(--rem-ease-out);
}
.service-row:hover { color: var(--rem-rosso); }
.service-row__head { display: flex; gap: 20px; align-items: baseline; }
.service-row__num { font-size: 13px; color: var(--rem-grey-600); letter-spacing: .06em; }
.service-row h3 { font-weight: 400; font-size: clamp(24px, 3vw, 34px); line-height: 1.1; margin: 0; color: inherit; }
.service-row p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--rem-grey-600); max-width: 52ch; }
.service-row__link { justify-self: start; font-size: 13px; letter-spacing: .06em; border-bottom: 1px solid currentColor; padding-bottom: 3px; }

/* ── Chi siamo ──────────────────────────────────────────── */
.studio { position: relative; overflow: hidden; }
.studio__arcs { position: absolute; right: -220px; bottom: -280px; width: 680px; pointer-events: none; }
.studio__grid { position: relative; display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(32px, 5vw, 80px); }
.studio p { margin: 0 0 20px; font-size: 17px; line-height: 1.7; color: var(--rem-grey-600); max-width: 56ch; }
.studio p:first-child { color: var(--rem-ink-soft); }
.studio p:last-of-type { margin-bottom: clamp(32px, 4vw, 48px); }
.studio__cells {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--rem-grey-200);
  border-top: 1px solid var(--rem-grey-200);
  border-bottom: 1px solid var(--rem-grey-200);
}
.studio__cell { background: #fff; padding: 24px 20px; }
.studio__cell:first-child { padding-left: 0; }
.studio__cell p { margin: 10px 0 0; font-size: 15px; line-height: 1.5; color: var(--rem-ink-soft); max-width: none; }

/* ── Progetti / Gallery ─────────────────────────────────── */
.gallery-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1.5px solid var(--rem-ink);
  padding-top: 16px;
  margin-bottom: clamp(20px, 3vw, 28px);
}
.gallery-bar__counter { font-size: 13px; letter-spacing: .08em; color: var(--rem-grey-600); }
.gallery-bar__arrows { display: flex; gap: 8px; }
.gallery-arrow {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  background: transparent;
  border: 1px solid var(--rem-ink);
  color: var(--rem-ink);
  font-size: 16px;
  cursor: pointer;
  transition: color var(--rem-dur-fast) var(--rem-ease-out), border-color var(--rem-dur-fast) var(--rem-ease-out);
}
.gallery-arrow:hover { color: var(--rem-rosso); border-color: var(--rem-rosso); }

.gallery {
  display: flex;
  gap: clamp(20px, 3vw, 40px);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.gallery::-webkit-scrollbar { display: none; }
.gallery__slide { flex: 0 0 100%; margin: 0; scroll-snap-align: start; }
.gallery__frame { position: relative; width: 100%; background: var(--rem-grey-50); border: 1px solid var(--rem-grey-100); overflow: hidden; }
.gallery__frame img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: contain; }
.gallery__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px clamp(24px, 4vw, 56px);
  align-items: start;
  border-top: 1px solid var(--rem-grey-200);
  padding-top: clamp(16px, 2vw, 24px);
  margin-top: 16px;
}
.gallery__meta h3 { font-weight: 200; font-size: clamp(24px, 3vw, 36px); line-height: 1.1; letter-spacing: -0.01em; margin: 12px 0 0; color: var(--rem-ink); }
.gallery__meta p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--rem-grey-600); max-width: 52ch; }
.gallery__link { font-size: 13px; letter-spacing: .04em; color: var(--rem-ink); text-decoration: none; border-bottom: 1px solid var(--rem-grey-200); padding-bottom: 3px; transition: color var(--rem-dur-fast) var(--rem-ease-out), border-color var(--rem-dur-fast) var(--rem-ease-out); }
.gallery__link:hover { color: var(--rem-rosso); border-color: var(--rem-rosso); }

.gallery-dots { display: flex; gap: 8px; margin-top: clamp(24px, 3vw, 32px); }
.gallery-dot { padding: 0; border: 0; cursor: pointer; height: 2px; }
.gallery-dot--active { width: 40px; background: var(--rem-rosso); }
.gallery-dot--inactive { width: 16px; background: var(--rem-grey-200); }

.gallery-hint { margin: clamp(24px, 3vw, 32px) 0 0; font-size: 13px; line-height: 1.5; color: var(--rem-grey-600); max-width: 46ch; }

/* ── Progettazione ──────────────────────────────────────── */
.progettazione-figure { margin: 0; border-top: 1.5px solid var(--rem-ink); padding-top: clamp(24px, 4vw, 40px); }
.progettazione-figure img { width: 100%; height: auto; background: #fff; border: 1px solid var(--rem-grey-100); }
.progettazione-figure figcaption { margin-top: 16px; font-size: 13px; color: var(--rem-grey-600); }

/* ── Metodo ─────────────────────────────────────────────── */
.metodo-title { font-weight: 200; font-size: clamp(34px, 5vw, 60px); line-height: 1.04; letter-spacing: -0.01em; margin: 16px 0 0; color: var(--rem-ink); max-width: 22ch; }
.metodo-cells { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1px; background: var(--rem-grey-200); border-top: 1.5px solid var(--rem-ink); }
.metodo-cell { background: #fff; padding: clamp(28px, 4vw, 44px) clamp(20px, 3vw, 36px) clamp(32px, 4vw, 48px); }
.metodo-cell:first-child { padding-left: 0; }
.metodo-cell__num { font-weight: 200; font-size: clamp(48px, 6vw, 72px); line-height: 1; color: var(--rem-grey-200); margin-bottom: 24px; }
.metodo-cell__num--accent { color: var(--rem-rosso); }
.metodo-cell h3 { font-weight: 400; font-size: 22px; letter-spacing: .02em; margin: 0 0 12px; color: var(--rem-ink); }
.metodo-cell p { margin: 0; font-size: 16px; line-height: 1.65; color: var(--rem-grey-600); max-width: 38ch; }

/* ── CTA finale ─────────────────────────────────────────── */
.cta-final__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(32px, 5vw, 72px); align-items: center; }
.cta-final h2 { font-family: var(--rem-serif); font-style: italic; font-weight: 400; font-size: clamp(38px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.01em; margin: 0; color: #fff; }
.cta-final p { margin: 0 0 clamp(28px, 4vw, 40px); font-size: 17px; line-height: 1.7; color: var(--rem-grey-100); max-width: 42ch; }

/* ── Contatti ───────────────────────────────────────────── */
.contatti__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(40px, 6vw, 88px); }
.contatti p { margin: 0 0 clamp(32px, 4vw, 48px); font-size: 17px; line-height: 1.7; color: var(--rem-grey-600); max-width: 40ch; }
.contatti__info { border-top: 1px solid var(--rem-grey-200); padding-top: 24px; display: flex; flex-direction: column; gap: 20px; }
.contatti__info p { margin: 8px 0 0; font-size: 16px; line-height: 1.6; color: var(--rem-ink-soft); max-width: none; }
.contatti__info a { color: var(--rem-ink); }

.confirm-panel { border: 1px solid var(--rem-ink); padding: clamp(28px, 4vw, 44px); }
.confirm-panel__line { display: block; width: 48px; height: 2px; background: var(--rem-rosso); margin-bottom: 24px; }
.confirm-panel h3 { font-weight: 400; font-size: 24px; margin: 0 0 12px; color: var(--rem-ink); }
.confirm-panel p { margin: 0 0 24px; font-size: 16px; line-height: 1.65; color: var(--rem-grey-600); max-width: 42ch; }

.form { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: clamp(20px, 3vw, 28px); }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field--full { grid-column: 1/-1; }
.form-field label { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--rem-grey-600); }
.form-field input[type="text"],
.form-field input[type="email"],
.form-field input[type="tel"],
.form-field select,
.form-field textarea {
  width: 100%;
  border: 0;
  border-bottom: 1px solid var(--rem-grey-200);
  background: transparent;
  padding: 12px 0;
  font-size: 16px;
  color: var(--rem-ink);
  border-radius: 0;
  outline: none;
}
.form-field textarea { line-height: 1.6; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-bottom-color: var(--rem-ink); }
.form-field--select { position: relative; }
.form-field--select select { appearance: none; padding-right: 24px; cursor: pointer; }
.form-field--select .caret { position: absolute; right: 2px; top: 12px; font-size: 14px; color: var(--rem-grey-600); pointer-events: none; }
.form-error { font-size: 13px; color: var(--rem-rosso); }
.form-field--checkbox label { display: flex; align-items: flex-start; gap: 12px; font-size: 14px; line-height: 1.55; color: var(--rem-grey-600); cursor: pointer; text-transform: none; letter-spacing: 0; }
.form-field--checkbox input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--rem-rosso); flex: 0 0 auto; }
.form-field--checkbox a { color: var(--rem-ink); }
.form-submit-row { grid-column: 1/-1; display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; }
.form-submit-row span { font-size: 13px; color: var(--rem-grey-600); }
.form-status { font-size: 13px; color: var(--rem-rosso); }

/* ── Footer ─────────────────────────────────────────────── */
.site-footer { background: #fff; border-top: 1.5px solid var(--rem-ink); padding: clamp(48px, 6vw, 80px) 0 32px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: clamp(32px, 4vw, 56px); }
.footer-grid img.lockup { width: 190px; height: auto; margin-bottom: 20px; }
.footer-grid p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--rem-grey-600); }
.footer-grid nav span, .footer-grid > div > span { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--rem-grey-600); }
.footer-links { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.footer-links a { font-size: 14px; color: var(--rem-ink); text-decoration: none; }
.footer-social { display: flex; gap: 16px; margin-top: 16px; }
.footer-social a { font-size: 14px; color: var(--rem-ink); text-decoration: none; border-bottom: 1px solid var(--rem-grey-200); padding-bottom: 2px; }
.footer-bottom {
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 20px;
  border-top: 1px solid var(--rem-grey-100);
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  align-items: center;
  justify-content: space-between;
}
.footer-bottom span { font-size: 12px; color: var(--rem-grey-600); }
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; }
.footer-bottom-links a { font-size: 12px; color: var(--rem-grey-600); }
.footer-bottom-links img { height: 16px; width: auto; opacity: .7; }
