/* =========================================================
   Debora Blanco — Psicologa Clinica
   Design system: Warm Mediterranean, sage + terracotta + cream
   ========================================================= */

/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  /* Colors */
  --bg: #F5F1EA;
  --bg-alt: #EFE8DC;
  --card: #FFFEFB;
  --ink: #1F2E29;
  --ink-soft: #475951;
  --muted: #7A8A82;
  --border: #E2D9C8;
  --sage: #6B8174;
  --sage-deep: #4A6157;
  --terracotta: #C46B4D;
  --terracotta-soft: #E9B49A;
  --ochre: #D4A574;
  --peach: #F2D5B6;

  /* Typography */
  --font-display: 'Fraunces', 'Cormorant Garamond', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* Layout */
  --max-w: 1240px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 18px;
  --radius-sm: 10px;
  --radius-lg: 28px;

  /* Motion */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 200ms;
  --t-med: 400ms;
  --t-slow: 700ms;

  /* Shadows */
  --shadow-sm: 0 2px 8px rgba(31, 46, 41, 0.04), 0 1px 2px rgba(31, 46, 41, 0.06);
  --shadow-md: 0 10px 30px -10px rgba(31, 46, 41, 0.12), 0 2px 6px rgba(31, 46, 41, 0.04);
  --shadow-lg: 0 30px 60px -20px rgba(31, 46, 41, 0.18), 0 4px 12px rgba(31, 46, 41, 0.06);
}

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

a { color: var(--sage-deep); text-decoration: none; transition: color var(--t-fast) var(--ease); }
a:hover { color: var(--terracotta); }

/* ---------- Typography ---------- */
.eyebrow {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--terracotta);
  font-weight: 500;
  margin-bottom: 1rem;
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}
.eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--terracotta);
  display: inline-block;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  font-variation-settings: "opsz" 144, "SOFT" 30;
  color: var(--ink);
  line-height: 1.15;
  letter-spacing: -0.015em;
}

h1 { font-size: clamp(2.25rem, 5.2vw, 4.25rem); font-weight: 380; }
h2 { font-size: clamp(1.85rem, 3.6vw, 2.85rem); font-weight: 400; }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.65rem); font-weight: 500; }
h4 { font-size: 1.15rem; font-weight: 500; font-family: var(--font-body); letter-spacing: -0.01em;}

p { color: var(--ink-soft); }
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--ink-soft); }

em, .italic { font-style: italic; font-family: var(--font-display); color: var(--sage-deep); }

/* ---------- Layout helpers ---------- */
.container { width: 100%; max-width: var(--max-w); margin: 0 auto; padding: 0 var(--gutter); }
.section { padding: clamp(4rem, 9vw, 7rem) 0; position: relative; }
.section-tight { padding: clamp(3rem, 6vw, 5rem) 0; }

.grid { display: grid; gap: clamp(1.25rem, 2.5vw, 2rem); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.95rem 1.6rem;
  font-family: var(--font-body);
  font-size: 0.97rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-med) var(--ease);
  text-decoration: none;
  position: relative;
  overflow: hidden;
}
.btn .arrow { transition: transform var(--t-med) var(--ease); display: inline-block; }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover {
  background: var(--sage-deep);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
}

.btn-ghost {
  color: var(--sage-deep);
  padding: 0.5rem 0;
  border-radius: 0;
}
.btn-ghost::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 1px;
  background: currentColor;
  transform: scaleX(1);
  transform-origin: right;
  transition: transform var(--t-med) var(--ease);
}
.btn-ghost:hover { color: var(--terracotta); }
.btn-ghost:hover::after { transform: scaleX(0); transform-origin: left; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 1.1rem 0;
  transition: all var(--t-med) var(--ease);
  background: rgba(245, 241, 234, 0.0);
}
.site-header.scrolled {
  background: rgba(245, 241, 234, 0.86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  box-shadow: 0 1px 0 rgba(31, 46, 41, 0.06);
  padding: 0.75rem 0;
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--ink);
}
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand-text { line-height: 1.1; }
.brand-name {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.brand-role {
  font-size: 0.7rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav-links {
  display: flex;
  list-style: none;
  gap: 0.35rem;
  align-items: center;
}
.nav-links a {
  color: var(--ink);
  font-size: 0.92rem;
  font-weight: 400;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  position: relative;
  transition: all var(--t-fast) var(--ease);
}
.nav-links a:hover { color: var(--sage-deep); }
.nav-links a.active {
  color: var(--sage-deep);
  background: rgba(107, 129, 116, 0.1);
}

/* Dropdown */
.nav-item.has-dropdown { position: relative; }
.nav-item.has-dropdown > a::after {
  content: '';
  display: inline-block;
  margin-left: 0.4rem;
  width: 0; height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 4px solid currentColor;
  vertical-align: middle;
  transition: transform var(--t-fast) var(--ease);
}
.nav-item.has-dropdown:hover > a::after { transform: rotate(180deg); }
.dropdown {
  position: absolute;
  top: 100%; left: 50%;
  transform: translateX(-50%) translateY(8px);
  background: var(--card);
  padding: 0.75rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  min-width: 280px;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transition: all var(--t-med) var(--ease);
  border: 1px solid var(--border);
}
.nav-item.has-dropdown:hover .dropdown,
.nav-item.has-dropdown:focus-within .dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(2px);
}
.dropdown li a {
  display: block;
  padding: 0.7rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.92rem;
}
.dropdown li a:hover { background: var(--bg-alt); }

.nav-cta {
  padding: 0.65rem 1.2rem !important;
  background: var(--ink);
  color: var(--bg) !important;
  font-weight: 500 !important;
  border-radius: 999px;
}
.nav-cta:hover { background: var(--terracotta) !important; }

/* Mobile nav */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  background: none;
  border: none;
  cursor: pointer;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 10px;
  width: 24px;
  height: 2px;
  background: var(--ink);
  transition: all var(--t-med) var(--ease);
}
.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 22px; }
.nav-toggle span:nth-child(3) { top: 28px; }
.nav-toggle.open span:nth-child(1) { top: 22px; transform: rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { top: 22px; transform: rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 8rem 0 5rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -10%;
  right: -15%;
  width: 60%;
  height: 80%;
  background: radial-gradient(circle at center, rgba(196, 107, 77, 0.12), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: float-bg 20s ease-in-out infinite;
}
.hero::after {
  content: '';
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 50%;
  height: 60%;
  background: radial-gradient(circle at center, rgba(107, 129, 116, 0.15), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
  animation: float-bg 25s ease-in-out infinite reverse;
}

@keyframes float-bg {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(30px, -20px) rotate(5deg); }
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4rem);
  position: relative;
  z-index: 1;
}

.hero-text { animation: fade-up 1s var(--ease) 0.1s both; }
.hero h1 {
  margin-bottom: 1.5rem;
}
.hero h1 .accent {
  font-style: italic;
  color: var(--sage-deep);
  font-weight: 350;
}
.hero-sub {
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  color: var(--ink-soft);
  margin-bottom: 2.25rem;
  max-width: 540px;
  line-height: 1.55;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-bottom: 3rem;
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.trust-icon {
  width: 22px; height: 22px;
  flex-shrink: 0;
  color: var(--sage-deep);
}

/* Hero visual / Illustration */
.hero-visual {
  position: relative;
  animation: fade-up 1.2s var(--ease) 0.4s both;
}
.hero-illustration {
  width: 100%;
  aspect-ratio: 4 / 5;
  position: relative;
}
.hero-illustration .shape {
  position: absolute;
  border-radius: 50%;
}
.hero-illustration .shape-1 {
  width: 70%; height: 70%;
  top: 5%; right: 5%;
  background: linear-gradient(135deg, var(--peach), var(--terracotta-soft));
  animation: float-shape 8s ease-in-out infinite;
}
.hero-illustration .shape-2 {
  width: 45%; height: 45%;
  bottom: 10%; left: 0;
  background: linear-gradient(135deg, var(--sage), var(--sage-deep));
  animation: float-shape 10s ease-in-out infinite reverse;
  opacity: 0.85;
}
.hero-illustration .shape-3 {
  width: 28%; height: 28%;
  top: 35%; left: 38%;
  background: linear-gradient(135deg, var(--ochre), var(--terracotta));
  animation: float-shape 7s ease-in-out infinite 0.5s;
}
.hero-illustration .leaf {
  position: absolute;
  width: 22%;
  top: -2%;
  left: 28%;
  color: var(--sage-deep);
  animation: sway 6s ease-in-out infinite;
  transform-origin: bottom center;
}
.hero-illustration .star {
  position: absolute;
  bottom: 18%;
  right: 10%;
  width: 14%;
  color: var(--ochre);
  animation: spin-slow 30s linear infinite;
}

@keyframes float-shape {
  0%, 100% { transform: translate(0, 0); }
  50% { transform: translate(10px, -15px); }
}
@keyframes sway {
  0%, 100% { transform: rotate(-5deg); }
  50% { transform: rotate(5deg); }
}
@keyframes spin-slow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Section header ---------- */
.section-header {
  max-width: 720px;
  margin-bottom: clamp(2.5rem, 5vw, 4rem);
}
.section-header.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-header h2 { margin-bottom: 1rem; }
.section-header p { font-size: 1.05rem; }

/* ---------- Services ---------- */
.services {
  background: linear-gradient(180deg, var(--bg) 0%, var(--bg-alt) 100%);
}
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}
.service-card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 2rem 1.75rem;
  text-decoration: none;
  color: inherit;
  position: relative;
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--t-med) var(--ease);
  display: flex;
  flex-direction: column;
  min-height: 280px;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 60%, var(--accent-fade, rgba(107, 129, 116, 0.08)) 100%);
  opacity: 0;
  transition: opacity var(--t-med) var(--ease);
  pointer-events: none;
}
.service-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: transparent;
}
.service-card:hover::before { opacity: 1; }

.service-card .icon-wrap {
  width: 56px; height: 56px;
  border-radius: 16px;
  display: grid; place-items: center;
  margin-bottom: 1.25rem;
  background: var(--accent-fade, rgba(107, 129, 116, 0.12));
  color: var(--accent, var(--sage-deep));
  transition: transform var(--t-med) var(--ease);
}
.service-card:hover .icon-wrap { transform: scale(1.08) rotate(-5deg); }
.service-card .icon-wrap svg { width: 28px; height: 28px; }

.service-card h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  margin-bottom: 0.6rem;
  letter-spacing: -0.01em;
}
.service-card p {
  font-size: 0.94rem;
  margin-bottom: 1.5rem;
  flex-grow: 1;
}
.service-card .more {
  font-size: 0.88rem;
  color: var(--sage-deep);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  letter-spacing: 0.01em;
}
.service-card .more::after {
  content: '→';
  transition: transform var(--t-med) var(--ease);
}
.service-card:hover .more::after { transform: translateX(5px); }

/* color variants */
.service-card.sage   { --accent: var(--sage-deep);  --accent-fade: rgba(107, 129, 116, 0.12); }
.service-card.terra  { --accent: var(--terracotta); --accent-fade: rgba(196, 107, 77, 0.13); }
.service-card.ochre  { --accent: #B5894F;           --accent-fade: rgba(212, 165, 116, 0.18); }
.service-card.deep   { --accent: var(--sage-deep);  --accent-fade: rgba(74, 97, 87, 0.13); }

/* ---------- Two-column section ---------- */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.two-col-image {
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--sage) 0%, var(--sage-deep) 100%);
  box-shadow: var(--shadow-md);
}
.two-col-image.has-photo {
  background: var(--bg);
}
.two-col-image picture,
.two-col-image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.two-col-image img {
  object-fit: cover;
  object-position: center;
}
.two-col-image.has-logo img {
  object-fit: contain;
  padding: 1rem;
}
.two-col-image .pattern {
  position: absolute;
  inset: 0;
  opacity: 0.25;
  background-image:
    radial-gradient(circle at 20% 20%, var(--peach) 0%, transparent 50%),
    radial-gradient(circle at 80% 70%, var(--terracotta-soft) 0%, transparent 50%);
}
.two-col-image .badge {
  position: absolute;
  bottom: 2rem; left: 2rem;
  background: var(--card);
  padding: 1rem 1.25rem;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  max-width: 240px;
}
.two-col-image .badge-num {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
}
.two-col-image .badge-label {
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-top: 0.3rem;
}

/* For images replacing the gradient block */
.two-col-image.has-photo { background: var(--bg-alt); }
.two-col-image.has-photo img { width: 100%; height: 100%; object-fit: cover; }

.two-col-text h2 { margin-bottom: 1.5rem; }
.two-col-text p { margin-bottom: 1rem; }
.two-col-text .btn { margin-top: 1.5rem; }

/* ---------- Disturbi list (numbered) ---------- */
.disturbi-section { background: var(--bg-alt); }
.disturbi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-top: 3rem;
}
.disturbi-item {
  background: var(--card);
  padding: 1.75rem 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  transition: all var(--t-med) var(--ease);
  position: relative;
  overflow: hidden;
}
.disturbi-item:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--terracotta-soft);
}
.disturbi-item .num {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--terracotta);
  line-height: 1;
  display: block;
  margin-bottom: 0.6rem;
}
.disturbi-item h4 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}

/* ---------- Quote / Testimonial ---------- */
.quote-section {
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: var(--ink);
  color: var(--bg);
  position: relative;
  overflow: hidden;
}
.quote-section::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(196, 107, 77, 0.18), transparent 70%);
  pointer-events: none;
}
.quote-block {
  max-width: 880px;
  margin: 0 auto;
  text-align: center;
  position: relative;
  z-index: 1;
}
.quote-block .quote-mark {
  font-family: var(--font-display);
  font-size: 6rem;
  line-height: 1;
  color: var(--terracotta);
  display: block;
  margin-bottom: 0.5rem;
}
.quote-block blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 2.8vw, 2.1rem);
  font-weight: 350;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--bg);
  margin-bottom: 1.5rem;
  font-style: italic;
}
.quote-block cite {
  font-style: normal;
  font-size: 0.85rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--peach);
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 2rem;
  text-align: center;
}
.stat .num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.8rem);
  font-weight: 400;
  color: var(--sage-deep);
  line-height: 1;
  display: block;
}
.stat .label {
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}

/* ---------- Page header (interior pages) ---------- */
.page-header {
  padding: 11rem 0 4rem;
  position: relative;
  overflow: hidden;
  background: var(--bg);
}
.page-header::before {
  content: '';
  position: absolute;
  top: 50%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(196, 107, 77, 0.1), transparent 70%);
  pointer-events: none;
}
.page-header .container { position: relative; z-index: 1; }
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--ink-soft); }
.breadcrumb a:hover { color: var(--terracotta); }
.breadcrumb .sep { opacity: 0.5; }

.page-header h1 { max-width: 880px; margin-bottom: 1rem; }
.page-header .subtitle { max-width: 640px; font-size: 1.1rem; color: var(--ink-soft); }

/* ---------- Article content (interior pages) ---------- */
.article-body {
  max-width: 760px;
  margin: 0 auto;
  font-size: 1.05rem;
}
.article-body p {
  margin-bottom: 1.25rem;
  line-height: 1.75;
}
.article-body h2 {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  margin: 3rem 0 1.25rem;
  position: relative;
  padding-left: 1.25rem;
}
.article-body h2::before {
  content: '';
  position: absolute;
  left: 0; top: 0.4em;
  bottom: 0.4em;
  width: 4px;
  background: var(--terracotta);
  border-radius: 4px;
}
.article-body h3 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 500;
  margin: 2rem 0 0.85rem;
  color: var(--ink);
}
.article-body h3 .num {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--terracotta);
  color: var(--bg);
  font-size: 0.95rem;
  font-family: var(--font-body);
  font-weight: 500;
  margin-right: 0.7rem;
  vertical-align: middle;
}

.article-body ul, .article-body ol { margin: 1rem 0 1.5rem 1.5rem; }
.article-body li {
  margin-bottom: 0.65rem;
  color: var(--ink-soft);
  line-height: 1.7;
}
.article-body li::marker { color: var(--terracotta); }

.article-body strong { color: var(--ink); font-weight: 600; }

.callout {
  background: var(--card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--terracotta);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius);
  margin: 2rem 0;
}
.callout p { margin: 0; font-size: 1rem; }
.callout p + p { margin-top: 0.75rem; }

/* ---------- Formazione timeline ---------- */
.timeline {
  position: relative;
  max-width: 760px;
  margin: 3rem auto 0;
  padding-left: 2rem;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 8px; top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(180deg, var(--terracotta), var(--sage), transparent);
}
.timeline-item {
  position: relative;
  padding-bottom: 2.5rem;
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.4rem;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--card);
  border: 2px solid var(--terracotta);
  box-shadow: 0 0 0 4px var(--bg);
  transition: all var(--t-med) var(--ease);
}
.timeline-item:hover::before { background: var(--terracotta); transform: scale(1.2); }
.timeline-item .year {
  font-family: var(--font-display);
  font-style: italic;
  color: var(--terracotta);
  font-size: 1.1rem;
  margin-bottom: 0.3rem;
  font-weight: 500;
}
.timeline-item h4 {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 500;
  margin-bottom: 0.3rem;
  color: var(--ink);
}
.timeline-item .place {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 0.5rem;
}
.timeline-item .desc {
  font-size: 0.92rem;
  color: var(--ink-soft);
  line-height: 1.6;
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-info {
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border: 1px solid var(--border);
  position: sticky;
  top: 100px;
}
.contact-info h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}
.contact-info > p { margin-bottom: 2rem; font-size: 0.95rem; }

.contact-method {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--border);
}
.contact-method:first-of-type { border-top: none; padding-top: 0; }
.contact-method .icon {
  width: 40px; height: 40px;
  border-radius: 12px;
  background: rgba(196, 107, 77, 0.12);
  color: var(--terracotta);
  display: grid; place-items: center;
  flex-shrink: 0;
}
.contact-method .icon svg { width: 20px; height: 20px; }
.contact-method .info-label {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}
.contact-method .info-value {
  font-size: 1rem;
  color: var(--ink);
  font-weight: 500;
}
.contact-method a.info-value:hover { color: var(--terracotta); }

.contact-form {
  background: var(--card);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.contact-form h3 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 500;
  margin-bottom: 0.4rem;
}
.contact-form > p { margin-bottom: 2rem; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.form-group {
  margin-bottom: 1.25rem;
  position: relative;
}
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.4rem;
  letter-spacing: 0.01em;
}
.form-group label .req { color: var(--terracotta); }
.form-control {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  font-family: var(--font-body);
  font-size: 0.97rem;
  color: var(--ink);
  transition: all var(--t-fast) var(--ease);
}
.form-control:focus {
  outline: none;
  border-color: var(--sage);
  background: var(--card);
  box-shadow: 0 0 0 4px rgba(107, 129, 116, 0.1);
}
textarea.form-control { resize: vertical; min-height: 130px; }

.form-consent {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.82rem;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}
.form-consent input { margin-top: 0.25rem; accent-color: var(--terracotta); }
.form-consent a { color: var(--sage-deep); text-decoration: underline; }

.form-status {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  background: rgba(107, 129, 116, 0.12);
  color: var(--sage-deep);
  font-size: 0.92rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.is-loading {
  background: rgba(212, 165, 116, 0.16);
  color: #8a6a3f;
}
.form-status.is-success {
  background: rgba(107, 129, 116, 0.16);
  color: var(--sage-deep);
  font-weight: 500;
}
.form-status.is-error {
  background: rgba(196, 107, 77, 0.14);
  color: var(--terracotta);
}

.contact-form button[type="submit"][disabled] {
  opacity: 0.65;
  cursor: progress;
}

/* ---------- CTA Banner ---------- */
.cta-banner {
  background: var(--ink);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 4rem);
  color: var(--bg);
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.5fr auto;
  gap: 2rem;
  align-items: center;
}
.cta-banner::before {
  content: '';
  position: absolute;
  top: -50%; right: -10%;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(196, 107, 77, 0.25), transparent 70%);
  pointer-events: none;
}
.cta-banner::after {
  content: '';
  position: absolute;
  bottom: -50%; left: -10%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(107, 129, 116, 0.2), transparent 70%);
  pointer-events: none;
}
.cta-banner > * { position: relative; z-index: 1; }
.cta-banner h2 {
  color: var(--bg);
  margin-bottom: 0.75rem;
  font-weight: 380;
}
.cta-banner h2 em { color: var(--peach); }
.cta-banner p { color: rgba(245, 241, 234, 0.78); max-width: 540px; font-size: 1.05rem; }
.cta-banner .btn-primary { background: var(--peach); color: var(--ink); }
.cta-banner .btn-primary:hover { background: var(--bg); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--bg-alt);
  padding: 4rem 0 2rem;
  border-top: 1px solid var(--border);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}
.footer-brand .brand { margin-bottom: 1rem; }
.footer-brand p {
  font-size: 0.9rem;
  color: var(--ink-soft);
  margin-bottom: 1.25rem;
  max-width: 320px;
}
.footer-col h5 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  margin-bottom: 1.25rem;
  font-weight: 600;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 0.6rem; }
.footer-col a {
  color: var(--ink-soft);
  font-size: 0.92rem;
  transition: color var(--t-fast) var(--ease);
}
.footer-col a:hover { color: var(--terracotta); }

.social-links {
  display: flex;
  gap: 0.6rem;
  margin-top: 1.25rem;
}
.social-links a {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--card);
  border: 1px solid var(--border);
  display: grid;
  place-items: center;
  color: var(--ink);
  transition: all var(--t-fast) var(--ease);
}
.social-links a:hover {
  background: var(--ink);
  color: var(--bg);
  transform: translateY(-2px);
  border-color: var(--ink);
}
.social-links svg { width: 18px; height: 18px; }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.82rem;
  color: var(--muted);
}
.footer-bottom .legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }
.footer-bottom a { color: var(--ink-soft); }

/* ---------- Scroll reveal (progressive enhancement) ---------- */
/* Content is visible by default. JS opts elements in to animation
   only for those below the fold at load time. If JS fails, the
   IntersectionObserver doesn't fire, or the browser is unusual,
   content remains fully visible and readable. */
.reveal {
  /* visible by default — no JS dependency */
}
.reveal.to-animate {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
  will-change: opacity, transform;
}
.reveal.to-animate.in-view {
  opacity: 1;
  transform: translateY(0);
}
.reveal.to-animate[data-delay="100"] { transition-delay: 0.08s; }
.reveal.to-animate[data-delay="200"] { transition-delay: 0.16s; }
.reveal.to-animate[data-delay="300"] { transition-delay: 0.24s; }
.reveal.to-animate[data-delay="400"] { transition-delay: 0.32s; }

/* ---------- Back to top ---------- */
.to-top {
  position: fixed;
  bottom: 1.5rem; right: 1.5rem;
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--bg);
  display: grid; place-items: center;
  opacity: 0;
  visibility: hidden;
  transform: translateY(20px);
  transition: all var(--t-med) var(--ease);
  z-index: 50;
  box-shadow: var(--shadow-md);
  border: none;
  cursor: pointer;
}
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--terracotta); transform: translateY(-3px); }

/* ---------- Floating WhatsApp ---------- */
.fab-whatsapp {
  position: fixed;
  bottom: 1.5rem; left: 1.5rem;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: #25D366;
  color: white;
  display: grid; place-items: center;
  z-index: 49;
  box-shadow: var(--shadow-md);
  transition: transform var(--t-med) var(--ease);
}
.fab-whatsapp:hover { transform: scale(1.08); color: white; }
.fab-whatsapp::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 2px solid #25D366;
  opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
}
@keyframes pulse {
  0% { transform: scale(1); opacity: 0.5; }
  100% { transform: scale(1.4); opacity: 0; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { max-width: 380px; margin: 0 auto; order: -1; }
  .two-col { grid-template-columns: 1fr; gap: 3rem; }
  .two-col-image { max-width: 480px; margin: 0 auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .cta-banner { grid-template-columns: 1fr; text-align: left; }
}

@media (max-width: 760px) {
  .nav-toggle { display: block; z-index: 101; }
  /* Fix menu mobile: il backdrop-filter dell'header (quando scrolled) crea un
     containing block che ritaglia il menu fisso all'altezza dell'header.
     Su mobile usiamo uno sfondo pieno senza blur, così il menu copre tutto lo schermo. */
  .site-header.scrolled {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(245, 241, 234, 0.97);
  }
  .nav-links {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: var(--bg);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    padding: 5rem 2rem 2rem;
    transform: translateX(100%);
    transition: transform var(--t-med) var(--ease);
    z-index: 99;
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    font-family: var(--font-display);
    font-size: 1.6rem;
    padding: 0.5rem 1rem;
  }
  .nav-item.has-dropdown > a::after { display: none; }
  /* Fix: centra "Servizi" e il suo sottomenu nel menu mobile
     (il <li> è più largo per via delle voci lunghe del dropdown) */
  .nav-item.has-dropdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .dropdown {
    position: static;
    opacity: 1; visibility: visible;
    transform: none;
    box-shadow: none;
    border: none;
    background: transparent;
    text-align: center;
    padding: 0;
    margin-top: 0.5rem;
  }
  .dropdown li a {
    font-size: 0.95rem;
    font-family: var(--font-body);
    color: var(--ink-soft);
    padding: 0.4rem;
  }
  .hero { padding: 7rem 0 4rem; min-height: auto; }
  .form-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; }
  .fab-whatsapp { width: 50px; height: 50px; bottom: 1rem; left: 1rem; }
  .to-top { width: 44px; height: 44px; bottom: 1rem; right: 1rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal, .reveal.to-animate { opacity: 1; transform: none; }
}

/* =========================================================
   BLOG — index + post pages
   ========================================================= */

/* ---------- Blog index grid ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

/* Post card on the index */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--card);
  border-radius: var(--radius-lg);
  padding: 2rem 2rem 1.75rem;
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(31, 46, 41, 0.08);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
  position: relative;
  overflow: hidden;
}
.post-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--sage);
  transition: height 0.3s var(--ease);
}
.post-card.terra::before { background: var(--terracotta); }
.post-card.ochre::before { background: var(--ochre); }
.post-card.sage::before { background: var(--sage); }
.post-card.deep::before { background: var(--sage-deep); }
.post-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
  border-color: rgba(31, 46, 41, 0.16);
}
.post-card:hover::before { height: 6px; }
.post-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
  gap: 1rem;
  flex-wrap: wrap;
}
.post-card-tag {
  font-family: var(--font-body);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.35rem 0.75rem;
  border-radius: 100px;
  background: rgba(107, 129, 116, 0.12);
  color: var(--sage-deep);
}
.post-card.terra .post-card-tag { background: rgba(196, 107, 77, 0.12); color: var(--terracotta); }
.post-card.ochre .post-card-tag { background: rgba(212, 165, 116, 0.18); color: #8B6332; }
.post-card.sage .post-card-tag { background: rgba(107, 129, 116, 0.14); color: var(--sage-deep); }
.post-card.deep .post-card-tag { background: rgba(74, 97, 87, 0.14); color: var(--sage-deep); }
.post-card-date {
  font-size: 0.85rem;
  color: var(--ink-soft);
}
.post-card h2 {
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 1.8vw, 1.5rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 0.85rem;
  color: var(--ink);
}
.post-card-excerpt {
  color: var(--ink-soft);
  font-size: 0.95rem;
  line-height: 1.55;
  flex-grow: 1;
  margin-bottom: 1.5rem;
}
.post-card-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 1rem;
  border-top: 1px solid rgba(31, 46, 41, 0.08);
  font-size: 0.88rem;
}
.post-card-readtime { color: var(--ink-soft); }
.post-card .card-link {
  color: var(--terracotta);
  font-weight: 500;
}

/* ---------- Post hero (per-article header) ---------- */
.post-hero {
  padding: clamp(7rem, 12vw, 9rem) 0 clamp(3rem, 6vw, 4.5rem);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  position: relative;
  overflow: hidden;
}
.post-hero.sage      { background: linear-gradient(135deg, #E8EEE8 0%, #D8E2D5 100%); }
.post-hero.terra     { background: linear-gradient(135deg, #F4DDD2 0%, #ECC9B8 100%); }
.post-hero.ochre     { background: linear-gradient(135deg, #F4E3CD 0%, #ECCFA8 100%); }
.post-hero.deep      { background: linear-gradient(135deg, #D8E0DB 0%, #B8C7C0 100%); }
.post-hero::after {
  content: "";
  position: absolute;
  top: -30%;
  right: -10%;
  width: 50%;
  height: 160%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.4) 0%, transparent 60%);
  pointer-events: none;
}
.post-hero .breadcrumb { margin-bottom: 1.5rem; }
.post-category {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.4rem 0.9rem;
  border-radius: 100px;
  background: var(--card);
  color: var(--ink);
  margin-bottom: 1.5rem;
}
.post-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.2vw, 2.85rem);
  font-weight: 400;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 1.5rem;
  max-width: 850px;
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  align-items: center;
  font-size: 0.95rem;
  color: var(--ink-soft);
}
.post-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.post-meta-item:not(:last-child)::after {
  content: "·";
  color: var(--ink-soft);
  opacity: 0.5;
  margin-left: 1.5rem;
}

/* ---------- Post body ---------- */
.post-body {
  max-width: 760px;
  padding-bottom: 3rem;
}
.post-lead {
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1.8vw, 1.35rem);
  font-weight: 300;
  line-height: 1.55;
  color: var(--ink);
  margin: 0 0 1.5rem;
}
.post-body p {
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
  margin: 0 0 1.25rem;
}
.post-body p strong { color: var(--ink); font-weight: 600; }
.post-body a { color: var(--terracotta); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.post-body a:hover { color: var(--terracotta-deep, #A85A3F); }
.post-body ul, .post-body ol {
  margin: 0 0 1.5rem;
  padding-left: 1.5rem;
}
.post-body ul li, .post-body ol li {
  font-size: 1.05rem;
  line-height: 1.7;
  margin-bottom: 0.6rem;
  color: var(--ink);
}
.post-body ul li::marker { color: var(--terracotta); }
.post-body ol li::marker { color: var(--sage-deep); font-weight: 600; }

.post-section {
  margin: 2.5rem 0;
}
.post-section-title {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 2.4vw, 1.7rem);
  font-weight: 400;
  line-height: 1.25;
  margin: 0 0 1.25rem;
  display: flex;
  align-items: baseline;
  gap: 0.75rem;
  color: var(--ink);
}
.post-section-icon {
  font-size: 1.2em;
  display: inline-flex;
  flex-shrink: 0;
}
.post-body h4 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 500;
  margin: 1.75rem 0 0.5rem;
  color: var(--ink);
}

.post-body .callout {
  background: var(--bg-alt, #EFE9DD);
  border-left: 4px solid var(--terracotta);
  padding: 1.5rem 1.75rem;
  border-radius: 0 var(--radius) var(--radius) 0;
  margin: 2rem 0;
}
.post-body .callout p { margin: 0 0 0.75rem; font-size: 1rem; }
.post-body .callout p:last-child { margin: 0; }

/* ---------- Tags at end of post ---------- */
.post-tags {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(31, 46, 41, 0.08);
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.post-tags-label {
  font-size: 0.9rem;
  color: var(--ink-soft);
  font-weight: 500;
}
.post-tag {
  font-size: 0.85rem;
  color: var(--sage-deep);
  background: rgba(107, 129, 116, 0.1);
  padding: 0.3rem 0.7rem;
  border-radius: 100px;
}

/* ---------- Related posts ---------- */
.related-posts-section {
  background: var(--bg-alt, #EFE9DD);
}
.related-posts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}
.post-card-mini {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  background: var(--card);
  padding: 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink);
  border: 1px solid rgba(31, 46, 41, 0.08);
  transition: transform 0.3s var(--ease), border-color 0.3s var(--ease);
  position: relative;
  overflow: hidden;
}
.post-card-mini::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 4px; height: 100%;
  background: var(--sage);
}
.post-card-mini.terra::before { background: var(--terracotta); }
.post-card-mini.ochre::before { background: var(--ochre); }
.post-card-mini.sage::before { background: var(--sage); }
.post-card-mini.deep::before { background: var(--sage-deep); }
.post-card-mini:hover {
  transform: translateY(-3px);
  border-color: rgba(31, 46, 41, 0.16);
}
.post-card-mini h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.3;
  margin: 0;
  color: var(--ink);
}

/* ---------- Responsive: stack tag/date in card header on small screens ---------- */
@media (max-width: 480px) {
  .post-card-header { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .post-meta-item:not(:last-child)::after { display: none; }
  .post-meta { gap: 0.3rem 1rem; }
}
