/*
 * Diseño editorial 2026
 * El archivo fotográfico se muestra siempre completo: sin recortes, filtros,
 * giros, zooms ni animaciones aplicadas a las imágenes.
 */

:root {
  --ink: #15373b;
  --ink-deep: #0d292d;
  --ink-2: #3e5555;
  --paper: #f6f2e9;
  --paper-2: #ece5d8;
  --white: #fffdfa;
  --accent: #df643f;
  --acid: #d8df9b;
  --line: rgba(21, 55, 59, .18);
  --line-strong: rgba(21, 55, 59, .5);
  --serif: "Iowan Old Style", "Baskerville", "Palatino Linotype", Georgia, serif;
  --sans: Inter, Aptos, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page: min(1600px, calc(100vw - clamp(2.2rem, 8vw, 9rem)));
}

html {
  background: var(--ink-deep);
  scroll-padding-top: 6rem;
}

body {
  background:
    linear-gradient(90deg, transparent 0, transparent calc(100% - 1px), rgba(21, 55, 59, .035) calc(100% - 1px)) 0 0 / 8.333333% 100%,
    var(--paper);
  color: var(--ink);
  font-size: 17px;
  text-rendering: optimizeLegibility;
}

::selection {
  background: var(--acid);
  color: var(--ink-deep);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
}

.reading-progress {
  height: 4px;
  background: var(--accent);
}

/* Navegación */
.site-header {
  position: fixed;
  color: var(--ink);
  padding: 1rem clamp(1.1rem, 4vw, 4.5rem);
  border-bottom: 1px solid transparent;
  background: linear-gradient(180deg, rgba(246, 242, 233, .96), rgba(246, 242, 233, .82));
  backdrop-filter: blur(16px);
  transition: background-color .25s ease, border-color .25s ease;
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: rgba(246, 242, 233, .96);
}

.brand {
  gap: .7rem;
  font-family: var(--sans);
  font-size: .9rem;
  font-weight: 760;
  letter-spacing: -.015em;
}

.brand small {
  margin-top: .18rem;
  font-size: .55rem;
  letter-spacing: .2em;
}

.brand-mark {
  width: 2rem;
  height: 2rem;
  border: 0;
  border-radius: .25rem;
  background: var(--ink);
  color: var(--white);
  font-size: .92rem;
}

.menu-button {
  min-height: 2.7rem;
  padding: 0 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.menu-button b {
  font-size: .62rem;
}

.site-header.open {
  color: #fff;
  background: transparent;
  backdrop-filter: none;
}

.site-header.open .site-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0 clamp(1.5rem, 4vw, 5rem);
  padding: 8rem clamp(1.4rem, 6vw, 7rem) 4rem;
  background:
    radial-gradient(circle at 85% 10%, rgba(216, 223, 155, .12), transparent 28rem),
    var(--ink-deep);
}

.site-header.open .site-nav::before {
  content: "16 destinos · 25 meses · una historia familiar";
  grid-column: 1 / -1;
  margin-bottom: 2rem;
  color: var(--acid);
  font-size: .68rem;
  font-weight: 700;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.site-header.open .site-nav a {
  display: flex;
  align-items: end;
  min-height: 4.6rem;
  padding: .85rem 0;
  border-bottom-color: rgba(255, 255, 255, .2);
  font: clamp(1.25rem, 2vw, 2rem)/1 var(--serif);
}

.site-header.open .site-nav a[aria-current="page"] {
  color: var(--acid);
}

/* Portada */
.home-hero {
  width: var(--page);
  min-height: min(940px, 96svh);
  margin: 0 auto;
  padding: clamp(8.5rem, 13vh, 11rem) 0 clamp(4rem, 8vh, 7rem);
  grid-template-columns: minmax(330px, .9fr) minmax(0, 1.1fr);
  gap: clamp(2rem, 6vw, 8rem);
  background: transparent;
}

.home-hero::before {
  content: "ARCHIVO DE VIAJE / EDICIÓN DIGITAL 2026";
  position: absolute;
  top: 6.9rem;
  left: 0;
  font-size: .58rem;
  font-weight: 760;
  letter-spacing: .2em;
}

.hero-copy h1 {
  max-width: 8.2ch;
  margin: 1.1rem 0 1.6rem;
  font-size: clamp(4.6rem, 7.2vw, 8.6rem);
  line-height: .82;
  letter-spacing: -.075em;
}

.hero-copy .kicker {
  display: inline-flex;
  padding: .5rem .7rem;
  background: var(--acid);
  color: var(--ink-deep);
}

.hero-intro {
  max-width: 30rem;
  font-size: clamp(1.05rem, 1.35vw, 1.25rem);
  line-height: 1.55;
}

.primary-button {
  border-radius: 999px;
  background: var(--ink);
  color: var(--white);
}

.hero-photo-a {
  padding: clamp(.8rem, 1.4vw, 1.4rem);
  border: 1px solid var(--line);
  background: var(--white);
}

.hero-photo-a::after {
  content: "Península Valdés · Argentina";
  display: block;
  padding: .75rem .2rem 0;
  color: var(--ink-2);
  font-size: .58rem;
  font-weight: 700;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.hero-stamp {
  right: 1.3rem;
  bottom: 4.25rem;
  width: auto;
  height: auto;
  padding: .8rem 1rem;
  border: 0;
  border-radius: 0;
  background: var(--acid);
  color: var(--ink-deep);
  text-align: left;
}

.hero-stamp span {
  display: inline;
  margin-right: .15rem;
  font: 700 1rem var(--sans);
}

.intro-band {
  width: 100%;
  grid-template-columns: minmax(280px, 2.2fr) repeat(3, 1fr);
  padding: 2.5rem max(calc((100vw - var(--page)) / 2), 1.1rem);
  background: var(--ink);
  color: var(--white);
  border: 0;
}

.intro-band div {
  border-left-color: rgba(255, 255, 255, .25);
}

.intro-band span {
  color: var(--acid);
  font: clamp(2rem, 3vw, 3.4rem)/1 var(--serif);
}

.intro-band small {
  margin-top: .45rem;
  color: rgba(255, 255, 255, .65);
}

.route-section {
  width: var(--page);
  margin: 0 auto;
  padding: clamp(5rem, 10vw, 10rem) 0;
}

.section-heading {
  grid-template-columns: minmax(12rem, .7fr) 2fr;
  margin-bottom: clamp(3rem, 7vw, 7rem);
}

.section-heading > p,
.tool-label,
.search-label {
  color: var(--accent);
}

.section-heading h2 {
  max-width: 12ch;
  font-size: clamp(3.4rem, 6.5vw, 7rem);
  line-height: .9;
  letter-spacing: -.06em;
}

.destination-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1.2rem, 3vw, 3.5rem);
  align-items: start;
}

.destination-card,
.destination-card:nth-child(n) {
  grid-column: auto;
  min-height: 0;
  padding: clamp(.75rem, 1.2vw, 1.1rem);
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, .72);
}

.destination-card:nth-child(4n + 2),
.destination-card:nth-child(4n + 3) {
  margin-top: clamp(2rem, 6vw, 6rem);
}

.destination-card img {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: var(--paper-2);
}

.destination-card > div {
  padding: 1.4rem .25rem .3rem;
}

.destination-card h3 {
  font-size: clamp(2.6rem, 5vw, 5.4rem);
  letter-spacing: -.055em;
}

.destination-card small {
  margin-top: 1rem;
  padding-top: .85rem;
}

.card-number {
  top: 1.7rem;
  right: 1.7rem;
  width: auto;
  height: auto;
  padding: .4rem .55rem;
  border: 0;
  border-radius: .18rem;
  background: var(--acid);
  color: var(--ink-deep);
  font-weight: 800;
}

.family-section {
  width: 100%;
  min-height: 0;
  padding: clamp(3.5rem, 8vw, 8rem) max(calc((100vw - var(--page)) / 2), 1.1rem);
  grid-template-columns: minmax(0, 1.15fr) minmax(300px, .85fr);
  gap: clamp(3rem, 8vw, 9rem);
  background: var(--ink-deep);
}

.family-collage {
  gap: clamp(.75rem, 1.5vw, 1.5rem);
  padding: 0;
}

.family-collage img,
.family-collage img:last-child {
  width: 100%;
  height: auto;
  object-fit: contain;
  background: rgba(255, 255, 255, .05);
}

.family-collage img:last-child {
  grid-column: 1 / -1;
}

.family-copy {
  padding: 0;
}

.family-copy .kicker {
  color: var(--acid);
}

.family-copy h2 {
  font-size: clamp(3.2rem, 6vw, 6.8rem);
  line-height: .9;
}

/* Portadas de destino */
.destination-hero {
  width: 100%;
  min-height: min(880px, 92svh);
  padding-top: 4.8rem;
  grid-template-columns: minmax(330px, .78fr) minmax(0, 1.22fr);
  background: var(--paper);
}

.destination-copy {
  position: relative;
  padding: clamp(8rem, 16vh, 12rem) clamp(2rem, 5vw, 6rem) clamp(5rem, 10vh, 8rem) max(calc((100vw - var(--page)) / 2), 2rem);
  border-right: 1px solid var(--line);
}

.destination-copy::before {
  content: "DIARIO DE RUTA / 2006—2008";
  position: absolute;
  top: 7.5rem;
  left: max(calc((100vw - var(--page)) / 2), 2rem);
  color: var(--accent);
  font-size: .58rem;
  font-weight: 800;
  letter-spacing: .2em;
}

.destination-copy > p {
  color: var(--ink-2);
}

.destination-copy h1 {
  margin: .7rem 0 1.8rem;
  font-size: clamp(5rem, 9.4vw, 11rem);
  line-height: .78;
  letter-spacing: -.075em;
  overflow-wrap: anywhere;
}

.destination-stats {
  flex-wrap: wrap;
  gap: .6rem;
}

.destination-stats span {
  padding: .45rem .65rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

.destination-hero > img {
  padding: clamp(1.2rem, 3vw, 3rem);
  background: var(--paper-2);
  object-fit: contain;
}

.scroll-cue {
  left: max(calc((100vw - var(--page)) / 2), 2rem);
  bottom: 2.5rem;
  padding: .65rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
}

/* Diario */
.diary-layout {
  width: var(--page);
  max-width: none;
  grid-template-columns: minmax(220px, 280px) minmax(0, 1fr);
  gap: clamp(3rem, 8vw, 9rem);
  padding: clamp(5rem, 9vw, 9rem) 0;
}

.diary-tools {
  top: 6.5rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, .7);
  backdrop-filter: blur(10px);
}

.chapter-nav {
  margin-bottom: 2rem;
}

.chapter-nav a {
  position: relative;
  padding: .75rem 1.2rem .75rem 0;
  font-size: 1rem;
}

.chapter-nav a::after {
  content: "";
  position: absolute;
  top: 50%;
  right: .15rem;
  width: .42rem;
  height: .42rem;
  border-radius: 50%;
  background: var(--line-strong);
}

.chapter-nav a.is-active {
  color: var(--accent);
}

.chapter-nav a.is-active::after {
  background: var(--accent);
}

.diary-tools input {
  padding: .75rem 0;
  font-size: .9rem;
}

.chapter {
  scroll-margin-top: 7rem;
}

.chapter + .chapter {
  margin-top: clamp(8rem, 15vw, 15rem);
}

.chapter-heading {
  display: block;
  padding-bottom: clamp(2rem, 4vw, 4rem);
  border-bottom: 2px solid var(--ink);
}

.chapter-heading span {
  display: inline-flex;
  margin-bottom: 1rem;
  padding: .4rem .65rem;
  background: var(--ink);
  color: var(--white);
  font-weight: 750;
}

.chapter-heading h2 {
  max-width: 10ch;
  font-size: clamp(4rem, 8vw, 8.5rem);
  line-height: .82;
  letter-spacing: -.07em;
}

.chapter-intro {
  max-width: 62ch;
  margin: 2.5rem 0 0;
  font: 1.12rem/1.75 var(--serif);
}

.day-entry {
  display: block;
  padding: clamp(4rem, 8vw, 8rem) 0;
  border-bottom: 0;
  border-top: 1px solid var(--line);
  scroll-margin-top: 7rem;
}

.chapter-heading + .day-entry {
  border-top: 0;
}

/* Los antiguos números circulares de cada día desaparecen: la fecha es el título. */
.day-rail {
  display: none !important;
}

.day-content {
  width: 100%;
}

.diary-paragraph {
  max-width: 68ch;
  margin: 0 0 1.25rem;
  color: #294346;
  font: clamp(1.06rem, 1.35vw, 1.22rem)/1.82 var(--serif);
}

.day-content > .diary-paragraph:first-child > strong,
.day-content > .diary-paragraph:first-child > b {
  display: inline;
  margin: 0;
  color: var(--ink);
  font: 760 clamp(1.6rem, 3.4vw, 3.35rem)/1.05 var(--sans);
  letter-spacing: -.045em;
}

.day-content > .diary-paragraph:first-child > br:first-of-type {
  display: block;
  margin: 1.25rem 0 0;
  content: "";
}

.day-content > .diary-paragraph:first-child::before {
  content: none;
  display: none;
}

.photo-grid {
  width: 100%;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 2.4vw, 2.5rem);
  margin-top: clamp(2.5rem, 5vw, 5rem);
}

.photo {
  min-height: 0;
  height: auto;
  padding: clamp(.45rem, .8vw, .7rem);
  border: 1px solid var(--line);
  background: rgba(255, 253, 250, .78);
  cursor: zoom-in;
}

.photo img,
.photo:hover img,
.home-hero img,
.destination-card img,
.destination-hero img,
.family-collage img {
  width: 100%;
  height: auto;
  min-height: 0;
  object-fit: contain;
  filter: none !important;
  transform: none !important;
  transition: none !important;
}

.photo-grid.count-1 .photo,
.photo-grid.count-3 .photo:first-child,
.photo-grid.count-5 .photo:first-child {
  grid-column: 1 / -1;
  height: auto;
}

.photo-grid.count-3 .photo:first-child img,
.photo-grid.count-5 .photo:first-child img {
  min-height: 0;
}

.journey-pagination {
  border-color: var(--line);
  background: var(--white);
}

.journey-pagination a {
  position: relative;
  min-height: 13rem;
  justify-content: center;
}

.journey-pagination a:last-child {
  border-left-color: var(--line);
}

.journey-pagination small {
  color: var(--accent);
  font-weight: 800;
}

.journey-pagination span {
  font-size: clamp(2rem, 4vw, 4.5rem);
  letter-spacing: -.045em;
}

.back-to-top {
  position: fixed;
  z-index: 20;
  right: clamp(1rem, 2vw, 2rem);
  bottom: clamp(1rem, 2vw, 2rem);
  display: flex;
  align-items: center;
  gap: .55rem;
  padding: .7rem .9rem;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  background: var(--ink-deep);
  color: var(--white);
  font: 750 .58rem/1 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  translate: 0 .5rem;
  transition: opacity .2s ease, translate .2s ease;
}

.back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  translate: 0;
}

.site-footer {
  padding: 2.5rem max(calc((100vw - var(--page)) / 2), 1.1rem);
  background: var(--ink-deep);
  color: rgba(255, 255, 255, .64);
}

.lightbox {
  width: min(96vw, 1600px);
  height: 94svh;
  background: var(--ink-deep);
}

.lightbox::backdrop {
  background: rgba(5, 18, 20, .96);
  backdrop-filter: none;
}

@media (max-width: 1100px) {
  .site-header.open .site-nav {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .diary-layout {
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 3.5rem;
  }
}

@media (max-width: 900px) {
  :root {
    --page: calc(100vw - 2.4rem);
  }

  .home-hero {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .home-hero::before {
    top: 6.7rem;
  }

  .hero-photo-a {
    grid-row: 2;
  }

  .intro-band {
    grid-template-columns: repeat(3, 1fr);
  }

  .intro-band > p {
    grid-column: 1 / -1;
  }

  .destination-hero {
    grid-template-columns: 1fr;
  }

  .destination-copy {
    padding: 10rem 1.2rem 4rem;
    border-right: 0;
  }

  .destination-copy::before {
    top: 7.4rem;
    left: 1.2rem;
  }

  .destination-hero > img {
    max-height: none;
  }

  .diary-layout {
    grid-template-columns: 1fr;
  }

  .diary-tools {
    position: static;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .7rem 1.5rem;
  }

  .diary-tools .tool-label,
  .diary-tools .chapter-nav {
    grid-column: 1;
  }

  .diary-tools .search-label,
  .diary-tools input,
  .diary-tools .search-result {
    grid-column: 2;
  }
}

@media (max-width: 620px) {
  :root {
    --page: calc(100vw - 2rem);
  }

  body {
    font-size: 16px;
    background: var(--paper);
  }

  .site-header {
    padding: .8rem 1rem;
  }

  .brand-mark {
    display: none;
  }

  .menu-button {
    padding: 0 .8rem;
  }

  .site-header.open .site-nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 6.5rem 1rem 2rem;
  }

  .site-header.open .site-nav::before {
    margin-bottom: .6rem;
    font-size: .54rem;
  }

  .site-header.open .site-nav a {
    min-height: 3.5rem;
    font-size: 1.12rem;
  }

  .home-hero {
    padding: 7.5rem 0 3rem;
  }

  .home-hero::before {
    top: 5.7rem;
    font-size: .5rem;
  }

  .hero-copy h1 {
    font-size: clamp(3.85rem, 19vw, 5.5rem);
  }

  .hero-photo-a {
    padding: .65rem;
  }

  .intro-band {
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem 1rem;
    padding: 2.2rem 1rem;
  }

  .intro-band div:last-child {
    grid-column: 1 / -1;
  }

  .section-heading {
    grid-template-columns: 1fr;
  }

  .section-heading h2 {
    font-size: clamp(3.35rem, 16vw, 5rem);
  }

  .destination-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .destination-card,
  .destination-card:nth-child(n) {
    margin: 0;
  }

  .destination-card h3 {
    font-size: clamp(2.8rem, 15vw, 4.3rem);
  }

  .family-section {
    grid-template-columns: 1fr;
  }

  .family-collage {
    grid-template-columns: 1fr 1fr;
  }

  .family-copy h2 {
    font-size: clamp(3.4rem, 16vw, 5.4rem);
  }

  .destination-hero {
    min-height: 0;
    padding-top: 4.3rem;
  }

  .destination-copy {
    padding: 8.4rem 1rem 3rem;
  }

  .destination-copy::before {
    top: 6.4rem;
    left: 1rem;
  }

  .destination-copy h1 {
    font-size: clamp(4.2rem, 21vw, 6.8rem);
  }

  .destination-hero > img {
    padding: .7rem;
  }

  .diary-layout {
    padding: 4rem 0;
  }

  .diary-tools {
    display: block;
  }

  .chapter-heading h2 {
    font-size: clamp(3.5rem, 18vw, 5.5rem);
  }

  .day-entry {
    padding: 4.5rem 0;
  }

  .day-content > .diary-paragraph:first-child > strong,
  .day-content > .diary-paragraph:first-child > b {
    font-size: clamp(1.55rem, 8vw, 2.25rem);
  }

  .diary-paragraph {
    font-size: 1.04rem;
    line-height: 1.75;
  }

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

  .photo-grid .photo,
  .photo-grid.count-3 .photo:first-child,
  .photo-grid.count-5 .photo:first-child {
    grid-column: 1;
  }

  .journey-pagination a {
    min-height: 9rem;
  }

  .back-to-top {
    right: .75rem;
    bottom: .75rem;
  }

  .back-to-top span {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .site-header,
  .back-to-top {
    transition: none;
  }
}
