/* =========================================
   ESTUDIO MANDRA — Identidad Visual Web
   =========================================
   Paleta principal (versión oscurecida)
   Olive:      #43452D
   Terracotta: #AF664B
   Cream:      #D9D4CC  (era E9E6E5)
   Beige:      #C6BFB5  (era D7CCBC)
   Stone:      #8F8A82  (era AAAAA0)
   Dark:       #151810
   ========================================= */

:root {
  --olive:       #43452D;
  --terracotta:  #AF664B;
  --cream:       #D9D4CC;
  --beige:       #C6BFB5;
  --stone:       #8F8A82;
  --dark:        #151810;
  --green-light: #B7C0AB;

  --font-heading: 'Josefin Sans', 'Century Gothic', 'Apple Gothic', sans-serif;
  --font-body:    'Raleway', 'Trebuchet MS', sans-serif;

  --nav-h: 72px;
  --side:  clamp(1.5rem, 5vw, 5rem);
  --gap:   clamp(1.25rem, 2.5vw, 2.5rem);

  --ease: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ---- Reset ---- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  background-color: var(--cream);
  color: var(--olive);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { background: none; border: none; cursor: pointer; }

/* ---- Utilities ---- */
.container {
  width: 100%;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 var(--side);
}

.label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
}

.label--light {
  color: rgba(233, 230, 229, 0.45);
}

/* ---- Reveal animation ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity  0.85s var(--ease),
    transform 0.85s var(--ease);
  transition-delay: var(--reveal-delay, 0s);
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ======================
   NAV
   ====================== */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--side);
  background-color: var(--cream);
  border-bottom: 1px solid transparent;
  transition: border-color 0.35s var(--ease);
}

.nav.is-scrolled {
  border-bottom-color: rgba(67, 69, 45, 0.12);
}

.nav__brand {
  display: flex;
  align-items: center;
  height: 100%;
}

.nav__logo {
  height: 24px;
  width: auto;
  mix-blend-mode: multiply;
}

.nav__links {
  display: flex;
  gap: clamp(2rem, 4vw, 4rem);
}

.nav__links a {
  font-family: var(--font-heading);
  font-size: 0.7rem;
  font-weight: 300;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  transition: color 0.25s;
}

.nav__links a:hover {
  color: var(--terracotta);
}

.nav__toggle {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 6px 4px;
}

.nav__toggle span {
  display: block;
  width: 22px;
  height: 1px;
  background: var(--olive);
  transition: transform 0.3s var(--ease), opacity 0.3s;
}

.nav__toggle.is-open span:first-child {
  transform: rotate(45deg) translate(5px, 5px);
}
.nav__toggle.is-open span:last-child {
  transform: rotate(-45deg) translate(5px, -5px);
}


/* ======================
   MOBILE MENU
   ====================== */
.mobile-menu {
  position: fixed;
  inset: var(--nav-h) 0 0 0;
  z-index: 99;
  background-color: var(--cream);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}

.mobile-menu.is-open {
  opacity: 1;
  pointer-events: all;
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3rem;
}

.mobile-menu__links a {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(2rem, 8vw, 3rem);
  letter-spacing: 0.06em;
  transition: color 0.25s;
}

.mobile-menu__links a:hover {
  color: var(--terracotta);
}


/* ======================
   HERO
   ====================== */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--nav-h) + clamp(3rem, 8vw, 6rem)) var(--side) clamp(2.5rem, 5vw, 4rem);
  overflow: hidden;
}

.hero__watermark {
  position: absolute;
  right: -4%;
  top: 50%;
  transform: translateY(-52%);
  width: clamp(280px, 48vw, 680px);
  color: var(--olive);
  opacity: 0.045;
  pointer-events: none;
  user-select: none;
}

.hero__watermark svg {
  width: 100%;
  height: auto;
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-bottom: clamp(2rem, 4vw, 3.5rem);
}

.hero__label {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
  margin-bottom: 2rem;
}

.hero__title {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(3.5rem, 9.5vw, 9.5rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  color: var(--olive);
}

.hero__footer {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--beige);
}

.hero__tagline {
  font-size: 0.82rem;
  font-weight: 200;
  line-height: 2;
  color: var(--stone);
  max-width: 420px;
}

.hero__scroll {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-heading);
  font-size: 0.6rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--stone);
}

.hero__scroll-line {
  width: 1px;
  height: 50px;
  background: var(--stone);
  transform-origin: top center;
  animation: scroll-pulse 2.6s ease-in-out infinite;
}

@keyframes scroll-pulse {
  0%, 100% { opacity: 1;   transform: scaleY(1); }
  50%       { opacity: 0.3; transform: scaleY(0.55); }
}


/* ======================
   ABOUT
   ====================== */
.about {
  padding: clamp(6rem, 14vw, 14rem) 0;
  border-top: 1px solid var(--beige);
}

.about__inner {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: var(--gap) clamp(4rem, 10vw, 12rem);
  align-items: start;
}

.about__meta {
  padding-top: 0.5rem;
}

.about__heading {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(2.5rem, 6vw, 6rem);
  line-height: 1.05;
  margin-bottom: 2rem;
}

.about__text {
  font-size: 1.05rem;
  font-weight: 200;
  line-height: 1.9;
  color: var(--olive);
  max-width: 560px;
}

.about__text + .about__text {
  margin-top: 1.5rem;
}

.about__text--accent {
  color: var(--terracotta);
  font-style: italic;
}

/* Sección equipo */
.about__equipo {
  margin-top: clamp(5rem, 10vw, 10rem);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: clamp(3rem, 6vw, 8rem);
  align-items: end;
  padding: 0 var(--side);
  max-width: 1280px;
  margin-left: auto;
  margin-right: auto;
  margin-top: clamp(5rem, 10vw, 10rem);
}

.about__equipo-foto {
  position: relative;
  overflow: hidden;
  max-width: 680px;
}

.about__equipo-foto img {
  width: 100%;
  display: block;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.about__equipo-info {
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
  padding-bottom: 0.5rem;
  min-width: 180px;
}

.about__equipo-persona {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  border-top: 1px solid var(--beige);
  padding-top: 1rem;
}

.about__equipo-nombre {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(1rem, 1.8vw, 1.4rem);
  color: var(--olive);
  letter-spacing: 0.02em;
}

@media (max-width: 768px) {
  .about__equipo {
    grid-template-columns: 1fr;
  }
  .about__equipo-info {
    flex-direction: row;
    gap: 1.5rem;
  }
  .about__equipo-persona {
    flex: 1;
  }
}

.about__text--accent {
  color: var(--terracotta);
  font-style: italic;
}


/* ======================
   PROJECTS
   ====================== */
.projects {
  padding-bottom: clamp(6rem, 12vw, 14rem);
}

.projects__header {
  display: flex;
  align-items: baseline;
  gap: 2rem;
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.projects__title {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(2rem, 4vw, 4.5rem);
  color: var(--olive);
}

/* 12-column editorial grid */
.projects__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: var(--gap);
}

/* Row 1: wide (7) + narrow (5) */
.project-card          { grid-column: span 5; }
.project-card--wide    { grid-column: span 7; }

/* Row 2: narrow (5) starts auto, wide offset to col 6 */
.project-card--offset  { grid-column: 6 / span 7; }

.project-card__link {
  display: block;
}

.project-card__image {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 0.9rem;
  background-color: var(--beige);
}

.project-card__image img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card__link:hover .project-card__image img {
  transform: scale(1.03);
}

.project-card--wide .project-card__image {
  aspect-ratio: 16 / 10;
}

.project-card__image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--olive);
  opacity: 0;
  transition: opacity 0.5s var(--ease);
}

.project-card__link:hover .project-card__image::after {
  opacity: 0.08;
}

.project-card__info {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--beige);
}

.project-card__year {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  color: var(--stone);
}

.project-card__name {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 300;
  color: var(--olive);
  transition: color 0.25s;
}

.project-card__link:hover .project-card__name {
  color: var(--terracotta);
}

.project-card__loc {
  font-size: 0.72rem;
  color: var(--stone);
  text-align: right;
}


/* ======================
   VALUES
   ====================== */
.values {
  background-color: var(--olive);
  color: var(--cream);
  padding: clamp(6rem, 12vw, 14rem) 0;
}

.values__header {
  margin-bottom: clamp(3.5rem, 7vw, 7rem);
}

.values__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(3rem, 6vw, 6rem) var(--gap);
}

.value {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.value__icon {
  width: 42px;
  height: 42px;
  color: var(--cream);
  opacity: 0.7;
}

.value__icon svg {
  width: 100%;
  height: 100%;
}

.value__name {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  color: var(--cream);
}

.value__desc {
  font-size: 0.78rem;
  font-weight: 200;
  line-height: 1.9;
  color: rgba(233, 230, 229, 0.48);
}


/* ======================
   CONTACT
   ====================== */
.contact {
  padding: clamp(6rem, 12vw, 14rem) 0;
  border-top: 1px solid var(--beige);
}

.contact__header {
  margin-bottom: clamp(3rem, 6vw, 6rem);
}

.contact__title {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(2.5rem, 7vw, 7rem);
  line-height: 1.0;
  color: var(--olive);
  margin-top: 1rem;
}

.contact__links {
  border-top: 1px solid var(--beige);
}

.contact__item {
  display: grid;
  grid-template-columns: 120px 1fr auto;
  align-items: center;
  gap: 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--beige);
  transition: color 0.25s;
}

.contact__item:hover {
  color: var(--terracotta);
}

.contact__type {
  font-family: var(--font-heading);
  font-size: 0.65rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--stone);
  transition: color 0.25s;
}

.contact__item:hover .contact__type {
  color: var(--terracotta);
  opacity: 0.7;
}

.contact__value {
  font-family: var(--font-heading);
  font-weight: 100;
  font-size: clamp(0.95rem, 2vw, 1.5rem);
}

.contact__arrow {
  font-size: 1rem;
  opacity: 0.3;
  transition: opacity 0.25s, transform 0.3s var(--ease);
}

.contact__item:hover .contact__arrow {
  opacity: 0.8;
  transform: translateX(5px);
}


/* ======================
   FOOTER
   ====================== */
.footer {
  background-color: var(--dark);
  padding: 2.5rem 0;
}

.footer__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  color: rgba(233, 230, 229, 0.45);
}

.footer__isotipo {
  width: 30px;
  height: auto;
}

.footer__name {
  font-family: var(--font-heading);
  font-size: 0.68rem;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.footer__info {
  font-family: var(--font-heading);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  color: rgba(233, 230, 229, 0.28);
  text-align: right;
  line-height: 2;
}


/* ======================
   RESPONSIVE
   ====================== */
@media (max-width: 1024px) {
  .values__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .about__inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .projects__grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--gap);
  }

  .project-card,
  .project-card--wide {
    grid-column: span 2;
  }

  .project-card--offset {
    grid-column: auto;
  }

  .project-card:nth-child(2),
  .project-card:nth-child(3) {
    grid-column: span 1;
  }
}

@media (max-width: 600px) {
  .nav__links  { display: none; }
  .nav__toggle { display: flex; }

  .hero__footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 1.75rem;
  }

  .hero__scroll {
    flex-direction: row;
    gap: 0.75rem;
  }

  .hero__scroll-line {
    width: 40px;
    height: 1px;
    transform-origin: left center;
  }

  @keyframes scroll-pulse {
    0%, 100% { opacity: 1;   transform: scaleX(1); }
    50%       { opacity: 0.3; transform: scaleX(0.5); }
  }

  .projects__grid {
    grid-template-columns: 1fr;
  }

  .project-card,
  .project-card--wide,
  .project-card:nth-child(2),
  .project-card:nth-child(3) {
    grid-column: span 1;
  }

  .values__grid {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .contact__item {
    grid-template-columns: 1fr auto;
    gap: 1rem;
  }

  .contact__type { display: none; }

  .footer__inner {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer__info { text-align: center; }
}
