/* Colour tokens (RGB triplets so Tailwind can apply opacity) */
:root {
  --bg: 11 12 14;        /* #0B0C0E */
  --card: 22 24 28;      /* #16181C */
  --stroke: 39 42 48;    /* #272A30 */
  --pill: 33 36 43;      /* #21242B */
  --muted: 142 149 165;  /* #8E95A5 */
  --ink: 243 244 246;    /* #F3F4F6 */
}

/* Honeypot field and the reCAPTCHA badge (replaced by the text notice under the form) */
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.grecaptcha-badge { visibility: hidden; }

/* Privacy page text */
.prose-legal h2 { margin-bottom: .5rem; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: rgb(var(--ink)); }
.prose-legal ul { list-style: disc; padding-left: 1.25rem; }
.prose-legal li + li { margin-top: .5rem; }
.prose-legal p + p,
.prose-legal ul + p,
.prose-legal p + ul { margin-top: .75rem; }
.prose-legal strong { color: rgb(var(--ink)); font-weight: 600; }
.prose-legal a { color: #8DC63F; text-decoration: underline; text-underline-offset: 3px; }
.prose-legal a:hover { color: rgb(var(--ink)); }

/* Ambient canvas background */
#bg-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Logo mark with pulse badge */
.logo-mark {
  position: relative;
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid rgb(var(--stroke));
  border-radius: 0.5rem;
  background: rgb(var(--card));
}
.logo-pulse {
  position: absolute;
  top: -3px;
  right: -3px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #8DC63F;
  box-shadow: 0 0 0 0 rgba(141, 198, 63, 0.6);
  animation: pulse 2s infinite;
}

/* Viewfinder reticle corners */
.reticle .corner {
  position: absolute;
  width: 22px;
  height: 22px;
  border-color: #8DC63F;
  border-style: solid;
  border-width: 0;
  pointer-events: none;
}
.reticle .corner.tl { top: 10px; left: 10px; border-top-width: 2px; border-left-width: 2px; }
.reticle .corner.tr { top: 10px; right: 10px; border-top-width: 2px; border-right-width: 2px; }
.reticle .corner.bl { bottom: 10px; left: 10px; border-bottom-width: 2px; border-left-width: 2px; }
.reticle .corner.br { bottom: 10px; right: 10px; border-bottom-width: 2px; border-right-width: 2px; }

/* Laser scanline (sits behind the card content) */
.scan-card > :not(.scanline):not(.corner) { position: relative; z-index: 1; }
.scanline {
  z-index: 0;
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #8DC63F 20%, #8DC63F 80%, transparent);
  box-shadow: 0 0 12px 2px rgba(141, 198, 63, 0.45);
  opacity: 0.55;
  animation: scan 5s ease-in-out infinite;
  pointer-events: none;
}

/* Headline glow */
.glow {
  text-shadow: 0 0 18px rgba(141, 198, 63, 0.55), 0 0 42px rgba(141, 198, 63, 0.25);
}

/* CTA glow */
.cta {
  box-shadow: 0 0 22px rgba(141, 198, 63, 0.35);
}
.cta:hover { box-shadow: 0 0 30px rgba(141, 198, 63, 0.5); }
.cta:active { transform: translateY(1px); }

@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(141, 198, 63, 0.6); }
  70%  { box-shadow: 0 0 0 8px rgba(141, 198, 63, 0); }
  100% { box-shadow: 0 0 0 0 rgba(141, 198, 63, 0); }
}
@keyframes scan {
  0%   { top: 0; }
  50%  { top: calc(100% - 2px); }
  100% { top: 0; }
}

/* ---------- Intro ---------- */
#intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: rgb(var(--bg));
  pointer-events: none;
}
.no-intro #intro { display: none; }
.has-intro #intro { animation: intro-out 0.8s cubic-bezier(.4, 0, .2, 1) 3.8s forwards; }
.has-intro .page { opacity: 0; animation: page-in 1.1s cubic-bezier(.2, .7, .2, 1) 4.3s forwards; }
.has-intro #bg-canvas { opacity: 0; animation: fade-in 1.6s ease 4.3s forwards; }

/* Soft intro (prefers-reduced-motion): the finished logo fades in and out; no drawing, beam, or zoom. */
.soft-intro .intro-logo { opacity: 0; animation: fade-in 0.8s ease 0.2s forwards; }
.soft-intro #intro { animation: fade-out 0.7s ease 2.2s forwards; }
.soft-intro .page,
.soft-intro #bg-canvas { opacity: 0; animation: fade-in 0.8s ease 2.5s forwards; }

.intro-logo {
  display: flex;
  align-items: center;
  gap: clamp(0.75rem, 2.5vw, 1.25rem);
}
.intro-mark {
  width: clamp(2.5rem, 9vw, 3.75rem);
  height: clamp(2.5rem, 9vw, 3.75rem);
}
/* Base state is the finished logo (used by the soft intro); .has-intro animates into it. */
.intro-mark path { stroke-dasharray: 1; stroke-dashoffset: 0; }
.has-intro .intro-mark path {
  stroke-dashoffset: 1;
  opacity: 0; /* hides round-cap dots before the stroke starts drawing */
  animation: draw 1s cubic-bezier(.6, 0, .2, 1) 0.25s forwards;
}
.intro-dot { transform-origin: 12px 12px; }
.has-intro .intro-dot {
  opacity: 0;
  animation: dot-in 0.7s ease-out 1s forwards;
}

/* The beam: a bright band in a wide gradient clipped to the text. Sliding the
   gradient moves the band left-to-right, leaving the word lit behind it. */
.intro-word {
  font-family: "JetBrains Mono", "Fira Code", ui-monospace, monospace;
  font-weight: 800;
  font-size: clamp(1.75rem, 8vw, 3.5rem);
  letter-spacing: 0.08em;
  background-image: linear-gradient(100deg,
    #F3F4F6 0%, #F3F4F6 42%,
    #FFFFFF 47%, #E9F6D6 49%, #8DC63F 50.5%,
    #2A2E35 54%, #2A2E35 100%);
  background-size: 300% 100%;
  background-position: 18% 0; /* fully lit */
  -webkit-background-clip: text;
          background-clip: text;
  color: transparent;
}
.has-intro .intro-word {
  background-position: 80% 0;
  filter: drop-shadow(0 0 0 rgba(141, 198, 63, 0));
  animation: beam 2.4s cubic-bezier(.5, 0, .5, 1) 1s forwards,
             beam-glow 2.4s ease-in-out 1s forwards;
}

@keyframes draw    { 0% { opacity: 0; } 1% { opacity: 1; } 100% { opacity: 1; stroke-dashoffset: 0; } }
@keyframes dot-in  { 0% { opacity: 0; transform: scale(.2); } 70% { opacity: 1; transform: scale(1.25); } 100% { opacity: 1; transform: scale(1); } }
@keyframes beam    { to { background-position: 18% 0; } }
@keyframes beam-glow {
  0%, 100% { filter: drop-shadow(0 0 0 rgba(141, 198, 63, 0)); }
  50%      { filter: drop-shadow(0 0 14px rgba(141, 198, 63, 0.35)); }
}
@keyframes intro-out { to { opacity: 0; transform: scale(1.04); visibility: hidden; } }
@keyframes fade-in   { to { opacity: 1; } }
@keyframes fade-out  { to { opacity: 0; visibility: hidden; } }
@keyframes page-in   { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  .logo-pulse, .scanline { animation: none; }
  .scanline { display: none; }
}
