/* ==========================================================================
   The Odyssey | ACE x ABB Chilifest 2027
   Colours come from the film: red sail, open sea, pale sky, low sun.
   Sections marked .window are transparent and show the fixed film.
   ========================================================================== */

:root {
  --sea: #0c3148;
  --sea-deep: #08202f;
  --sky: #d5e5ea;
  --foam: #f6fafa;
  --sail: #c2421f;
  --sail-deep: #a03315;
  --sun: #f3c873;
  --ink: #0a2230;
  --line: rgba(246, 250, 250, .25);

  --display: 'Cinzel', 'Trajan Pro', 'Times New Roman', serif;
  --serif: 'EB Garamond', Garamond, 'Times New Roman', serif;

  --gutter: max(clamp(20px, 5vw, 72px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --header-h: 72px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--sea); color: var(--foam);
  font: 400 20px/1.5 var(--serif);
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }
img, video { max-width: 100%; display: block; }
h1, h2, p, figure, blockquote { margin: 0; }
a, button { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 4px; }

.display { font-family: var(--display); font-weight: 500; text-transform: uppercase; line-height: 1.05; letter-spacing: .02em; text-wrap: balance; }
h2.display { font-size: clamp(38px, 5.4vw, 84px); }
.small { font-size: 17px; }

.skip { position: fixed; z-index: 100; left: 16px; top: -100px; padding: 12px 20px; background: var(--foam); color: var(--ink); }
.skip:focus { top: 16px; }

/* ---------- Buttons ---------- */
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 10px 28px;
  border: 2px solid var(--sail); background: var(--sail); color: #fff;
  font: 500 20px/1 var(--serif); white-space: nowrap;
  transition: background .2s, border-color .2s, color .2s;
}
.button:hover { background: var(--sail-deep); border-color: var(--sail-deep); }
.button:active { transform: translateY(1px); }
.button-ghost { background: rgba(8, 32, 47, .35); border-color: var(--foam); }
.button-ghost:hover { background: var(--foam); border-color: var(--foam); color: var(--ink); }
.button-small { min-height: 44px; padding: 8px 20px; font-size: 18px; }
.button-large { min-height: 64px; padding: 14px 44px; font-size: 24px; }

/* ---------- Background film ---------- */
.film { position: fixed; inset: 0; z-index: -1; background: var(--sea) url("media/odyssey-still.jpg") center / cover no-repeat; }
.film { height: 100lvh; }  /* iPhone Safari: no gap or jump when the toolbar collapses */
.film-video { width: 100%; height: 100%; object-fit: cover; }
.film-video::-webkit-media-controls-start-playback-button { display: none !important; -webkit-appearance: none; }  /* Low Power Mode */
/* Shade for the header only. Each section brings its own shade, so text stays readable as it scrolls. */
.film-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(8, 32, 47, .68) 0, rgba(8, 32, 47, 0) 20%); }

/* ---------- Header ---------- */
.header {
  position: fixed; z-index: 20; inset: 0 0 auto;
  height: calc(var(--header-h) + env(safe-area-inset-top, 0px));
  padding: env(safe-area-inset-top, 0px) var(--gutter) 0;
  display: flex; align-items: center; gap: 30px;
  transition: background .3s;
}
.header.is-solid { background: var(--sea-deep); }
.wordmark { font: 600 18px/1 var(--display); text-transform: uppercase; letter-spacing: .12em; white-space: nowrap; padding-block: 14px; }
.desktop-nav { display: flex; gap: 30px; margin-left: auto; }
.desktop-nav a { padding-block: 10px; text-decoration: underline transparent 2px; text-underline-offset: 6px; transition: text-decoration-color .2s; }
.desktop-nav a:hover { text-decoration-color: var(--sun); }
.menu-toggle, .mobile-menu, .mobile-ticket { display: none; }

.sound-toggle { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 44px; min-height: 44px; padding: 0; background: none; border: 0; cursor: pointer; white-space: nowrap; }
.sound-label { min-width: 4.4em; text-align: left; }
.sound-bars { display: inline-flex; align-items: flex-end; gap: 3px; height: 16px; }
.sound-bars i { display: block; width: 3px; height: 5px; background: currentColor; }
.sound-toggle[aria-pressed="true"] { color: var(--sun); }
.sound-toggle[aria-pressed="true"] .sound-bars i { animation: sound-bar 1.1s ease-in-out infinite alternate; }
.sound-toggle .sound-bars i:nth-child(2) { animation-delay: -.35s !important; }
.sound-toggle .sound-bars i:nth-child(3) { animation-delay: -.7s !important; }
.sound-toggle .sound-bars i:nth-child(4) { animation-delay: -.2s !important; }
@keyframes sound-bar { from { height: 4px; } to { height: 16px; } }

/* ---------- Hero: the film fills the frame, the title sits on the waterline ---------- */
.window { position: relative; background: linear-gradient(180deg, rgba(8, 32, 47, 0) 36%, rgba(8, 32, 47, .55) 60%, rgba(8, 32, 47, .86) 100%); }
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: var(--header-h) var(--gutter) clamp(28px, 4vh, 48px);
}
.hero-org { font-size: clamp(21px, 1.9vw, 30px); text-shadow: 0 1px 14px rgba(8, 32, 47, .8); }
.hero h1 {
  font-size: clamp(44px, 12.1vw, 236px); letter-spacing: -.01em; line-height: 1; white-space: nowrap;
  margin: .04em 0 .12em -.04em; text-shadow: 0 2px 36px rgba(8, 32, 47, .55);
  animation: surface 1.1s cubic-bezier(.16, .8, .24, 1) both;
}
@keyframes surface { from { clip-path: inset(0 0 100% 0); transform: translateY(.35em); } to { clip-path: inset(-20%); transform: none; } }
.hero-foot { display: flex; align-items: center; gap: 28px; }
.hero-date { font-size: clamp(22px, 2vw, 30px); text-shadow: 0 1px 14px rgba(8, 32, 47, .8); }
.hero-actions { display: flex; gap: 12px; }
.film-toggle { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin-left: auto; padding: 0; background: none; border: 0; cursor: pointer; text-shadow: 0 1px 10px rgba(8, 32, 47, .8); }
.film-toggle[hidden], .sound-toggle[hidden] { display: none; }
.film-toggle-icon { width: 11px; height: 13px; border-inline: 4px solid currentColor; }
.film-toggle[aria-pressed="true"] .film-toggle-icon { border: 0; border-left: 12px solid currentColor; border-block: 7px solid transparent; height: 14px; }

/* ---------- Tickets ---------- */
.tickets {
  display: grid; grid-template-columns: auto 1fr; align-items: end; gap: clamp(32px, 6vw, 110px);
  padding: clamp(64px, 8vw, 120px) var(--gutter); background: var(--sea);
}
.ticket-date { color: var(--sun); font-size: clamp(56px, 8.6vw, 150px); line-height: .98; }
.ticket-date span { display: block; white-space: nowrap; }
.ticket-days { font-size: 1.3em; }
.ticket-action h2 { font-size: clamp(34px, 3.6vw, 56px); }
.ticket-action p { max-width: 26em; margin-top: 12px; font-size: 22px; }
.ticket-action .button { margin-top: 26px; }
.ticket-action .small { font-size: 18px; }

/* ---------- Merch ---------- */
.merch-section { display: grid; grid-template-columns: 1.35fr 1fr; background: var(--sky); color: var(--ink); }
.merch-copy { display: flex; flex-direction: column; justify-content: center; padding: clamp(56px, 8vw, 120px) var(--gutter); }
.merch-copy h2 { font-size: clamp(34px, 3.6vw, 56px); }
.merch-soon { margin: .12em 0 .3em; color: var(--sail); font-size: clamp(48px, 7.6vw, 132px); line-height: .98; }
.merch-copy p:last-child { max-width: 24em; font-size: 22px; }
.merch-photo { position: relative; min-height: 100%; }
.merch-photo img { width: 100%; height: 100%; max-height: 760px; object-fit: cover; object-position: 40% 30%; }
.merch-photo figcaption { position: absolute; left: 0; bottom: 0; padding: 8px 18px; background: var(--sky); font-size: 18px; }

/* ---------- Film window ---------- */
.interlude {
  min-height: 90vh; min-height: 90svh; display: flex; align-items: flex-end;
  padding: 120px var(--gutter) clamp(48px, 8vh, 90px);
}
.interlude blockquote { max-width: 19em; font-size: clamp(27px, 3.7vw, 58px); line-height: 1.18; text-shadow: 0 2px 26px rgba(8, 32, 47, .75); }
.interlude figcaption { margin-top: 20px; text-shadow: 0 1px 12px rgba(8, 32, 47, .9); }

/* ---------- Last year: edge-to-edge photo wall ---------- */
.last-year { background: var(--sea-deep); }
.last-year-head { display: flex; align-items: end; justify-content: space-between; gap: 32px; padding: clamp(64px, 8vw, 120px) var(--gutter) clamp(32px, 4vw, 56px); }
.last-year-head h2 { max-width: 10em; }
.last-year-head p { max-width: 15em; font-size: 22px; }
.wall { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 16.65vw; grid-auto-flow: dense; gap: 6px; }
.tile { position: relative; display: block; width: 100%; height: 100%; padding: 0; border: 0; overflow: hidden; background: var(--sea); cursor: zoom-in; }
.tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
@media (hover: hover) { .tile:hover img { transform: scale(1.03); } }
.tile:focus-visible { z-index: 1; outline-offset: -4px; }
.tile-x2 { grid-column: span 2; grid-row: span 2; }
.tile-tall { grid-row: span 2; }
.tile-tall img { object-position: 47% 50%; }

.lightbox { width: 100vw; height: 100vh; height: 100dvh; max-width: none; max-height: none; margin: 0; padding: 72px 20px; border: 0; background: rgba(8, 32, 47, .96); color: var(--foam); }
html:has(.lightbox[open]) { overflow: hidden; }
.lightbox { touch-action: pan-y pinch-zoom; }
.lightbox::backdrop { background: none; }
.lightbox img { width: 100%; height: 100%; object-fit: contain; pointer-events: none; }
.lightbox button { position: absolute; min-height: 48px; padding: 0 20px; background: none; border: 0; cursor: pointer; }
.lightbox button:hover { text-decoration: underline; text-underline-offset: 6px; }
.lb-close { top: calc(12px + env(safe-area-inset-top, 0px)); right: 12px; }
.lb-prev { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); left: 12px; }
.lb-next { bottom: calc(12px + env(safe-area-inset-bottom, 0px)); right: 12px; }

/* ---------- Footer ---------- */
.footer { padding: clamp(64px, 8vw, 110px) var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px)); background: var(--sea); }
.footer-title { font-size: clamp(40px, 9vw, 170px); margin-bottom: .25em; white-space: nowrap; }
.footer-bottom { display: flex; justify-content: space-between; gap: 24px; margin-top: 72px; padding-top: 22px; border-top: 1px solid var(--line); font-size: 17px; }

/* ---------- Tablet ---------- */
@media (max-width: 1050px) {
  .desktop-nav, .header { gap: 20px; }
  .sound-label { position: absolute; width: 1px; height: 1px; min-width: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .last-year-head { flex-direction: column; align-items: flex-start; gap: 16px; }
}

/* ---------- Phone ---------- */
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  .desktop-nav, .header-ticket { display: none; }
  .wordmark { font-size: 16px; }
  .header { gap: 10px; }
  .sound-toggle { margin-left: auto; min-width: 44px; justify-content: center; }
  .sound-toggle[hidden] ~ .menu-toggle { margin-left: auto; }
  .menu-toggle { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px; width: 44px; height: 44px; margin-right: -10px; padding: 0; background: none; border: 0; cursor: pointer; }
  .menu-toggle span { display: block; width: 24px; height: 2px; background: var(--foam); transition: transform .2s; }
  .menu-toggle[aria-expanded="true"] span:first-child { transform: translateY(4.5px) rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:last-child { transform: translateY(-4.5px) rotate(-45deg); }
  .header.menu-open { background: var(--sea-deep); }
  .mobile-menu:not([hidden]) { display: flex; flex-direction: column; position: fixed; z-index: 19; inset: calc(var(--header-h) + env(safe-area-inset-top, 0px)) 0 auto; padding: 8px var(--gutter) 24px; background: var(--sea-deep); }
  .mobile-menu a { padding: 14px 0; font-size: 26px; }

  .hero { padding-bottom: calc(104px + env(safe-area-inset-bottom, 0px)); }
  .hero h1 { font-size: 17.6vw; margin-bottom: .16em; }
  .hero h1 span { display: block; }
  .hero h1 span:first-child { font-size: .5em; margin: 0 0 .06em .08em; }
  .hero-foot { flex-wrap: wrap; gap: 14px; }
  .hero-date { width: 100%; }
  .hero-actions { flex: 1; }
  .hero-actions .button { flex: 1; padding-inline: 16px; }
  .film-toggle { width: 44px; justify-content: center; margin: 0; }
  .film-toggle-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }

  .window { background: linear-gradient(180deg, rgba(8, 32, 47, 0) 22%, rgba(8, 32, 47, .58) 48%, rgba(8, 32, 47, .86) 100%); }
  .interlude { padding-bottom: calc(120px + env(safe-area-inset-bottom, 0px)); }
  .tickets { grid-template-columns: 1fr; }
  .ticket-date { font-size: 19vw; }
  .ticket-action .button { width: 100%; }
  .merch-section { grid-template-columns: 1fr; }
  .merch-soon { font-size: 14.5vw; }
  .merch-photo img { aspect-ratio: 1; }
  .wall { grid-template-columns: 1fr 1fr; grid-auto-rows: 33vw; gap: 4px; }
  .footer-bottom { flex-direction: column; gap: 8px; margin-top: 48px; }
  .footer { padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px)); }
  .footer .button { width: 100%; }

  .mobile-ticket { display: flex; position: fixed; z-index: 15; inset: auto 0 0; align-items: center; justify-content: space-between; gap: 16px; padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px)); background: var(--sea-deep); }
  .mobile-ticket > span { font: 500 20px/1.2 var(--serif); }
  .mobile-ticket small { display: block; font-size: 15px; font-weight: 400; white-space: nowrap; }
}

@media (max-width: 360px) {
  .hero-foot { gap: 10px; }
  .hero-actions { gap: 8px; }
  .hero-actions .button { padding-inline: 8px; font-size: 18px; }
  .film-toggle { width: 36px; min-width: 36px; }
  .mobile-ticket { gap: 8px; }
  .mobile-ticket .button { padding-inline: 14px; }
}

/* ---------- Phone on its side ---------- */
@media (max-height: 480px) and (orientation: landscape) {
  .mobile-ticket { display: none; }
  .header-ticket { display: inline-flex; }
  .hero { padding-bottom: 20px; }
  .hero h1 { font-size: min(11vw, 26vh); }
  .hero h1 span, .hero h1 span:first-child { display: inline; font-size: 1em; margin: 0; }
  .hero-foot { flex-wrap: nowrap; gap: 20px; }
  .hero-date { width: auto; white-space: nowrap; }
  .hero-actions { flex: none; }
  .film-toggle { margin-left: auto; }
  .interlude { min-height: 100svh; padding-block: 80px 24px; }
  .tickets { grid-template-columns: auto 1fr; padding-block: 48px; gap: 32px; }
  .ticket-date { font-size: 11vw; }
  .ticket-action .button, .footer .button { width: auto; }
  .merch-section { grid-template-columns: 1.35fr 1fr; }
  .merch-copy { padding-block: 40px; }
  .merch-soon { font-size: 8vw; }
  .merch-photo img { aspect-ratio: auto; }
  .wall { grid-template-columns: repeat(4, 1fr); grid-auto-rows: 16.65vw; }
  .last-year-head { padding-block: 40px 24px; }
  .footer { padding-block: 48px 24px; }
  .lightbox { padding: 12px 110px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
