/* =========================================================
   The 8am Club — site styles
   Brand: Pre-dawn navy, Sunrise orange, Bricolage Grotesque + Inter
   Mobile first: base styles are for phones, wider screens add on.
   ========================================================= */

/* ---------- Fonts (self-hosted, no third-party requests) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/BricolageGrotesque-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Bricolage Grotesque";
  src: url("../fonts/BricolageGrotesque-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/Inter-SemiBold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ---------- Brand tokens ---------- */
:root {
  --navy: #13233F;          /* Pre-dawn */
  --navy-2: #1C3157;
  --sun: #F5893A;           /* Sunrise */
  --sun-deep: #E5742A;
  --peach: #FDE6D4;         /* First light */
  --mist: #EAF0F5;          /* Morning mist */
  --slate: #4A5568;         /* Secondary text on light */
  --soft: #DCE4EE;          /* Secondary text on navy */
  --line: #CBD5E1;
  --white: #FFFFFF;
  --error: #B42318;
  --ok: #1E6B45;

  --font-display: "Bricolage Grotesque", "Arial Black", Arial, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;

  --wrap: 72rem;
  --gutter: 1.25rem;
  --radius: 1rem;
  --radius-sm: 0.625rem;

  color-scheme: light;
}

/* ---------- Base ---------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

body {
  margin: 0;
  background: var(--white);
  color: var(--navy);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; height: auto; }

a { color: var(--navy); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--sun-deep); }

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.035em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 10.5vw, 5.75rem); letter-spacing: -0.045em; line-height: 0.95; }
h2 { font-size: clamp(2rem, 7vw, 3.5rem); }
h3 { font-size: clamp(1.4rem, 4.6vw, 1.75rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }

p { margin: 0; }
p + p { margin-top: 1em; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.label {
  display: inline-block;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--slate);
}
.on-navy .label { color: var(--peach); }

.lede { font-size: clamp(1.125rem, 3.6vw, 1.375rem); line-height: 1.5; }

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

.skip-link {
  position: absolute;
  left: 1rem; top: -4rem;
  z-index: 100;
  background: var(--sun);
  color: var(--navy);
  font-weight: 600;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}
.skip-link:focus { top: 1rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.75rem 1.5rem;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn:active { transform: translateY(1px); }

.btn-sun { background: var(--sun); color: var(--navy); }
.btn-sun:hover { background: var(--sun-deep); color: var(--navy); }

.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-2); color: var(--white); }

.btn-outline { border-color: currentColor; color: var(--navy); background: transparent; }
.btn-outline:hover { background: var(--navy); color: var(--white); border-color: var(--navy); }

.on-navy .btn-outline { color: var(--white); }
.on-navy .btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); }

.btn[disabled] { opacity: 0.6; cursor: progress; }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.btn-row .btn { flex: 1 1 12rem; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--mist);
  -webkit-backdrop-filter: saturate(1.4) blur(8px);
  backdrop-filter: saturate(1.4) blur(8px);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  min-height: 4.25rem;
}
.brand { display: block; flex: 0 0 auto; }
.brand img { height: 2.125rem; width: auto; }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.75rem;
  font-weight: 600;
  font-size: 0.9375rem;
  text-decoration: none;
  border-radius: 999px;
}
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--sun); text-decoration-thickness: 3px; text-underline-offset: 0.35em; }
.site-nav .btn { min-height: 2.75rem; padding: 0.5rem 1rem; font-size: 0.9375rem; gap: 0; }
.site-nav .btn[aria-current="page"] { text-decoration: none; }
.nav-long { display: none; }

@media (min-width: 30rem) {
  .nav-long { display: inline; }
}
@media (min-width: 48rem) {
  .brand img { height: 2.625rem; }
  .site-header .wrap { min-height: 5rem; }
  .site-nav ul { gap: 0.5rem; }
  .site-nav a { padding-inline: 1rem; font-size: 1rem; }
  .site-nav .btn { padding-inline: 1.25rem; font-size: 1rem; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--navy);
  color: var(--white);
  padding-top: clamp(3rem, 10vw, 6.5rem);
  padding-bottom: clamp(11rem, 44vw, 15rem);
}
.hero .wrap { position: relative; z-index: 2; }
.hero h1 { margin-top: 1rem; max-width: 12ch; }
.hero .lede { margin-top: 1.5rem; color: var(--soft); max-width: 38rem; }
.hero .btn-row { margin-top: 2rem; max-width: 30rem; }

.horizon {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: clamp(9rem, 38vw, 13rem);
  z-index: 1;
  pointer-events: none;
}
.horizon::before {               /* the rising sun */
  content: "";
  position: absolute;
  left: 50%;
  bottom: 2.25rem;
  width: clamp(14rem, 62vw, 26rem);
  aspect-ratio: 1;
  transform: translate(-50%, 50%);
  border-radius: 50%;
  background: var(--sun);
}
.horizon::after {                /* the horizon line + ground */
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2.25rem;
  background: var(--navy);
  border-top: 3px solid rgba(255, 255, 255, 0.7);
}

@media (min-width: 48rem) {
  .hero { padding-bottom: clamp(6rem, 12vw, 9rem); }
  .horizon { height: 100%; }
  .horizon::before { left: auto; right: -4rem; transform: translate(0, 50%); width: clamp(24rem, 46vw, 38rem); }
}

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  background: var(--peach);
  padding-block: clamp(2.75rem, 9vw, 5rem) clamp(3.5rem, 10vw, 5.5rem);
}
.page-hero .wrap { position: relative; z-index: 2; }
.page-hero h1 { margin-top: 0.75rem; font-size: clamp(2.4rem, 9vw, 4.5rem); max-width: 16ch; }
.page-hero .lede { margin-top: 1rem; max-width: 40rem; color: #3B2A1E; }
.page-hero::before {
  content: "";
  position: absolute;
  right: -3rem;
  bottom: 0;
  width: clamp(9rem, 34vw, 18rem);
  aspect-ratio: 1;
  transform: translateY(50%);
  border-radius: 50%;
  background: var(--sun);
  z-index: 1;
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 3px;
  background: var(--navy);
  z-index: 1;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(3.5rem, 11vw, 6.5rem); }
.section-mist { background: var(--mist); }
.section-navy { background: var(--navy); color: var(--white); }
.section-head { max-width: 44rem; margin-bottom: clamp(2rem, 6vw, 3rem); }
.section-head h2 { margin-top: 0.75rem; }
.section-head p { margin-top: 1rem; color: var(--slate); }
.section-navy .section-head p { color: var(--soft); }

.split { display: grid; gap: 2.5rem; }
@media (min-width: 56rem) {
  .split { grid-template-columns: 1.1fr 1fr; gap: 4.5rem; align-items: start; }
}

.prose p { color: #2D3748; }
.prose p:first-child { font-size: clamp(1.1875rem, 3.6vw, 1.375rem); line-height: 1.5; color: var(--navy); }

/* What to expect list */
.expect { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--navy); }
.expect li { padding: 1.125rem 0; border-bottom: 1px solid var(--line); display: grid; gap: 0.25rem; }
.expect strong { font-family: var(--font-display); font-weight: 700; font-size: 1.25rem; letter-spacing: -0.015em; }
.expect span { color: var(--slate); }

/* How a morning runs */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: var(--radius);
  padding: 1.5rem 1.5rem 1.75rem;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  display: block;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.75rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--sun);
  margin-bottom: 1rem;
}
.steps h3 { color: var(--white); }
.steps p { margin-top: 0.5rem; color: var(--soft); }
@media (min-width: 48rem) {
  .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.25rem; }
}

/* ---------- Event cards ---------- */
.event-list { display: grid; gap: 1rem; }

.event {
  display: grid;
  grid-template-columns: 4rem minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.event-date {
  display: grid;
  place-items: center;
  align-content: center;
  aspect-ratio: 1;
  border-radius: var(--radius-sm);
  background: var(--navy);
  color: var(--white);
  text-align: center;
  line-height: 1;
}
.event-date .m { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--peach); }
.event-date .d { font-family: var(--font-display); font-weight: 800; font-size: 1.75rem; letter-spacing: -0.04em; margin-top: 0.25rem; }
.event-date .d.tbc { font-size: 1.125rem; letter-spacing: 0; }

.event-body { min-width: 0; }
.event-body h2,
.event-body h3 { font-size: clamp(1.25rem, 4.2vw, 1.625rem); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.event-meta { margin-top: 0.5rem; color: var(--slate); font-size: 0.9875rem; display: grid; gap: 0.125rem; }
.event-meta b { color: var(--navy); font-weight: 600; }
.event-note { margin-top: 0.5rem; font-size: 0.9375rem; color: var(--slate); }

.badge {
  display: inline-block;
  margin-bottom: 0.625rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  background: var(--mist);
  color: var(--navy);
}
.badge-open { background: var(--navy); color: var(--white); }
.badge-interest { background: var(--peach); color: #6B3A12; }
.badge-full { background: var(--mist); color: var(--slate); }

.event-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 0.75rem; }
.event-actions .btn { flex: 1 1 11rem; }

@media (min-width: 48rem) {
  .event { grid-template-columns: 6.5rem minmax(0, 1fr) auto; padding: 1.5rem; gap: 1.5rem 2rem; align-items: center; }
  .event-date .d { font-size: 2.5rem; }
  .event-actions { grid-column: auto; flex-direction: column; }
  .event-actions .btn { flex: 0 0 auto; min-width: 12rem; }
}

.event-featured { border: 2px solid var(--navy); box-shadow: 0 18px 40px -24px rgba(19, 35, 63, 0.55); }

.events-empty {
  padding: 1.5rem;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--slate);
}

/* ---------- Hosts ---------- */
.hosts { display: grid; gap: 0.75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); }
.host {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 6.5rem;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--white);
  border: 1px solid var(--line);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
  text-align: center;
  text-decoration: none;
  color: var(--navy);
}
a.host:hover { border-color: var(--navy); color: var(--navy); }
.host img { max-height: 3.5rem; width: auto; }

/* ---------- CTA band ---------- */
.cta {
  position: relative;
  overflow: hidden;
  background: var(--peach);
  padding-block: clamp(3.5rem, 11vw, 6rem) clamp(7rem, 24vw, 9rem);
}
.cta .wrap { position: relative; z-index: 2; }
.cta h2 { max-width: 14ch; }
.cta p { margin-top: 1rem; max-width: 34rem; color: #3B2A1E; }
.cta .btn-row { margin-top: 1.75rem; max-width: 28rem; }
@media (min-width: 36rem) { .cta .btn-row .btn { flex: 0 0 auto; padding-inline: 2.5rem; } }
.cta::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 0;
  width: clamp(12rem, 52vw, 22rem);
  aspect-ratio: 1;
  transform: translate(-50%, 50%);
  border-radius: 50%;
  background: var(--sun);
}
.cta::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 4px;
  background: var(--navy);
}
@media (min-width: 48rem) {
  .cta { padding-bottom: clamp(3.5rem, 11vw, 6rem); }
  .cta::before { left: auto; right: 6%; transform: translate(0, 50%); width: clamp(16rem, 30vw, 24rem); }
}

/* ---------- Booking form ---------- */
.form-layout { display: grid; gap: 2.5rem; }
@media (min-width: 60rem) {
  .form-layout { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 4rem; align-items: start; }
  .form-aside { position: sticky; top: 6.5rem; }
}

.form { display: grid; gap: 2rem; }
.form fieldset { margin: 0; padding: 0; border: 0; display: grid; gap: 1.125rem; min-width: 0; }
.form legend {
  padding: 0;
  margin-bottom: 1.125rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.02em;
}
.field { display: grid; gap: 0.4rem; }
.field-row { display: grid; gap: 1.125rem; }
@media (min-width: 36rem) {
  .field-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.form label,
.check-text { font-weight: 600; font-size: 0.9875rem; }
.optional { font-weight: 400; color: var(--slate); }
.hint { font-size: 0.875rem; color: var(--slate); }

.form input[type="text"],
.form input[type="email"],
.form input[type="tel"],
.form select,
.form textarea {
  width: 100%;
  min-height: 3.25rem;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid #A9B6C6;
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--navy);
  font: inherit;
  font-size: 1rem;           /* 16px stops iOS zooming into fields */
  line-height: 1.4;
  appearance: none;
  -webkit-appearance: none;
}
.form textarea { min-height: 7rem; resize: vertical; }
.form select {
  padding-right: 2.75rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' fill='none' stroke='%2313233F' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
}
.form input:focus,
.form select:focus,
.form textarea:focus {
  outline: 3px solid var(--sun);
  outline-offset: 1px;
  border-color: var(--navy);
}
.form input:user-invalid,
.form select:user-invalid,
.form textarea:user-invalid { border-color: var(--error); }

.check {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: 0.75rem;
  align-items: start;
  padding: 0.25rem 0;
}
.check input {
  width: 1.5rem;
  height: 1.5rem;
  margin: 0.05rem 0 0;
  accent-color: var(--navy);
}
.check-text { font-weight: 500; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.form-submit { display: grid; gap: 0.75rem; }
.form-submit .btn { width: 100%; min-height: 3.5rem; font-size: 1.0625rem; }
@media (min-width: 36rem) {
  .form-submit .btn { width: auto; justify-self: start; padding-inline: 2.5rem; }
}

.form-status {
  display: none;
  padding: 1rem 1.125rem;
  border-radius: var(--radius-sm);
  font-weight: 500;
}
.form-status.is-visible { display: block; }
.form-status.is-error { background: #FDECEA; color: var(--error); border: 1px solid #F4C7C3; }
.form-status.is-info { background: var(--mist); color: var(--navy); border: 1px solid var(--line); }

.aside-card {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius);
  padding: 1.75rem;
}
.aside-card h2 { font-size: 1.75rem; }
.aside-card dl { margin: 1.25rem 0 0; display: grid; gap: 1rem; }
.aside-card dt { font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase; color: var(--peach); }
.aside-card dd { margin: 0.25rem 0 0; color: var(--white); font-weight: 500; }
.aside-card p { margin-top: 1.25rem; color: var(--soft); font-size: 0.9375rem; }

/* ---------- Simple content pages ---------- */
.page-body { max-width: 44rem; }
.page-body h2 { font-size: clamp(1.5rem, 5vw, 2rem); margin-top: 2.5rem; margin-bottom: 0.75rem; letter-spacing: -0.025em; }
.page-body ul { padding-left: 1.25rem; }
.page-body li + li { margin-top: 0.4rem; }
.page-body p, .page-body li { color: #2D3748; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy);
  color: var(--soft);
  padding-block: 3rem 2rem;
  font-size: 0.9375rem;
}
.site-footer a { color: var(--white); }
.site-footer a:hover { color: var(--peach); }
.footer-grid { display: grid; gap: 2rem; }
.footer-brand img { height: 2.25rem; width: auto; }
.footer-brand p { margin-top: 1rem; max-width: 22rem; }
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.25rem; }
.footer-links a { display: inline-flex; min-height: 2.75rem; align-items: center; text-decoration: none; font-weight: 500; }
.footer-small {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.16);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  justify-content: space-between;
  font-size: 0.875rem;
}
@media (min-width: 48rem) {
  .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
}
