/* Home masthead sits inside the top of the photograph. */
.home-masthead {
  position: absolute;
  inset: 0 0 auto;
  z-index: 5;
  color: #fff;
  background: linear-gradient(to bottom, rgb(8 27 40 / 64%), transparent);
  text-shadow: 0 1px 3px rgb(0 0 0 / 32%);
}
.home-masthead .top-note { background: transparent; }
.home-masthead .header { height: clamp(70px, 9vh, 98px); }
.home-masthead .wordmark .seam { color: inherit; }
.home-masthead .menu, .home-masthead .plan-link, .home-masthead .lang { color: inherit; border-color: rgb(255 255 255 / 60%); }
.home-masthead .plan-link span { background: #fff; color: var(--ink); text-shadow: none; }

.home-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: 100%;
  height: 100vh;
  height: 100svh;
  min-height: 560px;
  display: flex;
  align-items: flex-end;
  color: #fff;
  background: #224551;
}
.coast-images, .coast-frame, .coast-frame picture, .coast-frame img, .home-hero::before {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
.coast-images { z-index: -2; overflow: hidden; }
.coast-frame { opacity: 0; }
.coast-frame.is-current { opacity: 1; z-index: 2; }
.coast-frame.is-previous { opacity: 1; z-index: 1; }
.coast-frame img { display: block; object-fit: cover; object-position: center; transform-origin: center; }
.coast-frame:nth-child(2) img { transform-origin: 44% 50%; }
.coast-frame:nth-child(3) img { transform-origin: 56% 50%; }
.coast-frame:nth-child(4) img { transform-origin: 48% 54%; }
.home-hero::before {
  content: '';
  z-index: -1;
  pointer-events: none;
  background: linear-gradient(36deg, rgba(0, 0, 0, .55) 2%, rgba(0, 0, 0, .35) 32%, transparent 74%),
              linear-gradient(to top, rgb(0 0 0 / 36%), transparent 28%);
}
.coast-copy {
  width: 100%;
  margin: 0 auto;
  padding-bottom: clamp(84px, 12vh, 134px);
  text-shadow: 0 1px 5px rgb(0 0 0 / 35%);
}
.coast-copy .eyebrow { margin-bottom: 14px; font-size: .72rem; letter-spacing: .2em; }
.coast-copy h1 { color: #fff; font-size: clamp(3.25rem, 5.6vw, 5.7rem); line-height: .98; }
.coast-copy h1 em { color: inherit; }
.coast-lead { margin-top: 17px; max-width: 49ch; font-size: clamp(1rem, 1.3vw, 1.16rem); line-height: 1.45; }
.coast-copy .actions { margin-top: 21px; gap: 12px; }
.coast-copy .button { text-shadow: none; }
.coast-copy .coast-primary { color: var(--ink); border-color: #fff; background: #fff; }
.coast-copy .coast-primary:hover { background: var(--sea); border-color: var(--sea); }
.coast-copy .coast-secondary { color: #fff; border-color: #fff; background: transparent; }
.coast-copy .coast-secondary:hover { background: rgb(0 0 0 / 25%); }
.coast-foot { margin-top: 14px; max-width: 62ch; font-size: .79rem; line-height: 1.45; }
.coast-caption {
  position: absolute;
  inset: auto 0 max(13px, env(safe-area-inset-bottom, 0px));
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 12px;
  font-size: .72rem;
  letter-spacing: .065em;
  text-shadow: 0 1px 3px #0009;
}
.coast-coordinate { grid-column: 1; }
.coast-credit { grid-column: 3; text-align: right; }
.coast-controls { display: flex; grid-column: 2; align-items: center; gap: 3px; }
.coast-controls button {
  position: relative;
  width: clamp(35px, 3.7vw, 56px);
  height: 44px;
  padding: 0;
  border: 0;
  background: transparent;
}
.coast-controls button::before, .coast-controls button span {
  content: ''; position: absolute; height: 2px; left: 3px; right: 3px; top: 50%;
}
.coast-controls button::before { background: rgb(255 255 255 / 40%); }
.coast-controls button[aria-current=true]::before { background: rgb(255 255 255 / 68%); }
.coast-controls button span { transform: scaleX(0); transform-origin: left; background: #fff; }
.home-masthead :focus-visible, .home-hero :focus-visible { outline: 2px solid #fff; outline-offset: 4px; }

@media (max-width: 860px) {
  .home-masthead .header nav { top: 100%; color: var(--ink); text-shadow: none; }
  .home-masthead nav .plan-link, .home-masthead nav .lang { border-color: var(--line); }
  .home-masthead .header nav :focus-visible { outline-color: var(--coral); }
}
@media (max-width: 767px) {
  .coast-frame:nth-child(1) img { object-position: 30% center; }
  .coast-frame:nth-child(2) img { object-position: 40% center; }
  .coast-frame:nth-child(3) img { object-position: 45% center; }
  .coast-frame:nth-child(4) img { object-position: 60% center; }
  .home-hero::before {
    background: linear-gradient(to top, rgba(0, 0, 0, .55) 2%, rgb(0 0 0 / 40%) 36%, transparent 73%);
  }
  .coast-copy { text-align: center; padding: 0 18px max(87px, calc(72px + env(safe-area-inset-bottom, 0px))); }
  .coast-copy .eyebrow { font-size: .65rem; letter-spacing: .16em; margin-bottom: 11px; }
  .coast-copy h1 { font-size: clamp(2.6rem, 9.6vw, 4rem); }
  .coast-lead { margin: 15px auto 0; max-width: 39ch; font-size: 1rem; }
  .coast-copy .actions { justify-content: center; gap: 8px; margin-top: 16px; }
  .coast-copy .button { padding: 10px 14px; min-height: 44px; }
  .coast-foot { margin: 12px auto 0; max-width: 43ch; font-size: .75rem; }
  .coast-caption { gap: 0 12px; grid-template-columns: 1fr 1fr; }
  .coast-controls { grid-column: 1 / -1; grid-row: 1; justify-content: center; }
  .coast-credit { grid-column: 2; }
  .coast-credit, .coast-coordinate { grid-row: 2; font-size: .64rem; }
}
@media (max-height: 610px) and (min-width: 768px) {
  .coast-copy { padding-bottom: 68px; }
  .coast-copy h1 { font-size: 3.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  .coast-controls, .coast-frame:not(:first-child) { display: none; }
  .coast-frame:first-child { opacity: 1; }
  .coast-frame img { transform: none !important; }
}
