/* ==========================================================================
   Tweedsmuir Jam Nights: page layout
   Depends on tokens.css and components.css
   Light, airy daytime sections in the spirit of the Tweedsmuir village
   website, bookended by the Jam Nights night sky.
   ========================================================================== */

/* ---- Header ----------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgb(255 255 255 / 0.96);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 rgb(27 52 64 / 0.06), 0 4px 18px rgb(27 52 64 / 0.06);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); min-height: 76px; }
.site-header .logo { --badge-size: 46px; }
.site-header .logo__name { font-size: 1.3rem; }

.site-nav { display: flex; align-items: center; gap: var(--space-6); }
.site-nav ul { display: flex; gap: var(--space-6); list-style: none; margin: 0; padding: 0; }
.site-nav a:not(.btn) {
  color: var(--jn-stone); text-decoration: none; font-family: var(--font-display);
  font-weight: var(--weight-regular); font-size: var(--text-sm);
  padding-block: var(--space-2); border-bottom: 1.5px solid transparent;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}
.site-nav a:not(.btn):hover { color: var(--jn-dusk); border-bottom-color: var(--jn-dusk); }

.menu-toggle {
  display: none; align-items: center; gap: var(--space-2);
  min-height: 44px; padding: 0 var(--space-4);
  background: transparent; color: var(--jn-ink);
  border: 1.5px solid var(--color-border); border-radius: var(--radius-md);
  font: 400 var(--text-sm) var(--font-display); cursor: pointer;
}
.menu-toggle__bars { width: 18px; height: 12px; position: relative; }
.menu-toggle__bars::before, .menu-toggle__bars::after, .menu-toggle__bars span { content: ""; position: absolute; left: 0; right: 0; height: 2px; background: currentColor; border-radius: 2px; }
.menu-toggle__bars::before { top: 0; } .menu-toggle__bars span { top: 5px; } .menu-toggle__bars::after { bottom: 0; }

@media (max-width: 60rem) {
  .menu-toggle { display: inline-flex; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: var(--space-4);
    padding: var(--space-4) var(--gutter) var(--space-6);
    background: var(--jn-white); box-shadow: 0 12px 24px rgb(27 52 64 / 0.08);
    display: none;
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav ul { flex-direction: column; gap: 0; }
  .site-nav a:not(.btn) { display: block; padding: var(--space-3) 0; font-size: var(--text-lg); border-bottom: 1px solid var(--color-border); }
  .site-nav .btn { align-self: flex-start; }
}
@media (max-width: 26rem) { .site-header .logo__place { display: none; } }

/* ---- Hero ------------------------------------------------------------- */
/* Full-width and centred, like the village website's landscape hero, but
   at night: the sky, the hills and the hall with its lights on. */
.hero {
  min-height: min(82vh, 50rem);
  display: grid; align-items: center; text-align: center;
  padding-block: clamp(3.5rem, 2rem + 5vw, 6rem) calc(clamp(130px, 22vw, 300px) + var(--space-6));
  overflow: hidden; isolation: isolate;
}
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(ellipse 70% 55% at 50% 100%, rgb(47 93 107 / 0.55), transparent 70%);
}
.hero__inner { display: grid; justify-items: center; }
.hero h1 { max-width: 13ch; margin: 0 auto var(--space-5); text-shadow: 0 2px 30px rgb(0 0 0 / 0.25); }
.hero .lead { color: var(--jn-frost); max-width: 40ch; margin: 0 auto var(--space-7); }

.next-jam { display: inline-flex; align-items: center; gap: var(--space-5); text-align: left; margin-bottom: var(--space-6); }
.next-jam .date-moon { width: 6rem; flex: none; }
.next-jam__text { font-family: var(--font-display); line-height: 1.35; }
.next-jam__label { display: block; font-size: var(--text-xs); letter-spacing: var(--tracking-label); text-transform: uppercase; color: var(--jn-lamp); margin-bottom: var(--space-1); }
.next-jam__when { display: block; font-size: var(--text-lg); color: var(--jn-white); }
.next-jam__rule { display: block; color: var(--jn-frost); font-size: var(--text-sm); font-family: var(--font-body); }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }

/* The landscape along the foot of the hero */
.hero__land { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(130px, 22vw, 300px); z-index: -1; }
.hero__land .l-far   { fill: var(--jn-dusk); opacity: 0.55; }
.hero__land .l-back  { fill: var(--jn-dusk); }
.hero__land .l-mid   { fill: var(--jn-deep); }
.hero__land .l-front { fill: var(--jn-paper); }
.hero__land .hall    { fill: #0E1D25; }
.hero__land .roof    { fill: #1C323D; }
.hero__land .window  { fill: var(--jn-lamp); }

/* Scroll-down chevron, as on the village website */
.hero__scroll {
  position: absolute; left: 50%; bottom: calc(clamp(130px, 22vw, 300px) * 0.5); transform: translateX(-50%);
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  color: var(--jn-white); opacity: 0.8;
}
.hero__scroll:hover { opacity: 1; }
.hero__scroll span { width: 18px; height: 18px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translate(-3px, -3px); }
@media (max-width: 40rem) {
  .hero__scroll { display: none; }
  .next-jam { gap: var(--space-4); }
  .next-jam .date-moon { width: 5rem; }
  .next-jam .date-moon strong { font-size: 2rem; }
}

/* Provisional marker, for details that aren't confirmed yet */
.tbc {
  display: inline-block; vertical-align: middle;
  font-family: var(--font-display); font-weight: var(--weight-regular);
  font-size: 0.625rem; letter-spacing: 0.16em; text-transform: uppercase; line-height: 1;
  padding: 0.45em 0.8em; border-radius: var(--radius-sm);
  background: var(--jn-heather-light); color: var(--jn-heather);
}
.on-night .tbc, .section--night .tbc { background: rgb(255 255 255 / 0.1); color: var(--jn-moon); }

/* ---- Sections and headings ------------------------------------------- */
.section--paper { background: var(--jn-paper); }
.section-head { max-width: 46rem; margin: 0 auto var(--space-8); text-align: center; }
.section-head p { margin-inline: auto; font-size: var(--text-lg); line-height: 1.5; }
.section-head h2 { margin-bottom: var(--space-5); }

/* Old-map band: sand with contour lines */
.section--map { background: var(--jn-sand) url("../assets/textures/contours.svg") center / cover no-repeat; }

/* ---- What ------------------------------------------------------------- */
/* Two columns split by a fine line: joining in, and everything else */
.what { display: grid; grid-template-columns: 1fr 1fr; align-items: center; max-width: 60rem; margin-inline: auto; }
.what__join { padding-right: var(--space-8); }
.what__join h3 { margin-bottom: var(--space-4); }
.what__join .dot-list { margin: 0; }
.what__or {
  margin: 0; padding-left: var(--space-8); border-left: 1px solid var(--color-border);
  font-family: var(--font-display); font-size: var(--text-xl); line-height: 1.35; color: var(--jn-ink);
}
@media (max-width: 52rem) {
  .what { grid-template-columns: 1fr; gap: var(--space-6); }
  .what__join { padding-right: 0; }
  .what__or { padding: var(--space-6) 0 0; border-left: 0; border-top: 1px solid var(--color-border); }
}

/* Instruments provided: a night-sky strip of icons */
.kit {
  margin: var(--space-8) auto 0; max-width: 60rem; padding: var(--space-5) var(--space-7);
  list-style: none; display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-5) var(--space-4);
  border-radius: var(--radius-lg); background: var(--jn-night); color: var(--jn-white);
}
.kit li { display: flex; align-items: center; gap: var(--space-3); font-family: var(--font-display); font-size: var(--text-lg); }
.kit li img { width: 44px; height: 44px; }
@media (max-width: 40rem) {
  .kit { justify-content: center; padding: var(--space-5) var(--space-4); gap: var(--space-5) 0; }
  .kit li { flex: 0 0 33.33%; flex-direction: column; gap: var(--space-2); font-size: var(--text-base); }
}

/* ---- When ----------------------------------------------------------- */
.when { display: grid; justify-items: center; text-align: center; }
.when .dates { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-4); margin: 0 0 var(--space-5); }
.when .dates li { width: 6.5rem; }
.when .dates .date-moon { width: 100%; max-width: none; }
.when .dates-note { justify-content: center; }
.when .cal { padding-top: var(--space-4); display: grid; justify-items: center; }
.when .cal__menu { text-align: left; width: min(24rem, 100%); }
@media (max-width: 30rem) { .when .dates { gap: var(--space-3); } .when .dates li { width: 5.25rem; } }

/* ---- Where ------------------------------------------------------------ */
/* The map and the hall's details in one white panel */
.where {
  display: grid; grid-template-columns: 1.6fr 1fr;
  background: var(--jn-white); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); overflow: hidden;
}
@media (max-width: 52rem) { .where { grid-template-columns: 1fr; } }
.where .map-frame { aspect-ratio: auto; min-height: 22rem; box-shadow: none; border-radius: 0; background: var(--jn-mist); }
.where__details { padding: clamp(var(--space-5), 4vw, var(--space-7)); display: flex; flex-direction: column; justify-content: center; }
.where__links { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-4) var(--space-5); margin: var(--space-2) 0 0; }

.dates { display: grid; grid-template-columns: repeat(auto-fill, minmax(5.25rem, 1fr)); gap: var(--space-3); list-style: none; padding: 0; margin: var(--space-5) 0; }
.dates .date-moon { width: 100%; max-width: 6rem; }
.dates .date-moon strong { font-size: 1.9rem; }
.dates-note { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; font-size: var(--text-sm); color: var(--jn-slate); }

.cal { position: relative; margin-top: auto; padding-top: var(--space-5); }
.cal summary { list-style: none; width: max-content; max-width: 100%; white-space: nowrap; }
.cal summary::-webkit-details-marker { display: none; }
.cal summary .chev { width: 0.6em; height: 0.6em; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform var(--duration-fast); }
.cal[open] summary .chev { transform: rotate(-135deg) translateY(-2px); }
.cal__menu { margin-top: var(--space-3); display: grid; gap: var(--space-2); padding: var(--space-3); background: var(--jn-paper); border-radius: var(--radius-md); max-width: 24rem; }
.cal__menu a { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); padding: var(--space-3) var(--space-4); border-radius: var(--radius-sm); text-decoration: none; color: var(--jn-ink); background: var(--jn-white); }
.cal__menu a:hover { background: var(--jn-lamp-light); }
.cal__menu small { color: var(--jn-slate); font-weight: var(--weight-regular); font-size: var(--text-xs); }

.address { font-style: normal; margin-bottom: var(--space-3); font-size: var(--text-lg); line-height: 1.5; color: var(--jn-ink); }
.address strong { display: block; font-family: var(--font-display); font-weight: var(--weight-regular); font-size: var(--text-xl); color: var(--jn-ink); margin-bottom: var(--space-2); }
.access { margin-bottom: var(--space-4); font-size: var(--text-sm); color: var(--jn-slate); }

/* ---- Suggest a song and questions: two cards side by side ----------- */
.involve { display: grid; grid-template-columns: 1.15fr 1fr; gap: var(--space-6); align-items: start; }
@media (max-width: 64rem) { .involve { grid-template-columns: 1fr; max-width: 44rem; } }
.form-card { background: var(--jn-white); border-radius: var(--radius-lg); box-shadow: var(--shadow-card); padding: clamp(var(--space-5), 4vw, var(--space-7)); }
.form-card h2 { font-size: var(--text-xl); margin-bottom: var(--space-3); }
.form-card > p:not(.eyebrow) { margin-bottom: var(--space-6); }
.form-card .eyebrow { font-size: var(--text-xs); }
.section--white .form-card { box-shadow: 0 0 0 1px var(--color-border), var(--shadow-card); }
.other-field[hidden] { display: none; }
.form-foot { display: flex; align-items: center; gap: var(--space-4); flex-wrap: wrap; }

/* ---- Hills into the footer --------------------------------------------- */
.hills--top { display: block; width: 100%; height: clamp(56px, 9vw, 140px); margin-bottom: -1px; position: relative; }

/* ---- Footer ----------------------------------------------------------- */
.site-footer { background: var(--jn-deep); color: var(--jn-frost); padding-block: var(--space-7) var(--space-6); font-size: var(--text-sm); }
.site-footer__grid { display: flex; flex-wrap: wrap; gap: var(--space-6); justify-content: space-between; align-items: flex-start; }
.site-footer .logo { --badge-size: 52px; }
.site-footer .logo__badge { box-shadow: 0 0 0 1.5px var(--jn-dusk); }
.site-footer .logo__place { color: var(--jn-lamp); }
.site-footer .logo__name { color: var(--jn-white); }
.site-footer nav ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-2); }
.site-footer nav a { font-family: var(--font-display); font-size: var(--text-base); }
.site-footer a { color: var(--jn-moon); font-weight: var(--weight-regular); text-decoration: none; }
.site-footer a:hover { color: var(--jn-lamp); }
.site-footer p { margin: 0; color: var(--jn-frost); }
.site-footer__base { margin-top: var(--space-6); padding-top: var(--space-5); border-top: 1px solid rgb(255 255 255 / 0.08); display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: space-between; }

/* Anchor targets clear the sticky header */
:target, section[id] { scroll-margin-top: 76px; }

/* ---- Thanks and 404 pages ----------------------------------------------- */
.simple-page { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.simple-page .logo { justify-content: center; margin: 0 auto var(--space-7); width: max-content; }
.simple-page p { margin-inline: auto; margin-bottom: var(--space-6); font-size: var(--text-lg); }
.simple-page h1 { margin-bottom: var(--space-6); }
