/* Tip-Top-Trip holding page - in the spirit of the 2027 programme's inner pages: a photo column on the
   left with its caption, a gold rule, the text on cream. Cormorant Garamond + Montserrat. */
:root {
  --night: #1f2433;
  --night-2: #22304a;
  --wine: #7a2e3b;
  --gold: #b8955a;
  --cream: #f7f3ec;
  --grey: #6b6f7b;
  --sand: #9a9385;

  /* Slideshow: each photo shows --show seconds, cross-fading over --fade. With 7 photos the cycle is
     7 x 6 s = 42 s; the keyframe percentages below are derived from these three numbers. */
  --cycle: 42s;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--night);
  font-family: 'Montserrat', system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

.page {
  display: grid;
  grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
  min-height: 100vh;
  min-height: 100svh;
}

/* --- the photo column ------------------------------------------------------------------------- */

.gallery {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  margin: 0;
  overflow: hidden;
  background: var(--night);
  border-right: 3px solid var(--gold);
}

.slide {
  position: absolute;
  top: 0; right: 0; bottom: 0; left: 0;   /* not `inset`: iOS < 14.5 */
  margin: 0;
  opacity: 0;
  animation: ttp-fade var(--cycle) linear infinite both;
  animation-delay: var(--d);
  will-change: opacity;
}

.slide img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  animation: ttp-drift var(--cycle) linear infinite both;
  animation-delay: var(--d);
}

/* A soft shade at the bottom so the caption always reads, as in the programme. */
.slide::after {
  content: "";
  position: absolute;
  right: 0; bottom: 0; left: 0;
  height: 35%;
  background: linear-gradient(180deg, rgba(31, 36, 51, 0), rgba(31, 36, 51, .7));
  pointer-events: none;
}

.slide figcaption {
  position: absolute;
  left: 1.5rem;
  right: 1.5rem;
  bottom: 1.25rem;
  z-index: 1;
  color: #fff;
  font-size: .8rem;
  font-weight: 500;
  letter-spacing: .03em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .6), 0 0 12px rgba(0, 0, 0, .35);
}

/* Start offsets: (n - 1) x 6 s - 2 s, so the first photo is already fully visible when the page opens. */
.slide:nth-child(1) { --d: -2s; }
.slide:nth-child(2) { --d: 4s; }
.slide:nth-child(3) { --d: 10s; }
.slide:nth-child(4) { --d: 16s; }
.slide:nth-child(5) { --d: 22s; }
.slide:nth-child(6) { --d: 28s; }
.slide:nth-child(7) { --d: 34s; }

/* 2 s fade in (4.762 %), 4 s fully visible (to 14.286 %), 2 s fade out (to 19.048 %), then hidden. */
@keyframes ttp-fade {
  0%      { opacity: 0; }
  4.762%  { opacity: 1; }
  14.286% { opacity: 1; }
  19.048% { opacity: 0; }
  100%    { opacity: 0; }
}

/* A very slow zoom while the photo is on screen. */
@keyframes ttp-drift {
  0%      { transform: scale(1.02); }
  19.048% { transform: scale(1.09); }
  100%    { transform: scale(1.09); }
}

@media (prefers-reduced-motion: reduce) {
  .slide, .slide img { animation: none; }
  .slide:first-child { opacity: 1; }
}

/* --- the text --------------------------------------------------------------------------------- */

.content {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* The thin night - wine - gold band across the top of every programme page. */
.content::before {
  content: "";
  display: block;
  height: 4px;
  background: linear-gradient(90deg, var(--night-2), var(--wine) 55%, var(--gold));
}

.hold {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  width: 100%;
  max-width: 44rem;
  padding: 4rem clamp(1.5rem, 6vw, 5rem) 2rem;
}

.eyebrow {
  margin: 0 0 1.25rem;
  color: var(--wine);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .26em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  color: var(--night);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.4rem, 5vw, 5.25rem);
  line-height: 1;
  letter-spacing: .005em;
  white-space: nowrap;   /* never break "Tip-Top-Trip" at a hyphen */
}

.rule {
  display: block;
  width: 4.5rem;
  height: 2px;
  margin: 2rem 0;
  background: var(--gold);
}

.tagline {
  margin: 0 0 1.75rem;
  color: var(--night-2);
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.45rem, 2.6vw, 2.1rem);
  line-height: 1.25;
}

.soon {
  margin: 0;
  color: var(--grey);
  font-size: .95rem;
  font-weight: 400;
  letter-spacing: .03em;
}

.langs {
  display: flex;
  flex-wrap: wrap;
  padding: 0 clamp(1.5rem, 6vw, 5rem) .75rem;
}

.langs a {
  margin: 0 1.25rem .25rem 0;   /* not flex `gap`: iOS < 14.5 */
  color: var(--grey);
  font-size: .8rem;
  font-weight: 400;
  letter-spacing: .08em;
  text-decoration: none;
  padding: .35rem 0;
  border-bottom: 1px solid transparent;
}

.langs a:hover,
.langs a:focus-visible { color: var(--night); border-bottom-color: var(--gold); outline: none; }

.langs a[aria-current] { color: var(--wine); }

.foot {
  padding: 0 clamp(1.5rem, 6vw, 5rem) 1.5rem;
  color: var(--sand);
  font-size: .7rem;
  font-weight: 500;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* --- phones and narrow windows: the photos become a band above the text ------------------------ */

@media (max-width: 820px) {
  .page { grid-template-columns: 1fr; }
  .gallery {
    position: relative;
    height: 38vh;
    height: 38svh;
    min-height: 14rem;
    border-right: 0;
    border-bottom: 3px solid var(--gold);
  }
  .content::before { display: none; }
  .hold { padding-top: 2.25rem; }
  h1 { font-size: clamp(2.4rem, 13vw, 4.5rem); }
}
