:root {
  --bg: #0b0c0e;
  --bg-soft: #121316;
  --ink: #f3f1ec;
  --ink-dim: #b8b5ad;
  --gold: #c9a96a;
  --line: rgba(255, 255, 255, 0.08);
  --max-w: 1180px;
  --serif: "Cormorant Garamond", Georgia, serif;
  --sans: "Inter", -apple-system, system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; text-decoration: none; }

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Header ---------- */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(11, 12, 14, 0.7);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: background 0.3s ease;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 32px;
  max-width: var(--max-w);
  margin: 0 auto;
}

.logo {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.logo span { color: var(--gold); }

.logo--brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.logo-img {
  height: 36px;
  width: auto;
  background: #fff;
  border-radius: 4px;
  padding: 3px 5px;
}

.nav-links {
  display: flex;
  gap: 40px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.nav-links a {
  position: relative;
  padding-bottom: 6px;
  color: var(--ink-dim);
  transition: color 0.25s ease;
}

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

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

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

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
}
.nav-toggle span {
  width: 26px; height: 1px;
  background: var(--ink);
}

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  position: relative;
  overflow: hidden;
  padding-top: 100px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 80% 20%, rgba(201, 169, 106, 0.12), transparent 60%),
    radial-gradient(circle at 10% 80%, rgba(201, 169, 106, 0.08), transparent 55%);
  pointer-events: none;
}

.hero-content {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 32px;
  position: relative;
}

.hero-eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 24px;
  opacity: 0;
  animation: fadeUp 0.8s ease forwards;
  animation-delay: 0.1s;
}

.hero h1 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(44px, 7vw, 92px);
  line-height: 1.05;
  max-width: 880px;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards;
  animation-delay: 0.25s;
}

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

.hero p {
  margin-top: 28px;
  max-width: 520px;
  color: var(--ink-dim);
  font-size: 18px;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards;
  animation-delay: 0.4s;
}

.hero-actions {
  margin-top: 44px;
  display: flex;
  gap: 20px;
  opacity: 0;
  animation: fadeUp 0.9s ease forwards;
  animation-delay: 0.55s;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 30px;
  font-size: 14px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--ink);
  transition: all 0.3s ease;
}

.btn-primary {
  background: var(--gold);
  border-color: var(--gold);
  color: #14120a;
}
.btn-primary:hover { background: transparent; color: var(--gold); }

.btn-ghost { color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

.scroll-cue {
  position: absolute;
  bottom: 40px;
  left: 32px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink-dim);
}
.scroll-cue::before {
  content: "";
  width: 1px;
  height: 36px;
  background: linear-gradient(var(--gold), transparent);
}

/* ---------- Section base ---------- */
section { padding: 140px 0; }

.eyebrow {
  font-size: 13px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
}

.section-title {
  font-family: var(--serif);
  font-weight: 500;
  font-size: clamp(32px, 4vw, 52px);
  max-width: 700px;
  line-height: 1.15;
}

.section-intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 40px;
  margin-bottom: 80px;
  flex-wrap: wrap;
}

.section-intro p {
  max-width: 380px;
  color: var(--ink-dim);
}

/* ---------- Reveal animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }

/* ---------- Team grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
  background: var(--line);
}

.team-card {
  background: var(--bg);
  padding: 0;
  position: relative;
  overflow: hidden;
}

.team-photo {
  aspect-ratio: 3/4;
  background: linear-gradient(160deg, #1c1d21, #0e0f11);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.team-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(15%);
  transition: transform 0.6s ease, filter 0.6s ease;
}

.team-card:hover .team-photo img {
  transform: scale(1.05);
  filter: grayscale(0%);
}

.team-photo img[alt="Avv. Gabriele Carnemolla"] {
  object-fit: contain;
  background: linear-gradient(160deg, #1c1d21, #0e0f11);
}

.team-card:hover .team-photo img[alt="Avv. Gabriele Carnemolla"] {
  transform: none;
}

.team-photo .placeholder-mark {
  font-family: var(--serif);
  font-size: 80px;
  color: rgba(255,255,255,0.08);
}

.team-info { padding: 32px 28px 40px; }

.team-info h3 {
  font-family: var(--serif);
  font-size: 26px;
  margin-bottom: 6px;
}

.team-role {
  color: var(--gold);
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 16px;
}

.team-bio { color: var(--ink-dim); font-size: 15px; }

.team-contact {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}

.team-contact a {
  color: var(--ink-dim);
  transition: color 0.25s ease;
}

.team-contact a:hover { color: var(--gold); }

/* ---------- Practice areas ---------- */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}

.area-card {
  background: var(--bg);
  padding: 48px 36px;
  transition: background 0.3s ease;
}

.area-card:hover { background: var(--bg-soft); }

.area-num {
  font-family: var(--serif);
  color: var(--gold);
  font-size: 14px;
  margin-bottom: 24px;
}

.area-card h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin-bottom: 14px;
}

.area-card p { color: var(--ink-dim); font-size: 14.5px; }

/* ---------- Stats band ---------- */
.stats {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 80px 0;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  text-align: center;
}
.stat-num {
  font-family: var(--serif);
  font-size: 48px;
  color: var(--gold);
}
.stat-label {
  margin-top: 8px;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

/* ---------- CTA ---------- */
.cta {
  text-align: center;
}
.cta .section-title { margin: 0 auto 32px; }
.cta-actions { display: flex; justify-content: center; gap: 20px; }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 80px;
}

.contact-info h3 {
  font-family: var(--serif);
  font-size: 22px;
  margin: 36px 0 10px;
}
.contact-info h3:first-child { margin-top: 0; }
.contact-info p { color: var(--ink-dim); margin-bottom: 14px; }
.contact-info p:last-of-type { margin-bottom: 0; }
.contact-info a:hover { color: var(--gold); }

form { display: flex; flex-direction: column; gap: 22px; }

.field { display: flex; flex-direction: column; gap: 8px; }

.field label {
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.field input,
.field textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  padding: 10px 0;
  resize: none;
  transition: border-color 0.3s ease;
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.field--checkbox { flex-direction: row; }

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 13.5px;
  color: var(--ink-dim);
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
  flex-shrink: 0;
}

.checkbox-label a { color: var(--gold); }

.form-status {
  font-size: 13.5px;
  color: var(--ink-dim);
  margin-top: 4px;
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 56px 0 36px;
}
.footer-grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 32px;
}
.footer-grid .logo { margin-bottom: 14px; }
.footer-grid p { color: var(--ink-dim); font-size: 14px; max-width: 320px; }
.footer-links { display: flex; gap: 28px; font-size: 14px; }
.footer-bottom {
  margin-top: 40px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: var(--ink-dim);
  font-size: 13px;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Page header (sub-pages) ---------- */
.page-header {
  padding: 180px 0 80px;
  border-bottom: 1px solid var(--line);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: var(--bg-soft);
    border-bottom: 1px solid var(--line);
  }
  .nav-links a {
    padding: 18px 32px;
    border-top: 1px solid var(--line);
  }
  .nav-links--open { display: flex; }
  .nav-toggle { display: flex; }
  .team-grid, .areas-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 56px; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  section { padding: 90px 0; }
}

@media (max-width: 560px) {
  .nav { padding: 18px 20px; }
  .container { padding: 0 20px; }
  .logo--brand { font-size: 17px; }
  .logo-img { height: 28px; }
  .hero-actions { flex-direction: column; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .cta-actions { flex-direction: column; width: 100%; }
  .cta-actions .btn { width: 100%; justify-content: center; }
  .footer-grid { flex-direction: column; }
  .footer-links { flex-wrap: wrap; gap: 16px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
  .scroll-cue { display: none; }
  section { padding: 70px 0; }
  .hero { padding-top: 120px; }
}
