:root {
  --ink: #172238;
  --deep: #101a2c;
  --paper: #f4f3ef;
  --white: #fff;
  --line: #d8d9dd;
  --muted: #505a6c;
  --page-gutter: clamp(1.25rem, 5vw, 6rem);
  --editorial-ease: cubic-bezier(.22, 1, .36, 1);
}

body { background: var(--paper); color: var(--ink); }
html { scroll-padding-top: 93px; }
.reading-progress { background: #8693a9; }
#header, #header.scrolled {
  position: sticky;
  top: 0;
  height: 86px;
  padding-inline: var(--page-gutter);
  background: #f4f3effa;
  color: var(--ink);
  border-bottom: 1px solid #17223821;
}
#header.scrolled { box-shadow: 0 3px 24px #101a2c0d; }
#header .brand-logo img.logo-on-dark { display: none; }
#header .brand-logo img.logo-on-light {
  display: block;
  filter: brightness(0) saturate(100%) invert(11%) sepia(28%) saturate(1049%) hue-rotate(184deg) brightness(94%) contrast(94%);
}
footer .footer-logo { filter: brightness(0) invert(1); }
#header .brand-logo img.header-logo { width: 115px !important; }
#header #nav { gap: clamp(18px, 2vw, 36px); }
#header .nav-cta {
  color: var(--white);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 0;
}
#header .nav-cta:hover { color: var(--ink); background: transparent; }
#header .menu-toggle { color: var(--ink); }

.editorial-hero.hero {
  min-height: 0;
  max-height: none;
  height: auto;
  display: grid;
  grid-template-columns: minmax(0, .84fr) minmax(0, 1.16fr);
  gap: clamp(1.25rem, 3vw, 3.5rem);
  align-items: stretch;
  padding: clamp(1.25rem, 3vw, 3.25rem) var(--page-gutter) clamp(2rem, 4.5vw, 5rem);
  background: var(--paper);
  color: var(--ink);
}
.cover-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  padding-block: clamp(2rem, 6vw, 7rem);
}
.cover-kicker, .section-kicker {
  margin: 0 0 1.25rem;
  font-size: .73rem;
  font-weight: 700;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.cover-kicker { display: flex; align-items: center; gap: .85rem; color: var(--muted); }
.cover-kicker::before { content: ''; width: 1.8rem; height: 1px; background: currentColor; }
.editorial-hero.hero h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  font-size: clamp(3.1rem, 6.6vw, 8.1rem);
  line-height: .94;
  letter-spacing: -.072em;
  margin: 0;
  max-width: 9em;
}
.editorial-hero.hero h1 em { color: var(--ink); }
.cover-lead { max-width: 33ch; margin: clamp(1.35rem, 2.4vw, 2.4rem) 0; color: var(--muted); font-size: clamp(1rem, 1.34vw, 1.22rem); }
.cover-links { display: flex; align-items: center; flex-wrap: wrap; gap: .8rem 1.25rem; }
.cover-primary,
.cover-secondary {
  min-height: 47px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .75rem 1rem;
  border: 1px solid transparent;
  font-size: .84rem;
  font-weight: 700;
  transition: background .25s ease, color .25s ease;
}
.cover-primary { background: var(--ink); color: var(--white); border-color: var(--ink); }
.cover-primary:hover { background: var(--white); color: var(--ink); }
.cover-secondary { padding-inline: 0; border-bottom-color: var(--ink); }
.cover-secondary:hover { color: var(--muted); }
.cover-figure { margin: 0; position: relative; display: grid; grid-template-rows: 1fr auto; min-height: 0; }
.cover-media { position: relative; min-height: clamp(460px, 43vw, 780px); overflow: hidden; background: #dce1e8; }
.cover-photo {
  position: absolute;
  width: 100%;
  height: calc(100% + 70px);
  inset: -70px 0 0;
  object-fit: cover;
  object-position: 52% center;
  transform: translateY(var(--cover-drift, 0px));
}
.cover-project {
  position: absolute;
  right: .9rem;
  bottom: .9rem;
  background: var(--white);
  color: var(--ink);
  padding: .8rem 1rem;
  font-weight: 700;
  font-size: .78rem;
}
.cover-project:hover { background: var(--ink); color: var(--white); }
.cover-project span { margin-inline-start: .7em; }
.cover-figure figcaption {
  display: flex;
  gap: .7rem;
  justify-content: space-between;
  padding-top: .65rem;
  font-size: .78rem;
  color: var(--muted);
}
.cover-figure figcaption strong { color: var(--ink); font-weight: 700; }

.section { padding-inline: var(--page-gutter); }
.editorial-intro {
  display: grid;
  grid-template-columns: 1.3fr .7fr;
  align-items: end;
  gap: clamp(2rem, 8vw, 10rem);
  padding-block: clamp(3rem, 6vw, 7rem);
  border-top: 1px solid var(--line);
  background: var(--white);
}
.editorial-intro h2, .collection-heading h2, .projects h2, .process h2 { letter-spacing: -.059em; }
.editorial-intro h2 { max-width: 14ch; margin: 0; }
.editorial-intro h2 em, .collection-heading h2 em { color: var(--muted); }
.editorial-intro .intro-copy .lead { margin-top: 0; font-size: clamp(1.05rem, 1.5vw, 1.32rem); }
#tu-proyecto.contact {
  background: #e7e9ee;
  color: var(--ink);
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(2rem, 7vw, 8rem);
  align-items: start;
}
#tu-proyecto .contact-intro { padding-top: clamp(.35rem, 2vw, 2rem); }
#tu-proyecto .contact-intro h2,
#tu-proyecto .contact-intro h2 em,
#tu-proyecto .contact-intro p,
#tu-proyecto .contact-details a { color: var(--ink); }
#tu-proyecto .contact-details { border-color: #17223830; }
#project-form { background: var(--deep); color: var(--white); padding: clamp(1.1rem, 3vw, 3rem); box-shadow: 0 18px 50px #101a2c17; }
#project-form :is(.field-hint, .form-hint, small) { color: #d4dae7; }
#project-form :is(.privacy-summary em, .privacy-summary strong, .privacy-summary a, .consent a) { color: #e4e9f2; }

#proceso.process {
  position: relative;
  background: var(--deep);
  color: var(--white);
  gap: clamp(2.5rem, 8vw, 9rem);
  padding-block: clamp(5rem, 9vw, 11rem);
}
#proceso .process-aside { top: 110px; }
#proceso .process-aside :is(p,h2,em), #proceso .step h3 { color: var(--white); }
#proceso .process-aside .section-kicker, #proceso .step > span { color: #b1bed4; }
#proceso .process-photo { aspect-ratio: 16 / 9; height: auto; }
#proceso .process-photo img, .project-image img { transition: transform .8s var(--editorial-ease); }
#proceso .step { border-color: #ffffff34; padding-block: clamp(1.8rem, 3.3vw, 4rem); transition: background .45s, border-color .45s; }
#proceso .step p { color: #d9dce2; }
#proceso .step.is-current { border-top-color: #b1bed4; background: #ffffff08; }

.editorial-collection { background: var(--white); }
.collection-heading { display: flex; justify-content: space-between; align-items: end; gap: 2rem; margin-bottom: 2rem; }
.collection-heading h2 { margin: 0; }
.collection-heading > p { max-width: 32ch; color: var(--muted); margin: 0; }
.collection-choices { display: flex; flex-wrap: wrap; gap: .5rem; padding-bottom: .8rem; }
.collection-choices[hidden] { display: none; }
.collection-choices button {
  min-height: 44px;
  padding: .6rem 1rem;
  background: transparent;
  border: 1px solid var(--line);
  cursor: pointer;
  color: var(--ink);
}
.collection-choices button:hover { border-color: var(--ink); }
.collection-choices button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.collection-panel { display: grid; grid-template-columns: 1.55fr .75fr; min-height: clamp(320px, 34vw, 610px); background: var(--paper); }
.collection-media { position: relative; overflow: hidden; min-height: 0; background: #e0e4ea; }
.collection-media img { width: 100%; height: 100%; position: absolute; object-fit: cover; }
.collection-detail { display: flex; align-items: flex-start; flex-direction: column; justify-content: space-between; gap: 2rem; padding: clamp(1.35rem, 3.35vw, 4.3rem); }
.collection-detail h3 { font: 400 clamp(2rem, 3.1vw, 4rem)/1.03 Georgia, serif; letter-spacing: -.045em; margin: .5rem 0 1rem; }
.collection-detail p:not(.section-kicker) { color: var(--muted); max-width: 28ch; }

.projects { background: var(--paper); }
.projects .section-heading { margin-bottom: 1.8rem; }
.projects .project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 5rem); align-items: start; }
.projects .project-image { background: #e1e4e9; width: 100%; aspect-ratio: 4 / 3; }
.projects .project-meta { border-top-color: var(--line); }
.project-meta h3 { color: var(--ink); }
.location-opportunities { background-color: #edf0f4; }
.visit { background: var(--white); }

@media (hover: hover) {
  .project-image:hover img, .process-photo:hover img { transform: scale(1.04); }
}
@media (max-width: 1000px) {
  .editorial-hero.hero h1 { font-size: clamp(3rem, 7.8vw, 5.6rem); }
  #header #nav { gap: 1rem; }
  #header .nav-cta { padding-inline: .7rem; }
}
@media (max-width: 850px) {
  #header #nav {
    position: absolute;
    display: none;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    top: 86px;
    padding: 1.25rem var(--page-gutter);
    background: var(--paper);
    color: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  #header .menu-toggle { display: flex; align-items: center; gap: .65rem; }
  #header #nav.open { display: flex; }
}
@media (max-width: 760px) {
  html { scroll-padding-top: 77px; }
  #header, #header.scrolled { height: 72px; }
  #header #nav { top: 72px; }
  #header .brand-logo img.header-logo { width: 105px !important; }
  .editorial-hero.hero { grid-template-columns: 1fr; gap: 1rem; padding-top: .8rem; }
  .editorial-hero.hero h1 { font-size: clamp(3.4rem, 11.5vw, 5.75rem); }
  .cover-copy { padding-block: 1.8rem 1rem; }
  .cover-lead { margin: 1.25rem 0 1.4rem; }
  .cover-media { min-height: clamp(265px, 68vw, 490px); }
  .cover-photo { height: 100%; inset: 0; transform: none; object-position: 54% center; }
  .cover-figure figcaption { font-size: .69rem; }
  .editorial-intro, #tu-proyecto.contact, #proceso.process,
  .collection-panel, .projects .project-grid { grid-template-columns: minmax(0, 1fr); }
  .editorial-intro { gap: 1.3rem; }
  #proceso .process-aside { position: static; }
  .collection-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .collection-media { min-height: clamp(240px, 60vw, 430px); }
}
@media (prefers-reduced-motion: no-preference) {
  .cover-copy > * { animation: cover-arrive .8s var(--editorial-ease) both; }
  .cover-copy > :nth-child(2) { animation-delay: .08s; }
  .cover-copy > :nth-child(3) { animation-delay: .15s; }
  .cover-copy > :nth-child(4) { animation-delay: .22s; }
  @keyframes cover-arrive {
    from { opacity: 0; translate: 0 18px; }
    to { opacity: 1; translate: 0 0; }
  }
}
@media (prefers-reduced-motion: reduce) {
  .cover-photo, .project-image img, .process-photo img { transform: none !important; }
  #proceso .step { transition: none; }
}
