:root {
  --ink: #1a1a1a;
  --ink-2: #3a4148;
  --slate: #5b6670;
  --blue: #2e75b5;
  --deep: #1f4e79;
  --deep-2: #173d5f;
  --sky: #9cc3e8;
  --amber: #f2a541;
  --rule: #d6e2ee;
  --paper: #ffffff;
  --pad: clamp(20px, 6.6vw, 96px);
  --hang: clamp(28px, 4.4vw, 72px);
  --sans: "Montserrat", "Avenir Next", "Segoe UI", sans-serif;
  --accent: Georgia, "Times New Roman", serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--sans);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; }
em { font-family: var(--accent); font-style: italic; font-weight: 400; color: var(--blue); letter-spacing: 0; }
a { color: var(--deep); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:not([class]):hover { color: var(--blue); }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; border-radius: 4px; }
::selection { background: #cfe1f3; color: var(--ink); }

.skip { position: absolute; left: -999px; top: 8px; background: var(--deep); color: #fff; padding: 10px 16px; z-index: 10; }
.skip:focus { left: 8px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; gap: 40px;
  padding: 18px var(--pad);
  background: rgba(255, 255, 255, .95);
}
.brand img { height: 46px; width: auto; }
.top nav { display: flex; gap: 32px; margin-left: auto; font-weight: 600; font-size: .9375rem; }
.top nav a { color: var(--ink); text-decoration: none; padding: 6px 0; border-bottom: 2px solid transparent; }
.top nav a:hover { color: var(--deep); border-bottom-color: var(--blue); }
.top-wa {
  font-weight: 800; font-size: .9375rem; text-decoration: none;
  color: #fff; background: var(--deep); padding: 10px 18px; border-radius: 8px;
}
.top-wa:hover { color: #fff; background: var(--deep-2); }

/* Hero: headline beside the programme */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, .85fr);
  gap: clamp(40px, 6vw, 96px); align-items: start;
  padding: clamp(40px, 7vh, 80px) var(--pad) clamp(72px, 11vh, 128px);
}
h1 {
  font-size: clamp(2.5rem, 4.7vw, 4.4rem); line-height: 1.03; font-weight: 800;
  letter-spacing: -.035em; text-wrap: pretty;
}
.lede { margin-top: 32px; max-width: 34em; font-size: clamp(1.0625rem, 1.4vw, 1.3rem); line-height: 1.55; color: var(--ink-2); }
.lines { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 6px 14px; font-weight: 600; font-size: .9375rem; color: var(--slate); }
.lines a { color: var(--deep); text-decoration: none; border-bottom: 1px solid var(--rule); }
.lines a:hover { border-bottom-color: var(--blue); }

.prog-title { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.12; letter-spacing: -.02em; max-width: 14em; margin-bottom: 20px; }
.prog { list-style: none; padding: 4px 0 0 40px; margin: 0; position: relative; }
.prog::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
  background: var(--blue); transform-origin: top;
  animation: draw 1.1s var(--ease) both;
}
.prog li { position: relative; padding: 18px 0; border-bottom: 1px solid var(--rule); }
.prog li::before {
  content: ""; position: absolute; left: -46px; top: 25px; width: 15px; height: 15px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--blue);
}
.when { display: block; font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); }
.what { display: block; margin-top: 4px; font-size: clamp(1.2rem, 1.6vw, 1.45rem); font-weight: 600; line-height: 1.25; letter-spacing: -.01em; }
.how { display: block; margin-top: 6px; font-size: .9375rem; line-height: 1.5; color: var(--ink-2); }
.prog .prog-act { border-bottom: 0; padding-top: 26px; }
.prog .prog-act::before { background: var(--amber); border-color: var(--amber); top: 44px; animation: settle .9s .7s var(--ease) both; }
.act-note { display: block; margin-top: 12px; font-size: .875rem; color: var(--slate); }

.btn {
  display: inline-flex; align-items: center; gap: 14px;
  font-weight: 800; font-size: 1.125rem; text-decoration: none;
  padding: 20px 28px; border-radius: 10px;
  box-shadow: 0 10px 24px -14px rgba(26, 26, 26, .45);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 30px -16px rgba(26, 26, 26, .5); }
.btn-wa { background: var(--deep); color: #fff; }
.btn-wa:hover { background: var(--deep-2); color: #fff; }
.btn-light { background: #fff; color: var(--deep); }
.btn-light:hover { background: #f1f6fb; color: var(--deep); }

/* The sheet: every section hangs off one programme rule */
.sheet { margin: 0 var(--pad); border-left: 3px solid var(--blue); }
.part { position: relative; padding: clamp(56px, 9vh, 104px) 0 clamp(56px, 9vh, 104px) var(--hang); border-top: 1px solid var(--rule); }
.part:first-child { border-top: 0; padding-top: 8px; }
.part::before {
  content: ""; position: absolute; left: -9px; top: calc(clamp(56px, 9vh, 104px) + .5em); width: 15px; height: 15px;
  border-radius: 50%; background: var(--paper); border: 3px solid var(--blue);
}
.part:first-child::before { top: calc(8px + .5em); }
h2 { font-size: clamp(1.9rem, 3.3vw, 3rem); line-height: 1.08; font-weight: 800; letter-spacing: -.03em; max-width: 20em; text-wrap: balance; }
h3 { font-size: 1.3rem; line-height: 1.25; font-weight: 800; letter-spacing: -.01em; }
.intro { margin-top: 20px; max-width: 40em; color: var(--ink-2); font-size: 1.125rem; }

/* Services as programme rows */
.svcs { margin-top: 40px; }
.svc {
  display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.3fr) auto;
  gap: 16px 48px; align-items: start;
  padding: 32px 0; border-top: 1px solid var(--rule);
}
.svc:last-child { border-bottom: 1px solid var(--rule); }
.svc-body p { color: var(--ink-2); max-width: 38em; }
.svc-inc { margin-top: 12px; font-size: 1rem; }
.svc-inc strong { color: var(--ink); font-weight: 800; }
.svc-wa {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  font-weight: 800; font-size: .9375rem; text-decoration: none;
  color: var(--deep); padding: 12px 18px; border: 2px solid var(--deep); border-radius: 8px;
  transition: background .2s, color .2s;
}
.svc-wa:hover { background: var(--deep); color: #fff; }

/* Experience ledger */
.ledger { margin-top: 36px; }
.ledger > div { display: grid; grid-template-columns: minmax(130px, 200px) minmax(0, 1fr); gap: 8px 40px; padding: 22px 0; border-top: 1px solid var(--rule); }
.ledger > div:last-child { border-bottom: 1px solid var(--rule); }
.ledger dt { font-size: .75rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--blue); padding-top: .35em; }
.ledger dd { font-size: 1.125rem; color: var(--ink); max-width: 42em; }
.orgs { list-style: none; padding: 0; columns: 3 11em; column-gap: 32px; }
.orgs li { padding: 4px 0; font-weight: 600; break-inside: avoid; }

/* Manuel */
.person { display: grid; grid-template-columns: minmax(220px, 340px) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: end; }
.role { margin-top: 10px; font-weight: 600; color: var(--deep); }
.person-copy > p:not(.role) { margin-top: 20px; max-width: 36em; font-size: 1.125rem; color: var(--ink-2); }
.person-copy em { color: var(--deep); }
.person-links { display: flex; flex-wrap: wrap; gap: 12px 28px; font-weight: 800; }

/* Close: the rule ends at the action */
.close { background: var(--deep); color: #fff; padding: 0 var(--pad) clamp(80px, 13vh, 144px); }
.close-in { border-left: 3px solid var(--sky); padding: clamp(80px, 13vh, 144px) 0 0 var(--hang); }
.close-in > * { max-width: 760px; }
.close h2 { color: #fff; font-size: clamp(2.4rem, 5vw, 4.4rem); }
.close h2 em { color: var(--sky); }
.close p { margin-top: 20px; max-width: 34em; font-size: 1.1875rem; color: #d6e4f2; }
.close-act { position: relative; margin-top: 36px; }
.close-act::before {
  content: ""; position: absolute; left: calc(-1 * var(--hang) - 9px); top: 50%; margin-top: -7.5px;
  width: 15px; height: 15px; border-radius: 50%; background: var(--amber);
}
.close :focus-visible { outline-color: #fff; }
.contact { list-style: none; padding: 0 0 0 calc(var(--hang) + 3px); margin-top: 36px; display: flex; flex-wrap: wrap; gap: 12px 32px; }
.contact a { color: #fff; font-weight: 600; }
.contact a:hover { color: var(--sky); }

.foot { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 32px var(--pad); background: var(--deep-2); color: #b9cde0; font-size: .875rem; }
.foot img { height: 34px; width: auto; }

/* Draft only: unconfirmed facts are marked until Manuel confirms them */
.borrador [data-pending] { background: #fff3df; box-shadow: 0 0 0 2px #fff3df; border-radius: 2px; }
.borrador [data-pending]::after {
  content: " · pendiente: " attr(data-pending);
  font: 600 .7rem/1 var(--sans); letter-spacing: .04em; color: #8a5a12;
}

@keyframes draw { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes settle { from { transform: scale(.4); opacity: .3; } to { transform: scale(1); opacity: 1; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Tablet and phone */
@media (max-width: 1080px) {
  .top nav { display: none; }
  .top-wa { margin-left: auto; }
  .hero { grid-template-columns: 1fr; }
  .prog-wrap { max-width: 600px; }
  .svc { grid-template-columns: 1fr; gap: 12px; }
  .svc-wa { justify-self: start; }
  .person { grid-template-columns: 1fr; align-items: start; }
  .person picture { max-width: 320px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .brand img { height: 36px; }
  .top { gap: 16px; padding-top: 14px; padding-bottom: 14px; }
  .top-wa { padding: 9px 14px; font-size: .875rem; }
  .hero { padding-bottom: 72px; }
  .lines { flex-direction: column; gap: 10px; }
  .lines span { display: none; }
  .lines a { align-self: flex-start; }
  .prog { padding-left: 32px; }
  .prog li::before { left: -38px; }
  .btn { width: 100%; justify-content: center; padding: 18px 20px; font-size: 1.0625rem; }
  .ledger > div { grid-template-columns: 1fr; }
  .ledger dt { padding-top: 0; }
  .orgs { columns: 2; }
  .foot { flex-direction: column; align-items: flex-start; }
}
