/* Information-only department pages (Freshwater, Saltwater, Pond, Terrariums).
   --reef-accent comes from reef-background.js, which tints each department. */

:root {
  --surface: #071a27;
  --ink: #f0fbff;
  --muted: #a9cbd9;
  --line: rgba(116, 205, 235, 0.2);
  --aqua: #40d9ff;
  --orange: #ff7b32;
  --accent: var(--reef-accent, var(--aqua));
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { overflow-x: hidden; scroll-behavior: smooth; }

body {
  overflow-x: hidden;
  margin: 0;
  color: var(--ink);
  background:
    radial-gradient(circle at 50% -18%, rgba(17, 119, 190, 0.48), transparent 38%),
    radial-gradient(circle at 0% 18%, rgba(0, 69, 135, 0.36), transparent 34%),
    radial-gradient(circle at 100% 12%, rgba(0, 167, 183, 0.22), transparent 32%),
    linear-gradient(180deg, #031f42 0%, #021833 48%, #010b1c 100%);
  line-height: 1.55;
}

a { color: inherit; }

/* Same width as the masthead/nav (1180px) so header and content line up. */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 clamp(12px, 2.5vw, 28px) 42px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.topic-hero,
.topic-glance,
.topic-section,
.topic-next {
  margin: 0 0 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: radial-gradient(circle at 100% 0%, rgba(64, 217, 255, 0.08), transparent 36%), rgba(7, 26, 39, 0.88);
}

/* ---- Hero ---- */
.topic-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  overflow: hidden;
  padding: clamp(20px, 3.5vw, 40px);
}

.topic-hero h1 {
  margin: 0 0 14px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(34px, 5vw, 54px);
  line-height: 1.02;
  letter-spacing: -0.01em;
}

.topic-hero__lede {
  max-width: 56ch;
  margin: 0 0 22px;
  color: #d6f4fb;
  font-size: clamp(16px, 1.6vw, 18px);
}

.topic-jump {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.topic-jump a {
  padding: 8px 14px;
  border: 1px solid rgba(116, 205, 235, 0.3);
  border-radius: 999px;
  color: #dff8ff;
  background: rgba(2, 19, 32, 0.6);
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
}

.topic-hero__media {
  margin: 0;
}

.topic-hero__media img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(116, 205, 235, 0.25);
  border-radius: 8px;
  object-fit: cover;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}

/* ---- At a glance ---- */
.topic-glance {
  padding: 16px;
}

.glance-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.glance {
  padding: 14px 16px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: rgba(2, 19, 32, 0.55);
}

.glance__label {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.glance__value {
  display: block;
  margin: 4px 0 6px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1.1;
}

.glance p {
  margin: 0;
  color: #c2e3ee;
  font-size: 13.5px;
  line-height: 1.45;
}

/* ---- Sections ---- */
.topic-section {
  padding: clamp(20px, 3vw, 34px);
}

.topic-section__head {
  max-width: 760px;
  margin-bottom: 22px;
}

.topic-section__head h2 {
  margin: 0 0 8px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(26px, 3vw, 34px);
  line-height: 1.1;
}

.topic-section__head p:not(.eyebrow) {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

/* ---- Types ---- */
.type-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.type-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 18px;
  border: 1px solid rgba(116, 205, 235, 0.2);
  border-radius: 8px;
  background: rgba(2, 19, 32, 0.6);
}

.type-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.type-card h3 {
  margin: 0;
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.type-card > p {
  margin: 0;
  color: #d6eef5;
  font-size: 14.5px;
}

.type-card dl {
  display: grid;
  gap: 3px;
  margin: auto 0 0;
  padding-top: 12px;
  border-top: 1px solid rgba(116, 205, 235, 0.14);
}

.type-card dt {
  color: var(--accent);
  font-size: 11.5px;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.type-card dd {
  margin: 0 0 8px;
  color: #c2e3ee;
  font-size: 13.5px;
  line-height: 1.45;
}

.type-card dd:last-child { margin-bottom: 0; }

.level {
  flex: 0 0 auto;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.level--beginner { color: #062a1d; background: #6fe3b4; }
.level--intermediate { color: #2b1a00; background: #ffc864; }
.level--advanced { color: #2d0505; background: #ff9a86; }

/* ---- Get started ---- */
.start-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 1fr);
  align-items: start;
  gap: clamp(18px, 3vw, 36px);
}

.steps {
  display: grid;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.steps li {
  position: relative;
  padding: 4px 0 20px 58px;
  counter-increment: step;
}

.steps li::before {
  content: counter(step);
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #02111f;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(64, 217, 255, 0.12);
  font-size: 17px;
  font-weight: 950;
}

.steps li::after {
  content: "";
  position: absolute;
  top: 46px;
  bottom: 4px;
  left: 19px;
  width: 2px;
  background: linear-gradient(rgba(116, 205, 235, 0.4), rgba(116, 205, 235, 0.06));
}

.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }

.steps h3 {
  margin: 7px 0 4px;
  color: #fff;
  font-size: 17px;
  line-height: 1.3;
}

.steps p {
  margin: 0;
  color: #cfe8f1;
  font-size: 14.5px;
}

.checklist {
  position: sticky;
  top: 76px;
  padding: 18px 20px;
  border: 1px solid rgba(116, 205, 235, 0.24);
  border-radius: 8px;
  background: linear-gradient(160deg, rgba(5, 40, 60, 0.85), rgba(3, 22, 36, 0.9));
}

.checklist h3 {
  margin: 0 0 12px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 20px;
}

.checklist ul {
  display: grid;
  gap: 8px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
}

.checklist li {
  position: relative;
  padding-left: 26px;
  color: #d6eef5;
  font-size: 14px;
  line-height: 1.4;
}

.checklist li::before {
  content: "";
  position: absolute;
  top: 2px;
  left: 0;
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--accent);
  border-radius: 4px;
}

.checklist__note {
  margin: 0;
  padding-top: 12px;
  border-top: 1px solid rgba(116, 205, 235, 0.16);
  color: var(--muted);
  font-size: 13px;
}

/* ---- Explore in 3D ---- */
.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.explore-card {
  display: grid;
  grid-template-columns: minmax(120px, 42%) 1fr;
  overflow: hidden;
  border: 1px solid rgba(116, 205, 235, 0.24);
  border-radius: 8px;
  background: rgba(2, 19, 32, 0.6);
  text-decoration: none;
  transition: border-color 160ms ease, transform 160ms ease;
}

.explore-card img {
  width: 100%;
  height: 100%;
  min-height: 160px;
  object-fit: cover;
  background: #052137;
}

.explore-card__text {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 16px 18px;
}

.explore-card strong {
  color: #fff;
  font-size: 18px;
  line-height: 1.25;
}

.explore-card__text > span:not(.explore-card__go) {
  color: #c2e3ee;
  font-size: 14px;
}

.explore-card__go {
  color: var(--accent);
  font-size: 13.5px;
  font-weight: 850;
}

/* ---- Guides ---- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.guide-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid rgba(116, 205, 235, 0.22);
  border-radius: 8px;
  color: #e2f7fc;
  background: rgba(2, 19, 32, 0.55);
  font-size: 15px;
  font-weight: 800;
  text-decoration: none;
  transition: border-color 160ms ease, background-color 160ms ease;
}

.guide-link span {
  color: var(--accent);
  transition: transform 160ms ease;
}

/* ---- Next steps ---- */
.topic-next {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: clamp(20px, 3vw, 30px);
  background: linear-gradient(135deg, #052137, #083c57);
}

.topic-next h2 {
  margin: 0 0 6px;
  color: #fff;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 26px;
}

.topic-next p {
  max-width: 62ch;
  margin: 0;
  color: #c2e9f4;
}

.topic-next__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.topic-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid rgba(116, 205, 235, 0.4);
  border-radius: 6px;
  color: #fff;
  font-weight: 900;
  text-decoration: none;
}

.topic-button--primary {
  border-color: transparent;
  background: var(--orange);
  color: #04121d;
}

/* ---- Interaction ---- */
.topic-jump a:hover,
.topic-jump a:focus-visible,
.explore-card:hover,
.explore-card:focus-visible,
.guide-link:hover,
.guide-link:focus-visible,
.topic-button:hover,
.topic-button:focus-visible {
  border-color: var(--aqua);
  outline: none;
}

.explore-card:hover,
.explore-card:focus-visible { transform: translateY(-2px); }

.guide-link:hover,
.guide-link:focus-visible { background: rgba(18, 83, 108, 0.6); }

.guide-link:hover span,
.guide-link:focus-visible span { transform: translateX(3px); }

.topic-button--primary:hover,
.topic-button--primary:focus-visible {
  background: #ff8f52;
  box-shadow: 0 0 0 2px rgba(255, 123, 50, 0.35);
}

/* ---- Footer (matches the other storefront pages) ---- */
footer.footer {
  margin-top: 24px;
  border-top: 1px solid rgba(116, 205, 235, 0.14);
  color: #c2e9f4;
  background: linear-gradient(180deg, #052137, #031321);
  font-size: 13px;
}

.footer-top {
  display: grid;
  grid-template-columns: 1.45fr 1.35fr 1.35fr 1fr;
  gap: 24px;
  padding: 26px;
}

footer.footer h3,
footer.footer h4 { margin: 0 0 9px; color: #fff; }
footer.footer a { display: block; margin: 0 0 6px; color: #c2e9f4; font-size: 13px; line-height: 1.45; text-decoration: none; }
footer.footer a:hover { text-decoration: underline; }
.footer-contact { margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(194, 233, 244, 0.2); }
.footer-link-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; }
.footer-link-grid a,
footer.footer h4 + a { position: relative; padding-left: 12px; }
.footer-link-grid a::before,
footer.footer h4 + a::before {
  content: "";
  position: absolute;
  top: 0.72em;
  left: 0;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--aqua);
}

/* ---- Responsive ---- */
@media (max-width: 1040px) {
  .glance-grid,
  .type-grid,
  .guide-grid,
  .footer-top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 860px) {
  .topic-hero { grid-template-columns: 1fr; }
  .topic-hero__media { order: -1; }
  .topic-hero__media img { aspect-ratio: 16 / 9; }
  .start-layout { grid-template-columns: 1fr; }
  .checklist { position: static; }
}

@media (max-width: 760px) {
  .type-grid,
  .guide-grid,
  .footer-top { grid-template-columns: 1fr; }
  .explore-card { grid-template-columns: 1fr; }
  .explore-card img { min-height: 0; aspect-ratio: 16 / 9; }
  .steps li { padding-left: 52px; }
}

@media (max-width: 420px) {
  .glance-grid { grid-template-columns: 1fr; }
  .page { padding-inline: 8px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .explore-card,
  .guide-link,
  .guide-link span { transition: none; }
  .explore-card:hover,
  .explore-card:focus-visible { transform: none; }
}
