/* Andrea Ruiz · portfolio. Palette and type come from her own Canva deck:
   butter yellow, electric violet, giant condensed capitals, wide small labels. */

@font-face {
  font-family: "Anton";
  src: url("fonts/anton-latin-400-normal.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}

:root {
  --yellow: #fff968;
  --violet: #5e17eb;
  --violet-deep: #2a0a78;
  --lilac: #ede6fd;
  --white: #ffffff;

  --display: "Anton", "Haettenschweiler", "Impact", "Arial Narrow", sans-serif;
  --text: "Archivo", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1rem, 4vw, 3.5rem);
  --bar: 3.5rem;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --anton-ratio: .435; /* average glyph width of Anton capitals, in em */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--bar); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--yellow);
  color: var(--violet);
  font: 500 1.0625rem/1.55 var(--text);
  overflow-x: clip;
}
img { max-width: 100%; height: auto; display: block; }
picture { display: contents; }
a { color: inherit; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 100;
  background: var(--violet); color: var(--yellow); padding: .75rem 1rem;
}
.skip:focus { top: 1rem; }

/* Wide small capitals: the deck's label voice */
.label {
  font-stretch: 125%;
  font-weight: 600;
  font-size: .78rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  line-height: 1.5;
}

/* ---------- Top bar ---------- */
.bar {
  position: sticky; top: 0; z-index: 50;
  height: var(--bar);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: var(--yellow);
  border-bottom: 1px solid var(--violet);
}
.bar__name { text-decoration: none; }
.menu { display: flex; gap: clamp(1rem, 2.4vw, 2.25rem); }
.menu a {
  text-decoration: none;
  padding: .9rem 0;
  background: linear-gradient(currentColor, currentColor) 0 78% / 0 2px no-repeat;
  transition: background-size .3s var(--ease);
}
.menu a:hover, .menu a:focus-visible { background-size: 100% 2px; }
.menu-btn {
  display: none;
  width: 2.75rem; height: 2.75rem; margin-right: -.6rem;
  background: none; border: 0; color: inherit; cursor: pointer;
}
.menu-btn span, .menu-btn span::before {
  display: block; width: 1.5rem; height: 2px; margin: 0 auto; background: currentColor;
  transition: transform .3s var(--ease);
}
.menu-btn span::before { content: ""; transform: translateY(7px); }
.menu-btn span { transform: translateY(-3.5px); }
.menu-btn[aria-expanded="true"] span { transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span::before { transform: rotate(-90deg); }

@media (max-width: 760px) {
  .menu-btn { display: block; }
  .menu {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    padding: .5rem var(--gutter) 1.25rem;
    background: var(--violet); color: var(--yellow);
    visibility: hidden; opacity: 0; transform: translateY(-.5rem);
    transition: opacity .25s, transform .25s var(--ease), visibility 0s .25s;
  }
  .menu.is-open { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  .menu a { padding: .9rem 0; font-size: .95rem; border-bottom: 1px solid rgb(255 249 104 / .35); background: none; }
}

/* ---------- Sections ---------- */
.slide {
  position: relative;
  padding: clamp(3.5rem, 9vw, 7.5rem) var(--gutter);
  overflow-x: clip;
}
.slide--violet { background: var(--violet); color: var(--yellow); }
.slide--lilac { background: var(--lilac); }
.slide__no { position: absolute; top: 1.5rem; right: var(--gutter); }
.slide__who { position: absolute; top: 1.5rem; left: var(--gutter); }

/* Giant word, sized so its --n letters fill the row at any width */
.giant {
  font-family: var(--display);
  font-weight: 400;
  text-transform: uppercase;
  line-height: .86;
  letter-spacing: 0;
  white-space: nowrap;
  font-size: min(calc((100vw - 2 * var(--gutter)) / (var(--n) * var(--anton-ratio))), 15rem);
  margin-bottom: clamp(1.75rem, 4vw, 3.5rem);
}

.lede { font-size: clamp(1.2rem, 2.1vw, 1.7rem); line-height: 1.35; font-weight: 500; max-width: 34ch; }
.copy { max-width: 56ch; }
.copy + .copy { margin-top: 1rem; }

/* Chevron marker from the deck */
.chev { width: 1.1em; height: .8em; flex: none; fill: currentColor; }

/* ---------- 01 Hero ---------- */
.hero {
  position: relative;
  min-height: calc(100svh - var(--bar));
  display: flex; flex-direction: column;
  padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) 0;
  overflow: hidden;
}
.hero__roles { display: block; font-size: clamp(.85rem, 1.5vw, 1.25rem); margin-left: clamp(0rem, 7vw, 7rem); margin-top: clamp(1rem, 5vh, 4rem); }
.hero__roles span { display: block; }
.hero__formats { position: relative; z-index: 3; margin-top: auto; padding-top: 2rem; margin-bottom: .75rem; }
.hero__name {
  font-family: var(--display); font-weight: 400; text-transform: uppercase;
  line-height: .8; white-space: nowrap; margin: 0;
  font-size: calc((100vw - 2 * var(--gutter)) / (11.25 * var(--anton-ratio)));
  padding-bottom: clamp(.75rem, 2vw, 2rem);
}
.hero__name span { position: relative; display: inline-block; }
.hero__name .first { z-index: 1; }
.hero__name .last { z-index: 3; }
.hero__photo {
  position: absolute; z-index: 2;
  right: clamp(-2rem, 5vw, 6rem); bottom: 0;
  height: min(88%, 58vw); width: auto; max-width: none;
}
h1.hero__h1 { display: contents; }

@media (max-width: 760px) {
  .hero__name { font-size: calc((100vw - 2 * var(--gutter)) / (6.75 * var(--anton-ratio))); }
  .hero__name span { display: block; }
  .hero__name { margin-top: auto; padding-top: 2rem; }
  .hero__name .first { z-index: 3; }
  .hero__photo { height: min(60svh, 112vw); right: -20vw; }
  .hero__roles { margin-left: 0; margin-top: 1.25rem; }
  .hero__formats { margin-top: 1.25rem; padding-top: 0; }
}

/* ---------- 02 Hola ---------- */
.hola { display: grid; gap: clamp(2rem, 5vw, 5rem); grid-template-columns: 1.05fr 1fr; align-items: center; }
.hola__photo { box-shadow: clamp(.6rem, 1.4vw, 1.1rem) clamp(.6rem, 1.4vw, 1.1rem) 0 var(--violet); }
.hola__title { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: clamp(3.5rem, 9vw, 8rem); line-height: 1.02; margin-bottom: 1.5rem; }
.facts { margin-top: 2rem; border-top: 1px solid currentColor; }
.facts li { display: flex; gap: .8rem; align-items: baseline; padding: .8rem 0; border-bottom: 1px solid currentColor; }
.facts .chev { transform: translateY(.05em); }
@media (max-width: 860px) { .hola { grid-template-columns: 1fr; } }

/* ---------- Tiles (linked stills) ---------- */
.tiles { display: grid; gap: clamp(1rem, 2.5vw, 2rem); grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); }
.tile { display: block; text-decoration: none; }
.tile__frame {
  position: relative; overflow: hidden; aspect-ratio: var(--ar, 3 / 4);
  background: var(--violet-deep);
  box-shadow: .5rem .5rem 0 var(--shadow, var(--violet));
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.slide--violet .tile__frame { --shadow: var(--yellow); }
.tile__frame img { width: 100%; height: 100%; object-fit: cover; object-position: var(--pos, center); transition: transform .6s var(--ease); }
.tile__cap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem .75rem; align-items: baseline; margin-top: 1.1rem; }
.tile__stat { display: block; margin-top: .15rem; font-family: var(--display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.05; text-transform: uppercase; }
.tile__cap .label { display: block; }
.tile__where { white-space: nowrap; }
.tile__where svg { width: .7em; height: .7em; margin-left: .3em; fill: none; stroke: currentColor; stroke-width: 2; transition: transform .3s var(--ease); }
a.tile:hover .tile__frame, a.tile:focus-visible .tile__frame { transform: translate(-.25rem, -.25rem) rotate(-1deg); box-shadow: .75rem .75rem 0 var(--shadow, var(--violet)); }
a.tile:hover img { transform: scale(1.04); }
a.tile:hover .tile__where svg { transform: translate(.15em, -.15em); }
@media (max-width: 900px) { .tiles { --cols: 2 !important; } }

/* ---------- 03 Contenido ---------- */
.contenido { display: grid; grid-template-columns: 1fr 1.25fr; gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.contenido .tiles { --cols: 2; }
@media (max-width: 860px) { .contenido { grid-template-columns: 1fr; } }

/* ---------- 04 Marcas ---------- */
.marcas { columns: 2; column-gap: clamp(2rem, 6vw, 6rem); border-top: 1px solid currentColor; }
.marcas li { break-inside: avoid; border-bottom: 1px solid currentColor; }
.marca {
  display: flex; align-items: center; gap: 1rem;
  padding: 1rem 0; text-decoration: none; min-height: 4.5rem;
}
.marca__name { font-family: var(--display); text-transform: uppercase; font-size: clamp(1.9rem, 4.2vw, 3.4rem); line-height: 1; flex: 1; }
.marca .chev { transition: transform .3s var(--ease); }
.marca__where { text-align: right; }
a.marca { background: linear-gradient(var(--violet), var(--violet)) 0 0 / 0 100% no-repeat; transition: background-size .35s var(--ease), color .2s, padding .35s var(--ease); }
a.marca:hover, a.marca:focus-visible { background-size: 100% 100%; color: var(--yellow); padding-left: .9rem; padding-right: .9rem; }
a.marca:hover .chev { transform: translateX(.3rem); }
.marcas__note { margin-top: 1.25rem; }
@media (max-width: 760px) { .marcas { columns: 1; } }

/* ---------- 05 Experiencia ---------- */
.xp { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: clamp(1.5rem, 4vw, 4rem); padding: clamp(2rem, 4vw, 3.5rem) 0; border-top: 1px solid currentColor; }
.xp:last-child { padding-bottom: 0; }
.xp__title { display: flex; gap: .8rem; align-items: baseline; font-family: var(--text); font-stretch: 125%; font-weight: 700; font-size: clamp(1.05rem, 1.7vw, 1.4rem); letter-spacing: .08em; text-transform: uppercase; line-height: 1.3; margin-bottom: 1.25rem; }
.xp__list li { position: relative; padding: .3rem 0 .3rem 1.4rem; }
.xp__list li::before { content: ""; position: absolute; left: 0; top: .85em; width: .6rem; height: 2px; background: currentColor; }
.xp__quote { margin-top: 1.25rem; font-style: italic; }
@media (max-width: 860px) { .xp { grid-template-columns: 1fr; } }

/* ---------- 06 Cifras ---------- */
.cifras__period { margin-bottom: 2rem; }
.nums { display: grid; grid-template-columns: repeat(5, auto); justify-content: space-between; gap: 1.5rem 2rem; border-top: 1px solid currentColor; border-bottom: 1px solid currentColor; padding: 1.75rem 0; }
.nums b { display: block; font-family: var(--display); font-weight: 400; font-size: clamp(2.6rem, 6.4vw, 5.5rem); line-height: 1; }
.bars { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 6vw, 6rem); margin-top: 2.5rem; }
.bars h3 { margin-bottom: 1rem; }
.bar-row { display: grid; grid-template-columns: 6.5rem 1fr 4rem; gap: 1rem; align-items: center; padding: .45rem 0; font-variant-numeric: tabular-nums; }
.bar-row i { display: block; height: .7rem; background: rgb(255 249 104 / .22); }
.bar-row i::after { content: ""; display: block; height: 100%; width: var(--v); background: var(--yellow); transform-origin: left; }
.bar-row span:last-child { text-align: right; }
@media (max-width: 900px) { .nums { grid-template-columns: repeat(2, 1fr); } .nums li:first-child { grid-column: 1 / -1; } }
@media (max-width: 760px) { .bars { grid-template-columns: 1fr; } .bar-row { grid-template-columns: 5.2rem 1fr 3.6rem; gap: .7rem; } }

/* ---------- 07 Prensa ---------- */
.prensa { display: grid; grid-template-columns: minmax(0, 20rem) 1fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.outlets { margin-top: 2rem; display: flex; flex-wrap: wrap; gap: .4rem 1.5rem; font-family: var(--display); text-transform: uppercase; font-size: clamp(1.9rem, 4.6vw, 3.8rem); line-height: 1.05; }
.outlets li:not(:last-child)::after { content: "/"; margin-left: 1.5rem; opacity: .35; }
@media (max-width: 760px) { .outlets { flex-direction: column; } .outlets li::after { display: none; } .prensa { grid-template-columns: 1fr; } .prensa .tile { max-width: 16rem; } }

/* ---------- 08 Contacto ---------- */
.contacto { text-align: left; }
.mail {
  display: inline-block; text-decoration: none;
  font-family: var(--text); font-stretch: 125%; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  font-size: clamp(1rem, 3.4vw, 2.6rem); line-height: 1.2;
  padding-bottom: .25em; overflow-wrap: anywhere;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 3px no-repeat;
  transition: background-size .35s var(--ease), color .25s;
}
.mail:hover, .mail:focus-visible { background-size: 100% 100%; color: var(--violet); }
.socials { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: clamp(2rem, 5vw, 3.5rem); }
.social {
  display: inline-flex; align-items: center; gap: .6rem;
  min-height: 2.9rem; padding: .6rem 1.1rem;
  border: 1.5px solid currentColor; text-decoration: none;
  transition: background-color .25s, color .25s, transform .25s var(--ease);
}
.social svg { width: 1.15rem; height: 1.15rem; fill: currentColor; }
.social:hover, .social:focus-visible { background: var(--yellow); color: var(--violet); transform: translateY(-3px); }

.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem 2rem; padding: 1.25rem var(--gutter); background: var(--violet); color: var(--yellow); border-top: 1px solid rgb(255 249 104 / .4); }
.foot a { text-underline-offset: .25em; }

/* ---------- 404 ---------- */
.lost { min-height: calc(100svh - var(--bar)); display: flex; flex-direction: column; justify-content: center; padding: 3rem var(--gutter); }
.lost .giant { margin-bottom: 1.5rem; }
.btn { display: inline-flex; align-items: center; gap: .7rem; margin-top: 2rem; padding: .9rem 1.4rem; background: var(--violet); color: var(--yellow); text-decoration: none; align-self: flex-start; transition: transform .25s var(--ease); }
.btn:hover { transform: translateX(.3rem); }

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: no-preference) {
  /* First screen: CSS only, starts with the first paint */
  .hero__name span { animation: rise .9s var(--ease) both; }
  .hero__name .last { animation-delay: .12s; }
  .hero__photo { animation: step-in 1s var(--ease) .2s both; }
  .hero__roles, .hero__formats { animation: fade .8s ease .55s both; }
  @keyframes rise { from { transform: translateY(105%); clip-path: inset(0 0 100% 0); } to { transform: none; clip-path: inset(-20% 0 0 0); } }
  @keyframes step-in { from { transform: translate(6%, 4%); opacity: 0; } to { transform: none; opacity: 1; } }
  @keyframes fade { from { opacity: 0; } }

  /* Below the fold: blocks step up; main.js adds the classes */
  .anim .reveal:not(.is-in) { opacity: 0; transform: translateY(2rem); }
  .reveal { transition: opacity .7s ease, transform .8s var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
  .anim .reveal:not(.is-in) .bar-row i::after { transform: scaleX(0); }
  .reveal .bar-row i::after { transition: transform 1s var(--ease) .2s; }

  /* Signature: the giant words travel sideways as the page scrolls, like a deck changing slide */
  @supports (animation-timeline: view()) {
    .giant[data-drift] { animation: drift linear both; animation-timeline: view(); animation-range: entry 0% cover 45%; }
    @keyframes drift { from { transform: translateX(14vw); } to { transform: none; } }
  }
}

@media print {
  .bar, .menu-btn { display: none; }
  .anim .reveal:not(.is-in) { opacity: 1; transform: none; }
  .slide--violet { background: none; color: #000; }
}
