/* ===========================================================================
   Acanfora Metalli — Refined Industrial Dark landing
   Baked-in config from the design's EDITMODE block:
     accent = #d63b3b · background tone = "cool" · headline = "dettaglio"
     decals = on
   =========================================================================== */

:root {
  /* Accent (chosen: red) + readable text on it (luma < .55 -> white) */
  --accent: #d63b3b;
  --accent-text: #ffffff;

  /* Background tone: "cool" */
  --bg:      #0a0c10;
  --panel:   #10131a;
  --panel-2: #161a23;
  --hair:    rgba(210, 225, 255, .07);
  --hair-2:  rgba(210, 225, 255, .14);

  /* Text */
  --fg:     #ece8df;
  --fg-dim: #c9c4b7;
  --mute:   #8a857a;

  /* Type */
  --font-body: 'Manrope', system-ui, sans-serif;
  --font-display: 'Oswald', 'Manrope', system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, monospace;

  --maxw: 1280px;
  --pad-x: 48px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

html, body { margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

::selection { background: var(--accent); color: var(--accent-text); }

img { display: block; }

.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad-x);
  padding-right: var(--pad-x);
}

/* Shared eyebrow / kicker */
.eyebrow {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--accent);
  text-transform: uppercase;
}
.eyebrow--hero {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}
.hairline {
  display: inline-block;
  width: 36px;
  height: 1px;
  background: var(--accent);
}

.accent { color: var(--accent); }

/* ---------------------------------------------------------------- Header -- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 93%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--hair);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  height: 144px;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo img { width: auto; height: 108px; }

.main-nav {
  display: flex;
  gap: 28px;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--mute);
}
.main-nav a { text-decoration: none; transition: color 200ms ease; }
.main-nav a:hover { color: var(--fg); }

/* Hamburger toggle — hidden on desktop, revealed at the mobile breakpoint */
.nav-toggle {
  display: none;
  position: relative;
  width: 44px;
  height: 44px;
  margin: -10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 60;
}
.nav-toggle-bar {
  position: absolute;
  left: 11px;
  width: 22px;
  height: 2px;
  background: var(--fg);
  border-radius: 2px;
  transition: transform 280ms cubic-bezier(.22,.61,.36,1), opacity 200ms ease, top 280ms cubic-bezier(.22,.61,.36,1);
}
.nav-toggle-bar:nth-child(1) { top: 15px; }
.nav-toggle-bar:nth-child(2) { top: 21px; }
.nav-toggle-bar:nth-child(3) { top: 27px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { top: 21px; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { top: 21px; transform: rotate(-45deg); }

/* ------------------------------------------------------------------ Hero -- */
.hero {
  position: relative;
  overflow: hidden;
  border-bottom: 1px solid var(--hair);
}
.hero-bg {
  position: absolute;
  inset: 0;
  opacity: .55;
  pointer-events: none;
}
.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 56px;
  align-items: stretch;
  padding-top: 88px;
  padding-bottom: 96px;
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 74px;
  line-height: .94;
  letter-spacing: -.012em;
  margin: 0;
  text-transform: uppercase;
}
.hero-title span {
  display: inline-block;
  white-space: nowrap;
}

.hero-lede {
  margin-top: 36px;
  max-width: 560px;
  font-size: 19px;
  line-height: 1.55;
  color: var(--fg-dim);
}

.hero-ctas {
  margin-top: 44px;
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  font-family: var(--font-display);
  text-transform: uppercase;
}
.btn--accent {
  gap: 12px;
  padding: 20px 28px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: .06em;
}
.btn--accent .arrow { font-size: 18px; }
.btn--ghost {
  gap: 10px;
  padding: 19px 24px;
  border: 1px solid var(--hair-2);
  color: var(--fg);
  font-size: 15px;
  letter-spacing: .08em;
}
.btn--lg {
  margin-top: 40px;
  gap: 14px;
  padding: 24px 32px;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: none;
}
.link-muted {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--mute);
  text-decoration: none;
  font-family: var(--font-body);
  font-size: 14px;
  margin-left: 4px;
  transition: color 200ms ease;
}
.link-muted:hover { color: var(--fg-dim); }

/* CTA shine sweep */
.shine { position: relative; overflow: hidden; transition: transform 200ms ease; }
.shine::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.22) 50%, transparent 70%);
  transform: translateX(-110%);
  transition: transform 700ms cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
}
.shine:hover::after { transform: translateX(110%); }
.shine:active { transform: scale(.985); }

/* Hero media */
.hero-media {
  position: relative;
  width: 100%;
  min-height: 460px;
  align-self: stretch;
  background: var(--panel);
  overflow: hidden;
}
.hero-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero-media-shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(0,0,0,.25) 0%, rgba(0,0,0,0) 30%,
    rgba(0,0,0,0) 70%, rgba(0,0,0,.45) 100%);
}
/* Corner decals */
.corner {
  position: absolute;
  width: 16px;
  height: 16px;
  pointer-events: none;
}
.corner--tl { top: -1px; left: -1px;  border-top: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.corner--tr { top: -1px; right: -1px; border-top: 2px solid var(--accent); border-right: 2px solid var(--accent); }
.corner--bl { bottom: -1px; left: -1px;  border-bottom: 2px solid var(--accent); border-left: 2px solid var(--accent); }
.corner--br { bottom: -1px; right: -1px; border-bottom: 2px solid var(--accent); border-right: 2px solid var(--accent); }

/* --------------------------------------------------------------- Sections - */
.section { position: relative; }
.section--bordered { border-bottom: 1px solid var(--hair); }
.section--panel { background: var(--panel); }
.section > .container { padding-top: 100px; padding-bottom: 100px; }

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  margin-bottom: 56px;
}
.section-head--simple { margin-bottom: 48px; }
.section-head-note { max-width: 440px; color: var(--fg-dim); font-size: 16px; margin: 0; }

.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  text-transform: uppercase;
  margin: 12px 0 0;
}
.section-title--xl   { font-size: 76px; line-height: 1.04; }
.section-title--lg   { font-size: 64px; line-height: 1.06; margin: 12px 0 28px; }
.section-title--md   { font-size: 56px; line-height: 1.04; }
.section-title--hero { font-size: 96px; line-height: .96;  margin: 12px 0 28px; }

/* --------------------------------------------------------------- Servizi -- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--hair);
  border: 1px solid var(--hair);
}
.service-card {
  background: var(--bg);
  padding: 30px 28px 32px;
  min-height: 220px;
  display: flex;
  flex-direction: column;
  transition: transform 350ms cubic-bezier(.22,.61,.36,1), box-shadow 350ms ease;
}
.service-card:hover { transform: translateY(-3px); }
.service-card--wide { grid-column: 1 / -1; }
.service-card--wide .service-blurb { max-width: 720px; }

.service-tag {
  font-family: var(--font-display);
  font-size: 10px;
  letter-spacing: .22em;
  color: var(--accent);
  text-transform: uppercase;
  margin-bottom: 24px;
}
.service-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 28px;
  letter-spacing: -.005em;
  text-transform: uppercase;
  line-height: 1.08;
  margin: 0;
}
.service-blurb {
  margin: 14px 0 0;
  font-size: 14.5px;
  color: #a8a397;
  line-height: 1.6;
  flex: 1;
}

/* -------------------------------------------------------------- Officina -- */
.officina-grid {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  align-items: center;
}
.prose { font-size: 17px; line-height: 1.7; color: var(--fg-dim); margin: 0 0 16px; }
.prose + .prose { margin-top: 0; }

.meta-grid {
  margin: 36px 0 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  font-size: 14px;
  color: var(--mute);
}
.meta-item dt {
  color: var(--fg);
  font-family: var(--font-display);
  font-size: 12px;
  letter-spacing: .2em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.meta-item dd { margin: 0; }

/* Carousel */
.carousel {
  aspect-ratio: 1 / 1;
  position: relative;
  overflow: hidden;
  background: var(--panel-2);
}
.carousel-track {
  display: flex;
  height: 100%;
  width: 100%;
  transition: transform 800ms cubic-bezier(.65,.05,.2,1);
}
.carousel-slide {
  min-width: 100%;
  height: 100%;
  position: relative;
  background: var(--panel-2);
}
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }
.carousel-frame {
  position: absolute;
  inset: -1px;
  border: 1px solid var(--accent);
  opacity: .35;
  pointer-events: none;
}
.carousel-dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
  z-index: 2;
  padding: 5px 10px;
  background: rgba(0,0,0,.45);
  border-radius: 999px;
}
.carousel-dots button {
  width: 6px;
  height: 6px;
  border-radius: 99px;
  background: rgba(255,255,255,.45);
  border: none;
  cursor: pointer;
  padding: 0;
  transition: width 300ms ease, background 300ms ease;
}
.carousel-dots button[aria-selected="true"] { width: 22px; background: var(--accent); }
.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 99px;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: 1px solid rgba(255,255,255,.18);
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  display: grid;
  place-items: center;
  z-index: 2;
  padding: 0;
}
.carousel-arrow--prev { left: 12px; }
.carousel-arrow--next { right: 12px; }

/* -------------------------------------------------------------- Processo -- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.process-step {
  padding: 28px 0;
  border-top: 1px solid var(--accent);
}
.process-num {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: .22em;
  color: var(--accent);
  margin-bottom: 16px;
}
.process-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 32px;
  letter-spacing: -.005em;
  text-transform: uppercase;
  line-height: 1.06;
  margin: 0 0 14px;
}
.process-desc { font-size: 15px; color: var(--fg-dim); line-height: 1.6; margin: 0; }

/* -------------------------------------------------------------- Contatti -- */
.contact-bg { position: absolute; inset: 0; opacity: .6; pointer-events: none; }
.contact-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 72px;
  align-items: center;
}
.contact-lede { font-size: 18px; color: var(--fg-dim); max-width: 540px; margin: 0; line-height: 1.6; }
.contact-altlinks { margin-top: 20px; display: flex; gap: 16px; align-items: center; }
.contact-altlinks a {
  color: var(--fg);
  font-size: 14px;
  text-decoration: underline;
  text-underline-offset: 4px;
  text-decoration-color: var(--hair-2);
}
.contact-altlinks .dot { color: var(--mute); }

.contact-card {
  border: 1px solid var(--hair-2);
  padding: 32px;
  background: var(--bg);
  width: 555px;
  max-width: 100%;
  margin: 0;
}
.contact-row {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding: 18px 0;
  border-top: 1px solid var(--hair);
}
.contact-row:first-child { border-top: none; }
.contact-row dt {
  font-family: var(--font-display);
  font-size: 11px;
  letter-spacing: .2em;
  color: var(--mute);
  text-transform: uppercase;
  padding-top: 4px;
}
.contact-row dd { font-size: 16px; color: var(--fg); line-height: 1.45; margin: 0; }

/* ---------------------------------------------------------------- Footer -- */
.site-footer { background: var(--bg); }
.footer-inner {
  padding-top: 32px;
  padding-bottom: 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--mute);
  font-size: 12px;
  letter-spacing: .06em;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-tag {
  font-family: var(--font-display);
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
}

.footer-sub {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  padding-top: 18px;
  padding-bottom: 30px;
  border-top: 1px solid var(--hair);
}
.footer-privacy {
  color: var(--mute);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color .2s ease;
}
.footer-privacy:hover { color: var(--fg-dim); }
.footer-powered {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--mute);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.footer-powered img {
  height: 20px;
  width: auto;
  display: block;
}
.footer-powered strong {
  color: var(--fg-dim);
  font-weight: 600;
  letter-spacing: .06em;
}

/* ------------------------------------------------------------ Animations -- */
@keyframes acReveal {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes acHairline {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Hero load-in reveals (fire immediately, staggered via inline animation-delay) */
.reveal { animation: acReveal 800ms cubic-bezier(.22,.61,.36,1) both; }
.hairline { transform-origin: left center; animation: acHairline 900ms cubic-bezier(.22,.61,.36,1) both; }

/* Scroll-triggered reveals (toggled by JS via .is-visible) */
.reveal-up {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 700ms cubic-bezier(.22,.61,.36,1), transform 700ms cubic-bezier(.22,.61,.36,1);
  will-change: opacity, transform;
}
.reveal-up.is-visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .hairline { animation: none !important; }
  .reveal-up { opacity: 1; transform: none; transition: none; }
  .shine::after { display: none; }
  .carousel-track { transition: none; }
}

/* ----------------------------------------------------------- Responsive -- */
@media (max-width: 1080px) {
  :root { --pad-x: 32px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; padding-top: 64px; padding-bottom: 72px; }
  .hero-title { font-size: 64px; }
  .hero-media { min-height: 380px; }
  .officina-grid { grid-template-columns: 1fr; gap: 40px; }
  .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .section-title--xl   { font-size: 60px; }
  .section-title--lg   { font-size: 52px; }
  .section-title--hero { font-size: 72px; }
  .contact-card { width: 100%; }
}

@media (max-width: 760px) {
  :root { --pad-x: 22px; }
  .header-inner { height: 96px; }
  .logo img { height: 64px; }

  .nav-toggle { display: block; }

  /* Nav collapses into a full-width dropdown panel below the sticky header */
  .main-nav {
    position: fixed;
    top: 96px;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    font-size: 15px;
    background: var(--bg);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .55);
    border-bottom: 1px solid var(--hair);
    padding: 8px 22px 18px;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 240ms ease, transform 240ms cubic-bezier(.22,.61,.36,1), visibility 240ms;
  }
  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
  .main-nav a {
    padding: 16px 4px;
    font-family: var(--font-display);
    letter-spacing: .14em;
    color: var(--fg-dim);
    border-bottom: 1px solid var(--hair);
  }
  .main-nav a:last-child { border-bottom: none; }
  .main-nav a:hover { color: var(--accent); }
  .section > .container { padding-top: 64px; padding-bottom: 64px; }
  .hero-title { font-size: 48px; }
  .hero-title span { white-space: normal; }
  .hero-lede { font-size: 17px; }
  .section-head { flex-direction: column; gap: 16px; margin-bottom: 40px; }
  .services-grid { grid-template-columns: 1fr; }
  .service-card--wide { grid-column: auto; }
  .process-grid { grid-template-columns: 1fr; gap: 8px; }
  .meta-grid { grid-template-columns: 1fr; }
  .section-title--xl   { font-size: 46px; }
  .section-title--lg   { font-size: 42px; }
  .section-title--md   { font-size: 40px; }
  .section-title--hero { font-size: 52px; }
  .btn--lg { font-size: 20px; padding: 20px 26px; }
  .contact-row { grid-template-columns: 1fr; gap: 4px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 420px) {
  .hero-ctas { flex-direction: column; align-items: stretch; }
  .hero-ctas .btn { justify-content: center; }
  .btn--accent { font-size: 15px; padding: 18px 22px; }
}
