/* =============================================
   BASE — variables, reset, tipografías compartidas
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter+Tight:wght@300;400;500;600;700;800&family=Instrument+Serif:ital@0;1&display=swap');
@import url('https://api.fontshare.com/v2/css?f[]=clash-display@200,300,400,500,600,700&display=swap');

:root {
  /* ----- Paleta ----- */
  --c-pink:   #ff5db6;
  --c-purple: #716cff;
  --c-mint:   #36ffc9;
  --c-grey:   #484848;
  --c-bg:     #f5f3ee;
  --c-white:  #ffffff;

  /* Alias semánticos */
  --d-bg:     var(--c-bg);
  --d-ink:    var(--c-grey);
  --d-mute:   #8a8a8a;
  --d-line:   var(--c-grey);
  --d-accent: var(--c-pink);

  --o-bg:        var(--c-bg);
  --o-ink:       var(--c-grey);
  --o-mute:      #8a8a8a;
  --o-line:      var(--c-grey);
  --o-accent:    var(--c-mint);
  --o-secondary: var(--c-purple);

  /* ----- Layout ----- */
  --gutter: clamp(16px, 2vw, 28px);
  --maxw: 1600px;

  /* ----- Tipografía ----- */
  --f-display: 'Clash Display', 'Inter Tight', system-ui, sans-serif;
  --f-serif:   'Instrument Serif', Georgia, serif;
  --f-mono:    'Instrument Serif', Georgia, serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
html, body { max-width: 100vw; }
body {
  font-family: var(--f-display);
  font-size: 16px;
  line-height: 1.4;
  background: var(--c-bg);
  color: var(--c-grey);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
em, i { font-style: normal; }
a { color: inherit; text-decoration: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

.mono { font-family: var(--f-mono); font-weight: 400; }
.serif  { font-family: var(--f-serif); }
.uppercase { text-transform: uppercase; letter-spacing: 0.02em; }
.tabular   { font-variant-numeric: tabular-nums; }

::selection { background: var(--c-purple); color: var(--c-bg); }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--c-purple);
  outline-offset: 4px;
}

.marquee {
  display: flex; overflow: hidden; white-space: nowrap;
  padding: 6px 0;
}
.marquee__track {
  display: inline-flex; animation: marquee 60s linear infinite;
  gap: 3rem; padding-right: 3rem;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* =============================================
   NAV LINK — doble texto en hover (estilo Framer)
   ============================================= */
a.nav-link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  position: relative;
}
.nav-link__num {
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 0.7em;
  opacity: 0.6;
}
.nav-link__text {
  position: relative;
  display: inline-block;
  overflow: hidden;
  line-height: 1.1;
  vertical-align: top;
}
.nav-link__text > span {
  display: block;
  transition: transform 0.42s cubic-bezier(0.65, 0.05, 0.36, 1);
  will-change: transform;
}
.nav-link__text > span + span {
  position: absolute;
  inset: 100% 0 auto 0;
}
a.nav-link:hover .nav-link__text > span {
  transform: translateY(-100%);
}

/* =============================================
   CURSOR PERSONALIZADO
   ============================================= */
@media (pointer: fine) {
  body.has-custom-cursor,
  body.has-custom-cursor * { cursor: none !important; }
}
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 99999;
  pointer-events: none;
  transform: translate3d(-100px, -100px, 0);
  transition: opacity 0.25s ease;
}
.cursor.is-hidden { opacity: 0; }
.cursor__arrow {
  position: absolute;
  top: -8px; left: -8px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--c-grey);
  border: 2px solid var(--c-mint);
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.2s;
}
.cursor.is-active .cursor__arrow {
  transform: scale(0);
  opacity: 0;
}
.cursor__label {
  position: absolute;
  top: 14px; left: 14px;
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 18px;
  color: var(--c-mint);
  white-space: nowrap;
  background: var(--c-purple);
  padding: 4px 14px;
  border-radius: 100px;
  border: 1px solid var(--c-grey);
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.2s ease, transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}
.cursor.is-active .cursor__label {
  opacity: 1;
  transform: scale(1);
}

/* =============================================
   MENÚ GLOBAL — brand fija + hamburguesa + panel
   ============================================= */

/* Brand fija arriba-izquierda */
.brand {
  position: fixed;
  top: clamp(10px, 1.4vw, 18px);
  left: clamp(14px, 2vw, 28px);
  z-index: 9500;
  display: block;
  transition: transform 0.3s ease;
}
.brand img {
  display: block;
  width: auto;
  height: clamp(36px, 3.6vw, 52px);
}
.brand:hover { transform: scale(1.06); }

/* Nav desktop — texto en serif arriba a la derecha */
.site-nav {
  position: fixed;
  top: clamp(14px, 1.6vw, 24px);
  right: clamp(18px, 2vw, 32px);
  z-index: 9500;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.4em 0.8em;
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(20px, 1.7vw, 30px);
  letter-spacing: -0.01em;
  color: var(--c-grey);
}
.site-nav__label {
  font-family: var(--f-serif);
  font-size: inherit;
  line-height: 1.1;
}
/* Los .site-nav a heredan estilo de .pill / .site-foot__inline a (más abajo) */

/* En mobile el desktop nav se oculta; el hamb hace su trabajo */
@media (max-width: 760px) {
  .site-nav { display: none; }
}
/* En desktop el hamb y el panel se ocultan; manda el site-nav */
@media (min-width: 761px) {
  .hamb,
  .nav-panel { display: none !important; }
}

/* Hamburguesa arriba-derecha */
.hamb {
  position: fixed;
  top: clamp(10px, 1.4vw, 18px);
  right: clamp(12px, 1.8vw, 24px);
  z-index: 9600;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--c-grey);
  color: var(--c-bg);
  border: 1px solid var(--c-grey);
  transition: background 0.3s, transform 0.3s;
}
.hamb__lines {
  position: relative;
  width: 18px;
  height: 12px;
}
.hamb__lines span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--c-bg);
  transition: transform 0.35s cubic-bezier(0.6, 0.05, 0.2, 1), opacity 0.25s;
}
.hamb__lines span:nth-child(1) { top: 0; }
.hamb__lines span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.hamb__lines span:nth-child(3) { bottom: 0; }

body.menu-open .hamb__lines span:nth-child(1) { top: 50%; transform: translateY(-50%) rotate(45deg); }
body.menu-open .hamb__lines span:nth-child(2) { opacity: 0; }
body.menu-open .hamb__lines span:nth-child(3) { bottom: 50%; transform: translateY(50%) rotate(-45deg); }

/* Panel desplegable */
.nav-panel {
  position: fixed;
  inset: 0;
  z-index: 9550;
  background: var(--c-purple);
  color: var(--c-mint);
  padding: clamp(60px, 7vh, 100px) var(--gutter) clamp(16px, 2vw, 28px);
  display: grid;
  grid-template-rows: 1fr auto;
  gap: clamp(16px, 3vw, 40px);
  overflow: hidden;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.nav-panel__mark {
  position: absolute;
  top: clamp(16px, 2vh, 24px);
  left: clamp(18px, 2vw, 32px);
  width: clamp(100px, 12vw, 180px);
  height: auto;
  z-index: 2;
  pointer-events: none;
  opacity: 0.85;
}
.nav-panel__mark path,
.nav-panel__mark rect {
  fill: var(--c-mint);
}
body.menu-open .nav-panel {
  pointer-events: auto;
  opacity: 1;
}
body.menu-open { overflow: hidden; }

.nav-panel__menu {
  display: grid;
  align-content: center;
  gap: clamp(8px, 1.2vh, 18px);
  max-width: var(--maxw);
  width: 100%;
  margin: 0 auto;
}
.nav-panel__menu a {
  display: flex;
  align-items: center;
  gap: clamp(18px, 2.4vw, 40px);
  padding: 0;
  width: 100%;
  text-decoration: none;
  color: var(--c-mint);
  transition: color 0.3s;
}
.nav-panel__menu a:hover { color: var(--c-pink); }
.nav-panel__menu a:hover .nav-panel__title {
  font-family: var(--f-serif);
  font-weight: 400;
  letter-spacing: -0.02em;
}

.nav-panel__num { display: none; }
.nav-panel__sub { display: none; }

.nav-panel__thumb {
  display: block;
  flex-shrink: 0;
  width: clamp(56px, min(7vw, 11vh), 110px);
  height: clamp(56px, min(7vw, 11vh), 110px);
  border-radius: 999px;
  overflow: hidden;
  background: var(--c-mint);
  border: 1px solid var(--c-mint);
}
.nav-panel__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-panel__title {
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(40px, min(6vw, 12vh), 120px);
  line-height: 0.95;
  letter-spacing: -0.035em;
}


/* Zigzag: items impares a la izquierda, pares a la derecha */
.nav-panel__menu a:nth-child(odd) {
  flex-direction: row;
  justify-content: flex-start;
}
.nav-panel__menu a:nth-child(even) {
  flex-direction: row-reverse;
  justify-content: flex-end;
}

.nav-panel__foot {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 28px;
  align-items: baseline;
  padding-top: clamp(14px, 2vw, 22px);
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: clamp(18px, 1.8vw, 26px);
  letter-spacing: 0;
  color: var(--c-mint);
}
.nav-panel__foot a:hover { color: var(--c-pink); }
.nav-panel__foot span { opacity: 0.7; }

@media (max-width: 760px) {
  /* Menú móvil — texto serif, sin fotos, alineación natural */
  .nav-panel__menu {
    gap: clamp(8px, 1.6vh, 18px);
    align-content: center;
    padding: 0 var(--gutter);
  }
  .nav-panel__menu a,
  .nav-panel__menu a:nth-child(odd),
  .nav-panel__menu a:nth-child(even) {
    display: block;
    flex-direction: row;
    justify-content: flex-start;
    align-items: baseline;
    gap: 0;
    padding: 0;
    width: 100%;
  }
  .nav-panel__menu a:hover .nav-panel__title { font-family: var(--f-serif); }

  /* Ocultar las fotos circulares y meta extra */
  .nav-panel__num,
  .nav-panel__sub,
  .nav-panel__thumb { display: none !important; }

  /* Título tipo pastilla grande serif */
  .nav-panel__title {
    display: block;
    font-family: var(--f-serif);
    font-weight: 400;
    font-style: normal;
    font-size: clamp(40px, 11vw, 72px);
    line-height: 1.05;
    letter-spacing: -0.02em;
    color: inherit;
  }
  .nav-panel__title em {
    font-style: italic;
    font-weight: 400;
  }

  /* Email + Instagram del footer del panel — estilo pastilla con borde mint */
  .nav-panel__foot a {
    display: inline-block;
    border: 1px solid currentColor;
    border-radius: 999px;
    padding: 2px 14px;
    background: transparent;
    color: inherit;
    text-decoration: none;
    line-height: 1.3;
    transition: background 0.3s, color 0.3s, border-color 0.3s;
  }
  .nav-panel__foot a:hover {
    background: var(--c-pink);
    color: var(--c-purple);
    border-color: var(--c-pink);
  }
}

/* Ocultar los nav per-page existentes — ahora el menú es global */
.l-head, .d-nav, .o-nav, .s-nav, .p-nav { display: none !important; }

/* =============================================
   OVERLAY GIGANTE — handle/url al hover de pills
   ============================================= */
.site-overlay {
  position: fixed;
  inset: 0;
  z-index: 9000;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4vw;
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.35s cubic-bezier(0.2, 0.8, 0.2, 1);
  background:
    radial-gradient(ellipse 75% 55% at center,
      var(--c-purple) 0%,
      rgba(113, 108, 255, 0.92) 35%,
      rgba(113, 108, 255, 0.55) 65%,
      rgba(113, 108, 255, 0) 95%);
}
.site-overlay.is-visible { opacity: 1; }
.site-overlay__text {
  font-family: var(--f-serif);
  font-weight: 400;
  font-size: 100px;     /* base; JS reescala para encajar al ancho */
  line-height: 0.85;
  letter-spacing: -0.03em;
  color: var(--c-mint);
  text-align: center;
  white-space: nowrap;
  transform-origin: 50% 50%;
  will-change: transform;
  text-shadow: 0 0 60px rgba(113, 108, 255, 0.6);
}

/* =============================================
   FOOTER COMÚN — site-foot
   ============================================= */
.site-foot {
  position: relative;
  padding: clamp(14px, 1.6vw, 22px) var(--gutter) clamp(10px, 1.2vw, 16px);
  display: grid;
  gap: 6px;
  color: var(--c-grey);
}

/* — fila superior: contacto inline — */
.site-foot__top {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: clamp(12px, 2vw, 24px);
  align-items: baseline;
}
.site-foot__label {
  font-family: var(--f-serif);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.1;
}
.site-foot__inline {
  font-family: var(--f-serif);
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em 0.8em;
}
.site-foot__inline a {
  position: relative;
}

/* ---------- Botón / pastilla base — modelo footer ---------- */
.btn,
.pill,
.site-foot__inline a,
.site-nav a {
  display: inline-block;
  background: transparent;
  color: inherit;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 2px 12px;
  font-family: var(--f-serif);
  font-style: normal;
  font-weight: 400;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.3;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background 0.3s, color 0.3s, border-color 0.3s;
}
.btn:hover,
.pill:hover,
.site-foot__inline a:hover,
.site-nav a:hover {
  background: var(--c-purple);
  color: var(--c-mint);
  border-color: var(--c-purple);
}

/* — wordmark gigante — */
.site-foot__mark {
  font-family: var(--f-display);
  font-weight: 700;
  font-size: clamp(80px, 22vw, 380px);
  line-height: 0.82;
  letter-spacing: -0.05em;
  text-align: center;
  user-select: none;
  white-space: nowrap;
  overflow: hidden;
}

/* — fila inferior: copyright — */
.site-foot__bottom {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--gutter);
  align-items: baseline;
  padding-top: 0;
  font-family: var(--f-mono);
  font-weight: 400;
  font-size: 12px;
}
.site-foot__bottom a:hover { color: var(--c-purple); }

@media (max-width: 700px) {
  /* Contacto + pills en la misma línea (con wrap si no caben) */
  .site-foot__top {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.4em 0.8em;
  }
  /* Copyright en una sola línea — "© Prietasso MMXXVI" */
  .site-foot__bottom {
    display: block;
    text-align: left;
  }
  .site-foot__bottom > span:first-child { display: none; }
  .site-foot__bottom > span:last-child::before { content: "© Prietasso "; }
  .site-foot__mark { font-size: clamp(60px, 30vw, 220px); }
}

/* =============================================
   SCROLL REVEAL
   ============================================= */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition:
    opacity 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0s),
    transform 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) var(--reveal-delay, 0s);
  will-change: opacity, transform;
}
.reveal.is-revealed {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .cursor { display: none; }
}
