/* ════════════════════════════════════════════════════════════════════
   THE JANSSON'S TEMPTATION EXPERIENCE — site stylesheet
   You normally never need to edit this file. All text/content edits
   happen in index.html and js/gigs.js — see README.md.
   ════════════════════════════════════════════════════════════════════ */

/* ── Design tokens ──────────────────────────────────────────────── */
:root {
  /* Backgrounds, darkest to lightest — deep lava-lamp violet */
  --bg-0: #1C0A30;
  --bg-1: #241040;
  --bg-2: #2E164F;
  --bg-3: #3A2061;

  /* Hairlines & borders */
  --border: #45296E;
  --border-strong: #5B3A8C;

  /* Text */
  --text: #EADFF7;
  --text-bright: #FFF7E6;
  --text-muted: #B79BD9;

  /* Marigold accent (--accent-dim is decorative only — never small text) */
  --accent: #FFA43B;
  --accent-bright: #FFC96B;
  --accent-dim: #C97B22;
  --accent-glow: rgba(255, 164, 59, 0.35);
  --fog-1: rgba(255, 111, 199, 0.14);
  --fog-2: rgba(64, 224, 195, 0.10);

  /* Form feedback */
  --error: #FF9AA8;
  --success: #8FE3A8;

  /* Fonts — groovy 60s/70s poster lettering over a soft rounded body */
  --font-display: "Righteous", "Trebuchet MS", sans-serif;
  --font-fancy: "Shrikhand", Georgia, serif;
  --font-body: "Quicksand", "Trebuchet MS", sans-serif;
  --font-label: "Righteous", "Trebuchet MS", sans-serif;

  /* Layout */
  --nav-h: 54px;
  --dock-h: 60px;
  --container: 1080px;
}

/* ── Reset & base ───────────────────────────────────────────────── */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-padding-top: calc(var(--nav-h) + 16px);
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  /* Keep page content clear of the fixed social bar */
  padding-bottom: var(--dock-h);
}

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

a {
  color: var(--accent);
  text-decoration: none;
  transition: color 180ms ease;
}

button {
  font: inherit;
  cursor: pointer;
}

::selection {
  background: var(--accent);
  color: var(--bg-0);
}

:focus-visible {
  outline: 2px solid var(--accent-bright);
  outline-offset: 3px;
}

/* Full-page artwork backdrop, pinned in place while the page scrolls.
   The violet tint keeps the busy collage from fighting the text; the
   plain --bg-0 on body remains the fallback if the image fails. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(rgba(28, 10, 48, 0.68), rgba(28, 10, 48, 0.68)),
    url("../assets/maja.jpg") center / cover no-repeat;
}

/* Film grain over everything — the warm, analog poster-print atmosphere */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  opacity: 0.05;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ── Utilities ──────────────────────────────────────────────────── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
}

.section {
  padding-block: clamp(4rem, 10vw, 7rem);
}

.section--alt {
  /* Same backdrop as everything else — the alternating shade and the
     section dividers were dropped so the artwork runs uninterrupted. */
  background: transparent;
}

.section-title {
  /* Groovy display face — set in title case on purpose; all-caps
     Shrikhand loses its bounce. */
  font-family: var(--font-fancy);
  font-weight: 400;
  font-size: clamp(2.2rem, 5vw, 3.1rem);
  letter-spacing: 0.03em;
  line-height: 1.1;
  color: var(--text-bright);
  margin-bottom: 1.75rem;
}

.btn {
  display: inline-block;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: 0;
  padding: 0.85em 1.8em;
  transition: color 180ms ease, border-color 180ms ease,
    background 180ms ease, box-shadow 180ms ease;
}

.btn:hover,
.btn:focus-visible {
  color: var(--accent-bright);
  border-color: var(--accent-dim);
  background: rgba(255, 164, 59, 0.08);
  box-shadow: 0 0 20px var(--accent-glow);
}

.btn--solid {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--bg-0);
}

.btn--solid:hover,
.btn--solid:focus-visible {
  background: var(--accent-bright);
  border-color: var(--accent-bright);
  color: var(--bg-0);
}

.btn--small {
  font-size: 0.72rem;
  padding: 0.6em 1.3em;
}

.badge {
  display: inline-block;
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  border: 1px solid var(--border-strong);
  padding: 0.45em 0.9em;
}

.badge--free {
  color: var(--accent);
  border-color: var(--accent-dim);
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 1rem;
  z-index: 1000;
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-bright);
  background: var(--bg-2);
  border: 1px solid var(--accent);
  padding: 0.75em 1.25em;
}

.skip-link:focus {
  top: 1rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Honeypot: off-screen (not display:none — fools naive bots) */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ── Nav ────────────────────────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 240ms ease, border-color 240ms ease;
}

.nav--scrolled {
  background: rgba(28, 10, 48, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-bottom-color: var(--border);
}

.nav__brand {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: 0.18em;
  color: var(--text-bright);
}

/* Uploaded logo in the nav (shown instead of the text when one exists) */
.nav__brand-img {
  display: block;
  max-height: 44px;
  max-width: min(340px, 50vw);
  width: auto;
  height: auto;
}

/* display:block above would defeat the hidden attribute the image
   carries until a logo is uploaded — keep it truly hidden. */
.nav__brand-img[hidden] {
  display: none;
}

.nav__brand:hover,
.nav__brand:focus-visible {
  color: var(--accent-bright);
}

.nav__links {
  display: flex;
  gap: 2rem;
}

.nav__links a {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  text-underline-offset: 6px;
}

.nav__links a:hover,
.nav__links a:focus-visible {
  color: var(--accent-bright);
  text-decoration: underline;
}

/* ── Hero ───────────────────────────────────────────────────────── */
.hero {
  position: relative;
  overflow: hidden;
  /* Tall but not forced-fullscreen — capped so big monitors don't get
     a mostly-empty first screen. */
  min-height: min(100vh, 700px);
  min-height: min(100svh, 700px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  /* No background of its own — the backdrop artwork shows plain here */
  padding: calc(var(--nav-h) + 2rem) 1.5rem 6rem;
}

.hero__logo {
  width: min(560px, 78vw);
  height: auto;
  filter: drop-shadow(0 0 40px rgba(255, 164, 59, 0.25));
}

.hero__tagline {
  font-family: var(--font-label);
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

/* ── About ──────────────────────────────────────────────────────── */
#about {
  /* Slightly tighter on top so it sits closer to the hero; bottom keeps
     the roomier rhythm toward Shows. */
  padding-block: clamp(4rem, 9vw, 7rem) clamp(6rem, 13vw, 10rem);
}

.about__grid {
  display: grid;
  /* Text column wider than the photo so a full-length bio ends up
     roughly as tall as the square photo beside it. */
  grid-template-columns: 1fr 1.5fr;
  max-width: 1280px;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.about__photo {
  position: relative;
  border: 1px solid var(--border-strong);
  transition: border-color 180ms ease;
}

.about__photo:hover {
  border-color: var(--accent-dim);
}

.about__photo img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  filter: saturate(1.2) contrast(1.05);
}

/* Warm sunset tint that unifies any photo with the palette */
.about__photo::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(160deg, rgba(255, 164, 59, 0.12), transparent 55%);
  mix-blend-mode: overlay;
}

.about__text p + p {
  margin-top: 1rem;
}

.about__ffo {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 1.5rem;
}

/* ── Shows ──────────────────────────────────────────────────────── */
.gig-list {
  list-style: none;
}

.gig {
  display: grid;
  grid-template-columns: 150px 1fr auto;
  gap: 1.5rem;
  align-items: center;
  background: var(--bg-2);
  border: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  margin-bottom: 0.75rem;
  transition: background 180ms ease, box-shadow 180ms ease;
}

.gig:hover {
  background: var(--bg-3);
  box-shadow: inset 3px 0 0 var(--accent-dim), 0 0 20px rgba(255, 164, 59, 0.15);
}

.gig__date {
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  color: var(--accent);
}

.gig__venue {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-bright);
  line-height: 1.3;
}

.gig__city {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.gig__tba {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.gig-empty {
  font-family: var(--font-label);
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: center;
  border: 1px dashed var(--border);
  padding: 3rem 1rem;
}

/* ── Contact ────────────────────────────────────────────────────── */
.contact__grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: start;
}

.contact__email {
  /* Body font on purpose: the label font is display lettering, and
     the address should read as written. */
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: 0.04em;
  color: var(--accent);
  margin-block: 1rem 0.5rem;
  text-underline-offset: 5px;
}

.contact__email:hover,
.contact__email:focus-visible {
  color: var(--accent-bright);
  text-decoration: underline;
}

.socials {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.socials a {
  display: inline-flex;
  padding: 10px;
  color: var(--text-muted);
  transition: color 180ms ease, filter 180ms ease;
}

.socials a:hover,
.socials a:focus-visible {
  color: var(--accent);
  filter: drop-shadow(0 0 8px var(--accent-glow));
}

.social-dock {
  position: fixed;
  bottom: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--dock-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding-inline: clamp(1.25rem, 5vw, 2.5rem);
  background: rgba(28, 10, 48, 0.85);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  border-top: 1px solid var(--border);
}

.social-dock .socials {
  /* Middle column keeps the icons centered in the bar */
  grid-column: 2;
  flex-wrap: nowrap;
  gap: clamp(0.5rem, 2vw, 1.5rem);
}

.dock__top {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  white-space: nowrap;
  grid-column: 3;
  justify-self: end;
}

.dock__top:hover,
.dock__top:focus-visible {
  color: var(--accent-bright);
}

.form-field {
  margin-bottom: 1.25rem;
}

.form-field label {
  display: block;
  font-family: var(--font-label);
  font-weight: 500;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.form-field input,
.form-field textarea {
  display: block;
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 0;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  padding: 0.8em 1em;
  transition: border-color 180ms ease, background 180ms ease;
}

.form-field input:focus,
.form-field textarea:focus {
  border-color: var(--accent);
  background: var(--bg-3);
}

.form-field textarea {
  resize: vertical;
  min-height: 150px;
}

.form-status {
  font-family: var(--font-label);
  font-size: 0.8rem;
  letter-spacing: 0.04em;
  margin-top: 1rem;
  min-height: 1.5em;
}

.form-status--ok {
  color: var(--success);
}

.form-status--error {
  color: var(--error);
}

/* ── Newsletter ─────────────────────────────────────────────────── */
.newsletter__form {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  max-width: 560px;
}

.newsletter__field {
  flex: 1;
  margin-bottom: 0;
}

.newsletter__consent {
  font-family: var(--font-label);
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-top: 1rem;
}

/* ── Draft preview banner (opened from the edit page) ───────────── */
.preview-banner {
  position: fixed;
  top: var(--nav-h);
  inset-inline: 0;
  z-index: 95;
  background: var(--accent);
  color: var(--bg-0);
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  text-align: center;
  padding: 0.45em 1em;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .about__grid,
  .contact__grid {
    grid-template-columns: 1fr;
  }

  .about__photo {
    width: 100%;
    max-width: 520px;
    margin-inline: auto;
  }

  /* Compact bottom bar: just the icons, centered */
  .social-dock {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  .dock__top {
    display: none;
  }

  .social-dock .socials {
    grid-column: 1;
    gap: 0.25rem;
  }

  .social-dock .socials a {
    padding: 8px;
  }
}

@media (max-width: 640px) {
  .gig {
    grid-template-columns: 1fr;
    gap: 0.4rem;
    padding: 1rem 1.25rem;
  }

  .gig__action {
    margin-top: 0.6rem;
    justify-self: start;
  }

  .newsletter__form {
    flex-direction: column;
    align-items: stretch;
  }
}

@media (max-width: 520px) {
  /* The band name is long — shrink harder than usual so it fits
     beside the links on small phones. */
  .nav__brand {
    font-size: 0.78rem;
    letter-spacing: 0.1em;
  }

  .nav__links {
    gap: 1rem;
  }

  .nav__links a {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
  }

  /* Small phones: keep all eight icons on one row */
  .social-dock .socials {
    gap: 2px;
  }

  .social-dock .socials a {
    padding: 5px;
  }
}

/* ── Reduced motion ─────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
