/* ==========================================================================
   Bugpup - marketing page
   Dark, cinematic, mobile-first. No external fonts, no CSS frameworks.
   ========================================================================== */

:root {
  /* Surfaces - a near-black blue that reads as "night", not "grey". */
  --bg:            #080B10;
  --bg-raised:     #10151D;
  --bg-card:       #141A24;
  --line:          #232C3A;

  /* Text. Checked against --bg for WCAG AA. */
  --text:          #F2F5F8;   /* 17.1:1 on --bg */
  --text-dim:      #A9B4C2;   /*  8.3:1 on --bg */
  --text-faint:    #7C8899;   /*  5.3:1 on --bg */

  /* Accent - warm amber, the pup's collar.  8.6:1 on --bg. */
  --accent:        #F2A65A;
  --accent-strong: #FFB870;   /* 10.4:1 on --bg */
  --accent-ink:    #1A1206;   /* text ON --accent */

  /* Secondary - cool teal, for the "proven" badge. 8.8:1 on --bg. */
  --teal:          #6FD3C7;
  --teal-ink:      #06221F;

  /* Motion. */
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --t: 420ms;

  --radius: 14px;
  --maxw: 1120px;
}

@media (prefers-reduced-motion: reduce) {
  :root { --t: 1ms; }
  *, *::before, *::after {
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 1ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------- reset */

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* A soft warm glow behind the hero, so the page has depth without
   needing a background image. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60rem 40rem at 78% -8%, rgba(242, 166, 90, 0.13), transparent 60%),
    radial-gradient(48rem 34rem at 8% 4%, rgba(111, 211, 199, 0.08), transparent 62%);
}

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

a { color: var(--accent-strong); }
a:hover { color: var(--text); }

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

::selection { background: var(--accent); color: var(--accent-ink); }

/* --------------------------------------------------------------- layout */

.wrap {
  width: min(100% - 2.5rem, var(--maxw));
  margin-inline: auto;
}

section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

.section-head { max-width: 46rem; margin-bottom: clamp(2rem, 5vw, 3.25rem); }

.eyebrow {
  margin: 0 0 0.75rem;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}

h1, h2, h3 { line-height: 1.12; margin: 0 0 0.6em; letter-spacing: -0.02em; }
h1 { font-size: clamp(2.4rem, 1.5rem + 4.2vw, 4.6rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 1.25rem + 2.4vw, 2.9rem); font-weight: 750; }
h3 { font-size: clamp(1.1rem, 1rem + 0.5vw, 1.35rem); font-weight: 700; }

.lede {
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  color: var(--text-dim);
  margin: 0;
}

.dim { color: var(--text-dim); }
.faint { color: var(--text-faint); }
.small { font-size: 0.9rem; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: var(--accent-ink);
  padding: 0.75rem 1.25rem;
  font-weight: 700;
  z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; }

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

.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(8, 11, 16, 0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-head .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 750;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand svg { width: 2rem; height: 2rem; }
.brand:hover { color: var(--text); }

.head-nav { display: flex; gap: 1.5rem; }
.head-nav a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
}
.head-nav a:hover { color: var(--accent-strong); }

@media (max-width: 640px) {
  .head-nav { display: none; }
}

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

.hero { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(3rem, 8vw, 6rem); }

.hero-grid {
  display: grid;
  gap: clamp(2.5rem, 6vw, 4.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.15fr 0.85fr; }
}

.hero h1 .accent { color: var(--accent); }

.hero-sub {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 1.75rem;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.hero-sub .for-godot {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg-raised);
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
}
.hero-sub .for-godot:hover { border-color: var(--accent); color: var(--accent-strong); }

/* The button row. */
.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
  margin-bottom: 1.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  font-weight: 750;
  font-size: 1.05rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.btn-primary {
  background: var(--accent);
  color: var(--accent-ink);
  box-shadow: 0 10px 30px -12px rgba(242, 166, 90, 0.75);
}
.btn-primary:hover {
  background: var(--accent-strong);
  color: var(--accent-ink);
  transform: translateY(-2px);
  box-shadow: 0 16px 38px -12px rgba(242, 166, 90, 0.85);
}

/* A button-shaped label for something that is not available yet.
   It must not look clickable: no pointer cursor, no lift on hover,
   and a muted border instead of the accent fill. */
.btn-soon {
  cursor: default;
  color: var(--text-dim);
  background: transparent;
  border-color: var(--line);
  box-shadow: none;
}
.btn-soon:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--line);
}
.btn-soon svg { opacity: 0.65; }

/* The "coming soon" note on a label. */
.soon-tail { color: var(--text-faint); }
.btn-soon .soon-tail { color: var(--text-dim); }

.btn-ghost {
  border-color: var(--line);
  color: var(--text);
  background: transparent;
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-strong);
  transform: translateY(-2px);
}

.btn:active { transform: translateY(0); }

/* The proof strip under the button. */
.proof-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.6rem;
  padding: 0;
  margin: 0;
  list-style: none;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.proof-strip li { display: flex; align-items: center; gap: 0.5rem; }
.proof-strip .tick { color: var(--teal); font-weight: 800; }

/* The pup. */
.pup-stage {
  position: relative;
  display: grid;
  place-items: center;
  padding: 1rem;
}
.pup-stage .pup {
  width: min(100%, 22rem);
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55));
  animation: pup-bob 5.5s ease-in-out infinite;
  transform-origin: 50% 90%;
}
.pup-stage .pup-bug { animation: bug-wander 7s ease-in-out infinite; }
.pup-stage .pup-tail { animation: tail-wag 1.6s ease-in-out infinite; transform-origin: 141px 124px; }
.pup-stage .pup-tool { animation: tool-tap 3.2s ease-in-out infinite; }

@keyframes pup-bob {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-9px) rotate(-1deg); }
}
@keyframes tail-wag {
  0%, 100% { transform: rotate(-7deg); }
  50%      { transform: rotate(9deg); }
}
@keyframes bug-wander {
  0%, 100% { transform: translate(160px, 44px); }
  50%      { transform: translate(146px, 30px); }
}
@keyframes tool-tap {
  0%, 70%, 100% { transform: rotate(-14deg) translate(0, 0); }
  80%           { transform: rotate(-6deg) translate(0, 3px); }
}

/* --------------------------------------------------------------- video */

.video-frame {
  position: relative;
  margin-top: clamp(2.5rem, 6vw, 4rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-raised);
  box-shadow: 0 40px 90px -40px rgba(0, 0, 0, 0.9);
}

.video-frame .ratio {
  position: relative;
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
}

/* The placeholder that stands in for the demo clip until it is
   recorded. It fills the same 16:9 box the video used to fill, so
   the page does not jump when the real clip arrives. */
.video-placeholder {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 0.5rem;
  padding: 1.5rem;
  text-align: center;
  color: var(--text-faint);
  background:
    radial-gradient(60% 80% at 50% 40%, rgba(242, 166, 90, 0.05), transparent 70%);
}

.video-placeholder-title {
  margin: 0;
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  font-weight: 700;
  color: var(--text-dim);
}

.video-placeholder-note {
  margin: 0;
  max-width: 28rem;
  font-size: 0.9rem;
  color: var(--text-faint);
}

.video-note {
  padding: 0.7rem 1rem;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* --------------------------------------------------------------- catches */

.catch-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}

.catch {
  position: relative;
  padding: 1.35rem 1.35rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
  transition: transform var(--t) var(--ease), border-color var(--t) var(--ease);
}
.catch:hover { transform: translateY(-3px); border-color: #33415A; }

.catch h3 { margin-bottom: 0.35rem; font-size: 1.05rem; }
.catch p { margin: 0; color: var(--text-dim); font-size: 0.95rem; }

.badge {
  display: inline-block;
  margin-top: 0.85rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-proven { background: var(--teal); color: var(--teal-ink); }
.badge-pending {
  background: transparent;
  color: var(--text-faint);
  border: 1px solid var(--line);
}

.honesty {
  margin-top: 2rem;
  padding: 1.15rem 1.35rem;
  border-left: 3px solid var(--accent);
  background: var(--bg-raised);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--text-dim);
  font-size: 0.98rem;
}
.honesty strong { color: var(--text); }

/* --------------------------------------------------------------- how */

.how-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  counter-reset: step;
}

.how-step {
  position: relative;
  padding: 2.4rem 1.4rem 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg-card);
}
.how-step::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  top: -1.1rem;
  left: 1.4rem;
  display: grid;
  place-items: center;
  width: 2.2rem;
  height: 2.2rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 800;
  font-size: 0.95rem;
}
.how-step p { margin: 0; color: var(--text-dim); }

/* --------------------------------------------------------------- signup */

.signup-card {
  display: grid;
  gap: 2rem;
  align-items: center;
  padding: clamp(1.75rem, 5vw, 3rem);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--bg-card), var(--bg-raised));
}

@media (min-width: 860px) {
  .signup-card { grid-template-columns: 1fr 1fr; }
}

.signup-form { display: grid; gap: 0.85rem; }

.fine-print { font-size: 0.85rem; color: var(--text-faint); margin: 0; }

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

.site-foot {
  border-top: 1px solid var(--line);
  padding-block: 2.5rem 3.5rem;
  color: var(--text-dim);
  font-size: 0.95rem;
}
.site-foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 2rem;
  align-items: center;
  justify-content: space-between;
}
.site-foot ul {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-foot a { color: var(--text-dim); text-decoration: none; }
.site-foot a:hover { color: var(--accent-strong); }

/* --------------------------------------------------------------- noscript */

.noscript-note {
  display: none;
  padding: 1rem 1.25rem;
  margin-bottom: 2rem;
  border: 1px solid var(--accent);
  border-radius: 10px;
  background: rgba(242, 166, 90, 0.1);
  color: var(--accent-strong);
}
.no-js .noscript-note { display: block; }

/* Without JS, the config-driven links still need to work, so the
   markup carries sensible defaults that app.js upgrades. */
.no-js #download-btn { display: none; }
