:root {
  --night: #07090d;
  --ink: #12141a;
  --ink-2: #4a4f5a;
  --paper: #f3f0ea;
  --paper-2: #e8e3d9;
  --line: rgba(18, 20, 26, .14);
  --blue: #0066ff;
  --blue-ink: #0052cc;
  --white: #fff;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --serif: "Instrument Serif", "Times New Roman", serif;
  --sans: "Geist", system-ui, -apple-system, "Segoe UI", sans-serif;
  --pad: clamp(20px, 5vw, 72px);
  --max: 1280px;
  --radius: 10px;
  --header: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: var(--header); }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
::selection { background: var(--blue); color: #fff; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  padding: 10px 16px; background: var(--blue); color: #fff; border-radius: 8px;
  text-decoration: none; transform: translateY(-160%);
  transition: transform .2s var(--ease-out);
}
.skip:focus { transform: none; }

.wrap { width: 100%; max-width: calc(var(--max) + var(--pad) * 2); margin: 0 auto; padding: 0 var(--pad); }

h1, h2, h3 { margin: 0; font-weight: 400; text-wrap: balance; }
h1, h2 { font-family: var(--serif); letter-spacing: -0.01em; line-height: 1.02; }
h1 em, h2 em, .statement em { font-style: italic; }
h2 { font-size: clamp(2.3rem, 4.4vw, 4rem); }
p { margin: 0; text-wrap: pretty; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  font: 500 15px/1 var(--sans); text-decoration: none; letter-spacing: .005em;
  border-radius: 999px; border: 1px solid transparent; cursor: pointer;
  transition: transform .16s var(--ease-out), background-color .2s var(--ease-out), border-color .2s var(--ease-out), color .2s var(--ease-out);
}
.btn:active { transform: scale(0.97); }
.btn-solid { background: var(--blue); color: #fff; }
.btn-ghost { color: #fff; border-color: rgba(255,255,255,.45); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-1px); }
  .btn:active { transform: scale(0.97); }
  .btn-solid:hover { background: var(--blue-ink); }
  .btn-ghost:hover { border-color: #fff; background: rgba(255,255,255,.08); }
}

/* Header */
.top {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header);
  color: var(--ink); background: rgba(243,240,234,.92);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
  transition: background-color .3s var(--ease-out), color .3s var(--ease-out), border-color .3s var(--ease-out);
}
.top.on-dark { color: #fff; background: transparent; border-color: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.top-row { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-weight: 600; font-size: 17px; letter-spacing: -0.01em; min-height: 44px; }
.brand-mark { width: 34px; height: 34px; flex: none; }
.brand-word { display: flex; flex-direction: column; font-family: "Montserrat", var(--sans); line-height: 1; }
.brand-word b { font-weight: 800; font-size: 19px; letter-spacing: -0.01em; }
.brand-word span { font-weight: 300; font-size: 11.5px; letter-spacing: .42em; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 4px; }
.nav a:not(.btn) {
  position: relative; padding: 10px 12px; font-size: 15px; text-decoration: none; opacity: .86;
  transition: opacity .2s var(--ease-out);
}
.nav a:not(.btn)::after {
  content: ""; position: absolute; left: 12px; right: 12px; bottom: 6px; height: 1px; background: currentColor;
  transform: scaleX(0); transform-origin: left; transition: transform .25s var(--ease-out);
}
@media (hover: hover) and (pointer: fine) {
  .nav a:not(.btn):hover { opacity: 1; }
  .nav a:not(.btn):hover::after { transform: scaleX(1); }
}
.nav-cta { margin-left: 10px; min-height: 42px; padding: 0 18px; }
.menu-btn { display: none; }

/* Sequence */
.seq { position: relative; height: 1000vh; background: var(--night); color: #fff; }
.stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.frames { position: absolute; inset: 0; }
.frames img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; will-change: transform, opacity; backface-visibility: hidden;
}
.frames img:first-child { opacity: 1; }
.scrim {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to top, rgba(5,7,10,.82) 0%, rgba(5,7,10,.35) 34%, rgba(5,7,10,0) 58%),
    linear-gradient(to bottom, rgba(5,7,10,.5) 0%, rgba(5,7,10,0) 20%);
}
.stage-inner { position: relative; height: 100%; display: flex; align-items: flex-end; padding-bottom: clamp(40px, 9vh, 96px); }
.stage-inner > * { position: absolute; left: var(--pad); right: var(--pad); bottom: clamp(40px, 9vh, 96px); max-width: 760px; }

.intro h1 { font-size: clamp(2.6rem, 6vw, 5.6rem); line-height: .98; }
.intro .lead { margin-top: 22px; max-width: 54ch; font-size: clamp(16px, 1.3vw, 19px); color: rgba(255,255,255,.84); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

/* Hero entrance, once */
.intro > * { opacity: 0; transform: translateY(14px); }
.is-ready .intro > * { opacity: 1; transform: none; transition: opacity .9s var(--ease-out), transform .9s var(--ease-out); }
.is-ready .intro > :nth-child(2) { transition-delay: .12s; }
.is-ready .intro > :nth-child(3) { transition-delay: .22s; }

.chapter { opacity: 0; pointer-events: none; }
.ch-count { font: 500 13px/1 var(--sans); letter-spacing: .12em; color: rgba(255,255,255,.7); font-variant-numeric: tabular-nums; }
.ch-count span { color: #fff; }
.ch-name { margin-top: 14px; font-family: var(--serif); font-size: clamp(3rem, 7.5vw, 7rem); line-height: .95; letter-spacing: -0.01em; }
.ch-line { margin-top: 16px; max-width: 46ch; font-size: clamp(16px, 1.3vw, 19px); color: rgba(255,255,255,.86); min-height: 3.2em; }
.chapter.swap .ch-name, .chapter.swap .ch-line { animation: chIn .5s var(--ease-out) both; }
.chapter.swap .ch-line { animation-delay: .05s; }
@keyframes chIn { from { opacity: 0; transform: translateY(10px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

.outro { opacity: 0; pointer-events: none; display: flex; flex-direction: column; align-items: flex-start; gap: 22px; }
.outro-line { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4.6rem); line-height: 1; }
.outro.on { pointer-events: auto; }

.rail {
  position: absolute; right: var(--pad); top: 50%; transform: translateY(-50%);
  list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; justify-items: end;
}
.rail li { display: flex; align-items: center; gap: 12px; font-size: 12px; letter-spacing: .06em; color: rgba(255,255,255,.55); }
.rail li span { opacity: 0; transform: translateX(6px); transition: opacity .3s var(--ease-out), transform .3s var(--ease-out); }
.rail li::after { content: ""; width: 18px; height: 2px; border-radius: 2px; background: rgba(255,255,255,.35); transition: width .3s var(--ease-out), background-color .3s var(--ease-out); }
.rail li.done::after { background: rgba(255,255,255,.75); }
.rail li.on { color: #fff; }
.rail li.on span { opacity: 1; transform: none; }
.rail li.on::after { width: 36px; background: var(--blue); }
.bar { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.12); }
.bar span { display: block; height: 100%; width: 100%; background: var(--blue); transform-origin: left; transform: scaleX(0); }

/* Sections */
.sec { min-height: calc(100vh * var(--h, 1)); min-height: calc(100svh * var(--h, 1)); display: flex; align-items: center; padding: calc(var(--header) + 48px) 0 72px; }
.sec > .wrap { width: 100%; }
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.split-rev { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.split-text h2 { margin-bottom: 24px; }
.split-text > p { max-width: 52ch; color: var(--ink-2); }
.split-text .btn { margin-top: 32px; }

.ph { margin: 0; overflow: hidden; border-radius: var(--radius); background: var(--paper-2); }
.ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease-out); }
.ph-tall { aspect-ratio: 11 / 13; max-height: 78vh; justify-self: end; width: 100%; }
.ph-wide { aspect-ratio: 4 / 3; }
@media (hover: hover) and (pointer: fine) { .ph:hover img { transform: scale(1.025); } }

.facts { margin: 36px 0 0; display: grid; gap: 0; border-top: 1px solid var(--line); max-width: 560px; }
.facts div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.facts dt { font-size: 14px; color: var(--ink-2); }
.facts dd { margin: 0; font-size: 16px; }
.facts a { text-decoration-color: var(--blue); text-underline-offset: 3px; }

.sec-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; margin-bottom: 40px; }
.sec-head p { color: var(--ink-2); max-width: 34ch; }

/* Services list */
.servizi { background: var(--paper); }
.svc { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.svc a {
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) 28px; gap: 32px; align-items: center;
  padding: 22px 0; border-bottom: 1px solid var(--line); text-decoration: none;
  transition: padding-left .3s var(--ease-out), color .2s var(--ease-out);
}
.svc-name { font-family: var(--serif); font-size: clamp(1.6rem, 2.4vw, 2.2rem); line-height: 1.1; }
.svc-desc { color: var(--ink-2); font-size: 16px; }
.arr { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .25s var(--ease-out), color .2s; }
@media (hover: hover) and (pointer: fine) {
  .svc a:hover { padding-left: 10px; }
  .svc a:hover .svc-name, .svc a:hover .arr { color: var(--blue); }
  .svc a:hover .arr { transform: translateX(4px); }
}

/* Method */
.metodo { background: var(--night); color: #fff; }
.statement { font-family: var(--serif); font-size: clamp(2.4rem, 5vw, 4.8rem); line-height: 1.02; max-width: 18ch; }
.statement-sub { margin-top: 24px; max-width: 52ch; color: rgba(255,255,255,.72); font-size: clamp(16px, 1.3vw, 19px); }
.statement em { color: #7fb0ff; }
.steps { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; counter-reset: s; }
.steps li { padding-top: 22px; border-top: 1px solid rgba(255,255,255,.22); position: relative; }
.steps li::before { content: ""; position: absolute; top: -1px; left: 0; width: 40px; height: 1px; background: var(--blue); }
.steps h3 { font-size: 19px; font-weight: 500; }
.steps p { margin-top: 10px; color: rgba(255,255,255,.7); font-size: 15px; }

/* Shop */
.tags { list-style: none; margin: 28px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; max-width: 520px; }
.tags li { padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 14px; }

/* Client area */
.clienti { background: var(--paper-2); }
.clienti-grid { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); gap: clamp(32px, 6vw, 96px); align-items: center; }
.app {
  background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 2px rgba(18,20,26,.06), 0 24px 60px -20px rgba(18,20,26,.28);
  font-size: 14px;
}
.app-bar { display: flex; align-items: center; gap: 6px; padding: 12px 16px; border-bottom: 1px solid #ecebe7; color: #8a8d94; font-size: 12px; }
.app-bar i { width: 10px; height: 10px; border-radius: 50%; background: #e2e0db; }
.app-bar span { margin-left: 10px; }
.app-body { padding: 22px 24px 18px; }
.app-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.app-k { font-size: 12px; color: #8a8d94; }
.app-t { font-size: 18px; font-weight: 600; letter-spacing: -0.01em; }
.pill { padding: 5px 10px; border-radius: 999px; background: #e8f0ff; color: var(--blue-ink); font-size: 12px; font-weight: 500; white-space: nowrap; }
.app-tabs { display: flex; gap: 4px; margin: 18px 0 8px; overflow: hidden; }
.app-tabs span { padding: 6px 10px; border-radius: 7px; color: #6b6f78; font-size: 13px; white-space: nowrap; }
.app-tabs .on { background: var(--ink); color: #fff; }
.app-rows { list-style: none; margin: 0; padding: 0; }
.app-rows li { display: grid; grid-template-columns: 82px minmax(0, 1fr) 70px 104px; gap: 12px; align-items: center; padding: 11px 0; border-bottom: 1px solid #f0efeb; }
.r-room { color: #8a8d94; font-size: 13px; }
.r-mat { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.r-q { text-align: right; font-variant-numeric: tabular-nums; font-weight: 500; }
.app-rows button { font: 500 13px/1 var(--sans); padding: 8px 0; border-radius: 999px; border: 1px solid var(--blue); background: #fff; color: var(--blue); }
.app-rows button.done { background: var(--blue); color: #fff; }
.app-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; color: #6b6f78; font-size: 13px; }
.app-go { padding: 9px 14px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 500; }

/* Contact */
.form { display: grid; gap: 18px; background: #fff; padding: clamp(24px, 3vw, 40px); border-radius: 14px; box-shadow: 0 1px 2px rgba(18,20,26,.05); }
.field label { display: block; font-size: 14px; font-weight: 500; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; font: 16px/1.4 var(--sans); color: var(--ink); background: var(--paper);
  border: 1px solid transparent; border-radius: 8px; padding: 13px 14px; min-height: 48px; resize: vertical;
  transition: border-color .2s var(--ease-out), background-color .2s var(--ease-out);
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--blue); background: #fff; }
.field.bad input, .field.bad textarea { border-color: #c4321a; }
.err { color: #b02a14; font-size: 13px; margin-top: 6px; min-height: 0; }
.err:empty { display: none; }
.form .btn { justify-self: start; }
.form-note { font-size: 13px; color: var(--ink-2); }

/* Footer */
.foot { background: var(--night); color: rgba(255,255,255,.72); padding: 40px 0; font-size: 14px; }
.foot-row { display: grid; grid-template-columns: 1fr auto; gap: 16px 32px; align-items: center; }
.foot-brand { color: #fff; }
.foot nav { display: flex; flex-wrap: wrap; gap: 4px 18px; }
.foot nav a { text-decoration: none; padding: 10px 0; }
@media (hover: hover) and (pointer: fine) { .foot nav a:hover { color: #fff; } }
.foot-note { grid-column: 1 / -1; font-size: 12px; color: rgba(255,255,255,.45); }

/* Team */
.people { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 24px 20px; }
.person-ph { aspect-ratio: 4 / 5; margin-bottom: 14px; }
.person-name { font-family: var(--serif); font-size: 1.35rem; line-height: 1.15; }
.person-role { margin-top: 4px; font-size: 14px; color: var(--ink-2); }

/* Responsive */
@media (max-width: 1024px) {
  .nav a:not(.btn) { padding: 10px 8px; font-size: 14px; }
  .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .clienti-grid, .split, .split-rev { grid-template-columns: 1fr; }
  .split-rev .ph { order: 2; }
  .ph-tall { aspect-ratio: 16 / 10; max-height: none; }
  .sec { min-height: auto; }
}
@media (max-width: 900px) {
  .menu-btn {
    display: inline-grid; place-content: center; gap: 6px; width: 48px; height: 48px; margin-right: -12px;
    background: none; border: 0; color: inherit; cursor: pointer;
  }
  .menu-btn span:not(.sr) { display: block; width: 22px; height: 2px; background: currentColor; transition: transform .25s var(--ease-out); }
  .menu-btn[aria-expanded="true"] span:nth-child(1) { transform: translateY(4px) rotate(45deg); }
  .menu-btn[aria-expanded="true"] span:nth-child(2) { transform: translateY(-4px) rotate(-45deg); }
  .nav {
    position: fixed; inset: var(--header) 0 0; flex-direction: column; align-items: stretch; gap: 0;
    padding: 24px var(--pad); background: var(--paper); color: var(--ink);
    opacity: 0; visibility: hidden; transform: translateY(-8px);
    transition: opacity .22s var(--ease-out), transform .22s var(--ease-out), visibility .22s;
  }
  .nav.open { opacity: 1; visibility: visible; transform: none; }
  .nav a:not(.btn) { font-family: var(--serif); font-size: 2rem; padding: 12px 0; border-bottom: 1px solid var(--line); opacity: 1; }
  .nav a:not(.btn)::after { display: none; }
  .nav-cta { margin: 24px 0 0; }
  .top.menu-open { color: var(--ink); background: var(--paper); }
  .rail { display: none; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  .sec { padding: calc(var(--header) + 32px) 0 56px; }
  .actions .btn, .split-text .btn, .form .btn, .outro .btn { width: 100%; }
  .sec-head { display: block; }
  .sec-head p { margin-top: 12px; }
  .svc a { grid-template-columns: 1fr 24px; gap: 6px 16px; padding: 18px 0; }
  .svc-desc { grid-column: 1; }
  .arr { grid-row: 1 / span 2; grid-column: 2; }
  .steps { grid-template-columns: 1fr; gap: 24px; margin-top: 44px; }
  .people { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .person-name { font-size: 1.15rem; }
  .facts div { grid-template-columns: 90px 1fr; }
  .app-body { padding: 18px 16px 14px; }
  .app-rows li { grid-template-columns: minmax(0, 1fr) 64px 92px; }
  .r-room { display: none; }
  .foot-row { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
  .intro > * { opacity: 1; transform: none; }
}