@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;600&family=Syne:wght@700;800&display=swap');

:root {
  --ink: #141210;
  --alabaster: #F5F0E7;
  --stone: #D9CFBE;
  --olive: #2E3A2A;
  --coral: #FF5A2E;
  --font-display: 'Syne', 'Space Grotesk', sans-serif;
  --font-body: 'Manrope', system-ui, sans-serif;
  --max-width: 1200px;
  --section-pad: clamp(3.5rem, 8vw, 8rem);
  --header-h: 72px;
  --radius: 4px;
  --shadow-soft: 0 8px 32px rgba(20, 18, 16, 0.12);
  --shadow-hard: 0 2px 0 rgba(20, 18, 16, 0.08);
  --transition: 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

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

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-weight: 400;
}

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

a {
  color: currentColor;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover { opacity: 0.85; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.12;
  font-weight: 800;
  margin-top: 0;
}

h1 { font-size: clamp(2.25rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.75rem, 3.5vw, 2.5rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); font-weight: 700; }

p { margin: 0 0 1.25rem; }

ul, ol { margin: 0 0 1.25rem; padding-left: 1.35rem; }

.surface-ink { background-color: var(--ink); color: var(--alabaster); }
.surface-olive { background-color: var(--olive); color: var(--alabaster); }
.surface-light { background-color: var(--alabaster); color: var(--ink); }
.surface-stone { background-color: var(--stone); color: var(--ink); }
.surface-coral { background-color: var(--coral); color: var(--ink); }

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--coral);
  margin-bottom: 1rem;
}

.text-coral { color: var(--coral); }

.container {
  width: min(100% - 2.5rem, var(--max-width));
  margin-inline: auto;
}

/* Header */
.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  transition: background var(--transition), box-shadow var(--transition), padding var(--transition);
}

.site-header .header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 1.25rem clamp(1.25rem, 4vw, 2.5rem);
  max-width: 1400px;
  margin-inline: auto;
}

.site-header.is-scrolled {
  background: rgba(20, 18, 16, 0.96);
  backdrop-filter: blur(12px);
  box-shadow: var(--shadow-hard);
}

.site-header.is-scrolled .header-inner { padding-block: 0.75rem; }

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(0.95rem, 2.2vw, 1.15rem);
  letter-spacing: 0.02em;
  text-decoration: none;
}

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

.main-nav a {
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 600;
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid currentColor;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.875rem;
  border-radius: var(--radius);
  color: inherit;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem 1.75rem;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  transition: filter var(--transition), box-shadow var(--transition), transform var(--transition);
}

.btn:hover {
  filter: brightness(1.06);
  box-shadow: var(--shadow-soft);
  opacity: 1;
}

.btn-primary.surface-coral,
a.btn-primary {
  background-color: var(--coral);
  color: var(--ink);
}

.btn-outline {
  background: transparent;
  border: 1px solid currentColor;
  color: inherit;
}

.btn-outline:hover { filter: brightness(1.1); box-shadow: none; }

.header-cta { white-space: nowrap; }

/* Corrente motif */
.corrente-mark {
  width: 48px;
  height: 24px;
  flex-shrink: 0;
}

.corrente-mark svg { width: 100%; height: 100%; }

.section-heading {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 2.5rem;
}

/* Hero — Campo Vivo */
.hero-campo {
  position: relative;
  min-height: 78vh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-color: var(--ink);
  background-image: linear-gradient(to top, rgba(20, 18, 16, 0.97) 0%, rgba(20, 18, 16, 0.88) 40%, rgba(20, 18, 16, 0.62) 100%),
    url('/images/vivido-01-hero-studio.jpg');
  background-size: cover;
  background-position: center;
  padding-top: calc(var(--header-h) + 2rem);
}

.hero-campo__content {
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.25rem, 4vw, 2.5rem) 2.5rem;
  max-width: 640px;
  margin-inline: auto 0;
  margin-left: clamp(1.25rem, 4vw, 2.5rem);
  width: calc(100% - clamp(2.5rem, 8vw, 5rem));
  position: relative;
}

.hero-campo h1 {
  font-size: clamp(2rem, 4.2vw, 3rem);
  max-width: 16ch;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
  text-shadow: 0 2px 20px rgba(20, 18, 16, 0.45);
}

.hero-campo__lead {
  font-family: var(--font-display);
  font-size: clamp(1.125rem, 2vw, 1.375rem);
  font-weight: 700;
  line-height: 1.35;
  margin: 0 0 1rem;
  max-width: 28ch;
  text-shadow: 0 1px 16px rgba(20, 18, 16, 0.4);
}

.hero-campo__sub {
  max-width: 42ch;
  font-size: 1rem;
  line-height: 1.6;
  opacity: 0.92;
  margin-bottom: 1.75rem;
  text-shadow: 0 1px 12px rgba(20, 18, 16, 0.35);
}

.hero-campo .eyebrow {
  text-shadow: 0 1px 8px rgba(20, 18, 16, 0.35);
}

.hero-campo__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.875rem;
  margin-bottom: 2rem;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding: 0.75rem 0;
  border-top: 1px solid var(--stone);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--stone);
}

.hero-flow-accent {
  position: absolute;
  right: 8%;
  bottom: 28%;
  opacity: 0.6;
}

/* Sections */
.section { padding-block: var(--section-pad); }

.section--tight { padding-block: clamp(2.5rem, 6vw, 4rem); }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

/* Stats row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  text-align: center;
  padding-block: 2.5rem;
  border-block: 1px solid rgba(20, 18, 16, 0.12);
}

.stat-row__num {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 5vw, 3.75rem);
  font-weight: 800;
  color: var(--coral);
  line-height: 1;
  margin-bottom: 0.35rem;
}

.stat-row__label {
  font-size: 0.875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Pillars */
.pillar-card {
  padding: 2rem;
  border: 1px solid rgba(20, 18, 16, 0.1);
  position: relative;
}

.pillar-card__num {
  font-family: var(--font-display);
  font-size: 3rem;
  font-weight: 800;
  color: var(--coral);
  opacity: 0.25;
  line-height: 1;
  margin-bottom: 0.5rem;
}

/* Programme rail */
.programme-rail {
  position: relative;
  padding-left: 4rem;
}

.programme-rail::before {
  content: '';
  position: absolute;
  left: 1.25rem;
  top: 0;
  bottom: 0;
  width: 3px;
  background: var(--coral);
  transform-origin: top;
}

.js .programme-rail.is-drawn::before {
  animation: railDraw 0.8s ease forwards;
}

@keyframes railDraw {
  from { transform: scaleY(0); }
  to { transform: scaleY(1); }
}

.programme-item {
  position: relative;
  padding: 2rem 0 2rem 1.5rem;
  border-bottom: 1px solid rgba(20, 18, 16, 0.08);
}

.programme-item__bg-num {
  position: absolute;
  left: -3.5rem;
  top: 0.5rem;
  font-family: var(--font-display);
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--coral);
  opacity: 0.08;
  line-height: 1;
  pointer-events: none;
}

/* Photo frames */
.photo-frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
}

.photo-frame img {
  width: 100%;
  aspect-ratio: 4/3;
  object-fit: cover;
}

.photo-frame--tall img { aspect-ratio: 3/4; }
.photo-frame--wide img { aspect-ratio: 16/9; }

.photo-frame__caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  padding: 1rem 1.25rem;
  background: linear-gradient(transparent, rgba(20, 18, 16, 0.75));
  font-size: 0.8125rem;
  color: var(--alabaster);
}

/* Editorial split */
.editorial-split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
  min-height: 480px;
}

.editorial-split__text {
  padding: clamp(2.5rem, 6vw, 5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.editorial-split__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 360px;
}

/* FAQ accordion */
.faq-list { list-style: none; padding: 0; margin: 0; }

.faq-item {
  border-bottom: 1px solid rgba(20, 18, 16, 0.12);
}

.faq-item summary {
  padding: 1.35rem 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 400;
  color: var(--coral);
  flex-shrink: 0;
}

.faq-item[open] summary::after { content: '−'; }

.faq-item__body {
  padding: 0 0 1.35rem;
}

/* Pricing cards */
.price-card {
  padding: 2rem;
  border: 1px solid rgba(20, 18, 16, 0.1);
  display: flex;
  flex-direction: column;
  height: 100%;
}

.price-card__price {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  color: var(--coral);
  margin: 0.75rem 0;
}

.price-card__note {
  font-size: 0.8125rem;
  opacity: 0.75;
  margin-top: auto;
  padding-top: 1rem;
}

/* Forms */
.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.4rem;
}

.form-group input:not([type="checkbox"]):not([type="radio"]),
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.875rem 1rem;
  font-family: var(--font-body);
  font-size: 1rem;
  border: 1px solid rgba(20, 18, 16, 0.2);
  border-radius: var(--radius);
  background: var(--alabaster);
  color: var(--ink);
}

.form-group textarea { min-height: 140px; resize: vertical; }

.form-check {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  font-size: 0.9375rem;
}

.form-check input[type="checkbox"] {
  width: 1.125rem;
  height: 1.125rem;
  margin-top: 0.2rem;
  flex-shrink: 0;
  accent-color: var(--coral);
}

.form-check label {
  display: block;
  flex: 1;
  min-width: 0;
  margin-bottom: 0;
  font-weight: 400;
  line-height: 1.5;
}

.hp-field {
  position: absolute;
  left: -9999px;
  opacity: 0;
  height: 0;
  width: 0;
  overflow: hidden;
}

/* Page heroes — varied layouts */
.page-hero {
  padding: calc(var(--header-h) + 3rem) 0 var(--section-pad);
}

.page-hero--asymmetric {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 3rem;
  align-items: end;
}

.page-hero--stacked {
  text-align: center;
  max-width: 720px;
  margin-inline: auto;
}

.page-hero--split-dark {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 55vh;
  align-items: stretch;
}

.page-hero--split-dark__text {
  padding: calc(var(--header-h) + 3rem) clamp(1.25rem, 4vw, 3rem) 3rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.page-hero--split-dark__img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  min-height: 400px;
}

/* Legal prose */
.legal-prose {
  max-width: 780px;
}

.legal-prose h2 {
  font-size: 1.35rem;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.legal-prose h3 {
  font-size: 1.125rem;
  margin-top: 1.75rem;
}

/* Footer */
.site-footer {
  padding: var(--section-pad) clamp(1.25rem, 4vw, 2.5rem) 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  max-width: var(--max-width);
  margin-inline: auto;
  margin-bottom: 2.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  margin-bottom: 1rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li { margin-bottom: 0.5rem; }

.footer-links a { text-decoration: none; font-size: 0.9375rem; }

.footer-disclaimer {
  font-size: 0.8125rem;
  opacity: 0.8;
  max-width: 900px;
  margin-bottom: 1.5rem;
  line-height: 1.55;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(245, 240, 231, 0.15);
  font-size: 0.8125rem;
  opacity: 0.7;
  max-width: var(--max-width);
  margin-inline: auto;
}

/* Cookie banner */
.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2000;
  padding: 1.25rem clamp(1.25rem, 4vw, 2rem);
  box-shadow: 0 -4px 24px rgba(20, 18, 16, 0.15);
  transform: translateY(0);
}

.cookie-banner[hidden] { display: none; }

.cookie-banner__inner {
  max-width: var(--max-width);
  margin-inline: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.25rem;
  justify-content: space-between;
}

.cookie-banner__text {
  flex: 1 1 320px;
  font-size: 0.9375rem;
  margin: 0;
}

.cookie-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.cookie-banner__actions .btn {
  padding: 0.625rem 1.25rem;
  font-size: 0.875rem;
}

/* Cookie preferences modal */
.cookie-modal[hidden] { display: none; }

.cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(20, 18, 16, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.cookie-modal__panel {
  max-width: 520px;
  width: 100%;
  padding: 2rem;
  border-radius: var(--radius);
  max-height: 90vh;
  overflow-y: auto;
}

.cookie-modal__panel h2 { margin-bottom: 1rem; }

.cookie-option {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
  border-bottom: 1px solid rgba(20, 18, 16, 0.1);
}

/* CTA band */
.cta-band {
  text-align: center;
  padding: clamp(3rem, 8vw, 5rem) 1.5rem;
}

.cta-band h2 { margin-bottom: 1rem; }

.cta-band p {
  max-width: 540px;
  margin-inline: auto;
  opacity: 0.9;
}

/* 404 */
.error-page {
  min-height: 80vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: var(--section-pad) 1.5rem;
}

.error-page h1 { max-width: 20ch; margin-bottom: 1rem; }

/* Reveal animations — JS only */
.js .reveal {
  opacity: 1;
  transform: none;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

@media (prefers-reduced-motion: no-preference) {
  .js .reveal:not(.is-visible) {
    opacity: 0;
    transform: translateY(16px);
  }
}

.js .reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Contact layout */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
}

.contact-form {
  max-width: 100%;
  overflow: hidden;
}

.contact-info-block {
  padding: 2rem;
  border-left: 3px solid var(--coral);
}

.hours-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.hours-table td {
  padding: 0.5rem 0;
  border-bottom: 1px solid rgba(20, 18, 16, 0.08);
}

.hours-table td:last-child { text-align: right; font-weight: 600; }

/* Course detail blocks */
.course-block {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 2.5rem;
  padding: 3rem 0;
  border-bottom: 1px solid rgba(20, 18, 16, 0.08);
  align-items: start;
}

.course-block:nth-child(even) { direction: rtl; }
.course-block:nth-child(even) > * { direction: ltr; }

.course-meta {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--coral);
  margin-bottom: 0.5rem;
}

/* Offerte zigzag */
.offer-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin-bottom: 0;
}

.offer-row:nth-child(even) { direction: rtl; }
.offer-row:nth-child(even) > * { direction: ltr; }

.offer-row__content {
  padding: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Chi siamo timeline */
.story-timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 1px solid var(--stone);
}

.story-timeline__item {
  position: relative;
  padding-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.story-timeline__item::before {
  content: '';
  position: absolute;
  left: -2.35rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  background: var(--coral);
  border-radius: 50%;
}

/* Responsive */
@media (max-width: 960px) {
  .grid-2, .grid-3, .grid-4,
  .editorial-split, .page-hero--asymmetric,
  .page-hero--split-dark, .contact-layout,
  .course-block, .offer-row, .footer-grid {
    grid-template-columns: 1fr;
  }

  .course-block:nth-child(even),
  .offer-row:nth-child(even) { direction: ltr; }

  .stat-row { grid-template-columns: 1fr; gap: 1.5rem; }

  .programme-rail { padding-left: 2.5rem; }

  .hero-campo { min-height: 72vh; }

  .hero-campo__content {
    max-width: none;
    margin-left: auto;
    margin-right: auto;
    width: min(100% - 2.5rem, 640px);
  }

  .nav-toggle { display: block; }

  .main-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: var(--ink);
    flex-direction: column;
    padding: 1.5rem;
    gap: 1.25rem;
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform var(--transition), opacity var(--transition);
  }

  .main-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .header-cta { display: none; }
}

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

  html { scroll-behavior: auto; }

  .js .reveal:not(.is-visible) {
    opacity: 1;
    transform: none;
  }
}
