/* ==========================================================================
   Design System & Variables
   ========================================================================== */
:root {
  /* Colors */
  --color-black: #111111;
  --color-grey-dark: #666666;
  --color-grey-light: #EAEAEA;
  --color-white: #FFFFFF;
  --color-background: #F7F7F7;
  --color-background-alt: #F7F7F7; /* based on reference 148_p3.png background */
  --color-overlay: rgba(0, 0, 0, 0.3);

  /* Typography */
  --font-family-primary: 'Inter', 'Helvetica Neue', Helvetica, Arial, sans-serif;
  
  /* Font Sizes */
  --text-hero: clamp(52px, 5vw, 64px);
  --text-title: clamp(28px, 3vw, 32px);
  --text-highlight: clamp(22px, 2.5vw, 24px);
  --text-normal: clamp(16px, 1.5vw, 18px);
  --text-small: clamp(12px, 1vw, 14px);

  /* Spacing */
  --space-xl: 120px;
  --space-l: 80px;
  --space-m: 40px;
  --space-s: 20px;

  /* Layout */
  --container-max-width: 1200px;
  --header-height: 80px;
  
  /* Transitions */
  --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  --transition-hover: all 0.2s ease-in-out;
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: var(--font-family-primary);
  color: var(--color-black);
  background-color: var(--color-background-alt);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-weight: 400; /* Minimalist style */
  letter-spacing: -0.02em;
}

p {
  color: var(--color-black);
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-hover);
}

img {
  max-width: 100%;
  display: block;
}
html {
  scroll-behavior: smooth;
}
/* ==========================================================================
   Layout Utils
   ========================================================================== */
.container {
  width: 100%;
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 var(--space-m);
}

.section-padding {
  padding-top: var(--space-xl);
  padding-bottom: var(--space-xl);
}

.section-padding-top {
  padding-top: var(--space-xl);
}

.section-padding-bottom {
  padding-bottom: var(--space-xl);
}

/* ==========================================================================
   Header (Navbar)
   ========================================================================== */
.header {
  position: sticky;
  top: 0;
  left: 0;
  width: 100%;
  height: var(--header-height);
  background-color: var(--color-background-alt);
  display: flex;
  align-items: center;
  z-index: 100;
}

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

.header__logo {
  font-size: var(--text-highlight);
  font-weight: 600;
  letter-spacing: -0.02em;
}

.header__nav {
  display: flex;
  gap: var(--space-m);
}

.header__nav-link {
  font-size: var(--text-normal);
  color: var(--color-black);
  padding: var(--space-s) var(--space-s);
  border-radius: 4px;
  position: relative;
}

.header__nav-link::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-grey-light);
  opacity: 0;
  border-radius: 4px;
  transition: var(--transition-hover);
  z-index: -1;
}

.header__nav-link:hover::before {
  opacity: 0.5;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  position: relative;
  width: 100%;
  height: 90vh; /* 1. Reducir altura del hero a 88vh */
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__background {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 1;
}

.hero__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: var(--color-overlay);
  z-index: 2;
}

.hero__content {
  position: relative;
  z-index: 3;
  width: 100%;
  padding-bottom: 140px; /* 1. Ajustar posición del texto (bottom 120px) */
}

.hero__title {
  color: var(--color-white);
  font-family: serif; 
  font-size: clamp(40px, 6vw, 72px); /* 1. Aumentar ligeramente a max 72px */
  max-width: 500px;
  line-height: 1.1;
  opacity: 0;
  animation: fadeUp 1s forwards ease-out 0.2s;
  letter-spacing: normal;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   Positioning Text Section
   ========================================================================== */
.positioning {
  padding-top: 80px; /* 2. Reducir separación vertical a 80px */
}

.positioning__text {
  font-size: var(--text-highlight);
  max-width: 560px;
  line-height: 1.5;
  color: var(--color-black);
}

/* ==========================================================================
   Philosophy Section
   ========================================================================== */
.philosophy {
  padding-top: 80px; /* 3. Espacio superior a 80px */
  padding-bottom: 80px; /* 3. Espacio inferior a 80px */
}

.philosophy__grid {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 60px; /* 3. Mantener separación horizontal a 60px */
}

.philosophy__text-col {
  flex: 0 0 45%;
  max-width: 45%;
  padding-top: 0; /* Se remueve para que la imagen sea la desfasada sola */
}

.philosophy__text {
  font-size: var(--text-normal);
  line-height: 1.8;
  max-width: 400px;
}

.philosophy__image-col {
  flex: 0 0 50%;
  max-width: 50%;
}

.philosophy__image-col img {
  width: 100%;
  height: auto;
  object-fit: cover;
  border-radius: 2px;
  transform: translateY(20px); /* 3. Ajuste texto-imagen (transformar 20px no más) */
}

/* ==========================================================================
   Architecture (Projects) Section
   ========================================================================== */
.architecture {
  padding-top: 40px; /* 4. Reducir espacio con filosofía a 80px */
  padding-bottom: 60px; /* 7. Reducir espacio antes del footer a 60px (reducido aún más respecto a los 80px de antes) */
}
#arquitectura {
  scroll-margin-top: 70px;
}
.architecture__header {
  margin-bottom: 40px; /* 5. Reducir espacio inferior título */
}

.architecture__title {
  font-size: 32px; /* 5. Aumentar tamaño a 32px */
  font-weight: 400;
}

/* Project Cards */
.project-card {
  display: block;
  position: relative;
  overflow: hidden;
  margin-bottom: var(--space-l);
  cursor: pointer;
}

.project-card__image-wrapper {
  position: relative;
  overflow: hidden;
  border-radius: 2px;
}

.project-card__image {
  width: 100%;
  height: auto;
  transition: transform 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.project-card__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0);
  transition: background-color 0.4s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.project-card:hover .project-card__overlay {
  background-color: var(--color-overlay);
}

.project-card__hover-text {
  color: var(--color-white);
  font-size: var(--text-highlight);
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.4s ease;
}

.project-card:hover .project-card__hover-text {
  opacity: 1;
  transform: translateY(0);
}

.project-card__info {
  margin-top: var(--space-s);
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.project-card__title {
  font-size: var(--text-normal);
  color: var(--color-grey-dark);
}

.project-card__link {
  font-size: var(--text-small);
  opacity: 0;
  transition: opacity 0.3s ease;
  display: flex;
  align-items: center;
  gap: 4px;
}

.project-card:hover .project-card__link {
  opacity: 1;
}

/* Layout for Projects */
.architecture__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px var(--space-m); /* 6. Reducir gap vertical a 40px */
}

.project-card--large {
  grid-column: 1 / -1; /* spans full width */
}

.project-card--small-left {
  grid-column: 1 / 2;
  margin-right: var(--space-m);
}

.project-card--small-right {
  grid-column: 2 / 3;
  margin-top: 40px; /* 6. Asimetría ligera: 40px de bajada */
  margin-left: var(--space-m);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  background-color: var(--color-black);
  color: var(--color-white);
  padding-top: 50px; /* 8. Reducir padding top a 60px */
  padding-bottom: 32px; /* 8. Reducir padding bottom a 40px */
}

.footer__container {
  display: flex;
  flex-direction: column;
}

.footer__brand {
  margin-bottom: 20px; /* 8. Reducir espacio entre bloques internos a 24px */
}

.footer__logo {
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 300;
  letter-spacing: 0.1em;
  line-height: 1;
  margin-bottom: 8px;
}

.footer__logo-subtitle {
  font-size: 11px;
  letter-spacing: 0.4em;
  font-weight: 300;
  color: var(--color-grey-light);
}

.footer__contact {
  display: flex;
  flex-direction: column;
  gap: 20px; /* 8. Gap vertical a 24px */
  margin-bottom: 20px; /* 8. Mismos espaciados internos */
}

.footer__contact p {
  color: var(--color-white);
  font-size: var(--text-normal);
  font-weight: 300;
}

.footer__separator {
  height: 1px;
  background-color: rgba(255, 255, 255, 0.1);
  margin: 16px 0; /* 8. Espacio antes de redes/legales de 20px */
  width: 100%;
}

.footer__bottom, .footer__links-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px; /* 8. Separaciones más compactas (gap 24px) */
}

.footer__socials, .footer__legals {
  display: flex;
  gap: var(--space-m);
  align-items: center;
}

.footer__link {
  font-size: 13px;
  color: var(--color-grey-light);
  font-weight: 300;
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer__link:hover {
  color: var(--color-white);
}

.footer__copyright {
  margin-top: 16px; /* 8. Reducir espacio antes del copyright a 20px */
  font-size: 13px;
  color: var(--color-grey-dark);
  font-weight: 300;
}

/* Social Icons simple */
.icon-instagram::before { content: ""; display: inline-block; width: 16px; height: 16px; border: 1.5px solid currentColor; border-radius: 4px; position: relative; }
.icon-linkedin::before { content: "in"; font-weight: bold; font-family: sans-serif; display: inline-block; border: 1.5px solid currentColor; padding: 0 2px; border-radius: 2px; font-size: 10px; }

/* ==========================================================================
   Mobile Menu (Hamburger Overlay)
   ========================================================================== */
.hamburger {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 32px;
  height: 24px;
  position: relative;
  z-index: 101; /* Above mobile nav */
}

.hamburger__line {
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--color-black);
  position: absolute;
  left: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

.hamburger__line:nth-child(1) { top: 6px; }
.hamburger__line:nth-child(2) { bottom: 6px; }

/* Hamburger Active State (X) */
.hamburger--active .hamburger__line:nth-child(1) {
  transform: translateY(5px) rotate(45deg);
}
.hamburger--active .hamburger__line:nth-child(2) {
  transform: translateY(-5px) rotate(-45deg);
}

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100vh;
  background-color: var(--color-white);
  z-index: 100;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-xl) var(--space-m);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s ease;
}

.mobile-nav--open {
  opacity: 1;
  pointer-events: auto;
}

.mobile-nav__menu {
  display: flex;
  flex-direction: column;
  gap: var(--space-m);
  margin-bottom: auto;
  margin-top: auto;
}

.mobile-nav__link {
  font-size: clamp(32px, 8vw, 48px);
  color: var(--color-black);
  font-weight: 300;
  letter-spacing: -0.02em;
}

.mobile-nav__footer {
  font-size: var(--text-normal);
  color: var(--color-grey-dark);
}

.no-scroll {
  overflow: hidden;
}

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

/* --- Tablet (max-width: 1024px) --- */
@media (max-width: 1024px) {
  :root {
    --space-xl: 80px;
    --space-l: 60px;
    --space-m: 30px;
  }

  .header {
    height: 70px;
  }

  .header__nav {
    display: none;
  }

  .hamburger {
    display: block;
  }

  .philosophy__grid {
    gap: 40px;
  }
}

/* --- Móvil y tablet pequeña (max-width: 768px) --- */
@media (max-width: 768px) {
  .container {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero {
    height: calc(100svh - 70px);
    min-height: 520px;
    max-height: 720px;
  }

  .hero__background {
    object-fit: cover;
    object-position: 58% center;
  }

  .hero__content {
    padding-bottom: 72px;
    max-width: 100%;
  }

.hero__title {
  font-size: clamp(36px, 9vw, 46px); /* escala fluidamente con el ancho */
  line-height: 1.05;
  max-width: 100%;           /* que ocupe todo el ancho disponible */
  white-space: normal;
  overflow-wrap: break-word;
  word-break: break-word;    /* corta si no cabe, seguro de verdad */
}

  .hero__scroll {
    right: 24px;
    bottom: 28px;
    font-size: 10px;
  }

  .positioning {
    padding-top: 64px;
  }

  .positioning__text {
    font-size: 22px;
    max-width: 100%;
  }

  .philosophy {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .philosophy__grid {
    flex-direction: column;
    gap: 40px;
  }

  .philosophy__text-col,
  .philosophy__image-col {
    max-width: 100%;
    flex-basis: 100%;
  }

  .philosophy__image-col img {
    transform: none;
  }

  .architecture {
    padding-top: 40px;
  }

  #arquitectura {
    scroll-margin-top: 70px;
  }

  .architecture__grid {
    display: flex;
    flex-direction: column;
    gap: 48px;
  }

  .project-card {
    margin-bottom: 0;
  }

  .project-card--small-left,
  .project-card--small-right {
    margin: 0;
  }

  .project-card__title {
    font-size: 18px;
  }

  .project-card__link {
    opacity: 1;
  }

  .footer {
    padding-top: 48px;
    padding-bottom: 32px;
  }

  .footer__links-row,
  .footer__bottom {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__legals,
  .footer__socials {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  .footer__legals span {
    display: none;
  }
}

/* --- Móvil pequeño (max-width: 480px) --- */
@media (max-width: 480px) {
  .hero {
    min-height: 500px;
  }

  .hero__content {
    padding-bottom: 64px;
  }

.hero__title {
  font-size: clamp(32px, 8.5vw, 40px);
  max-width: 100%;
}
}

/* --- Indicador Scroll Hero --- */
.hero__scroll {
  position: absolute;
  bottom: 40px;
  right: var(--space-m);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: rgba(255,255,255,0.7);
  text-transform: uppercase;
  z-index: 4;
  animation: fadeScroll 2s infinite;
}

@keyframes fadeScroll {
  0%, 100% {
    opacity: 0.3;
    transform: translateY(0);
  }

  50% {
    opacity: 1;
    transform: translateY(6px);
  }
}