:root {
  --ink: #172033;
  --muted: #667085;
  --primary: #1f5f8b;
  --primary-light: #3a8fc2;
  --accent: #ff7a59;
  --accent-soft: #fff0eb;
  --paper: #f4f8fb;
  --white: #fff;
  --line: #dce8f1;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 86px; }
body { margin: 0; color: var(--ink); font-family: "Inter", sans-serif; line-height: 1.7; background: var(--white); }
h1, h2, h3 { margin-top: 0; font-family: "Inter", sans-serif; font-weight: 800; line-height: 1.05; letter-spacing: -.045em; }
h2 { font-size: clamp(2.15rem, 5vw, 3.65rem); }
p { color: var(--muted); }
a { color: inherit; }
.container { max-width: 1180px; }
.section { padding: 7rem 0; }

.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 2000; padding: .7rem 1rem; background: var(--white); }
.skip-link:focus { top: 1rem; }

.navbar { min-height: 80px; background: rgba(255,255,255,.96); border-bottom: 1px solid rgba(31,95,139,.12); backdrop-filter: blur(10px); }
.navbar-brand { display: flex; align-items: center; gap: .75rem; color: var(--primary); font-weight: 800; font-size: 1rem; }
.brand-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 14px; color: var(--white); background: linear-gradient(135deg, var(--primary), var(--primary-light)); font-size: .82rem; font-weight: 800; letter-spacing: -.04em; }
.nav-link { color: var(--ink); font-size: .92rem; font-weight: 600; margin: 0 .35rem; }
.nav-link:hover { color: var(--primary-light); }
.navbar-toggler { border: 0; box-shadow: none !important; }
.navbar-toggler-icon { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath stroke='%231f5f8b' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E"); }

.btn { border-radius: 999px; padding: .8rem 1.3rem; font-size: .9rem; font-weight: 800; }
.btn-lg { padding: 1rem 1.45rem; }
.btn-primary { border-color: var(--accent); color: var(--white); background: var(--accent); box-shadow: 0 14px 34px rgba(255,122,89,.24); }
.btn-primary:hover, .btn-primary:focus { border-color: #ff8d70; color: var(--white); background: #ff8d70; }
.btn-outline-light:hover { color: var(--primary); }

.hero { position: relative; display: flex; align-items: center; min-height: 780px; padding: 10rem 0 7rem; color: var(--white); background: url("images/tribunale-milano-hero-mirrored.png") center center/cover no-repeat; }
.hero-shade { position: absolute; inset: 0; background: rgba(16,52,82,.28); }
.hero h1 { max-width: 760px; margin: 1rem 0 .7rem; font-size: clamp(3.1rem, 7vw, 5.6rem); }
.hero-subtitle { max-width: 620px; margin: 0 0 1.2rem; color: var(--white); font-size: clamp(1.8rem, 4vw, 3rem); font-weight: 800; line-height: 1.12; letter-spacing: -.04em; }
.hero-lead { max-width: 620px; margin-bottom: 2rem; color: rgba(255,255,255,.9); font-size: 1.15rem; }
.eyebrow { display: inline-block; color: var(--primary-light); font-size: .74rem; font-weight: 800; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow.light { color: var(--accent); }
.hero-eyebrow { font-size: .84rem; }
.hero-points { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-top: 2.5rem; color: rgba(255,255,255,.76); font-size: .82rem; font-weight: 600; }
.hero-points span::before { content: "✓"; margin-right: .45rem; color: var(--accent); }

.intro { background: var(--paper); }
.intro h2 { margin: .9rem 0 0; color: var(--primary); }
.intro p { max-width: 720px; }
.lead-copy { color: var(--ink); font-size: 1.35rem; }
.text-link { display: inline-block; margin-top: .6rem; color: var(--primary); font-weight: 800; text-decoration: none; }
.text-link span { display: inline-block; transition: transform .2s; }
.text-link:hover span { transform: translateX(5px); }

.section-heading { max-width: 680px; margin: 0 auto 3.5rem; text-align: center; }
.section-heading h2 { margin: .8rem 0 1rem; color: var(--primary); }
.service-card { height: 100%; overflow: hidden; border: 1px solid var(--line); border-radius: 28px; background: var(--white); transition: transform .25s, box-shadow .25s; }
.service-card:hover { transform: translateY(-7px); box-shadow: 0 24px 60px rgba(31,95,139,.14); }
.service-card img { display: block; width: 100%; height: 260px; object-fit: cover; }
.service-content { position: relative; padding: 2rem; }
.service-number { position: absolute; top: -1.2rem; right: 1.5rem; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 18px; color: var(--white); background: var(--accent); font-weight: 800; }
.service-content h3 { color: var(--primary); font-size: 1.6rem; }
.service-content p { min-height: 120px; }
.service-content a { color: var(--primary); font-size: .83rem; font-weight: 800; text-decoration: none; text-transform: uppercase; letter-spacing: .06em; }
.service-note { margin: 2.5rem auto 0; text-align: center; font-size: .9rem; }

.process { color: var(--white); background: linear-gradient(135deg, #1f5f8b 0%, #287db4 100%); }
.process h2 { margin: .9rem 0 1.2rem; }
.process p { color: rgba(255,255,255,.66); }
.process-list { margin: 0; padding: 0; list-style: none; }
.process-list li { display: flex; gap: 1.5rem; padding: 1.5rem 0; border-bottom: 1px solid rgba(255,255,255,.14); }
.process-list li:first-child { padding-top: 0; }
.process-list span { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border: 1px solid rgba(255,255,255,.55); border-radius: 50%; color: var(--white); background: rgba(255,255,255,.12); font-weight: 800; }
.process-list h3 { margin-bottom: .3rem; font-family: "Inter", sans-serif; font-size: 1rem; letter-spacing: 0; }
.process-list p { margin: 0; font-size: .9rem; }

.contact { background: var(--paper); }
.contact-panel { padding: clamp(2rem, 5vw, 5rem); border-top: 5px solid var(--accent); border-radius: 32px; background: var(--white); box-shadow: 0 30px 80px rgba(31,95,139,.12); }
.contact h2 { margin: .8rem 0 1rem; color: var(--primary); }
.contact-links { display: grid; gap: .8rem; }
.contact-links a { display: flex; align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--line); border-radius: 20px; text-decoration: none; transition: border-color .2s, background .2s; }
.contact-links a:hover { border-color: var(--accent); background: var(--accent-soft); }
.contact-icon { display: grid; flex: 0 0 auto; place-items: center; width: 42px; height: 42px; border-radius: 14px; color: var(--white); background: var(--primary); font-weight: 800; }
.contact-links small, .contact-links strong { display: block; }
.contact-links small { color: var(--muted); font-size: .72rem; text-transform: uppercase; letter-spacing: .08em; }
.hours { margin: 1rem 0 0; font-size: .78rem; }

footer { padding: 2.2rem 0; color: rgba(255,255,255,.7); background: #172033; }
.footer-inner { display: flex; justify-content: space-between; align-items: center; gap: 2rem; }
footer p { margin: 0; color: rgba(255,255,255,.58); font-size: .78rem; }
footer strong { color: var(--white); font-size: .9rem; }
.whatsapp-float { position: fixed; right: 1.4rem; bottom: 1.4rem; z-index: 1000; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--white); background: #25d366; box-shadow: 0 10px 30px rgba(0,0,0,.2); font-weight: 700; text-decoration: none; transition: transform .2s; }
.whatsapp-float:hover { color: var(--white); transform: scale(1.07); }

@media (max-width: 991px) {
  .section { padding: 5rem 0; }
  .navbar-collapse { margin: .8rem -12px -8px; padding: 1rem 12px 1.3rem; border-top: 1px solid var(--line); background: var(--white); }
  .navbar-nav { align-items: stretch !important; }
  .nav-link { padding: .65rem 0; }
  .hero { min-height: 700px; background-position: center center; }
  .hero-shade { background: rgba(16,52,82,.36); }
  .service-content p { min-height: 0; }
}

@media (max-width: 767px) {
  .navbar-brand { font-size: .85rem; }
  .hero { min-height: 680px; padding-top: 8rem; }
  .hero h1 { font-size: 2.8rem; }
  .hero-subtitle { font-size: 1.9rem; }
  .hero .btn { width: 100%; }
  .hero-points { gap: .6rem 1rem; }
  .service-card img { height: 230px; }
  .footer-inner { display: block; }
  .footer-inner p + p { margin-top: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
