/* Refinement layer — editorial continuity across secondary pages. */
:root {
  --almagra: #b5472d;
  --ink: #17292b;
  --paper: #f4f0e7;
  --paper-deep: #e7e4d8;
  --line: #c8c1b4;
}

body {
  background: var(--paper);
  scroll-padding-top: 86px;
}

.site-header {
  box-shadow: 0 7px 18px rgba(23, 41, 43, 0.035);
}

main {
  position: relative;
  overflow: clip;
}

.page-context {
  color: #6a7771;
  border-bottom: 1px solid rgba(23, 41, 43, 0.12);
  align-items: center;
  gap: 8px;
  min-height: 43px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  display: flex;
}

.page-context a {
  color: var(--ink);
  transition: color 160ms cubic-bezier(0.23, 1, 0.32, 1);
}

.page-context a:hover,
.page-context a:focus-visible {
  color: var(--almagra);
}

.page-context__slash {
  color: var(--almagra);
  font-size: 13px;
  font-weight: 400;
}

.page-context__current {
  color: #63706b;
}

/* Shared editorial entry: spacious without becoming a disconnected billboard. */
.page-hero,
.directory-hero {
  position: relative;
  isolation: isolate;
}

.page-hero {
  padding: 82px 0 68px;
}

.page-hero::after,
.directory-hero::after {
  content: "";
  pointer-events: none;
  z-index: -1;
  border: 1px solid rgba(181, 71, 45, 0.17);
  width: 168px;
  height: 168px;
  position: absolute;
  right: max(4vw, 42px);
  bottom: -84px;
  transform: rotate(45deg);
}

.page-hero h1 {
  max-width: 930px;
  margin-bottom: 17px;
}

.page-hero--paper {
  background-color: #f0ede5;
  background-image:
    linear-gradient(90deg, rgba(181, 71, 45, 0.11) 1px, transparent 1px),
    linear-gradient(rgba(181, 71, 45, 0.11) 1px, transparent 1px),
    radial-gradient(circle at 86% 12%, rgba(181, 71, 45, 0.09), transparent 25%);
  background-size:
    27px 27px,
    27px 27px,
    auto;
}

.page-hero--paper::after {
  border-color: rgba(23, 41, 43, 0.13);
}

.page-hero--route {
  min-height: 485px;
  align-items: center;
  padding: 72px 0;
  display: grid;
}

.page-hero--route::after {
  opacity: 0.65;
  border-color: rgba(233, 201, 168, 0.32);
}

.page-hero--journal {
  min-height: 445px;
  align-items: center;
  padding: 64px 0;
  display: grid;
}

.page-hero--journal::after {
  border-color: rgba(23, 41, 43, 0.14);
  right: 42%;
}

.page-hero--journal .page-width {
  padding-right: min(42%, 520px);
}

/* Content begins while the section identity is still perceptible. */
.explore-content {
  padding-top: 58px;
}

.explore-main__top {
  border-bottom: 1px solid rgba(23, 41, 43, 0.12);
  padding-bottom: 13px;
}

.filter-rail {
  padding-top: 2px;
}

.place-card,
.route-card,
.article-card {
  border: 1px solid rgba(23, 41, 43, 0.045);
  box-shadow: 0 9px 22px rgba(23, 41, 43, 0.025);
}

.place-card:hover,
.route-card:hover,
.article-card:hover {
  box-shadow: 0 18px 35px rgba(23, 41, 43, 0.11);
}

.page-hero--route + .section-block,
.page-hero--journal + .cuaderno-content {
  padding-top: 82px;
}

/* A single rhythm for composition-led pages. */
.restore-hero {
  min-height: 535px;
  position: relative;
}

.restore-hero__image {
  overflow: hidden;
}

.restore-hero__image img {
  min-height: 535px;
  transition: transform 700ms cubic-bezier(0.23, 1, 0.32, 1);
}

.restore-hero:hover .restore-hero__image img {
  transform: scale(1.018);
}

.restore-hero__copy {
  padding-top: 68px;
  padding-bottom: 68px;
}

.restore-principles {
  padding-top: 78px;
  padding-bottom: 86px;
}

.restore-guide {
  position: relative;
  overflow: clip;
}

.restore-guide::before {
  content: "";
  opacity: 0.38;
  border: 1px solid rgba(233, 201, 168, 0.36);
  width: 310px;
  height: 310px;
  position: absolute;
  top: -190px;
  right: 7vw;
  transform: rotate(45deg);
}

.directory-hero {
  padding-top: 80px;
  padding-bottom: 72px;
}

.directory-hero .page-width {
  min-height: 310px;
}

.directory-hero p {
  border-left: 1px solid rgba(233, 201, 168, 0.5);
  padding-left: 22px;
}

.directory-content {
  padding-top: 78px;
  padding-bottom: 84px;
}

.directory-entry {
  transition:
    padding 180ms cubic-bezier(0.23, 1, 0.32, 1),
    background 180ms cubic-bezier(0.23, 1, 0.32, 1),
    color 180ms cubic-bezier(0.23, 1, 0.32, 1);
}

.detail-hero {
  height: 455px;
}

.detail-layout {
  padding-top: 74px;
}

.article-detail__header {
  margin-top: 74px;
}

.article-detail__cover {
  box-shadow: 0 18px 40px rgba(23, 41, 43, 0.08);
}

.sale-hero {
  min-height: 515px;
}

.sale-hero .page-width {
  padding-top: 60px;
  padding-bottom: 60px;
}

.sale-intro {
  padding-top: 78px;
  padding-bottom: 78px;
}

.legal-page__header {
  padding-top: 64px;
  padding-bottom: 42px;
}

@media (max-width: 900px) {
  .page-context {
    min-height: 39px;
  }

  .page-hero {
    padding-top: 64px;
    padding-bottom: 56px;
  }

  .page-hero--route {
    min-height: 465px;
    padding-top: 62px;
    padding-bottom: 58px;
  }

  .page-hero--journal {
    min-height: 390px;
  }

  .page-hero--journal .page-width {
    padding-right: min(39%, 300px);
  }

  .explore-content,
  .page-hero--route + .section-block,
  .page-hero--journal + .cuaderno-content,
  .directory-content,
  .restore-principles {
    padding-top: 64px;
  }

  .restore-hero,
  .restore-hero__image img {
    min-height: 0;
  }

  .restore-hero__copy {
    padding-top: 58px;
    padding-bottom: 60px;
  }

  .directory-hero {
    padding-top: 65px;
    padding-bottom: 60px;
  }

  .directory-hero .page-width {
    min-height: 0;
  }

  .detail-hero {
    height: 425px;
  }

  .detail-layout {
    padding-top: 60px;
  }
}

@media (max-width: 580px) {
  body {
    scroll-padding-top: 72px;
  }

  .page-context {
    gap: 6px;
    min-height: 35px;
    font-size: 8px;
  }

  .page-context__slash {
    font-size: 11px;
  }

  .page-hero {
    padding-top: 50px;
    padding-bottom: 43px;
  }

  .page-hero h1 {
    margin-top: 12px;
    margin-bottom: 14px;
    font-size: clamp(47px, 14vw, 59px);
  }

  .page-hero p {
    font-size: 14px;
  }

  .page-hero::after,
  .directory-hero::after {
    width: 92px;
    height: 92px;
    right: 20px;
    bottom: -47px;
  }

  .page-hero--paper {
    background-size:
      25px 25px,
      25px 25px,
      auto;
  }

  .page-hero--route {
    min-height: 492px;
    padding-top: 50px;
    padding-bottom: 44px;
  }

  .page-hero--route h1 {
    font-size: clamp(45px, 13.6vw, 55px);
  }

  .hero-inline-meta {
    gap: 12px;
    margin-top: 23px;
    font-size: 9px;
  }

  .hero-inline-meta span {
    align-items: flex-start;
  }

  .atlas-trace {
    margin-top: 25px;
  }

  .page-hero--journal {
    min-height: 0;
    background-color: #e9e2d3;
    background-image:
      linear-gradient(
        90deg,
        #e9e2d3 0%,
        rgba(233, 226, 211, 0.93) 56%,
        rgba(233, 226, 211, 0.55) 100%
      ),
      url(../img/alquerias-cuaderno_84423173.jpg);
    background-position:
      0 0,
      right center;
    background-size:
      100% 100%,
      auto 100%;
    background-repeat: no-repeat;
  }

  .page-hero--journal .page-width {
    padding-right: 18px;
  }

  .explore-content,
  .page-hero--route + .section-block,
  .page-hero--journal + .cuaderno-content,
  .directory-content,
  .restore-principles {
    padding-top: 52px;
  }

  .explore-content {
    padding-bottom: 76px;
  }

  .explore-tools {
    margin-top: 23px;
  }

  .restore-hero__image img {
    height: 242px;
    min-height: 242px;
  }

  .restore-hero__copy {
    padding-top: 43px;
    padding-bottom: 49px;
  }

  .restore-hero__copy h1 {
    font-size: clamp(43px, 12.5vw, 54px);
  }

  .directory-hero {
    padding-top: 56px;
    padding-bottom: 54px;
  }

  .directory-hero h1 {
    font-size: clamp(50px, 14.3vw, 61px);
  }

  .directory-hero p {
    border-left: 0;
    border-top: 1px solid rgba(233, 201, 168, 0.42);
    padding-top: 16px;
    padding-left: 0;
  }

  .detail-hero {
    height: 390px;
  }

  .article-detail__header {
    margin-top: 52px;
  }

  .sale-hero {
    min-height: 490px;
  }

  .sale-hero .page-width,
  .sale-intro {
    padding-top: 52px;
    padding-bottom: 52px;
  }

  .sale-hero h1 {
    font-size: clamp(55px, 16vw, 66px);
  }

  .legal-page__header {
    padding-top: 48px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .restore-hero__image img {
    transition: none;
  }
}
