/* ─── Variables ─────────────────────────────────────────────────────────────── */
:root {
  --bg:          #F6F5F2;
  --bg-alt:      #EDECEA;
  --ink:         #1C1B18;
  --mid:         #6E6D69;
  --rule:        #CCCBC7;
  --font-serif:  'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:   'Inter', system-ui, -apple-system, sans-serif;
  --max-w:       1100px;
  --nav-h:       72px;
}

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

html {
  scroll-behavior: smooth;
  font-size: 16px;
  scroll-padding-top: var(--nav-h);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

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

ul {
  list-style: none;
}

/* ─── Container ─────────────────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
}

/* ─── Navegación ────────────────────────────────────────────────────────────── */
#nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--nav-h);
  background: var(--bg);
  transition: box-shadow 0.3s ease;
}

#nav.scrolled {
  box-shadow: 0 1px 0 var(--rule);
}

.nav__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav__logo img {
  height: 38px;
  width: auto;
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2.75rem;
}

.nav__links a {
  font-size: 0.695rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  transition: color 0.2s;
}

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

.nav__toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}

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

.nav__toggle.is-open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav__toggle.is-open span:nth-child(2) { opacity: 0; }
.nav__toggle.is-open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* ─── Hero ──────────────────────────────────────────────────────────────────── */
#inicio {
  padding-top: var(--nav-h);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

.hero__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2.5rem 4rem;
}

.hero__logo {
  height: 88px;
  width: auto;
  margin: 0 auto 2.25rem;
}

.hero__label {
  font-family: var(--font-sans);
  font-size: 0.685rem;
  font-weight: 500;
  letter-spacing: 0.20em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.75rem;
}

.hero__tagline {
  font-family: var(--font-serif);
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 400;
  line-height: 1.45;
  max-width: 660px;
  color: var(--ink);
}

.hero__croquis {
  width: 100%;
  max-height: 360px;
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
}

.hero__croquis img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
}

.hero__croquis::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 100px;
  background: linear-gradient(to bottom, transparent, var(--bg));
  pointer-events: none;
}

/* ─── Sección base ──────────────────────────────────────────────────────────── */
section {
  padding: 7rem 0;
}

.section__header {
  margin-bottom: 3.5rem;
}

.section__label {
  display: block;
  font-size: 0.675rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.8rem;
}

.section__title {
  font-family: var(--font-serif);
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  font-weight: 400;
  line-height: 1.35;
  color: var(--ink);
}

.section__intro {
  color: var(--mid);
  font-size: 0.925rem;
  margin-top: 0.8rem;
  max-width: 520px;
  line-height: 1.7;
}

/* ─── Historia ──────────────────────────────────────────────────────────────── */
#historia .container {
  display: grid;
  grid-template-columns: 3fr 2fr;
  gap: 5.5rem;
  align-items: center;
}

.historia__body p {
  font-size: 0.965rem;
  line-height: 1.85;
  color: var(--ink);
  margin-bottom: 1.35rem;
}

.historia__body p:last-child {
  margin-bottom: 0;
}

.historia__collage {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3px;
  align-self: start;
}

.historia__collage img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  display: block;
}

/* ─── Activos ───────────────────────────────────────────────────────────────── */
#activos {
  background: var(--bg-alt);
}

#activos .section__header {
  text-align: center;
}

#activos .section__intro {
  margin: 0.8rem auto 0;
  text-align: center;
}

/* 6-column grid: primera fila 3 tarjetas (span 2 cada una),
   segunda fila 2 tarjetas centradas (columnas 2-3 y 4-5) */
.activos__grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 3rem 2.75rem;
}

.activo__card {
  grid-column: span 2;
}

.activo__card__image {
  width: 100%;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  margin-bottom: 1.1rem;
  background: var(--rule);
}

.activo__card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.5s ease;
}

.activo__card:hover .activo__card__image img {
  transform: scale(1.025);
}

.activo__card__name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.activo__card__desc {
  font-size: 0.875rem;
  color: var(--mid);
  line-height: 1.65;
}

/* ─── Propósito ─────────────────────────────────────────────────────────────── */
#proposito .section__header {
  text-align: center;
  margin-bottom: 0;
}

.proposito__grid {
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 3.5rem;
  margin-top: 4rem;
  align-items: start;
}

.proposito__divider {
  background: var(--rule);
  align-self: stretch;
}

.proposito__block__label {
  display: block;
  font-size: 0.675rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 1.1rem;
}

.proposito__block p {
  font-size: 0.965rem;
  line-height: 1.85;
  color: var(--ink);
}

/* ─── Contacto ──────────────────────────────────────────────────────────────── */
#contacto .section__header {
  text-align: center;
}

#contacto .section__intro {
  margin: 0.8rem auto 0;
  text-align: center;
}

.contact__form {
  max-width: 580px;
  margin: 3.5rem auto 0;
}

.form__field {
  margin-bottom: 2rem;
}

.form__field label {
  display: block;
  font-size: 0.675rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 0.6rem;
}

.form__field input,
.form__field textarea {
  width: 100%;
  border: none;
  border-bottom: 1px solid var(--rule);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 0.955rem;
  padding: 0.5rem 0;
  outline: none;
  border-radius: 0;
  -webkit-appearance: none;
  transition: border-color 0.2s;
}

.form__field input:focus,
.form__field textarea:focus {
  border-color: var(--ink);
}

.form__field textarea {
  resize: vertical;
  min-height: 120px;
  line-height: 1.7;
}

.form__submit {
  display: block;
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem 2rem;
  background: var(--ink);
  color: var(--bg);
  border: none;
  font-family: var(--font-sans);
  font-size: 0.695rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s;
}

.form__submit:hover {
  background: #36352F;
}

.form__feedback {
  display: none;
  text-align: center;
  font-size: 0.88rem;
  color: var(--mid);
  margin-top: 1.25rem;
  font-style: italic;
}

/* ─── Pie de página ─────────────────────────────────────────────────────────── */
footer {
  background: var(--ink);
  padding: 2.25rem 0;
}

.footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 2.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer__copy {
  font-size: 0.76rem;
  color: rgba(246, 245, 242, 0.45);
  line-height: 1.5;
}

.footer__synapsa {
  font-size: 0.76rem;
  color: rgba(246, 245, 242, 0.45);
  text-align: right;
  line-height: 1.6;
}

.footer__synapsa strong {
  color: rgba(246, 245, 242, 0.75);
  font-weight: 500;
}

.footer__synapsa a {
  color: rgba(246, 245, 242, 0.45);
  transition: color 0.2s;
}

.footer__synapsa a:hover {
  color: rgba(246, 245, 242, 0.8);
}

/* ─── Responsive ────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .nav__links {
    display: none;
    flex-direction: column;
    align-items: flex-start;
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--bg);
    padding: 1.75rem 2.5rem 2rem;
    border-top: 1px solid var(--rule);
    gap: 0;
    box-shadow: 0 8px 24px rgba(28, 27, 24, 0.07);
  }

  .nav__links li {
    width: 100%;
    border-bottom: 1px solid var(--rule);
  }

  .nav__links li:last-child {
    border-bottom: none;
  }

  .nav__links a {
    display: block;
    font-size: 0.82rem;
    padding: 1rem 0;
  }

  .nav__links.is-open {
    display: flex;
  }

  .nav__toggle {
    display: flex;
  }

  section {
    padding: 4.5rem 0;
  }

  .section__header {
    margin-bottom: 2.5rem;
  }

  .hero__content {
    padding: 3.5rem 1.5rem 3rem;
  }

  .hero__logo {
    height: 72px;
  }

  .hero__croquis {
    max-height: 240px;
  }

  #historia .container {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .historia__collage {
    order: -1;
  }

  .activos__grid {
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
  }

  .activo__card {
    grid-column: span 1;
  }

  .proposito__grid {
    grid-template-columns: 1fr;
    gap: 2.75rem;
  }

  .proposito__divider {
    display: none;
  }

  .footer__inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .footer__synapsa {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .container {
    padding: 0 1.25rem;
  }

  .nav__inner {
    padding: 0 1.25rem;
  }

  .nav__links {
    padding: 0.5rem 1.25rem 1rem;
  }

  .footer__inner {
    padding: 0 1.25rem;
  }

  section {
    padding: 3.5rem 0;
  }

  .section__header {
    margin-bottom: 2rem;
  }

  .hero__content {
    padding: 2.5rem 1.25rem 2.5rem;
  }

  .hero__logo {
    height: 60px;
    margin-bottom: 1.75rem;
  }

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

  .activo__card {
    grid-column: span 1;
  }
}
