/* Deeper Dance — single-file stylesheet.
   Colours + fonts come from tenant CSS custom properties injected in base.html,
   so white-labelling is a data change, never a template edit.

   Palette (Rachel's brief):
     background          #F3EDF2  (soft lilac-white)
     maroon              #603649  (nav band, buttons, footer, headings)
     gold                #E9A924  (nav links, headings on maroon)
     blue                #102375  (body text, button hover)
     orange              #E85F24  (card kicker / top-text)
     chip                #FBF9FB  (inactive filter buttons)

   Fonts (Rachel's brief):
     H1     Sorts Mill Goudy (normal)     -> --font-display
     H2     Ancizar Serif (extra-bold italic) -> --font-h2
     Quote  Sorts Mill Goudy (italic)     -> --font-quote
     Body   Figtree (medium)              -> --font-family                        */

:root {
  --colour-primary: #603649;   /* maroon */
  --colour-accent:  #E9A924;   /* gold   */
  --colour-bg:      #F3EDF2;   /* soft lilac-white background */
  --colour-text:    #102375;   /* blue body text */
  --colour-orange:  #E85F24;   /* card kicker / top-text */
  --colour-cream:   #FBF9FB;   /* chip / inactive filter buttons */
  --colour-maroon-rgb: 96, 54, 73;
  --font-family: 'Figtree', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --font-display: 'Sorts Mill Goudy', Georgia, 'Times New Roman', serif;
  --font-h2: 'Ancizar Serif', Georgia, 'Times New Roman', serif;
  --font-quote: 'Sorts Mill Goudy', Georgia, serif;

  --maxw: 64rem;
  --radius: 14px;
  --card-shadow: 0 1px 2px rgba(16, 20, 30, .06), 0 10px 28px rgba(16, 20, 30, .10);
  --line: #e4dde0;
  --surface: #ffffff;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-family);
  font-weight: 500;               /* Figtree Medium */
  color: var(--colour-text);
  background: var(--colour-bg);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 1.25rem; }

a { color: var(--colour-primary); text-underline-offset: 3px; }
a:hover { color: var(--colour-text); }

/* ---- Header (maroon band, gold links, blurred fade at bottom) ----------- */
.site-header {
  background: var(--colour-primary);
  position: sticky;
  top: 0;
  z-index: 20;
}
.site-header::after {
  /* Soft blurred fade beneath the band, so content scrolls under a frosted edge. */
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -18px;
  height: 18px;
  background: linear-gradient(
    to bottom,
    rgba(var(--colour-maroon-rgb), .55),
    rgba(var(--colour-maroon-rgb), 0)
  );
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  pointer-events: none;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 0;
}
.brand { text-decoration: none; display: inline-flex; align-items: center; }
.brand img { height: 54px; display: block; width: auto; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.5rem;
  color: #fff;
}
.site-nav a {
  margin-left: 1.6rem;
  text-decoration: none;
  font-weight: 600;
  font-size: .98rem;
  color: var(--colour-accent);
}
.site-nav a:hover { color: #fff; }

/* ---- Footer (maroon band, gold headings/links) -------------------------- */
.site-footer {
  margin-top: 4rem;
  padding: 2.5rem 0;
  background: var(--colour-primary);
  color: #f3e9ec;
  font-size: .92rem;
}
.site-footer a { color: var(--colour-accent); }
.site-footer a:hover { color: #fff; }

/* ---- Headings ----------------------------------------------------------- */
.page-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem);
  color: var(--colour-primary);
  margin: 1.5rem 0 .5rem;
}
.section-title {
  font-family: var(--font-h2);
  font-weight: 800;               /* Ancizar Serif Extra-bold */
  font-style: italic;
  font-size: 1.8rem;
  color: var(--colour-primary);
  margin: 1.75rem 0 1rem;
  display: flex;
  align-items: center;
  gap: .8rem;
}

/* Pull-quotes / the hero tagline — Sorts Mill Goudy italic. */
.quote {
  font-family: var(--font-quote);
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.4;
  color: var(--colour-primary);
}
.section-title::after { content: ""; flex: 1; height: 1px; background: rgba(var(--colour-maroon-rgb), .35); }

/* Headings sitting on a maroon background turn gold. */
.on-maroon h1, .on-maroon h2, .on-maroon h3,
.on-maroon .page-title, .on-maroon .section-title { color: var(--colour-accent); }
.on-maroon .section-title::after { background: rgba(233, 169, 36, .4); }

/* ---- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-block;
  background: var(--colour-primary);
  color: #fff;
  text-decoration: none;
  padding: .8rem 1.5rem;
  border-radius: 999px;
  border: 0;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .12s ease, transform .08s ease;
}
.btn:hover { background: var(--colour-text); color: #fff; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn-accent { background: var(--colour-accent); color: var(--colour-primary); }
.btn-accent:hover { background: var(--colour-text); color: #fff; }
.btn-ghost { background: transparent; color: var(--colour-primary); border: 1.5px solid var(--colour-primary); }
.btn-ghost:hover { background: var(--colour-primary); color: #fff; }
.btn[disabled], .btn.is-disabled { opacity: .5; pointer-events: none; }

/* ---- Filter buttons (All / Classes / Workshops) ------------------------- */
.filters { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.5rem 0 1rem; }
.filter-btn {
  background: var(--colour-cream);
  color: var(--colour-primary);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .55rem 1.3rem;
  font-family: inherit;
  font-size: .98rem;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s ease, color .12s ease;
}
.filter-btn:hover { border-color: var(--colour-primary); }
.filter-btn.is-active { background: var(--colour-primary); color: #fff; }

/* ---- Event grid + cards ------------------------------------------------- */
.event-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
  gap: 1.25rem;
  margin: 1rem 0;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: var(--card-shadow);
  transition: transform .1s ease, box-shadow .15s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 2px 4px rgba(16,20,30,.08), 0 16px 36px rgba(16,20,30,.16); }
/* Filter JS toggles the [hidden] attribute; this beats .card{display:flex}
   so hidden cards actually disappear. */
.event-grid .card[hidden] { display: none; }
/* Promo images (event cards + detail hero) show whole — never cropped.
   Rachel reuses banner-style images, so a single default keeps them consistent. */
.card-img {
  display: block;
  width: 100%;
  height: auto;              /* natural aspect ratio — image fits fully inside */
  object-fit: contain;
  background: var(--colour-cream);
}
.card-body { padding: 1.3rem 1.4rem; display: flex; flex-direction: column; flex: 1; }
.card .kicker {
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--colour-orange);
  margin: 0 0 .35rem;
}
.card h3,
h3 {
  margin: 0 0 .5rem;
  font-family: var(--font-h2);     /* Ancizar Serif Extra-bold Italic */
  font-weight: 800;
  font-style: italic;
  font-size: 1.4rem;
  line-height: 1.2;
  color: var(--colour-primary);
}
.card .meta { color: #5a5560; font-size: .92rem; margin: .12rem 0; }
.card .card-cta { margin-top: auto; padding-top: 1rem; }

.badge {
  display: inline-block;
  font-size: .75rem;
  font-weight: 700;
  padding: .25rem .7rem;
  border-radius: 999px;
  background: var(--colour-cream);
  color: var(--colour-primary);
}
.badge-soldout { background: #f7e4d8; color: #a6531f; }

/* ---- Panels ------------------------------------------------------------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.4rem 1.5rem;
  margin: 1.25rem 0;
  box-shadow: var(--card-shadow);
}
.lede { font-size: 1.1rem; color: #f0eaec; }
main .lede { color: var(--colour-text); }

/* ---- Detail meta line --------------------------------------------------- */
.detail-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.5rem;
  color: #26224a;
  margin: .5rem 0 1.5rem;
  font-size: 1rem;
}
.detail-meta strong { color: var(--colour-text); font-weight: 700; }
/* Detail image sized to fit the image itself (not cropped, not upscaled). */
.detail-hero {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--colour-cream);
  margin: .5rem 0 1.25rem;
}

/* ---- Prices list -------------------------------------------------------- */
.prices { list-style: none; padding: 0; margin: .5rem 0; display: grid; gap: .5rem; }
.prices li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .8rem 1.1rem;
}
.price-tag { font-weight: 700; color: var(--colour-primary); white-space: nowrap; }

/* ---- Forms -------------------------------------------------------------- */
.form-row { margin: 1.15rem 0; }
.form-row label { display: block; font-weight: 600; margin-bottom: .4rem; }
input[type=text], input[type=email], input[type=number],
select, textarea {
  width: 100%;
  padding: .7rem .8rem;
  border: 1px solid #c9c2c5;
  border-radius: 10px;
  font-size: 1rem;
  font-family: inherit;
  background: #fff;
  color: var(--colour-text);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--colour-primary);
  box-shadow: 0 0 0 3px rgba(var(--colour-maroon-rgb), .18);
}
.price-options { display: grid; gap: .55rem; }
.price-options label {
  display: flex;
  align-items: center;
  gap: .7rem;
  font-weight: 500;
  background: #fff;
  border: 1px solid #c9c2c5;
  border-radius: 10px;
  padding: .8rem 1rem;
  margin: 0;
  cursor: pointer;
}
.price-options label:hover { border-color: var(--colour-primary); }
.checkbox-row { display: flex; gap: .6rem; align-items: flex-start; }
.checkbox-row input { margin-top: .35rem; width: auto; }
.checkbox-row label { font-weight: 500; margin: 0; }
.errorlist { color: #b0246a; margin: .3rem 0; padding-left: 1.1rem; font-size: .9rem; }
.help { color: #5a5560; font-size: .88rem; }

/* ---- Flash messages ----------------------------------------------------- */
.flash { padding: .8rem 1.1rem; border-radius: 10px; margin: 1rem 0; border: 1px solid; background:#fff; }
.flash-success { border-color: #bfe0c9; }
.flash-error { border-color: #f0bdc8; }
.flash-info { border-color: #cdd6f0; }

.muted { color: #4b4763; }

/* Section icon (optional dancer motif between sections). */
.section-icon { display: block; height: 56px; margin: 2rem auto 1rem; opacity: .9; }

@media (max-width: 640px) {
  body { font-size: 16px; }
  .site-nav a { margin-left: 1rem; }
  .brand img { height: 44px; }
}
