/* When adjacent sections change surface, each contributes half the visible gap. */
.front-page {
  --edge: max(var(--gutter), calc((100% - 83rem) / 2));
  --section-space: clamp(2.5rem, 4.8vw, 4.6rem);
  --section-inset: calc(var(--section-space) / 2);
  --heading-gap: clamp(1.15rem, 1.95vw, 1.9rem);
  --tile-gap: var(--card-gap);
  --corner: var(--card-radius);
  --folio-inset: clamp(.9rem, 1.65vw, 1.65rem);
  --row-space: clamp(1rem, 1.6vw, 1.65rem);
  --light-green: color-mix(in srgb, var(--green) 17%, var(--paper));
  background: var(--white);
}
.front-page :where(main, footer) :is(a, button, select, input):focus-visible {
  outline: 3px solid var(--green);
  outline-offset: 3px;
}
.front-page :is(.front-hero, .footer) :is(a, button, video):focus-visible {
  outline-color: var(--light-green);
}
.front-page .top nav a { text-underline-offset: .36em; }
.front-page .button:not(.trip-access) {
  min-height: 2.8rem;
  border-radius: var(--corner);
  font: 600 .95rem/1.35 var(--sans);
  padding: .68rem 1.18rem;
}
.saved-link {
  display: inline-flex;
  align-items: center;
  min-height: 2.8rem;
  padding-block: .45rem;
  font: 600 .95rem/1.45 var(--sans);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .36em;
}
.saved-link:hover { text-decoration-thickness: 2px; }
.front-page .home-heading {
  margin: 0;
  font-size: clamp(2.7rem, 5.5vw, 5.6rem);
  line-height: 1.09;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.front-page .home-heading em { color: inherit; }

/* The opening film fills the space below the white header. */
.front-page .hero.front-hero {
  --viewport: 100vh;
  --rail: 4.75rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(var(--rail), 1fr) auto minmax(var(--rail), 1fr);
  min-height: calc(var(--viewport) - var(--mast-height, clamp(4.3rem, 6.4vw, 6rem)));
  padding-inline: var(--edge);
  color: var(--white);
  background: var(--ink);
}
@supports (height: 100svh) {
  .front-page .hero.front-hero { --viewport: 100svh; }
}
@supports (height: 100dvh) {
  .front-page .hero.front-hero { --viewport: 100dvh; }
}
.front-hero > .opening-still { z-index: -3; }
.front-hero > :is(.opening-still, .ambient-film) { object-fit: cover; object-position: 57% 50%; }
.front-hero > .ambient-film[data-scene="pt"] { object-position: 64% 50%; }
.front-hero > .ambient-film[data-scene="fi"] { object-position: 54% 50%; }
.front-hero > .ambient-film[data-scene="balt"] { object-position: 49% 50%; }
.front-hero > .ambient-film:not([data-frame]) { opacity: 0; }
.front-hero::before {
  background:
    linear-gradient(0deg, rgb(9 25 35 / 84%), transparent 27%),
    linear-gradient(90deg, rgb(9 28 41 / 78%), rgb(13 30 40 / 61%) 30%, rgb(13 30 40 / 12%) 64%, transparent 92%);
  pointer-events: none;
}
.front-hero-copy {
  grid-row: 2;
  justify-self: start;
  width: min(100%, 33.5rem);
  min-width: 0;
  container-type: inline-size;
  text-align: start;
  color: var(--white);
  text-shadow: 0 1px 8px rgb(7 23 35 / 28%);
}
.front-hero .eyebrow {
  justify-content: flex-start;
  gap: .65rem;
  margin: 0 0 clamp(.7rem, 1.6svh, 1.05rem);
  color: var(--paper);
  font: 400 clamp(.875rem, 1vw, .97rem)/1.45 var(--sans);
  letter-spacing: normal;
}
.front-hero .eyebrow::before {
  width: clamp(1.05rem, 1.55vw, 1.55rem);
  background: currentColor;
  opacity: .68;
}
.front-page .front-hero h1 {
  --signature-size: 7.7cqi;
  color: var(--white);
  font-size: clamp(2.55rem, min(13.4cqi, 10.8svh), 4.5rem);
  line-height: 1.04;
  letter-spacing: -.047em;
}
.front-hero h1 em {
  display: block;
  margin-top: .13em;
  padding-bottom: .04em;
  color: var(--paper);
  font-weight: 400;
  font-size: clamp(1.24rem, min(var(--signature-size), 6.9svh), 2.75rem);
  letter-spacing: -.032em;
  line-height: 1.16;
  text-wrap: balance;
}
.front-hero:lang(pt) h1 { --signature-size: 7.15cqi; }
.front-hero:lang(en) h1 { --signature-size: 8.35cqi; }
.front-page:lang(zh-Hans) .front-hero h1 {
  --signature-size: 8.45cqi;
  font-size: clamp(2.3rem, min(12.2cqi, 10svh), 4.05rem);
  letter-spacing: normal;
  line-height: 1.16;
}
.front-hero:lang(zh-Hans) h1 em { letter-spacing: normal; line-height: 1.28; }
.front-hero .front-intro {
  max-width: 46ch;
  margin: clamp(.92rem, 2.1svh, 1.45rem) 0 0;
  color: var(--white);
  font: 400 clamp(1rem, 1.12vw, 1.065rem)/1.55 var(--sans);
  text-wrap: pretty;
}
.front-film-bar {
  grid-row: 3;
  align-self: end;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 1.25rem;
  padding: .65rem max(2rem, calc(10rem - var(--edge))) max(.8rem, env(safe-area-inset-bottom)) 0;
  border-top: 1px solid rgb(250 247 238 / 46%);
  color: var(--white);
}
.front-film-place {
  display: flex;
  align-items: center;
  gap: .72rem;
  font: 600 clamp(.91rem, 1.12vw, 1.03rem)/1.4 var(--sans);
  text-shadow: 0 1px 5px #10232e;
}
.front-film-place::before {
  content: "";
  width: .43rem;
  height: .43rem;
  flex: none;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.front-film-actions, #film-scenes { display: flex; align-items: center; }
.front-film-actions { gap: clamp(.9rem, 1.9vw, 1.75rem); }
#film-scenes { gap: clamp(.7rem, 1.35vw, 1.35rem); }
#film-scenes button {
  display: grid;
  position: relative;
  align-content: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0 0 .42rem;
  border: 0;
  border-radius: 0;
  color: #f2f2ed;
  background: transparent;
  font: 400 .875rem/1.35 var(--sans);
}
#film-scenes button::before, #film-scenes button::after {
  content: "";
  position: absolute;
  inset: auto 0 .22rem;
  height: 2px;
  background: currentColor;
}
#film-scenes button::before { opacity: .43; }
#film-scenes button::after { opacity: 0; transform: scaleX(var(--scene-progress, 0)); transform-origin: left; }
#film-scenes button[aria-pressed="true"] { color: white; text-shadow: 0 0 1px currentColor; }
#film-scenes button[aria-pressed="true"]::after { opacity: 1; }
#film-scenes button:is(:hover,:focus-visible)::before { opacity: .85; }
.front-film-bar .film-toggle {
  position: static;
  justify-content: center;
  flex: none;
  width: 2.875rem;
  min-height: 2.875rem;
  gap: 0;
  padding: 0;
  border: 1px solid rgb(255 255 255 / 75%);
  border-radius: 50%;
  background: rgb(14 35 51 / 42%);
  font-size: 0;
}
.front-film-bar .film-toggle::before { width: .72rem; height: .83rem; }
.front-film-bar .film-toggle:hover { background: var(--ink); }

/* Destination photographs and captions */
.front-destinations {
  padding-block: var(--section-space) var(--section-inset);
  background: var(--white);
}
.country-atlas {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--tile-gap);
  margin-top: var(--heading-gap);
}
.atlas-entry {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  aspect-ratio: 1.07;
  min-width: 0;
  overflow: hidden;
  border-radius: var(--corner);
  color: white;
  background: var(--ink);
  text-decoration: none;
}
.atlas-entry img, .atlas-entry::before { position: absolute; inset: 0; width: 100%; height: 100%; }
.atlas-entry img { z-index: -2; object-fit: cover; }
.atlas-entry::before {
  content: "";
  z-index: -1;
  background: linear-gradient(0deg, rgb(13 31 42 / 83%), rgb(18 34 42 / 38%) 30%, transparent 64%);
}
.atlas-entry > div { width: 100%; padding: clamp(.8rem, 1.6vw, 1.55rem); }
.atlas-entry h3 {
  color: white;
  font-size: clamp(1.65rem, 2.35vw, 2.55rem);
  line-height: 1.1;
  text-wrap: balance;
  text-shadow: 0 1px 4px #15283165;
}
.atlas-entry:is(:hover, :focus-visible) h3 { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .2em; }
@media (prefers-reduced-motion: no-preference) {
  .atlas-entry img { transition: transform .45s ease; }
  .atlas-entry:is(:hover, :focus-visible) img { transform: scale(1.035); }
}
/* Each booking category has the same photograph, type scale and space on the ivory page. */
.front-services {
  padding-block: var(--section-inset);
  background: var(--paper);
}
.front-services .booking-title { margin-bottom: var(--heading-gap); color: var(--ink); }
.front-collection {
  display: grid;
  grid-auto-rows: 1fr;
  border-block: 1px solid var(--rule);
}
.collection-card {
  display: grid;
  grid-template-columns: minmax(0, .91fr) minmax(0, 1.09fr);
  gap: clamp(1.65rem, 4.25vw, 4.4rem);
  min-width: 0;
  min-height: clamp(14.25rem, 18.3vw, 17.25rem);
  padding-block: var(--row-space);
  scroll-margin-top: 1rem;
}
.collection-card + .collection-card { border-top: 1px solid var(--rule); }
.collection-photo {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: calc(var(--corner) - 2px);
  background: var(--paper);
}
.collection-photo video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.collection-photo video:focus-visible { outline: 3px solid var(--paper); outline-offset: -3px; }
.collection-card[data-page="experiencias"] video { object-position: 57% 51%; }
.collection-card[data-page="traslados"] video { object-position: 53% 52%; }
.collection-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: .25rem var(--folio-inset) .25rem 0;
}
.collection-kind {
  color: var(--green);
  font: 600 .9rem/1.45 var(--sans);
}
.collection-copy h3 {
  margin: .28rem 0 .46rem;
  font-size: clamp(2.1rem, 3.4vw, 3.65rem);
  line-height: 1.08;
}
.collection-copy p {
  max-width: 49ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.12vw, 1.08rem);
  line-height: 1.5;
  text-wrap: pretty;
}
.collection-action { margin-top: clamp(.78rem, 1.2vw, 1.15rem); }
.front-services .collection-action { color: var(--white); border-color: var(--ink); background: var(--ink); }
.front-services .collection-action:is(:hover, :focus-visible) { border-color: #193549; background: #193549; }
.collection-photo .watch-film { background: rgb(16 34 47 / 86%); }

.front-services .collection-action:focus-visible { outline-color: var(--green); }

/* The itinerary form and its destination postcard are one spread. */
.home-studio { padding-block-start: var(--section-inset); }
.studio-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.03fr);
  grid-template-areas: "title title" "photograph form";
}
.studio-introduction {
  grid-area: title;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.03fr);
  align-items: start;
  gap: 1.3rem;
  margin-bottom: var(--heading-gap);
}
.studio-introduction p {
  align-self: end;
  max-width: 44ch;
  margin: 0;
  color: var(--muted);
  font-size: clamp(1rem, 1.13vw, 1.15rem);
  line-height: 1.55;
  text-wrap: pretty;
}
.studio-visual {
  grid-area: photograph;
  position: relative;
  min-height: 18rem;
  overflow: hidden;
  isolation: isolate;
  border-radius: var(--corner) 0 0 var(--corner);
  background: var(--tint);
}
.studio-notebook { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 38% 53%; }
.studio-postcard {
  position: absolute;
  right: 7.5%;
  bottom: 9%;
  width: min(58%, 22rem);
  margin: 0;
  padding: clamp(.45rem, .8vw, .85rem);
  background: var(--paper);
  box-shadow: .1rem .45rem 1.25rem #1e302e45;
  transform: rotate(-4deg);
}
.studio-postcard img { width: 100%; height: auto; aspect-ratio: 1.85; object-fit: cover; }
.studio-postcard figcaption {
  padding: .45em .1em .05em;
  color: var(--ink);
  font: 600 clamp(.875rem, 1.1vw, 1rem)/1.35 var(--sans);
}
.studio-form {
  --choice-border: color-mix(in srgb, var(--white) 60%, var(--ink));
  grid-area: form;
  display: grid;
  align-content: center;
  gap: clamp(1rem, 1.6vw, 1.5rem);
  padding: clamp(1.25rem, 3.05vw, 3.6rem);
  background: var(--ink);
  color: var(--white);
  border-radius: 0 var(--corner) var(--corner) 0;
}
.studio-form :is(button, input, select):focus-visible { outline: 3px solid var(--white); outline-offset: 3px; }
.studio-destinations { min-width: 0; margin: 0; padding: 0; border: 0; }
.studio-destinations legend, .studio-fields label {
  color: var(--white);
  font: 600 .94rem/1.4 var(--sans);
}
.studio-destinations legend { margin-bottom: .55rem; padding: 0; }
.studio-regions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem; }
.studio-regions label { position: relative; display: block; cursor: pointer; }
.studio-regions input { position: absolute; width: 1px; height: 1px; opacity: 0; padding: 0; }
.studio-regions span {
  display: flex;
  align-items: center;
  gap: .55rem;
  height: 100%;
  min-height: 2.8rem;
  padding: .48rem .78rem;
  border: 1px solid var(--choice-border);
  border-radius: var(--corner);
  background: transparent;
  color: var(--white);
  font: 600 .92rem/1.35 var(--sans);
}
.studio-regions span::before {
  content: "";
  flex: none;
  width: .82rem;
  aspect-ratio: 1;
  border: 1px solid currentColor;
  border-radius: 50%;
}
.studio-regions label:hover span { border-color: var(--white); background: color-mix(in srgb, var(--ink) 86%, var(--white)); }
.studio-regions input:checked + span { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.studio-regions input:checked + span::before { background: currentColor; box-shadow: inset 0 0 0 2.5px var(--paper); }
.studio-regions input:focus-visible + span { outline: 3px solid var(--white); outline-offset: 3px; }
.studio-fields { display: grid; grid-template-columns: minmax(0, 1.38fr) minmax(0, 1fr); gap: .85rem; }
.studio-fields label { display: flex; flex-direction: column; gap: .42rem; }
.studio-fields input, .studio-fields select {
  width: 100%;
  min-width: 0;
  min-height: 2.85rem;
  margin-top: auto;
  border-color: var(--white);
  border-radius: var(--corner);
  background-color: var(--white);
  color: var(--ink);
  font: 400 1rem/1.4 var(--sans);
}
.studio-form .studio-submit { justify-self: start; background: var(--white); border-color: var(--white); color: var(--ink); }
.studio-form .studio-submit:hover { background: var(--paper); border-color: var(--paper); color: var(--ink); }
.front-page .home-saved {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .3rem clamp(1rem, 2vw, 2rem);
  margin-block: var(--section-space);
  padding: clamp(1.15rem, 2.35vw, 2.15rem) clamp(1.15rem, 3vw, 3.4rem);
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--corner);
}
.saved-symbol {
  display: grid;
  place-items: center;
  width: clamp(2.75rem, 3.7vw, 3.55rem);
  aspect-ratio: 1;
  color: var(--ink);
  background: color-mix(in srgb, var(--ink) 10%, var(--white));
  border-radius: 50%;
}
.saved-symbol::before { content: ""; width: .96rem; height: 1.35rem; background: currentColor; clip-path: polygon(0 0,100% 0,100% 100%,50% 74%,0 100%); }
.home-saved#viaje h2 { font-size: clamp(1.7rem, 2.25vw, 2.4rem); line-height: 1.12; }
.saved-copy p { max-width: 58ch; margin: .32rem 0 0; color: var(--muted); font-size: .98rem; line-height: 1.5; }
.saved-link { justify-self: start; color: var(--ink); }
@media (max-width: 52rem) {
  .front-page .hero.front-hero { grid-template-rows: minmax(4.6rem, 1fr) auto minmax(6.6rem, .38fr); }
  .front-hero::before {
    background:
      linear-gradient(0deg, rgb(9 27 39 / 88%), rgb(11 26 36 / 40%) 34%, transparent 75%),
      linear-gradient(90deg, rgb(12 29 41 / 56%), rgb(12 29 41 / 30%) 58%, rgb(12 29 41 / 9%));
  }
  .front-film-bar {
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    row-gap: 0;
    padding: .6rem 0 max(.65rem, env(safe-area-inset-bottom));
  }
  .front-film-place { gap: .55rem; }
  .front-film-actions { gap: .62rem; }
  #film-scenes { gap: 0; }
  #film-scenes button { width: 2.75rem; padding: 0; }
  #film-scenes button::before, #film-scenes button::after { inset: calc(50% - 1px) .35rem auto 0; }
  #film-scenes button[aria-pressed="true"]::before { opacity: .8; height: 3px; }
  #film-scenes button[aria-pressed="true"]::after { height: 3px; }
  #film-scenes .scene-name { display: none; }
  .front-film-bar .film-toggle { width: 2.75rem; min-height: 2.75rem; }
}
@media (orientation: landscape) and (max-height: 28rem) {
  .front-page .hero.front-hero { --rail: 2.85rem; grid-template-rows: minmax(var(--rail), 1fr) auto minmax(var(--rail), 1fr); }
  .front-hero-copy { width: min(100%, 36rem); }
  .front-hero .eyebrow { font-size: .875rem; margin-bottom: .3rem; }
  .front-hero .front-intro { margin-top: .5rem; font-size: 1rem; line-height: 1.35; max-width: 58ch; }
  .front-page .front-hero h1 { font-size: clamp(1.8rem, 10svh, 2.65rem); }
  .front-page:lang(zh-Hans) .front-hero h1 { font-size: clamp(1.7rem, 9.3svh, 2.5rem); line-height: 1.08; }
  .front-hero h1 em { font-size: clamp(1.25rem, 6.6svh, 2rem); }
  .front-hero:lang(zh-Hans) h1 em { line-height: 1.12; }
  .front-film-bar .film-toggle { justify-content: center; width: 2.75rem; padding: 0; font-size: 0; gap: 0; }
  .front-film-bar .film-toggle::before { width: .7rem; height: .8rem; }
  .front-film-bar { grid-template-columns: minmax(0, 1fr) auto; justify-items: start; text-align: start; padding-block: .12rem; padding-inline-end: 3.6rem; }
  @media (min-width: 601px) { .front-film-bar { padding-inline-end: max(3.6rem, calc(10rem - var(--edge))); } }
}
@media (max-width: 54rem) {
  .country-atlas { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .atlas-entry { aspect-ratio: 1.36; }
  .atlas-entry h3 { font-size: clamp(1.5rem, 3.65vw, 2.25rem); }
  .studio-form { padding: clamp(1.05rem, 2.2vw, 1.55rem); }
}
@media (max-width: 44rem) {
  .front-collection { grid-auto-rows: auto; }
  .collection-card { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto; gap: .9rem; min-height: 0; }
  .collection-photo { aspect-ratio: 1.86; }
  .collection-copy { justify-content: flex-start; padding: 0 .15rem .12rem; }
  .collection-copy h3 { margin: .23rem 0 .34rem; }
  .collection-action { margin-top: .8rem; }
  .studio-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "title" "photograph" "form"; }
  .studio-introduction { grid-template-columns: minmax(0, 1fr); gap: .7rem; }
  .studio-visual { min-height: 0; height: clamp(9.25rem, 35vw, 14rem); border-radius: var(--corner) var(--corner) 0 0; }
  .studio-postcard { width: auto; height: 80%; aspect-ratio: 1.65; display: grid; grid-template-rows: minmax(0, 1fr) auto; }
  .studio-postcard img { height: 100%; }
  .studio-form { padding: clamp(1rem, 3.9vw, 1.65rem); border-radius: 0 0 var(--corner) var(--corner); }
  .front-page .home-saved { grid-template-columns: auto minmax(0, 1fr); }
  .saved-symbol { align-self: start; }
  .saved-link { grid-column: 2; }

}
@media (max-width: 28rem) {
  .front-page .home-heading { font-size: clamp(2.38rem, 10.15vw, 2.9rem); }
  .country-atlas { gap: var(--tile-gap); }
  .atlas-entry { aspect-ratio: .985; }
  .atlas-entry > div { padding: .72rem clamp(.6rem, 3vw, .82rem); }
  .atlas-entry h3 { font-size: clamp(1.34rem, 5.75vw, 1.62rem); }
  .collection-copy h3 { font-size: clamp(1.95rem, 8.4vw, 2.35rem); }
  .studio-regions span { padding: .48rem .55rem; gap: .42rem; }
  .studio-fields { gap: .55rem; }
  .studio-form .studio-submit { justify-self: stretch; }
  .home-saved .saved-symbol { width: 2.45rem; }
}
@media (max-width: 22rem) {
  .front-film-bar { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "place pause" "scenes scenes"; gap: 0 .75rem; padding-block-start: .22rem; }
  .front-film-place { grid-area: place; }
  .front-film-actions { display: contents; }
  #film-scenes { grid-area: scenes; }
  .front-film-bar .film-toggle { grid-area: pause; justify-self: start; }

  .studio-fields { grid-template-columns: minmax(0, 1fr); }
  .front-page .home-saved { grid-template-columns: minmax(0, 1fr); }
  .saved-symbol { display: none; }
  .saved-link { grid-column: 1; }
}
