/* =========================
   Base
========================= */

:root {
  --bg: #ebe9e7;
  --black: #050505;
  --cream: #ebe4c8;
  --slate: #454852;
  --brown: #2c2526;
  --light: #d7d5d5;
  --line: #9f9a95;

  --side: clamp(24px, 4vw, 70px);
  --gap: clamp(16px, 1.45vw, 28px);
  --header-h: 92px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--black);
  font-family: "Poppins", Arial, sans-serif;
  font-weight: 400;
}

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

/* =========================
   Intro loader
========================= */

.intro-loader {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: grid;
  place-items: center;
  background: var(--black);
  pointer-events: none;
  animation: loader-out 2.35s cubic-bezier(.76, 0, .24, 1) forwards;
}

.intro-loader img {
  width: min(72vw, 880px);
  filter: invert(1);
  opacity: 0;
  transform: translateY(18px) scale(.985);
  animation: loader-logo 1.75s cubic-bezier(.76, 0, .24, 1) forwards;
}

.page-home {
  opacity: 0;
  animation: page-in .9s ease 1.85s forwards;
}

@keyframes loader-logo {
  0% { opacity: 0; transform: translateY(18px) scale(.985); }
  34%, 72% { opacity: 1; transform: translateY(0) scale(1); }
  100% { opacity: 0; transform: translateY(-16px) scale(1.015); }
}

@keyframes loader-out {
  0%, 72% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes page-in {
  to { opacity: 1; }
}

/* =========================
   Header
========================= */

.page {
  min-height: 100vh;
  background: var(--bg);
}

.header {
  height: var(--header-h);
  padding: 42px var(--side) 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(235, 233, 231, 0.9);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.nav {
  display: flex;
  gap: clamp(42px, 6.5vw, 100px);
}

.nav-item {
  font-family: "Roboto Mono", monospace;
  font-size: clamp(15px, 1.15vw, 21px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
}

/* Movimiento por letras */
.letter-hover {
  display: inline-flex;
  height: 1em;
  line-height: 1;
  overflow: hidden;
  align-items: flex-start;
  padding: 0;
  text-decoration: none;
}

.letter-hover span {
  position: relative;
  display: inline-block;
  height: 1em;
  line-height: 1;
  transform: translateY(0);
  transition: transform 420ms cubic-bezier(.22, 1, .36, 1);
}

.letter-hover span::after {
  content: attr(data-char);
  position: absolute;
  left: 0;
  top: 1em;
}

.letter-hover:hover span,
.letter-hover:focus-visible span {
  transform: translateY(-1em);
}

.letter-hover span:nth-child(1) { transition-delay: 0ms; }
.letter-hover span:nth-child(2) { transition-delay: 35ms; }
.letter-hover span:nth-child(3) { transition-delay: 70ms; }
.letter-hover span:nth-child(4) { transition-delay: 105ms; }
.letter-hover span:nth-child(5) { transition-delay: 140ms; }
.letter-hover span:nth-child(6) { transition-delay: 175ms; }
.letter-hover span:nth-child(7) { transition-delay: 210ms; }
.letter-hover span:nth-child(8) { transition-delay: 245ms; }

.nav-item.active {
  text-decoration: none;
  opacity: 0.55;
}

/* =========================
   Hero
========================= */

.hero {
  min-height: 405px;
  padding: clamp(105px, 14vh, 165px) var(--side) 52px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(210px, 18vw, 300px);
  gap: var(--gap);
  align-items: end;
}

.hero-title img {
  display: block;
  width: min(100%, 830px);
  height: auto;
}

.hero-title p {
  margin: 22px 0 0;
  font-size: clamp(17px, 1.55vw, 30px);
  line-height: 1.1;
  letter-spacing: 0.065em;
  font-weight: 300;
}

.hero-aside {
  padding-bottom: 1px;
  align-self: end;
}

.aside-line {
  display: block;
  width: 54px;
  height: 2px;
  margin-bottom: 20px;
  background: var(--black);
}

.hero-aside p {
  margin: 0;
  font-size: clamp(13px, 1vw, 18px);
  line-height: 1.55;
  letter-spacing: 0.055em;
  font-weight: 400;
}

/* =========================
   Project Grid
========================= */

.project-grid {
  padding: 0 0 92px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 52px var(--gap);
}

.project-card {
  position: relative;
  display: block;
  overflow: hidden;
  background: #ccc;
  height: clamp(280px, 29vw, 500px);
}

.project-card::after {
  content: attr(data-title);
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 68px;
  display: grid;
  place-items: center;
  background: var(--bg);
  font-family: "Roboto Mono", monospace;
  font-size: clamp(15px, 1.1vw, 21px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.04em;
  transition: opacity 220ms ease, transform 220ms ease;
}

.project-overlay {
  position: absolute;
  inset: 0;
  padding: clamp(18px, 1.6vw, 30px);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
  opacity: 0;
  transform: translateY(12px);
  color: var(--black);
  background: rgba(235, 233, 231, 0.72);
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 2;
}

.project-overlay strong {
  font-family: "Roboto Mono", monospace;
  font-size: clamp(20px, 1.65vw, 31px);
  line-height: 1;
  letter-spacing: -0.04em;
  font-weight: 500;
}

.project-overlay small {
  font-size: clamp(12px, 0.9vw, 15px);
  line-height: 1.4;
  letter-spacing: 0.05em;
  font-weight: 300;
}

.project-card:hover .project-overlay,
.project-card:focus-visible .project-overlay {
  opacity: 1;
  transform: translateY(0);
}

.project-card:hover::after,
.project-card:focus-visible::after {
  opacity: 0;
  transform: translateY(16px);
}

.color-cream { background: var(--cream); }
.color-slate { background: var(--slate); }
.color-brown { background: var(--brown); }
.color-light { background: var(--light); }
.color-black { background: var(--black); }

/* =========================
   Inner pages
========================= */

.page-inner {
  display: flex;
  min-height: 100vh;
  flex-direction: column;
}

.landing-content {
  flex: 1;
  padding: clamp(120px, 18vh, 210px) var(--side) 100px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 520px);
  gap: clamp(48px, 8vw, 140px);
  align-items: start;
}

.section-label {
  margin: 0 0 32px;
  font-family: "Roboto Mono", monospace;
  font-size: clamp(16px, 1.2vw, 22px);
  line-height: 1;
  letter-spacing: -0.04em;
}

.landing-content h1 {
  margin: 0;
  max-width: 820px;
  font-family: "Roboto Mono", monospace;
  font-size: clamp(48px, 7vw, 118px);
  line-height: 0.92;
  letter-spacing: -0.07em;
  font-weight: 500;
}

.text-column p {
  margin: 0 0 22px;
  font-size: clamp(17px, 1.3vw, 24px);
  line-height: 1.55;
  letter-spacing: 0.02em;
  font-weight: 300;
}

.contact-list {
  display: grid;
  gap: 28px;
}

.contact-list article {
  border-top: 2px solid var(--black);
  padding-top: 18px;
}

.contact-list h2 {
  margin: 0 0 8px;
  font-family: "Roboto Mono", monospace;
  font-size: clamp(26px, 2.4vw, 45px);
  line-height: 1;
  letter-spacing: -0.05em;
  font-weight: 500;
}

.contact-list p,
.contact-list a {
  margin: 0;
  font-size: clamp(16px, 1.15vw, 21px);
  line-height: 1.6;
  letter-spacing: 0.02em;
  font-weight: 300;
}

/* =========================
   Footer
========================= */

.footer {
  min-height: 76px;
  padding: 20px var(--side);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-image: repeating-linear-gradient(
    90deg,
    var(--line) 0 14px,
    transparent 14px 28px
  );
  background-size: 100% 1px;
  background-repeat: no-repeat;
  background-position: top left;
}

.footer-logo {
  font-family: "Roboto Mono", monospace;
  font-size: clamp(13px, 1vw, 17px);
  line-height: 1;
  font-weight: 500;
  letter-spacing: -0.05em;
}

.footer p {
  margin: 0;
  text-align: right;
  font-family: "Poppins", Arial, sans-serif;
  font-size: clamp(9px, 0.75vw, 12px);
  line-height: 1.15;
  font-weight: 400;
  letter-spacing: 0;
}

/* =========================
   Responsive
========================= */

@media (max-width: 1050px) {
  .hero {
    grid-template-columns: 1fr;
    padding-top: 88px;
  }

  .hero-aside {
    max-width: 340px;
  }

  .project-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .project-card {
    height: 360px;
  }

  .landing-content {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  :root {
    --side: 18px;
    --gap: 12px;
    --header-h: 72px;
  }

  .header {
    padding-top: 28px;
  }

  .nav {
    gap: 20px;
  }

  .nav-item {
    font-size: 13px;
  }

  .hero {
    min-height: 330px;
    padding-top: 64px;
    padding-bottom: 42px;
  }

  .hero-title p {
    font-size: 14px;
    line-height: 1.55;
    letter-spacing: 0.04em;
  }

  .project-grid {
    gap: 40px 12px;
    padding-bottom: 70px;
  }

  .project-card {
    height: 280px;
  }

  .project-card::after {
    height: 50px;
    font-size: 13px;
  }

  .landing-content {
    padding-top: 90px;
  }

  .footer {
    min-height: 64px;
  }
}

@media (max-width: 430px) {
  .project-grid {
    grid-template-columns: 1fr;
  }

  .project-card {
    height: 320px;
  }

  .nav {
    gap: 14px;
  }
}


/* =========================
   Contact page refinement
========================= */

.contact-content .contact-list {
  gap: 34px;
}

.contact-list article {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 28px;
}

.linkedin-icon {
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  display: grid;
  place-items: center;
  border: 1.5px solid var(--black);
  transition: background 180ms ease, color 180ms ease, transform 180ms ease;
}

.linkedin-icon svg {
  width: 17px;
  height: 17px;
  fill: currentColor;
}

.linkedin-icon:hover,
.linkedin-icon:focus-visible {
  background: var(--black);
  color: var(--bg);
  transform: translateY(-2px);
}

@media (max-width: 700px) {
  .contact-list article {
    gap: 18px;
  }

  .linkedin-icon {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
  }

  .linkedin-icon svg {
    width: 15px;
    height: 15px;
  }
}



.project-nivea {
  background-image: url("assets/nivea-01-portada.jpg");
  background-size: cover;
  background-position: center;
}

.page-project {
  min-height: 100vh;
}

.project-hero {
  padding: clamp(110px, 16vh, 190px) var(--side) clamp(42px, 6vw, 86px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 560px);
  gap: clamp(48px, 8vw, 140px);
  align-items: end;
}

.project-hero h1 {
  margin: 0;
  font-family: "Roboto Mono", monospace;
  font-size: clamp(76px, 13vw, 210px);
  line-height: 0.82;
  letter-spacing: -0.09em;
  font-weight: 500;
}

.project-summary p {
  margin: 0 0 34px;
  font-size: clamp(17px, 1.35vw, 25px);
  line-height: 1.5;
  font-weight: 300;
  letter-spacing: 0.02em;
}

.project-summary dl {
  margin: 0;
  display: grid;
  gap: 18px;
}

.project-summary div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 18px;
  padding-top: 14px;
  border-top: 1.5px solid var(--black);
}

.project-summary dt,
.project-summary dd {
  margin: 0;
  font-size: clamp(12px, 0.95vw, 15px);
  line-height: 1.4;
  letter-spacing: 0.06em;
}

.project-summary dt {
  font-family: "Roboto Mono", monospace;
}

.project-summary dd {
  font-weight: 300;
}

.project-gallery {
  padding: 0 var(--side) 96px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
}

.project-photo {
  margin: 0;
  min-height: clamp(300px, 42vw, 680px);
  background: var(--light);
  overflow: hidden;
}

.project-photo-wide {
  grid-column: 1 / -1;
  min-height: clamp(420px, 55vw, 860px);
}

.project-photo img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.project-placeholder {
  display: grid;
  place-items: center;
}

.project-placeholder span {
  font-family: "Roboto Mono", monospace;
  font-size: clamp(18px, 1.5vw, 26px);
  letter-spacing: -0.04em;
}

.project-placeholder.color-black,
.project-placeholder.color-brown,
.project-placeholder.color-slate {
  color: var(--bg);
}

@media (max-width: 900px) {
  .project-hero {
    grid-template-columns: 1fr;
    padding-top: 92px;
  }

  .project-gallery {
    grid-template-columns: 1fr;
  }

  .project-photo-wide {
    grid-column: auto;
  }
}


/* =========================
   NIVEA project update
========================= */

.project-hero-simple {
  align-items: end;
}

.project-hero-simple h1 {
  max-width: 980px;
  font-size: clamp(54px, 7.2vw, 118px);
  line-height: 0.95;
  letter-spacing: -0.075em;
}

.project-summary-simple {
  align-self: end;
}

.project-summary-simple dl {
  gap: 0;
}

.project-summary-simple div {
  grid-template-columns: 90px 1fr;
  padding: 20px 0;
}

.project-gallery {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.project-photo,
.project-photo-wide {
  min-height: auto;
  aspect-ratio: 4 / 3;
}

.project-photo-wide {
  grid-column: auto;
}

.project-photo img {
  object-fit: cover;
}

@media (max-width: 900px) {
  .project-gallery {
    grid-template-columns: 1fr;
  }
}


.project-bubba {
  background-image: url("assets/bubba-01-portada.jpg");
  background-size: cover;
  background-position: center;
}


.project-visa {
  background-image: url("assets/visa-01-portada.jpg");
  background-size: cover;
  background-position: center;
}


.project-lasst {
  background-image: url("assets/lasst-01-portada.jpg");
  background-size: cover;
  background-position: center;
}


.project-visa-parva {
  background-image: url("assets/visa-parva-01-portada.jpg");
  background-size: cover;
  background-position: center;
}


.project-soprole {
  background-image: url("assets/soprole-01-portada.jpg");
  background-size: cover;
  background-position: center;
}





.project-veev {
  background-image: url("assets/veev-01-portada.jpg");
  background-size: cover;
  background-position: center;
}


.project-kiko {
  background-image: url("assets/kiko-01-portada.jpg");
  background-size: cover;
  background-position: center;
}


.project-wavy {
  background-image: url("assets/wavy-01-portada.jpg");
  background-size: cover;
  background-position: center;
}


.project-nivea-dermo {
  background-image: url("assets/nivea-dermo-01-portada.jpg");
  background-size: cover;
  background-position: center;
}


.project-schick {
  background-image: url("assets/schick-01-portada.jpg");
  background-size: cover;
  background-position: center;
}


.project-expo-mascotas {
  background-image: url("assets/expo-mascotas-01-portada.jpg");
  background-size: cover;
  background-position: center;
}
