/*
 * Triple F Blount County Grand Opening landing page.
 * Mobile first. The hero has to hold the offer and both buttons on a
 * 390 by 844 phone without a scroll, so the hero scale is deliberately tight.
 */

@font-face {
  font-family: "Avant Garde";
  src: url("assets/fonts/AvantGarde-Md.ttf") format("truetype");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Azo Sans";
  src: url("assets/fonts/AzoSans-Reg.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

:root {
  --bg: #07090c;
  --panel: #11161d;
  --line: #35404f;
  --text: #ffffff;
  --muted: #bac2ce;
  --blue: #2060e9;
  --blue-hover: #1a50c8;
  --blue-active: #1746b0;
  /* The brand blue is a background colour. As small text on the dark panel it
     reaches only 3.4 to 1, so blue text uses this lighter tone instead, which
     measures 5.3 to 1 on the card and 5.8 to 1 on the panel. */
  --blue-text: #5e90f2;
  --red: #ed1f24;
  --focus: #78a6ff;
  --display: "Avant Garde", "Barlow", Inter, system-ui, sans-serif;
  --body: "Azo Sans", Inter, system-ui, -apple-system, sans-serif;
  --sticky-height: 72px;
}

* { box-sizing: border-box; }

html {
  background: var(--bg);
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--muted);
  font: 16px/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}

[hidden] { display: none !important; }

.wrap {
  width: min(100% - 32px, 1060px);
  margin-inline: auto;
}

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 20;
  background: var(--blue);
  color: #fff;
  padding: 12px 16px;
  border-radius: 6px;
}
.skip:focus { left: 12px; top: 12px; }

a { color: #a8c2ff; }

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

/* ------------------------------------------------------------------ hero */

.hero {
  padding: 18px 0 26px;
  text-align: center;
}

.logo {
  display: block;
  height: 26px;
  width: auto;
  margin: 0 auto 18px;
}

.eyebrow {
  margin: 0;
  color: #ff6b70;
  font: 12px/1 var(--display);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

h1 {
  margin: 12px 0 0;
  color: var(--text);
  font-family: var(--display);
  font-size: clamp(30px, 8.2vw, 64px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.02em;
  text-transform: uppercase;
}

.lead {
  max-width: 44ch;
  margin: 12px auto 0;
  font-size: 16px;
  line-height: 1.45;
}

/* --------------------------------------------------------------- booking */

.booking { margin-top: 20px; }

.actions {
  display: grid;
  gap: 12px;
  max-width: 460px;
  margin-inline: auto;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 60px;
  padding: 16px 20px;
  border: 2px solid transparent;
  border-radius: 8px;
  font: 16px/1.15 var(--display);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}
.btn-primary:hover { background: var(--blue-hover); border-color: var(--blue-hover); transform: translateY(-1px); }
.btn-primary:active { background: var(--blue-active); transform: none; }

.btn-secondary {
  background: #fff;
  border-color: #fff;
  color: #0b0f14;
}
.btn-secondary:hover { background: #e6ebf3; border-color: #e6ebf3; transform: translateY(-1px); }
.btn-secondary:active { background: #d4dbe6; transform: none; }

.call-line {
  margin: 14px 0 0;
  font-size: 15px;
  color: var(--muted);
}
.call-line a {
  color: #fff;
  text-decoration-color: #6f7b8d;
  text-underline-offset: 4px;
  display: inline-block;
  min-height: 24px;
  padding: 10px 6px;
}

/* ---------------------------------------------------------------- closed */

.closed {
  max-width: 560px;
  margin: 26px auto 0;
  padding: 26px 22px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  text-align: left;
}
.closed h2 {
  margin: 0 0 12px;
  color: #fff;
  font: 500 clamp(22px, 5vw, 30px)/1.12 var(--display);
  text-transform: uppercase;
  letter-spacing: -0.01em;
}
.closed p { margin: 0 0 20px; }
.closed .btn { max-width: 340px; }

/* ----------------------------------------------------------------- offer */

.offer {
  padding: 34px 0 30px;
  border-top: 1px solid var(--line);
}

h2 {
  color: #fff;
  font-family: var(--display);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.offer h2 {
  margin: 0 0 18px;
  font-size: clamp(22px, 5.6vw, 36px);
  line-height: 1.12;
  text-align: center;
}

/* Six compact tiles, two columns on a phone and three on desktop, even heights
   so the block reads as one tidy unit and the photographs stay close behind. */
.offer-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  max-width: 560px;
  margin: 0 auto;
  padding: 0;
  list-style: none;
  text-align: left;
}
.offer-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 62px;
  padding: 12px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: #eef1f5;
  font-size: 15px;
  line-height: 1.3;
}
/*
 * The tile labels are frozen copy, so the wrap is solved here rather than with
 * a non-breaking space in the markup, which would also break the exact string
 * assertions in check.mjs. A tile is only about 170 pixels wide on a phone, and
 * greedy wrapping puts "Experience Triple F" as "Experience Triple" then a
 * lone "F" on the second line. Balancing the label spreads the break evenly
 * instead, so the second line always carries more than a single character.
 */
.offer-list li span {
  text-wrap: balance;
}

/*
 * The fallback for a browser without text-wrap, which is anything older than
 * Chrome 114, Safari 17.4 or Firefox 121. A twelve character measure is about
 * 111 pixels at this size, which is narrower than "Experience Triple" at 118
 * and wider than "Youth Training" at 100, so greedy wrapping has to break
 * before "Triple" while none of the other five labels moves. Both numbers were
 * measured in the browser rather than estimated.
 */
@supports not (text-wrap: balance) {
  .offer-list li span {
    max-width: 12ch;
  }
}

.offer-tick {
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--blue);
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* ----------------------------------------------------------------- proof */

.proof { padding: 6px 0 30px; }

.strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.strip li { overflow: hidden; border-radius: 10px; background: var(--panel); }
.strip li:first-child { grid-column: 1 / -1; }
.strip img {
  display: block;
  width: 100%;
  height: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.strip li:first-child img { aspect-ratio: 3 / 2; }
/* Six tiles leave one on its own in a two column grid, so the last one
   runs full width and closes the strip the same way the lead opens it. */

/* ----------------------------------------------------------------- final */

.final {
  padding: 30px 0 34px;
  border-top: 1px solid var(--line);
  text-align: center;
}
.final h2 {
  margin: 0;
  font-size: clamp(26px, 6.4vw, 42px);
  line-height: 1.1;
}
.final .lead { margin-top: 10px; }
.final .actions { margin-top: 20px; }

/* ---------------------------------------------------------------- footer */

.footer {
  padding: 26px 0 calc(28px + var(--sticky-height));
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.footer p { margin: 0 0 10px; }
.address { color: #eef1f5; line-height: 1.6; }

/* ---------------------------------------------------------- sticky bar */

.sticky {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 10;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 8px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  background: rgba(7, 9, 12, 0.96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(6px);
}

.sticky-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 7px;
  font: 500 14px/1.1 var(--display);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-decoration: none;
}
.sticky-primary { background: var(--blue); color: #fff; }
.sticky-secondary { background: #fff; color: #0b0f14; }
.sticky-call { border: 1px solid #6f7b8d; color: #fff; max-width: 92px; }

/* While the booking flow is open the sticky bar only competes with the form on
   screen, so it is hidden for the whole flow. The compound selector deliberately
   out-specifies .sticky, which sets display: grid. */
body[data-booking-open] .sticky { display: none; }

/* ------------------------------------------------------------- desktop */

@media (min-width: 720px) {
  .sticky { display: none; }
  .footer { padding-bottom: 34px; }
  .hero { padding: 34px 0 44px; }
  .logo { height: 34px; margin-bottom: 26px; }
  .lead { font-size: 19px; }
  .actions {
    display: flex;
    justify-content: center;
    max-width: none;
  }
  .actions .btn { flex: 0 1 320px; min-height: 66px; font-size: 17px; }
  .offer-list { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 840px; gap: 12px; }
  .offer-list li { font-size: 16px; padding: 14px 16px; }
  /* Lead photo spans two columns and two rows; four smaller photos fill the rest. */
  .strip { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
  .strip li:first-child { grid-column: span 2; grid-row: span 2; }
  .strip img { aspect-ratio: 3 / 2; }
  .strip li:first-child img { height: 100%; aspect-ratio: auto; }
  .footer .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .btn { transition: none; }
  .btn:hover { transform: none; }
}

/* --------------------------------------------- inline booking (booking.js) */

/*
 * The width here is deliberate and load bearing. From 720px up, .actions turns
 * into a centred flex row, and a flex item with no width shrinks to fit its
 * contents. An iframe's intrinsic width is 300px, so in frame mode the panel
 * collapsed to 350px and the frame to 300px on a 1440px screen, ignoring the
 * 520px this rule intends. Filling the line and letting max-width cap it gives
 * the frame the width the Portal's form actually needs.
 */
.bk {
  text-align: left;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}
.bk-bar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.bk-link {
  background: none;
  border: 0;
  color: var(--focus);
  font: inherit;
  font-size: 15px;
  padding: 10px 4px;
  min-height: 44px;
  cursor: pointer;
  text-decoration: underline;
}
.bk-heading {
  font-family: var(--display);
  font-size: 22px;
  line-height: 1.2;
  margin: 0 0 10px;
}
.bk-heading:focus-visible { outline: 2px solid var(--focus); outline-offset: 4px; }
/*
 * Frame mode hides this heading, because the framed Portal prints the same
 * words immediately below it. The compound selector is deliberate. The
 * .visually-hidden utility is declared far earlier in this file, so at equal
 * specificity the .bk-heading rule above would win and leave the hidden
 * heading's 10px bottom margin as a visible gap above the frame. A hide rule
 * has to out-specify the rule it is hiding.
 */
.bk-heading.visually-hidden {
  margin: -1px;
  font-size: 0;
  line-height: 0;
}
.bk-heading.visually-hidden:focus-visible { outline: 0; }
.bk-chosen { color: var(--muted); font-size: 15px; margin: 0 0 14px; }
.bk-hint { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 8px 0 0; }
.bk-error { color: #ffb4b6; font-size: 15px; line-height: 1.5; margin: 10px 0 0; }
.bk-error:empty { margin: 0; }

/*
 * Frame mode: the Portal's own free session route, embedded. The height here is
 * only what the frame gets before it reports its own, so it has to be tall
 * enough on a phone that the first step is usable without scrolling inside a
 * box. Once a height message arrives, booking.js sets an exact pixel height on
 * the element, which wins over this rule and leaves one scrollbar on the page
 * rather than two.
 */
.bk-frame {
  display: block;
  width: 100%;
  height: 80vh;
  min-height: 420px;
  border: 0;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
}
.bk-frame:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
/*
 * A measured height change is animated rather than applied in one step. The
 * Portal's form grows by hundreds of pixels when a time is chosen, and setting
 * that in a single frame revealed the frame's own background under content the
 * Portal had not painted yet, which read as a blank area below the form. The
 * class is added by booking.js only after the first reported height has been
 * applied, so the frame's arrival at its real size is not animated, only every
 * change after it.
 */
.bk-frame-live { transition: height 260ms ease-out; }
@media (prefers-reduced-motion: reduce) {
  .bk-frame-live { transition: none; }
}

/*
 * Frame mode on a phone, edge to edge.
 *
 * The Portal's embedded form lays a 300px Cloudflare Turnstile widget inside
 * its own side padding and needs 337px of document width before its right edge
 * is clipped. Measured on the live page on 2026-09-21, our panel's 16px side
 * padding left the frame 294px at a 360px viewport and 300px at 375px and
 * 390px, so the widget was cut off and the form read as cramped.
 *
 * In frame mode only, the panel keeps no side padding, gives up its side
 * borders and its rounded corners, and breaks out of the page wrap's 16px
 * gutters so the frame is as wide as the viewport. The width has to grow along
 * with the negative margin: the panel has an explicit width, so a negative
 * margin on its own moves the box sideways rather than widening it, which is
 * how a first attempt left the frame at 326px on a 360px viewport. That gives
 * the frame the whole 360, 375, 390 or 414 pixels. The bar and the messages
 * keep their own inset so the Close link does not sit against the screen edge.
 *
 * The page is asserted not to widen at every tested width, which is the guard
 * that matters here. Sixteen pixels is the gutter the theme uses; a larger
 * gutter would simply leave a margin, and only a smaller one could overflow.
 */
@media (max-width: 719px) {
  [data-booking-state='frame'] .bk {
    padding-left: 0;
    padding-right: 0;
    width: calc(100% + 32px);
    margin-inline: -16px;
    border-left: 0;
    border-right: 0;
    border-radius: 0;
  }
  [data-booking-state='frame'] .bk-bar,
  [data-booking-state='frame'] .bk-heading,
  [data-booking-state='frame'] .bk-error,
  [data-booking-state='frame'] .bk-hint {
    padding-inline: 16px;
  }
  [data-booking-state='frame'] .bk-frame { border-radius: 0; }
}

/*
 * Frame mode on a desktop. A form is easier to read at a comfortable measure
 * than in the 520px column the panel uses for our own short steps, so in frame
 * mode the panel grows to 820px and the frame with it. Ruled by Rich on
 * 2026-09-21 after driving the live page.
 */
@media (min-width: 720px) {
  [data-booking-state='frame'] .bk { max-width: 820px; }
}

/* The two Youth programs, chosen by name rather than derived from an age. */
.bk-groups-lead { margin: 0 0 14px; }
.bk-groups { display: grid; gap: 12px; }
.bk-card {
  display: block;
  width: 100%;
  min-height: 48px;
  text-align: left;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  color: inherit;
  font: inherit;
  cursor: pointer;
}
.bk-card:hover { border-color: var(--blue); }
.bk-card:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.bk-card-chosen { border-color: var(--blue); background: rgba(255, 255, 255, 0.09); }
.bk-card-name {
  display: block;
  font-family: var(--display);
  font-size: 18px;
  letter-spacing: 0.02em;
}
.bk-card-age { display: block; font-size: 14px; color: var(--blue-text); margin-top: 2px; }
.bk-card-about {
  display: block;
  font-size: 14px;
  line-height: 1.55;
  color: var(--muted);
  margin-top: 8px;
}
.bk-switch-hint {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  margin: 8px 0 0;
}
.bk-switch-hint:empty { margin: 0; }
.bk-switch { min-height: 0; padding: 0; font-size: 14px; }

.bk-day { margin-bottom: 18px; }
.bk-day-heading { font-family: var(--display); font-size: 16px; margin: 0 0 8px; }

/* The day and time step: the Portal's month grid, beside the chosen day's times. */
.bk-when { display: grid; gap: 20px; }
.bk-cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.bk-cal-month { font-family: var(--display); font-size: 17px; margin: 0; }
.bk-nav {
  min-width: 48px;
  min-height: 48px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #182029;
  color: var(--text);
  font: inherit;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}
.bk-nav:hover { border-color: var(--blue); }
.bk-nav:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bk-nav[disabled] { opacity: 0.35; cursor: default; border-color: var(--line); }
.bk-grid { margin-top: 10px; }
.bk-grid-row { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.bk-weekday {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 6px 0;
}
.bk-cell {
  position: relative;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 16px;
  margin-bottom: 4px;
}
/* A day with no open class is plain text, not a tile, so it does not read as
   something to press. It carries aria-disabled and no tabindex. */
.bk-cell-off { color: #7c8797; }
.bk-cell-open {
  background: #182029;
  border-color: var(--line);
  color: var(--text);
  cursor: pointer;
}
.bk-cell-open:hover { border-color: var(--blue); }
.bk-cell-open:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
/* The chosen day is filled and bold, today carries a dot. Neither depends on
   colour alone to be told apart. */
.bk-cell-on { background: var(--blue); border-color: var(--text); border-width: 2px; font-weight: 700; }
.bk-cell-mark {
  position: absolute;
  bottom: 5px;
  left: 50%;
  transform: translateX(-50%);
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}
.bk-cell-today .bk-cell-number { text-decoration: underline; text-underline-offset: 3px; }
.bk-cal-key { margin-top: 10px; }
.bk-slots { min-width: 0; }
.bk-times { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.bk-time {
  min-height: 60px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #182029;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  cursor: pointer;
  padding: 8px;
}
.bk-time:hover { border-color: var(--blue); }
.bk-time-label { display: block; font-weight: 600; }

.bk-form { margin-top: 4px; }
.bk-field { margin-bottom: 14px; }
.bk-label { display: block; font-size: 14px; color: var(--muted); margin-bottom: 6px; }
.bk-input {
  width: 100%;
  min-height: 52px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0d1218;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 0 12px;
}
.bk-input:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.bk-check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.5;
  color: var(--muted);
  margin: 0 0 14px;
}
.bk-check input { margin-top: 3px; width: 22px; height: 22px; flex: 0 0 auto; }
.bk-check a { color: var(--focus); }
.bk-challenge { margin: 4px 0 12px; }
.bk-submit { width: 100%; margin-top: 4px; }

.bk-done { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.bk-done dt { color: var(--muted); font-size: 14px; }
.bk-done dd { margin: 0; font-size: 16px; }

@media (min-width: 720px) {
  .bk { padding: 24px; }
  .bk-times { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .bk-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* On a wide screen the calendar sits beside the times rather than above them. */
@media (min-width: 900px) {
  .bk-wide { max-width: 820px; }
  .bk-when { grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 28px; align-items: start; }
  .bk-when .bk-times { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Which program is being booked, shown on every step after the choice. */
.bk-badge {
  display: inline-block;
  margin: 0 0 10px;
  padding: 6px 12px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  color: #eef1f5;
  font-size: 14px;
  font-weight: 700;
}
