/* =========================================================================
   Diana Ross — Diana in Motion
   POTP Brighton 2026, Preston Park, Brighton

   Cache-bust: bump every "?v=20260508h" string (search-and-replace
   across this file AND index.html) when assets change.
   ========================================================================= */

/* ---------- Fonts (variable Playfair Display, latin + latin-ext) ---------- */
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Playfair Display';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/assets/fonts/playfair-display-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --c-teal-deep:    #1a4a52;
  --c-teal-shade:   #133b41;
  --c-cream:        #fff8ec;
  --c-cream-soft:   #faf3e6;
  --c-shadow:       0 6px 20px rgba(19, 59, 65, 0.22);
  --c-shadow-hover: 0 10px 28px rgba(19, 59, 65, 0.32);

  --font-display:   'Playfair Display', Georgia, 'Times New Roman', serif;

  --layout-max:     1280px;
  --pad-x:          clamp(1rem, 4vw, 2.5rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-family: var(--font-display);
  color: var(--c-teal-deep);
  background: #d9e7e9; /* matches bg sky tone, prevents white flash */
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a { color: inherit; }

/* ---------- Stage (the page) ---------- */
.stage {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  min-height: 100vh;
  min-height: 100svh;
  padding: clamp(1rem, 3vw, 2rem) var(--pad-x) clamp(1.25rem, 3vw, 2rem);
  gap: clamp(1rem, 2.5vw, 1.5rem);
  overflow: hidden;
  background: #d9e7e9; /* sky-tone fallback; image lives on .stage__bg */
}

/* Background layer — sits behind everything, slow ken-burns on loop */
.stage__bg {
  position: absolute;
  inset: -2%;            /* slightly oversized so scale animation never reveals edges */
  z-index: 0;
  pointer-events: none;
  background-image: url('/assets/images/mobile-bg.jpg?v=20260508h');
  background-size: cover;
  background-position: center 60%;
  background-repeat: no-repeat;
  transform-origin: 50% 60%;
  animation: ken-burns 42s ease-in-out infinite;
  will-change: transform;
}

@media (min-width: 760px) {
  .stage__bg {
    background-image: url('/assets/images/desktop-bg.jpg?v=20260508h');
    background-position: center 70%;
    transform-origin: 50% 70%;
  }
}

/* Subtle sky tint so the overlay's edges don't fight the bg */
.stage__sky {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0) 35%,
    rgba(19, 59, 65, 0.04) 100%
  );
  animation: sky-fade 1.2s ease-out backwards;
}

/* ---------- Poster (overlay) ---------- */
.stage__poster {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 620px;
  display: flex;
  justify-content: center;
}

.stage__overlay {
  width: 100%;
  height: auto;
  max-height: 78vh;
  max-height: 78svh;
  object-fit: contain;
  filter: drop-shadow(0 18px 40px rgba(19, 59, 65, 0.18));
  animation: overlay-rise 1.4s 0.15s ease-out backwards;
}

@media (min-width: 760px) {
  .stage__poster { max-width: 540px; }
  .stage__overlay { max-height: 70vh; max-height: 70svh; }
}

@media (min-width: 1100px) {
  .stage__poster { max-width: 580px; }
  .stage__overlay { max-height: 72vh; max-height: 72svh; }
}

/* ---------- Tickets panel (label + 2 buttons in one frosted box) ---------- */
.stage__cta {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: clamp(0.6rem, 2vw, 1rem);
  row-gap: 0.85rem;
  width: 100%;
  max-width: 560px;
  padding: 1.1rem 1rem 1rem;
  border-radius: 6px;
  background: rgba(255, 248, 236, 0.42);
  backdrop-filter: blur(14px) saturate(115%);
  -webkit-backdrop-filter: blur(14px) saturate(115%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.45),
    0 18px 36px -12px rgba(19, 59, 65, 0.35);
}

/* "Tickets on sale now" — sits at the top of the panel, spans full width */
.tickets-status {
  grid-column: 1 / -1;
  margin: 0 0 0.25rem;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.85em;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.95rem, 2.6vw, 1.15rem);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--c-teal-deep);
  animation: status-rise 0.9s 0.55s ease-out backwards;
}

.tickets-status__rule {
  flex: 0 0 clamp(28px, 8vw, 56px);
  height: 1px;
  background: currentColor;
  opacity: 0.5;
}

.tickets-status__text {
  display: inline-block;
  white-space: nowrap;
  animation: status-pulse 3.6s ease-in-out infinite;
}

/* Desktop: festival-crowd bg under the panel is busier and more colourful,
   so flip the label to cream with a dark shadow for consistent legibility. */
@media (min-width: 760px) {
  .tickets-status {
    color: var(--c-cream);
    text-shadow: 0 1px 2px rgba(19, 59, 65, 0.55),
                 0 2px 10px rgba(19, 59, 65, 0.30);
  }
  .tickets-status__rule {
    opacity: 0.7;
  }
}

.cta {
  --bg: var(--c-teal-deep);
  --fg: var(--c-cream);

  flex: 1 1 0;
  min-width: 0;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 1.05em 1.4em;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(0.85rem, 2.6vw, 1.05rem);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--c-teal-deep);
  border-radius: 3px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.18) inset,
    0 -1px 0 rgba(0, 0, 0, 0.12) inset,
    0 8px 22px rgba(19, 59, 65, 0.32),
    0 2px 4px rgba(19, 59, 65, 0.18);
  transition:
    transform 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.2, 0.8, 0.2, 1),
    background-color 220ms ease,
    color 220ms ease;
  animation: cta-rise 0.8s ease-out backwards;
  -webkit-tap-highlight-color: transparent;
}

.cta:nth-of-type(1) { animation-delay: 0.75s; }
.cta:nth-of-type(2) { animation-delay: 0.9s; }

.cta:hover,
.cta:focus-visible {
  --bg: var(--c-cream);
  --fg: var(--c-teal-deep);
  transform: translateY(-2px);
  box-shadow:
    0 12px 28px rgba(19, 59, 65, 0.40),
    0 3px 6px rgba(19, 59, 65, 0.20);
}

.cta:focus-visible {
  outline: 2px solid var(--c-cream);
  outline-offset: 3px;
}

.cta:active {
  transform: translateY(0);
  box-shadow: var(--c-shadow);
}

.cta__label {
  display: inline-block;
  white-space: nowrap;
  /* Optical kerning for small caps feel */
  font-feature-settings: "kern" 1, "liga" 1, "lnum" 1;
}

@media (max-width: 380px) {
  .cta { padding: 0.95em 0.9em; letter-spacing: 0.08em; }
}

/* ---------- Page footer (below the fold) ---------- */
.page-foot {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1.1rem;
  padding: 2.5rem 1rem 2rem;
  background: var(--c-teal-shade);
  color: var(--c-cream);
  text-align: center;
}

/* Soft gradient bleeds upward from the footer's top edge so the
   transition from the festival background isn't a hard horizontal line. */
.page-foot::before {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  top: -90px;
  height: 90px;
  background: linear-gradient(
    to bottom,
    rgba(19, 59, 65, 0)     0%,
    rgba(19, 59, 65, 0.18) 45%,
    rgba(19, 59, 65, 0.55) 80%,
    var(--c-teal-shade)   100%
  );
  pointer-events: none;
}

.page-foot__nav {
  display: flex;
  gap: 1.4rem;
  flex-wrap: wrap;
  justify-content: center;
  font-family: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.page-foot__nav a {
  color: rgba(255, 248, 236, 0.78);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 248, 236, 0.18);
  padding-bottom: 2px;
  transition: color 200ms ease, border-color 200ms ease;
}
.page-foot__nav a:hover {
  color: var(--c-cream);
  border-bottom-color: rgba(255, 248, 236, 0.55);
}

.page-foot__fineprint {
  margin: 0;
  font-family: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 0.72rem;
  line-height: 1.55;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: rgba(255, 248, 236, 0.55);
}

.built-by {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  font-family: system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: 0.02em;
  color: rgba(255, 248, 236, 0.78);
  background: rgba(0, 0, 0, 0.22);
  border: 1px solid rgba(255, 248, 236, 0.10);
  border-radius: 999px;
}

.built-by a {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  opacity: 0.92;
  transition: opacity 200ms ease;
}
.built-by a:hover { opacity: 1; }
.built-by img { height: 18px; width: auto; vertical-align: middle; }

/* ---------- Animations ---------- */
@keyframes overlay-rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes cta-rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes status-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes status-pulse {
  0%, 100% { opacity: 0.78; }
  50%      { opacity: 1; }
}

@keyframes sky-fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Slow ken-burns on the background — gentle scale + drift, never reverses
   abruptly so it feels like a held breath. */
@keyframes ken-burns {
  0%   { transform: scale(1)    translate(0, 0); }
  50%  { transform: scale(1.045) translate(-0.6%, -0.4%); }
  100% { transform: scale(1)    translate(0, 0); }
}

@media (prefers-reduced-motion: reduce) {
  .stage__overlay,
  .stage__sky,
  .stage__bg,
  .cta,
  .tickets-status__text,
  .tickets-status {
    animation: none;
  }
  .cta { transition: none; }
}

/* ---------- Tall narrow phones — give overlay more room ---------- */
@media (max-width: 480px) and (max-height: 740px) {
  .stage__overlay { max-height: 64vh; max-height: 64svh; }
}
