/* Event site, Serrano Martínez CMA brand: ivory #F7F4E9, black, terracotta #C25E3B, Roboto. Light and dark. */
:root {
  color-scheme: light dark;
  --paper: light-dark(#F7F4E9, #0c0c0b);
  --ink: light-dark(#000000, #F7F4E9);
  --muted: light-dark(#57544c, #b8b2a3);
  --hair: light-dark(#d8d2bf, #2e2c28);
  --rule: light-dark(#000000, #6f6a5e);
  --accent: light-dark(#C25E3B, #e07a52);      /* decorative marks */
  --accent-ink: light-dark(#A84F2E, #e07a52);  /* text in the accent colour (AA on ivory) */
  --sans: "Roboto", -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --gut: clamp(20px, 5vw, 72px);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --nav-h: 64px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.55 var(--sans); letter-spacing: 0.01em; }
body.home { background: #000; }
body.home main { background: var(--paper); }
.status-bar-fix { position: fixed; inset: 0; background: rgb(0 0 0 / 0.004); pointer-events: none; z-index: 2147483647; }
h1, h2, h3 { font-weight: 500; letter-spacing: 0.03em; text-wrap: balance; margin: 0; }
p { text-wrap: pretty; margin: 0 0 14px; }
a { color: inherit; }
img { max-width: 100%; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 var(--gut); }
svg.i { width: 20px; height: 20px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 12px; top: 12px; z-index: 10; background: var(--paper); padding: 8px 12px; }

/* ---------- Site header (inner pages) ---------- */
.site-head { position: sticky; top: 0; z-index: 5; background: var(--paper); border-bottom: 1px solid var(--rule); padding-top: env(safe-area-inset-top); view-transition-name: site-head; }
.site-head .wrap { height: calc(var(--nav-h) + 16px); display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.site-head .brand svg { width: clamp(200px, 19vw, 300px); height: auto; color: var(--ink); display: block; }
.nav { display: flex; gap: 26px; list-style: none; margin: 0; padding: 0; }
.nav a { text-decoration: none; font-size: 15px; letter-spacing: 0.02em; padding: 10px 0; position: relative; color: var(--muted); }
.nav a::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 1px; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.25s var(--ease-out); }
.nav a:hover, .nav a[aria-current="page"] { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.menu-btn { display: none; }
@media (max-width: 859px) {
  .nav { flex-wrap: wrap; gap: 4px 16px; }
  html:not(.js) .site-head .wrap { height: auto; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
  .js .nav-wrap { display: none; }
  .js .menu-btn { all: unset; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 10px 0; min-height: 24px; font-size: 15px; letter-spacing: 0.02em; }
}
/* Mobile menu overlay */
.menu { position: fixed; inset: 0; z-index: 20; background: var(--paper); display: none; flex-direction: column; padding: calc(env(safe-area-inset-top) + 18px) var(--gut) calc(env(safe-area-inset-bottom) + 40px); overflow-y: auto; overscroll-behavior: contain; }
.menu.open { display: flex; }
.menu .menu-top { display: flex; justify-content: space-between; align-items: center; height: 46px; }
.menu .menu-top svg.logo { width: clamp(200px, 19vw, 300px); height: auto; color: var(--ink); }
.menu ol { list-style: none; margin: 40px 0 0; padding: 0; border-top: 1px solid var(--rule); }
.menu li a { display: flex; align-items: baseline; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--hair); text-decoration: none; font-size: 30px; font-weight: 500; letter-spacing: 0.02em; }
.menu li a span { font-size: 15px; color: var(--accent-ink); font-weight: 400; min-width: 1.6em; }
.menu li a[aria-current="page"] { color: var(--accent-ink); }
.menu .close { all: unset; cursor: pointer; padding: 10px 0; font-size: 15px; }

/* ---------- Reading progress (scroll-driven, enhancement) ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); z-index: 6; pointer-events: none; display: none; }
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: scroll()) {
    .progress { display: block; animation: grow linear both; animation-timeline: scroll(root); }
    @keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
  }
}

/* ---------- Inner page title ---------- */
.page-title { padding: clamp(48px, 9vw, 112px) 0 clamp(28px, 4vw, 48px); border-bottom: 1px solid var(--rule); }
.page-title h1 { font-size: clamp(40px, 6vw, 84px); line-height: 1.02; letter-spacing: 0.01em; view-transition-name: page-title; }
.page-title p { font-size: clamp(18px, 1.6vw, 22px); font-weight: 300; color: var(--muted); max-width: 38em; margin: 18px 0 0; }
.decoding { position: relative; }
.decoding > .real { color: transparent; }
.decoding > .scr { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }

/* ---------- Footer + next page link ---------- */
.next { border-top: 1px solid var(--rule); margin-top: clamp(72px, 10vw, 128px); }
.next a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: clamp(28px, 4vw, 44px) 0; text-decoration: none; }
.next small { display: block; color: var(--muted); font-size: 15px; margin-bottom: 6px; }
.next b { font-size: clamp(28px, 3.6vw, 48px); font-weight: 500; letter-spacing: 0.02em; }
.next svg { width: 32px; height: 32px; transition: transform 0.3s var(--ease-out); }
.next a:hover svg { transform: translateX(8px); }
.next a:hover b { color: var(--accent-ink); }
footer.site-foot { background: var(--paper); border-top: 1px solid var(--rule); padding: 32px 0 calc(env(safe-area-inset-bottom) + 40px); }
footer.site-foot .wrap { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 24px; align-items: center; }
footer.site-foot svg.logo { width: 140px; height: auto; color: var(--ink); flex: none; }
footer.site-foot p { color: var(--muted); font-size: 12px; line-height: 1.45; margin: 0; text-align: right; max-width: 34em; text-wrap: balance; }

/* ---------- Shared bits ---------- */
.lede { font-size: clamp(18px, 1.5vw, 20px); font-weight: 300; color: var(--muted); max-width: 40em; margin: 0 0 36px; }
.links { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.links a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-size: 15px; text-decoration: none; }
.links a:hover { color: var(--accent-ink); }
.links a:hover span { text-decoration: underline; text-underline-offset: 4px; }
section.s { padding: clamp(56px, 9vw, 112px) 0 0; }
.s h2 { font-size: clamp(28px, 3.4vw, 44px); line-height: 1.1; margin: 0 0 14px; }

/* ---------- Reveal on scroll: visible by default; hidden only when motion is allowed and a mechanism exists ---------- */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .reveal { animation: reveal linear both; animation-timeline: view(); animation-range: entry 0 entry 200px; }
    @keyframes reveal { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
  }
  .io .reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out); }
  .io .reveal.in { opacity: 1; transform: none; }
}

/* ---------- Cross-document view transitions (Chrome, Safari); normal navigation elsewhere ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-old(root) { animation: 240ms var(--ease-out) both vt-out; }
  ::view-transition-new(root) { animation: 420ms var(--ease-out) both vt-in; }
  ::view-transition-group(page-title) { animation-duration: 480ms; animation-timing-function: var(--ease-out); }
  @keyframes vt-out { to { opacity: 0; transform: translateY(-12px); } }
  @keyframes vt-in { from { opacity: 0; transform: translateY(24px); } }
}

/* ================= Home ================= */
.hero { position: relative; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; color: #F7F4E9; background: #000; overflow: hidden; }
.hero picture, .hero picture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: right center; }
.hero picture { z-index: 0; }
.hero canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; mix-blend-mode: screen; opacity: 0.95; }
.hero::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: linear-gradient(90deg, rgb(0 0 0 / 0.8) 0%, rgb(0 0 0 / 0.35) 45%, rgb(0 0 0 / 0) 72%); }
.hero > .top, .hero > .copy, .hero > .pause { position: relative; z-index: 3; }
.hero .top { padding: calc(env(safe-area-inset-top) + 22px) var(--gut) 0; display: flex; justify-content: space-between; align-items: center; gap: 20px; min-height: calc(var(--nav-h) + env(safe-area-inset-top) + 22px); }
.hero .top svg.logo { width: clamp(200px, 19vw, 300px); height: auto; color: #F7F4E9; display: block; }
.hero .nav a { color: #d9d3c3; }
.hero .nav a:hover, .hero .nav a[aria-current="page"] { color: #fff; }
.hero .menu-btn { color: #F7F4E9; }
.hero .copy { align-self: end; padding: 0 var(--gut) clamp(28px, 6vh, 64px); max-width: 1080px; }
.hero h1 { font-size: clamp(38px, 4.6vw, 64px); line-height: 1.04; letter-spacing: 0.01em; margin: 0 0 22px; }
.hero h1 .w { display: inline-block; }
.hero .sub { font-size: clamp(18px, 1.6vw, 21px); font-weight: 300; color: #e8e2d2; max-width: 34em; margin: 0 0 30px; }
.cta { display: inline-flex; align-items: center; gap: 12px; background: #A84F2E; color: #fff; text-decoration: none; font-weight: 500; letter-spacing: 0.03em; padding: 15px 24px; border-radius: 12px; transition: background-color 0.15s linear, transform 0.12s var(--ease-out); }
.cta:hover { background: #93432a; }
.cta:active { transform: scale(0.97); }
.cta svg { transition: transform 0.25s var(--ease-out); }
.cta:hover svg { transform: translateY(3px); }
.hero .pause { all: unset; position: relative; z-index: 3; justify-self: end; margin: 0 var(--gut) calc(env(safe-area-inset-bottom) + 14px); cursor: pointer; font-size: 13px; color: #cfc9b9; padding: 12px 0; display: inline-flex; gap: 8px; align-items: center; }
.hero .pause:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 699px), (orientation: portrait) {
  .hero::after { background: linear-gradient(180deg, rgb(0 0 0 / 0.55) 0%, rgb(0 0 0 / 0.1) 30%, rgb(0 0 0 / 0.86) 62%, rgb(0 0 0 / 0.92) 100%); }
  .hero picture img { object-position: center bottom; }
}
.ex { border-top: 1px solid var(--rule); }
.ex a { display: grid; grid-template-columns: clamp(56px, 7vw, 110px) clamp(200px, 24vw, 320px) 1fr auto; gap: 0 clamp(16px, 3vw, 40px); align-items: center; padding: clamp(24px, 3.5vw, 40px) 0; border-bottom: 1px solid var(--rule); text-decoration: none; position: relative; overflow: hidden; }
.ex a::before { content: ""; position: absolute; inset: 0; background: var(--accent); opacity: 0.07; transform: scaleX(0); transform-origin: left; transition: transform 0.5s var(--ease-out); }
.ex a:hover::before { transform: scaleX(1); }
.ex .num { font-size: clamp(56px, 9vw, 120px); line-height: 0.9; font-weight: 300; color: var(--accent-ink); transition: transform 0.4s var(--ease-out); }
.ex a:hover .num { transform: translateX(6px); }
.ex h3 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.15; margin: 0 0 8px; }
.ex p { color: var(--muted); max-width: 36em; margin: 0 0 8px; }
.ex .meta { font-size: 15px; color: var(--muted); display: flex; gap: 8px; align-items: center; }
.ex .go { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: 0.03em; white-space: nowrap; padding: 12px 0; }
.ex .go svg { transition: transform 0.25s var(--ease-out); }
.ex a:hover h3, .ex a:hover .go { color: var(--accent-ink); }
.ex a:hover .go svg { transform: translateX(5px); }
.ex .thumb { display: block; overflow: hidden; background: #000; aspect-ratio: 16 / 9; position: relative; z-index: 1; }
.ex .thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s var(--ease-out); }
.ex a:hover .thumb img { transform: scale(1.05); }
.ex a > div, .ex .num, .ex .go { position: relative; z-index: 1; }
@media (max-width: 859px) {
  .ex a { grid-template-columns: 56px 1fr; row-gap: 14px; }
  .ex .num { grid-row: 1 / span 3; align-self: start; }
  .ex .thumb { grid-column: 2; }
  .ex a > div { grid-column: 2; }
  .ex .go { grid-column: 2; margin-top: -6px; }
}
.explore { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--rule); }
.explore a { display: block; padding: 28px 28px 34px 0; text-decoration: none; border-bottom: 1px solid var(--rule); }
.explore a + a { border-left: 1px solid var(--hair); padding-left: 28px; }
.explore b { display: flex; justify-content: space-between; align-items: center; font-size: clamp(22px, 2.2vw, 28px); font-weight: 500; letter-spacing: 0.02em; margin: 0 0 10px; }
.explore b svg { transition: transform 0.3s var(--ease-out); }
.explore span { color: var(--muted); }
.explore a:hover b { color: var(--accent-ink); }
.explore a:hover b svg { transform: translate(4px, -4px); }
@media (max-width: 859px) { .explore { grid-template-columns: 1fr; } .explore a + a { border-left: 0; padding-left: 0; } .explore a { padding: 22px 0; } }

/* ================= Conferencistas ================= */
.speaker { display: grid; grid-template-columns: 220px 1fr; gap: clamp(24px, 5vw, 72px); padding: clamp(40px, 6vw, 72px) 0; border-bottom: 1px solid var(--hair); }
.speaker:last-of-type { border-bottom: 0; }
.photo { position: relative; width: 200px; height: 200px; }
.photo img { position: absolute; inset: 14px; width: calc(100% - 28px); height: calc(100% - 28px); border-radius: 50%; object-fit: cover; background: var(--hair); }
.photo svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.photo circle { fill: none; stroke: var(--accent); stroke-width: 1.2; }
.anim .photo circle { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.4s var(--ease-out); }
.anim [data-draw].drawn .photo circle, .anim .photo[data-draw].drawn circle { stroke-dashoffset: 0; }
.speaker h2 { font-size: clamp(28px, 3.2vw, 40px); margin: 6px 0 6px; }
.speaker .role { color: var(--accent-ink); font-weight: 500; letter-spacing: 0.02em; margin: 0 0 18px; font-size: 18px; }
.speaker .bio { font-size: 18px; max-width: 40em; }
@media (max-width: 759px) { .speaker { grid-template-columns: 1fr; } .photo { width: 150px; height: 150px; } }

/* ================= La firma ================= */
.statement { font-size: clamp(24px, 2.8vw, 38px); line-height: 1.3; font-weight: 300; max-width: 26em; margin: 0 0 24px; }
.firm-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 96px); border-top: 1px solid var(--rule); padding-top: 36px; }
.firm-grid p { color: var(--muted); }
.firm-grid h2 { font-size: clamp(24px, 2.4vw, 32px); margin: 0 0 14px; }
.areas { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--hair); counter-reset: a; }
.areas li { padding: 16px 0; border-bottom: 1px solid var(--hair); font-size: 20px; display: flex; gap: 18px; align-items: baseline; counter-increment: a; }
.areas li::before { content: counter(a, decimal-leading-zero); color: var(--accent-ink); font-size: 14px; min-width: 2em; }
.anim .areas li { opacity: 0; transform: translateX(-16px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.anim .areas.drawn li { opacity: 1; transform: none; }
.anim .areas.drawn li:nth-child(2) { transition-delay: 0.07s; } .anim .areas.drawn li:nth-child(3) { transition-delay: 0.14s; }
.anim .areas.drawn li:nth-child(4) { transition-delay: 0.21s; } .anim .areas.drawn li:nth-child(5) { transition-delay: 0.28s; }
@media (max-width: 859px) { .firm-grid { grid-template-columns: 1fr; } }

/* ================= El lugar ================= */
.venue-intro { max-width: 46em; font-size: clamp(19px, 1.6vw, 22px); font-weight: 300; margin: 0 0 48px; }
.tl { position: relative; }
.tl svg.line { position: absolute; left: 0; right: 0; top: 0; width: 100%; height: 2px; overflow: visible; }
.tl svg.line line { stroke: var(--rule); stroke-width: 1; }
.anim .tl svg.line line { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.6s var(--ease-out); }
.anim .tl.drawn svg.line line { stroke-dashoffset: 0; }
.tl ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.tl li { padding: 26px 20px 0 0; position: relative; }
.tl li::before { content: ""; position: absolute; top: -5px; left: 0; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.anim .tl li { opacity: 0; transform: translateY(14px); transition: opacity 0.6s var(--ease-out), transform 0.6s var(--ease-out); }
.anim .tl.drawn li { opacity: 1; transform: none; }
.anim .tl.drawn li:nth-child(2) { transition-delay: 0.3s; } .anim .tl.drawn li:nth-child(3) { transition-delay: 0.6s; } .anim .tl.drawn li:nth-child(4) { transition-delay: 0.9s; }
.tl b { display: block; font-size: clamp(34px, 4vw, 52px); font-weight: 300; line-height: 1; margin-bottom: 12px; }
.tl span { color: var(--muted); }
@media (max-width: 759px) {
  .tl svg.line { display: none; }
  .tl ol { grid-template-columns: 1fr; border-left: 1px solid var(--rule); margin-left: 5px; }
  .tl li { padding: 0 0 30px 26px; }
  .tl li::before { top: 8px; left: -6px; }
}
.collection { font-size: clamp(18px, 1.5vw, 20px); font-weight: 300; color: var(--muted); max-width: 40em; margin: 40px 0 0; }
.visit { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 72px); border-top: 1px solid var(--rule); padding-top: 32px; margin-top: 56px; }
.visit dl { margin: 0; }
.visit dt { color: var(--muted); font-size: 15px; display: flex; gap: 8px; align-items: center; }
.visit dd { margin: 4px 0 18px; font-size: 20px; font-weight: 500; letter-spacing: 0.02em; }
@media (max-width: 759px) { .visit { grid-template-columns: 1fr; } }

/* Focus rings last, so no reset above can remove them */
:is(a, button, textarea, summary, [tabindex]):focus-visible { outline: 2px solid var(--accent-ink) !important; outline-offset: 3px; }
.hero :is(a, button):focus-visible { outline-color: #F7F4E9 !important; }
