:root {
  color-scheme: dark;
  --bg: #141715;
  --soft-bg: #1c201d;
  --deep-bg: #101311;
  --fg: #f3f4eb;
  --muted: #b9c3b8;
  --line: #3b453d;
  --accent: #dff973;
  --accent-ink: #192012;
  --display: Geist, Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, monospace;
  --shell: 1280px;
  --edge: clamp(18px, 4.5vw, 60px);
  --section-gap: clamp(70px, 10vw, 144px);
  --entry-y: 22px;
  --entry-x: 0px;
  --entry-time: 550ms;
  --parallax: 36px;
  font-family: var(--display);
  background: var(--bg);
  color: var(--fg);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure { margin: 0; }
img { display: block; width: 100%; }
button, select { font: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
[id] { scroll-margin-top: 22px; }
.shell { width: min(var(--shell), calc(100% - 2 * var(--edge))); margin-inline: auto; }

.sr-only, .skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.skip-link:focus { position: absolute; z-index: 10; padding: 12px; background: var(--accent); color: var(--accent-ink); }

.site-header { position: relative; z-index: 1; }
.header-content {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 75px;
  gap: clamp(12px, 3vw, 42px);
  border-bottom: 1px solid var(--line);
}
.wordmark { justify-self: start; display: block; width: 104px; }
.wordmark img { height: auto; }
.site-nav, .header-actions { display: flex; align-items: center; gap: clamp(12px, 2.5vw, 32px); }
.site-nav a, .header-contact { min-height: 44px; display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 650; white-space: nowrap; }
button.header-contact, button.text-link { padding: 0; border: 0; background: none; cursor: pointer; }
.site-nav a:hover, .header-contact:hover, .text-link:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); }
.header-actions { justify-content: flex-end; }
.language-switch {
  display: inline-grid;
  min-width: 44px;
  min-height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  color: var(--muted);
  font: 500 12px/1 var(--mono);
}
.language-switch:hover, .language-switch:focus-visible { border-color: var(--accent); color: var(--accent); }

.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  align-items: center;
  min-height: clamp(540px, 47vw, 680px);
  padding-block: clamp(44px, 4.5vw, 72px);
}
.hero-visual { position: absolute; inset: 22px 0 23px 33%; }
.hero-image-frame { position: absolute; z-index: -1; inset: 0; isolation: isolate; overflow: hidden; border: 1px solid var(--line); background: var(--soft-bg); }
.hero-slide { position: absolute; inset: 0; opacity: 0; }
.hero-slide.is-current { opacity: 1; }
.hero-slide img { width: 100%; height: 100%; object-fit: cover; object-position: var(--hero-image-position, 64% 49%); }
.hero-slide:nth-child(2) { --hero-image-position: 58% 45%; }
.hero-slide:nth-child(3) { --hero-image-position: 54% 60%; }
.hero-slide:nth-child(4) { --hero-image-position: 52% 48%; }
.hero-image-frame::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  background: linear-gradient(90deg, var(--bg) 0%, #141715de 16%, #141715a3 42%, #14171530 70%, transparent 95%), linear-gradient(0deg, #0d110dc1, transparent 38%);
  pointer-events: none;
}
.hero-visual figcaption { position: absolute; z-index: 2; inset: auto 13px 13px auto; padding: 8px 10px; max-width: calc(100% - 26px); background: #101411ee; color: #f3f4eb; font: 500 clamp(10px, 1vw, 12px)/1.35 var(--mono); }
.hero-visual:has(.hero-controls:not([hidden])) figcaption { right: 158px; bottom: 20px; max-width: calc(100% - 171px); }
.hero-controls { position: absolute; z-index: 3; right: 13px; bottom: 13px; display: flex; gap: 3px; }
.hero-controls button { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid #d5ddd064; background: #101411ee; color: #f3f4eb; cursor: pointer; font-size: 20px; line-height: 1; }
.hero-controls button:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.hero-controls [data-hero-toggle] { font-size: 16px; }
.hero-copy { position: relative; z-index: 1; max-width: 850px; }
.eyebrow { color: var(--accent); font: 500 clamp(11px, 1.1vw, 13px)/1.45 var(--mono); letter-spacing: .055em; text-transform: uppercase; }
.hero h1 { max-width: 8.5em; margin-top: 17px; font-size: clamp(60px, 8.2vw, 126px); font-weight: 820; letter-spacing: -.067em; line-height: .92; text-wrap: balance; }
.hero h1 em { color: var(--accent); font-style: normal; }
.hero-lead { max-width: 39ch; margin-top: 24px; color: var(--muted); font-size: clamp(16px, 1.55vw, 21px); line-height: 1.53; }
.hero-paths { display: flex; align-items: stretch; flex-wrap: wrap; gap: 9px; margin-top: 23px; }
.action {
  min-height: 52px;
  min-width: 138px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 16px;
  border: 1px solid var(--accent);
  font-size: 15px;
  font-weight: 790;
  white-space: nowrap;
}
.action-filled { color: var(--accent-ink); background: var(--accent); }
button.action { cursor: pointer; }
button.action:disabled { opacity: .66; cursor: wait; }
.action-filled:hover { background: color-mix(in srgb, var(--accent), white 20%); }
.action-outline { color: var(--accent); background: var(--bg); }
.action-outline:hover { color: var(--accent-ink); background: var(--accent); }

.offer { padding-top: clamp(36px, 6vw, 84px); padding-bottom: var(--section-gap); }
.section-heading h2, .contact h2 { margin-top: 8px; font-size: clamp(45px, 6.2vw, 88px); line-height: .96; letter-spacing: -.069em; font-weight: 820; text-wrap: balance; }
.offer-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 26px; }
.offer-card { background: var(--soft-bg); border: 1px solid var(--line); min-width: 0; }
.offer-card:target { border-color: var(--accent); }
.offer-photo { aspect-ratio: 2.42; overflow: hidden; background: var(--deep-bg); }
.offer-photo img { height: 100%; object-fit: cover; }
.offer-photo-fairs img { object-position: center 49%; }
.offer-photo-showrooms img { object-position: center 59%; }
.offer-body { padding: clamp(17px, 3vw, 33px); }
.offer-body h3 { font-size: clamp(34px, 4vw, 59px); line-height: .96; letter-spacing: -.075em; font-weight: 830; }
.offer-body p { max-width: 47ch; margin-top: 11px; color: var(--muted); font-size: 16px; line-height: 1.5; }
.offer-list { margin: 17px 0 10px; padding: 0; list-style: none; }
.offer-list li { position: relative; padding: 8px 0 8px 17px; border-top: 1px solid var(--line); font-size: 14px; }
.offer-list li::before { content: ""; position: absolute; width: 5px; height: 5px; top: 14px; left: 1px; background: var(--accent); transform: rotate(45deg); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 11px; color: var(--fg); font-weight: 710; font-size: 14px; }
.text-link span { color: var(--accent); }

.work { background: var(--deep-bg); padding: clamp(44px, 7vw, 90px) 0; border-block: 1px solid var(--line); }
.work-heading { display: flex; justify-content: space-between; align-items: end; gap: 23px; margin-bottom: 24px; }
.work-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 9px 16px; }
.work-actions .action { min-height: 47px; min-width: 0; font-size: 13px; }
.carousel-controls { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
.carousel-count { margin-right: 7px; font: 500 12px/1.2 var(--mono); color: var(--muted); white-space: nowrap; }
.carousel-controls button { width: 47px; height: 47px; border: 1px solid var(--line); background: var(--soft-bg); color: var(--fg); cursor: pointer; font-size: 24px; }
.carousel-controls button:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.carousel-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.carousel-track::-webkit-scrollbar { display: none; }
.carousel-track:focus-visible { outline-offset: 6px; }
.project-slide {
  flex: 0 0 100%;
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
  align-items: stretch;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  border: 1px solid var(--line);
  background: var(--soft-bg);
}
.project-media { overflow: hidden; align-self: stretch; min-height: clamp(290px, 34vw, 470px); }
.project-media img { height: 100%; object-fit: cover; }
.project-copy { align-self: center; padding: clamp(19px, 3.5vw, 57px); }
.project-copy h3 { overflow-wrap: break-word; margin-top: 10px; font-size: clamp(28px, 4.1vw, 58px); letter-spacing: -.074em; line-height: .97; text-wrap: balance; }
.project-copy > p:not(.eyebrow) { margin-top: 15px; font-size: clamp(14px, 1.35vw, 17px); line-height: 1.54; color: var(--muted); }
.project-link { margin-top: 16px; color: var(--accent); text-decoration: underline; text-underline-offset: 5px; }
.carousel-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 3px; margin-top: 9px; }
.carousel-dots button { position: relative; display: grid; place-items: center; width: 43px; height: 44px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.carousel-dots button::after { content: ""; width: 26px; height: 3px; background: var(--line); }
.carousel-dots button:hover::after, .carousel-dots button[aria-current="true"]::after { background: var(--accent); }

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(22px, 5vw, 70px);
  padding-top: var(--section-gap);
}
.about h2 { margin-top: 8px; font-size: clamp(37px, 5.1vw, 72px); line-height: .98; letter-spacing: -.066em; font-weight: 820; }
.about-copy p:not(.eyebrow) { max-width: 54ch; margin-top: 16px; color: var(--muted); font-size: clamp(15px, 1.4vw, 17px); line-height: 1.56; }
.about-copy .text-link { margin-top: 12px; }
.about-photo { min-width: 0; border: 1px solid var(--line); background: var(--soft-bg); }
.about-photo img { height: auto; aspect-ratio: 4 / 3; object-fit: cover; object-position: 50% 56%; }
.about-photo figcaption { padding: 9px 13px; color: var(--muted); font: 400 11px/1.45 var(--mono); }

.contact { padding: var(--section-gap) 0 clamp(32px, 5vw, 64px); }
.contact-panel { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: clamp(22px, 4vw, 54px); border: 1px solid var(--line); background: var(--soft-bg); }
.contact h2 { font-size: clamp(39px, 5.7vw, 78px); }
.contact-panel p:not(.eyebrow) { max-width: 61ch; margin-top: 13px; color: var(--muted); font-size: clamp(14px, 1.4vw, 17px); line-height: 1.5; }
.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 13px; min-height: 68px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }
.site-footer a { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; }

body:has(.contact-dialog[open]) { overflow: hidden; }
.contact-dialog { width: min(590px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: clamp(19px, 4vw, 34px); border: 1px solid var(--line); background: var(--soft-bg); color: var(--fg); overflow-y: auto; }
.contact-dialog::backdrop { background: #060907c8; }
.contact-dialog-header { display: flex; align-items: start; justify-content: space-between; gap: 15px; margin-bottom: 19px; }
.contact-dialog h2 { font-size: clamp(28px, 6vw, 39px); letter-spacing: -.065em; line-height: 1; }
.dialog-close { flex: 0 0 42px; width: 42px; height: 42px; border: 1px solid var(--line); background: var(--deep-bg); color: inherit; cursor: pointer; font-size: 26px; line-height: 1; }
.contact-form { display: grid; gap: 12px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.contact-form label { display: grid; gap: 5px; min-width: 0; font-size: 14px; font-weight: 670; }
.contact-form small { color: var(--muted); font-weight: 400; }
.contact-form :is(input, select, textarea) { width: 100%; min-width: 0; padding: 9px 10px; border: 1px solid var(--line); border-radius: 0; background: var(--deep-bg); color: var(--fg); font: inherit; }
.contact-form textarea { min-height: 100px; resize: vertical; }
.contact-form input[type="file"] { font-weight: 400; }
.contact-form input::file-selector-button { padding: 6px; margin-right: 7px; border: 0; background: var(--fg); color: var(--bg); cursor: pointer; }
.form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 14px; margin-top: 4px; }
.form-status { color: var(--muted); font-size: 14px; }
.form-status[data-state="success"] { color: var(--accent); }
.form-status[data-state="error"] { color: #ffb8ae; }
@media (max-width: 480px) { .form-grid { grid-template-columns: 1fr; } }

/* Scenografia turns the photograph into a wide opening shot. */
:root[data-direction="scenografia"] {
  --bg: #0d151b;
  --soft-bg: #14202a;
  --deep-bg: #0a1218;
  --fg: #ebf5f6;
  --muted: #b5c8d3;
  --line: #384d5a;
  --accent: #e1fa78;
  --accent-ink: #16200a;
  --entry-y: 15px;
  --entry-time: 775ms;
  --parallax: 86px;
}
[data-direction="scenografia"] .hero { min-height: clamp(570px, 53vw, 735px); }
[data-direction="scenografia"] .hero-visual { inset-inline: 0; }
[data-direction="scenografia"] .hero-slide:first-child { --hero-image-position: 50% 47%; }
[data-direction="scenografia"] .hero-image-frame::after { background: linear-gradient(90deg, #091219f7 1%, #091219ce 39%, #09121980 56%, #09121920 83%), linear-gradient(0deg, #091219d9, transparent 42%); }
[data-direction="scenografia"] .hero-copy { padding: 26px clamp(24px, 4vw, 62px); }
[data-direction="scenografia"] .hero h1 { font-size: clamp(56px, 8vw, 120px); }
[data-direction="scenografia"] .offer-grid { gap: clamp(14px, 3vw, 40px); }
[data-direction="scenografia"] .offer-photo { aspect-ratio: 2.04; }
[data-direction="scenografia"] .project-slide { grid-template-columns: minmax(0, 1.95fr) minmax(0, 1fr); }
[data-direction="scenografia"] .project-media { min-height: clamp(330px, 41vw, 520px); }

@media (max-width: 850px) {
  .header-content { grid-template-columns: 1fr auto; gap: 11px; }
  .site-nav { justify-self: center; grid-row: 2; grid-column: 1 / -1; }
  .header-content { padding-top: 10px; }
}

@media (max-width: 650px) {
  :root { --section-gap: 62px; }
  .site-nav { justify-self: start; flex-wrap: wrap; gap: 0 19px; }
  .site-nav a, .header-contact { font-size: 13px; }
  .header-actions { gap: 8px; }
  .wordmark { width: 84px; }
  .hero, [data-direction] .hero { display: flex; flex-direction: column; align-items: stretch; gap: 21px; padding-block: 35px 18px; min-height: 0; }
  .hero-copy, [data-direction] .hero-copy { padding: 0; }
  .hero h1, [data-direction] .hero h1 { font-size: clamp(50px, 11vw, 73px); max-width: 8.5em; }
  .hero-lead { margin-top: 16px; }
  .hero-paths { margin-top: 16px; }
  .hero-paths .action { flex: 1 1 105px; min-width: 0; }
  .hero-visual, [data-direction] .hero-visual { position: relative; inset: auto; aspect-ratio: 1.73; }
  .hero-image-frame::after, [data-direction] .hero-image-frame::after { background: linear-gradient(0deg, #0d110dc5, transparent 44%); }
  .hero-visual figcaption { inset: auto 7px 7px auto; padding: 5px; }
  .hero-controls { right: 7px; bottom: 7px; }
  .hero-visual:has(.hero-controls:not([hidden])) figcaption { right: 7px; bottom: 55px; max-width: calc(100% - 14px); }
  .offer { padding-top: 36px; }
  .offer-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 19px; }
  .offer-photo { aspect-ratio: 2.6; }
  .work-heading { flex-wrap: wrap; align-items: start; gap: 13px; margin-bottom: 15px; }
  .work-actions { width: 100%; justify-content: space-between; }
  .carousel-controls { margin-left: auto; }
  .project-slide, [data-direction] .project-slide { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .project-media, [data-direction] .project-media { min-height: 0; height: clamp(170px, 53vw, 320px); }
  .project-copy, [data-direction] .project-copy { order: 0; align-self: start; }
  .project-copy > p:not(.eyebrow) { margin-top: 11px; }
  .about { grid-template-columns: 1fr; }
  .contact-panel { flex-direction: column; align-items: start; }
}

@media (max-width: 370px) {
  .header-actions { gap: 5px; }
  .header-contact span { display: none; }
  .hero-paths .action { padding-inline: 10px; gap: 8px; }
  .carousel-dots button { width: 40px; }
}

@media (prefers-reduced-motion: no-preference) {
  .hero-slide { transform: translateX(9%); transition: opacity 540ms ease, transform 700ms cubic-bezier(.22,.75,.24,1); }
  [data-hero-direction="previous"] .hero-slide { transform: translateX(-9%); }
  .hero-slide.is-current, [data-hero-direction] .hero-slide.is-current { transform: translateX(0); }
  .has-reveals [data-reveal] {
    transition: opacity var(--entry-time) ease, transform var(--entry-time) cubic-bezier(.2,.76,.28,1);
  }
  .has-reveals [data-reveal]:not(.is-revealed):not(:focus-within) {
    opacity: 0;
    transform: translate(var(--entry-x), var(--entry-y));
  }
  .has-reveals [data-reveal][data-step="1"].is-revealed { transition-delay: 85ms; }
  .has-reveals [data-reveal]:focus-within { transition-duration: 0s; transition-delay: 0s; }
  .hero-image-frame img { transform: scale(1.04) translateY(calc(var(--hero-scroll, 0) * var(--parallax))); }
}

@media (prefers-reduced-motion: no-preference) and (max-width: 650px) {
  .hero-image-frame img { transform: none; }
}
