/* Homepage opening (local-film.js).
   The top section: a full-width photo slider as tall as the screen below the header, one whole photo
   at a time, the next sliding in from the right every 4 s (film.js); with reduced motion the photos
   change by fading. Under it, the page's h1 and two buttons.
   The video popup: over the whole page on a dimmed backdrop, the video alone in the middle. */

/* ---- the slider ---- */
.gf { --h: max(500px, min(calc(100svh - 73px), 900px));
  position: relative; isolation: isolate; height: var(--h); overflow: hidden; background: #061A1A; }
.gf-slides { position: absolute; inset: 0; overflow: hidden; }
.gf-slide { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; visibility: hidden; }
.gf-slide.is-active, .gf-slide.is-out { visibility: visible; }
.gf-slide.is-in { animation: gf-in .9s cubic-bezier(.65, 0, .35, 1) both; }
.gf-slide.is-out { animation: gf-out .9s cubic-bezier(.65, 0, .35, 1) both; }
@keyframes gf-in { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes gf-out { from { transform: translateX(0); } to { transform: translateX(-100%); } }
@keyframes gf-fade { from { opacity: 0; } to { opacity: 1; } }

/* ---- the page's h1 and buttons, under the slider ---- */
.gf-intro { padding: 34px 20px 30px; text-align: center; background: var(--cream-2, #F4ECDF); border-bottom: 1px solid #EADFCB; }
.gf-intro__eyebrow { margin: 0 0 10px; font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: #7A5A16; }
.gt-home .gf-intro h1 { margin: 0 auto 20px; max-width: 760px; font: 400 clamp(26px, 3vw, 40px)/1.2 Georgia, "Times New Roman", serif; color: var(--g-800, #083B3D); }
.gf-intro__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin: 0; }
.gf-intro__btn { display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px; border: 1.5px solid var(--g-700, #0A4A4D); border-radius: 6px;
  background: var(--g-700, #0A4A4D); color: #fff !important; font-size: 14px; font-weight: 700; text-decoration: none !important; }
.gf-intro__btn--line { background: transparent; color: var(--g-700, #0A4A4D) !important; }
.gf-intro__btn:hover { background: var(--g-800, #083B3D); border-color: #D4A64A; color: #fff !important; }

/* ---- the video popup, above everything on the page ---- */
.gv { --v: min(calc(88vh * 9 / 16), 88vw);
  position: fixed; inset: 0; z-index: 2147483600; display: grid; place-items: center; padding: 16px;
  background: rgba(4, 18, 18, .82); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); animation: gf-fade .35s ease both; }
.gv[hidden] { display: none; }

/* the video, its sound button and its close button */
.gv-pop { position: relative; width: var(--v); aspect-ratio: 9 / 16; margin: 0; border-radius: 16px; overflow: hidden; background: #000;
  box-shadow: 0 0 0 3px #E7B75F, 0 0 0 9px rgba(231, 183, 95, .18), 0 30px 80px rgba(0, 0, 0, .7);
  animation: gv-pop .6s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes gv-pop { from { opacity: 0; transform: scale(.88); } to { opacity: 1; transform: none; } }
.gv-pop video { display: block; width: 100%; height: 100%; object-fit: cover; }
.gv-sound, .gv-close { min-height: 0; text-transform: none; letter-spacing: 0; cursor: pointer; font-family: inherit; }
.gv-sound { position: absolute; z-index: 2; left: 50%; bottom: 18px; translate: -50% 0; display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border: 0; border-radius: 999px; background: #E7B75F; color: #062E30; font-size: 13px; line-height: 1; white-space: nowrap;
  box-shadow: 0 6px 16px rgba(0, 0, 0, .4); }
.gv-sound:hover { background: #F2C46D; }
.gv-sound[aria-pressed="false"] svg:nth-of-type(2), .gv-sound[aria-pressed="true"] svg:nth-of-type(1) { display: none; }
.gv-close { position: absolute; z-index: 2; top: 10px; right: 10px; display: grid; place-items: center; width: 38px; height: 38px; padding: 0;
  border: 1px solid rgba(255, 255, 255, .75); border-radius: 50%; background: rgba(0, 0, 0, .6); color: #fff; font-size: 26px; line-height: 1; }
.gv-close:hover { background: #E7B75F; border-color: #E7B75F; color: #062E30; }
.gv-sound:focus-visible, .gv-close:focus-visible { outline: 3px solid #fff; outline-offset: 3px; }

/* phones: the slider's header is 50px */
@media (max-width: 749px) {
  .gf { --h: max(460px, min(calc(100svh - 50px), 760px)); }
  .gf-intro { padding: 26px 16px 24px; }
  .gv { --v: min(calc(82vh * 9 / 16), 88vw); }
  .gv-pop { border-radius: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .gf-slide.is-out, .gv, .gv-pop { animation: none !important; }
  .gf-slide.is-out { visibility: hidden; }
  .gf-slide.is-in { animation: gf-fade .8s ease both; }
}
