:root {
  --bg: #F5F4F1;
  --ink: #161616;
  --muted: #6B6863;
  --line: #D9D5CE;
  --ph: #E6E3DD;
  --pad: 28px;
  --card: clamp(132px, 21vh, 230px);
  --gap: clamp(16px, 2.6vw, 40px);
  --row-gap: clamp(20px, 4vh, 40px);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter Tight", Inter, system-ui, -apple-system, sans-serif;
  font-size: 13px;
  letter-spacing: 0.01em;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
a { color: inherit; }
a, img { -webkit-user-drag: none; }
.muted { color: var(--muted); }
img { display: block; max-width: 100%; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 10px var(--pad) 0;
  background: var(--bg);
}
.brand { font-weight: 600; font-size: 15px; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav { display: flex; gap: 22px; margin-left: auto; }
.nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--muted); }
.top-actions { display: flex; align-items: center; gap: 22px; }
.wa-btn { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; padding: 0 2px; text-decoration: none; font-weight: 500; }
.wa-icon { width: 22px; height: 22px; background: currentColor; -webkit-mask: url("img/ui/whatsapp.png") center / contain no-repeat; mask: url("img/ui/whatsapp.png") center / contain no-repeat; }
.wa-btn:hover { color: var(--muted); }
.menu-btn { display: none; background: none; border: 0; font: inherit; font-size: 14px; color: var(--ink); min-height: 44px; padding: 0 4px; cursor: pointer; }

.menu-movil {
  position: fixed; inset: 0; z-index: 15; background: var(--bg);
  padding: 96px 16px calc(32px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; justify-content: space-between;
  animation: fadeUp .35s ease both;
}
.menu-movil[hidden] { display: none; }
.menu-links { display: flex; flex-direction: column; align-items: flex-start; }
.menu-links a { font-size: 40px; font-weight: 500; letter-spacing: -0.03em; text-decoration: none; min-height: 56px; display: inline-flex; align-items: center; }

main { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.view[hidden] { display: none !important; }
.view { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* Home */
.view-home { flex: 1; display: flex; flex-direction: column; min-height: calc(100dvh - 54px); height: calc(100dvh - 54px); animation: none; }
.intro { padding: 18px var(--pad) 0; display: none; }
.intro h1 { margin: 0; font-size: 22px; font-weight: 500; letter-spacing: -0.02em; line-height: 1.15; }
.intro p { margin: 4px 0 0; }
.rows {
  flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; gap: var(--row-gap);
  overflow: hidden; cursor: grab; user-select: none; -webkit-user-select: none; touch-action: pan-y;
}
.rows.is-drag { cursor: grabbing; }
.rows.is-drag .card { pointer-events: none; }
.row { display: flex; width: max-content; will-change: transform; }
.item { flex: none; width: var(--card); margin-right: var(--gap); display: flex; flex-direction: column; gap: 8px; }
.card {
  display: block; width: 100%; aspect-ratio: 2 / 3; overflow: hidden; background: var(--ph);
  -webkit-tap-highlight-color: transparent;
}
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.7,.2,1), opacity .6s ease; opacity: 0; }
.card img.ok { opacity: 1; }
@media (hover: hover) {
  .rows .card:hover img, .rows .card:focus-visible img { transform: scale(1.05); }
}
.card:focus-visible { outline: 1px solid var(--ink); outline-offset: 6px; }
.item-cap { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; }
.item-cap b { font-weight: 500; }
.home-foot { display: flex; justify-content: space-between; align-items: center; padding: 0 var(--pad) calc(18px + env(safe-area-inset-bottom)); }

/* Session */
.session { max-width: 1180px; width: 100%; margin: 0 auto; padding: 40px var(--pad) 96px; display: flex; flex-direction: column; gap: 40px; }
.back { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; align-self: flex-start; }
.back:hover { color: var(--ink); }
.session-head { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 24px 32px; align-items: end; }
.session-head h1 { margin: 6px 0; font-weight: 500; font-size: clamp(34px, 5vw, 64px); line-height: 1; letter-spacing: -0.03em; }
.session-head p { margin: 0; }
.session-text { max-width: 460px; font-size: 15px; line-height: 1.6; }
.session-text:empty { display: none; }
.session-photos { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.session-photos figure { margin: 0; background: var(--ph); }
.session-photos figure.wide { grid-column: 1 / -1; }
.session-photos figure.first { grid-column: 1 / -1; max-width: 820px; width: 100%; justify-self: center; }
.session-photos img { width: 100%; height: auto; opacity: 0; transition: opacity .6s ease; }
.session-photos img.ok { opacity: 1; }
.cta {
  display: flex; justify-content: space-between; align-items: center; min-height: 56px; padding: 0 20px;
  background: var(--ink); color: var(--bg); text-decoration: none; font-size: 15px; font-weight: 500;
  max-width: 420px; width: 100%; align-self: center;
}
.session-nav { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.next { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.next:hover { color: var(--muted); }

/* Pages */
.page { max-width: 1180px; width: 100%; margin: 0 auto; padding: 48px var(--pad) 96px; display: flex; flex-direction: column; gap: 20px; }
.page h1 { margin: 0; font-weight: 500; font-size: clamp(34px, 5vw, 64px); letter-spacing: -0.03em; line-height: 1.02; }
.page p { margin: 0; font-size: 15px; line-height: 1.6; max-width: 560px; }
.client-list { list-style: none; margin: 12px 0 0; padding: 0; columns: 3 220px; column-gap: 32px; border-top: 1px solid var(--line); }
.client-list li { break-inside: avoid; border-bottom: 1px solid var(--line); }
.client-list a, .client-list span { display: flex; justify-content: space-between; min-height: 48px; align-items: center; font-size: 15px; text-decoration: none; }
.client-list a:hover { color: var(--muted); }
.bio { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 48px; align-items: start; }
.bio-photo { aspect-ratio: 4 / 5; background: var(--ph) center / cover no-repeat; }
.bio-text { display: flex; flex-direction: column; gap: 18px; }
.bio dl { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.bio dl div { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.bio dd { margin: 0; font-size: 15px; }
.contact { min-height: calc(100dvh - 54px); justify-content: center; }
.contact h1 { font-size: clamp(40px, 7vw, 88px); max-width: 900px; }
.contact-links { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); gap: 12px; margin-top: 12px; }
.btn { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 56px; padding: 0 18px; border: 1px solid var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; }
.btn:hover { background: #ECEAE5; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-dark:hover { background: #2a2a2a; }

/* Mobile */
@media (max-width: 760px) {
  :root { --pad: 16px; --card: clamp(108px, min(38vw, (100dvh - 260px) / 3.2), 170px); --gap: 16px; --row-gap: 18px; }
  .nav { display: none; }
  .menu-btn { display: inline-flex; align-items: center; position: relative; z-index: 25; }
  .top-actions { gap: 10px; position: relative; z-index: 25; }
  .wa-btn { padding: 0; width: 44px; justify-content: center; }
  .wa-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .intro { display: block; }
  .session { padding-top: 16px; gap: 22px; }
  .session-photos { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .session-photos figure, .session-photos figure.wide, .session-photos figure.first { grid-column: auto; }
  .page { padding-top: 24px; }
  .contact { justify-content: flex-end; padding-bottom: calc(32px + env(safe-area-inset-bottom)); }
  .contact-links { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .view, .menu-movil { animation: none; }
  .card img { transition: none; }
}
