/* ==========================================================================
   Susano — landing / marketing pages
   ========================================================================== */

/* ── Navigation ───────────────────────────────────────────────────────── */

.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-h);
  display: flex; align-items: center;
  transition: background .3s var(--ease), border-color .3s var(--ease), backdrop-filter .3s var(--ease);
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(11, 11, 15, 0.82);
  backdrop-filter: blur(14px) saturate(150%);
  border-bottom-color: var(--border);
}
.nav-inner { display: flex; align-items: center; justify-content: space-between; width: 100%; gap: 24px; }

/**
 * Brand wordmark: "susano" in dark gray, ".xyz" in dark orange.
 * No logo image, so the mark is pure type.
 */
.brand { display: flex; align-items: center; font-weight: 700; font-size: 17px; letter-spacing: -0.02em; }
.brand-word { color: #8e8e99; }
.brand-tld { color: #c2662b; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-link {
  padding: 8px 14px; border-radius: var(--radius-sm);
  color: var(--text-2); font-size: 14px; font-weight: 500;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.nav-link:hover { color: var(--text); background: var(--surface-2); }
.nav-actions { display: flex; align-items: center; gap: 10px; }

.nav-toggle { display: none; background: none; border: none; cursor: pointer; color: var(--text); padding: 6px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: block; }
  .nav-links.open {
    display: flex; flex-direction: column; align-items: stretch;
    position: absolute; top: var(--nav-h); left: 12px; right: 12px;
    background: var(--surface); border: 1px solid var(--border-2);
    border-radius: var(--radius); padding: 10px; gap: 2px;
    box-shadow: var(--shadow-lg);
    animation: menuIn .22s var(--ease);
  }
  @keyframes menuIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
}

/* ── Hero ─────────────────────────────────────────────────────────────── */

.hero {
  position: relative;
  padding: calc(var(--nav-h) + 96px) 0 104px;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute; top: -280px; left: 50%; transform: translateX(-50%);
  width: 900px; height: 620px;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.2), transparent 68%);
  pointer-events: none; filter: blur(28px);
}
.hero::after {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.022) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.022) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 78% 58% at 50% 34%, #000 35%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 78% 58% at 50% 34%, #000 35%, transparent 100%);
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 2; text-align: center; max-width: 780px; margin: 0 auto; }

.hero-badge {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 6px 15px 6px 11px;
  background: rgba(124, 58, 237, 0.1);
  border: 1px solid rgba(124, 58, 237, 0.28);
  border-radius: 999px;
  font-size: 12.5px; font-weight: 550; color: #c4a8ff;
  margin-bottom: 26px;
  animation: riseIn .7s var(--ease) both;
}
.hero-badge .dot { animation: pulse 2.2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.hero h1 { margin-bottom: 22px; animation: riseIn .7s .06s var(--ease) both; }
.hero-sub {
  font-size: clamp(1rem, 2vw, 1.14rem);
  color: var(--text-2); max-width: 590px; margin: 0 auto 36px;
  animation: riseIn .7s .12s var(--ease) both;
}
.hero-cta { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; animation: riseIn .7s .18s var(--ease) both; }

@keyframes riseIn { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ── Stats strip ──────────────────────────────────────────────────────── */

/* Three wider cells: fewer, larger targets read better than four narrow ones. */
.stats-strip {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-top: 68px;
  animation: riseIn .7s .26s var(--ease) both;
}
.stat-cell { background: var(--bg-2); padding: 28px 24px; text-align: center; transition: background .25s var(--ease); }
.stat-cell:hover { background: var(--surface); }
.stat-value { font-size: 1.85rem; font-weight: 700; letter-spacing: -0.03em; color: var(--text); }
.stat-label { font-size: 12px; color: var(--text-3); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; font-weight: 550; }

@media (max-width: 720px) { .stats-strip { grid-template-columns: 1fr; } }

/* ── Runtime API table ────────────────────────────────────────────────── */

.runtime-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 940px) { .runtime-layout { grid-template-columns: 1fr; } }

.runtime-table {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

/* Shared grid so the header and every row line up on the same columns. */
.runtime-head,
.runtime-row {
  display: grid;
  grid-template-columns: minmax(0, 190px) 84px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 13px 18px;
}

.runtime-head {
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  font-size: 11px;
  font-weight: 650;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text-3);
}
.runtime-head > span:nth-child(2) { text-align: left; }

.runtime-row {
  border-bottom: 1px solid var(--border);
  transition: background .16s var(--ease);
}
.runtime-row:last-child { border-bottom: none; }
.runtime-row:hover { background: rgba(124, 58, 237, 0.05); }

.runtime-sig {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--purple-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/**
 * Badges are left-aligned and share a fixed column. Centring them would make
 * the column edge ragged because each badge sizes to its own text ("number"
 * is wider than "boolean").
 */
.runtime-row .badge {
  justify-self: start;
  font-size: 11px;
}
.runtime-head > span:nth-child(2) { text-align: left; }

.runtime-desc {
  font-size: 13px;
  color: var(--text-2);
  line-height: 1.5;
}

@media (max-width: 620px) {
  .runtime-head { display: none; }
  .runtime-row {
    grid-template-columns: 1fr auto;
    gap: 8px 12px;
    padding: 14px 16px;
  }
  .runtime-sig { grid-column: 1; }
  .runtime-row .badge { grid-column: 2; justify-self: end; }
  .runtime-desc { grid-column: 1 / -1; font-size: 12.5px; }
}

/* ── IDE preview (landing) ────────────────────────────────────────────── */

/* Reuses the dashboard IDE classes; the editor stylesheet is not loaded here,
   so the few rules the static preview needs are declared locally. */
.demo-ide { background: #0a0a0e; }

.demo-ide .ide-body { display: flex; overflow: hidden; }
.demo-ide .ide-gutter {
  width: 44px; flex-shrink: 0;
  background: #0a0a0e;
  border-right: 1px solid var(--border);
  padding: 12px 0;
  user-select: none;
}
.demo-ide .ide-ln {
  height: 20px; line-height: 20px;
  padding-right: 10px; text-align: right;
  font-family: var(--mono); font-size: 12.5px;
  color: #3b3b4a;
}
.demo-ide .ide-scroll { flex: 1; min-width: 0; }
.demo-ide .ide-highlight {
  margin: 0;
  font-family: var(--mono); font-size: 12.5px; line-height: 20px;
  white-space: pre; tab-size: 4;
  color: #c9c9d6;
}
.demo-ide .ide-highlight code { font-family: inherit; }

.demo-ide .tok-key   { color: #c792ea; font-weight: 500; }
.demo-ide .tok-str   { color: #c3e88d; }
.demo-ide .tok-num   { color: #f78c6c; }
.demo-ide .tok-com   { color: #56607a; font-style: italic; }
.demo-ide .tok-fn    { color: #82aaff; }
.demo-ide .tok-glob  { color: #ffcb6b; }
.demo-ide .tok-op    { color: #9aa4bf; }

.demo-ide .ide-status {
  display: flex; align-items: center; gap: 16px;
  padding: 6px 14px;
  background: var(--surface-2);
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 11.5px; color: var(--text-3);
}
.demo-ide .ide-status-right { margin-left: auto; }
.demo-ide .ide-status .ok { color: var(--green); }

.demo-ide .ide-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 12px 0 0; min-height: 40px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
}
.demo-ide .ide-tabs { display: flex; }
.demo-ide .ide-tab {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px;
  font-family: var(--mono); font-size: 12.5px; color: var(--text-2);
  background: #0a0a0e;
  border-right: 1px solid var(--border);
  border-bottom: 2px solid var(--purple);
}
.demo-ide .ide-tab-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--purple-bright); flex-shrink: 0;
}
.demo-ide .ide-lang {
  font-family: var(--mono); font-size: 11px; color: var(--text-3);
  padding: 3px 8px; border: 1px solid var(--border); border-radius: 5px;
}

/* ── Section ──────────────────────────────────────────────────────────── */

.section { padding: 96px 0; position: relative; }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 56px; }
.section-head h2 { margin-bottom: 14px; }
.section-head p { color: var(--text-2); font-size: 1.02rem; }

.eyebrow {
  font-size: 12px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  color: var(--purple-bright); margin-bottom: 12px;
}

/* ── Feature grid ─────────────────────────────────────────────────────── */

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 620px) { .features { grid-template-columns: 1fr; } }

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  transition: border-color .28s var(--ease), transform .28s var(--ease), background .28s var(--ease);
  position: relative; overflow: hidden;
}
.feature::after {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(360px circle at var(--mx, 50%) var(--my, 0%), rgba(124, 58, 237, 0.09), transparent 62%);
  opacity: 0; transition: opacity .3s var(--ease); pointer-events: none;
}
.feature:hover { border-color: rgba(124, 58, 237, 0.4); transform: translateY(-3px); }
.feature:hover::after { opacity: 1; }
.feature-icon {
  width: 38px; height: 38px; border-radius: 10px;
  background: rgba(124, 58, 237, 0.12);
  border: 1px solid rgba(124, 58, 237, 0.25);
  display: grid; place-items: center; margin-bottom: 15px;
  color: var(--purple-bright);
}
.feature h3 { margin-bottom: 8px; font-size: 15px; }
.feature p { color: var(--text-2); font-size: 13.5px; line-height: 1.62; }

/* ── Script lookup panel ──────────────────────────────────────────────── */

.verify-panel {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.verify-head h3 { font-size: 15px; font-weight: 620; margin-bottom: 5px; }
.verify-head p { font-size: 13.5px; margin-bottom: 16px; }

.verify-form { display: flex; gap: 9px; flex-wrap: wrap; }
.verify-form .input { flex: 1; min-width: 220px; font-size: 13px; }

.verify-card {
  margin-top: 16px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}
.verify-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 0;
  font-size: 13.5px;
}
.verify-label {
  color: var(--text-3);
  min-width: 92px;
  font-size: 12.5px;
}
.verify-value { flex: 1; font-weight: 550; }

.verify-id {
  margin-top: 12px;
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--text-3);
  word-break: break-all;
}

.verify-panel .badge svg { margin-right: 2px; }

/* Admin verification controls inside the public lookup card. */
.verify-admin {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  animation: riseIn .2s var(--ease);
}

/* ── Pricing ──────────────────────────────────────────────────────────── */

/**
 * Pricing cards share a row height so the buttons line up across the row.
 * `stretch` plus a flex column on the card, with the feature list growing,
 * pushes every CTA to the bottom edge.
 *
 * The track count is derived from the number of cards actually rendered
 * instead of being hardcoded. There are two plans, and a fixed four-column
 * grid left both of them stranded on the left half of the page with an empty
 * gap where the missing cards used to be. `auto-fit` plus a max track width
 * lets the row centre itself whatever the plan count is — one, two, or four.
 */
.pricing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 340px));
  justify-content: center;
  gap: 16px;
  align-items: stretch;
}
@media (max-width: 560px) { .pricing { grid-template-columns: minmax(0, 1fr); } }

/**
 * The purchase page adds a Select button under each card, so its tracks want
 * a little more room than the landing page's. Keeps both from reflowing to a
 * cramped width right at the boundary.
 */
.pricing.wide { grid-template-columns: repeat(auto-fit, minmax(280px, 380px)); }

.price-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  display: flex; flex-direction: column;
  transition: border-color .28s var(--ease), transform .28s var(--ease), box-shadow .28s var(--ease);
}
.price-card:hover { transform: translateY(-4px); border-color: var(--border-2); }
.price-card.popular {
  border-color: rgba(124, 58, 237, 0.5);
  background: linear-gradient(180deg, rgba(124, 58, 237, 0.08), var(--surface) 42%);
  box-shadow: 0 0 0 1px rgba(124, 58, 237, 0.15), 0 14px 40px rgba(124, 58, 237, 0.13);
}
.price-tag-pop {
  position: absolute; top: -11px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(180deg, var(--purple-bright), var(--purple-dim));
  color: #fff; font-size: 11px; font-weight: 650; letter-spacing: .04em;
  padding: 4px 13px; border-radius: 999px; text-transform: uppercase;
  box-shadow: 0 3px 14px rgba(124, 58, 237, 0.45);
}
.price-name { font-size: 14px; font-weight: 600; color: var(--text-2); margin-bottom: 14px; }
.price-amount { display: flex; align-items: baseline; gap: 5px; margin-bottom: 6px; }
.price-amount .cur { font-size: 1.35rem; font-weight: 600; color: var(--text-2); }
.price-amount .num { font-size: 2.7rem; font-weight: 720; letter-spacing: -0.035em; line-height: 1; }
.price-amount .per { font-size: 13.5px; color: var(--text-3); font-weight: 500; }
.price-blurb { font-size: 13px; color: var(--text-3); margin-bottom: 20px; min-height: 38px; }
.price-feats { list-style: none; display: flex; flex-direction: column; gap: 9px; margin-bottom: 24px; flex: 1; }
.price-feats li { display: flex; align-items: flex-start; gap: 9px; font-size: 13.2px; color: var(--text-2); }
.price-feats svg { flex-shrink: 0; margin-top: 3px; color: var(--purple-bright); }

/* ── Terms / prose ────────────────────────────────────────────────────── */

.prose { max-width: 760px; margin: 0 auto; }
.prose h2 { font-size: 1.3rem; margin: 38px 0 12px; }
.prose h2:first-child { margin-top: 0; }
.prose p { color: var(--text-2); margin-bottom: 14px; font-size: 14.5px; }
.prose ul { margin: 0 0 16px 20px; color: var(--text-2); font-size: 14.5px; display: flex; flex-direction: column; gap: 7px; }
.prose li::marker { color: var(--purple-bright); }
.prose strong { color: var(--text); font-weight: 600; }
.page-head { padding: calc(var(--nav-h) + 64px) 0 40px; text-align: center; }
.page-head h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin-bottom: 12px; }
.page-head p { color: var(--text-2); max-width: 560px; margin: 0 auto; }

/* ── Auth pages ───────────────────────────────────────────────────────── */

.auth-wrap {
  min-height: 100vh;
  display: grid; place-items: center;
  padding: calc(var(--nav-h) + 40px) 20px 60px;
  position: relative; overflow: hidden;
}
.auth-wrap::before {
  content: ''; position: absolute; top: -200px; left: 50%; transform: translateX(-50%);
  width: 700px; height: 500px;
  background: radial-gradient(ellipse at center, rgba(124, 58, 237, 0.18), transparent 66%);
  filter: blur(24px); pointer-events: none;
}
.auth-card {
  position: relative; z-index: 2;
  width: 100%; max-width: 420px;
  background: var(--surface);
  border: 1px solid var(--border-2);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-lg);
  animation: riseIn .5s var(--ease) both;
}
.auth-head { text-align: center; margin-bottom: 26px; }
.auth-head h1 { font-size: 1.5rem; margin-bottom: 7px; }
.auth-head p { color: var(--text-2); font-size: 13.5px; }

.auth-switch { text-align: center; margin-top: 20px; font-size: 13.5px; color: var(--text-3); }
.auth-switch a { color: var(--purple-bright); font-weight: 550; }
.auth-switch a:hover { text-decoration: underline; }

.alert {
  padding: 11px 14px; border-radius: var(--radius-sm);
  font-size: 13.5px; margin-bottom: 16px;
  border: 1px solid transparent;
  animation: riseIn .25s var(--ease);
}
.alert-err  { background: rgba(248, 81, 73, 0.1); border-color: rgba(248, 81, 73, 0.3); color: #ff8b84; }
.alert-ok   { background: rgba(63, 185, 80, 0.1); border-color: rgba(63, 185, 80, 0.3); color: #56d364; }
.alert-warn { background: rgba(210, 153, 34, 0.1); border-color: rgba(210, 153, 34, 0.3); color: #e3b341; }

/* ── Inline field errors ──────────────────────────────────────────────────
   A message appears directly under the input it belongs to, so the user does
   not have to connect a banner at the top of the form to a field further down.
   The input itself is outlined in red at the same time. */
.field-error {
  color: #ff8b84;
  font-size: 12.5px;
  margin-top: 6px;
  display: flex;
  align-items: flex-start;
  gap: 6px;
  line-height: 1.45;
  animation: riseIn .18s var(--ease);
}

.field-error::before {
  content: "";
  flex: 0 0 auto;
  width: 13px;
  height: 13px;
  margin-top: 2px;
  background-color: currentColor;
  /* A small circle with an exclamation mark, drawn with a mask so it inherits
     the text colour and needs no extra markup. */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16.5v.01'/%3E%3C/svg%3E");
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 8v5M12 16.5v.01'/%3E%3C/svg%3E");
  -webkit-mask-size: contain;
  mask-size: contain;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* The input that owns an error. */
.input.is-invalid {
  border-color: rgba(248, 81, 73, 0.55);
  background: rgba(248, 81, 73, 0.05);
}

.input.is-invalid:focus {
  border-color: rgba(248, 81, 73, 0.8);
  box-shadow: 0 0 0 3px rgba(248, 81, 73, 0.12);
}

/* The normal hint is hidden while an error is showing, so the two texts do not
   stack up under one field. */
.field-error ~ .dim,
.dim.is-hidden-by-error { display: none; }

/* OTP input group */
.otp-row { display: flex; gap: 9px; justify-content: center; margin: 6px 0 18px; }
.otp-input {
  width: 46px; height: 54px; text-align: center;
  font-size: 20px; font-weight: 600; font-family: var(--mono);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: var(--radius-sm);
  transition: all .16s var(--ease); outline: none;
}
.otp-input:focus { border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-glow); }

/* ── Footer ───────────────────────────────────────────────────────────── */

.footer { border-top: 1px solid var(--border); padding: 44px 0 34px; margin-top: 40px; }
.footer-grid { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--text-3); font-size: 13.5px; transition: color .18s var(--ease); }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-3); font-size: 13px; }

/* ── Marquee (trusted-by style strip) ─────────────────────────────────── */

.marquee { overflow: hidden; mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.marquee-track { display: flex; gap: 48px; width: max-content; animation: scrollX 32s linear infinite; }
.marquee:hover .marquee-track { animation-play-state: paused; }
@keyframes scrollX { to { transform: translateX(-50%); } }
.marquee-item { color: var(--text-3); font-size: 13.5px; font-weight: 600; letter-spacing: .04em; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
