/* ============ Design tokens ============ */
:root {
  --bg: #0a0e1a;
  --bg-alt: #0e1424;
  --surface: #141b30;
  --surface-2: #1a2340;
  --line: rgba(255, 255, 255, 0.08);
  --text: #e8ecf6;
  --text-dim: #9aa5c0;
  --accent: #ef482c;      /* TibCERT red */
  --accent-soft: rgba(239, 72, 44, 0.14);
  --gold: #f5b942;
  --teal: #2dd4bf;
  --radius: 16px;
  --font-head: "Sora", sans-serif;
  --font-body: "Inter", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  font-size: 17px; /* slight bump from browser default 16px */
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.05rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; }

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}
.container--narrow { width: min(820px, 92vw); }

/* ============ Progress bar ============ */
.progress-bar {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  background: linear-gradient(90deg, var(--accent), var(--gold));
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 100;
}

/* ============ Nav ============ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem clamp(1rem, 4vw, 3rem);
  background: rgba(10, 14, 26, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav__brand {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  letter-spacing: 0.01em;
}
.nav__brand em { color: var(--accent); font-style: normal; }
.nav__brand-logo {
  width: 27px;
  height: 27px;
  border-radius: 8px;
  box-shadow: 0 0 14px rgba(139, 150, 245, 0.45);
}

.nav__mode {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: transparent;
  border: 1px solid var(--line);
  color: var(--text-dim);
  border-radius: 999px;
  padding: 0.42rem 0.9rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.78rem;
  cursor: pointer;
  transition: all 0.25s;
  white-space: nowrap;
}
.nav__mode:hover { color: var(--text); border-color: rgba(245, 185, 66, 0.55); }
.nav__mode[aria-pressed="true"] {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a1405;
  box-shadow: 0 0 18px rgba(245, 185, 66, 0.45);
}

.nav__logos { display: flex; align-items: center; gap: 0.5rem; }
.nav__logos .logo-chip { padding: 0.3rem 0.65rem; border-radius: 9px; }
.nav__logos .logo-chip img { height: 22px; }

@media (max-width: 480px) {
  .nav__logos .logo-chip { padding: 0.22rem 0.45rem; }
  .nav__logos .logo-chip img { height: 17px; }
}

.nav__links { display: flex; gap: 1.6rem; }
.nav__links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: color 0.25s;
}
.nav__links a:hover { color: var(--text); }

@media (max-width: 720px) {
  .nav__links { display: none; }
}

/* ============ Hero ============ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 7rem 1.5rem 5rem;
  overflow: hidden;
}

#network-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.9;
}
body.projector #network-canvas { opacity: 1; }

.hero__inner { position: relative; z-index: 2; max-width: 880px; }

.hero__kicker {
  text-transform: uppercase;
  letter-spacing: 0.28em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--gold);
  margin-bottom: 1.4rem;
}

.hero__title {
  font-size: clamp(2.4rem, 7vw, 4.6rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-bottom: 1.5rem;
}
.hero__word { display: inline-block; }
.hero__word--amp { color: var(--accent); }

.hero__sub {
  font-size: clamp(1rem, 2.2vw, 1.2rem);
  color: var(--text-dim);
  max-width: 640px;
  margin: 0 auto 1.8rem;
}
.hero__sub strong { color: var(--text); }

.hero__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  justify-content: center;
  margin-bottom: 2.2rem;
}

.chip {
  padding: 0.4rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-dim);
}
.chip--accent {
  border-color: rgba(239, 72, 44, 0.4);
  background: var(--accent-soft);
  color: #ff9a87;
}

.hero__cta { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 3rem; }

.btn {
  display: inline-block;
  padding: 0.85rem 1.8rem;
  border-radius: 999px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  border: none;
  transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
}
.btn--primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 8px 30px rgba(239, 72, 44, 0.35);
}
.btn--primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(239, 72, 44, 0.5); }
.btn--ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.06); transform: translateY(-2px); }
.btn--small { padding: 0.6rem 1.3rem; font-size: 0.85rem; }

.logo-chip {
  background: #fff;
  border-radius: 12px;
  padding: 0.55rem 1rem;
  display: flex;
  align-items: center;
}
.logo-chip img { height: 34px; width: auto; }
.logo-chip--dark { background: #101728; border: 1px solid var(--line); }

.hero__scroll {
  position: absolute;
  bottom: 2rem; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 44px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  display: flex;
  justify-content: center;
  padding-top: 8px;
  z-index: 2;
}
.hero__scroll span {
  width: 4px; height: 8px;
  background: var(--text-dim);
  border-radius: 2px;
}

/* ============ Sections ============ */
.section { padding: clamp(4.5rem, 10vw, 7.5rem) 0; }

#agenda,
#overview {
  scroll-margin-top: 5.5rem;
}
.section--alt { background: var(--bg-alt); }

.section__kicker {
  text-transform: uppercase;
  letter-spacing: 0.26em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 0.9rem;
}

.section__title {
  font-size: clamp(1.8rem, 4.5vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.015em;
  margin-bottom: 1.2rem;
}

.section__lead {
  color: var(--text-dim);
  font-size: 1.05rem;
  max-width: 720px;
  margin-bottom: 2.5rem;
}
.section__lead strong { color: var(--text); }

/* ============ Stats ============ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1.2rem;
  margin-top: 1rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem 1.4rem;
  text-align: center;
}
.stat__num {
  display: block;
  font-family: var(--font-head);
  font-size: 2.6rem;
  font-weight: 800;
  color: var(--gold);
}
.stat__label { color: var(--text-dim); font-size: 0.88rem; }

/* ============ Demo ============ */
.demo {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(1.2rem, 3vw, 2.2rem);
  margin-bottom: 2.5rem;
}

.demo__controls {
  display: flex;
  flex-wrap: wrap;
  gap: 1.2rem;
  align-items: center;
  margin-bottom: 2rem;
}

.toggle {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  font-weight: 500;
  cursor: pointer;
}
.toggle:disabled { opacity: 0.35; cursor: not-allowed; }
.toggle__track {
  width: 44px; height: 24px;
  border-radius: 999px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  position: relative;
  transition: background 0.3s;
  flex-shrink: 0;
}
.toggle__thumb {
  position: absolute;
  top: 2px; left: 3px;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: var(--text-dim);
  transition: transform 0.3s, background 0.3s;
}
.toggle[aria-pressed="true"] .toggle__track { background: var(--accent); }
.toggle[aria-pressed="true"] .toggle__thumb { transform: translateX(19px); background: #fff; }

.demo__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 1.6rem 0.4rem 1rem;
  min-height: 130px;
}

.demo__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--text-dim);
  z-index: 2;
  flex-shrink: 0;
}
.demo__icon {
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.demo__wire {
  flex: 1;
  height: 2px;
  background: repeating-linear-gradient(90deg, rgba(255,255,255,0.25) 0 8px, transparent 8px 16px);
  position: relative;
  align-self: center;
  margin-bottom: 1.4rem;
}

.demo__firewall {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.7rem;
  color: var(--text-dim);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
  z-index: 2;
}
.demo__firewall-wall {
  font-size: 1.7rem;
  filter: drop-shadow(0 0 10px rgba(239, 72, 44, 0.7));
}

.demo__packet {
  position: absolute;
  top: 50%;
  left: 0;
  font-size: 1.35rem;
  z-index: 3;
  filter: drop-shadow(0 0 8px rgba(245, 185, 66, 0.8));
  transform: translateY(-70%);
}

.demo__status {
  text-align: center;
  font-size: 0.92rem;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
  padding-top: 1.1rem;
  min-height: 2.4em;
}
.demo__status.is-blocked { color: #ff8b76; }
.demo__status.is-ok { color: var(--teal); }

@media (max-width: 560px) {
  .demo__icon { width: 44px; height: 44px; font-size: 1.15rem; }
  .demo__node span { font-size: 0.7rem; }
}

/* ============ Cards ============ */
.cards { display: grid; gap: 1.2rem; }
.cards--three { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.cards--features { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

/* Fixed 3-per-row layout (e.g. 6 cards as 3 + 3) */
.cards--three-up { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .cards--three-up { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .cards--three-up { grid-template-columns: 1fr; } }

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.7rem 1.5rem;
  transition: transform 0.3s, border-color 0.3s;
}
.card:hover { transform: translateY(-4px); border-color: rgba(239, 72, 44, 0.35); }
.card h3 { font-size: 1.08rem; margin-bottom: 0.6rem; }
.card p { color: var(--text-dim); font-size: 0.93rem; }
.card__icon { font-size: 1.8rem; margin-bottom: 0.9rem; }

/* ============ Timeline / sessions ============ */
.timeline {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding-left: 2.1rem;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 9px; top: 8px; bottom: 8px;
  width: 2px;
  background: linear-gradient(180deg, var(--accent), var(--gold), var(--teal));
  opacity: 0.45;
}

.session {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color 0.3s;
}
.session::before {
  content: "";
  position: absolute;
  left: -1.72rem; top: 1.9rem;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--accent);
}
.session:hover { border-color: rgba(245, 185, 66, 0.35); }
.session[data-open="true"] { border-color: rgba(239, 72, 44, 0.45); }

.session__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 1.2rem;
  padding: 1.3rem 1.5rem;
  background: none;
  border: none;
  cursor: pointer;
  text-align: left;
  color: var(--text);
  font-family: var(--font-body);
}

.session__num {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.18);
  flex-shrink: 0;
}

.session__info { flex: 1; }
.session__info h3 { font-size: clamp(1rem, 2.4vw, 1.25rem); font-weight: 700; }

.session__tags { display: flex; gap: 0.5rem; margin-bottom: 0.35rem; flex-wrap: wrap; }

.tag {
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.18rem 0.6rem;
  border-radius: 999px;
}
.tag--time { background: rgba(255, 255, 255, 0.07); color: var(--text-dim); }
.tag--interactive { background: rgba(45, 212, 191, 0.14); color: var(--teal); }
.tag--concept { background: rgba(245, 185, 66, 0.14); color: var(--gold); }
.tag--practice { background: rgba(129, 140, 248, 0.16); color: #a5b4fc; }
.tag--hands { background: var(--accent-soft); color: #ff9a87; }

.session__chevron {
  color: var(--text-dim);
  transition: transform 0.35s;
  font-size: 1.1rem;
  flex-shrink: 0;
}
.session[data-open="true"] .session__chevron { transform: rotate(180deg); }

.session__body { height: 0; overflow: hidden; }
.session__content {
  padding: 0 1.5rem 1.5rem 4rem;
  color: var(--text-dim);
  font-size: 0.94rem;
}
.session__content p { margin-bottom: 0.8rem; }
.session__content strong { color: var(--text); }
.session__content h4 {
  color: var(--gold);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin: 1.1rem 0 0.5rem;
}
.session__content ul { padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; }
.session__content a:not(.session__more) {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px solid rgba(245, 185, 66, 0.4);
  transition: border-color 0.25s;
}
.session__content a:not(.session__more):hover { border-color: var(--gold); }

@media (max-width: 560px) {
  .session__content { padding-left: 1.5rem; }
  .session__head { gap: 0.8rem; padding: 1.1rem 1.1rem; }
}

/* ============ Trainer ============ */
.trainer {
  display: flex;
  gap: 1.4rem;
  align-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(1.1rem, 2.5vw, 1.6rem) clamp(1.2rem, 3vw, 2rem);
  max-width: 640px;
  margin: 0 auto;
}
.trainer__avatar {
  width: 72px; height: 72px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--gold));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 800;
  color: #fff;
  box-shadow: 0 8px 28px rgba(239, 72, 44, 0.35);
}
.trainer__info h2 { font-size: clamp(1.2rem, 2.8vw, 1.5rem); margin-bottom: 0.2rem; }
.trainer__role { color: var(--gold); font-weight: 600; font-size: 0.85rem; margin-bottom: 0.6rem; }
.trainer__bio { color: var(--text-dim); font-size: 0.87rem; line-height: 1.55; }

@media (max-width: 560px) {
  .trainer { flex-direction: column; text-align: center; }
}

/* ============ Footer ============ */
.footer {
  border-top: 1px solid var(--line);
  padding: 3.5rem 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.92rem;
}
.footer__logos {
  display: flex;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1.6rem;
  flex-wrap: wrap;
}
.footer__fine { margin-top: 0.5rem; font-size: 0.8rem; opacity: 0.7; }

/* ============ Deep-dive links in sessions ============ */
.session__more {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1.1rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  background: var(--accent-soft);
  border: 1px solid rgba(239, 72, 44, 0.4);
  color: #ff9a87;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.85rem;
  text-decoration: none;
  transition: background 0.25s, transform 0.25s, color 0.25s;
}
.session__more:hover {
  background: rgba(239, 72, 44, 0.28);
  color: #fff;
  transform: translateX(3px);
}

/* ============ Reveal (JS sets initial state) ============ */
.reveal { will-change: transform, opacity; }

/* ============ Baseline prominence for interactives ============ */
.demo { border-color: rgba(245, 185, 66, 0.25); }
.demo__packet { font-size: 1.6rem; }
.demo__status { font-size: 1rem; }

/* ============ Projector mode (high contrast for bright rooms) ============ */
body.projector {
  --text: #ffffff;
  --text-dim: #d7deec;
  --line: rgba(255, 255, 255, 0.26);
  --bg: #0d1322;
  --bg-alt: #141c32;
  --surface: #1b2444;
  --surface-2: #263256;
}
body.projector .section__lead { font-size: 1.16rem; }
body.projector .section__kicker { font-size: 0.85rem; }
body.projector .card p { font-size: 0.99rem; }
body.projector .card h3 { font-size: 1.15rem; }
body.projector .btn--small { font-size: 0.98rem; padding: 0.72rem 1.55rem; }
body.projector .toggle { font-size: 1.04rem; }
body.projector .toggle__track { width: 52px; height: 28px; }
body.projector .toggle__thumb { width: 21px; height: 21px; }
body.projector .toggle[aria-pressed="true"] .toggle__thumb { transform: translateX(23px); }

body.projector .demo {
  border-width: 2px;
  border-color: rgba(245, 185, 66, 0.55);
  box-shadow: 0 0 46px rgba(245, 185, 66, 0.14);
}
body.projector .demo__icon { width: 76px; height: 76px; font-size: 2.05rem; border-width: 2px; }
body.projector .demo__node { font-size: 1rem; color: var(--text); }
body.projector .demo__packet { font-size: 2.15rem; }
body.projector .demo__firewall-wall { font-size: 2.35rem; }
body.projector .demo__firewall span { font-size: 0.85rem; color: var(--text); }
body.projector .demo__wire { height: 3px; }
body.projector .demo__status { font-size: 1.18rem; font-weight: 600; color: var(--text); }
body.projector .session__info h3 { font-size: clamp(1.1rem, 2.6vw, 1.4rem); }
body.projector .session__content { font-size: 1.02rem; }
