/* Tema "Officina": scuro, titoli in Oswald, animazioni stile "Scorrimento". Caricato dopo styles.css. */

@font-face {
  font-family: "Oswald";
  font-style: normal;
  font-weight: 500 700;
  font-display: swap;
  src: url("../fonts/oswald.woff2") format("woff2");
}

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("../fonts/inter.woff2") format("woff2");
}

:root {
  --bg: #16191b;
  --surface: #1c2023;
  --surface-soft: #1c2023;
  --text: #e9e6e1;
  --muted: #aaa59d;
  --line: #2f3539;
  --brand: #a64128;
  --brand-dark: #0f1112;
  --accent: #d7a84f;
  --glass: #1c2023;
  --radius: 2px;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 10px 28px rgba(0, 0, 0, 0.35);
  --shadow-hover: 0 22px 50px rgba(0, 0, 0, 0.5);
  --display: "Oswald", "Arial Narrow", Arial, sans-serif;
  --sweep: cubic-bezier(0.7, 0, 0.3, 1);
}

body {
  font-family: "Inter", Arial, Helvetica, sans-serif;
  color: var(--text);
  background: var(--bg);
}

h1,
h2,
h3,
.brand-name {
  font-family: var(--display);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.01em;
}

h1 {
  line-height: 1;
}

h2 {
  line-height: 1.05;
}

h1 span:not([data-user-name]),
h2 span {
  color: var(--brand);
}

.eyebrow {
  display: none;
}

.page-preloader {
  background: var(--bg);
}

.skip-link {
  background: var(--brand);
}

:focus-visible {
  outline-color: rgba(215, 168, 79, 0.75);
}

/* ---------- Header e menu ---------- */

.site-header {
  background: rgba(15, 17, 18, 0.95);
  border-bottom: 1px solid #23282b;
  box-shadow: none;
  backdrop-filter: none;
}

.brand-logo {
  filter: none;
}

.main-nav {
  gap: 2px;
}

.main-nav a {
  color: #c9c4bc;
  background: transparent;
  border-radius: 0;
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
  color: #fff;
  background: transparent;
  transform: none;
}

.main-nav a::after {
  left: 12px;
  right: 12px;
  bottom: 4px;
  border-radius: 0;
  opacity: 1;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 300ms ease;
}

.main-nav a:hover::after,
.main-nav a[aria-current="page"]::after {
  transform: scaleX(1);
}

.main-nav a[href="preventivo.html"],
.main-nav .nav-cta {
  margin-left: 8px;
  overflow: hidden;
  isolation: isolate;
  box-shadow: none;
  transition: color 300ms ease, border-color 300ms ease;
}

.main-nav a[href="preventivo.html"]::after,
.main-nav .nav-cta::after {
  display: none;
}

.main-nav a[href="preventivo.html"]::before,
.main-nav .nav-cta::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  transform: translateX(-101%);
  transition: transform 380ms var(--sweep);
}

.main-nav a[href="preventivo.html"] {
  color: #fff;
  background: var(--brand);
}

.main-nav a[href="preventivo.html"]::before {
  background: #e9e6e1;
}

.main-nav a[href="preventivo.html"]:hover,
.main-nav a[href="preventivo.html"][aria-current="page"] {
  color: #16191b;
  background: var(--brand);
}

.main-nav .nav-cta {
  color: #e9e6e1;
  background: transparent;
  border: 1px solid rgba(233, 230, 225, 0.45);
}

.main-nav .nav-cta::before {
  background: var(--brand);
}

.main-nav .nav-cta:hover,
.main-nav .nav-cta[aria-current="page"] {
  color: #fff;
  background: transparent;
  border-color: var(--brand);
}

.main-nav a[href="preventivo.html"]:hover::before,
.main-nav a[href="preventivo.html"][aria-current="page"]::before,
.main-nav .nav-cta:hover::before,
.main-nav .nav-cta[aria-current="page"]::before {
  transform: none;
}

.nav-contacts {
  display: none;
}

/* ---------- Bottoni ---------- */

.button {
  position: relative;
  min-height: 50px;
  padding: 14px 26px;
  overflow: hidden;
  isolation: isolate;
  border-radius: 0;
  box-shadow: none;
  font-family: var(--display);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  transition: color 300ms ease, border-color 300ms ease, transform 150ms ease;
}

.button::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: #e9e6e1;
  transform: translateX(-101%);
  transition: transform 380ms var(--sweep);
}

.button:hover {
  transform: none;
  box-shadow: none;
}

.button:hover::before {
  transform: none;
}

.button:active {
  transform: scale(0.97);
  box-shadow: none;
}

.button.primary,
.button.primary:hover {
  border: 1px solid var(--brand);
  background: var(--brand);
}

.button.primary:hover {
  color: #16191b;
}

.button.secondary {
  border: 1px solid rgba(233, 230, 225, 0.7);
  color: #e9e6e1;
  background: transparent;
  backdrop-filter: none;
}

.button.secondary::before {
  background: var(--brand);
}

.button.secondary:hover {
  border-color: var(--brand);
  color: #fff;
}

.button.light,
.button.light:hover {
  border: 1px solid #16191b;
  background: #16191b;
  color: #fff;
}

.button.light:hover {
  color: #16191b;
}

.button.danger {
  border: 1px solid #6b2c1e;
  background: #2a1a17;
  color: #f0b4a3;
}

.button.danger::before {
  background: var(--brand);
}

.button.danger:hover {
  background: #2a1a17;
  color: #fff;
}

/* ---------- Home: hero a tutto schermo ---------- */

.hero {
  position: relative;
  display: flex;
  align-items: flex-end;
  min-height: min(86vh, 820px);
  padding: 0;
  overflow: hidden;
  background: #0f1112;
}

.hero .hero-grid {
  display: block;
}

.hero-gallery {
  position: absolute;
  inset: 0;
  z-index: 0;
  aspect-ratio: auto;
  min-height: 0;
  border-radius: 0;
  box-shadow: none;
  animation: none;
}

.hero-gallery::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(14, 16, 17, 0.93) 0%, rgba(14, 16, 17, 0.62) 52%, rgba(14, 16, 17, 0.18) 100%);
}

.hero-visual:hover {
  transform: none;
  box-shadow: none;
}

.hero-visual:hover .hero-photo {
  transform: none;
  filter: none;
}

.hero-photo {
  min-height: 0;
}

.hero-copy {
  position: relative;
  z-index: 2;
  max-width: 780px;
  padding: 120px 0 96px;
  pointer-events: none;
}

.hero-copy a,
.hero-copy button {
  pointer-events: auto;
}

.hero h1 {
  max-width: 780px;
  color: #f1eee9;
  font-size: clamp(2.8rem, 6.2vw, 5.4rem);
  line-height: 0.98;
}

.hero-text {
  color: #c9c4bc;
}

.hero-trust {
  color: #c9c4bc;
}

.hero-trust svg {
  color: #e9e6e1;
  background: rgba(166, 65, 40, 0.35);
}

.hero-gallery-arrow {
  width: 48px;
  height: 48px;
  border-radius: 0;
  background: rgba(15, 17, 18, 0.65);
}

.hero-gallery-prev,
.hero-gallery-next,
.hero-gallery-prev:hover,
.hero-gallery-next:hover {
  top: auto;
  left: auto;
  bottom: 40px;
  transform: none;
}

.hero-gallery-prev {
  right: 82px;
}

.hero-gallery-next {
  right: 26px;
}

.hero-gallery-arrow:hover {
  background: var(--brand);
}

.hero-gallery-dots {
  left: auto;
  right: 150px;
  bottom: 62px;
  justify-content: flex-end;
}

.hero-gallery-dot {
  width: 26px;
  height: 4px;
  border-radius: 0;
  background: rgba(255, 255, 255, 0.35);
}

.hero-gallery-dot.is-active {
  background: var(--brand);
  transform: none;
}

/* ---------- Home: numeri, passi, ultimi lavori ---------- */

.stats-band {
  background: var(--brand);
}

.stats-band .stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
}

.stats div {
  padding: 34px 32px;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.stats div:last-child {
  border-right: 0;
}

.stats div:hover {
  transform: none;
  box-shadow: none;
}

.stats strong {
  color: #fff;
  font-family: var(--display);
  font-size: 3.4rem;
  font-weight: 700;
  line-height: 1;
}

.stats span {
  display: block;
  margin-top: 8px;
  color: #fbe9e3;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.home-steps .split {
  grid-template-columns: 1fr;
  gap: 34px;
}

.steps {
  counter-reset: step;
}

.home-steps .steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.steps li {
  counter-increment: step;
  padding: 22px 0 0;
  border-left: 0;
  border-top: 3px solid var(--brand);
  background: transparent;
  backdrop-filter: none;
}

.steps li:hover {
  transform: none;
  background: transparent;
  box-shadow: none;
}

.steps li::before {
  content: "0" counter(step);
  color: #3a4045;
  font-family: var(--display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
}

.steps li .card-icon {
  display: none;
}

.steps strong {
  font-family: var(--display);
  font-size: 1.4rem;
  font-weight: 700;
  text-transform: uppercase;
}

.home-works-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 26px;
}

.text-link {
  color: var(--accent);
  font-family: var(--display);
  font-size: 0.92rem;
  letter-spacing: 0.14em;
  text-decoration: none;
  text-transform: uppercase;
}

.text-link:hover {
  color: #fff;
}

.work-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 14px;
  height: 440px;
}

.work-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: #1c2023;
  color: #fff;
  text-decoration: none;
}

.work-card img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: transform 600ms ease;
}

.work-card span {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 1;
  padding: 9px 14px;
  background: #16191b;
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.work-card::after {
  content: "Vedi il lavoro \2192";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 11px 14px;
  background: var(--brand);
  font-family: var(--display);
  font-size: 0.82rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transform: translateY(100%);
  transition: transform 350ms var(--sweep);
}

.work-card:hover::after,
.work-card:focus-visible::after {
  transform: none;
}

.work-card:hover img {
  transform: scale(1.04);
}

/* ---------- Sezioni generiche ---------- */

.section {
  padding: 84px 0;
}

.section.muted {
  background: #1c2023;
}

.section-heading {
  margin-bottom: 30px;
}

.page-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  min-height: 400px;
  padding: 140px 0 64px;
  border-bottom: 0;
  background-color: #0f1112;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  backdrop-filter: none;
}

.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(90deg, rgba(14, 16, 17, 0.94) 0%, rgba(14, 16, 17, 0.72) 55%, rgba(14, 16, 17, 0.35) 100%);
}

.page-hero .narrow {
  max-width: var(--container);
}

.page-hero h1 {
  max-width: 920px;
  font-size: clamp(2.3rem, 5vw, 4.1rem);
}

.page-hero p {
  max-width: 680px;
  color: #c9c4bc;
}

.page-hero p a {
  color: #fff;
}

.split {
  gap: 70px;
}

.year {
  display: block;
  margin-bottom: 10px;
  color: var(--brand);
  font-family: var(--display);
  font-size: clamp(3.4rem, 6vw, 5rem);
  font-weight: 700;
  line-height: 1;
}

.text-block p {
  color: #bdb8b0;
  font-size: 1.05rem;
}

.service-grid {
  gap: 1px;
  border: 1px solid var(--line);
  background: var(--line);
}

.service-card,
.form-card,
.contact-card,
.info-stack article {
  border: 1px solid #2a2f33;
  border-radius: 0;
  background: #1c2023;
  box-shadow: none;
  backdrop-filter: none;
}

.service-card {
  position: relative;
  padding: 36px 32px;
  border: 0;
  background: var(--bg);
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--brand);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 350ms var(--sweep);
}

.service-card:hover,
.contact-card:hover,
.side-note:hover,
.info-stack article:hover {
  transform: none;
  box-shadow: none;
}

.service-card:hover {
  border-color: transparent;
  background: #1c2023;
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-card h3 {
  margin-bottom: 10px;
  font-size: 1.45rem;
}

.service-card a {
  color: var(--accent);
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-decoration: none;
  text-transform: uppercase;
}

.service-card a:hover {
  color: #fff;
}

.card-icon {
  width: auto;
  height: auto;
  justify-content: start;
  border-radius: 0;
  background: transparent;
  color: var(--brand);
}

.card-icon svg {
  width: 42px;
  height: 42px;
  stroke-width: 2.2;
}

.side-note {
  border: 0;
  border-radius: 0;
  background: var(--brand);
  color: #fff;
  box-shadow: none;
  backdrop-filter: none;
}

.side-note h2,
.side-note strong,
.side-note a {
  color: #fff;
}

.side-note p,
.side-note .form-note {
  color: #fbe9e3;
}

.side-note:hover {
  border-color: transparent;
  background: var(--brand);
}

.company-quote {
  border-left: 5px solid var(--brand);
  background: #0f1112;
  box-shadow: none;
}

.company-quote p {
  font-family: var(--display);
  font-weight: 500;
  text-transform: uppercase;
}

.company-quote cite {
  color: var(--accent);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.faq-list {
  max-width: 900px;
  gap: 0;
}

.faq-item {
  padding: 22px 0;
  border-left: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  backdrop-filter: none;
}

.faq-item:hover {
  background: transparent;
  box-shadow: none;
}

.faq-item summary {
  color: var(--text);
  font-family: var(--display);
  font-size: 1.15rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.faq-item summary::after {
  font-size: 1.5rem;
  line-height: 1;
}

.faq-draft-note {
  color: #8f8a83;
}

.cta-band {
  border-radius: 0;
  background: var(--brand);
  box-shadow: none;
}

.cta-band p {
  color: #fbe9e3;
}

.policy-list li {
  border-bottom-color: var(--line);
}

/* ---------- Lavori ---------- */

.work-gallery-main {
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  height: 620px;
  background: var(--surface);
}

.work-gallery-photo {
  position: relative;
  overflow: hidden;
  background: var(--brand-dark);
  touch-action: pan-y;
}

.work-gallery-photo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: opacity 250ms ease, transform 250ms ease;
}

.work-gallery-photo img.is-fading {
  opacity: 0;
}

.work-gallery-photo img.no-transition {
  transition: none;
}

.work-gallery-photos {
  position: absolute;
  top: 14px;
  left: 14px;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  background: rgba(15, 17, 18, 0.85);
  font-family: var(--display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-gallery-photos[hidden] {
  display: none;
}

.work-gallery-photos span {
  padding: 0 8px;
}

.work-gallery-photos button {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  transition: background 200ms ease;
}

.work-gallery-photos button:hover {
  background: var(--brand);
}

.work-gallery-badge {
  position: absolute;
  right: 4px;
  bottom: 4px;
  padding: 3px 5px;
  background: var(--brand);
  color: #fff;
  font-family: var(--display);
  font-size: 0.62rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.work-gallery-info {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
  padding: 48px;
  border-left: 4px solid var(--brand);
}

.work-gallery-copy {
  transition: opacity 250ms ease;
}

.work-gallery-copy.is-fading {
  opacity: 0;
}

.work-gallery-count {
  margin: 0;
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.work-gallery-count b {
  font-size: 1.75rem;
  color: var(--brand);
}

.work-gallery-info h2 {
  margin: 0 0 14px;
  font-size: clamp(1.9rem, 3.2vw, 2.6rem);
}

.work-gallery-info p {
  color: var(--muted);
  font-size: 1.05rem;
}

.work-gallery-nav {
  display: flex;
  gap: 10px;
}

.work-gallery-nav button {
  width: 52px;
  height: 52px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--text);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease;
}

.work-gallery-nav button:last-child,
.work-gallery-nav button:hover {
  border-color: var(--brand);
  background: var(--brand);
}

.work-gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  overflow-x: auto;
  scrollbar-width: none;
}

.work-gallery-thumbs::-webkit-scrollbar {
  display: none;
}

.work-gallery-thumbs button {
  position: relative;
  flex: none;
  width: 96px;
  height: 72px;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  opacity: 0.45;
  transition: opacity 200ms ease;
}

.work-gallery-thumbs button:hover,
.work-gallery-thumbs button.is-active {
  opacity: 1;
}

.work-gallery-thumbs button.is-active {
  outline: 3px solid var(--brand);
  outline-offset: -3px;
}

.work-gallery-thumbs img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.work-video-wrap {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.work-video {
  max-width: none;
  border-radius: 0;
}

/* ---------- Moduli ---------- */

label {
  color: #c9c4bc;
  font-family: var(--display);
  font-size: 0.86rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.checkbox {
  color: #bdb8b0;
  font-family: "Inter", Arial, sans-serif;
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.checkbox a {
  color: #fff;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  border-radius: 0;
  color: var(--text);
  background: #101315;
}

input::placeholder,
textarea::placeholder {
  color: #6f6a64;
}

select option {
  background: #16191b;
  color: var(--text);
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(166, 65, 40, 0.65);
  border-color: var(--brand);
  background: #101315;
  box-shadow: none;
}

input.has-error {
  background: #2a1714;
}

.form-note,
.password-help {
  color: #8f8a83;
}

/* ---------- Footer ---------- */

.site-footer {
  padding: 56px 0 26px;
  border-top: 4px solid var(--brand);
  background: #0f1112;
}

.site-footer h2 {
  color: var(--accent);
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.16em;
}

.footer-bottom {
  border-top-color: #2a2f33;
}

/* ---------- Chat ---------- */

.support-chat-panel {
  border: 1px solid var(--line);
  border-radius: 0;
  background: #1c2023;
}

.support-chat-menu-item {
  border-color: var(--line);
  border-radius: 0;
  background: #16191b;
  color: var(--text);
}

.support-chat-menu-item:hover {
  border-color: var(--brand);
  background: #16191b;
}

.support-chat-close {
  border: 1px solid var(--line);
  background: #16191b;
  color: var(--text);
}

.support-chat-toggle {
  background: var(--brand);
  color: #fff;
}

/* ---------- Area clienti ---------- */

.auth-main {
  background: #16191b;
}

.auth-page:not(.dashboard-active) .auth-main {
  background:
    linear-gradient(rgba(14, 16, 17, 0.8), rgba(14, 16, 17, 0.92)),
    url("../img/lavori/struttura-tavolo-esterno-marmo-inox.jpg") center / cover;
}

.auth-card h1 {
  font-size: clamp(2.4rem, 5vw, 3.4rem);
}

.auth-toast,
.debug-account-access,
.request-modal-card,
.settings-panel-card,
.user-management-card,
.conversation-card,
.security-card {
  border-color: var(--line);
  border-radius: 0;
  background: #1c2023;
}

.conversation-message {
  background: #23292c;
}

.dashboard-logout {
  background: transparent;
  color: var(--text);
}

/* ---------- Comparsa dei blocchi allo scroll ---------- */

.has-reveal .rv {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity 600ms ease, transform 600ms ease;
  transition-delay: var(--rv-delay, 0ms);
}

.has-reveal .rv.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- Tablet e telefono: menu a tendina ---------- */

@media (max-width: 920px) {
  .brand {
    position: relative;
    z-index: 30;
  }

  .nav-toggle {
    position: relative;
    z-index: 30;
    display: grid;
    place-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid rgba(233, 230, 225, 0.45);
    border-radius: 0;
    background: transparent;
  }

  .nav-toggle:hover {
    transform: none;
    box-shadow: none;
  }

  .nav-toggle span {
    width: 20px;
    margin: 3px auto;
    background: #e9e6e1;
    transition: transform 350ms ease, opacity 200ms ease;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
  }

  .nav-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
  }

  .main-nav,
  .main-nav.is-open {
    position: fixed;
    inset: 0;
    z-index: 25;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    padding: 104px 26px 28px;
    overflow-y: auto;
    border: 0;
    border-radius: 0;
    background: #101315;
    box-shadow: none;
    backdrop-filter: none;
  }

  .main-nav {
    visibility: hidden;
    transform: translateX(100%);
    transition: transform 450ms var(--sweep), visibility 0s linear 450ms;
  }

  .main-nav.is-open {
    visibility: visible;
    transform: none;
    transition: transform 450ms var(--sweep);
  }

  .main-nav a,
  .main-nav a[href="preventivo.html"],
  .main-nav .nav-cta {
    justify-content: flex-start;
    min-height: 0;
    margin: 0;
    padding: 4px 0;
    border: 0;
    color: #e9e6e1;
    background: transparent;
    font-size: clamp(1.9rem, 8.5vw, 2.6rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    opacity: 0;
    transform: translateX(40px);
    transition: opacity 350ms ease, transform 350ms ease, color 200ms ease;
  }

  .main-nav a::after,
  .main-nav a::before {
    display: none;
  }

  .main-nav a:hover,
  .main-nav a[href="preventivo.html"]:hover,
  .main-nav .nav-cta:hover {
    color: var(--accent);
    background: transparent;
  }

  .main-nav a[aria-current="page"],
  .main-nav a[href="preventivo.html"][aria-current="page"],
  .main-nav .nav-cta[aria-current="page"] {
    color: var(--brand);
    background: transparent;
  }

  .main-nav.is-open a {
    opacity: 1;
    transform: none;
  }

  .main-nav.is-open a:nth-of-type(1) { transition-delay: 120ms; }
  .main-nav.is-open a:nth-of-type(2) { transition-delay: 180ms; }
  .main-nav.is-open a:nth-of-type(3) { transition-delay: 240ms; }
  .main-nav.is-open a:nth-of-type(4) { transition-delay: 300ms; }
  .main-nav.is-open a:nth-of-type(5) { transition-delay: 360ms; }
  .main-nav.is-open a:nth-of-type(6) { transition-delay: 420ms; }

  .main-nav .nav-account-avatar {
    width: 38px;
    height: 38px;
  }

  .nav-contacts {
    display: block;
    margin-top: auto;
    padding-top: 18px;
    border-top: 1px solid #2a2f33;
    color: #bdb8b0;
    font-size: 0.95rem;
    line-height: 1.8;
  }

  .nav-contacts p {
    margin: 0;
  }

  .nav-contacts strong {
    color: #e9e6e1;
  }

  .main-nav .nav-contacts a {
    display: inline;
    padding: 0;
    color: #bdb8b0;
    font-family: "Inter", Arial, sans-serif;
    font-size: inherit;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    opacity: 1;
    transform: none;
  }

  body.menu-open {
    overflow: hidden;
  }

  body.menu-open .support-chat {
    display: none;
  }

  .hero-copy {
    padding: 140px 0 70px;
  }

  .home-steps .steps {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .work-grid {
    grid-template-columns: 1fr 1fr;
    height: auto;
  }

  .work-card {
    height: 200px;
  }

  .work-card--big {
    grid-column: 1 / -1;
    height: 280px;
  }

  .work-video-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .work-gallery-main {
    grid-template-columns: 1fr;
    height: auto;
  }

  .work-gallery-photo {
    height: min(68vh, 560px);
  }

  .work-gallery-info {
    padding: 28px 24px;
    border-left: 0;
    border-top: 4px solid var(--brand);
  }

  .work-gallery-thumbs button {
    width: 76px;
    height: 58px;
  }
}

@media (max-width: 640px) {
  .hero {
    min-height: calc(100svh - 70px);
  }

  .hero-copy {
    padding: 120px 0 44px;
  }

  .hero h1 {
    font-size: clamp(2.3rem, 11vw, 3rem);
  }

  .hero-gallery::after {
    background: linear-gradient(0deg, rgba(14, 16, 17, 0.97) 10%, rgba(14, 16, 17, 0.5) 60%, rgba(14, 16, 17, 0.25) 100%);
  }

  .hero-gallery-dots {
    right: 16px;
    left: 16px;
    top: 16px;
    bottom: auto;
    justify-content: center;
  }

  .stats div {
    padding: 20px 12px;
  }

  .stats strong {
    font-size: 2rem;
  }

  .stats span {
    font-size: 0.66rem;
    letter-spacing: 0.04em;
  }

  .section {
    padding: 52px 0;
  }

  .page-hero {
    min-height: 300px;
    padding: 110px 0 40px;
  }

  .home-works-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .work-card {
    height: 160px;
  }

  .work-card--big {
    height: 240px;
  }

  .service-card {
    padding: 28px 22px;
  }

  .work-gallery-main {
    position: relative;
    height: max(460px, calc(100svh - 170px));
  }

  .work-gallery-photo {
    position: absolute;
    inset: 0;
    height: auto;
  }

  .work-gallery-photo img {
    object-position: center top;
  }

  .work-gallery-info {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 6px 12px;
    padding: 80px 18px 18px;
    border-top: 0;
    background: linear-gradient(180deg, rgba(14, 16, 17, 0) 0%, rgba(14, 16, 17, 0.88) 40%, rgba(14, 16, 17, 0.96) 100%);
    pointer-events: none;
  }

  .work-gallery-count {
    grid-column: 1;
    grid-row: 1;
  }

  .work-gallery-nav {
    grid-column: 2;
    grid-row: 1;
    pointer-events: auto;
  }

  .work-gallery-nav button {
    width: 44px;
    height: 44px;
  }

  .work-gallery-copy {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .work-gallery-info h2 {
    margin-bottom: 6px;
    font-size: 1.45rem;
  }

  .work-gallery-info p {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.45;
  }
}

@media (prefers-reduced-motion: reduce) {
  .has-reveal .rv {
    opacity: 1;
    transform: none;
  }
}
