/* =========================================================

   BINARY EXPLOITATION CAMP — PAGE-SPECIFIC STYLES

   Shared chrome (navbar, footer, section headers, buttons,
   final CTA) lives in assets/css/chrome.css. Everything below
   is camp-specific: the mythological hero layer (constellation
   canvas, aurora, sigils), the five day-seals, the two-column
   registration layout and the form.

   The "mythical" treatment is deliberately restrained — same
   palette, same grid, same type as the rest of the site. It
   shows up as atmosphere (glow, stars, sigils) rather than as
   a different design language.

   ========================================================= */


/* =========================================================
   HERO
   ========================================================= */

.camp-hero {
  position: relative;

  min-height: 100vh;

  display: flex;

  align-items: center;

  padding: 150px 35px 120px;

  overflow: hidden;

  isolation: isolate;

}

/* Canvas of stars + constellation lines. Sits behind the
   aurora glow, in front of the page background. */
.myth-canvas {
  position: absolute;

  inset: 0;

  width: 100%;

  height: 100%;

  z-index: 0;

  pointer-events: none;
}

.hero-aurora {
  position: absolute;

  inset: -25% -10% 10% -10%;

  z-index: 0;

  pointer-events: none;

  background:
    radial-gradient(45% 42% at 22% 34%, rgba(75,24,120,.55), transparent 70%),
    radial-gradient(38% 36% at 78% 24%, rgba(138,79,209,.35), transparent 72%),
    radial-gradient(55% 40% at 62% 78%, rgba(46,11,78,.5), transparent 70%);

  filter: blur(20px);

  animation: auroraDrift 26s ease-in-out infinite alternate;
}

/* Darkens the glow toward the bottom of the hero so the
   countdown section below reads cleanly. */
.hero-vignette {
  position: absolute;

  inset: 0;

  z-index: 1;

  pointer-events: none;

  background:
    radial-gradient(120% 80% at 50% 0%, transparent 40%, var(--bg) 92%),
    linear-gradient(180deg, transparent 55%, var(--bg) 100%);
}

@keyframes auroraDrift {
  from { transform: translate3d(-2%, -1%, 0) scale(1); }
  to   { transform: translate3d(2%, 2%, 0) scale(1.08); }
}

.camp-hero-inner {
  position: relative;

  z-index: 2;

  max-width: var(--max);

  width: 100%;

  margin: auto;
}

/* Angular rune, drawn with box-drawing characters so it
   scales with the monospace font and needs no asset. */
.sigil-pre {
  font-family: "IBM Plex Mono", monospace;

  font-size: clamp(13px, 1.6vw, 18px);

  line-height: 1.05;

  color: var(--accent);

  text-shadow: 0 0 22px rgba(138,79,209,.55);

  margin: 0 0 34px;

  opacity: .9;

  animation: sigilBreathe 6s ease-in-out infinite;
}

@keyframes sigilBreathe {
  0%, 100% { opacity: .55; text-shadow: 0 0 14px rgba(138,79,209,.3); }
  50%      { opacity: 1;   text-shadow: 0 0 30px rgba(138,79,209,.75); }
}

.camp-hero .eyebrow {
  color: var(--accent);

  font-family: "IBM Plex Mono", monospace;

  font-size: 10px;

  letter-spacing: 3px;
}

.camp-hero h1 {
  margin-top: 22px;

  font-size: clamp(46px, 8.4vw, 104px);

  line-height: .88;

  letter-spacing: -4px;
}

.camp-hero h1 > span > span {
  color: var(--accent);

  text-shadow: 0 0 44px rgba(138,79,209,.35);
}

.hero-lead {
  margin-top: 30px;

  max-width: 620px;

  color: var(--soft);

  font-size: 15px;

  line-height: 1.85;
}

.camp-hero .hero-actions {
  display: flex;

  flex-wrap: wrap;

  gap: 14px;

  margin-top: 40px;
}

.hero-chips {
  display: flex;

  flex-wrap: wrap;

  gap: 1px;

  margin-top: 56px;

  background: var(--border);

  border: 1px solid var(--border);

}

.chip {
  display: flex;

  align-items: baseline;

  gap: 9px;

  padding: 13px 20px;

  background: rgba(15,13,18,.72);

  backdrop-filter: blur(6px);

  font-size: 9px;

  letter-spacing: 1.6px;

  color: var(--muted);
}

.chip b {
  font-family: "IBM Plex Mono", monospace;

  font-size: 15px;

  font-weight: 500;

  color: var(--accent);
}

/* Hairline that runs the width of the hero, with a bright
   node at the centre — the "gathering point" motif. */
.hero-sigil-line {
  position: absolute;

  left: 0;

  right: 0;

  bottom: 0;

  height: 1px;

  z-index: 2;

  background: linear-gradient(90deg, transparent, var(--border) 18%, var(--accent) 50%, var(--border) 82%, transparent);

  opacity: .6;
}


/* =========================================================
   COUNTDOWN
   ========================================================= */

.section-tight {
  padding-top: 90px;

  padding-bottom: 30px;

  border-bottom: none;
}

.countdown-wrap {
  text-align: center;
}

.countdown-boxes {
  display: flex;

  justify-content: center;

  gap: 18px;
}

.countdown-box {
  min-width: 92px;

  padding: 18px 12px;

  border: 1px solid var(--border);

  border-radius: 6px;

  background: var(--surface);
}

.countdown-num {
  font-family: "IBM Plex Mono", monospace;

  font-size: 32px;

  font-weight: 600;

  color: var(--accent);
}

.countdown-lbl {
  margin-top: 5px;

  font-size: 9px;

  letter-spacing: 1.6px;

  color: var(--muted);

  text-transform: uppercase;
}

/* Only the state matching data-state is shown. The copy for
   each state lives in the HTML in both languages. */
.countdown-state {
  display: none;

  max-width: 620px;

  margin: 0 auto;

  padding: 24px 26px;

  border: 1px solid var(--border);

  border-left: 2px solid var(--accent);

  border-radius: 4px;

  background: var(--surface);

  color: var(--soft);

  font-size: 13px;

  line-height: 1.8;
}

.countdown-wrap[data-state="tba"] .countdown-boxes,
.countdown-wrap[data-state="live"] .countdown-boxes {
  display: none;
}

.countdown-wrap[data-state="tba"] .state-tba,
.countdown-wrap[data-state="live"] .state-live {
  display: block;
}


/* =========================================================
   TWO-COLUMN BODY SECTIONS
   ========================================================= */

.two-column {
  display: grid;

  grid-template-columns: 1.15fr 1fr;

  gap: 70px;
}

.column h3 {
  font-size: 19px;

  margin-bottom: 20px;
}

.column p {
  color: var(--soft);

  font-size: 13.5px;

  line-height: 1.9;

  margin-bottom: 16px;
}

.column p:last-child {
  margin-bottom: 0;
}

.column-signature {
  margin-top: 26px;

  padding-top: 20px;

  border-top: 1px solid var(--border);

  color: var(--muted) !important;

  font-size: 11.5px !important;

  letter-spacing: .3px;
}

.section-intro {
  max-width: 640px;

  margin: -28px 0 60px;

  color: var(--soft);

  font-size: 14px;

  line-height: 1.85;
}


/* ---- Fact list ---- */

.fact-list {
  border-top: 1px solid var(--border);
}

.fact-list > div {
  display: flex;

  align-items: baseline;

  justify-content: space-between;

  gap: 24px;

  padding: 13px 2px;

  border-bottom: 1px solid var(--border);
}

.fact-list dt {
  flex: none;

  font-size: 9px;

  letter-spacing: 1.6px;

  color: var(--muted);
}

.fact-list dd {
  margin: 0;

  text-align: right;

  font-size: 12.5px;

  color: var(--text);
}


/* =========================================================
   THE FIVE SEALS — DAY CARDS
   ========================================================= */

.seal-grid {
  display: grid;

  grid-template-columns: repeat(5,1fr);

  gap: 1px;

  background: var(--border);

  border: 1px solid var(--border);
}

.seal-card {
  display: flex;

  flex-direction: column;

  padding: 32px 26px;

  background: var(--bg);

  transition: background .25s;
}

.seal-card:hover {
  background: var(--surface);
}

/* Circular emblem: two static rings plus the day glyph. */
.seal {
  position: relative;

  width: 78px;

  height: 78px;

  margin-bottom: 24px;
}

.seal svg {
  width: 100%;

  height: 100%;

  display: block;
}

.seal .ring-outer,
.seal .ring-mid {
  fill: none;

  stroke: var(--border);

  stroke-width: 1;
}

.seal .ring-mid {
  stroke-dasharray: 4 7;
}

.seal .sigil-glyph {
  fill: none;

  stroke: var(--accent);

  stroke-width: 1.6;

  stroke-linejoin: round;
}

.seal-num {
  position: absolute;

  inset: 0;

  display: flex;

  align-items: center;

  justify-content: center;

  font-family: "IBM Plex Mono", monospace;

  font-size: 15px;

  color: var(--text);

  letter-spacing: .5px;
}

/* The fifth card is the final: a warmer, brighter seal. */
.seal-final .seal .ring-outer,
.seal-final .seal .ring-mid {
  stroke: var(--accent);
}

.seal-final .seal .ring-mid {
  stroke-dasharray: 3 5;

  animation: sealSpin 26s linear infinite;
}

.seal-final .seal .sigil-glyph {
  fill: var(--sigil-fill, rgba(138,79,209,.16));
}

.seal-final {
  background: linear-gradient(180deg, rgba(75,24,120,.16), transparent 55%), var(--bg);
}

@keyframes sealSpin {
  to { transform: rotate(360deg); transform-origin: 50% 50%; }
}

.seal-tags {
  display: flex;

  flex-wrap: wrap;

  gap: 6px;

  margin-bottom: 16px;
}

.tag {
  padding: 4px 8px;

  border: 1px solid var(--border);

  border-radius: 3px;

  font-family: "IBM Plex Mono", monospace;

  font-size: 8px;

  letter-spacing: 1.3px;

  color: var(--muted);

  line-height: 1;
}

.tag-lab {
  color: #69D69B;

  border-color: rgba(105,214,155,.4);
}

/* Theory is the default .tag look; spelled out so the three
   day-types read as a set. */
.tag-theory {
  color: var(--soft);
}

.tag-final {
  color: var(--accent);

  border-color: var(--accent);
}

.seal-card h3 {
  font-size: 16px;

  letter-spacing: .3px;
}

.seal-card p {
  margin-top: 14px;

  color: var(--muted);

  font-size: 11.5px;

  line-height: 1.8;
}

.seal-link {
  margin-top: auto;

  padding-top: 22px;

  font-size: 9px;

  letter-spacing: 1.6px;

  color: var(--accent);

  transition: opacity .2s;
}

.seal-link:hover {
  opacity: .7;
}


/* =========================================================
   REQUIREMENTS
   ========================================================= */

.check-list {
  display: flex;

  flex-direction: column;

  gap: 16px;
}

.check-list li {
  position: relative;

  padding-left: 30px;

  color: var(--soft);

  font-size: 13px;

  line-height: 1.8;
}

/* Marked list — the tick is drawn, not typed, so it stays
   crisp at every size and mirrors the palette in both themes. */
.check-list li::before {
  content: "";

  position: absolute;

  left: 0;

  top: 7px;

  width: 13px;

  height: 8px;

  border-left: 1.5px solid var(--accent);

  border-bottom: 1.5px solid var(--accent);

  transform: rotate(-45deg);
}

.check-list.compact li {
  font-size: 12px;

  color: var(--muted);
}

.gift-list {
  display: flex;

  flex-direction: column;

  gap: 1px;

  background: var(--border);

  border: 1px solid var(--border);
}

.gift-list li {
  display: flex;

  gap: 18px;

  padding: 20px 22px;

  background: var(--bg);
}

.gift-code {
  flex: none;

  font-family: "IBM Plex Mono", monospace;

  font-size: 10px;

  color: var(--accent);

  padding-top: 3px;
}

.gift-list h4 {
  font-size: 14px;

  margin-bottom: 6px;
}

.gift-list p {
  color: var(--muted);

  font-size: 11.5px;

  line-height: 1.75;
}


/* =========================================================
   REGISTRATION
   ========================================================= */

.register-layout {
  display: grid;

  grid-template-columns: .8fr 1.2fr;

  gap: 70px;

  align-items: start;
}

.register-aside h3 {
  font-size: 15px;

  margin: 30px 0 18px;
}

.aside-terminal {
  border: 1px solid var(--border);

  border-radius: 6px;

  background: var(--surface);

  overflow: hidden;
}

.terminal-bar {
  display: flex;

  align-items: center;

  gap: 6px;

  padding: 10px 13px;

  border-bottom: 1px solid var(--border);

  background: var(--bg);
}

.terminal-bar span {
  width: 7px;

  height: 7px;

  border-radius: 50%;

  background: var(--border);
}

.terminal-bar span:first-child {
  background: var(--accent);
}

.terminal-bar em {
  margin-left: 8px;

  font-style: normal;

  font-family: "IBM Plex Mono", monospace;

  font-size: 9.5px;

  color: var(--muted);
}

.terminal-body {
  padding: 16px;

  font-family: "IBM Plex Mono", monospace;

  font-size: 11px;

  line-height: 1.85;

  color: var(--soft);

  white-space: pre-wrap;
}

.terminal-body .cur {
  display: inline-block;

  width: 6px;

  height: 11px;

  background: var(--accent);

  margin-left: 3px;

  animation: blink 1s step-end infinite;

  vertical-align: middle;
}

@keyframes blink {
  0%, 45% { opacity: 1; }
  46%, 100% { opacity: 0; }
}

.privacy-note {
  display: flex;

  gap: 13px;

  margin-top: 30px;

  padding: 16px 18px;

  border: 1px solid var(--border);

  border-radius: 4px;

  background: var(--surface);
}

.privacy-note svg {
  flex: none;

  width: 17px;

  height: 17px;

  margin-top: 2px;

  color: var(--accent);
}

.privacy-note p {
  color: var(--muted);

  font-size: 11.5px;

  line-height: 1.75;
}


/* ---- Form ---- */

.register-main {
  padding: 38px;

  border: 1px solid var(--border);

  border-radius: 8px;

  background: var(--surface);
}

.form-container {
  position: relative;
}

/* Honeypot — off-screen, never focusable, ignored by humans. */
.hp-field {
  position: absolute;

  left: -9999px;

  width: 1px;

  height: 1px;

  overflow: hidden;
}

.form-legend {
  display: flex;

  align-items: center;

  gap: 12px;

  margin: 4px 0 20px;

  padding-bottom: 12px;

  border-bottom: 1px solid var(--border);

  font-size: 9px;

  letter-spacing: 2.2px;

  color: var(--muted);
}

.form-legend span:first-child {
  color: var(--accent);

  font-family: "IBM Plex Mono", monospace;
}

.form-legend + .form-row {
  margin-top: 0;
}

.form-row {
  display: grid;

  grid-template-columns: 1fr 1fr;

  gap: 18px;

  margin-bottom: 20px;
}

.form-group {
  min-width: 0;
}

.form-label {
  display: block;

  margin-bottom: 8px;

  font-size: 11px;

  letter-spacing: .4px;

  color: var(--soft);
}

.form-label .req {
  color: var(--accent);
}

.form-input,
.form-select {
  width: 100%;

  padding: 12px 13px;

  background: var(--bg);

  border: 1px solid var(--border);

  border-radius: 4px;

  color: var(--text);

  font-family: inherit;

  font-size: 13px;

  transition: border-color .2s, box-shadow .2s;
}

.form-input::placeholder {
  color: var(--muted);

  opacity: .75;
}

.form-input:focus,
.form-select:focus {
  outline: none;

  border-color: var(--accent);

  box-shadow: 0 0 0 3px rgba(138,79,209,.12);
}

.form-select {
  appearance: none;

  cursor: pointer;

  /* Chevron drawn in CSS so it inherits the palette. */
  background-image:
    linear-gradient(45deg, transparent 50%, var(--muted) 50%),
    linear-gradient(135deg, var(--muted) 50%, transparent 50%);

  background-position:
    calc(100% - 18px) 50%,
    calc(100% - 13px) 50%;

  background-size: 5px 5px, 5px 5px;

  background-repeat: no-repeat;

  padding-right: 34px;
}

.form-select option {
  background: var(--bg);

  color: var(--text);
}

.form-hint {
  display: block;

  margin-top: 6px;

  font-size: 10px;

  color: var(--muted);
}

.form-error {
  display: none;

  margin-top: 6px;

  font-size: 10.5px;

  color: #E88A8A;
}

.form-group.has-error .form-input,
.form-group.has-error .form-select,
.consent-row.has-error .consent-box {
  border-color: #C4536B;
}

.form-group.has-error .form-error,
.consent-row.has-error .form-error {
  display: block;
}

/* ---- Consent ---- */

.consent-row {
  margin: 26px 0 6px;
}

.consent {
  display: flex;

  align-items: flex-start;

  gap: 13px;

  cursor: pointer;
}

.consent input {
  position: absolute;

  opacity: 0;

  width: 0;

  height: 0;
}

.consent-box {
  flex: none;

  position: relative;

  width: 17px;

  height: 17px;

  margin-top: 1px;

  border: 1px solid var(--border);

  border-radius: 3px;

  background: var(--bg);

  transition: border-color .2s, background .2s;
}

.consent-box::after {
  content: "";

  position: absolute;

  left: 5px;

  top: 1px;

  width: 5px;

  height: 9px;

  border: solid #170B20;

  border-width: 0 1.6px 1.6px 0;

  transform: rotate(45deg) scale(0);

  transition: transform .18s var(--ease);
}

.consent input:checked + .consent-box {
  background: var(--accent);

  border-color: var(--accent);
}

.consent input:checked + .consent-box::after {
  transform: rotate(45deg) scale(1);
}

.consent input:focus-visible + .consent-box {
  box-shadow: 0 0 0 3px rgba(138,79,209,.25);
}

.consent-text {
  color: var(--muted);

  font-size: 11.5px;

  line-height: 1.75;
}

/* ---- Submit row ---- */

.form-submit-row {
  display: flex;

  align-items: center;

  flex-wrap: wrap;

  gap: 14px;

  margin-top: 24px;

  padding-top: 24px;

  border-top: 1px solid var(--border);
}

.form-submit-row .btn {
  min-height: 46px;

  padding: 0 24px;
}

.form-submit-row .btn[disabled] {
  opacity: .55;

  cursor: progress;
}

.form-status {
  flex: 1 1 220px;

  min-height: 15px;

  font-size: 11.5px;

  line-height: 1.6;

  color: var(--muted);
}

.form-status.success {
  color: #69D69B;
}

.form-status.error {
  color: #E88A8A;
}

.form-footnote {
  margin-top: 20px;

  font-size: 11px;

  color: var(--muted);
}

.form-footnote a {
  color: var(--accent);
}

.form-footnote a:hover {
  text-decoration: underline;
}


/* ---- Success panel ---- */

.form-success {
  text-align: center;

  padding: 20px 10px 10px;
}

.success-sigil {
  width: 96px;

  height: 96px;

  margin: 0 auto 26px;
}

.success-sigil svg {
  width: 100%;

  height: 100%;
}

.success-sigil .ring-outer,
.success-sigil .ring-mid {
  fill: none;

  stroke: var(--accent);

  stroke-width: 1;

  stroke-dasharray: 4 7;

  animation: sealSpin 30s linear infinite;
}

.success-sigil .sigil-glyph {
  fill: var(--sigil-fill, rgba(138,79,209,.16));

  stroke: var(--accent);

  stroke-width: 1.6;
}

.form-success h3 {
  font-size: 24px;

  letter-spacing: -.5px;
}

.form-success > p {
  max-width: 440px;

  margin: 18px auto 0;

  color: var(--soft);

  font-size: 13px;

  line-height: 1.85;
}

.success-actions {
  display: flex;

  flex-wrap: wrap;

  justify-content: center;

  gap: 12px;

  margin-top: 32px;
}


/* =========================================================
   FAQ
   ========================================================= */

.faq-list {
  border-top: 1px solid var(--border);
}

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-item summary {
  position: relative;

  display: flex;

  align-items: center;

  gap: 16px;

  padding: 24px 40px 24px 0;

  font-size: 14px;

  color: var(--text);

  cursor: pointer;

  list-style: none;

  transition: color .2s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary:hover {
  color: var(--accent);
}

/* Plus that turns into a minus when the answer is open. */
.faq-item summary::before,
.faq-item summary::after {
  content: "";

  position: absolute;

  right: 6px;

  top: 50%;

  width: 12px;

  height: 1.5px;

  background: var(--accent);

  transition: transform .25s var(--ease);
}

.faq-item summary::after {
  transform: rotate(90deg);
}

.faq-item[open] summary::after {
  transform: rotate(0);
}

.faq-item p {
  padding: 0 40px 26px 0;

  max-width: 780px;

  color: var(--muted);

  font-size: 12.5px;

  line-height: 1.85;
}


/* =========================================================
   CTA
   ========================================================= */

.camp-cta {
  border-bottom: 1px solid var(--border);
}

.cta-halo {
  position: absolute;

  top: 50%;

  left: 50%;

  width: 640px;

  height: 640px;

  transform: translate(-50%,-50%);

  pointer-events: none;

  background: radial-gradient(circle, rgba(75,24,120,.42), transparent 62%);
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1100px) {
  .seal-grid {
    grid-template-columns: repeat(2,1fr);
  }
}

@media (max-width: 900px) {
  .two-column,
  .register-layout {
    grid-template-columns: 1fr;

    gap: 46px;
  }

  .form-row {
    grid-template-columns: 1fr;
  }

  .register-main {
    padding: 28px 22px;
  }
}

@media (max-width: 700px) {
  .camp-hero {
    min-height: auto;

    padding: 130px 20px 90px;
  }

  .camp-hero h1 {
    letter-spacing: -2px;
  }

  .section-intro {
    margin-top: -20px;
  }

  .seal-grid {
    grid-template-columns: 1fr;
  }

  .seal-card {
    padding: 28px 24px;
  }
}

@media (max-width: 500px) {
  .hero-chips .chip {
    flex: 1 1 45%;
  }

  .countdown-boxes {
    flex-wrap: wrap;

    gap: 10px;
  }

  .countdown-box {
    min-width: 70px;

    padding: 14px 8px;
  }

  .countdown-num {
    font-size: 24px;
  }

  .fact-list > div {
    flex-direction: column;

    align-items: flex-start;

    gap: 4px;
  }

  .fact-list dd {
    text-align: left;
  }

  .form-submit-row .btn {
    width: 100%;

    justify-content: center;
  }
}


/* =========================================================
   MOTION PREFERENCES

   The starfield and the spinning rings are decoration only,
   so they stop entirely for visitors who ask for reduced
   motion. (chrome.css already neutralises CSS animations;
   the canvas is handled in script.js.)
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  .sigil-pre,
  .hero-aurora,
  .seal-final .seal .ring-mid,
  .success-sigil .ring-outer,
  .success-sigil .ring-mid {
    animation: none !important;
  }

  .hero-aurora {
    opacity: .8;
  }

  .sigil-pre {
    opacity: .8;
  }
}


/* Light theme: the mythical layer needs its glow turned
   down, otherwise the aurora washes the page out. */

[data-theme="light"] .hero-aurora {
  background:
    radial-gradient(45% 42% at 22% 34%, rgba(107,47,168,.18), transparent 70%),
    radial-gradient(38% 36% at 78% 24%, rgba(122,63,196,.14), transparent 72%),
    radial-gradient(55% 40% at 62% 78%, rgba(107,47,168,.12), transparent 70%);
}

[data-theme="light"] .sigil-pre {
  text-shadow: none;
}

[data-theme="light"] .camp-hero h1 > span > span {
  text-shadow: none;
}

[data-theme="light"] .seal-final {
  background: linear-gradient(180deg, rgba(107,47,168,.1), transparent 55%), var(--bg);
}
