/* ============================================
   ALEJANDRO TRIANO BARRAGÁN — Design System
   Editorial · Ink & Mint · Serif display
   Hermano del sistema de unaiazkunaga.com,
   con tokens, tipografía y componentes propios.
   ============================================ */

/* --- Tokens --- */
:root {
  --bg:          #090b10;
  --surface:     #10131a;
  --surface-2:   #161a23;
  --border:      #20242e;
  --text:        #edeff2;
  --text-2:      #8a909c;
  --text-3:      #4a505d;
  --accent:      #5fd9a6;
  --accent-soft: rgba(95, 217, 166, 0.14);
  --accent-line: rgba(95, 217, 166, 0.32);
  --gold:        #d9bd8a;
  --max-w:       1240px;
  --pad:         clamp(20px, 4vw, 64px);
  --radius:      10px;
  --radius-lg:   22px;
  --ease:        cubic-bezier(0.16, 1, 0.3, 1);
  --spring:      cubic-bezier(0.175, 0.885, 0.32, 1.6);
  --serif:       'Fraunces', Georgia, 'Times New Roman', serif;
  --sans:        'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
button { background: none; border: none; cursor: pointer; font: inherit; color: inherit; }
::selection { background: var(--accent-soft); color: var(--text); }

/* --- Tipografía --- */
.a-display {
  font-family: var(--serif);
  font-size: clamp(48px, 7.5vw, 112px);
  font-weight: 600;
  font-variation-settings: 'SOFT' 0, 'WONK' 1, 'opsz' 144;
  line-height: 0.96;
  letter-spacing: -0.025em;
}
.a-heading-xl {
  font-family: var(--serif);
  font-size: clamp(27px, 3.8vw, 52px);
  font-weight: 500;
  font-variation-settings: 'SOFT' 0, 'WONK' 1, 'opsz' 100;
  line-height: 1.12;
  letter-spacing: -0.02em;
}
.a-heading-lg {
  font-family: var(--serif);
  font-size: clamp(22px, 3vw, 38px);
  font-weight: 500;
  font-variation-settings: 'opsz' 72;
  line-height: 1.15;
  letter-spacing: -0.015em;
}
.a-label {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-2);
}
.a-label--accent { color: var(--accent); }
.a-body { font-size: 16px; line-height: 1.75; color: var(--text-2); }
.a-body-lg { font-size: clamp(16px, 1.4vw, 19px); line-height: 1.75; color: var(--text-2); }
em.a-ital {
  font-style: italic;
  font-variation-settings: 'SOFT' 20, 'WONK' 1;
  color: var(--accent);
}

/* --- Layout --- */
.a-container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 var(--pad);
}
.a-section {
  padding: clamp(72px, 9vw, 130px) 0;
  border-top: 1px solid var(--border);
}
.a-section__header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: clamp(32px, 4vw, 56px);
}

/* ============================================
   LOADER
   ============================================ */
.a-loader {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at 50% 60%, #12321f 0%, #0a1018 45%, #050709 100%);
  transition: opacity 0.7s var(--ease), visibility 0.7s;
}
.a-loader.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.a-loader__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 190px;
  height: 190px;
  user-select: none;
}
.a-loader__mark {
  position: relative;
  z-index: 1;
  font-family: var(--serif);
  font-size: 40px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: #fff;
  display: flex;
  gap: 2px;
}
.a-loader__mark span {
  display: inline-block;
  opacity: 0.35;
  animation: loaderMark 2.6s infinite;
}
@keyframes loaderMark {
  0%, 100% { opacity: 0.35; transform: translateY(0); }
  25%      { opacity: 1;    transform: translateY(-4px); }
  55%      { opacity: 0.6;  transform: translateY(0); }
}
.a-loader__ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  animation: loaderRing 5s linear infinite;
}
@keyframes loaderRing {
  0% {
    transform: rotate(90deg);
    box-shadow:
      0 6px 12px 0 #5fd9a6 inset,
      0 12px 18px 0 #1f8f68 inset,
      0 36px 36px 0 #0f4a37 inset,
      0 0 3px 1.2px rgba(95, 217, 166, 0.3),
      0 0 6px 1.8px rgba(31, 143, 104, 0.2);
  }
  50% {
    transform: rotate(270deg);
    box-shadow:
      0 6px 12px 0 #8ee8c2 inset,
      0 12px 6px 0 #2aa87c inset,
      0 24px 36px 0 #1f8f68 inset,
      0 0 3px 1.2px rgba(142, 232, 194, 0.3),
      0 0 6px 1.8px rgba(31, 143, 104, 0.2);
  }
  100% {
    transform: rotate(450deg);
    box-shadow:
      0 6px 12px 0 #5fd9a6 inset,
      0 12px 18px 0 #1f8f68 inset,
      0 36px 36px 0 #0f4a37 inset,
      0 0 3px 1.2px rgba(95, 217, 166, 0.3),
      0 0 6px 1.8px rgba(31, 143, 104, 0.2);
  }
}

/* --- Cursor --- */
.a-cursor {
  position: fixed;
  width: 8px;
  height: 8px;
  background: var(--accent);
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: width 0.3s var(--ease), height 0.3s var(--ease), background 0.3s, opacity 0.3s;
}
.a-cursor.expand {
  width: 44px;
  height: 44px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
@media (hover: none) { .a-cursor { display: none; } }

/* --- Barra de progreso --- */
.a-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 2px;
  z-index: 9990;
  background: transparent;
}
.a-progress__bar {
  height: 100%;
  width: 0%;
  background: var(--accent);
  transition: width 0.1s linear;
}

/* ============================================
   NAVBAR
   ============================================ */
.a-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 900;
  padding: 18px 0;
  transition: padding 0.4s var(--ease), background 0.5s, border-color 0.5s, box-shadow 0.5s;
  background: rgba(9, 11, 16, 0.55);
  border-bottom: 1px solid transparent;
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}
.a-nav.scrolled {
  padding: 12px 0;
  background: rgba(9, 11, 16, 0.82);
  border-bottom-color: var(--border);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}
.a-nav__inner {
  display: flex;
  align-items: center;
  gap: 40px;
}
.a-nav__logo {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
}
.a-nav__logo-img { height: 30px; width: auto; }
.a-nav__logo-text {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 500;
  font-variation-settings: 'opsz' 40;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
}
.a-nav__logo-text b { font-weight: 500; }
.a-nav__logo-text span { color: var(--text-2); }
@media (max-width: 400px) { .a-nav__logo-text { display: none; } }
.a-nav__links {
  display: flex;
  align-items: center;
  gap: 30px;
  margin: 0 auto;
}
.a-nav__links a {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s;
  position: relative;
  padding: 2px 0;
}
.a-nav__links a::after {
  content: '';
  position: absolute;
  bottom: -2px; left: 0;
  width: 0;
  height: 1px;
  background: var(--accent);
  transition: width 0.35s var(--ease);
}
.a-nav__links a:hover,
.a-nav__links a.active { color: var(--text); }
.a-nav__links a:hover::after,
.a-nav__links a.active::after { width: 100%; }

.a-nav__cta {
  font-size: 13px;
  font-weight: 500;
  color: var(--accent);
  padding: 8px 18px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
  white-space: nowrap;
  transition: all 0.5s var(--spring);
}
.a-nav__cta:hover {
  background: rgba(95, 217, 166, 0.22);
  border-color: var(--accent);
  transform: translateY(-1px) scale(1.03);
}
.a-nav__toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  margin-left: auto;
  position: relative;
  z-index: 920;
}
.a-nav__toggle span {
  display: block;
  width: 22px;
  height: 1.5px;
  background: var(--text);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}
.a-nav__toggle.open span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
.a-nav__toggle.open span:nth-child(2) { opacity: 0; }
.a-nav__toggle.open span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* --- Menú móvil --- */
.a-menu {
  position: fixed;
  inset: 0;
  z-index: 910;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  padding: 110px var(--pad) var(--pad);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
  overflow-y: auto;
}
.a-menu.open { opacity: 1; visibility: visible; }
.a-menu__links { display: flex; flex-direction: column; gap: 4px; }
.a-menu__links a {
  font-family: var(--serif);
  font-size: clamp(36px, 8vw, 64px);
  font-weight: 500;
  font-variation-settings: 'opsz' 100;
  letter-spacing: -0.025em;
  color: var(--text-3);
  transition: color 0.2s;
}
.a-menu__links a:hover { color: var(--accent); }
.a-menu__bottom {
  margin-top: auto;
  padding-top: 36px;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.a-menu__bottom a { font-size: 13px; color: var(--text-2); }

/* ============================================
   HERO
   ============================================ */
.a-hero {
  min-height: 100svh;
  display: flex;
  align-items: center;
  padding-top: 110px;
  padding-bottom: clamp(48px, 6vw, 80px);
  position: relative;
  overflow: hidden;
}
.a-hero .a-container {
  display: flex;
  align-items: center;
  gap: clamp(32px, 4.5vw, 84px);
  width: 100%;
  position: relative;
  z-index: 2;
}
.a-hero__left {
  flex: 0 0 56%;
  display: flex;
  flex-direction: column;
}

/* Fondo: línea de mercado animada */
.a-market {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.5;
  /* El gráfico se concentra a la derecha, detrás del retrato, para no pisar el titular */
  mask-image: radial-gradient(ellipse 68% 78% at 80% 58%, #000 8%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 68% 78% at 80% 58%, #000 8%, transparent 70%);
}
.a-market svg { width: 100%; height: 100%; display: block; }
.a-market__grid line { stroke: var(--border); stroke-width: 1; }
.a-market__line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 1400;
  stroke-dashoffset: 1400;
  animation: drawLine 4.5s 1.1s var(--ease) forwards;
  filter: drop-shadow(0 0 4px rgba(95, 217, 166, 0.28));
}
.a-market__line--ghost {
  stroke: var(--text-3);
  stroke-width: 1;
  filter: none;
  animation-delay: 1.4s;
  opacity: 0.7;
}
.a-market__area {
  fill: url(#a-area-grad);
  opacity: 0;
  animation: fadeIn 2s 3.4s ease forwards;
}
@keyframes drawLine { to { stroke-dashoffset: 0; } }
@keyframes fadeIn   { to { opacity: 1; } }

/* Spotlight que sigue al ratón */
.a-spotlight {
  position: absolute;
  width: 520px;
  height: 520px;
  border-radius: 50%;
  background: radial-gradient(circle at center,
    rgba(95, 217, 166, 0.09) 0%,
    rgba(95, 217, 166, 0.035) 40%,
    transparent 70%);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s;
  z-index: 1;
  transform: translate(-50%, -50%);
  will-change: left, top;
}
.a-spotlight.visible { opacity: 1; }

/* Rótulo rotatorio */
.a-rotator {
  height: 26px;
  overflow: hidden;
  margin-bottom: 26px;
  opacity: 0;
  animation: fadeUp 0.8s 0.6s var(--ease) forwards;
}
.a-rotator__track {
  display: flex;
  flex-direction: column;
  transition: transform 0.75s var(--ease);
}
.a-rotator__item {
  height: 26px;
  line-height: 26px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  white-space: nowrap;
}

.a-hero__title {
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 68px);
  font-weight: 500;
  font-variation-settings: 'SOFT' 0, 'WONK' 1, 'opsz' 144;
  line-height: 1.02;
  letter-spacing: -0.03em;
  opacity: 0;
  animation: fadeUp 1s 0.75s var(--ease) forwards;
}
.a-hero__name {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-2);
  margin-bottom: 18px;
}
.a-hero__bottom {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 40px;
  margin-top: 44px;
  opacity: 0;
  animation: fadeUp 0.8s 1s var(--ease) forwards;
}
.a-hero__sub {
  max-width: 400px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.75;
}
.a-hero__actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-shrink: 0;
}

.a-hero__portrait-wrap {
  flex: 0 0 36%;
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--surface);
  opacity: 0;
  animation: fadeUp 1s 1.15s var(--ease) forwards;
}
.a-hero__portrait {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.8s var(--ease);
}
.a-hero__portrait-wrap:hover .a-hero__portrait { transform: scale(1.04); }
/* Degradado que asienta la foto en la paleta y da fondo legible al badge */
.a-hero__portrait-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(9, 11, 16, 0.16) 0%,
    rgba(9, 11, 16, 0) 32%,
    rgba(9, 11, 16, 0.30) 72%,
    rgba(9, 11, 16, 0.72) 100%);
}
.a-hero__portrait-badge {
  z-index: 2;
  position: absolute;
  left: 14px;
  bottom: 14px;
  right: 14px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--text);
  background: rgba(9, 11, 16, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.09);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.a-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: pulseDot 2.4s ease-in-out infinite;
}
@keyframes pulseDot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.25; }
}

.a-hero__scroll {
  position: absolute;
  bottom: clamp(20px, 3vw, 36px);
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  z-index: 2;
  opacity: 0;
  animation: fadeUp 0.6s 1.5s var(--ease) forwards;
}
.a-hero__scroll span {
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
}
.a-hero__scroll-line {
  width: 1px;
  height: 44px;
  background: linear-gradient(to bottom, var(--accent), transparent);
  animation: scrollLine 1.6s 2s ease-in-out infinite;
}
@keyframes scrollLine {
  0%   { transform: scaleY(0); transform-origin: top; }
  50%  { transform: scaleY(1); transform-origin: top; }
  100% { transform: scaleY(0); transform-origin: bottom; }
}

/* --- Botones --- */
.a-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 0.5s var(--spring);
}
.a-btn--primary {
  background: var(--accent);
  color: #06120d;
  border: 1px solid var(--accent);
  box-shadow: 0 8px 24px rgba(95, 217, 166, 0.18);
}
.a-btn--primary:hover {
  background: #7ee7ba;
  border-color: #7ee7ba;
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 12px 30px rgba(95, 217, 166, 0.28);
}
.a-btn--ghost {
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-2);
  border: 1px solid var(--border);
}
.a-btn--ghost:hover {
  color: var(--text);
  border-color: var(--text-3);
  background: rgba(255, 255, 255, 0.06);
  transform: translateY(-2px) scale(1.03);
}

/* --- Link "más" --- */
.a-link-more {
  font-size: 14px;
  font-weight: 500;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap 0.25s var(--ease), color 0.2s;
}
.a-link-more:hover { gap: 11px; color: #7ee7ba; }

/* ============================================
   STATEMENT
   ============================================ */
.a-statement {
  padding: clamp(90px, 11vw, 150px) 0;
  border-top: 1px solid var(--border);
  overflow: hidden;
}
.a-statement__text {
  font-family: var(--serif);
  font-size: clamp(25px, 4.2vw, 62px);
  font-weight: 500;
  font-variation-settings: 'SOFT' 0, 'WONK' 1, 'opsz' 144;
  letter-spacing: -0.025em;
  line-height: 1.2;
  max-width: 940px;
  margin: 0 auto;
  text-align: center;
}
.a-statement__word {
  display: inline-block;
  opacity: 0.1;
  transition: opacity 0.6s var(--ease), color 0.6s var(--ease);
  margin-right: 0.22em;
}
.a-statement__word.lit { opacity: 1; }
.a-statement__word--accent.lit { color: var(--accent); font-style: italic; }

/* ============================================
   SOBRE MÍ
   ============================================ */
.a-about__grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(40px, 5vw, 92px);
  align-items: center;
}
.a-about__img-wrap {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4/5;
  background: var(--surface);
}
.a-about__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.a-about__img-wrap:hover .a-about__img { transform: scale(1.03); }
.a-about__img-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to bottom,
    rgba(9, 11, 16, 0.14) 0%,
    rgba(9, 11, 16, 0) 40%,
    rgba(9, 11, 16, 0.35) 100%);
}
.a-about__content { display: flex; flex-direction: column; gap: 22px; }
.a-about__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  padding-top: 30px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}
.a-stat__number {
  display: block;
  font-family: var(--serif);
  font-size: clamp(38px, 5vw, 60px);
  font-weight: 600;
  font-variation-settings: 'opsz' 144;
  letter-spacing: -0.03em;
  line-height: 1;
  color: var(--text);
}
.a-stat__number em { font-style: italic; color: var(--accent); }
.a-stat__label {
  display: block;
  font-size: 11px;
  margin-top: 8px;
  max-width: 150px;
}

/* ============================================
   ÁREAS (acordeón)
   ============================================ */
.a-area {
  display: grid;
  grid-template-columns: 46px 1fr;
  gap: 22px;
  padding: 30px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: padding-left 0.35s var(--ease);
}
.a-area:first-of-type { border-top: 1px solid var(--border); }
.a-area:hover { padding-left: 6px; }
.a-area__num {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  padding-top: 8px;
  letter-spacing: 0.06em;
  transition: color 0.25s;
}
.a-area.open .a-area__num { color: var(--accent); }
.a-area__body { display: flex; flex-direction: column; }
.a-area__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.a-area__title {
  font-family: var(--serif);
  font-size: clamp(23px, 2.9vw, 38px);
  font-weight: 500;
  font-variation-settings: 'opsz' 100;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--text-2);
  transition: color 0.25s;
}
.a-area:hover .a-area__title,
.a-area.open .a-area__title { color: var(--text); }
.a-area__chevron {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border);
  color: var(--text-3);
  transition: transform 0.4s var(--ease), color 0.25s, border-color 0.25s;
}
.a-area.open .a-area__chevron {
  transform: rotate(180deg);
  color: var(--accent);
  border-color: var(--accent-line);
}
.a-area__desc,
.a-area__tags {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s var(--ease), margin 0.45s var(--ease);
}
.a-area__desc {
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.75;
  max-width: 660px;
}
.a-area.open .a-area__desc { max-height: 320px; margin-top: 14px; }
.a-area__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.a-area.open .a-area__tags { max-height: 120px; margin-top: 16px; }
.a-area__tags span {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 5px 11px;
  border-radius: 999px;
}

/* ============================================
   PROYECTOS / TRABAJOS
   ============================================ */
.a-cases {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(16px, 2vw, 24px);
}
.a-case {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  transition: border-color 0.35s, transform 0.5s var(--ease), background 0.35s;
}
.a-case::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px circle at var(--mx, 50%) var(--my, 0%),
              rgba(95, 217, 166, 0.07), transparent 65%);
  opacity: 0;
  transition: opacity 0.4s;
  pointer-events: none;
}
.a-case:hover {
  border-color: var(--accent-line);
  background: var(--surface-2);
  transform: translateY(-3px);
}
.a-case:hover::after { opacity: 1; }
.a-case__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.a-case__tag {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 5px 11px;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
}
.a-case__year { font-size: 12px; color: var(--text-3); letter-spacing: 0.05em; }
.a-case__title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 28px);
  font-weight: 500;
  font-variation-settings: 'opsz' 72;
  letter-spacing: -0.015em;
  line-height: 1.2;
}
.a-case__desc { font-size: 14.5px; line-height: 1.7; color: var(--text-2); }
.a-case__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}
.a-case__meta span {
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--text-3);
}
.a-case__meta span + span::before { content: '· '; color: var(--text-3); }

/* ============================================
   TIMELINE (formación / experiencia)
   ============================================ */
.a-tl-item {
  display: grid;
  grid-template-columns: 130px 1fr auto;
  gap: 24px;
  align-items: baseline;
  padding: 26px 0;
  border-bottom: 1px solid var(--border);
  position: relative;
  transition: padding-left 0.35s var(--ease);
}
.a-tl-item:first-of-type { border-top: 1px solid var(--border); }
.a-tl-item:hover { padding-left: 6px; }
.a-tl-item__year {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-3);
  letter-spacing: 0.06em;
  white-space: nowrap;
  transition: color 0.25s;
}
.a-tl-item:hover .a-tl-item__year { color: var(--accent); }
.a-tl-item__title {
  font-family: var(--serif);
  font-size: clamp(18px, 2.2vw, 26px);
  font-weight: 500;
  font-variation-settings: 'opsz' 72;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text-2);
  transition: color 0.25s;
}
.a-tl-item:hover .a-tl-item__title { color: var(--text); }
.a-tl-item__note {
  font-size: 14px;
  color: var(--text-3);
  line-height: 1.65;
  margin-top: 8px;
  max-width: 640px;
}
.a-tl-item__place {
  font-size: 13px;
  color: var(--text-2);
  text-align: right;
  white-space: nowrap;
}
.a-tl-item__place small {
  display: block;
  font-size: 11px;
  color: var(--text-3);
  letter-spacing: 0.05em;
  margin-top: 3px;
}

/* ============================================
   SKILLS
   ============================================ */
.a-skills__wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.a-skill {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  transition: color 0.25s, border-color 0.25s, background 0.25s;
}
.a-skill:hover {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.a-skills__group + .a-skills__group { margin-top: 32px; }
.a-skills__group-label {
  display: block;
  margin-bottom: 14px;
}

/* --- Idiomas --- */
.a-langs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 40px;
}
.a-lang {
  background: var(--bg);
  padding: 26px 22px;
}
.a-lang__name {
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 500;
  font-variation-settings: 'opsz' 72;
  margin-bottom: 6px;
}
.a-lang__level { font-size: 12px; color: var(--text-2); letter-spacing: 0.05em; }
.a-lang__bar {
  height: 3px;
  border-radius: 2px;
  background: var(--surface-2);
  margin-top: 14px;
  overflow: hidden;
}
.a-lang__bar i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 2px;
  background: var(--accent);
  transition: width 1.2s var(--ease);
}
.a-lang.visible .a-lang__bar i { width: var(--lvl, 60%); }

/* ============================================
   CONTACTO / FOOTER
   ============================================ */
.a-contact {
  padding: clamp(80px, 10vw, 140px) 0 clamp(40px, 5vw, 56px);
  border-top: 1px solid var(--border);
}
.a-contact__status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-2);
  margin-bottom: 32px;
  padding: 8px 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
}
.a-contact__title {
  font-family: var(--serif);
  font-size: clamp(34px, 6vw, 88px);
  font-weight: 500;
  font-variation-settings: 'SOFT' 0, 'WONK' 1, 'opsz' 144;
  line-height: 1;
  letter-spacing: -0.03em;
  display: inline-block;
  overflow-wrap: anywhere;
  transition: color 0.25s;
}
.a-contact__title:hover { color: var(--accent); }
.a-contact__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: clamp(36px, 4vw, 52px);
}
.a-contact__rows {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: clamp(44px, 5vw, 64px);
}
.a-contact__row {
  background: var(--bg);
  padding: 24px 22px;
  display: block;
  transition: background 0.3s;
}
a.a-contact__row:hover { background: var(--surface); }
.a-contact__row-label {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  display: block;
  margin-bottom: 8px;
}
.a-contact__row-value {
  font-size: 15px;
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.a-contact__row-value span:last-child { color: var(--text-3); transition: transform 0.3s var(--ease), color 0.3s; }
a.a-contact__row:hover .a-contact__row-value span:last-child { transform: translate(3px, -3px); color: var(--accent); }

/* ============================================
   FOOTER
   ============================================ */
.a-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: clamp(56px, 6vw, 84px) 0 clamp(24px, 3vw, 34px);
}
.a-footer__grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: clamp(32px, 4vw, 64px);
  padding-bottom: clamp(40px, 5vw, 64px);
}
.a-footer__brand { max-width: 340px; }
.a-footer__logo {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.a-footer__logo img { width: 38px; height: 38px; border-radius: 9px; }
.a-footer__logo span {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 500;
  font-variation-settings: 'opsz' 40;
  color: var(--text-2);
}
.a-footer__logo b { font-weight: 500; color: var(--text); }
.a-footer__tagline {
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-2);
  margin-bottom: 20px;
}
.a-footer__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--text-2);
  padding: 7px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--bg);
}
.a-footer__col { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; }
.a-footer__col-title {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 5px;
}
.a-footer__col a,
.a-footer__plain {
  font-size: 14px;
  color: var(--text-2);
  transition: color 0.2s, transform 0.25s var(--ease);
}
.a-footer__col a:hover { color: var(--accent); transform: translateX(3px); }
.a-footer__plain { color: var(--text-3); }

.a-footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px 28px;
  padding-top: clamp(20px, 2.5vw, 28px);
  border-top: 1px solid var(--border);
  font-size: 12.5px;
  color: var(--text-3);
}
.a-footer__bottom a { color: var(--text-2); transition: color 0.2s; }
.a-footer__bottom a:hover { color: var(--accent); }
.a-footer__top {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}
.a-footer__top span { transition: transform 0.3s var(--ease); display: inline-block; }
.a-footer__top:hover span { transform: translateY(-3px); }

/* ============================================
   SKIP LINK (accesibilidad)
   ============================================ */
.a-skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  padding: 11px 20px;
  border-radius: 999px;
  background: var(--accent);
  color: #06120d;
  font-size: 14px;
  font-weight: 500;
  transform: translateY(-160%);
  transition: transform 0.25s var(--ease);
}
.a-skip:focus-visible { transform: translateY(0); }

:where(a, button, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ============================================
   PÁGINAS DE TEXTO (legal)
   ============================================ */
.a-page {
  padding: clamp(120px, 14vw, 180px) 0 clamp(64px, 8vw, 110px);
}
.a-page__header { margin-bottom: clamp(36px, 4vw, 56px); }
.a-page__title {
  font-family: var(--serif);
  font-size: clamp(38px, 6vw, 76px);
  font-weight: 500;
  font-variation-settings: 'SOFT' 0, 'WONK' 1, 'opsz' 144;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin: 16px 0 18px;
}
.a-page__meta { font-size: 13px; color: var(--text-3); }
.a-prose { max-width: 720px; }
.a-prose h2 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.4vw, 28px);
  font-weight: 500;
  font-variation-settings: 'opsz' 72;
  letter-spacing: -0.015em;
  margin: 44px 0 14px;
  padding-top: 26px;
  border-top: 1px solid var(--border);
}
.a-prose h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.a-prose p,
.a-prose li { font-size: 15.5px; line-height: 1.8; color: var(--text-2); }
.a-prose p + p { margin-top: 14px; }
.a-prose ul { list-style: none; margin: 14px 0; display: flex; flex-direction: column; gap: 10px; }
.a-prose li { padding-left: 20px; position: relative; }
.a-prose li::before { content: '—'; position: absolute; left: 0; color: var(--accent); }
.a-prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.a-prose strong { color: var(--text); font-weight: 600; }

/* ============================================
   ANIMACIONES
   ============================================ */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
.a-fade-up {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.a-fade-up.visible { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .a-fade-up { opacity: 1; transform: none; }
  .a-market__line { stroke-dashoffset: 0; }
  .a-statement__word { opacity: 1; }
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
  .a-about__grid { grid-template-columns: 1fr; gap: 44px; }
  .a-about__img-wrap { aspect-ratio: 16/10; max-height: 440px; }
  .a-cases { grid-template-columns: 1fr; }
  .a-contact__rows { grid-template-columns: 1fr; }
  .a-footer__grid { grid-template-columns: 1fr 1fr 1fr; }
  .a-footer__brand { grid-column: 1 / -1; max-width: 520px; }
}

@media (max-width: 900px) {
  .a-hero .a-container { flex-direction: column; align-items: flex-start; }
  .a-hero__left { flex: none; width: 100%; }
  .a-hero__portrait-wrap { width: 100%; flex: none; aspect-ratio: 3/2; }
  .a-hero__scroll { display: none; }
  .a-langs { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .a-nav__links { display: none; }
  .a-nav__cta { display: none; }
  .a-nav__toggle { display: flex; }
  .a-hero { padding-top: 96px; }
  .a-hero__bottom { flex-direction: column; align-items: flex-start; gap: 28px; }
  .a-hero__portrait-wrap { display: none; }
  /* Sin retrato en móvil, el gráfico se recoloca y baja de intensidad
     para no competir con el titular */
  .a-market {
    opacity: 0.26;
    mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, transparent 96%);
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 45%, transparent 96%);
  }
  .a-tl-item { grid-template-columns: 1fr; gap: 6px; }
  .a-tl-item__place { text-align: left; }
  .a-tl-item__place small { display: inline; margin-left: 8px; }
  .a-footer__grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .a-footer__brand { grid-column: 1 / -1; max-width: none; }
  .a-footer__bottom { flex-direction: column; align-items: flex-start; }
  .a-footer__top { margin-left: 0; }
}

@media (max-width: 480px) {
  .a-hero__actions { width: 100%; flex-direction: column; align-items: stretch; }
  .a-btn { justify-content: center; }
  .a-hero__title { font-size: clamp(29px, 8vw, 40px); }
  .a-about__stats { flex-direction: column; gap: 24px; }
  .a-statement__text { font-size: clamp(22px, 6.5vw, 32px); }
  .a-area { grid-template-columns: 32px 1fr; gap: 14px; }
  .a-area__title { font-size: 21px; }
  .a-contact__title { font-size: clamp(26px, 8vw, 40px); }
}
