/* Scubachimp public site - shared styles.
   One stylesheet for every page so the troop looks the same wherever you land. */

:root {
  --orange: #e8732a;
  --orange-dim: #b8571c;
  --dark: #1a0e06;
  --panel: #2e1a08;
  --text: #f0f0f0;
  --muted: #c9bdb2;
  --header-h: 160px;
  --nav-w: 180px;
  --footer-h: 70px;
  --display: 'Arial Black', Arial, sans-serif;
  --body: Arial, Helvetica, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-height: 100%;
  background: var(--dark);
  color: var(--text);
  font-family: var(--display);
  /* Room for the fixed chrome on every page. */
  padding-top: var(--header-h);
  padding-left: var(--nav-w);
  padding-bottom: var(--footer-h);
}

/* ── Header ── */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--header-h);
  background: var(--orange);
  border-bottom: 3px solid var(--dark);
  z-index: 100;
  overflow: hidden;
}

header img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

/* ── Sidebar nav ── */

nav {
  position: fixed;
  top: var(--header-h);
  left: 0;
  bottom: 0;
  width: var(--nav-w);
  background: var(--dark);
  border-right: 3px solid var(--orange);
  display: flex;
  flex-direction: column;
  padding-top: 30px;
  z-index: 100;
}

nav a {
  display: block;
  color: var(--orange);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 14px 20px;
  border-left: 3px solid transparent;
  transition: background 0.2s, border-color 0.2s, color 0.2s;
}

nav a span {
  display: block;
  line-height: 1.1;
}

nav a:hover,
nav a:focus-visible,
nav a.active {
  background: var(--panel);
  border-left-color: var(--orange);
  color: #fff;
}

/* ── Footer ── */

footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--footer-h);
  background: #000;
  border-top: 3px solid var(--orange);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  font-family: var(--display);
  text-transform: uppercase;
}

footer a {
  color: var(--orange);
  text-decoration: none;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

footer a:hover,
footer a:focus-visible {
  color: #fff;
}

/* ── Page content ── */

main {
  padding: 50px 60px 70px;
  max-width: 1100px;
}

h1 {
  color: var(--orange);
  font-size: 2rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

h2 {
  color: var(--orange);
  font-size: 1.35rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 14px;
}

h3 {
  color: var(--orange);
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
}

p {
  font-family: var(--body);
  font-weight: normal;
  line-height: 1.65;
  color: var(--muted);
}

main p {
  margin-bottom: 14px;
}

.underline {
  width: 60px;
  height: 3px;
  background: var(--orange);
  margin-bottom: 36px;
}

.lede {
  font-size: 1.05rem;
  color: #e6ddd5;
}

section {
  margin-bottom: 56px;
}

/* ── Hero (home page) ── */

.hero {
  margin: -50px -60px 46px;
  border-bottom: 3px solid var(--orange);
  background: var(--orange);
}

.hero img {
  display: block;
  width: 100%;
  max-height: 230px;
  object-fit: cover;
  object-position: center;
}

.strap {
  font-family: var(--display);
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-size: 0.8rem;
  margin-bottom: 12px;
}

/* ── Cards ── */

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 26px;
}

.card {
  background: var(--panel);
  border: 1px solid #e8732a33;
  border-radius: 6px;
  padding: 26px 22px;
  transition: border-color 0.2s;
}

.card:hover {
  border-color: var(--orange);
}

.card p {
  font-size: 0.85rem;
  margin-bottom: 0;
}

/* Team cards keep the original centred portrait treatment. */
.team-card {
  text-align: center;
  padding: 30px 20px;
}

.team-card .avatar {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: var(--dark);
  border: 3px solid var(--orange);
  margin: 0 auto 16px;
  overflow: hidden;
}

.team-card .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.team-card .role {
  color: var(--orange);
  font-size: 0.75rem;
  font-family: var(--body);
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 12px;
  line-height: 1.3;
}

.team-card .bio {
  color: #ccc;
  font-size: 0.8rem;
  line-height: 1.5;
  text-align: left;
  margin-bottom: 0;
}

/* ── Featured app panel ── */

.feature {
  background: var(--panel);
  border: 1px solid var(--orange);
  border-radius: 6px;
  padding: 32px 30px;
}

.tag {
  display: inline-block;
  background: var(--orange);
  color: var(--dark);
  font-family: var(--display);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 10px;
  border-radius: 3px;
  margin-bottom: 14px;
}

.feature ul {
  font-family: var(--body);
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin: 0 0 20px 18px;
}

.feature li {
  margin-bottom: 6px;
}

/* ── Buttons ── */

.btn {
  display: inline-block;
  background: var(--orange);
  color: var(--dark);
  font-family: var(--display);
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 4px;
  border: 2px solid var(--orange);
  transition: background 0.2s, color 0.2s;
}

.btn:hover,
.btn:focus-visible {
  background: transparent;
  color: var(--orange);
}

.btn.ghost {
  background: transparent;
  color: var(--orange);
}

.btn.ghost:hover,
.btn.ghost:focus-visible {
  background: var(--orange);
  color: var(--dark);
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 6px;
}

.note {
  font-family: var(--body);
  font-size: 0.78rem;
  color: #9c8f84;
  line-height: 1.55;
  border-left: 3px solid var(--orange-dim);
  padding-left: 14px;
}

/* Inline links inside body copy, distinct from the button styles. */
main p a {
  color: var(--orange);
  text-decoration: underline;
}

main p a:hover,
main p a:focus-visible {
  color: #fff;
}

.note strong {
  color: var(--orange);
}

/* A prominent safety notice. Deliberately louder than .note so it reads as a
   warning rather than a footnote. */
.disclaimer {
  background: #2a1a08;
  border: 1px solid var(--orange);
  border-left: 6px solid var(--orange);
  border-radius: 4px;
  padding: 18px 20px;
  margin-bottom: 24px;
  font-family: var(--body);
  font-size: 0.85rem;
  line-height: 1.6;
  color: #e3d6cb;
}

.disclaimer strong {
  font-family: var(--display);
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.78rem;
}

/* ── Contact ── */

.contact-card {
  background: var(--panel);
  border: 1px solid var(--orange);
  border-left: 6px solid var(--orange);
  border-radius: 6px;
  padding: 28px 30px;
  margin-bottom: 40px;
}

.contact-card .label {
  font-family: var(--display);
  color: var(--orange);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  margin-bottom: 10px;
}

.email-link {
  display: inline-block;
  font-family: var(--display);
  font-size: 1.6rem;
  letter-spacing: 0.02em;
  color: var(--text);
  text-decoration: none;
  border-bottom: 3px solid var(--orange);
  padding-bottom: 3px;
  /* Only break if it genuinely cannot fit, and never mid-word by preference. */
  overflow-wrap: anywhere;
}

.email-link:hover,
.email-link:focus-visible {
  color: var(--orange);
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-top: 22px;
}

.copy-btn {
  background: transparent;
  color: var(--orange);
  font-family: var(--display);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 11px 18px;
  border: 2px solid var(--orange);
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}

.copy-btn:hover,
.copy-btn:focus-visible {
  background: var(--orange);
  color: var(--dark);
}

.copy-status {
  font-family: var(--body);
  font-size: 0.8rem;
  color: var(--orange);
}

/* Topic cards double as pre-addressed email links. */
a.card {
  display: block;
  text-decoration: none;
}

a.card:hover h3,
a.card:focus-visible h3 {
  color: #fff;
}

.card .card-cta {
  display: block;
  margin-top: 12px;
  font-family: var(--display);
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--orange);
}

.checklist {
  font-family: var(--body);
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.7;
  margin: 0 0 14px 18px;
}

.checklist li {
  margin-bottom: 6px;
}

/* ── Bubbles (page-load animation, driven by bubbles.js) ── */

.bubbles {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  /* Above the page content, below the fixed header/nav/footer so bubbles
     disappear behind the chrome as they rise. */
  z-index: 50;
}

.bubble {
  position: absolute;
  bottom: -40px;
  animation: bubble-rise 4s linear forwards;
}

.bubble-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  /* A translucent air bubble: bright highlight up and to the left, faint
     blue-white body, thin rim. */
  background:
    radial-gradient(circle at 32% 28%,
      rgba(255, 255, 255, 0.85) 0%,
      rgba(255, 255, 255, 0.25) 22%,
      rgba(190, 225, 255, 0.1) 55%,
      rgba(190, 225, 255, 0.02) 100%);
  border: 1px solid rgba(210, 235, 255, 0.35);
  box-shadow: inset -2px -2px 4px rgba(150, 200, 255, 0.2);
  animation: bubble-sway 1.4s ease-in-out infinite alternate;
}

@keyframes bubble-rise {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  8% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    /* How far a bubble climbs: full viewport for risers, a short hop for
       hover puffs. Set per-bubble by bubbles.js. */
    transform: translateY(var(--rise, calc(-100vh - 80px)));
    opacity: 0;
  }
}

@keyframes bubble-sway {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(var(--sway, 18px));
  }
}

/* Content gently "surfaces" as each page loads. */
@media (prefers-reduced-motion: no-preference) {
  main > section,
  main > .hero {
    animation: surface-in 0.6s ease-out both;
  }

  main > *:nth-child(2) { animation-delay: 0.08s; }
  main > *:nth-child(3) { animation-delay: 0.16s; }
  main > *:nth-child(4) { animation-delay: 0.24s; }
  main > *:nth-child(5) { animation-delay: 0.32s; }
  main > *:nth-child(n + 6) { animation-delay: 0.4s; }
}

@keyframes surface-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ── Mobile ── */

@media (max-width: 768px) {
  :root {
    --header-h: 120px;
    --footer-h: 52px;
  }

  body {
    padding-left: 0;
    /* The nav becomes a horizontal strip below the header. */
    padding-top: calc(var(--header-h) + 52px);
  }

  nav {
    left: 0;
    right: 0;
    width: auto;
    height: 52px;
    bottom: auto;
    flex-direction: row;
    align-items: center;
    padding-top: 0;
    border-right: 0;
    border-bottom: 3px solid var(--orange);
    overflow-x: auto;
  }

  nav a {
    border-left: 0;
    border-bottom: 3px solid transparent;
    white-space: nowrap;
    padding: 14px 16px;
  }

  nav a:hover,
  nav a:focus-visible,
  nav a.active {
    border-left-color: transparent;
    border-bottom-color: var(--orange);
  }

  main {
    padding: 32px 24px 50px;
  }

  .hero {
    margin: -32px -24px 32px;
  }

  .hero img {
    max-height: 130px;
  }

  h1 {
    font-size: 1.5rem;
  }

  h2 {
    font-size: 1.15rem;
  }

  /* The address must sit on one line at phone widths. */
  .contact-card {
    padding: 22px 20px;
  }

  .email-link {
    font-size: 1.05rem;
  }

  .contact-actions {
    gap: 10px;
  }

  footer {
    gap: 18px;
    overflow-x: auto;
    white-space: nowrap;
  }
}
