:root {
  --navy: #0B1F3A;
  --silver: #B8BDC7;
  --black: #0A0A0A;
  --white: #F5F5F5;
  --ink: #12151C;
  --paper: #FAFAF9;
  --paper-2: #F1F1EF;
  --line: rgba(11, 31, 58, .14);
  --radius: 18px;
  --max: 1280px;
  --font-head: "Sora", sans-serif;
  --font-body: "Manrope", sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: inherit; }

h1, h2, h3 { font-family: var(--font-head); margin: 0; }

p { margin: 0; line-height: 1.6; }

.eyebrow {
  font-family: var(--font-head);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--silver);
  margin: 0 0 10px;
}

/* ============================================================
   PRELOADER
   ============================================================ */

#preloader {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  background: var(--navy);
  color: var(--silver);
  transition: opacity .6s ease, visibility 0s linear .6s;
}

#preloader.loaded {
  opacity: 0;
  visibility: hidden;
}

.preloader-logo {
  width: 140px;
  height: 140px;
  animation: preloaderPulse 1.6s ease-in-out infinite;
}

.preloader-phrase {
  font-family: var(--font-head);
  font-size: .85rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  opacity: .85;
}

@keyframes preloaderPulse {
  0%, 100% { transform: scale(1); opacity: .85; }
  50% { transform: scale(1.08); opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .preloader-logo { animation: none; }
}

/* ============================================================
   HERO
   ============================================================ */

.hero {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--navy);
  color: var(--white);
  position: relative;
  padding: 6vw;
}

.hero-content h1 {
  font-size: clamp(2.2rem, 6vw, 5rem);
  line-height: 1.05;
  letter-spacing: -.03em;
  text-transform: uppercase;
}

.hero-name {
  margin-top: 22px;
  font-family: var(--font-head);
  font-size: clamp(1rem, 1.6vw, 1.3rem);
  letter-spacing: .08em;
  color: var(--silver);
}

.hero-logo-placeholder {
  margin: 22px auto 0;
  width: clamp(70px, 10vw, 120px);
  height: auto;
  object-fit: contain;
}

.scroll-button {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  background: none;
  border: 1px solid rgba(245, 245, 245, .3);
  color: var(--white);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  transition: transform .2s ease, background .2s ease;
}

.scroll-button:hover { background: rgba(245, 245, 245, .12); transform: translateX(-50%) translateY(4px); }

.scroll-button.dark {
  border-color: rgba(11, 31, 58, .25);
  color: var(--navy);
}

.scroll-button.dark:hover { background: rgba(11, 31, 58, .08); }

.scroll-button span {
  display: inline-block;
  animation: bounceDown 1.8s ease-in-out infinite;
}

@keyframes bounceDown {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(6px); }
}

.back-top {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 30px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid rgba(245, 245, 245, .3);
  background: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1.1rem;
  transition: transform .2s ease, background .2s ease;
}

.back-top:hover { background: rgba(245, 245, 245, .12); transform: translateY(-4px); }

.section-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.section-heading-row.center { justify-content: center; gap: 14px; }

.section-heading-row .eyebrow { margin: 0; }

.section-next {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid rgba(245, 245, 245, .3);
  background: none;
  color: var(--white);
  cursor: pointer;
  font-size: 1rem;
  display: grid;
  place-items: center;
  transition: transform .2s ease, background .2s ease;
}

.section-next:hover { background: rgba(245, 245, 245, .12); transform: translateY(3px); }

.section-next.dark {
  border-color: rgba(11, 31, 58, .25);
  color: var(--navy);
}

.section-next.dark:hover { background: rgba(11, 31, 58, .08); }

/* ============================================================
   PERFIL + GALERÍA
   ============================================================ */

.profile {
  padding: clamp(70px, 9vw, 150px) 5vw;
  background: var(--navy);
  color: var(--white);
  position: relative;
  border-top: 1px solid rgba(184, 189, 199, .18);
}

.profile-inner {
  max-width: var(--max);
  margin: auto;
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: 6vw;
  align-items: center;
}

.profile-gallery {
  position: relative;
}

.gallery-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 1350 / 1080;
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .4);
  border: 1px solid rgba(184, 189, 199, .25);
  background: var(--black);
}

.gallery-frame .slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: scale(1.02);
  transition: opacity .5s ease, transform .6s ease;
}

.gallery-frame .slide.active { opacity: 1; transform: scale(1); }

.gallery-frame .slide img { width: 100%; height: 100%; object-fit: cover; }

.carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: none;
  background: rgba(245, 245, 245, .92);
  color: var(--navy);
  font-size: 1.3rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform .2s ease, background .2s ease;
}

.carousel-arrow:hover { background: var(--white); transform: translateY(-50%) scale(1.08); }
.carousel-arrow.prev { left: 14px; }
.carousel-arrow.next { right: 14px; }

.gallery-count {
  margin-top: 14px;
  font-family: var(--font-head);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--silver);
  opacity: .8;
}

.profile-copy h2 {
  font-size: clamp(2.4rem, 4.6vw, 4.2rem);
  line-height: .95;
  letter-spacing: -.04em;
  margin-bottom: 22px;
  color: var(--white);
}

.profile-copy p + p { margin-top: 18px; }

.profile-copy { font-size: clamp(1rem, 1.3vw, 1.1rem); color: var(--silver); }

/* ============================================================
   PROPUESTA DE VALOR
   ============================================================ */

.proposal {
  padding: clamp(70px, 9vw, 150px) 5vw;
  background: var(--navy);
  color: var(--white);
  position: relative;
  border-top: 1px solid rgba(184, 189, 199, .18);
}

.proposal-inner { max-width: var(--max); margin: auto; }

.proposal-heading { max-width: 760px; margin-bottom: clamp(50px, 6vw, 90px); }

.proposal-heading h2 {
  font-size: clamp(2.4rem, 5vw, 5.2rem);
  line-height: .95;
  letter-spacing: -.03em;
  text-transform: uppercase;
  margin-bottom: 20px;
}

.proposal-lead {
  font-size: clamp(1.05rem, 1.5vw, 1.3rem);
  color: var(--silver);
  max-width: 600px;
}

.proposal-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(28px, 4vw, 56px);
}

.proposal-item {
  border-top: 1px solid rgba(184, 189, 199, .3);
  padding-top: 20px;
}

.proposal-number {
  font-family: var(--font-head);
  font-size: .82rem;
  letter-spacing: .1em;
  color: var(--silver);
  opacity: .7;
}

.proposal-item h3 {
  font-size: 1.3rem;
  margin: 10px 0 10px;
  text-transform: uppercase;
  letter-spacing: -.01em;
}

.proposal-item p { color: var(--silver); opacity: .85; font-size: .95rem; }

.proposal-closing {
  margin-top: clamp(50px, 6vw, 80px);
  font-family: var(--font-head);
  font-style: italic;
  font-size: clamp(1.1rem, 1.8vw, 1.5rem);
  max-width: 820px;
  color: var(--white);
  opacity: .92;
}

/* ============================================================
   HABILIDADES — coverflow
   ============================================================ */

.abilities {
  padding: clamp(70px, 9vw, 150px) 5vw;
  background: var(--navy);
  color: var(--white);
  position: relative;
  border-top: 1px solid rgba(184, 189, 199, .18);
}

.abilities-inner { max-width: var(--max); margin: auto; }

.abilities-title {
  font-size: clamp(2rem, 4vw, 3.4rem);
  letter-spacing: -.03em;
  text-transform: uppercase;
  margin-bottom: clamp(40px, 5vw, 70px);
  color: var(--white);
}

.abilities-row {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 6vw;
  align-items: center;
}

.coverflow {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px 0;
}

.cf-stage {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  perspective: 1400px;
}

.cf-card {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 72%;
  aspect-ratio: 1 / 1;
  border: none;
  padding: 0;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  transition: transform .5s cubic-bezier(.16,.84,.44,1), box-shadow .5s ease, opacity .5s ease;
  box-shadow: 0 16px 36px rgba(0, 0, 0, .4);
}

.cf-card img { width: 100%; height: 100%; object-fit: cover; }

.cf-card.is-center {
  transform: translateX(0) scale(1) rotateY(0deg);
  z-index: 3;
  box-shadow: 0 30px 70px rgba(0, 0, 0, .5);
}

.cf-card.is-left {
  transform: translateX(-46%) scale(.8) rotateY(18deg);
  z-index: 2;
  opacity: .75;
}

.cf-card.is-right {
  transform: translateX(46%) scale(.8) rotateY(-18deg);
  z-index: 2;
  opacity: .75;
}

.cf-arrow {
  background: var(--silver);
  color: var(--navy);
  border: none;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 1.3rem;
  cursor: pointer;
  flex-shrink: 0;
  z-index: 4;
  display: grid;
  place-items: center;
  transition: transform .2s ease, background .2s ease;
}

.cf-arrow:hover { background: var(--white); transform: scale(1.08); }

.ability-eyebrow { margin-bottom: 10px; }

.ability-title {
  font-size: clamp(1.6rem, 2.6vw, 2.3rem);
  letter-spacing: -.02em;
  margin-bottom: 14px;
  min-height: 1.2em;
  transition: opacity .3s ease;
  color: var(--white);
}

.ability-desc {
  color: var(--silver);
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  transition: opacity .3s ease;
  min-height: 3.2em;
}

.ability-hint {
  margin-top: 18px;
  font-size: .8rem;
  color: var(--silver);
  opacity: .6;
}

/* ============================================================
   LIGHTBOX (ampliar imagen de habilidad)
   ============================================================ */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  padding: 6vw;
  background: rgba(10, 10, 10, .92);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .3s ease, visibility 0s linear .3s;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity .3s ease, visibility 0s linear 0s;
}

.lightbox img {
  max-width: 86vw;
  max-height: 86vh;
  object-fit: contain;
  border-radius: 12px;
  transform: scale(.92);
  transition: transform .4s cubic-bezier(.16,.84,.44,1);
}

.lightbox.open img { transform: scale(1); }

.lightbox-close {
  position: absolute;
  top: 26px;
  right: 30px;
  background: none;
  border: none;
  color: var(--white);
  font-size: 2rem;
  cursor: pointer;
  line-height: 1;
}

.lightbox-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid rgba(245, 245, 245, .3);
  background: rgba(245, 245, 245, .08);
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background .2s ease, transform .2s ease;
}

.lightbox-arrow:hover { background: rgba(245, 245, 245, .18); }
.lightbox-arrow.lb-prev { left: 18px; }
.lightbox-arrow.lb-next { right: 18px; }

.lightbox-counter {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-head);
  font-size: .78rem;
  letter-spacing: .1em;
  color: var(--silver);
}

/* ============================================================
   CTA
   ============================================================ */

.cta {
  padding: clamp(80px, 10vw, 170px) 5vw;
  background: var(--paper);
  text-align: center;
  position: relative;
  border-top: 1px solid rgba(11, 31, 58, .12);
}

.cta .eyebrow { color: var(--navy); opacity: .55; }

.cta-inner { max-width: 760px; margin: auto; }

.cta h2 {
  font-size: clamp(2.2rem, 4.6vw, 4rem);
  letter-spacing: -.03em;
  text-transform: uppercase;
  margin: 16px 0 18px;
  color: var(--navy);
}

.cta-lead { color: #3A3F4B; font-size: clamp(1rem, 1.3vw, 1.15rem); margin-bottom: 36px; }

.cta-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin: 0 auto;
  max-width: 480px;
}

.hidden-field { position: absolute; left: -9999px; top: auto; }

.form-row { display: flex; flex-direction: column; gap: 6px; }

.form-row-head { display: flex; align-items: baseline; justify-content: space-between; }

.form-row label {
  font-family: var(--font-head);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--navy);
  opacity: .7;
}

.char-counter {
  font-family: var(--font-head);
  font-size: .7rem;
  color: var(--navy);
  opacity: .45;
}

.form-row input,
.form-row textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 13px 16px;
  resize: vertical;
  transition: border-color .2s ease, box-shadow .2s ease;
}

.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(11, 31, 58, .1);
}

.cta-form .cta-button {
  border: none;
  margin-top: 6px;
  align-self: flex-start;
}

.cta-direct {
  margin-top: 22px;
  font-size: .9rem;
  color: #3A3F4B;
}

.cta-direct a { color: var(--navy); font-weight: 600; text-decoration: underline; }

.cta-button {
  display: inline-block;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1rem, 1.3vw, 1.2rem);
  text-decoration: none;
  cursor: pointer;
  background: var(--navy);
  color: var(--white);
  padding: 18px 38px;
  border-radius: 99px;
  transition: transform .2s ease, background .2s ease;
}

.cta-button:hover { background: var(--black); transform: translateY(-2px); }

.cta-socials {
  margin-top: 26px;
  display: flex;
  justify-content: center;
  gap: 14px;
  font-family: var(--font-head);
  font-size: .85rem;
  letter-spacing: .04em;
}

.cta-socials a {
  text-decoration: none;
  color: var(--navy);
  opacity: .7;
  transition: opacity .2s ease;
}

.cta-socials a:hover { opacity: 1; }

.cta-socials span { color: var(--silver); }

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--navy);
  color: var(--silver);
  padding: clamp(28px, 4vw, 40px) 5vw clamp(26px, 4vw, 40px);
  border-top: 1px solid rgba(11, 31, 58, .5);
}

.footer-inner {
  max-width: var(--max);
  margin: auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(184, 189, 199, .2);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 34px;
  height: auto;
  object-fit: contain;
}

.footer-name {
  font-family: var(--font-head);
  font-weight: 600;
  color: var(--white);
  font-size: .95rem;
}

.footer-personal-brand {
  font-family: var(--font-head);
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--silver);
  margin-top: 2px;
}

.footer-socials { display: flex; gap: 16px; font-family: var(--font-head); font-size: .8rem; }

.footer-socials a { text-decoration: none; color: var(--silver); opacity: .75; transition: opacity .2s ease; }
.footer-socials a:hover { opacity: 1; }

.footer-copy { font-size: .78rem; opacity: .65; }

.footer-disclaimer {
  max-width: var(--max);
  margin: 20px auto 0;
  font-size: .72rem;
  line-height: 1.6;
  opacity: .5;
}

/* ============================================================
   REVEAL AL HACER SCROLL
   ============================================================ */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity .8s cubic-bezier(.16,.84,.44,1), transform .8s cubic-bezier(.16,.84,.44,1);
  transition-delay: var(--d, 0ms);
}

.reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { transition: none !important; opacity: 1 !important; transform: none !important; }
  .scroll-button span { animation: none !important; }
  .cf-card { transition: none !important; }
  .lightbox, .lightbox img { transition: none !important; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 900px) {
  .profile-inner, .abilities-row {
    grid-template-columns: 1fr;
    gap: 50px;
  }
  .proposal-grid { grid-template-columns: 1fr; gap: 36px; }
  .cf-card.is-left, .cf-card.is-right { opacity: .55; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
  .scroll-button, .back-top { bottom: 18px; }
}


/* ============================================================
   PLUGG — PATRONES / TEXTURAS / INTERACCIONES
   Ajusta aquí los porcentajes. Ej.: 6% = .06; 10% = .10.
   Los SVG se recortan exactamente en los bordes de cada sección.
   ============================================================ */
:root {
  --patron-portada-opacidad: 0.07;   /* 7% — PATRON 1 */
  --patron-perfil-opacidad: 0.07;    /* 7% — PATRON 4 */
  --patron-propuesta-opacidad: 0.07; /* 7% — PATRON 2 */
  --patron-habilidades-opacidad: 0.07;/* 7% — PATRON 3 */
  --grano-opacidad: 0.035;          /* 3.5% */
}
.hero, .profile, .proposal, .abilities {
  isolation: isolate;
  overflow: clip;
}
.hero::before, .profile::before, .proposal::before, .abilities::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-repeat: no-repeat;
  background-position: center center;
  background-size: cover;
  opacity: var(--pattern-opacity);
}
.hero { --pattern-opacity: var(--patron-portada-opacidad); }
.profile { --pattern-opacity: var(--patron-perfil-opacidad); }
.proposal { --pattern-opacity: var(--patron-propuesta-opacidad); }
.abilities { --pattern-opacity: var(--patron-habilidades-opacidad); }
.hero::before { background-image: url("../assets/PATRON%201.svg"); }
.profile::before { background-image: url("../assets/PATRON%204.svg"); }
.proposal::before { background-image: url("../assets/PATRON%202.svg"); }
.abilities::before { background-image: url("../assets/PATRON%203.svg"); }
/* Grano vectorial procedural, sin imágenes adicionales. */
.hero::after, .profile::after, .proposal::after, .abilities::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: var(--grano-opacidad);
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.7'/%3E%3C/svg%3E");
}
.hero > *, .profile > *, .proposal > *, .abilities > * { position: relative; z-index: 1; }
.plugg-ticker {
  overflow: hidden;
  width: 100%;
  background: #B8BDC7;
  color: #0B1F3A;
  border-block: 1px solid rgba(11,31,58,.18);
  padding: 12px 0;
}
.plugg-ticker-track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: plugg-ticker-move 32s linear infinite;
  font: 700 clamp(.7rem,1vw,.85rem)/1.4 var(--font-head);
  letter-spacing: .16em;
}
.plugg-ticker-track span { flex: 0 0 auto; }
.plugg-ticker-track b { padding: 0 1.8em; font-weight: 400; }
@keyframes plugg-ticker-move { to { transform: translateX(-50%); } }
@media (hover: hover) and (pointer: fine) {
  body.plugg-has-cursor, body.plugg-has-cursor a,
  body.plugg-has-cursor button, body.plugg-has-cursor .cf-card,
  body.plugg-has-cursor [role="button"] { cursor: none !important; }
  .plugg-cursor {
    position: fixed;
    top: 0; left: 0;
    width: 9px; height: 9px;
    border-radius: 50%;
    background: #F5F5F5;
    mix-blend-mode: difference;
    pointer-events: none;
    z-index: 100000;
    opacity: 0;
    transform: translate3d(-100px,-100px,0) translate(-50%,-50%);
    transition: width .2s ease, height .2s ease, opacity .15s ease;
  }
  .plugg-cursor.is-visible { opacity: 1; }
  .plugg-cursor.is-active { width: 38px; height: 38px; }
}
@media (hover: none), (pointer: coarse) { .plugg-cursor { display: none; } }
@media (prefers-reduced-motion: reduce) {
  .plugg-ticker-track { animation: none; }
  .plugg-cursor { transition: none; }
}
