/* Catalyst Revision — site styles
   Palette: cool lab-paper background, deep teal ink, and a universal-indicator
   spectrum used sparingly (header strip, logo tile, level colours). */

:root {
  --paper: #f6f8f7;
  --paper-2: #ebf1ef;
  --ink: #10292e;
  --slate: #4a6168;
  --line: #d3dedb;
  --white: #ffffff;

  /* universal indicator, acid → alkali */
  --ph-1: #d7263d;
  --ph-3: #f46036;
  --ph-5: #f2c14e;
  --ph-7: #5fad56;
  --ph-10: #2e86ab;
  --ph-13: #6c4ab6;

  /* course levels */
  --n5: #2f7d3a;
  --n5-tint: #e3f1e4;
  --higher: #1d6690;
  --higher-tint: #e0eef6;

  --focus: #2e86ab;

  --font-head: "Bricolage Grotesque", "Avenir Next", "Segoe UI", sans-serif;
  --font-body: "Atkinson Hyperlegible", "Verdana", sans-serif;

  --step--1: 0.875rem;
  --step-0: 1.0625rem;
  --step-1: 1.3rem;
  --step-2: 1.65rem;
  --step-3: 2.15rem;
  --step-4: clamp(2.4rem, 6vw, 3.6rem);

  --gutter: clamp(1rem, 4vw, 2rem);
  --max: 68rem;
  --measure: 38rem;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.6;
}

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

a { color: var(--higher); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }

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

h1, h2, h3 {
  font-family: var(--font-head);
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}
h1 { font-size: var(--step-4); font-weight: 700; }
h2 { font-size: var(--step-3); font-weight: 650; }
h3 { font-size: var(--step-1); font-weight: 650; }

p { margin: 0 0 1em; max-width: var(--measure); }

.skip-link {
  position: absolute;
  left: -999px;
  top: 0.5rem;
  background: var(--ink);
  color: var(--white);
  padding: 0.5rem 1rem;
  z-index: 10;
}
.skip-link:focus { left: 0.5rem; }

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

/* ---------- header ---------- */

.indicator {
  height: 6px;
  background: linear-gradient(90deg,
    var(--ph-1), var(--ph-3), var(--ph-5), var(--ph-7), var(--ph-10), var(--ph-13));
}

.site-header {
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
.brand svg { width: 2.4rem; height: 2.4rem; }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
}
.site-nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  font-size: var(--step--1);
  padding: 0.3rem 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover,
.site-nav a[aria-current="page"] { border-bottom-color: var(--ph-10); }

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

.hero { padding: clamp(2.5rem, 7vw, 5rem) 0 clamp(2rem, 5vw, 3.5rem); }

.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}

.hero h1 { max-width: 15ch; }
.hero .lede { font-size: var(--step-1); color: var(--slate); max-width: 32rem; }

.element-tile {
  justify-self: end;
  width: min(100%, 19rem);
  aspect-ratio: 1;
  background: var(--white);
  border: 3px solid var(--ink);
  border-radius: 6px;
  padding: 1.25rem 1.4rem;
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  box-shadow: 10px 10px 0 var(--ph-10);
}
.element-tile .num { font-weight: 700; font-size: var(--step-1); }
.element-tile .sym {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(5rem, 14vw, 8.5rem);
  line-height: 1;
  letter-spacing: -0.04em;
  align-self: center;
}
.element-tile .name { font-family: var(--font-head); font-weight: 650; font-size: var(--step-1); }
.element-tile .mass { color: var(--slate); font-size: var(--step--1); }

/* ---------- buttons ---------- */

.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  font-size: var(--step-0);
  text-decoration: none;
  padding: 0.75rem 1.3rem;
  border-radius: 6px;
  border: 2px solid var(--ink);
  background: var(--ink);
  color: var(--white);
  cursor: pointer;
}
.btn:hover { background: var(--higher); border-color: var(--higher); color: var(--white); }

.btn-quiet { background: transparent; color: var(--ink); }
.btn-quiet:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }

.btn[aria-disabled="true"] {
  background: var(--paper-2);
  border-color: var(--line);
  color: var(--slate);
  cursor: default;
}

/* ---------- sections ---------- */

.section { padding: clamp(2.5rem, 6vw, 4rem) 0; }
.section-alt { background: var(--white); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 1.75rem; }
.section-head p { color: var(--slate); }

.points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1.5rem 2.5rem;
}
.points li { border-left: 4px solid var(--line); padding-left: 1rem; }
.points li:nth-child(1) { border-left-color: var(--ph-3); }
.points li:nth-child(2) { border-left-color: var(--ph-7); }
.points li:nth-child(3) { border-left-color: var(--ph-10); }
.points h3 { margin-bottom: 0.3em; }
.points p { margin: 0; color: var(--slate); }

/* ---------- packs ---------- */

.pack-list { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }

.pack {
  display: grid;
  grid-template-columns: 7.5rem minmax(0, 1fr) auto;
  gap: 1rem 1.75rem;
  align-items: start;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.level {
  display: inline-block;
  font-weight: 700;
  font-size: var(--step--1);
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border-left: 5px solid currentColor;
}
.level-n5 { color: var(--n5); background: var(--n5-tint); }
.level-higher { color: var(--higher); background: var(--higher-tint); }

.pack h3 { margin-bottom: 0.35em; }
.pack p { color: var(--slate); margin-bottom: 0.6em; }
.pack ul { margin: 0; padding-left: 1.2rem; color: var(--slate); }
.pack ul li { margin-bottom: 0.15em; }

.pack-buy { text-align: right; min-width: 10rem; }
.price {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--step-2);
  display: block;
  margin-bottom: 0.5rem;
}
.price-note { display: block; font-size: var(--step--1); color: var(--slate); margin-top: 0.4rem; }

/* ---------- sample band ---------- */

.sample-band {
  background: var(--ink);
  color: var(--white);
  border-radius: 8px;
  padding: clamp(1.5rem, 5vw, 2.75rem);
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 1.5rem 2.5rem;
  align-items: center;
}
.sample-band p { color: #c9d8d5; margin-bottom: 0; }
.sample-band .btn { background: var(--ph-5); border-color: var(--ph-5); color: var(--ink); }
.sample-band .btn:hover { background: var(--white); border-color: var(--white); }

/* ---------- steps (a genuine sequence) ---------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; max-width: var(--measure); }
.steps li { counter-increment: step; position: relative; padding: 0 0 1.25rem 3rem; }
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: var(--step--1);
}
.steps strong { display: block; }

/* ---------- FAQ ---------- */

.faq { max-width: 46rem; }
.faq details { border-bottom: 1px solid var(--line); padding: 1rem 0; }
.faq summary {
  cursor: pointer;
  font-family: var(--font-head);
  font-weight: 650;
  font-size: var(--step-1);
  list-style-position: outside;
}
.faq details p { margin: 0.75rem 0 0; color: var(--slate); }

/* ---------- prose pages ---------- */

.page-head { padding: clamp(2.5rem, 6vw, 4rem) 0 1rem; }
.page-head h1 { font-size: var(--step-3); max-width: 22ch; }
.page-head p { color: var(--slate); font-size: var(--step-1); }

.prose { padding-bottom: 4rem; }
.prose h2 { font-size: var(--step-2); margin-top: 2rem; }
.prose ul { max-width: var(--measure); padding-left: 1.2rem; }
.prose li { margin-bottom: 0.4em; }
.updated { color: var(--slate); font-size: var(--step--1); }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.5rem 0 3rem;
  font-size: var(--step--1);
  color: var(--slate);
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1.5rem;
}
.site-footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.site-footer a { color: var(--slate); }
.site-footer p { margin: 0 0 0.4em; }

/* ---------- responsive ---------- */

@media (max-width: 760px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .element-tile { justify-self: start; width: 11rem; padding: 0.8rem; box-shadow: 7px 7px 0 var(--ph-10); grid-row: 1; }
  .element-tile .sym { font-size: 4.2rem; }
  .element-tile .num, .element-tile .name { font-size: var(--step-0); }

  .pack { grid-template-columns: 1fr; gap: 0.75rem; }
  .pack-buy { text-align: left; }

  .sample-band { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

.section-flush { padding-top: 0; }
.section-near { padding-top: 1rem; }
