/* ==============================================
   FIDUCIARIA BELLINZONESE SA – Stylesheet
   ============================================== */

/* Variables */
:root {
  --navy: #1b2a4a;
  --navy-dark: #111e35;
  --navy-light: #243660;
  --accent: #29abe2;
  --accent-light: #60c8ee;
  --accent-dark: #1a8bbf;
  --bg: #f4f8fb;
  --bg-alt: #ebf3f9;
  --white: #ffffff;
  --text: #2c2c2c;
  --text-muted: #6b7380;
  --border: #d4e7f2;

  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --max-w: 1140px;
  --nav-h: 80px;
  --pad-sec: 96px;
  --radius: 2px;
  --shadow: 0 2px 24px rgba(27, 42, 74, 0.08);
  --shadow-l: 0 8px 40px rgba(27, 42, 74, 0.14);
  --ease: 0.3s ease;
}

/* Reset */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
html {
  scroll-behavior: smooth;
  font-size: 16px;
}
body {
  font-family: var(--sans);
  color: var(--text);
  background: var(--white);
  line-height: 1.72;
  -webkit-font-smoothing: antialiased;
}
img {
  max-width: 100%;
  height: auto;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
ul {
  list-style: none;
}

/* Typography */
h1,
h2,
h3,
h4 {
  font-family: var(--serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy);
}
h1 {
  font-size: clamp(2rem, 5vw, 3.25rem);
}
h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}
h3 {
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}
p {
  margin-bottom: 1rem;
}
p:last-child {
  margin-bottom: 0;
}

/* Layout */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section {
  padding: var(--pad-sec) 0;
}
.section--alt {
  background: var(--bg);
}
.section--navy {
  background: var(--navy-dark);
}

.section-header {
  text-align: center;
  margin-bottom: 64px;
}
.section-header p {
  color: var(--text-muted);
  max-width: 580px;
  margin: 14px auto 0;
  font-size: 1.025rem;
}

.label {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}

.gold-line {
  width: 44px;
  height: 2px;
  background: var(--accent);
  margin: 22px 0;
}
.gold-line--center {
  margin: 22px auto;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--sans);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--ease);
  border-radius: var(--radius);
}
.btn-gold {
  background: var(--accent);
  color: var(--white);
  border-color: var(--accent);
}
.btn-gold:hover {
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.btn-white {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}
.btn-white:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: var(--white);
}

.btn-navy {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-navy:hover {
  background: var(--navy);
  color: var(--white);
}

.btn-navy-solid {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}
.btn-navy-solid:hover {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
}

/* ===========================
   Navigation
   =========================== */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.97);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow var(--ease);
}
.site-header.is-scrolled {
  box-shadow: var(--shadow);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--nav-h);
}
.nav-logo img {
  height: 46px;
  width: auto;
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 40px;
}
.nav-link {
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  position: relative;
  transition: color var(--ease);
}
.nav-link::after {
  content: "";
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width var(--ease);
}
.nav-link:hover,
.nav-link.is-active {
  color: var(--navy);
}
.nav-link:hover::after,
.nav-link.is-active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: all var(--ease);
  transform-origin: center;
}
.nav-toggle.is-open span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle.is-open span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.nav-toggle.is-open span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ===========================
   Footer logo
   =========================== */
.footer-logo {
  height: 46px;
  width: auto;
  margin-bottom: 20px;
  display: block;
}

/* ===========================
   Hero
   =========================== */
.hero {
  min-height: 75vh;
  padding-top: var(--nav-h);
  background: var(--navy-dark);
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(
      ellipse 60% 80% at 15% 50%,
      rgba(41, 171, 226, 0.08) 0%,
      transparent 70%
    ),
    radial-gradient(
      ellipse 60% 80% at 85% 50%,
      rgba(36, 54, 96, 0.5) 0%,
      transparent 70%
    );
  pointer-events: none;
}
.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 680px;
  padding: 0 24px;
}
.hero-divider {
  width: 48px;
  height: 1px;
  background: var(--accent);
  margin: 0 auto 36px;
}
.hero h1 {
  color: var(--white);
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 400;
  letter-spacing: 0.02em;
}
.hero h1 em {
  font-style: italic;
  color: var(--accent-light);
}
.hero-sub {
  color: rgba(255, 255, 255, 0.62);
  font-size: 1.05rem;
  margin: 20px 0 44px;
}
.hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ===========================
   Page Banner (inner pages)
   =========================== */
.page-banner {
  background: var(--navy);
  padding: 140px 0 68px;
  text-align: center;
  position: relative;
}
.page-banner::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 48px;
  height: 2px;
  background: var(--accent);
}
.page-banner h1 {
  color: var(--white);
}
.breadcrumb {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.45);
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--ease);
}
.breadcrumb a:hover {
  color: var(--accent);
}
.breadcrumb .sep {
  color: rgba(255, 255, 255, 0.3);
}
.breadcrumb .current {
  color: var(--accent);
}

/* ===========================
   Values
   =========================== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.value-card {
  padding: 40px 32px;
  background: var(--white);
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow);
  transition:
    transform var(--ease),
    box-shadow var(--ease);
}
.value-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-l);
}
.value-icon {
  width: 44px;
  height: 44px;
  color: var(--accent);
  margin-bottom: 22px;
}
.value-card h3 {
  margin-bottom: 10px;
}
.value-card p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin: 0;
}

/* ===========================
   Services Grid (homepage)
   =========================== */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}
.service-card {
  background: var(--white);
  padding: 44px 36px;
  transition: background var(--ease);
}
.service-card:hover {
  background: var(--bg);
}
.service-num {
  font-family: var(--serif);
  font-size: 2.8rem;
  color: var(--accent);
  opacity: 0.35;
  line-height: 1;
  margin-bottom: 18px;
}
.service-card h3 {
  margin-bottom: 10px;
  font-size: 1.1rem;
}
.service-card p {
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.65;
  margin: 0;
}

.services-cta {
  text-align: center;
  margin-top: 52px;
}

/* ===========================
   Intro / About preview
   =========================== */
.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.split-layout--reverse .split-text {
  order: 2;
}
.split-layout--reverse .split-visual {
  order: 1;
}

.split-text h2 {
  margin-bottom: 8px;
}
.split-text .text-muted {
  color: var(--text-muted);
  font-size: 1rem;
}

.info-box {
  background: var(--navy);
  padding: 0;
}
.info-item {
  padding: 32px 40px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  gap: 24px;
}
.info-item:last-child {
  border-bottom: none;
}
.info-icon {
  width: 36px;
  height: 36px;
  min-width: 36px;
  color: var(--accent);
  opacity: 0.85;
}
.info-item-text strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.1rem;
  color: var(--white);
  font-weight: 600;
}
.info-item-text span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.5);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ===========================
   CTA Band
   =========================== */
.cta-band {
  background: var(--navy);
  padding: 80px 0;
  text-align: center;
}
.cta-band h2 {
  color: var(--white);
  margin-bottom: 12px;
}
.cta-band p {
  color: rgba(255, 255, 255, 0.6);
  max-width: 500px;
  margin: 0 auto 36px;
}

/* ===========================
   Service Detail (services page)
   =========================== */
.service-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 72px;
  align-items: center;
  padding: 72px 0;
  border-bottom: 1px solid var(--border);
}
.service-detail:last-child {
  border-bottom: none;
}
.service-detail.alt .detail-text {
  order: 2;
}
.service-detail.alt .detail-visual {
  order: 1;
}

.detail-visual {
  background: var(--bg);
  aspect-ratio: 5/4;
  display: flex;
  align-items: center;
  justify-content: center;
}
.detail-visual-inner {
  text-align: center;
  padding: 40px;
}
.detail-visual-inner svg {
  width: 72px;
  height: 72px;
  color: var(--accent);
  opacity: 0.55;
  margin: 0 auto 16px;
}
.detail-visual-inner span {
  font-family: var(--serif);
  font-size: 4rem;
  color: var(--navy);
  opacity: 0.07;
  display: block;
  margin-top: 8px;
}

.detail-text .service-num {
  font-size: 3.5rem;
  opacity: 0.15;
  margin-bottom: 4px;
}
.detail-text h2 {
  font-size: clamp(1.4rem, 2.5vw, 1.9rem);
  margin-bottom: 4px;
}
.detail-text > p {
  color: var(--text-muted);
}

.service-items {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.service-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.service-item::before {
  content: "";
  display: block;
  width: 18px;
  height: 18px;
  min-width: 18px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2329ABE2' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  margin-top: 2px;
}

/* ===========================
   About (chi siamo page)
   =========================== */
.about-lead {
  font-family: var(--serif);
  font-size: clamp(1.25rem, 2.5vw, 1.65rem);
  font-weight: 400;
  font-style: italic;
  color: var(--navy);
  line-height: 1.45;
  padding-left: 24px;
  border-left: 3px solid var(--accent);
  margin: 32px 0 32px;
}
.about-body {
  color: var(--text-muted);
  font-size: 1rem;
}
.about-body p {
  margin-bottom: 1.25rem;
}

/* ===========================
   Contact (contatti page)
   =========================== */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: 72px;
  align-items: start;
}
.contact-info-block {
  margin-bottom: 32px;
}
.contact-info-block h3 {
  margin-bottom: 20px;
  font-size: 1.2rem;
}

.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 22px;
}
.contact-item-icon {
  width: 40px;
  height: 40px;
  min-width: 40px;
  background: var(--bg);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
  flex-shrink: 0;
}
.contact-item-icon svg {
  width: 18px;
  height: 18px;
}
.contact-item-body strong {
  display: block;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy);
  font-weight: 600;
  margin-bottom: 4px;
}
.contact-item-body p,
.contact-item-body a {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.55;
  margin: 0;
}
.contact-item-body a:hover {
  color: var(--accent);
}

.contact-form-wrap {
  background: var(--bg);
  padding: 48px;
}
.contact-form-wrap h3 {
  margin-bottom: 28px;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.form-group {
  margin-bottom: 20px;
}
.form-group label {
  display: block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--navy);
  margin-bottom: 8px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  background: var(--white);
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--text);
  border-radius: var(--radius);
  transition: border-color var(--ease);
  outline: none;
  appearance: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}
.form-group textarea {
  resize: vertical;
  min-height: 130px;
}

/* ===========================
   Footer
   =========================== */
.site-footer {
  background: var(--navy-dark);
  color: rgba(255, 255, 255, 0.6);
  padding: 72px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.footer-desc {
  font-size: 0.88rem;
  line-height: 1.65;
  max-width: 280px;
  color: rgba(255, 255, 255, 0.5);
}
.footer-idi {
  font-size: 0.76rem;
  color: rgba(255, 255, 255, 0.3);
  margin-top: 10px;
  letter-spacing: 0.04em;
}
.footer-col h4 {
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9);
  margin-bottom: 20px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col li {
  font-size: 0.875rem;
  line-height: 1.5;
}
.footer-col a {
  color: rgba(255, 255, 255, 0.55);
  transition: color var(--ease);
}
.footer-col a:hover {
  color: var(--accent);
}
.footer-col .footer-subhead {
  display: block;
  font-family: var(--sans);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 28px;
  margin-bottom: 16px;
}

.footer-bottom {
  padding: 22px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.3);
  flex-wrap: wrap;
  gap: 8px;
}
.footer-bottom a {
  color: rgba(255, 255, 255, 0.3);
  transition: color var(--ease);
}
.footer-bottom a:hover {
  color: var(--accent);
}

/* ===========================
   Animations
   =========================== */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.fade-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===========================
   Responsive – Tablet (≤1024px)
   =========================== */
@media (max-width: 1024px) {
  :root {
    --pad-sec: 72px;
  }

  .values-grid {
    gap: 20px;
  }
  .services-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .split-layout {
    gap: 48px;
  }

  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }
  .footer-grid > :first-child {
    grid-column: 1 / -1;
  }

  .service-detail {
    gap: 48px;
  }
}

/* ===========================
   Responsive – Mobile (≤768px)
   =========================== */
@media (max-width: 768px) {
  :root {
    --pad-sec: 56px;
    --nav-h: 64px;
  }

  /* -------------------------------------------------------
     FIX CRITICO: backdrop-filter sul genitore crea un nuovo
     containing block per position:fixed nei figli, rendendo
     il menu overlay ancorato all'header (67px) invece che al
     viewport. Soluzione: rimuovere backdrop-filter su mobile.
  ------------------------------------------------------- */
  .site-header {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: rgba(255, 255, 255, 0.99);
  }

  /* ── Nav toggle ── */
  .nav-toggle {
    display: flex;
  }
  .nav-logo img {
    height: 36px;
  }

  /* ── Menu overlay full-screen ── */
  .nav-menu {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--white);
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 28px;
    z-index: 199;
    overflow-y: auto;
    /* Linea di separazione sotto l'header */
    border-top: 1px solid var(--border);
  }
  .nav-menu.is-open {
    display: flex;
  }
  .nav-link {
    font-size: 1.05rem;
    letter-spacing: 0.07em;
    color: var(--navy);
  }
  .nav-link.is-active {
    color: var(--accent);
  }

  /* ── Hero ── */
  .hero {
    min-height: 88vh;
  }

  /* h1 leggermente ridotto per non schiacciare il subtitle */
  .hero h1 {
    font-size: clamp(1.6rem, 6vw, 2.4rem);
  }

  /* Subtitle: font più piccolo, rimuove il <br> forzato desktop */
  .hero-sub {
    font-size: 0.9rem;
    line-height: 1.65;
    margin: 12px 0 32px;
  }
  .hero-sub br {
    display: none;
  }

  /* Bottoni hero in colonna, larghezza uniforme */
  .hero-actions {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }
  .hero-actions .btn {
    width: 100%;
    max-width: 300px;
    text-align: center;
  }

  /* ── Griglie → colonna singola ── */
  .values-grid,
  .services-grid,
  .split-layout,
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .service-detail {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  /* Reset ordine per layout alternati */
  .service-detail.alt .detail-text,
  .service-detail.alt .detail-visual {
    order: 0;
  }
  .split-layout--reverse .split-text,
  .split-layout--reverse .split-visual {
    order: 0;
  }

  /* ── Footer ── */
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .footer-grid > :first-child {
    grid-column: auto;
  }
  .footer-bottom {
    justify-content: center;
    text-align: center;
  }

  /* ── Form contatti ── */
  .contact-form-wrap {
    padding: 28px 20px;
  }
  .form-row {
    grid-template-columns: 1fr;
  }

  /* ── Page banner ── */
  .page-banner {
    padding: 108px 0 52px;
  }

  /* ── CTA band ── */
  .cta-band {
    padding: 60px 0;
  }
  .cta-band .btn {
    display: block;
    max-width: 260px;
    margin: 8px auto;
  }

  /* ── Info box ── */
  .info-item {
    padding: 24px 24px;
  }

  /* ── Detail visual ── */
  .detail-visual {
    aspect-ratio: 3/2;
    overflow: hidden;
  }
  .detail-visual-inner {
    padding: 20px;
  }
  .detail-visual-inner svg {
    width: 52px;
    height: 52px;
    margin-bottom: 10px;
  }
  .detail-visual-inner span {
    font-size: 2.8rem;
  }
}

/* ===========================
   Responsive – Small (≤480px)
   =========================== */
@media (max-width: 480px) {
  .container {
    padding: 0 18px;
  }
  .btn {
    padding: 13px 26px;
    font-size: 0.76rem;
  }
  .value-card {
    padding: 32px 24px;
  }
  .service-card {
    padding: 32px 24px;
  }
  .page-banner {
    padding: 110px 0 60px;
  }
  .contact-form-wrap {
    padding: 28px 18px;
  }
  .info-item {
    padding: 24px 28px;
  }
}
