/* ================================================
   XAVIER PRAT — Coach i Terapeuta
   Paleta: crema càlida · verd sàlvia · lavanda · terracota
   ================================================ */

/* ---------- VARIABLES ---------- */
:root {
  --cream:       #FAF7F2;
  --cream-dark:  #F0EBE1;
  --sage:        #8FAE88;
  --sage-light:  #D4E6D0;
  --sage-dark:   #6A8F63;
  --lavender:    #C4A8D0;
  --lavender-light: #EDE3F4;
  --terra:       #C4826A;
  --terra-dark:  #A96652;
  --text:        #3D3530;
  --text-light:  #7A6E68;
  --white:       #FFFFFF;
  --shadow:      rgba(61, 53, 48, 0.10);
  --shadow-md:   rgba(61, 53, 48, 0.16);

  --font-head:   'Cormorant Garamond', Georgia, serif;
  --font-body:   'Lato', system-ui, sans-serif;

  --radius:      12px;
  --radius-lg:   24px;
  --transition:  0.3s ease;
  --max-w:       1100px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--text);
  line-height: 1.7;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* ---------- HELPERS ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.section { padding: 96px 0; }
.section-alt { background: var(--cream-dark); }
.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--sage-dark);
  margin-bottom: 12px;
}
.section-header { text-align: center; max-width: 640px; margin: 0 auto 64px; }
.section-sub { color: var(--text-light); font-size: 1.05rem; margin-top: 12px; }

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.2; }
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.8rem); }
h3 { font-size: 1.45rem; }
p { margin-bottom: 1em; }
p:last-child { margin-bottom: 0; }

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-block;
  padding: 14px 32px;
  border-radius: 50px;
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
  border: 2px solid transparent;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--terra);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(196, 130, 106, 0.35);
}
.btn-primary:hover {
  background: var(--terra-dark);
  box-shadow: 0 6px 24px rgba(196, 130, 106, 0.45);
}
.btn-ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.6);
}
.btn-ghost:hover { background: rgba(255,255,255,0.12); }
.btn-full { width: 100%; text-align: center; }

/* ---------- NAVBAR ---------- */
#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  transition: background var(--transition), box-shadow var(--transition);
}
#navbar.scrolled {
  background: rgba(250, 247, 242, 0.97);
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px var(--shadow);
}
.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav-logo {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--white);
  transition: color var(--transition);
}
#navbar.scrolled .nav-logo { color: var(--text); }
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 400;
  color: rgba(255,255,255,0.9);
  transition: color var(--transition);
}
#navbar.scrolled .nav-links a { color: var(--text-light); }
.nav-links a:hover { color: var(--terra) !important; }
.btn-nav {
  padding: 8px 20px !important;
  border-radius: 50px;
  border: 1.5px solid rgba(255,255,255,0.6) !important;
}
#navbar.scrolled .btn-nav {
  border-color: var(--terra) !important;
  color: var(--terra) !important;
}
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--white);
  border-radius: 2px;
  transition: background var(--transition);
}
#navbar.scrolled .nav-toggle span { background: var(--text); }

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: linear-gradient(135deg, #4a7a5c 0%, #6b8fa6 40%, #8b7aaa 100%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 70% 40%, rgba(196,168,208,0.25) 0%, transparent 60%),
    radial-gradient(ellipse 60% 80% at 20% 80%, rgba(143,174,136,0.3) 0%, transparent 50%);
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(30,50,40,0.35) 0%, rgba(30,50,40,0.15) 100%);
}
.hero-content {
  position: relative;
  z-index: 2;
  max-width: 700px;
  padding: 120px 24px 80px;
  margin: 0 auto;
  text-align: center;
  color: var(--white);
}
.hero-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.8);
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  padding: 6px 18px;
  border-radius: 50px;
  margin-bottom: 28px;
}
.hero h1 {
  color: var(--white);
  margin-bottom: 20px;
  text-shadow: 0 2px 20px rgba(0,0,0,0.2);
}
.hero-sub {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.88);
  margin-bottom: 40px;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.hero-cta { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }
.hero-scroll-hint {
  position: absolute;
  bottom: 36px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}
.hero-scroll-hint span {
  display: block;
  width: 1px;
  height: 48px;
  background: linear-gradient(to bottom, rgba(255,255,255,0.6), transparent);
  animation: scrollPulse 2s ease-in-out infinite;
}
@keyframes scrollPulse {
  0%, 100% { opacity: 0.4; transform: scaleY(1); }
  50%       { opacity: 1;   transform: scaleY(1.2); transform-origin: top; }
}

/* ---------- ABOUT ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: center;
}
.about-photo-wrap {
  position: relative;
}
.about-photo {
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px var(--shadow-md);
  position: relative;
  z-index: 1;
}
.about-photo-deco {
  position: absolute;
  top: 24px;
  left: 24px;
  right: -24px;
  bottom: -24px;
  background: var(--sage-light);
  border-radius: var(--radius-lg);
  z-index: 0;
}
.about-text .tagline {
  font-family: var(--font-head);
  font-size: 1.15rem;
  color: var(--sage-dark);
  margin-bottom: 20px;
}
.about-text h2 { margin-bottom: 4px; }
.about-text p { color: var(--text-light); }
.about-text .btn { margin-top: 8px; }

/* ---------- CARDS (SOLUCIONS) ---------- */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  box-shadow: 0 4px 24px var(--shadow);
  transition: transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px var(--shadow-md);
}
.card-icon {
  width: 52px;
  height: 52px;
  color: var(--sage-dark);
  margin-bottom: 20px;
}
.card h3 {
  margin-bottom: 12px;
  font-size: 1.3rem;
  color: var(--text);
}
.card p { color: var(--text-light); font-size: 0.95rem; }

/* ---------- SERVEIS ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
  max-width: 780px;
  margin: 0 auto;
}
.services-grid-single {
  grid-template-columns: 1fr;
  max-width: 440px;
}
.service-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: 0 4px 24px var(--shadow);
  position: relative;
  text-align: center;
  transition: transform var(--transition);
}
.service-card:hover { transform: translateY(-6px); }
.service-card-featured {
  background: var(--white);
  border-top: 5px solid var(--sage);
  box-shadow: 0 12px 48px var(--shadow-md);
}
.service-card-featured .service-price { color: var(--terra); }
.service-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--terra);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 16px;
  border-radius: 50px;
  white-space: nowrap;
}
.service-card h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}
.service-price {
  font-family: var(--font-head);
  font-size: 3.5rem;
  font-weight: 300;
  color: var(--terra);
  line-height: 1;
  margin-bottom: 4px;
}
.service-price span { font-size: 1.8rem; }
.service-note {
  font-size: 0.78rem;
  color: var(--text-light);
  margin-bottom: 28px;
  font-style: italic;
}
.service-features {
  text-align: left;
  margin-bottom: 32px;
}
.service-features li {
  padding: 8px 0;
  border-bottom: 1px solid rgba(61,53,48,0.08);
  font-size: 0.9rem;
  color: var(--text-light);
  padding-left: 20px;
  position: relative;
}
.service-card-featured .service-features li {
  border-bottom-color: rgba(255,255,255,0.15);
}
.service-features li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--sage-dark);
  font-weight: 700;
}
.service-card-featured .service-features li::before { color: rgba(255,255,255,0.8); }

/* ---------- VIDEOS ---------- */
.workshop-highlight {
  background: var(--white);
  border-left: 4px solid var(--lavender);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 32px 40px;
  margin-bottom: 52px;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}
.workshop-questions p {
  font-family: var(--font-head);
  font-size: 1.1rem;
  color: var(--text);
  margin-bottom: 6px;
  padding-left: 16px;
  position: relative;
}
.workshop-questions p::before {
  content: '—';
  position: absolute;
  left: 0;
  color: var(--lavender);
}
.workshop-desc {
  margin-top: 20px;
  font-size: 0.9rem;
  color: var(--text-light);
}
.workshop-desc a { color: var(--terra); text-decoration: underline; }
.videos-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
}
.video-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 8px 32px var(--shadow-md);
  aspect-ratio: 16/9;
  background: #111;
  position: relative;
  cursor: pointer;
}
.video-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease, opacity 0.3s ease;
}
.video-wrap:hover .video-thumb { transform: scale(1.04); opacity: 0.85; }
.video-play-btn {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  width: 72px;
  height: 72px;
  transition: transform 0.25s ease;
}
.video-play-btn svg { width: 72px; height: 72px; }
.video-wrap:hover .video-play-btn { transform: translate(-50%, -50%) scale(1.12); }
.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  border: none;
}
.video-wrap-custom { cursor: pointer; }
.video-custom-thumb {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #4a7a5c 0%, #8b7aaa 60%, #c4826a 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: opacity 0.3s ease;
}
.video-wrap-custom:hover .video-custom-thumb { opacity: 0.88; }
.video-custom-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.75);
}
.video-custom-title {
  font-family: var(--font-head);
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--white);
  text-align: center;
  margin: 0;
  padding: 0 20px;
  letter-spacing: 0.05em;
  text-shadow: 0 2px 12px rgba(0,0,0,0.2);
}

/* ---------- CONTACTE ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 80px;
  align-items: start;
}
.contact-info h2 { margin-bottom: 16px; }
.contact-info p { color: var(--text-light); margin-bottom: 36px; }
.contact-items { display: flex; flex-direction: column; gap: 20px; }
.contact-item {
  display: flex;
  align-items: center;
  gap: 16px;
  color: var(--text);
  transition: color var(--transition);
}
.contact-item:hover { color: var(--terra); }
.contact-item-icon {
  width: 44px;
  height: 44px;
  background: var(--cream-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.contact-item-icon svg { width: 20px; height: 20px; }
.contact-social {
  display: flex;
  gap: 12px;
  padding-top: 8px;
}
.social-btn {
  width: 44px;
  height: 44px;
  background: var(--cream-dark);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background var(--transition), transform var(--transition);
}
.social-btn svg { width: 20px; height: 20px; }
.social-btn:hover { background: var(--terra); color: var(--white); transform: translateY(-2px); }

/* FORMULARI */
.contact-form-wrap {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 44px 40px;
  box-shadow: 0 8px 40px var(--shadow);
}
.form-group { margin-bottom: 20px; }
.form-group label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  margin-bottom: 8px;
}
.form-group input,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--cream-dark);
  border-radius: var(--radius);
  background: var(--cream);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  transition: border-color var(--transition);
  outline: none;
  resize: vertical;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--sage); }
.form-privacy {
  margin-top: 12px;
  font-size: 0.78rem;
  color: var(--text-light);
  text-align: center;
}
.form-privacy a { color: var(--terra); text-decoration: underline; }
.form-success {
  background: var(--sage-light);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--sage-dark);
  font-weight: 700;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--text);
  color: rgba(255,255,255,0.7);
  padding: 56px 0;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
  align-items: start;
}
.footer-brand .nav-logo {
  color: var(--white);
  font-size: 1.4rem;
  display: block;
  margin-bottom: 6px;
}
.footer-brand p { font-size: 0.85rem; }
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 0.88rem;
  transition: color var(--transition);
}
.footer-links a:hover { color: var(--terra); }
.footer-legal { font-size: 0.82rem; }
.footer-legal p { margin-bottom: 12px; }
.privacy-details summary {
  cursor: pointer;
  color: rgba(255,255,255,0.5);
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  transition: color var(--transition);
}
.privacy-details summary:hover { color: var(--terra); }
.privacy-content {
  margin-top: 12px;
  padding: 16px;
  background: rgba(255,255,255,0.05);
  border-radius: var(--radius);
  font-size: 0.78rem;
  line-height: 1.6;
}
.privacy-content a { color: var(--terra); }

/* ---------- ANIMATIONS ---------- */
.fade-in { animation: fadeInUp 0.9s ease both; }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
  .cards-grid { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
  .about-grid { grid-template-columns: 1fr; gap: 48px; }
  .about-photo-wrap { max-width: 320px; margin: 0 auto; }
  .about-photo-deco { right: -12px; bottom: -12px; top: 12px; left: 12px; }
  .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .services-grid { grid-template-columns: 1fr; max-width: 420px; }
  .services-grid-single { max-width: 420px; }
  .videos-grid { grid-template-columns: 1fr; max-width: 560px; margin: 0 auto; }
}
@media (max-width: 680px) {
  .section { padding: 56px 0; }
  .container { padding: 0 16px; }

  /* Navbar mòbil */
  .nav-links {
    display: none;
    position: fixed;
    top: 68px; left: 0; right: 0;
    background: var(--cream);
    flex-direction: column;
    padding: 24px 20px;
    gap: 20px;
    box-shadow: 0 8px 24px var(--shadow);
    z-index: 99;
  }
  .nav-links.open { display: flex; }
  .nav-links a { color: var(--text) !important; font-size: 1rem; }
  .btn-nav { border-color: var(--terra) !important; color: var(--terra) !important; text-align: center; }
  .nav-toggle { display: flex; }

  /* Hero */
  .hero-content { padding: 100px 16px 60px; }
  .hero-cta { flex-direction: column; align-items: center; }
  .hero-cta .btn { width: 100%; max-width: 280px; text-align: center; }

  /* About */
  .about-grid { gap: 36px; }
  .about-text .btn { width: 100%; text-align: center; }

  /* Cards */
  .cards-grid { max-width: 100%; }
  .card { padding: 28px 20px; }

  /* Serveis */
  .service-card { padding: 36px 24px; }
  .services-grid-single { max-width: 100%; }

  /* Vídeos */
  .workshop-highlight { padding: 20px 16px; }
  .workshop-questions p { font-size: 1rem; }

  /* Contacte */
  .contact-form-wrap { padding: 24px 16px; }
  .contact-info h2 { font-size: 2rem; }

  /* Footer */
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
  .footer { padding: 40px 0; }
}
