/* ==========================================================================
   Hikmaon design system — shared by the public site, the auth page and the
   authenticated portal.

   Readability rule for this sheet: glass is never the only thing between text
   and the animated ground. Every panel stacks a dark scrim under its blur, and
   dense content sits on a second, more opaque surface. That is what keeps body
   text at AA contrast no matter which aurora drifts behind it.
   ========================================================================== */

:root {
  --bg-0: #030f0a;
  --bg-1: #06180f;
  --brand: #2aba17;            /* Bestower Labs green, from the mark */
  --brand-lift: #43d62b;
  --brand-glow: #6cf05a;
  --sky: #a8dcf5;              /* the mark's outline blue */
  --text: #eaf7ef;
  --text-dim: #a9c6b7;
  --text-faint: #7d9b8c;
  --line: rgba(168, 220, 245, 0.16);
  --line-soft: rgba(168, 220, 245, 0.09);
  --glass: rgba(255, 255, 255, 0.07);
  --scrim: rgba(3, 17, 11, 0.55);
  --surface: rgba(2, 13, 9, 0.55);
  --ok: #43d62b;
  --warn: #f0b429;
  --bad: #ff6b6b;
  --radius: 18px;
  --blur: saturate(150%) blur(22px);
  --gutter: clamp(1rem, 4vw, 2.5rem);
  --maxw: 1240px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* ------------------------------------------------------------ layer 0: ground */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background: radial-gradient(120% 90% at 50% -10%, #0b2a1c 0%, var(--bg-1) 45%, var(--bg-0) 100%);
}
.orb { position: absolute; border-radius: 50%; filter: blur(88px); opacity: 0.62;
       animation: drift 26s ease-in-out infinite alternate; }
.orb-a { width: 46vw; height: 46vw; top: -12vw; left: -8vw; background: #1f8f1a; }
.orb-b { width: 40vw; height: 40vw; top: 18vw; right: -10vw; background: #12706e; animation-delay: -9s; }
.orb-c { width: 34vw; height: 34vw; bottom: -10vw; left: 30vw; background: #2aba17; opacity: 0.4; animation-delay: -17s; }
.orb-d { width: 26vw; height: 26vw; top: 46vh; left: -6vw; background: #7fc9f0; opacity: 0.22; animation-delay: -4s; }
@keyframes drift {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to   { transform: translate3d(3vw, 4vw, 0) scale(1.12); }
}
/* A fine grid + vignette mutes the orbs so nothing bright sits under body copy. */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(rgba(168, 220, 245, 0.045) 1px, transparent 1px) 0 0 / 100% 46px,
    linear-gradient(90deg, rgba(168, 220, 245, 0.045) 1px, transparent 1px) 0 0 / 46px 100%,
    radial-gradient(120% 80% at 50% 0%, transparent 26%, rgba(2, 10, 7, 0.55) 100%);
}
@media (prefers-reduced-motion: reduce) {
  .orb { animation: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------- site chrome */
.shell { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }

.siteheader {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(3, 15, 10, 0.72);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  border-bottom: 1px solid var(--line);
}
.siteheader .bar { display: flex; align-items: center; gap: 1rem; padding: 0.7rem 0; }

.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: inherit; }
.brand img { width: 40px; height: 40px; object-fit: contain;
             filter: drop-shadow(0 0 14px rgba(67, 214, 43, 0.45)); }
.brand .name { font-size: 1.12rem; font-weight: 800; letter-spacing: 0.16em; line-height: 1.1; }
.brand .by { font-size: 0.72rem; color: var(--text-dim); letter-spacing: 0.06em; }

.nav { margin-left: auto; display: flex; align-items: center; gap: 0.25rem; flex-wrap: wrap; }
.nav a {
  padding: 0.45rem 0.8rem;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  transition: color 0.15s ease, background 0.15s ease;
}
.nav a:hover { color: var(--text); background: rgba(168, 220, 245, 0.09); }
.nav a.current { color: var(--brand-glow); }
.nav .btn { margin-left: 0.4rem; }
/* Specific enough to beat .btn's own display, which is declared later. */
.siteheader .navtoggle { display: none; width: auto; margin: 0; padding: 0.45rem 0.7rem; }

@media (max-width: 880px) {
  .siteheader .navtoggle { display: inline-flex; margin-left: auto; }
  .nav {
    width: 100%;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0.2rem;
    padding-bottom: 0.7rem;
  }
  .nav[hidden] { display: none; }
  .nav .btn { margin: 0.25rem 0 0; }
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.62rem 1.1rem;
  border: 1px solid rgba(108, 240, 90, 0.5);
  border-radius: 11px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  color: #04170e;                               /* dark ink on bright green */
  background: linear-gradient(135deg, var(--brand-lift), var(--brand));
  box-shadow: 0 8px 20px rgba(42, 186, 23, 0.22);
  transition: filter 0.15s ease, transform 0.08s ease, background 0.15s ease;
}
.btn:hover { filter: brightness(1.09); }
.btn:active { transform: translateY(1px); }
.btn.ghost {
  color: var(--text);
  background: rgba(168, 220, 245, 0.1);
  border-color: var(--line);
  box-shadow: none;
}
.btn.ghost:hover { background: rgba(168, 220, 245, 0.18); }
.btn.lg { padding: 0.8rem 1.5rem; font-size: 1rem; }
.btn.block { width: 100%; }
.btn:focus-visible, a:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(67, 214, 43, 0.4);
}

/* ------------------------------------------------------------------- panels */
.card {
  position: relative;
  padding: 1.15rem 1.2rem 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur);
  backdrop-filter: var(--blur);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.14);
}
.card::before {                                  /* the readability scrim */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(158deg, var(--scrim), rgba(3, 17, 11, 0.34) 62%, rgba(3, 17, 11, 0.5));
  pointer-events: none;
}
.card::after {                                   /* top edge highlight */
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.32), transparent);
  pointer-events: none;
}
.card > * { position: relative; z-index: 1; }

/* Older Firefox: solid panels rather than letting the orbs bleed under text. */
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .siteheader { background: #041a11; }
  .card { background: #06211544; }
  .card::before { background: #071e15; }
}

.pill {
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.22rem 0.62rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #062b12;
  background: linear-gradient(120deg, var(--brand-glow), var(--sky));
}
.tag {
  display: inline-block;
  padding: 0.28rem 0.66rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--sky);
  background: rgba(168, 220, 245, 0.09);
  border: 1px solid rgba(168, 220, 245, 0.22);
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  white-space: nowrap;
}
.chip::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--text-faint);
  box-shadow: 0 0 8px currentColor;
}
.chip.ok::before { background: var(--ok); }
.chip.bad::before { background: var(--bad); }

/* -------------------------------------------------------------- typography */
h1, h2, h3 { letter-spacing: -0.015em; }
.grad {
  background: linear-gradient(95deg, var(--brand-glow), var(--sky));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.muted { color: var(--text-dim); font-size: 0.88rem; }
.eyebrow {
  margin: 0 0 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand-glow);
}
code, .mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--sky);
}

/* ----------------------------------------------------------- form controls */
input, select, textarea {
  width: 100%;
  margin: 0 0 0.55rem;
  padding: 0.68rem 0.78rem;
  font: inherit;
  font-size: 0.92rem;
  border-radius: 11px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--line);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}
input::placeholder { color: var(--text-faint); }
input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: none;
  border-color: var(--brand-lift);
  box-shadow: 0 0 0 3px rgba(67, 214, 43, 0.26);
}
label { display: block; margin-bottom: 0.25rem; font-size: 0.82rem; font-weight: 600; color: var(--text-dim); }
select {
  appearance: none;
  cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--sky) 50%),
                    linear-gradient(135deg, var(--sky) 50%, transparent 50%);
  background-position: right 1rem center, right 0.72rem center;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
select option { background: #06180f; color: var(--text); }
input[type="file"] { padding: 0.45rem; cursor: pointer; }
input[type="file"]::file-selector-button {
  margin-right: 0.7rem;
  padding: 0.36rem 0.7rem;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text);
  background: rgba(168, 220, 245, 0.12);
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
}
.row { display: flex; gap: 0.55rem; flex-wrap: wrap; }
.row > * { flex: 1 1 0; min-width: 0; }
@media (max-width: 560px) { .row { flex-direction: column; } }

/* --------------------------------------------------------------- scrollbars */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(168, 220, 245, 0.2); border-radius: 999px; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------------------------------------------- footer */
.sitefooter {
  margin-top: 3rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--line-soft);
  color: var(--text-faint);
  font-size: 0.84rem;
}
.sitefooter .cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1.5rem; }
.sitefooter h4 { margin: 0 0 0.5rem; font-size: 0.8rem; letter-spacing: 0.12em;
                 text-transform: uppercase; color: var(--text-dim); }
.sitefooter .cols a, .sitefooter .cols span { display: block; padding: 0.12rem 0; color: var(--text-dim); text-decoration: none; }
.sitefooter a:hover { color: var(--brand-glow); }
.sitefooter .legal {
  display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap;
  margin-top: 1.6rem; padding-top: 1.2rem; border-top: 1px solid var(--line-soft);
}
.sitefooter .legal img { width: 22px; height: 22px; object-fit: contain; opacity: 0.85; }

/* ------------------------------------------------------------ beta chrome */
/* Hikmaon is a working MVP in controlled beta. These carry that stage
   honestly without making the product look unfinished. */
.betabadge {
  display: inline-flex;
  align-items: center;
  padding: 0.12rem 0.44rem;
  border-radius: 6px;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #04170e;
  background: linear-gradient(120deg, var(--brand-glow), var(--sky));
  vertical-align: middle;
}
.betabadge.outline {
  color: var(--brand-glow);
  background: rgba(67, 214, 43, 0.12);
  border: 1px solid rgba(108, 240, 90, 0.45);
}

.stagepill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  padding: 0.32rem 0.8rem 0.32rem 0.55rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--brand-glow);
  background: rgba(67, 214, 43, 0.1);
  border: 1px solid rgba(108, 240, 90, 0.38);
}
.stagepill .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--brand-glow);
  box-shadow: 0 0 10px var(--brand-glow);
}

/* In-product banner explaining the beta, and inline labels for the parts
   that are still being built. */
.betabanner {
  display: flex;
  align-items: flex-start;
  gap: 0.8rem;
  flex-wrap: wrap;
  padding: 0.85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(108, 240, 90, 0.3);
  background: linear-gradient(120deg, rgba(67, 214, 43, 0.12), rgba(168, 220, 245, 0.07));
  font-size: 0.87rem;
  color: var(--text);
}
.betabanner p { margin: 0; max-width: 78ch; color: var(--text-dim); }
.betabanner strong { color: var(--text); }
.betabanner .actions { margin-left: auto; display: flex; gap: 0.5rem; flex-wrap: wrap; }
.betabanner .actions .btn { padding: 0.42rem 0.8rem; font-size: 0.84rem; }

.devlabel {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.16rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--warn);
  background: rgba(240, 180, 41, 0.12);
  border: 1px solid rgba(240, 180, 41, 0.34);
}

.stagetrack { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 1rem; }
.stagestep { position: relative; }
.stagestep .when {
  font-size: 0.7rem; font-weight: 800; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-faint);
}
.stagestep.now .when { color: var(--brand-glow); }
.stagestep h3 { margin: 0.35rem 0 0.4rem; font-size: 1.02rem; }
.stagestep.now { border-color: rgba(108, 240, 90, 0.4); }

/* ------------------------------------------------------- scroll-in reveal */
/* Gated on .js so that with scripting off — or if a script fails to load —
   the content is simply visible rather than permanently transparent. */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
