/* ==========================================================================
   Fer Xplosion — modernized stylesheet
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  --cream:  #f8f3e1;
  --ink:    #1a1517;
  --pop:    #ff3150;
  --maroon: #6d4344;
  --teal:   #64909c;
  --acid:   #ffd94d;
  --paper:  #ede4c7;

  --font-display: "Alfa Slab One", "Impact", "Arial Black", sans-serif;
  --font-body:    "Gentium Book Plus", Georgia, "Times New Roman", serif;

  --size-1: clamp(0.95rem, 0.9rem + 0.2vw, 1.05rem);
  --size-2: clamp(1.05rem, 1rem   + 0.4vw, 1.25rem);
  --size-3: clamp(2rem,    1.4rem + 2.5vw, 3.5rem);
  --size-4: clamp(2.5rem,  1.8rem + 3.5vw, 5rem);
  --size-5: clamp(3.5rem,  2rem   + 6vw,   8rem);

  --ease-out:    cubic-bezier(0.175, 0.885, 0.320, 1.275);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);

  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);

  --nav-gap: clamp(0.5rem, 1.5vw, 1.25rem);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg, video, iframe { display: block; max-width: 100%; }
img { height: auto; }
button { font: inherit; cursor: pointer; border: 0; background: none; color: inherit; }
a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 3px solid var(--pop);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Base ---------- */
html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-body);
  font-size: var(--size-2);
  line-height: 1.55;
  color: var(--ink);
  background: var(--cream) url("../Images/bgdMArble.jpg") center/cover fixed;
  overflow-x: hidden;
}

/* Full-page snap like the original fullPage.js — desktop only.
   Disabled on mobile where bio+SoundCloud can exceed viewport height. */
@media (min-width: 900px) {
  html { scroll-snap-type: y mandatory; }
  .section { scroll-snap-align: start; }
}

.skip-link {
  position: fixed;
  top: 0.5rem; left: 0.5rem;
  padding: 0.5rem 0.75rem;
  background: var(--ink); color: var(--cream);
  border-radius: 4px;
  transform: translateY(-150%);
  transition: transform 0.2s var(--ease-smooth);
  z-index: 10000;
}
.skip-link:focus-visible { transform: translateY(0); }

/* ---------- Grain overlay ---------- */
.grain {
  position: fixed; inset: 0;
  pointer-events: none;
  z-index: 9998;
  opacity: 0.18;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.1  0 0 0 0 0.08  0 0 0 0 0.09  0 0 0 0 0.5  0 0 0 0 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

/* ---------- Section scaffold ---------- */
.section {
  position: relative;
  min-height: 100svh;
  min-height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
  padding: clamp(3rem, 6vh, 5rem) clamp(1rem, 4vw, 3rem);
}

.section-title {
  font-family: var(--font-display);
  font-size: var(--size-4);
  line-height: 0.92;
  margin: 0 0 1.5rem;
  text-transform: uppercase;
  letter-spacing: -0.01em;
}

/* ==========================================================================
   HERO
   ========================================================================== */
.section--hero {
  background-image:
    linear-gradient(180deg, rgba(248,243,225,0) 40%, rgba(26,21,23,0.35) 100%),
    url("../Images/1SlideBackground.jpg");
  background-size: cover;
  background-position: center;
  padding-bottom: 0;                  /* let the Fer image touch the bottom border */
}

.hero-title {
  position: absolute;
  left: clamp(1rem, 6vw, 5rem);
  bottom: clamp(5rem, 14vh, 9rem);
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(3rem, 11vw, 9.5rem);
  line-height: 0.86;
  color: var(--cream);
  text-transform: uppercase;
  z-index: 7;
  display: flex;
  flex-direction: column;
  text-shadow:
    3px 3px 0 var(--pop),
    0 10px 30px rgba(0,0,0,0.25);
}
.hero-title span:nth-child(2) {
  margin-left: clamp(0.5rem, 4vw, 3rem);
  color: var(--acid);
}

.hero-logo {
  position: relative;
  z-index: 6;
  width: min(130%, 1512px);           /* 2.1× the original size */
  align-self: end;                    /* pin to bottom of hero grid */
  justify-self: center;
  margin: 0;
  display: block;
  filter: drop-shadow(0 12px 40px rgba(0,0,0,0.25));
}

/* Decorative collage */
.deco { position: absolute; pointer-events: none; }

.deco--upper   { top: 0;    left: 0;    width: 100%;                        z-index: 2; }
.deco--rocket  { top: 8%;   right: 3%;  width: clamp(120px, 22vw, 380px);   z-index: 4;
                 animation: bob 7s var(--ease-smooth) infinite;
                 transform-origin: center; }
.deco--synth   { bottom: 10%; right: 2%; width: clamp(140px, 26vw, 440px);  z-index: 4;
                 animation: bob 9s var(--ease-smooth) infinite reverse; }
.deco--saucers {
  top: 14%;  left: 2%;   width: clamp(120px, 24vw, 400px);   z-index: 5;
  pointer-events: auto;
  animation: bob 11s var(--ease-smooth) infinite 0.3s;
  transition: transform 0.35s var(--ease-out);
  will-change: transform;
  transform-style: preserve-3d;
}
.deco--flower-l { bottom: 0; left: -2%;  width: clamp(140px, 24vw, 380px);  z-index: 6; }
.deco--flower-r { bottom: 0; right: -3%; width: clamp(220px, 42vw, 640px);  z-index: 6; }

@keyframes bob {
  0%, 100% { transform: translateY(0)    rotate(0deg); }
  50%      { transform: translateY(-14px) rotate(1deg); }
}

/* Scroll cue */
.scroll-cue {
  position: absolute;
  left: 50%; bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 8;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.25rem;
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--cream);
  animation: cue 2.2s ease-in-out infinite;
}
@keyframes cue {
  0%, 100% { transform: translate(-50%, 0);  opacity: 0.6; }
  50%      { transform: translate(-50%, 6px); opacity: 1;   }
}

/* ==========================================================================
   AGENDA
   ========================================================================== */
.section--agenda {
  background-image:
    linear-gradient(180deg, rgba(26,21,23,0.2), rgba(26,21,23,0.55)),
    url("../Images/3SlideBackground.jpg");
  background-size: cover;
  background-position: center;
}

.agenda-body {
  position: absolute;
  left: 4%; bottom: 0;
  height: 78%;
  width: auto;
  z-index: 1;
  filter: drop-shadow(0 20px 40px rgba(0,0,0,0.4));
}

.agenda-wrap {
  position: relative;
  z-index: 2;
  width: min(640px, 100%);
  margin-left: auto;
  margin-right: clamp(1rem, 5vw, 5rem);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: rgba(248,243,225,0.94);
  border: 2px solid var(--ink);
  border-radius: 4px;
  box-shadow: 12px 12px 0 var(--pop);
}

.agenda-title {
  color: var(--maroon);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.08em;
  text-decoration-color: var(--pop);
  margin-bottom: 1.5rem;
}

.agenda-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.agenda-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: baseline;
  padding-bottom: 1rem;
  border-bottom: 1px dashed rgba(26,21,23,0.25);
}
.agenda-list li:last-child { border-bottom: 0; padding-bottom: 0; }

.agenda-date {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 1.2rem + 1vw, 2.25rem);
  line-height: 1;
  color: var(--ink);
  white-space: nowrap;
}
.agenda-date small {
  display: block;
  font-size: 0.45em;
  color: var(--pop);
  letter-spacing: 0.1em;
  margin-top: 0.3em;
}

.agenda-event {
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  line-height: 1.4;
}
.agenda-event strong { display: block; color: var(--ink); }
.agenda-event span   { color: var(--maroon); font-style: italic; }
.agenda-description {
  margin: 0.4rem 0 0;
  font-size: 0.95em;
  line-height: 1.5;
  color: rgba(26, 21, 23, 0.75);
  font-style: normal;
}

.agenda-fallback {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--ink);
}
.agenda-fallback a {
  color: var(--pop);
  font-weight: 700;
  border-bottom: 2px solid currentColor;
}

/* ==========================================================================
   BIO
   ========================================================================== */
.section--bio {
  background-image:
    linear-gradient(180deg, rgba(248,243,225,0.7), rgba(248,243,225,0.85)),
    url("../Images/2SlideBackground.jpg");
  background-size: cover;
  background-position: center;
}

.bio-grid {
  width: min(1200px, 100%);
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding: 1rem;
}

.bio-text .section-title {
  color: var(--maroon);
  position: relative;
  display: inline-block;
}
.bio-text .section-title::after {
  content: "";
  position: absolute;
  left: 0; bottom: -0.2em;
  width: 2ch;
  height: 0.2em;
  background: var(--pop);
}

.bio-text p {
  margin: 0 0 1em;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.2rem);
  line-height: 1.65;
}
.bio-text strong { color: var(--ink); font-weight: 700; }
.bio-text em     { color: var(--pop); font-style: italic; }

.bio-player {
  background: var(--ink);
  border: 3px solid var(--ink);
  border-radius: 4px;
  box-shadow: 10px 10px 0 var(--pop);
  overflow: hidden;
}
.bio-player iframe { display: block; border: 0; }

/* ==========================================================================
   NAV: dots + social rail (DESKTOP default)
   ========================================================================== */
.dots {
  position: fixed;
  right: var(--nav-gap);
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 0.5rem;
}
.dot {
  position: relative;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: rgba(248,243,225,0.4);
  border: 2px solid var(--cream);
  transition: all 0.3s var(--ease-smooth);
  display: block;
}
.dot.is-active {
  background: var(--pop);
  transform: scale(1.3);
  border-color: var(--pop);
}
.dot span {
  position: absolute;
  right: calc(100% + 10px);
  top: 50%; transform: translateY(-50%);
  padding: 0.15rem 0.55rem;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 2px;
  opacity: 0; pointer-events: none;
  white-space: nowrap;
  transition: opacity 0.2s;
}
.dot:hover span { opacity: 1; }

.social-rail {
  position: fixed;
  left: var(--nav-gap);
  top: 50%;
  transform: translateY(-50%);
  z-index: 500;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}
.social-rail a {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: rgba(26,21,23,0.6);
  color: var(--cream);
  transition: all 0.25s var(--ease-smooth);
}
.social-rail a:hover,
.social-rail a:focus-visible {
  background: var(--pop);
  color: var(--cream);
  transform: scale(1.1) rotate(-5deg);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 400;
  padding: 0.85rem clamp(1rem, 4vw, 4rem);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  font-size: 0.78rem;
  color: var(--cream);
  background: linear-gradient(180deg, rgba(26,21,23,0), rgba(26,21,23,0.55));
  pointer-events: none;
}
.site-footer p,
.site-footer nav { margin: 0; pointer-events: auto; }
.site-footer a {
  margin: 0 0.2rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s;
}
.site-footer a:hover { border-bottom-color: currentColor; }

/* ==========================================================================
   Cookie banner
   ========================================================================== */
.cookie-banner {
  position: fixed;
  left: 50%; bottom: 1rem;
  transform: translateX(-50%) translateY(120%);
  z-index: 9999;
  width: min(640px, calc(100% - 2rem));
  padding: 1rem 1.25rem;
  background: var(--ink);
  color: var(--cream);
  border: 2px solid var(--pop);
  border-radius: 4px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.4);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: center;
  transition: transform 0.4s var(--ease-out);
  font-family: var(--font-body);
}
.cookie-banner[data-visible="true"] {
  transform: translateX(-50%) translateY(0);
}
.cookie-banner p { margin: 0; font-size: 0.9rem; line-height: 1.45; }
.cookie-banner a { color: var(--acid); border-bottom: 1px solid currentColor; }

.cookie-actions { display: flex; gap: 0.5rem; }
.btn {
  padding: 0.65rem 1rem;
  min-height: 44px;
  border-radius: 2px;
  font-family: var(--font-display);
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: all 0.2s var(--ease-smooth);
  white-space: nowrap;
}
.btn--ghost {
  background: transparent;
  color: var(--cream);
  border: 1px solid rgba(248,243,225,0.4);
}
.btn--ghost:hover,
.btn--ghost:focus-visible { border-color: var(--cream); }
.btn--solid {
  background: var(--pop);
  color: var(--cream);
}
.btn--solid:hover,
.btn--solid:focus-visible { background: var(--acid); color: var(--ink); }

/* ==========================================================================
   TABLET & BELOW
   ========================================================================== */
@media (max-width: 900px) {
  .bio-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .bio-player iframe { height: 360px; }

  .social-rail {
    top: calc(var(--safe-t) + 1rem);
    left: auto;
    right: calc(var(--safe-r) + 1rem);
    transform: none;
    flex-direction: row;
    gap: 0.5rem;
  }
  .social-rail a {
    width: 40px; height: 40px;
    background: rgba(26,21,23,0.7);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  .dots {
    flex-direction: row;
    right: auto;
    left: 50%;
    top: auto;
    bottom: calc(var(--safe-b) + 1rem);
    transform: translateX(-50%);
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: rgba(26,21,23,0.55);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 999px;
  }
  .dot span { display: none; }

  .site-footer {
    position: static;
    background: var(--ink);
    color: var(--cream);
    padding: 1.25rem 1rem calc(4.5rem + var(--safe-b));
    flex-direction: column;
    gap: 0.4rem;
    font-size: 0.75rem;
    text-align: center;
  }

  .cookie-banner {
    bottom: calc(var(--safe-b) + 4.5rem);
  }

  /* Rose-coloured frame around the viewport — mobile/tablet only */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    border: 6px solid var(--pop);
    pointer-events: none;
    z-index: 9999;
  }
}

/* ==========================================================================
   PHONE
   ========================================================================== */
@media (max-width: 600px) {
  .hero-title {
    left: 1rem;
    right: 1rem;
    bottom: auto;
    top: calc(20% - 26px);                     /* net: up 26 px from 20% (nudged down a further 10 px) */
    transform: translateY(-50%);               /* center title vertically in the section */
    font-size: clamp(2.4rem, 13.2vw, 4.8rem);  /* 20% larger than before */
    text-align: center;
    align-items: center;
  }
  .hero-title span:nth-child(2) { margin-left: 0; }

  .hero-logo {
    height: 75vh;
    height: 75svh;
    width: auto;
    max-width: none;          /* let it bleed off the sides if it wants to */
    margin: 0;
    align-self: end;          /* pin to bottom of section */
    justify-self: center;     /* but horizontally centred — bleeds equally L/R */
    transform: translateX(-30vw); /* then shift 30% of viewport width to the left */
  }

  .section--hero {
    place-items: center;
    padding-bottom: 0;        /* so the image actually touches the bottom border */
  }

  .deco--upper   { opacity: 0.85; }
  .deco--rocket  { width: 40vw; top: 110px; right: calc(2% + 40px); }
  .deco--synth   { width: 52vw; bottom: 44%; left: 20px; right: auto; }
  .deco--saucers { width: 30vw; top: 80px; left: 140px; }
  .deco--flower-l { display: none; }
  .deco--flower-r { width: 70vw; right: -10%; }

  .scroll-cue { display: none; }

  .agenda-body {
    height: auto;
    width: 60%;
    left: -8%;
    bottom: -4%;
    opacity: 0.35;
  }
  .agenda-wrap {
    margin: 0 auto;
    width: 100%;
    max-width: 420px;
  }
  .agenda-title { margin-bottom: 1rem; }

  .cookie-banner {
    grid-template-columns: 1fr;
    padding: 0.9rem 1rem;
  }
  .cookie-actions { justify-content: flex-end; }

  .bio-text p { font-size: 1rem; line-height: 1.6; }
  .bio-player iframe { height: 320px; }
}

/* ==========================================================================
   LANDSCAPE PHONES
   ========================================================================== */
@media (max-height: 600px) and (orientation: landscape) {
  .hero-title { font-size: clamp(2rem, 6vw, 3.5rem); top: 18%; }
  .hero-logo  { width: 95%; }         /* 2.1× the original size */
  .deco--rocket, .deco--synth, .deco--saucers { opacity: 0.7; }
}

/* ==========================================================================
   REDUCED MOTION
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
  html { scroll-behavior: auto; }
  .deco--saucers { transform: none !important; }
}

/* ==========================================================================
   LEGAL PAGES
   ========================================================================== */
.legal-page {
  min-height: 100vh;
  padding: clamp(2rem, 6vw, 5rem) clamp(1rem, 5vw, 3rem) 6rem;
  color: var(--ink);
  background: var(--cream);
}
.legal-page .legal-wrap {
  max-width: 760px;
  margin: 0 auto;
  background: var(--paper);
  padding: clamp(1.5rem, 4vw, 3rem);
  border: 2px solid var(--ink);
  box-shadow: 10px 10px 0 var(--pop);
  border-radius: 2px;
}
.legal-page h1 {
  font-family: var(--font-display);
  font-size: var(--size-3);
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  color: var(--maroon);
  line-height: 0.95;
}
.legal-page h2 {
  font-family: var(--font-display);
  font-size: var(--size-2);
  text-transform: uppercase;
  margin: 2rem 0 0.5rem;
  color: var(--pop);
  letter-spacing: 0.02em;
}
.legal-page p, .legal-page li { line-height: 1.65; }
.legal-page a {
  color: var(--pop);
  border-bottom: 1px solid currentColor;
  word-break: break-word;
}
.legal-back {
  display: inline-block;
  margin-bottom: 1.5rem;
  font-family: var(--font-display);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--ink);
}
.legal-back::before { content: "← "; }
.legal-page table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
  display: block;
  overflow-x: auto;
}
.legal-page th, .legal-page td {
  padding: 0.5rem 0.75rem;
  text-align: left;
  border: 1px solid var(--ink);
}
.legal-page th {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: normal;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-size: 0.8rem;
}
