/* E4 Costruzioni — premium, fluid, mobile-first */
:root {
  --bg: #080808;
  --bg-elevated: #0e0e0e;
  --bg-card: #141414;
  --bg-card-hover: #1a1a1a;
  --border: rgba(212, 175, 55, 0.22);
  --border-soft: rgba(255, 255, 255, 0.07);
  --gold: #d4af37;
  --gold-light: #e8c547;
  --gold-dim: #8a7020;
  --gold-glow: rgba(212, 175, 55, 0.28);
  --text: #f4f1ea;
  --text-muted: #a39e92;
  --text-dim: #6f6a60;
  --success: #3d9b6a;
  --error: #c45c5c;
  --font-display: "Cormorant Garamond", "Times New Roman", Georgia, serif;
  --font-body: "Outfit", system-ui, -apple-system, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius: 2px;

  /* Fluid layout system */
  --gutter: clamp(1.25rem, 4.5vw, 2.5rem);
  --gutter-lg: clamp(1.5rem, 5vw, 3.5rem);
  --section-y: clamp(4.5rem, 10vw, 8.5rem);
  --section-y-sm: clamp(3.5rem, 8vw, 6rem);
  --stack: clamp(1rem, 2.5vw, 1.5rem);
  --stack-lg: clamp(1.75rem, 4vw, 3rem);
  --container-max: 72rem;
  --container: min(var(--container-max), calc(100% - var(--gutter) * 2));
  --header-h: clamp(4rem, 8vw, 5rem);
  --tap: 2.75rem;
  --focus: 0 0 0 2px var(--bg), 0 0 0 4px var(--gold);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 0.75rem);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-weight: 300;
  font-size: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
  min-height: 100dvh;
}

img, svg { max-width: 100%; display: block; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
ul { list-style: none; }

:focus-visible {
  outline: none;
  box-shadow: var(--focus);
}

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 200;
  padding: 0.75rem 1.25rem;
  background: var(--gold);
  color: var(--bg);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: top 0.2s;
}
.skip-link:focus {
  top: 0.75rem;
  box-shadow: var(--focus);
}

.container {
  width: min(var(--container-max), 100%);
  max-width: 100%;
  margin-inline: auto;
  padding-inline: var(--gutter);
  box-sizing: border-box;
}

/* Grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0.03;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ——— Header ——— */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  padding-top: env(safe-area-inset-top, 0);
  transition: background 0.35s var(--ease), backdrop-filter 0.35s, border-color 0.35s;
  border-bottom: 1px solid transparent;
}

.header.scrolled {
  background: rgba(8, 8, 8, 0.9);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border-bottom-color: var(--border-soft);
}

.header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: 100%;
}

.logo {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  z-index: 110;
  min-width: 0;
  flex-shrink: 1;
}

.logo-mark {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  border: 1.5px solid var(--gold);
  display: grid;
  place-items: center;
}

.logo-mark span {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--gold);
  line-height: 1;
}

.logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
  min-width: 0;
}

.logo-text strong {
  font-family: var(--font-display);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 600;
  letter-spacing: 0.06em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.logo-text small {
  font-size: 0.62rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 2.5vw, 2.25rem);
}

.nav a {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  transition: color 0.25s;
  position: relative;
  padding: 0.35rem 0;
}

.nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: var(--gold);
  transition: width 0.3s var(--ease);
}

.nav a:hover,
.nav a.active { color: var(--text); }

.nav a:hover::after,
.nav a.active::after { width: 100%; }

.nav-cta {
  padding: 0.65rem 1.15rem !important;
  border: 1px solid var(--gold);
  color: var(--gold) !important;
  letter-spacing: 0.12em !important;
  transition: background 0.3s, color 0.3s, border-color 0.3s !important;
  white-space: nowrap;
}

.nav-cta::after { display: none !important; }

.nav-cta:hover {
  background: var(--gold) !important;
  color: var(--bg) !important;
}

.menu-toggle {
  display: none;
  width: var(--tap);
  height: var(--tap);
  background: none;
  border: 1px solid transparent;
  cursor: pointer;
  position: relative;
  z-index: 110;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 6px;
  border-radius: var(--radius);
  -webkit-tap-highlight-color: transparent;
}

.menu-toggle span {
  display: block;
  width: 1.35rem;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.25s;
  transform-origin: center;
}

.menu-toggle.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.menu-toggle.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.menu-toggle.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ——— Hero ——— */
.hero {
  position: relative;
  min-height: 100svh;
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  padding:
    calc(var(--header-h) + env(safe-area-inset-top, 0px) + clamp(1.5rem, 4vw, 3rem))
    0
    clamp(3.5rem, 8vw, 5.5rem);
  overflow: hidden;
}

/* Content sits inside .container gutters — never flush to edges */
.hero > .container {
  width: min(var(--container-max), 100%);
  margin-inline: auto;
  padding-inline: var(--gutter-lg);
  box-sizing: border-box;
}

.hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 38%;
  transform: scale(1.04);
  animation: heroZoom 22s ease-out forwards;
}

@keyframes heroZoom {
  to { transform: scale(1); }
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(8,8,8,0.58) 0%, rgba(8,8,8,0.28) 32%, rgba(8,8,8,0.88) 78%, rgba(8,8,8,0.97) 100%),
    linear-gradient(90deg, rgba(8,8,8,0.72) 0%, rgba(8,8,8,0.25) 55%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  /* do NOT set width:100% — it overrides .container gutters */
  max-width: 100%;
  padding-bottom: 0.5rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 1rem 0.4rem 0.45rem;
  border: 1px solid var(--border);
  background: rgba(8, 8, 8, 0.5);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  margin-bottom: clamp(1.25rem, 3vw, 1.85rem);
  opacity: 0;
  animation: fadeUp 0.85s var(--ease) 0.15s forwards;
}

.hero-badge .years {
  width: 2.15rem;
  height: 2.15rem;
  background: var(--gold);
  color: var(--bg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.hero-badge span {
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold-light);
  padding-right: 0.15rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(2.35rem, 7.5vw, 5.25rem);
  line-height: 1.04;
  letter-spacing: -0.015em;
  max-width: 13ch;
  margin-bottom: clamp(1rem, 2.5vw, 1.5rem);
  opacity: 0;
  animation: fadeUp 0.85s var(--ease) 0.28s forwards;
}

.hero h1 em {
  font-style: italic;
  color: var(--gold-light);
}

.hero-lead {
  font-size: clamp(0.98rem, 1.6vw, 1.15rem);
  color: var(--text-muted);
  max-width: 36ch;
  margin-bottom: clamp(1.75rem, 4vw, 2.5rem);
  line-height: 1.7;
  opacity: 0;
  animation: fadeUp 0.85s var(--ease) 0.4s forwards;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1rem;
  opacity: 0;
  animation: fadeUp 0.85s var(--ease) 0.52s forwards;
}

.hero-meta {
  position: absolute;
  right: var(--gutter-lg);
  bottom: clamp(3.5rem, 8vw, 5.5rem);
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
  opacity: 0;
  animation: fadeUp 0.85s var(--ease) 0.65s forwards;
  pointer-events: none;
}

.hero-meta strong {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
}

.hero-meta span {
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.scroll-hint {
  position: absolute;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-dim);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeUp 0.85s var(--ease) 0.85s forwards;
}

.scroll-hint .line {
  width: 1px;
  height: 2.25rem;
  background: linear-gradient(to bottom, var(--gold), transparent);
  animation: scrollPulse 2.2s ease-in-out infinite;
}

@keyframes scrollPulse {
  0%, 100% { opacity: 0.25; transform: scaleY(0.65); transform-origin: top; }
  50% { opacity: 1; transform: scaleY(1); transform-origin: top; }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(1.5rem); }
  to { opacity: 1; transform: translateY(0); }
}

/* ——— Buttons ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: var(--tap);
  padding: 0.9rem 1.6rem;
  font-size: 0.72rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.35s var(--ease);
  text-align: center;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary {
  background: var(--gold);
  color: var(--bg);
  border-color: var(--gold);
}

.btn-primary:hover {
  background: var(--gold-light);
  border-color: var(--gold-light);
  box-shadow: 0 0 2rem var(--gold-glow);
}

.btn-primary:disabled {
  opacity: 0.65;
  cursor: wait;
  box-shadow: none;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.28);
}

.btn-outline:hover {
  border-color: var(--gold);
  color: var(--gold);
}

.btn-full { width: 100%; }

/* ——— Sections ——— */
.section {
  padding: var(--section-y) 0;
  position: relative;
}

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.68rem;
  letter-spacing: 0.26em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: clamp(0.85rem, 2vw, 1.2rem);
}

.section-label::before {
  content: "";
  width: 1.5rem;
  height: 1px;
  background: var(--gold);
  flex-shrink: 0;
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.2vw, 3.15rem);
  font-weight: 400;
  line-height: 1.12;
  margin-bottom: clamp(0.9rem, 2vw, 1.25rem);
  letter-spacing: -0.01em;
  max-width: 18ch;
}

.section-title em {
  font-style: italic;
  color: var(--gold-light);
}

.section-lead {
  color: var(--text-muted);
  max-width: 48ch;
  font-size: clamp(0.98rem, 1.4vw, 1.08rem);
  line-height: 1.75;
}

.section-lead + .section-lead {
  margin-top: var(--stack);
}

/* ——— About ——— */
.about-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border-soft);
  border: 1px solid var(--border-soft);
  margin-top: var(--stack-lg);
}

.stat {
  background: var(--bg-elevated);
  padding: clamp(1.15rem, 2.5vw, 1.75rem) clamp(0.65rem, 1.5vw, 1.1rem);
  text-align: center;
}

.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  font-weight: 500;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat span {
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  line-height: 1.35;
  display: block;
}

.about-visual {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  max-height: min(36rem, 70vh);
}

.about-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(0.88) contrast(1.04);
}

.about-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid var(--border);
  pointer-events: none;
}

.about-float {
  position: absolute;
  bottom: clamp(0.85rem, 2.5vw, 1.35rem);
  left: clamp(0.85rem, 2.5vw, 1.35rem);
  right: clamp(0.85rem, 2.5vw, 1.35rem);
  padding: clamp(1rem, 2.5vw, 1.35rem) clamp(1.1rem, 2.5vw, 1.5rem);
  background: rgba(8, 8, 8, 0.86);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  z-index: 2;
}

.about-float p {
  font-family: var(--font-display);
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  font-style: italic;
  line-height: 1.35;
}

/* ——— Services ——— */
.services {
  background: linear-gradient(180deg, var(--bg) 0%, #0b0b0b 50%, var(--bg) 100%);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

.services-header {
  display: grid;
  grid-template-columns: 1fr minmax(12rem, 0.85fr);
  gap: clamp(1.25rem, 3vw, 2.5rem);
  align-items: end;
  margin-bottom: clamp(2rem, 4.5vw, 3.25rem);
}

.services-header .section-title { max-width: none; }

.services-header .section-lead {
  margin-bottom: 0.25rem;
  justify-self: end;
  text-align: right;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(0.85rem, 2vw, 1.25rem);
}

.service-card {
  position: relative;
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  overflow: hidden;
  min-height: clamp(22rem, 42vw, 26.5rem);
  display: flex;
  flex-direction: column;
  transition: border-color 0.4s, transform 0.4s var(--ease), background 0.4s;
}

@media (hover: hover) and (pointer: fine) {
  .service-card:hover {
    border-color: var(--border);
    transform: translateY(-3px);
    background: var(--bg-card-hover);
  }
  .service-card:hover .service-card-media img {
    opacity: 0.42;
    transform: scale(1.05);
  }
}

.service-card-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.service-card-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.3;
  transition: opacity 0.5s, transform 0.8s var(--ease);
}

.service-card-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,8,8,0.15) 0%, rgba(8,8,8,0.55) 45%, rgba(8,8,8,0.96) 100%);
}

.service-card-body {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding: clamp(1.35rem, 3vw, 2rem) clamp(1.2rem, 2.5vw, 1.75rem) clamp(1.5rem, 3vw, 2rem);
}

.service-num {
  font-family: var(--font-display);
  font-size: 0.8rem;
  color: var(--gold);
  letter-spacing: 0.14em;
  margin-bottom: 0.85rem;
  display: block;
}

.service-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.2vw, 1.7rem);
  font-weight: 500;
  line-height: 1.18;
  margin-bottom: 0.85rem;
}

.service-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.65;
  margin-bottom: 1.25rem;
}

.service-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.service-tags li {
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--border-soft);
  color: var(--text-dim);
  background: rgba(0, 0, 0, 0.35);
}

/* ——— Locations ——— */
.locations-intro {
  max-width: 40rem;
  margin-bottom: clamp(1.75rem, 4vw, 2.75rem);
}

.locations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(0.85rem, 2vw, 1.25rem);
}

.location-card {
  position: relative;
  min-height: clamp(16rem, 32vw, 20.5rem);
  overflow: hidden;
  border: 1px solid var(--border-soft);
  display: flex;
  align-items: flex-end;
}

.location-card img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.48;
  transition: transform 0.8s var(--ease), opacity 0.4s;
}

@media (hover: hover) and (pointer: fine) {
  .location-card:hover img {
    transform: scale(1.05);
    opacity: 0.58;
  }
}

.location-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 15%, rgba(8,8,8,0.55) 55%, rgba(8,8,8,0.94) 100%);
}

.location-body {
  position: relative;
  z-index: 1;
  padding: clamp(1.25rem, 3vw, 2rem);
  width: 100%;
}

.location-body .city-label {
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.4rem;
  display: block;
}

.location-body h3 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.4rem);
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.location-body p {
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 28ch;
  line-height: 1.55;
}

.location-flag {
  position: absolute;
  top: clamp(0.9rem, 2vw, 1.35rem);
  right: clamp(0.9rem, 2vw, 1.35rem);
  z-index: 2;
  font-size: 0.65rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.4rem 0.7rem;
  border: 1px solid var(--border);
  color: var(--gold);
  background: rgba(8, 8, 8, 0.65);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ——— Contact ——— */
.contact {
  background:
    radial-gradient(ellipse 70% 55% at 85% 10%, rgba(212, 175, 55, 0.07), transparent 55%),
    var(--bg-elevated);
  border-top: 1px solid var(--border-soft);
  padding-bottom: clamp(4.5rem, 10vw, 8rem);
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-copy p {
  color: var(--text-muted);
  margin-bottom: var(--stack-lg);
  max-width: 34ch;
  line-height: 1.75;
}

.contact-offices {
  display: flex;
  flex-direction: column;
}

.contact-office {
  padding: 1.15rem 0;
  border-top: 1px solid var(--border-soft);
}

.contact-office:last-child {
  border-bottom: 1px solid var(--border-soft);
}

.contact-office h4 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  font-weight: 500;
  margin-bottom: 0.2rem;
}

.contact-office span {
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-soft);
  padding: clamp(1.35rem, 3.5vw, 2.5rem);
}

.form-card h3 {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.5vw, 1.75rem);
  font-weight: 400;
  margin-bottom: 0.4rem;
}

.form-card > p {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-bottom: clamp(1.35rem, 3vw, 1.85rem);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1rem;
}

.form-group {
  margin-bottom: 1rem;
}

.form-group label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.45rem;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  min-height: var(--tap);
  background: var(--bg);
  border: 1px solid var(--border-soft);
  padding: 0.75rem 0.95rem;
  color: var(--text);
  outline: none;
  transition: border-color 0.25s;
  border-radius: var(--radius);
  /* iOS: prevent auto-zoom on focus */
  font-size: 16px;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-dim);
  opacity: 0.75;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--gold);
  box-shadow: none;
}

.form-group textarea {
  min-height: 8.5rem;
  resize: vertical;
  line-height: 1.55;
}

.form-group select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' stroke='%239a958a' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  padding-right: 2.5rem;
}

.form-group select option {
  background: var(--bg);
  color: var(--text);
}

.form-status {
  margin-top: 0.85rem;
  font-size: 0.9rem;
  min-height: 1.35em;
  line-height: 1.45;
}

.form-status.success { color: var(--success); }
.form-status.error { color: var(--error); }

.honeypot {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

/* ——— Footer ——— */
.footer {
  background: #050505;
  border-top: 1px solid var(--border-soft);
  padding: clamp(2.25rem, 5vw, 3.25rem) 0 max(1.75rem, env(safe-area-inset-bottom));
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: clamp(1.5rem, 4vw, 2.5rem);
  flex-wrap: wrap;
  margin-bottom: clamp(1.75rem, 3vw, 2.5rem);
}

.footer-brand p {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 0.85rem;
  max-width: 26ch;
  line-height: 1.5;
}

.footer-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem 1.5rem;
  align-items: center;
}

.footer-nav a {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  transition: color 0.25s;
  padding: 0.35rem 0;
}

.footer-nav a:hover { color: var(--gold); }

.footer-legal {
  margin-bottom: clamp(1.35rem, 3vw, 1.85rem);
  padding: clamp(1.15rem, 2.5vw, 1.5rem) 0;
  border-top: 1px solid var(--border-soft);
}

.footer-legal-name {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 0.85rem;
}

.footer-legal-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
  gap: 0.55rem 1.5rem;
}

.footer-legal-list li {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.footer-legal-list li span {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.65rem 1.25rem;
  padding-top: 1.35rem;
  border-top: 1px solid var(--border-soft);
  font-size: 0.72rem;
  color: var(--text-dim);
  line-height: 1.45;
}

/* ——— Reveal ——— */
.reveal {
  opacity: 0;
  transform: translateY(1.75rem);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.08s; }
.reveal-delay-2 { transition-delay: 0.16s; }
.reveal-delay-3 { transition-delay: 0.24s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-badge, .hero h1, .hero-lead, .hero-actions, .hero-meta, .scroll-hint {
    opacity: 1;
    animation: none;
  }
  .hero-bg img { animation: none; transform: none; }
}

/* ——— Large desktop ——— */
@media (min-width: 1280px) {
  :root {
    --container-max: 74rem;
  }
}

/* ——— Tablet ——— */
@media (max-width: 1024px) {
  .about-grid {
    grid-template-columns: 1fr;
    gap: clamp(2rem, 5vw, 2.75rem);
  }

  .about-visual {
    aspect-ratio: 16 / 10;
    max-height: 24rem;
    order: -1;
  }

  .services-header {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .services-header .section-lead {
    text-align: left;
    justify-self: start;
    max-width: 42ch;
  }

  .services-grid {
    grid-template-columns: 1fr;
  }

  .service-card {
    min-height: 18.5rem;
  }

  .hero-meta { display: none; }
}

/* ——— Mobile / small tablet ——— */
@media (max-width: 768px) {
  :root {
    --header-h: 3.75rem;
  }

  .menu-toggle {
    display: inline-flex;
  }

  .nav {
    position: fixed;
    inset: 0;
    padding:
      calc(var(--header-h) + env(safe-area-inset-top, 0px) + 2rem)
      var(--gutter)
      max(2rem, env(safe-area-inset-bottom));
    background: rgba(6, 6, 6, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: stretch;
    gap: 0.35rem;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.35s var(--ease), visibility 0.35s;
    z-index: 105;
  }

  .nav.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .nav a {
    font-size: 1.05rem;
    letter-spacing: 0.16em;
    padding: 1rem 0.25rem;
    border-bottom: 1px solid var(--border-soft);
    text-align: left;
  }

  .nav a::after { display: none; }

  .nav-cta {
    margin-top: 1.25rem !important;
    text-align: center !important;
    justify-content: center;
    border-bottom: 1px solid var(--gold) !important;
  }

  .hero {
    align-items: flex-end;
    padding-bottom: clamp(4rem, 12vw, 5rem);
  }

  .hero-actions {
    flex-direction: column;
    width: 100%;
    max-width: 22rem;
  }

  .hero-actions .btn {
    width: 100%;
  }

  .scroll-hint { display: none; }

  .about-stats {
    grid-template-columns: 1fr;
  }

  .stat {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.85rem;
    align-items: center;
    text-align: left;
    padding: 1.1rem 1.15rem;
  }

  .stat strong {
    margin-bottom: 0;
    min-width: 2.5rem;
  }

  .locations-grid {
    grid-template-columns: 1fr;
  }

  .location-card {
    min-height: 15rem;
  }

  .contact-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .footer-top {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer-nav {
    width: 100%;
  }

  .footer-bottom {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ——— Narrow phones ——— */
@media (max-width: 400px) {
  .logo-text small { display: none; }

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

  .hero-badge span {
    letter-spacing: 0.12em;
    font-size: 0.62rem;
  }

  .service-card h3 {
    font-size: 1.35rem;
  }
}

/* ——— Landscape phone ——— */
@media (max-height: 480px) and (orientation: landscape) {
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 1.5rem);
    padding-bottom: 2.5rem;
  }

  .scroll-hint { display: none; }
}
