/* ============================================================
   Reach status-page template — shared stylesheet
   Used by: parked, maintenance, events (and any future state).
   Each page sets a state class on <body>: .state-parked, etc.
   ============================================================ */

:root {
  --teal: #4cb4be;
  /* reachteal */
  --teal-dark: #2e6a70;
  /* reachsolutions */
  --blue: #3d5161;
  /* reachblue */
  --blue-deep: #243643;
  --yellow: #f8bd41;
  /* reachyellow */
  --grey: #bfd0d4;
  /* reachgrey */
  --white: #ffffff;

  /* Accent is themeable per state (overridden by body.state-*) */
  --accent: var(--teal);
  --accent-soft: rgba(76, 180, 190, .14);
  --accent-border: rgba(76, 180, 190, .30);
}

/* Per-state accent theming — same layout, different highlight colour */
body.state-maintenance {
  --accent: var(--yellow);
  --accent-soft: rgba(248, 189, 65, .14);
  --accent-border: rgba(248, 189, 65, .30);
}

body.state-events {
  --accent: var(--teal);
  --accent-soft: rgba(76, 180, 190, .14);
  --accent-border: rgba(76, 180, 190, .30);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

body {
  font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: radial-gradient(1200px 600px at 78% -12%, var(--teal-dark) 0%, transparent 55%),
    linear-gradient(160deg, var(--blue) 0%, var(--blue-deep) 100%);
  color: var(--white);
  min-height: 100vh;
  position: relative;
  overflow-x: hidden;
}

/* ---- Hexagon motif (Reach Solutions signature shape) ---- */
.hex {
  position: absolute;
  width: var(--s);
  height: calc(var(--s) * 0.866);
  clip-path: polygon(25% 0%, 75% 0%, 100% 50%, 75% 100%, 25% 100%, 0% 50%);
  background: currentColor;
  opacity: .07;
  pointer-events: none;
  z-index: 0;
}

.hex.h1 {
  --s: 240px;
  color: var(--accent);
  top: -50px;
  right: -60px;
  transform: rotate(8deg);
}

.hex.h2 {
  --s: 150px;
  color: var(--yellow);
  top: 640px;
  left: -50px;
  opacity: .07;
}

.hex.h3 {
  --s: 110px;
  color: var(--white);
  top: 44%;
  right: 6%;
  opacity: .04;
}

/* ---- Header ---- */
header {
  position: relative;
  z-index: 2;
  height: 64px;
  display: flex;
  align-items: center;
  padding: 0 clamp(20px, 5vw, 48px);
}

header svg.logo {
  width: 104px;
  height: auto;
}

header svg.logo .logo-reach {
  fill: var(--white);
}

/* ---- Hero ---- */
.hero {
  position: relative;
  z-index: 2;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(36px, 7vh, 80px) clamp(20px, 5vw, 48px) 36px;
  text-align: center;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 22px;
}

.badge svg {
  width: 20px;
  height: 18px;
}

.badge svg path {
  stroke: var(--accent);
}

h1 {
  font-weight: 300;
  font-size: clamp(2.3rem, 6.5vw, 3.8rem);
  line-height: 1.08;
  letter-spacing: -1.8px;
  margin: 0 0 14px;
}

h1 em {
  color: var(--yellow);
  font-style: italic;
  font-weight: 500;
}

.accent-bar {
  width: 90px;
  height: 2px;
  background: var(--accent);
  margin: 22px auto;
  opacity: .9;
}

p.lead {
  font-size: clamp(17px, 2.2vw, 20px);
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.3px;
  margin: 0 0 28px;
  color: rgba(255, 255, 255, .95);
}

/* ---- Primary CTA cards ---- */
.cta-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 14px;
  text-align: left;
}

a.cta {
  display: block;
  text-decoration: none;
  color: var(--white);
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 14px;
  padding: 24px;
  transition: transform .15s ease, border-color .2s ease, background .2s ease;
}

a.cta:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  background: var(--accent-soft);
}

a.cta .tag {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--yellow);
  margin-bottom: 8px;
}

a.cta .t {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 6px;
}

a.cta .d {
  font-size: 14px;
  font-weight: 300;
  line-height: 1.55;
  color: rgba(255, 255, 255, .78);
}

a.cta .go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-size: 14px;
  font-weight: 600;
  color: var(--accent);
}

a.cta .go span {
  transition: transform .15s ease;
}

a.cta:hover .go span {
  transform: translateX(3px);
}

/* ---- Stats strip ---- */
.stats {
  position: relative;
  z-index: 2;
  max-width: 1040px;
  margin: 0 auto;
  padding: 6px clamp(20px, 5vw, 48px) 10px;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 16px;
}

.stat {
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 12px;
  padding: 20px 16px;
  text-align: center;
}

.stat .n {
  font-size: clamp(1.7rem, 3.6vw, 2.3rem);
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.stat .l {
  font-size: 12.5px;
  font-weight: 300;
  color: var(--grey);
  margin-top: 8px;
}

/* ---- Capture / highlight panel ---- */
.capture {
  position: relative;
  z-index: 2;
  max-width: 720px;
  margin: 34px auto 0;
  padding: 32px clamp(22px, 4vw, 40px);
  background: linear-gradient(135deg, var(--accent-soft), rgba(46, 106, 112, .14));
  border: 1px solid var(--accent-border);
  border-radius: 16px;
  text-align: center;
}

.capture h2 {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 6px;
}

.capture p {
  font-size: 14.5px;
  font-weight: 300;
  color: rgba(255, 255, 255, .8);
  margin: 0 0 20px;
  line-height: 1.55;
}

.capture form {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.capture input[type=email] {
  flex: 1 1 280px;
  max-width: 360px;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(255, 255, 255, .95);
  color: #1b2832;
  font-size: 15px;
  font-family: inherit;
}

.capture input[type=email]:focus {
  outline: 2px solid var(--accent);
}

.capture button {
  padding: 13px 26px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  background: var(--yellow);
  color: #3a2c00;
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  transition: transform .12s ease, background .2s ease;
}

.capture button:hover {
  transform: translateY(-2px);
  background: #ffc954;
}

.capture .tiny {
  font-size: 12px;
  color: rgba(255, 255, 255, .55);
  margin-top: 14px;
}

/* ---- Buttons (used by maintenance/events) ---- */
.links {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

a.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .3px;
  padding: 14px 26px;
  border-radius: 8px;
  transition: transform .12s ease, box-shadow .12s ease, background .2s ease;
}

a.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .3);
}

a.primary {
  background: var(--accent);
  color: #06262a;
}

a.secondary {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(255, 255, 255, .4);
}

a.secondary:hover {
  border-color: var(--yellow);
  color: var(--yellow);
}

/* ---- Countdown (events) ---- */
.countdown {
  display: flex;
  gap: 14px;
  justify-content: center;
  margin: 8px 0 28px;
}

.countdown .unit {
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;
  padding: 16px 18px;
  min-width: 76px;
}

.countdown .unit .num {
  font-size: 2rem;
  font-weight: 600;
  color: var(--accent);
  line-height: 1;
}

.countdown .unit .lbl {
  font-size: 11px;
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--grey);
  margin-top: 6px;
}

/* ---- Footer ---- */
footer {
  position: relative;
  z-index: 2;
  margin-top: 44px;
  padding: 24px clamp(20px, 5vw, 48px);
  text-align: center;
  font-size: 13px;
  font-weight: 300;
  color: rgba(255, 255, 255, .55);
  border-top: 1px solid rgba(255, 255, 255, .07);
}

footer a {
  color: rgba(255, 255, 255, .78);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}

/* Legal links row (Cookie Notice / Privacy / Terms) — same spacing as campaign pages */
footer .legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 20px;
  margin: 14px 0 0;
}

footer .legal-links a {
  font-size: 12.5px;
  font-weight: 400;
  color: rgba(255, 255, 255, .6);
  text-decoration: none;
}

footer .legal-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

/* ============================================================
   Mobile optimisation
   Base layout already uses clamp() + flex-wrap; these queries
   tighten spacing, scale type, and stop overflow on small screens.
   ============================================================ */

@media (max-width: 640px) {
  header {
    height: 56px;
    padding: 0 18px;
  }

  header svg.logo {
    width: 88px;
  }

  .hero {
    padding-left: 18px;
    padding-right: 18px;
  }

  h1 {
    letter-spacing: -1px;
  }

  /* CTA cards stack full-width */
  .cta-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  a.cta {
    padding: 20px;
  }

  /* Stats: 2 across instead of auto-fit so numbers stay readable */
  .stats {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }

  .stat {
    padding: 16px 12px;
  }

  /* Capture form stacks: full-width input then full-width button */
  .capture {
    padding: 24px 18px;
  }

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

  .capture input[type=email] {
    flex: 1 1 auto;
    max-width: none;
  }

  .capture button {
    width: 100%;
  }

  /* Countdown: allow wrap and shrink units so 4 fit */
  .countdown {
    gap: 8px;
    flex-wrap: wrap;
  }

  .countdown .unit {
    min-width: 62px;
    padding: 12px 12px;
  }

  .countdown .unit .num {
    font-size: 1.5rem;
  }

  .countdown .unit .lbl {
    font-size: 10px;
  }

  /* Buttons stack and go full-width for easy tapping */
  .links {
    flex-direction: column;
    align-items: stretch;
  }

  a.btn {
    width: 100%;
    text-align: center;
  }

  footer {
    padding: 20px 18px;
  }
}

@media (max-width: 380px) {
  .stats {
    grid-template-columns: 1fr;
  }

  .countdown .unit {
    min-width: 56px;
  }
}