/* =========================================================
   FOMENTUS · Psicologia esportiva i alt rendiment
   ========================================================= */

:root {
  --ink: #12302c;
  --ink-soft: #3d5752;
  --brand: #1d6b5f;
  --brand-dark: #134a42;
  --accent: #3fcfaa;
  --accent-soft: #d9f5ec;
  --sand: #f6f1ea;
  --sand-dark: #ebe2d6;
  --clay: #8b5a3c;
  --white: #ffffff;
  --line: #e2e8e6;
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(18, 48, 44, 0.08);
  --container: 1180px;
  --font-head: "Outfit", system-ui, sans-serif;
  --font-body: "Inter", system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 110px; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, video { max-width: 100%; display: block; }
a { color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.6rem, 6vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 600; }
h3 { font-size: 1.3rem; font-weight: 600; }
p { margin: 0 0 1em; }

.container { width: min(var(--container), 100% - 32px); margin-inline: auto; }
.section { padding: clamp(64px, 9vw, 120px) 0; }
.section--sand { background: var(--sand); }
.section--dark { background: var(--ink); color: var(--white); }
.section--brand { background: var(--brand); color: var(--white); }
.center { text-align: center; }
.narrow { max-width: 760px; margin-inline: auto; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.section--dark .eyebrow,
.section--brand .eyebrow { color: var(--accent); }

.lead { font-size: 1.15rem; color: var(--ink-soft); }
.section--dark .lead, .section--brand .lead { color: rgba(255,255,255,.8); }

.hl { color: var(--brand); }
.section--dark .hl, .section--brand .hl, .hero .hl { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  transition: transform .2s, background .2s, color .2s, border-color .2s;
}
.btn:hover { transform: translateY(-2px); }
.btn--primary { background: var(--accent); color: var(--ink); }
.btn--primary:hover { background: #2fbf9a; }
.btn--dark { background: var(--ink); color: var(--white); }
.btn--dark:hover { background: var(--brand-dark); }
.btn--outline { border-color: currentColor; background: transparent; }
.btn--outline:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.section--dark .btn--outline:hover,
.section--brand .btn--outline:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn svg { width: 18px; height: 18px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.center .btn-row { justify-content: center; }

/* ---------- Top bar + header ---------- */
.topbar {
  background: var(--brand);
  color: var(--white);
  text-align: center;
  font-size: 0.85rem;
  padding: 6px 16px;
  letter-spacing: .04em;
}
.topbar a { text-decoration: none; font-weight: 600; }

.header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255,255,255,.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 76px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}
.brand__logo { width: 42px; height: 42px; flex: none; }
.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__name { font-family: var(--font-head); font-weight: 700; font-size: 1.3rem; letter-spacing: .06em; }
.brand__tag { font-size: .7rem; color: var(--ink-soft); letter-spacing: .04em; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__list { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: .98rem;
  text-decoration: none;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
}
.nav__link:hover, .nav__link[aria-current="page"] { background: var(--accent-soft); color: var(--brand-dark); }
.nav__link .chev { width: 12px; height: 12px; transition: transform .2s; }
.nav__cta { margin-left: 10px; padding: 10px 20px; font-size: .95rem; }

.dropdown {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 240px;
  list-style: none;
  margin: 0;
  padding: 8px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: .2s;
}
.dropdown::before { content: ""; position: absolute; inset: -10px 0 auto; height: 10px; }
.nav__item--has-dd:hover .dropdown,
.nav__item--has-dd:focus-within .dropdown,
.nav__item--has-dd.is-open .dropdown { opacity: 1; visibility: visible; transform: none; }
.nav__item--has-dd:hover .chev,
.nav__item--has-dd.is-open .chev { transform: rotate(180deg); }
.dropdown a {
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  text-decoration: none;
  font-size: .95rem;
}
.dropdown a:hover { background: var(--sand); }
.dropdown small { display: block; color: var(--ink-soft); font-size: .8rem; }

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: var(--sand);
  cursor: pointer;
  align-items: center;
  justify-content: center;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 20px; height: 2px; background: var(--ink); position: relative; transition: .25s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { top: 0; transform: rotate(45deg); }
.nav-open .nav-toggle span::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 1020px) {
  .nav-toggle { display: inline-flex; }
  /* El backdrop-filter faria que el menú fix es calculés dins la capçalera i quedés tallat */
  .header { backdrop-filter: none; background: var(--white); }
  .nav {
    position: fixed;
    top: var(--nav-top, 104px);
    left: 0;
    right: 0;
    bottom: 0;
    border-top: 1px solid var(--line);
    background: var(--white);
    flex-direction: column;
    align-items: stretch;
    padding: 20px 16px 40px;
    overflow-y: auto;
    transform: translateY(-12px);
    opacity: 0;
    visibility: hidden;
    transition: transform .25s, opacity .25s, visibility .25s;
  }
  .nav-open .nav { transform: none; opacity: 1; visibility: visible; }
  .nav-open { overflow: hidden; }
  .nav__list { flex-direction: column; }
  .nav__link { font-size: 1.15rem; padding: 14px 16px; width: 100%; justify-content: space-between; }
  .dropdown {
    position: static;
    box-shadow: none;
    border: 0;
    padding: 0 0 0 14px;
    display: none;
    opacity: 1;
    visibility: inherit; /* amagat sempre que el menú estigui tancat */
    transform: none;
  }
  .nav__item--has-dd.is-open .dropdown { display: block; }
  .nav__item--has-dd:hover .dropdown { display: none; }
  .nav__item--has-dd.is-open:hover .dropdown { display: block; }
  .nav__cta { margin: 20px 0 0; justify-content: center; }
  .brand__tag { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 85% 20%, rgba(63, 207, 170, .35), transparent 45%),
    linear-gradient(120deg, var(--brand-dark) 0%, var(--brand) 60%, #2a8a78 100%);
  color: var(--white);
}
.hero__inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 40px;
  min-height: min(calc(100vh - 108px), 760px);
  padding: 60px 0 0;
}
.hero__brand { display: flex; align-items: center; gap: 22px; margin-bottom: 18px; }
.hero__logo { width: clamp(80px, 10vw, 120px); height: auto; flex: none; }
.hero h1 { margin: 0; letter-spacing: .05em; }
.hero__tag {
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 1.8vw, 1.35rem);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--accent);
  margin: 0;
}
.hero__claim { font-size: 1.15rem; max-width: 520px; color: rgba(255,255,255,.85); margin-top: 26px; }
.hero__media { align-self: end; position: relative; display: flex; justify-content: center; }
.hero__photo {
  width: min(520px, 100%);
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 40%;
  border-radius: 260px 260px 0 0;
  box-shadow: 0 30px 60px rgba(0,0,0,.25);
}
/* When a background-free PNG cut-out is used (assets/img/mar-silueta.png) */
.hero__photo--cutout {
  position: relative;
  z-index: 1;
  display: block;
  width: min(540px, 100%);
  height: auto;
  border-radius: 0;
  box-shadow: none;
  aspect-ratio: auto;
  object-fit: contain;
  filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .28));
}
.hero__media picture { display: block; position: relative; z-index: 1; }
.hero__glow {
  position: absolute;
  z-index: 0;
  width: 88%;
  aspect-ratio: 1;
  bottom: 6%;
  left: 50%;
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, rgba(63, 207, 170, .55), rgba(63, 207, 170, .18) 55%, transparent 72%);
  pointer-events: none;
}
.hero__ring {
  position: absolute;
  width: 110%;
  aspect-ratio: 1;
  bottom: -30%;
  border: 2px dashed rgba(255,255,255,.25);
  border-radius: 50%;
  pointer-events: none;
}

@media (max-width: 860px) {
  .hero__inner { grid-template-columns: 1fr; text-align: center; padding-top: 48px; gap: 32px; }
  .hero__brand { justify-content: center; flex-direction: column; gap: 12px; }
  .hero__claim { margin-inline: auto; }
  .hero .btn-row { justify-content: center; }
  .hero__photo { width: min(400px, 90%); }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  background:
    radial-gradient(circle at 90% 0%, rgba(63, 207, 170, .35), transparent 40%),
    linear-gradient(120deg, var(--brand-dark), var(--brand));
  color: var(--white);
  padding: clamp(70px, 10vw, 120px) 0 clamp(60px, 8vw, 100px);
}
.page-hero h1 { font-size: clamp(2.3rem, 5vw, 3.8rem); }
.page-hero p { max-width: 680px; font-size: 1.15rem; color: rgba(255,255,255,.85); margin: 0; }
.page-hero .eyebrow { color: var(--accent); }

/* ---------- Quick access tiles ---------- */
.tiles {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 18px;
  margin-top: -54px;
  position: relative;
  z-index: 2;
}
.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 28px 18px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-decoration: none;
  text-align: center;
  font-family: var(--font-head);
  font-weight: 600;
  transition: transform .2s, box-shadow .2s;
}
.tile:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(18,48,44,.14); }
.tile__icon {
  width: 56px; height: 56px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--brand);
}
.tile__icon svg { width: 26px; height: 26px; }
.tile small { font-family: var(--font-body); font-weight: 400; font-size: .85rem; color: var(--ink-soft); }
@media (max-width: 860px) { .tiles { grid-template-columns: repeat(2, 1fr); margin-top: 32px; } }

/* ---------- Statement ---------- */
.statement {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.statement h2 { font-weight: 300; max-width: 640px; margin: 0; }
.statement h2 strong { font-weight: 700; color: var(--brand); }
.statement__tag { display: block; margin-top: 14px; font-size: .85rem; letter-spacing: .12em; color: var(--ink-soft); }
.statement__mark { width: 120px; flex: none; opacity: .9; }
@media (max-width: 700px) { .statement { flex-direction: column; text-align: center; } }

/* ---------- Split (text + image) ---------- */
.split {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.split--reverse > :first-child { order: 2; }
.split__img {
  width: 100%;
  border-radius: var(--radius);
  object-fit: cover;
  aspect-ratio: 4 / 5;
  box-shadow: var(--shadow);
}
.split__figure { position: relative; margin: 0; }
.split__badge {
  position: absolute;
  left: -20px;
  bottom: 30px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 600;
  padding: 14px 20px;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
@media (max-width: 860px) {
  .split { grid-template-columns: 1fr; }
  .split--reverse > :first-child { order: 0; }
  .split__badge { left: 16px; }
}

/* ---------- Full-width video ---------- */
.video-band {
  position: relative;
  aspect-ratio: 16 / 9;
  max-height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--ink) url("../img/mar-camp.jpg") center / cover no-repeat;
  color: var(--white);
  display: grid;
  place-items: center;
  text-align: center;
}
.video-band video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.video-band:has(.video-band__content)::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,48,44,.25), rgba(18,48,44,.7)); }
.video-band--inline { aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; }

/* ---------- Sobre mi ---------- */
.photo-stack { display: grid; gap: 18px; }
.photo-stack img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
.photo-stack img:nth-child(2) { width: 82%; margin-left: auto; margin-top: -60px; border: 6px solid var(--white); }
.divulgacio { display: grid; grid-template-columns: 260px 1fr; gap: clamp(28px, 5vw, 56px); align-items: start; margin-bottom: 40px; }
.divulgacio .service-head { margin-bottom: 0; }
.divulgacio__img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 760px) { .divulgacio { grid-template-columns: 1fr; } .divulgacio__img { max-width: 260px; } }

/* ---------- Inici: text + dues fotos ---------- */
.intro-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
.intro-grid__photo { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); margin-bottom: 32px; box-shadow: var(--shadow); }
.intro-grid__side { display: flex; flex-direction: column; align-items: center; gap: 24px; }
@media (max-width: 860px) { .intro-grid { grid-template-columns: 1fr; } }
.video-band__content { position: relative; z-index: 1; padding: 0 16px; }
.video-band h2 { font-size: clamp(2.2rem, 6vw, 4.6rem); font-weight: 700; margin-bottom: 24px; }

/* ---------- Values ---------- */
.values {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 16px;
  margin-top: 40px;
}
.value {
  padding: 28px 20px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  text-align: center;
}
.value__icon {
  width: 52px; height: 52px; margin: 0 auto 14px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--brand); color: var(--white);
}
.value__icon svg { width: 24px; height: 24px; }
.value h3 { margin-bottom: 6px; font-size: 1.15rem; }
.value p { font-size: .92rem; color: var(--ink-soft); margin: 0; }
@media (max-width: 1020px) { .values { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .values { grid-template-columns: 1fr 1fr; } .value:last-child { grid-column: span 2; } }

/* ---------- Logos ---------- */
.logos {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 18px;
  margin-top: 36px;
}
.logo-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 150px;
  height: 120px;
  padding: 14px;
  border-radius: var(--radius-sm);
  background: var(--white);
  border: 1px solid var(--line);
  transition: transform .2s, box-shadow .2s;
}
.logo-chip img { max-height: 88px; max-width: 100%; width: auto; object-fit: contain; }
.logo-chip:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
@media (max-width: 560px) { .logo-chip { width: calc(50% - 9px); } }

/* ---------- Instagram block ---------- */
.insta {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
.insta__card {
  aspect-ratio: 1;
  border-radius: 28px;
  background:
    radial-gradient(circle at 30% 20%, rgba(63,207,170,.55), transparent 50%),
    linear-gradient(135deg, var(--brand-dark), var(--brand));
  display: grid;
  place-items: center;
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.insta__card svg { width: 72px; height: 72px; margin: 0 auto 14px; }
.insta__card { text-decoration: none; }
.insta__handle { font-family: var(--font-head); font-size: clamp(1.6rem, 3vw, 2.2rem); font-weight: 700; }
@media (max-width: 860px) { .insta { grid-template-columns: 1fr; } .insta__card { max-width: 360px; width: 100%; margin: 0 auto; } }

/* ---------- Quote banner ---------- */
.quote {
  position: relative;
  overflow: hidden;
  background: var(--accent-soft);
  padding: clamp(60px, 8vw, 100px) 0;
  text-align: center;
}
.quote::before, .quote::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  border: 60px solid rgba(29,107,95,.07);
}
.quote::before { width: 420px; height: 420px; left: -140px; top: -200px; }
.quote::after { width: 520px; height: 520px; right: -200px; bottom: -300px; }
.quote blockquote {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 820px;
  padding: 0 16px;
  font-family: var(--font-head);
  font-size: clamp(1.4rem, 3vw, 2.1rem);
  font-weight: 400;
  line-height: 1.35;
  color: var(--brand-dark);
}
.quote blockquote strong { font-weight: 700; }

/* ---------- Cards / services ---------- */
.grid { display: grid; gap: 22px; }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1020px) { .grid--4 { grid-template-columns: repeat(2, 1fr); } .grid--3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; } }

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px;
  display: flex;
  flex-direction: column;
}
.card--link { text-decoration: none; transition: transform .2s, box-shadow .2s; }
.card--link:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card h3 { margin-bottom: 10px; }
.card p { color: var(--ink-soft); }
.card__num {
  font-family: var(--font-head);
  font-size: 2.4rem;
  font-weight: 700;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 12px;
}
.card__icon {
  width: 52px; height: 52px; margin-bottom: 18px;
  display: grid; place-items: center;
  border-radius: 14px;
  background: var(--accent-soft); color: var(--brand);
}
.card__icon svg { width: 26px; height: 26px; }
.card__more { margin-top: auto; font-family: var(--font-head); font-weight: 600; color: var(--brand); }

.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.checklist li { position: relative; padding-left: 36px; }
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 3px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d6b5f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.checklist--cols { grid-template-columns: repeat(2, 1fr); gap: 14px 30px; }
@media (max-width: 640px) { .checklist--cols { grid-template-columns: 1fr; } }

.service-block + .service-block { border-top: 1px solid var(--line); }
.service-head { max-width: 780px; margin-bottom: 48px; }
.service-head h2 { margin-bottom: 14px; }

.price-box {
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 44px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  margin-top: 40px;
}
.price-box__amount { font-family: var(--font-head); font-size: clamp(2.4rem, 5vw, 3.4rem); font-weight: 700; color: var(--accent); line-height: 1; }
.price-box__unit { font-size: 1rem; color: rgba(255,255,255,.8); margin-left: 6px; font-weight: 400; }
.price-box p { margin: 10px 0 0; color: rgba(255,255,255,.8); }
.price-box .free { display: inline-flex; gap: 8px; align-items: center; margin-top: 14px; padding: 6px 14px; border-radius: 999px; background: rgba(63,207,170,.15); color: var(--accent); font-weight: 600; font-size: .92rem; }
@media (max-width: 760px) { .price-box { grid-template-columns: 1fr; } }

.timeline { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.timeline .card { background: var(--sand); border: 0; }
.timeline strong { font-family: var(--font-head); font-size: 1.25rem; display: block; margin-bottom: 4px; }
@media (max-width: 640px) { .timeline { grid-template-columns: 1fr; } }

.pills { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; padding: 0; margin: 0; }
.pills li { padding: 10px 18px; border-radius: 999px; background: var(--white); border: 1px solid var(--line); font-size: .95rem; }
.section--sand .pills li { background: var(--white); }

.service-intro { display: grid; grid-template-columns: 1.25fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; margin-bottom: 48px; }
.service-intro .service-head { margin-bottom: 0; }
.service-intro__img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--radius); box-shadow: var(--shadow); }
@media (max-width: 860px) { .service-intro { grid-template-columns: 1fr; } }
.formacio__img { width: 100%; height: 100%; min-height: 220px; max-height: 340px; object-fit: cover; border-radius: var(--radius-sm); }

.formacio {
  display: grid;
  grid-template-columns: 260px 1fr 1fr;
  gap: 30px;
  align-items: start;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
}
.formacio + .formacio { margin-top: 22px; }
.formacio h3 { font-size: 1.5rem; }
.formacio .tag { display: inline-block; margin-bottom: 10px; font-size: .8rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--clay); }
@media (max-width: 1020px) { .formacio { grid-template-columns: 220px 1fr; } .formacio > :last-child { grid-column: 2; } }
@media (max-width: 760px) { .formacio { grid-template-columns: 1fr; padding: 22px; } .formacio > :last-child { grid-column: auto; } .formacio__img { max-height: 260px; } }

/* ---------- Blog ---------- */
.posts { display: grid; gap: 30px; }
.post {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 0;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.post__media {
  position: relative;
  min-height: 260px;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand));
  display: grid;
  place-items: center;
  color: rgba(255,255,255,.7);
}
.post__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.post__media svg { width: 64px; height: 64px; }
.post__body { padding: clamp(24px, 3.5vw, 40px); display: flex; flex-direction: column; }
.post__meta { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; font-size: .85rem; color: var(--ink-soft); margin-bottom: 10px; }
.post__cat { padding: 4px 12px; border-radius: 999px; background: var(--accent-soft); color: var(--brand-dark); font-weight: 600; }
.post h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); margin-bottom: 14px; }
.post__text p { color: var(--ink-soft); }
.post__full { display: none; }
.post.is-open .post__full { display: block; }
.post__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: auto; padding-top: 12px; }
.post__actions a[href="#"] { display: none; } /* botó sense enllaç encara */
.post__toggle { background: none; border: 0; padding: 0; font: inherit; font-family: var(--font-head); font-weight: 600; color: var(--brand); cursor: pointer; align-self: flex-start; margin-bottom: 14px; }
.post__toggle:hover { text-decoration: underline; }
@media (max-width: 860px) { .post { grid-template-columns: 1fr; } .post__media { min-height: 220px; } }


/* ---------- About ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 40px 0 0; padding: 0; list-style: none; }
.pillars li {
  padding: 24px; border-radius: var(--radius); background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.15);
  font-family: var(--font-head); font-size: 1.1rem; line-height: 1.3;
}
.pillars li span { display: block; color: var(--accent); font-size: .85rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr 1fr; } }

.big-claim { font-family: var(--font-head); font-size: clamp(1.6rem, 3.4vw, 2.4rem); font-weight: 600; line-height: 1.25; margin: 0; }

/* ---------- Form ---------- */
.contact-wrap { display: grid; grid-template-columns: 1fr 1.3fr; gap: clamp(32px, 6vw, 70px); align-items: start; }
@media (max-width: 900px) { .contact-wrap { grid-template-columns: 1fr; } }
.contact-info { display: grid; gap: 14px; margin-top: 28px; }
.contact-info a {
  display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: var(--radius-sm);
  background: var(--white); border: 1px solid var(--line); text-decoration: none; font-weight: 500;
}
.contact-info a:hover { border-color: var(--brand); }
.contact-info svg { width: 22px; height: 22px; color: var(--brand); flex: none; }

.form {
  background: var(--white);
  border-radius: var(--radius);
  padding: clamp(24px, 4vw, 44px);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.field label, .field legend { font-weight: 600; font-size: .92rem; }
.field input, .field select, .field textarea {
  font: inherit;
  font-size: 1rem;
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--line);
  background: #fbfcfc;
  color: var(--ink);
  width: 100%;
}
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--accent-soft); }
fieldset.field { border: 0; padding: 0; margin: 0 0 18px; }
.radio-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.radio-grid label {
  display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-radius: var(--radius-sm);
  border: 1.5px solid var(--line); cursor: pointer; font-weight: 500;
}
.radio-grid input { width: auto; accent-color: var(--brand); }
.radio-grid label:has(input:checked) { border-color: var(--brand); background: var(--accent-soft); }
@media (max-width: 480px) { .radio-grid { grid-template-columns: 1fr; } }

/* Qüestionari del Programa FOMENTUS */
.survey__q { margin-bottom: 30px; }
.survey__q > label, .survey__q > legend { font-family: var(--font-head, inherit); font-size: 1.05rem; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
.survey__n { color: var(--brand); }
.survey__hint { font-size: .88rem; color: var(--ink-soft); margin: 0 0 8px; }
.survey .radio-grid label { align-items: flex-start; font-weight: 400; line-height: 1.4; }
.survey .radio-grid input { margin-top: 3px; }
.survey .radio-grid label:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.program-teaser { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(28px, 5vw, 64px); align-items: start; }
.program-teaser__card { background: var(--brand); color: #fff; border-radius: var(--radius); padding: clamp(26px, 4vw, 44px); position: sticky; top: 110px; }
.program-teaser__card h3 { color: #fff; font-size: 1.6rem; }
.program-teaser__card p { color: rgba(255,255,255,.85); }
@media (max-width: 860px) { .program-teaser { grid-template-columns: 1fr; } .program-teaser__card { position: static; } }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; margin-bottom: 22px; }
.check input { margin-top: 4px; width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.form__msg { margin-top: 16px; padding: 14px 18px; border-radius: var(--radius-sm); display: none; }
.form__msg.is-ok { display: block; background: var(--accent-soft); color: var(--brand-dark); }
.form__msg.is-error { display: block; background: #fdecea; color: #8a1f17; }
.field.has-error input, .field.has-error select, .field.has-error .radio-grid label { border-color: #d04a3c; }
.check.has-error { color: #8a1f17; }
.hp { position: absolute; left: -9999px; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); color: rgba(255,255,255,.8); padding: 70px 0 30px; font-size: .95rem; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 40px; }
.footer h4 { color: var(--white); font-size: 1rem; margin-bottom: 16px; }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--accent); }
.footer .brand__name { color: var(--white); }
.footer .brand__tag { color: rgba(255,255,255,.6); display: block; }
.footer__about { margin-top: 18px; max-width: 320px; }
.socials { display: flex; gap: 10px; margin-top: 20px; }
.socials a {
  width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255,255,255,.08); transition: background .2s;
}
.socials a:hover { background: var(--accent); color: var(--ink); }
.socials svg { width: 20px; height: 20px; }
.footer__bottom {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px;
  border-top: 1px solid rgba(255,255,255,.12); margin-top: 50px; padding-top: 24px; font-size: .85rem; color: rgba(255,255,255,.55);
}
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }

/* ---------- WhatsApp floating ---------- */
.wa-float {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 60;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: #25d366;
  color: var(--white);
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(0,0,0,.2);
  transition: transform .2s;
}
.wa-float:hover { transform: scale(1.08); }
.nav-open .wa-float { display: none; }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Compte a la capçalera ---------- */
.nav__account {
  display: inline-flex; align-items: center; gap: 8px; margin-left: 6px; padding: 10px 14px; border-radius: 999px;
  text-decoration: none; font-family: var(--font-head); font-weight: 500; font-size: .95rem;
}
.nav__account svg { width: 20px; height: 20px; }
.nav__account:hover, .nav__account[aria-current="page"] { background: var(--accent-soft); color: var(--brand-dark); }
@media (min-width: 1021px) and (max-width: 1180px) { .nav__account span { display: none; } }
@media (max-width: 1020px) { .nav__account { margin: 10px 0 0; font-size: 1.15rem; padding: 14px 16px; } }

/* ---------- Avisos ---------- */
.alert { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .95rem; }
.alert--ok { background: var(--accent-soft); color: var(--brand-dark); }
.alert--error { background: #fdecea; color: #8a1f17; }
.alert--info { background: #e8f1fb; color: #1d4f80; }

/* ---------- Login / registre ---------- */
.auth-section { min-height: 70vh; display: flex; align-items: center; }
.auth-card { max-width: 480px; margin: 0 auto; }
.auth-card h1 { font-size: 2rem; }
.auth-card .lead { font-size: 1rem; }
.auth-card__icon { width: 64px; height: 64px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: var(--ink); font-size: 1.8rem; font-weight: 700; }
.auth-links { display: flex; flex-direction: column; gap: 8px; align-items: center; margin-top: 18px; font-size: .92rem; }
.btn--block { width: 100%; justify-content: center; }

/* ---------- Article ---------- */
.back-link { display: block; width: fit-content; color: rgba(255,255,255,.8); text-decoration: none; margin-bottom: 18px; font-size: .95rem; }
.back-link:hover { color: var(--white); }
.page-hero--article h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
.post__meta--light { color: rgba(255,255,255,.8); }
.post h2 a { text-decoration: none; }
.post h2 a:hover { color: var(--brand); }
.post__media { text-decoration: none; }
.article__cover { width: 100%; max-height: 560px; object-fit: cover; object-position: center 30%; border-radius: var(--radius); margin-bottom: 36px; box-shadow: var(--shadow); }
.prose { font-size: 1.08rem; color: var(--ink-soft); }
.prose h2, .prose h3 { color: var(--ink); margin-top: 1.6em; }
.prose a { color: var(--brand); }
.prose blockquote { margin: 1.5em 0; padding: 6px 0 6px 22px; border-left: 4px solid var(--accent); font-family: var(--font-head); font-size: 1.25rem; color: var(--ink); }
.prose ul, .prose ol { padding-left: 1.3em; }
.related { margin-top: 60px; padding-top: 30px; border-top: 1px solid var(--line); }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.related a { font-family: var(--font-head); font-weight: 600; text-decoration: none; }
.related a:hover { color: var(--brand); }
.related small { color: var(--ink-soft); margin-left: 6px; }

/* ---------- Acadèmia ---------- */
.course-card { display: flex; flex-direction: column; border-radius: var(--radius); overflow: hidden; background: var(--white); border: 1px solid var(--line); text-decoration: none; transition: transform .2s, box-shadow .2s; }
.course-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.course-card__media { position: relative; aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--brand-dark), var(--brand)); display: grid; place-items: center; color: rgba(255,255,255,.75); }
.course-card__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.course-card__media svg { width: 64px; height: 64px; }
.course-card__body { padding: 22px 24px 26px; display: flex; flex-direction: column; flex: 1; }
.course-card__body p { color: var(--ink-soft); margin-bottom: 14px; }
.course-card__meta { margin-top: auto; font-family: var(--font-head); font-weight: 600; color: var(--brand); font-size: .92rem; }
.price-tag { position: absolute; top: 14px; right: 14px; padding: 6px 14px; border-radius: 999px; background: var(--white); color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: .9rem; }
.price-tag--free { background: var(--accent); }

.resource-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; margin-top: 40px; }
.tile-card {
  position: relative; display: block; aspect-ratio: 4 / 5; border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, var(--brand-dark), var(--brand)); color: var(--white); text-decoration: none;
  box-shadow: var(--shadow); isolation: isolate;
}
.tile-card img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .5s ease; }
.tile-card::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(18,48,44,0) 30%, rgba(18,48,44,.55) 60%, rgba(18,48,44,.92) 100%); }
.tile-card:hover img { transform: scale(1.05); }
.tile-card__body { position: absolute; left: 0; right: 0; bottom: 0; padding: 24px; display: flex; flex-direction: column; gap: 8px; }
.tile-card h3 { margin: 0; font-size: 1.3rem; line-height: 1.25; }
.tile-card__more { font-family: var(--font-head); font-weight: 600; font-size: .92rem; color: var(--accent); opacity: .9; }
.tile-card__tag { position: absolute; top: 14px; right: 14px; padding: 6px 14px; border-radius: 999px; background: var(--white); color: var(--ink); font-family: var(--font-head); font-weight: 700; font-size: .85rem; }
.tile-card__tag--free { background: var(--accent); }
.tile-card__tag--soon { background: rgba(255,255,255,.85); color: var(--ink-soft); font-weight: 600; }

.course-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: var(--radius); margin-bottom: 32px; box-shadow: var(--shadow); }
.prose--course h3 { font-size: 1.25rem; margin: 1.8em 0 .8em; }
.prose--course > h3:first-child { margin-top: 0; }
.prose--course ul { list-style: none; padding: 0; display: grid; gap: 10px; }
.prose--course li { position: relative; padding-left: 34px; }
.prose--course li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--accent-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d6b5f' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center / 13px no-repeat;
}

.course-layout { display: grid; grid-template-columns: 1fr 340px; gap: clamp(30px, 5vw, 60px); align-items: start; }
@media (max-width: 900px) { .course-layout { grid-template-columns: 1fr; } .buy-box { order: -1; } }
.course-section-title { font-size: 1.6rem; margin-top: 40px; }
.buy-box { padding: 28px; border-radius: var(--radius); background: var(--sand); }
@media (min-width: 901px) { .buy-box { position: sticky; top: 110px; } }
.buy-box__price { font-family: var(--font-head); font-size: 2.4rem; font-weight: 700; color: var(--brand-dark); line-height: 1.1; margin-bottom: 8px; }
.buy-box__price--ok { font-size: 1.5rem; }
.buy-box p { color: var(--ink-soft); }
.buy-box__note { display: block; margin-top: 12px; color: var(--ink-soft); text-align: center; }
.notify-form { margin-top: 18px; }
.notify-form .field { margin-bottom: 12px; }
.notify-form .field input { background: var(--white); }
.notify-form .check { font-size: .84rem; margin-bottom: 16px; }
.notify-form .form__msg { font-size: .9rem; }

.resources { display: grid; gap: 16px; }
.resource { padding: 22px 24px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--white); }
.resource__head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.resource__head h3 { margin: 0; font-size: 1.15rem; flex: 1; min-width: 180px; }
.resource__kind { font-size: .72rem; font-weight: 700; letter-spacing: .08em; padding: 4px 10px; border-radius: 6px; background: var(--accent-soft); color: var(--brand-dark); }
.resource__kind--pdf { background: #fde8e4; color: #9a3412; }
.resource__lock { width: 22px; height: 22px; color: var(--ink-soft); }
.resource__desc { color: var(--ink-soft); margin: 12px 0 0; }
.resource--locked { background: #fafbfb; }
.resource--locked h3 { color: var(--ink-soft); }
.resource__video { width: 100%; margin-top: 16px; border-radius: var(--radius-sm); background: #000; }
.resource__embed { position: relative; aspect-ratio: 16 / 9; margin-top: 16px; border-radius: var(--radius-sm); overflow: hidden; background: #000; }
.resource__embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* ---------- Legal ---------- */
.legal h2 { font-size: 1.5rem; margin-top: 2em; }
.legal p, .legal li { color: var(--ink-soft); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Fitxa del curs en mòbil: botó fix que porta al requadre d'Avisa'm / Comprar */
.mobile-cta, .mobile-cta-spacer { display: none; }
.buy-box { scroll-margin-top: 90px; }
@media (max-width: 900px) {
  .mobile-cta {
    display: inline-flex; justify-content: center;
    position: fixed; left: 16px; right: 92px; bottom: 20px; z-index: 59;
    min-height: 58px; box-shadow: 0 8px 24px rgba(0,0,0,.2);
    transition: transform .25s ease, opacity .25s ease;
  }
  .mobile-cta.is-hidden { transform: translateY(140%); opacity: 0; pointer-events: none; }
  .nav-open .mobile-cta { display: none; }
  .mobile-cta-spacer { display: block; height: 70px; }
}

/* Ullet de les contrasenyes (assets/js/password-toggle.js) */
.pw-wrap { position: relative; display: block; width: 100%; }
.pw-wrap input { width: 100%; padding-right: 48px !important; }
.pw-toggle {
  position: absolute; top: 50%; right: 6px; transform: translateY(-50%);
  width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 8px; background: transparent; color: var(--ink-soft); cursor: pointer;
}
.pw-toggle:hover { color: var(--brand); background: rgba(29, 107, 95, .08); }
.pw-toggle:focus-visible { outline: 2px solid var(--brand); outline-offset: 1px; }
.pw-toggle svg { width: 20px; height: 20px; }
