/* ============================================================
   TIMEPIX@school pre-lab orientation
   Palette: primary #1ebcba · accent #f08081 · shades #b6e1df / #f4d3d3
   Type: Open Sans (CERN web body face), Roboto Mono for instrument readouts
   ============================================================ */

:root {
  --teal: #1ebcba;
  --coral: #f08081;
  --teal-light: #b6e1df;
  --coral-light: #f4d3d3;

  --ink: #1c2b2b;
  --ink-60: #51635f;
  --bg: #ffffff;
  --bg-soft: #f5fbfb;

  --shadow: 0 1px 2px rgba(28, 43, 43, 0.06), 0 6px 20px rgba(28, 43, 43, 0.06);
  --shadow-lg: 0 10px 40px rgba(28, 43, 43, 0.12);
  --radius: 14px;

  --maxw: 940px;
  --font: "Open Sans", "Helvetica Neue", Arial, sans-serif;
  --mono: "Roboto Mono", ui-monospace, "SF Mono", Menlo, monospace;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 400;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
}

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
.wrap--narrow {
  max-width: 680px;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block;
  background: var(--teal);
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  border-radius: 999px;
  padding: 13px 30px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    background 0.15s ease;
}
.btn:hover {
  background: #18a3a1;
  transform: translateY(-1px);
}
.btn:active {
  transform: translateY(0);
}
.btn--ghost {
  background: transparent;
  color: var(--teal);
  box-shadow: inset 0 0 0 2px var(--teal);
}
.btn--ghost:hover {
  background: rgba(30, 188, 186, 0.08);
}
.hero .btn--ghost {
  color: #fff;
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.8);
}
.hero .btn--ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

/* ---------- sticky nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #000000;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.18);
}
.topnav__inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  gap: 24px;
  height: 52px;
}
.topnav__logo {
  height: 26px;
  width: auto;
  flex-shrink: 0;
}
.topnav__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
}
.topnav__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  background: none;
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  font-family: var(--font);
  transition:
    background 0.12s ease,
    color 0.12s ease;
  white-space: nowrap;
}
.topnav__link::after {
  content: none;
}
.topnav__has-drop .topnav__link::after {
  content: "▾";
  font-size: 0.7rem;
  opacity: 0.7;
}
.topnav__link:hover,
.topnav__link[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}
.topnav__link.is-active {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

/* dropdown */
.topnav__has-drop {
  position: relative;
}
.topnav__dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 2px);
  left: 0;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.18);
  list-style: none;
  padding: 8px 0;
  margin: 0;
  min-width: 280px;
  z-index: 200;
}
.topnav__has-drop:hover .topnav__dropdown,
.topnav__has-drop:focus-within .topnav__dropdown {
  display: block;
}
.topnav__dropdown li {
  padding: 0;
}
.topnav__dropdown a {
  display: block;
  padding: 10px 18px;
  font-size: 0.9rem;
  font-weight: 600;
  color: #000000;
  text-decoration: none;
}
.topnav__dropdown a:hover {
  background: var(--bg-soft);
}
.topnav__coming {
  padding: 10px 18px;
  font-size: 0.9rem;
  color: #aaa;
  font-style: italic;
  cursor: default;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: #000000;
  color: #fff;
  min-height: 78vh;
  display: flex;
  align-items: center;
}
#pixelHero {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.hero__inner {
  position: relative;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 80px 24px;
  width: 100%;
}
.hero__logo {
  display: block;
  height: 220px;
  width: auto;
  max-width: 100%;
  margin: 0 0 28px;
}
.hero__logo--fallback {
  height: auto;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.01em;
  color: #fff;
}
.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal-light);
  margin: 0 0 18px;
}
.hero__title {
  font-size: clamp(2.8rem, 8vw, 5rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.25em;
}
.hero__lead {
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  max-width: 30ch;
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 1em;
}
.hero__meta {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--teal-light);
  margin: 0 0 2em;
}

/* ---------- part sections ---------- */
.part {
  padding: 84px 0;
}
.part--alt {
  background: var(--bg-soft);
}

.part__label {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin: 0 0 6px;
}
.part__label--coral {
  color: var(--coral);
}
.part__title {
  font-size: clamp(1.9rem, 4vw, 2.6rem);
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 0.3em;
}
.part__intro {
  font-size: 1.12rem;
  color: var(--ink-60);
  max-width: 56ch;
  margin: 0 0 38px;
}

/* ---------- cards (no coloured borders) ---------- */
.card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 32px;
  margin-bottom: 22px;
}
.card--tint {
  background: var(--teal-light);
  box-shadow: none;
}
.card h3 {
  font-size: 1.35rem;
  font-weight: 700;
}
.card h4 {
  font-size: 1.05rem;
  font-weight: 700;
  margin-top: 1.4em;
}
.card p {
  margin: 0 0 1em;
}
.card p:last-child {
  margin-bottom: 0;
}

.readout {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--ink-60);
  background: var(--bg-soft);
  border-radius: 8px;
  padding: 10px 14px;
  display: inline-block;
}
.card--tint .readout {
  background: rgba(255, 255, 255, 0.5);
}

.note {
  font-size: 0.95rem;
  color: var(--ink-60);
  font-style: italic;
}
.note--strong {
  font-style: normal;
  background: rgba(255, 255, 255, 0.55);
  border-radius: 8px;
  padding: 14px 18px;
  color: var(--ink);
}

/* ---------- checklist ---------- */
.checklist {
  list-style: none;
  padding: 0;
  margin: 0 0 1.2em;
}
.checklist li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 0.7em;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.42em;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  background: var(--teal);
}
.card--tint .checklist li::before {
  background: var(--teal);
}

/* ---------- media / placeholders ---------- */
.media {
  margin: 22px 0 0;
}
.media img {
  width: 100%;
  border-radius: 10px;
  display: block;
}
.media figcaption,
.hotspot + .hotspot__panel {
  font-size: 0.85rem;
  color: var(--ink-60);
}
.media figcaption {
  margin-top: 8px;
}
.media__fallback {
  width: 100%;
  aspect-ratio: 16/7;
  display: flex;
  align-items: center;
  justify-content: center;
  background: repeating-linear-gradient(
    45deg,
    var(--bg-soft),
    var(--bg-soft) 12px,
    #eef7f7 12px,
    #eef7f7 24px
  );
  border-radius: 10px;
  color: var(--ink-60);
  font-weight: 600;
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* ---------- hotspots ---------- */
.hotspot {
  position: relative;
  display: inline-block;
  width: 100%;
  margin-top: 18px;
}
.hotspot__img {
  width: 100%;
  border-radius: 10px;
  display: block;
}
.hotspot__dot {
  position: absolute;
  width: 30px;
  height: 30px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 2px solid #fff;
  background: var(--coral);
  color: #fff;
  font-weight: 700;
  font-family: var(--mono);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(28, 43, 43, 0.25);
  transition: transform 0.12s ease;
}
.hotspot__dot:hover,
.hotspot__dot[aria-current="true"] {
  transform: translate(-50%, -50%) scale(1.18);
}
.hotspot__dot[aria-current="true"] {
  background: var(--teal);
}
.hotspot__panel {
  margin-top: 16px;
  background: var(--coral-light);
  border-radius: 10px;
  padding: 16px 20px;
  min-height: 58px;
}
.hotspot__panel h4 {
  margin: 0 0 4px;
  font-size: 1.02rem;
}
.hotspot__panel p {
  margin: 0;
}
.hotspot__hint {
  color: var(--ink-60);
  font-style: italic;
}

/* ---------- flip cards ---------- */
.flips {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 18px 0 8px;
}
.flip {
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  perspective: 900px;
  font-family: inherit;
  aspect-ratio: 3/4;
}
.flip__inner {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  transition: transform 0.5s;
  transform-style: preserve-3d;
}
.flip[aria-pressed="true"] .flip__inner {
  transform: rotateY(180deg);
}
.flip__face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: var(--radius);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
}
.flip__front {
  background: var(--teal);
  color: #fff;
}
.flip__front--alpha {
  background: #f08081;
}
.flip__front--beta {
  background: #1ebcba;
}
.flip__front--gamma {
  background: #b6e1df;
  color: var(--ink);
}
.flip__front--muon {
  background: #f4d3d3;
  color: var(--ink);
}
.flip__back {
  background: #003d78;
  box-shadow: var(--shadow);
  transform: rotateY(180deg);
  flex-direction: column;
  gap: 10px;
}
.flip__greek {
  font-size: 3rem;
  font-weight: 300;
  line-height: 1;
}
.flip__name {
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.85rem;
  margin-top: 6px;
}
.flip__sub {
  font-size: 0.75rem;
  opacity: 0.82;
  margin-top: 4px;
  line-height: 1.3;
}

.track-svg {
  width: 90px;
  height: 90px;
  border-radius: 6px;
  flex-shrink: 0;
}
.track-label {
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.35;
  text-align: center;
}

.xray-note {
  margin-top: 22px;
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 16px 20px;
  font-size: 0.95rem;
  color: var(--ink-60);
}
.xray-note strong {
  color: var(--ink);
}

.penetration {
  margin-top: 26px;
}
.penetration h4 {
  margin-top: 0;
}

/* ---------- misconceptions ---------- */
.misc-intro {
  color: var(--ink-60);
  margin-bottom: 22px;
}
.misc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.misc-item {
  background: var(--bg-soft);
  border-radius: 10px;
  padding: 18px 20px;
  text-align: left;
  border: none;
  cursor: pointer;
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: background 0.15s ease;
  width: 100%;
}
.misc-item:hover {
  background: var(--teal-light);
  outline: 2px solid var(--coral);
  outline-offset: 0;
}
.misc-item[aria-expanded="true"] {
  background: #fff;
  box-shadow: var(--shadow);
}
.misc-tag {
  font-weight: 700;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--coral);
}
.misc-teaser {
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.misc-body {
  font-size: 0.95rem;
  color: var(--ink-60);
  line-height: 1.55;
  display: none;
  margin-top: 4px;
}
.misc-item[aria-expanded="true"] .misc-body {
  display: block;
}
.misc-item[aria-expanded="true"] .misc-cue {
  display: none;
}
.misc-cue {
  font-size: 0.8rem;
  color: var(--teal);
  font-weight: 600;
  margin-top: 4px;
}
cite {
  font-style: normal;
  font-size: 0.82rem;
  color: var(--ink-60);
  display: block;
  margin-top: 6px;
}

/* ---------- bridge ---------- */
.bridge {
  background: var(--teal);
  color: #fff;
  padding: 76px 0;
  text-align: center;
}
.bridge h2 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  font-weight: 800;
}
.bridge p {
  font-size: 1.12rem;
  max-width: 54ch;
  margin: 0 auto 1.8em;
  color: rgba(255, 255, 255, 0.94);
}
.bridge .btn {
  background: #fff;
  color: var(--teal);
}
.bridge .btn:hover {
  background: var(--coral-light);
}

/* ---------- footer ---------- */
.foot {
  background: #000000;
  color: rgba(255, 255, 255, 0.72);
  padding: 40px 0;
  font-size: 0.85rem;
}
.foot__prov {
  margin: 0 0 8px;
}
.foot__flag {
  margin: 0;
  color: var(--coral-light);
}

/* ---------- activity preview ---------- */
.preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-top: 10px;
}
.preview-card {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px 30px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.preview-card--soon {
  opacity: 0.6;
}
.preview-num {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--coral);
  letter-spacing: 0.1em;
}
.preview-card h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 8px 0 10px;
}
.preview-card p {
  color: var(--ink-60);
  margin: 0 0 22px;
}
.preview-card .btn,
.preview-card .btn--muted {
  margin-top: auto;
}
.btn--muted {
  display: inline-block;
  border-radius: 999px;
  padding: 13px 30px;
  background: #e0e0e0;
  color: #888;
  font-weight: 700;
  font-size: 1rem;
  cursor: default;
}
.preview-more {
  margin-top: 24px;
  color: var(--ink-60);
  font-style: italic;
}

/* ---------- penetration SVG diagram ---------- */
.pen-wrap {
  position: relative;
  margin: 18px 0 4px;
}
#penSVG {
  width: 100%;
  height: auto;
  display: block;
}
.pen-ray {
  transition: opacity 0.15s;
}
.pen-ray.dimmed {
  opacity: 0.18;
}
.pen-ray.highlighted .pen-solid {
  stroke-width: 4;
}
.pen-ray.highlighted .pen-label {
  font-size: 16px;
}
.pen-barrier.active rect {
  fill: rgba(30, 188, 186, 0.08);
}

.pen-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 14px 18px;
  margin-bottom: 14px;
  min-height: 54px;
  font-size: 0.95rem;
  transition: opacity 0.2s;
}
.pen-card__hint {
  color: var(--ink-60);
  font-style: italic;
  margin: 0;
}
.pen-card__title {
  font-weight: 700;
  color: var(--teal);
  margin: 0 0 4px;
}
.pen-card__body {
  margin: 0;
}

/* ---------- responsive ---------- */
@media (max-width: 800px) {
  .misc-grid {
    grid-template-columns: 1fr;
  }
  .preview-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .part {
    padding: 56px 0;
  }
  .card {
    padding: 24px 22px;
  }
  .flips {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
  }
  .flip {
    aspect-ratio: 3/4;
  }
  .flip__greek {
    font-size: 2.4rem;
  }
  .track-svg {
    width: 70px;
    height: 70px;
  }
}

/* ---------- accessibility ---------- */
:focus-visible {
  outline: 3px solid var(--coral);
  outline-offset: 3px;
  border-radius: 4px;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .flip__inner {
    transition: none;
  }
  * {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---------- print (prediction sheet) ---------- */
@media print {
  body * {
    visibility: hidden;
  }
}
/* trigger question */
.misc-trigger {
  margin-top: 22px;
  padding: 18px 20px;
  background: var(--teal-light);
  border-radius: 10px;
}
.misc-trigger p {
  margin: 0 0 6px;
  font-size: 1rem;
  font-weight: 600;
}
.misc-trigger p:last-child {
  margin: 0;
}
.misc-trigger__note {
  font-size: 0.88rem;
  color: var(--ink-60);
  font-weight: 400 !important;
  font-style: italic;
}

/* ---------- penetration diagram (canvas) ---------- */
.pen3d-wrap {
  margin: 18px 0 0;
  overflow-x: auto;
}
.pen3d-info {
  margin-top: 14px;
  background: var(--coral-light);
  border-radius: 10px;
  padding: 14px 18px;
  font-size: 0.92rem;
  min-height: 46px;
}
.pen3d-info__hint {
  color: var(--ink-60);
  font-style: italic;
  margin: 0;
}
.pen3d-info h5 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 700;
}
.pen3d-info p {
  margin: 0;
  color: var(--ink);
}
.topnav__logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
}

/* ---------- activity card illustrations ---------- */
.preview-card__img {
  width: 100%;
  max-width: 100%;
  height: 180px;
  max-height: 180px;
  object-fit: contain;
  margin: 14px 0 18px;
  display: block;
}

/* ---------- decorative strip between hero and main ---------- */
.deco-strip {
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
  padding: 20px 24px;
  flex-wrap: wrap;
}
.deco-img {
  height: 96px;
  max-height: 96px;
  width: auto;
  max-width: 120px;
  object-fit: contain;
  opacity: 0.88;
}

/* ---------- card decoration images ---------- */
.card-deco-wrap {
  display: flex;
  justify-content: flex-start;
  margin: -8px 0 14px;
  pointer-events: none;
}
.card-deco {
  height: 120px;
  max-height: 120px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  opacity: 0.92;
  display: block;
}
/* scattered stationery in ideas card */
.ideas-deco {
  display: flex;

  justify-content: flex-start;
  flex-wrap: wrap;
  margin: -8px 0 16px;
  pointer-events: none;
}
.ideas-deco img {
  height: 80px;
  max-height: 80px;
  width: auto;
  max-width: 100px;
  object-fit: contain;
  opacity: 0.88;
}
.ideas-deco img:nth-child(2) {
  transform: rotate(12deg);
}
.ideas-deco img:nth-child(3) {
  transform: rotate(-8deg);
  margin-top: 10px;
}

/* ---------- exponential decay section ---------- */
.decay-intro {
  font-size: 1rem;
  color: var(--ink-60);
  margin: 0 0 20px;
}
.decay-text p {
  font-size: 1rem;
  color: var(--ink);
  margin: 0 0 1em;
}
.decay-img {
  display: block;
  margin: 22px auto;
  width: 35%;
  max-width: 200px;
  min-width: 100px;
  border-radius: 10px;
}

.card-split {
  display: flex;
  align-items: flex-start;
  gap: 24px;
}
.card-split__img {
  flex-shrink: 0;
  width: 180px;
  max-width: 180px;
  max-height: 220px;
  object-fit: contain;
}
.card-split__body {
  flex: 1;
  min-width: 0;
}
@media (max-width: 480px) {
  .card-split {
    flex-direction: column;
  }
  .card-split__img {
    width: 100%;
    max-width: 100%;
    max-height: 180px;
  }
}
