/* ════════════════════════════════════════════════════════
   MOMPARLER CYCLING — Design System
   Dark editorial sport · Inter · Gold accent (sparingly)
   ════════════════════════════════════════════════════════ */

/* ── DESIGN TOKENS ───────────────────────────────────── */
:root {
  /* Backgrounds — pure cool black */
  --bg:          #080808;
  --surface-1:   #101010;
  --surface-2:   #181818;
  --surface-3:   #202020;

  /* Borders */
  --border:         #1C1C1C;
  --border-visible: #2A2A2A;

  /* Text */
  --text-1:  #F5F5F5;
  --text-2:  #909090;
  --text-3:  #606060;
  --text-4:  #303030;

  /* Accent — pure white (monochrome) */
  --accent:        #F5F5F5;
  --accent-dim:    rgba(245, 245, 245, 0.06);
  --accent-hover:  #FFFFFF;

  /* Semantic */
  --success: #3DB87A;
  --error:   #E5484D;

  /* Typography */
  --font-body: 'Inter', sans-serif;

  /* Type scale */
  --display:  clamp(80px, 12vw, 148px);
  --h1:       clamp(56px,  8vw, 100px);
  --h2:       clamp(40px,  6vw,  72px);
  --h3:       clamp(28px, 3.5vw, 48px);
  --body-lg:  18px;
  --body:     16px;
  --body-sm:  14px;
  --caption:  12px;
  --label:    11px;

  /* Spacing (8px grid) */
  --sp-2xs:  2px;
  --sp-xs:   4px;
  --sp-sm:   8px;
  --sp-md:   16px;
  --sp-lg:   24px;
  --sp-xl:   32px;
  --sp-2xl:  48px;
  --sp-3xl:  64px;
  --sp-4xl:  96px;

  /* Layout */
  --max-w:    1240px;
  --nav-h:    100px;
  --section-v: 64px;

  /* Radius — zero */
  --r-xs:  0px;
  --r-sm:  0px;
  --r-md:  0px;

  /* Motion */
  --ease:   cubic-bezier(0.22, 1, 0.36, 1);
  --t-fast: 160ms;
  --t-mid:  240ms;
  --t-slow: 400ms;
}

/* ── LIGHT MODE TOKENS ───────────────────────────────── */
[data-theme="light"] {
  --bg:          #FFFFFF;
  --surface-1:   #FFFFFF;
  --surface-2:   #E8E8E8;
  --surface-3:   #DEDEDE;
  --border:         #E0E0E0;
  --border-visible: #C8C8C8;
  --text-1:  #080808;
  --text-2:  #666666;
  --text-3:  #AAAAAA;
  --text-4:  #D0D0D0;
  --accent:        #080808;
  --accent-dim:    rgba(8, 8, 8, 0.06);
  --accent-hover:  #000000;
}

/* ── RESET ───────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text-1);
  font-size: var(--body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  transition: background-color var(--t-mid) var(--ease), color var(--t-mid) var(--ease);
}

/* Light-mode overrides for hardcoded rgba values */
[data-theme="light"] .site-header {
  background: rgba(255, 255, 255, 0.92);
}


/* Hero is always on a dark background — keep text light in both themes */
[data-theme="light"] .hero-title {
  color: #F2EFE8;
}
[data-theme="light"] .hero-desc {
  color: #F2EFE8;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8), 0 2px 32px rgba(0,0,0,0.6);
}



[data-theme="light"] .modal-backdrop {
  background: rgba(0, 0, 0, 0.50);
}

img, video {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: inherit;
  text-decoration: none;
}

ul[role="list"] {
  list-style: none;
}

button {
  cursor: pointer;
  background: none;
  border: none;
  font: inherit;
}

/* ── LAYOUT UTILITIES ────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(var(--sp-lg), 5vw, var(--sp-3xl));
}

.section {
  padding-block: var(--section-v);
}

.section--alt {
  background: var(--bg);
}

.section--compact {
  padding-block: var(--sp-4xl);
}

.section--tinted {
  background: rgba(128, 128, 128, 0.15);
}

.section-desc {
  font-size: var(--body-lg);
  font-weight: 300;
  line-height: 1.65;
  color: var(--text-2);
  margin-top: var(--sp-lg);
  max-width: 900px;
}

/* ── TYPOGRAPHY ──────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.03em;
}

/* ── BUTTONS ─────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-xs);
  padding: 11px 22px;
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 400;
  letter-spacing: 0.04em;
  border: 1px solid transparent;
  transition:
    background var(--t-fast) var(--ease),
    color var(--t-fast) var(--ease),
    border-color var(--t-fast) var(--ease);
  white-space: nowrap;
  cursor: pointer;
}

/* Bracket-style — default button */
.btn-bracket {
  background: transparent;
  color: var(--text-1);
  border-color: var(--border-visible);
}
.btn-bracket:hover,
.btn-bracket:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

/* Ghost bracket */
.btn-bracket-ghost {
  background: transparent;
  color: var(--text-2);
  border-color: transparent;
  padding-inline: 0;
}
.btn-bracket-ghost:hover,
.btn-bracket-ghost:focus-visible {
  color: var(--text-1);
}

/* Arrow NE icon — pure SVG to avoid iOS emoji substitution */
.btn-arrow-ne {
  display: inline-block;
  width: 0.75em;
  height: 0.75em;
  vertical-align: -0.05em;
  margin: 0 0.05em;
  flex-shrink: 0;
}

.btn-primary {
  background: var(--text-1);
  color: var(--bg);
  border-color: var(--text-1);
  font-weight: 600;
}
.btn-primary:hover,
.btn-primary:focus-visible {
  background: transparent;
  color: var(--text-1);
}

.btn-outline {
  background: transparent;
  color: var(--text-1);
  border-color: var(--border-visible);
}
.btn-outline:hover,
.btn-outline:focus-visible {
  border-color: var(--text-1);
}

.btn-ghost {
  background: transparent;
  color: var(--accent);
  border-color: transparent;
  padding-inline: 0;
}
.btn-ghost:hover,
.btn-ghost:focus-visible {
  color: var(--accent-hover);
}

.btn-full {
  width: 100%;
  justify-content: center;
}

.btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

/* ── LANGUAGE TOGGLE ─────────────────────────────────── */
[data-lang="en"] .lang-es { display: none; }
[data-lang="es"] .lang-en { display: none; }

.lang-toggle {
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-1);
  padding: 6px 16px;
  border: 1px solid var(--text-3);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  flex-shrink: 0;
}

.lang-toggle:hover {
  color: var(--text-1);
  border-color: var(--text-1);
}

.lang-notice {
  font-style: italic;
  color: var(--text-2);
  margin-bottom: var(--sp-xl);
}

/* ── SECTION HEADERS ─────────────────────────────────── */

/* Editorial header — nueva estética */
.section-head-bar {
  padding-bottom: var(--sp-lg);
  margin-bottom: var(--sp-2xl);
}

.section-label {
  display: block;
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-sm);
}

.section-title-lg {
  font-size: var(--h2);
  color: var(--text-1);
  line-height: 0.92;
}

/* Legacy — kept for sobre-nosotros.html / aviso-legal.html */
.section-header {
  margin-bottom: var(--sp-3xl);
}

.section-header--center {
  text-align: center;
}

.section-eyebrow {
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-3);
  margin-bottom: var(--sp-sm);
}

.section-title {
  font-size: var(--h2);
  color: var(--text-1);
}

/* ════════════════════════════════════════════════════════
   HEADER / NAV
════════════════════════════════════════════════════════ */
.site-header {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  height: var(--nav-h);
  z-index: 100;
  background: rgba(8, 8, 8, 0.92);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background var(--t-mid) var(--ease), border-color var(--t-mid) var(--ease);
}

.nav {
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(var(--sp-lg), 5vw, var(--sp-3xl));
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-logo {
  display: flex;
  align-items: center;
  align-self: center;
  line-height: 1;
}

.logo-img {
  height: 78px;
  width: auto;
  display: block;
}

.logo-img--light {
  display: none;
}

[data-theme="light"] .logo-img--dark {
  display: none;
}

[data-theme="light"] .logo-img--light {
  display: block;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-sm);
  list-style: none;
}

.nav-links a {
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-1);
  border: 1px solid var(--text-3);
  padding: 6px 16px;
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.nav-links a:hover,
.nav-links a:focus-visible {
  color: var(--text-1);
  border-color: var(--text-1);
}

.nav-cta {
  border-color: var(--text-1) !important;
}

/* Nav actions group */
.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-xs);
}

/* Theme toggle */
.theme-toggle {
  font-size: var(--caption);
  color: var(--text-1);
  padding: 6px 10px;
  border: 1px solid var(--text-3);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
  flex-shrink: 0;
}

.theme-toggle:hover {
  color: var(--text-1);
  border-color: var(--text-1);
}

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: var(--sp-xs);
}

.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text-1);
  border-radius: 1px;
  transition: transform var(--t-fast) var(--ease), opacity var(--t-fast) var(--ease);
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}
.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ════════════════════════════════════════════════════════
   HERO
════════════════════════════════════════════════════════ */
.hero {
  position: relative;
  margin-top: var(--nav-h);
  min-height: calc(100svh - var(--nav-h));
  display: flex;
  align-items: flex-end;
  justify-content: center;
  overflow: hidden;
}

/* Photo layer — full bleed, behind everything */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #0A0A0A;
}

.hero-photo img,
.hero-photo video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

/* Top and bottom gradient fades */
.hero-fade {
  position: absolute;
  left: 0;
  right: 0;
  z-index: 1;
  pointer-events: none;
}

.hero-fade--top {
  top: 0;
  height: 12%;
  background: linear-gradient(to bottom, var(--bg) 0%, transparent 100%);
}

.hero-fade--bottom {
  bottom: 0;
  height: 55%;
  background: linear-gradient(to top, var(--bg) 0%, transparent 100%);
}

/* Watermark — above photo, below text */
.hero-watermark {
  position: absolute;
  bottom: 0;
  right: 0;
  pointer-events: none;
  user-select: none;
  z-index: 2;
}

.hero-watermark img {
  height: clamp(200px, 30vw, 480px);
  width: auto;
  opacity: 0.15;
}

.wm-bk { display: none; }

[data-theme="light"] .wm-wt { display: none; }
[data-theme="light"] .wm-bk { display: block; }

.hero-content {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: var(--max-w);
  margin-inline: auto;
  padding-inline: clamp(var(--sp-lg), 5vw, var(--sp-3xl));
  padding-top: var(--sp-4xl);
  padding-bottom: var(--sp-4xl);
  text-align: center;
}


.eyebrow {
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-3);
  margin-bottom: var(--sp-lg);
}

.hero-title {
  font-size: clamp(22px, 10vw, 136px);
  font-weight: 800;
  line-height: 1.0;
  letter-spacing: -0.04em;
  color: #F2EFE8;
  text-shadow: 0 2px 32px rgba(0,0,0,0.75), 0 1px 8px rgba(0,0,0,0.5);
  margin-bottom: var(--sp-xl);
  white-space: nowrap;
}

.hero-title em {
  font-style: italic;
}

.hero-desc {
  max-width: 900px;
  margin-inline: auto;
  font-size: var(--body-lg);
  font-weight: 400;
  line-height: 1.65;
  color: #F2EFE8;
  text-shadow: 0 1px 8px rgba(0,0,0,0.8), 0 2px 32px rgba(0,0,0,0.6);
  margin-bottom: var(--sp-2xl);
}

.hero-desc strong {
  font-weight: 800;
}

.hero-actions {
  display: flex;
  gap: var(--sp-lg);
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
}

/* ── TICKER ───────────────────────────────────────────── */
.ticker-strip {
  background: var(--surface-1);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding-block: 13px;
  mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 8%, black 92%, transparent);
}

.ticker-track {
  display: flex;
  gap: var(--sp-xl);
  align-items: center;
  width: max-content;
  animation: tickerScroll 40s linear infinite;
  font-family: var(--font-body);
  font-size: var(--caption);
  color: var(--text-3);
  letter-spacing: 0.04em;
}

.ticker-sep {
  color: var(--accent);
  opacity: 0.6;
}

@keyframes tickerScroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ════════════════════════════════════════════════════════
   PROJECTS — horizontal two-column layout
════════════════════════════════════════════════════════ */

/* Horizontal row: dos columnas en desktop */
.projects-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-top: 1px solid var(--border-visible);
  border-bottom: 1px solid var(--border-visible);
  margin-top: var(--sp-lg);
}

.project-col {
  padding-block: var(--sp-2xl);
  min-width: 0;
}

.project-col:first-child {
  padding-right: var(--sp-3xl);
  border-right: 1px solid var(--border-visible);
}

.project-col:last-child {
  padding-left: var(--sp-3xl);
}

.project-col-body {
  padding-top: var(--sp-lg);
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  align-items: flex-start;
}

.project-col-actions {
  display: flex;
  gap: var(--sp-md);
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--sp-xs);
}

/* Legacy — mantenido por compatibilidad */
.project-ed {
  padding-block: var(--sp-3xl);
  border-bottom: 1px solid var(--border-visible);
}

.project-ed:first-of-type {
  border-top: 1px solid var(--border-visible);
  margin-top: var(--sp-lg);
}

/* Header row: title + big number */
.project-ed-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--sp-2xl);
  gap: var(--sp-lg);
}

.project-ed-tag {
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 400;
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-sm);
}

.project-ed-name {
  font-size: clamp(20px, 2.6vw, 44px);
  line-height: 1.0;
  color: var(--text-1);
  white-space: nowrap;
}

.project-ed-num {
  font-family: var(--font-body);
  font-size: clamp(72px, 10vw, 130px);
  font-weight: 800;
  line-height: 1;
  color: rgba(255,255,255,0.04);
  flex-shrink: 0;
  user-select: none;
  letter-spacing: -0.02em;
}

/* Body: image | content */
.project-ed-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-3xl);
  align-items: start;
}

/* Visual */
.project-visual {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
}

.project-visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.project-visual--benidorm {
  background:
    radial-gradient(ellipse 80% 60% at 50% 120%, rgba(0, 80, 160, 0.4) 0%, transparent 70%),
    linear-gradient(160deg, #0A1525 0%, #0C2040 40%, #071530 100%);
}

.project-visual--jaen {
  background:
    radial-gradient(ellipse 80% 60% at 50% 120%, rgba(120, 80, 0, 0.4) 0%, transparent 70%),
    linear-gradient(160deg, #160E04 0%, #2A1A06 40%, #1A1005 100%);
}

.project-visual-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(7,7,10,0.5) 0%, transparent 60%);
}

.project-logo-slot {
  position: absolute;
  bottom: var(--sp-md);
  left: var(--sp-lg);
  z-index: 2;
}

.project-logo-slot img {
  max-height: 52px;
  width: auto;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.7)) drop-shadow(0 1px 3px rgba(0,0,0,0.5));
}

.logo-placeholder {
  display: inline-block;
  font-family: var(--font-body);
  font-size: var(--caption);
  color: rgba(255,255,255,0.25);
  padding: 4px 10px;
  border: 1px dashed rgba(255,255,255,0.12);
  letter-spacing: 0.08em;
}

/* Content */
.project-ed-content {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xl);
  padding-top: var(--sp-xs);
}

.project-desc {
  font-size: var(--body-sm);
  color: var(--text-2);
  line-height: 1.8;
}

.project-desc em {
  color: var(--text-1);
  font-style: italic;
}

/* Stats row */
.project-stats-row {
  display: flex;
  border-top: 1px solid var(--border-visible);
  border-bottom: 1px solid var(--border-visible);
}

.stat-item {
  flex: 1;
  padding: var(--sp-md) 0;
  padding-right: var(--sp-lg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.stat-item:last-child {
  border-right: none;
  padding-right: 0;
  padding-left: var(--sp-lg);
}

.stat-item:not(:first-child):not(:last-child) {
  padding-inline: var(--sp-lg);
}

.stat-num {
  font-family: var(--font-body);
  font-size: 26px;
  font-weight: 700;
  color: var(--text-1);
  line-height: 1;
  letter-spacing: -0.02em;
}

.stat-label {
  font-size: var(--caption);
  color: var(--text-3);
  letter-spacing: 0.02em;
}

/* ════════════════════════════════════════════════════════
   MODAL
════════════════════════════════════════════════════════ */
.modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-lg);
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--t-mid) var(--ease), visibility var(--t-mid) var(--ease);
}

.modal.is-open {
  visibility: visible;
  opacity: 1;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  /* Solid neutral-black scrim. This element deliberately has NO
     backdrop-filter: Safari/WebKit drops the entire paint of a
     backdrop-filtered element when it lives inside an opacity-animated
     container (.modal), which left the page completely un-dimmed there.
     A plain translucent background dims the content reliably in every
     browser; the blur below is a progressive enhancement on a separate
     layer, so if Safari skips it the shading still works. */
  background: rgba(0, 0, 0, 0.66);
  cursor: pointer;
}

/* Frosted-glass blur layered BEHIND the scrim (painted first, so it samples
   the page rather than the scrim). Kept off .modal-backdrop on purpose: in
   Safari this layer may be skipped, but the solid scrim above still dims. */
.modal::before {
  content: "";
  position: absolute;
  inset: 0;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: none;
}

.modal-panel {
  position: relative;
  z-index: 1;
  background: var(--surface-1);
  border: 1px solid var(--border-visible);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  width: 100%;
  max-width: 640px;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px);
  transition: transform var(--t-mid) var(--ease);
}

.modal.is-open .modal-panel {
  transform: translateY(0);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--sp-lg) var(--sp-2xl) 0;
}

.modal-logo {
  padding: 0;
}

.modal-close {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  color: var(--text-3);
  cursor: pointer;
  border: 1px solid var(--border);
  transition: color var(--t-fast) var(--ease), border-color var(--t-fast) var(--ease);
}

.modal-close:hover {
  color: var(--text-1);
  border-color: var(--border-visible);
}

.modal-text em {
  font-style: italic;
  font-weight: 400;
}

.modal-logo img {
  max-height: 44px;
  width: auto;
}

.modal-image {
  width: 100%;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  margin-top: var(--sp-xl);
}

.modal-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.modal-image--benidorm {
  background:
    radial-gradient(ellipse 80% 60% at 50% 120%, rgba(0, 80, 160, 0.5) 0%, transparent 70%),
    linear-gradient(160deg, #0A1525 0%, #0C2040 40%, #071530 100%);
}

.modal-image--jaen {
  background:
    radial-gradient(ellipse 80% 60% at 50% 120%, rgba(120, 80, 0, 0.5) 0%, transparent 70%),
    linear-gradient(160deg, #160E04 0%, #2A1A06 40%, #1A1005 100%);
}

.modal-image--pascual,
.modal-image--magdalena {
  background: linear-gradient(160deg, #101010 0%, #1A1A1A 100%);
}

/* ── BIO MODALS: panel grande, dos columnas ─────────────── */
#modal-pascual .modal-panel,
#modal-magdalena .modal-panel {
  max-width: min(960px, 92vw);
  width: 100%;
  height: 85vh;
  max-height: 85vh;
  overflow: hidden;
  display: grid;
  grid-template-columns: 2fr 3fr;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "photo  close"
    "photo  body";
}

#modal-pascual .modal-close,
#modal-magdalena .modal-close {
  grid-area: close;
  align-self: start;
  justify-self: end;
  margin: var(--sp-lg) var(--sp-lg) 0 0;
}

#modal-pascual .modal-image,
#modal-magdalena .modal-image {
  grid-area: photo;
  aspect-ratio: unset;
  width: 100%;
  height: 100%;
  margin-top: 0;
}

#modal-pascual .modal-body,
#modal-magdalena .modal-body {
  grid-area: body;
  overflow-y: auto;
  padding: var(--sp-md) var(--sp-xl) var(--sp-xl);
}

#modal-pascual .modal-eyebrow,
#modal-magdalena .modal-eyebrow {
  margin-bottom: 2px;
}

#modal-pascual .modal-title,
#modal-magdalena .modal-title {
  margin-bottom: var(--sp-md);
}

#modal-pascual .modal-text,
#modal-magdalena .modal-text {
  font-size: 13px;
  line-height: 1.65;
}

@media (max-width: 640px) {
  #modal-pascual .modal-panel,
  #modal-magdalena .modal-panel {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    grid-template-areas:
      "close"
      "photo"
      "body";
    height: 90dvh;
    max-height: 90dvh;
    overflow-y: auto;
  }

  #modal-pascual .modal-close,
  #modal-magdalena .modal-close {
    margin: var(--sp-md) var(--sp-md) var(--sp-lg) 0;
  }

  #modal-pascual .modal-image,
  #modal-magdalena .modal-image {
    height: 45vw;
  }

  #modal-pascual .modal-body,
  #modal-magdalena .modal-body {
    overflow-y: visible;
  }
}

.project-visual--pascual {
  background: linear-gradient(160deg, #0D0D0D 0%, #1A1A1A 60%, #111111 100%);
}

.project-visual--magdalena {
  background: linear-gradient(160deg, #0D0D0D 0%, #181818 60%, #0F0F0F 100%);
}

/* Team names always on one line */
.project-visual--pascual ~ .project-col-body .project-ed-name,
.project-visual--magdalena ~ .project-col-body .project-ed-name {
  font-size: clamp(20px, 2.2vw, 34px);
  white-space: nowrap;
}

.modal-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-xs);
}

.modal-body {
  padding: var(--sp-xl) var(--sp-2xl) var(--sp-2xl);
}

.modal-title {
  font-size: clamp(16px, 2.8vw, 32px);
  line-height: 1.0;
  white-space: nowrap;
  color: var(--text-1);
  margin-bottom: var(--sp-lg);
}

.modal-text {
  font-size: var(--body-sm);
  color: var(--text-2);
  line-height: 1.85;
}

.modal-text em {
  color: var(--text-1);
  font-style: italic;
}

.modal-text strong {
  color: var(--text-1);
}

/* ════════════════════════════════════════════════════════
   SPONSORS
════════════════════════════════════════════════════════ */
.sponsors-track-wrapper {
  overflow: hidden;
  padding-block-start: 0;
  padding-block-end: var(--sp-md);
  mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
  -webkit-mask-image: linear-gradient(to right, transparent, black 12%, black 88%, transparent);
}

.sponsors-track {
  display: flex;
  gap: var(--sp-lg);
  align-items: center;
  width: max-content;
  animation: scrollTrack 50s linear infinite;
}

.sponsors-track:hover {
  animation-play-state: paused;
}

.sponsor-item {
  flex-shrink: 0;
  width: 200px;
  height: 88px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-sm);
  padding: var(--sp-md) var(--sp-xl);
  transition: border-color var(--t-fast) var(--ease);
}

.sponsor-item:hover {
  border-color: var(--accent);
}

.sponsor-item img {
  max-height: 48px;
  width: auto;
  filter: opacity(0.85);
  transition: filter var(--t-fast) var(--ease);
}

.sponsor-item:hover img {
  filter: opacity(1);
}

/* Logos negros/oscuros: forzar blanco puro en modo oscuro */
.sponsor-item--dark-logo img {
  filter: brightness(0) invert(1) opacity(0.85);
}
.sponsor-item--dark-logo:hover img {
  filter: brightness(0) invert(1) opacity(1);
}
[data-theme="light"] .sponsor-item--dark-logo img {
  filter: opacity(0.85);
}
[data-theme="light"] .sponsor-item--dark-logo:hover img {
  filter: opacity(1);
}

/* Logos blancos: invertir en modo claro para hacerlos visibles */
[data-theme="light"] .sponsor-item--light-logo img {
  filter: invert(1) opacity(0.85);
}
[data-theme="light"] .sponsor-item--light-logo:hover img {
  filter: invert(1) opacity(1);
}

.sponsor-placeholder {
  font-family: var(--font-body);
  font-size: var(--label);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-3);
}

@keyframes scrollTrack {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ════════════════════════════════════════════════════════
   TEAM — editorial list
════════════════════════════════════════════════════════ */
.team-editorial {
  border-top: 1px solid var(--border-visible);
  margin-bottom: var(--sp-3xl);
}

.team-ed-item {
  border-bottom: 1px solid var(--border);
  padding-block: var(--sp-2xl);
}

.team-ed-role {
  font-family: var(--font-body);
  font-size: var(--caption);
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-md);
}

.team-ed-row {
  display: flex;
  gap: var(--sp-2xl);
  align-items: flex-start;
}

.team-ed-photo {
  flex-shrink: 0;
  width: 84px;
  height: 84px;
  overflow: hidden;
  border: 1px solid var(--border-visible);
}

.team-ed-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-photo-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-2);
  font-family: var(--font-body);
  font-size: 22px;
  font-weight: 800;
  color: var(--text-3);
  letter-spacing: 0.05em;
}

.team-ed-info { flex: 1; }

.team-location {
  font-family: var(--font-body);
  font-size: var(--caption);
  color: var(--text-3);
  letter-spacing: 0.04em;
  margin-bottom: var(--sp-xs);
}

.team-ed-name {
  font-size: var(--h3);
  color: var(--text-1);
  margin-bottom: var(--sp-sm);
}

.team-name { font-size: 26px; }

.team-bio {
  font-size: var(--body-sm);
  color: var(--text-2);
  line-height: 1.8;
  max-width: 600px;
}

.nosotros-cta { text-align: center; }

/* ════════════════════════════════════════════════════════
   CONTACT
════════════════════════════════════════════════════════ */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: var(--sp-4xl);
  align-items: start;
}

.contact-info .section-title {
  margin-bottom: var(--sp-lg);
}

#contacto .section-head-bar {
  max-width: 640px;
  margin-inline: auto;
}

.contact-desc {
  font-size: var(--body-sm);
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: var(--sp-xl);
}

.contact-email {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 18px;
  font-weight: 500;
  color: var(--text-1);
  letter-spacing: 0.01em;
  border-bottom: 1px solid var(--border-visible);
  padding-bottom: 2px;
  transition: border-color var(--t-fast) var(--ease);
}

.contact-email:hover,
.contact-email:focus-visible {
  border-color: var(--text-1);
}

/* Form */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  max-width: 640px;
  margin-inline: auto;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-xs);
}

.form-group label {
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-2);
}

.form-group input,
.form-group textarea {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--text-3);
  color: var(--text-1);
  font-family: var(--font-body);
  font-size: var(--body);
  padding: var(--sp-sm) 0;
  outline: none;
  width: 100%;
  transition: border-color var(--t-fast) var(--ease);
  -webkit-appearance: none;
}

.form-group input:focus,
.form-group textarea:focus {
  border-color: var(--accent);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
  color: var(--text-2);
}

.form-group textarea {
  resize: vertical;
  min-height: 128px;
}

.form-legal {
  font-size: 12px;
  color: var(--text-3);
  text-align: center;
  line-height: 1.6;
}

.form-legal a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast) var(--ease);
}

.form-legal a:hover {
  border-color: var(--accent);
}

/* ════════════════════════════════════════════════════════
   FOOTER
════════════════════════════════════════════════════════ */
.site-footer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  padding-block: var(--sp-3xl) var(--sp-xl);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  margin-bottom: var(--sp-sm);
}

.footer-tagline {
  font-size: var(--caption);
  color: var(--text-3);
  letter-spacing: 0.08em;
}

.footer-nav {
  display: flex;
  gap: var(--sp-xl);
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}

.footer-nav a {
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-3);
  transition: color var(--t-fast) var(--ease);
}

.footer-nav a:hover,
.footer-nav a:focus-visible {
  color: var(--text-1);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--caption);
  color: var(--text-4);
  flex-wrap: wrap;
  gap: var(--sp-sm);
}

.footer-bottom a {
  color: var(--text-3);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}

.footer-bottom a:hover {
  color: var(--text-1);
  border-color: var(--text-1);
}

/* ════════════════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
  :root { --section-v: 56px; }
  .contact-grid { grid-template-columns: 1fr; gap: var(--sp-3xl); }
}

@media (max-width: 860px) {
  :root { --section-v: 48px; }

  .projects-row { grid-template-columns: 1fr; }
  .project-col:first-child {
    padding-right: 0;
    border-right: none;
    border-bottom: 1px solid var(--border-visible);
    padding-bottom: var(--sp-2xl);
  }
  .project-col:last-child {
    padding-left: 0;
    padding-top: var(--sp-2xl);
  }
  .project-ed-body { grid-template-columns: 1fr; }
  .project-ed-top { align-items: flex-start; }
  .project-ed-num { font-size: 64px; }

  #proyectos .project-ed-name { font-size: clamp(36px, 9vw, 48px); white-space: normal; }

  .team-ed-row { gap: var(--sp-xl); }

  .footer-top { flex-direction: column; gap: var(--sp-xl); }
  .footer-nav { justify-content: flex-start; gap: var(--sp-md); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 680px) {
  .br-desktop {
    display: none;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    height: calc(100svh - var(--nav-h));
    z-index: 200;
    background: rgba(7, 7, 10, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: var(--sp-xl);
    padding: var(--sp-2xl) var(--sp-lg);
    overflow-y: auto;
  }
  [data-theme="light"] .nav-links {
    background: rgba(255, 255, 255, 0.98);
  }

  .nav-links.is-open { display: flex; }

  .nav-links a { font-size: 20px; color: var(--text-1); }

  .nav-toggle { display: flex; }

  .hero-actions { flex-direction: column; align-items: center; gap: var(--sp-md); }

  /* Baja el bloque de título + botones del hero hacia la parte inferior del
     viewport en móvil. Se alarga el .hero para que el vídeo llegue más abajo
     y se reducen los paddings internos para anclar el contenido al fondo. */
  .hero {
    min-height: calc(100svh - var(--nav-h) + 120px);
  }
  .hero-content {
    padding-top: var(--sp-lg);
    padding-bottom: var(--sp-sm);
  }

  /* Nombres del equipo (Pascual / Magdalena) más grandes en la home móvil */
  #nosotros .project-ed-name {
    font-size: clamp(28px, 7.5vw, 36px);
    white-space: normal;
  }

  /* Hero siempre sobre vídeo en móvil: tratar texto y botón ghost como en modo oscuro */
  html[data-theme="light"] .hero-desc {
    color: #F2EFE8;
    text-shadow: 0 1px 8px rgba(0,0,0,0.8), 0 2px 32px rgba(0,0,0,0.6);
  }
  html[data-theme="light"] .hero-desc strong {
    color: #F2EFE8;
  }
  html[data-theme="light"] .hero-actions .btn-bracket-ghost {
    color: #F2EFE8;
    background: rgba(0, 0, 0, 0.28);
    border-color: rgba(255, 255, 255, 0.22);
    padding-inline: 22px;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }
  html[data-theme="light"] .hero-actions .btn-bracket-ghost:hover,
  html[data-theme="light"] .hero-actions .btn-bracket-ghost:focus-visible {
    color: #F2EFE8;
    background: rgba(0, 0, 0, 0.4);
  }

  .footer-top { align-items: center; }
  .footer-nav { justify-content: center; text-align: center; }

  /* Entrada escalonada del hero en móvil para dejar ver el vídeo */
  .hero-title,
  .hero-desc,
  .hero-actions {
    animation: hero-mobile-in 0.7s var(--ease) both;
    will-change: opacity, transform;
  }
  .hero-title   { animation-delay: 1.2s; }
  .hero-desc    { animation-delay: 2.2s; }
  .hero-actions { animation-delay: 2.9s; }

  .project-stats-row { flex-wrap: wrap; }

  .team-ed-row { flex-direction: column; gap: var(--sp-md); }
}

@keyframes hero-mobile-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (max-width: 680px) and (prefers-reduced-motion: reduce) {
  .hero-title,
  .hero-desc,
  .hero-actions {
    opacity: 1;
    transform: none;
    animation: none;
  }
}

/* ════════════════════════════════════════════════════════
   SOBRE NOSOTROS — inner page styles
════════════════════════════════════════════════════════ */
.page-hero {
  padding-block: calc(var(--nav-h) + var(--sp-4xl)) var(--sp-2xl);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.page-hero-title {
  font-size: var(--h1);
  margin-top: var(--sp-sm);
}

.about-intro {
  max-width: 720px;
}

.about-lead {
  font-family: var(--font-body);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--text-1);
  margin-bottom: var(--sp-xl);
}

.about-intro p {
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: var(--sp-md);
}

.person-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--sp-4xl);
  align-items: start;
}

.person-grid--reverse {
  direction: rtl;
}

.person-grid--reverse > * {
  direction: ltr;
}

.person-photo {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: var(--r-sm);
  border: 1px solid var(--border);
}

.person-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.person-photo-placeholder {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  font-family: var(--font-body);
  font-size: 72px;
  font-weight: 800;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.person-name {
  font-size: var(--h2);
  margin-bottom: var(--sp-xs);
}

.person-origin {
  font-family: var(--font-body);
  font-size: var(--caption);
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: var(--sp-xl);
}

.person-bio p {
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: var(--sp-md);
  font-size: var(--body-sm);
}

.person-bio p:last-child {
  margin-bottom: 0;
}

@media (max-width: 860px) {
  .person-grid,
  .person-grid--reverse {
    grid-template-columns: 1fr;
    direction: ltr;
    gap: var(--sp-xl);
  }

  .person-photo {
    max-width: 240px;
  }
}

/* ════════════════════════════════════════════════════════
   AVISO LEGAL — legal page styles
════════════════════════════════════════════════════════ */
.legal-content {
  max-width: 720px;
}

.legal-content h2 {
  font-size: var(--h3);
  margin-top: var(--sp-2xl);
  margin-bottom: var(--sp-md);
  color: var(--text-1);
}

.legal-content h2:first-child {
  margin-top: 0;
}

.legal-content p,
.legal-content li {
  font-size: var(--body-sm);
  color: var(--text-2);
  line-height: 1.8;
  margin-bottom: var(--sp-md);
}

.legal-content ul {
  list-style: disc;
  padding-left: var(--sp-xl);
  margin-bottom: var(--sp-md);
}

.legal-content a {
  color: var(--accent);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-fast) var(--ease);
}

.legal-content a:hover {
  border-color: var(--accent);
}

.legal-date {
  margin-top: var(--sp-3xl);
  color: var(--text-3) !important;
  font-size: var(--caption) !important;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
