/* ============================================================================
   RollBeyond: Coming Soon
   Brand palette follows the app: deep midnight blues with the logo's azure.
   ========================================================================= */

:root {
  --bg: #05080f;
  --bg-raised: #0b1120;
  --surface: rgba(148, 190, 255, 0.045);
  --surface-strong: rgba(148, 190, 255, 0.08);
  --border: rgba(125, 211, 252, 0.14);
  --border-strong: rgba(125, 211, 252, 0.3);

  --text: #eaf2ff;
  --text-muted: #9fb3d1;
  --text-dim: #6b809e;

  --azure: #1a9bf0;
  --azure-bright: #38bdf8;
  --cyan: #22d3ee;
  --sky: #7dd3fc;
  --gold: #fcd34d;

  --danger: #f87171;
  --success: #34d399;

  --font-display: "Cinzel", "Iowan Old Style", Georgia, serif;
  --font-body: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --radius: 14px;
  --radius-lg: 20px;
  --shell: 1140px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--sky);
  text-decoration: none;
  transition: color 0.18s ease;
}

a:hover {
  color: var(--azure-bright);
}

:focus-visible {
  outline: 2px solid var(--azure-bright);
  outline-offset: 3px;
  border-radius: 6px;
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: 24px;
}

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

/* ---------------------------------------------------------------- backdrop */

.backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(58vw 46vw at 50% -8%, rgba(26, 155, 240, 0.3), transparent 68%),
    radial-gradient(46vw 40vw at 12% 22%, rgba(34, 211, 238, 0.14), transparent 65%),
    radial-gradient(50vw 44vw at 88% 34%, rgba(59, 130, 246, 0.16), transparent 66%),
    linear-gradient(180deg, #060b16 0%, #05080f 55%, #04060c 100%);
}

/* Faint dungeon-graph paper, fading out down the page. */
.backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(125, 211, 252, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(125, 211, 252, 0.05) 1px, transparent 1px);
  background-size: 62px 62px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 72%);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.85), transparent 72%);
}

#stars {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

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

.site-header {
  position: relative;
  z-index: 2;
  padding-block: 26px;
}

.site-header .shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand__mark {
  width: 52px;
  height: 52px;
  border-radius: 13px;
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.22),
    0 10px 34px -8px rgba(26, 155, 240, 0.65);
}

.brand__name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  line-height: 1.1;
}

.brand__tag {
  margin: 2px 0 0;
  font-size: 0.76rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.header-socials {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ------------------------------------------------------------------ badges */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: rgba(26, 155, 240, 0.1);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--sky);
}

.pill__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--azure-bright);
  box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
  animation: pulse 2.4s ease-out infinite;
}

@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.65); }
  70% { box-shadow: 0 0 0 9px rgba(56, 189, 248, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 189, 248, 0); }
}

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

.hero {
  position: relative;
  z-index: 1;
  padding-block: clamp(48px, 9vw, 104px) clamp(56px, 8vw, 96px);
  text-align: center;
}

.hero__crest {
  position: relative;
  width: clamp(132px, 20vw, 176px);
  margin: 0 auto clamp(28px, 4vw, 40px);
}

.hero__crest img {
  width: 100%;
  border-radius: 28px;
  box-shadow:
    0 0 0 1px rgba(125, 211, 252, 0.24),
    0 30px 90px -22px rgba(26, 155, 240, 0.85);
  animation: float 7s ease-in-out infinite;
}

.hero__crest::after {
  content: "";
  position: absolute;
  inset: -22%;
  z-index: -1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.32), transparent 66%);
  filter: blur(26px);
  animation: breathe 6s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

@keyframes breathe {
  0%, 100% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.07); }
}

.hero__title {
  margin: 22px auto 0;
  /* Sized so "Every tool a DM needs." holds one line down to tablet widths;
     it wraps to two on phones, which is fine. */
  max-width: min(100%, 950px);
  font-family: var(--font-display);
  font-size: clamp(2.05rem, 6.6vw, 4.4rem);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.hero__title .accent {
  display: block;
  background: linear-gradient(100deg, var(--sky), var(--cyan) 42%, var(--azure-bright));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  margin: 26px auto 0;
  max-width: 62ch;
  font-size: clamp(1.02rem, 2.1vw, 1.2rem);
  color: var(--text-muted);
}

.hero__lede strong {
  color: var(--gold);
  font-weight: 600;
}

.hero__ticker {
  margin: 22px auto 0;
  max-width: 60ch;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 10px;
  font-size: 0.85rem;
  color: var(--text-dim);
}

.hero__ticker span {
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
}

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

.signup {
  margin: clamp(34px, 5vw, 48px) auto 0;
  max-width: 620px;
  padding: clamp(22px, 4vw, 32px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(148, 190, 255, 0.075), rgba(148, 190, 255, 0.02));
  box-shadow: 0 26px 70px -34px rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(10px);
  text-align: left;
}

.signup__title {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.32rem;
  font-weight: 600;
}

.signup__hint {
  margin: 7px 0 20px;
  font-size: 0.93rem;
  color: var(--text-muted);
}

.signup__row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.signup__row input[type="email"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(4, 8, 16, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 0.98rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.signup__row input[type="email"]::placeholder {
  color: var(--text-dim);
}

.signup__row input[type="email"]:focus {
  outline: none;
  border-color: var(--azure-bright);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

/* Honeypot: hidden from people, tempting to bots. */
.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 14px 24px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 650;
  font-size: 0.97rem;
  color: #03121f;
  background: linear-gradient(135deg, var(--azure-bright), var(--cyan));
  box-shadow: 0 12px 30px -12px rgba(56, 189, 248, 0.85);
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
}

.btn:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 18px 38px -12px rgba(56, 189, 248, 0.95);
  filter: brightness(1.06);
}

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

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn--ghost {
  background: var(--surface-strong);
  color: var(--text);
  border: 1px solid var(--border-strong);
  box-shadow: none;
}

.btn--ghost:hover:not(:disabled) {
  background: rgba(56, 189, 248, 0.14);
  box-shadow: none;
}

.btn--danger-ghost {
  padding: 7px 13px;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--danger);
  background: rgba(248, 113, 113, 0.1);
  border: 1px solid rgba(248, 113, 113, 0.28);
  box-shadow: none;
}

.btn--danger-ghost:hover:not(:disabled) {
  background: rgba(248, 113, 113, 0.2);
  transform: none;
  box-shadow: none;
}

.form-note {
  margin: 14px 0 0;
  min-height: 1.4em;
  font-size: 0.9rem;
  color: var(--text-dim);
}

.form-note[data-state="success"] { color: var(--success); }
.form-note[data-state="error"] { color: var(--danger); }
.form-note[data-state="info"] { color: var(--sky); }

.signup__privacy {
  margin: 16px 0 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

/* ---------------------------------------------------------------- sections */

.section {
  position: relative;
  z-index: 1;
  padding-block: clamp(56px, 8vw, 92px);
}

.section__head {
  max-width: 620px;
  margin: 0 auto clamp(34px, 5vw, 52px);
  text-align: center;
}

.section__title {
  margin: 14px 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 4.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1.15;
}

.section__sub {
  margin: 14px 0 0;
  color: var(--text-muted);
}

.eyebrow {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--azure-bright);
}

/* ---------------------------------------------------------------- features */

.features {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.feature {
  position: relative;
  padding: 26px 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(148, 190, 255, 0.06), rgba(148, 190, 255, 0.015));
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.feature::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(56, 189, 248, 0.55), transparent);
  opacity: 0;
  transition: opacity 0.22s ease;
}

.feature:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 24px 50px -30px rgba(56, 189, 248, 0.7);
}

.feature:hover::before {
  opacity: 1;
}

.feature__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 16px;
  border-radius: 13px;
  background: rgba(56, 189, 248, 0.12);
  border: 1px solid rgba(56, 189, 248, 0.24);
  color: var(--azure-bright);
}

.feature__icon svg {
  width: 23px;
  height: 23px;
}

.feature h3 {
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.feature p {
  margin: 0;
  font-size: 0.93rem;
  color: var(--text-muted);
}

/* ------------------------------------------------------------ keep updated */

.keep-updated {
  max-width: 760px;
  margin-inline: auto;
  padding: clamp(30px, 5vw, 46px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(120% 140% at 50% 0%, rgba(26, 155, 240, 0.16), transparent 62%),
    linear-gradient(180deg, rgba(148, 190, 255, 0.05), rgba(148, 190, 255, 0.015));
  text-align: center;
}

.keep-updated .section__title {
  margin-top: 12px;
}

.social-links {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.social-card {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px 22px 14px 16px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(4, 8, 16, 0.6);
  color: var(--text);
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.social-card:hover {
  transform: translateY(-3px);
  color: var(--text);
  border-color: var(--azure-bright);
  background: rgba(56, 189, 248, 0.12);
}

.social-card svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.social-card__label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.social-card__name {
  display: block;
  font-weight: 620;
  line-height: 1.3;
}

.social-card--x:hover { border-color: #e7e9ea; background: rgba(231, 233, 234, 0.12); }
.social-card--yt:hover { border-color: #ff4444; background: rgba(255, 68, 68, 0.14); }

/* Compact round icon buttons used in the header. */
.icon-link {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-muted);
  transition: transform 0.18s ease, color 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.icon-link svg {
  width: 18px;
  height: 18px;
}

.icon-link:hover {
  transform: translateY(-2px);
  color: var(--text);
  border-color: var(--border-strong);
  background: rgba(56, 189, 248, 0.14);
}

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

.site-footer {
  position: relative;
  z-index: 1;
  margin-top: clamp(40px, 6vw, 72px);
  padding-block: 40px 48px;
  border-top: 1px solid var(--border);
  background: rgba(4, 7, 14, 0.55);
}

.credits {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px 28px;
  text-align: center;
}

.credit {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.credit a {
  font-weight: 620;
  color: var(--text);
  border-bottom: 1px solid transparent;
  transition: color 0.18s ease, border-color 0.18s ease;
}

.credit a:hover {
  color: var(--azure-bright);
  border-bottom-color: var(--azure-bright);
}

.credit__logo {
  width: 22px;
  height: 22px;
  /* The FiveNova mark is a near-black silhouette; flip it to light so it
     reads against the dark footer. */
  filter: brightness(0) invert(1);
  opacity: 0.85;
  transition: opacity 0.18s ease;
}

.credit a:hover .credit__logo {
  opacity: 1;
}

.credit--fivenova a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-bottom: 0;
}

.footer-fine {
  margin: 22px 0 0;
  text-align: center;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.footer-fine a {
  color: var(--text-dim);
}

.footer-fine a:hover {
  color: var(--text-muted);
}

/* ------------------------------------------------------------- admin pages */

.admin-body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.admin-main {
  flex: 1;
  width: 100%;
  max-width: 1040px;
  margin-inline: auto;
  padding: clamp(24px, 5vw, 48px) 24px 64px;
}

.login-card {
  max-width: 420px;
  margin: clamp(40px, 10vh, 96px) auto 0;
  padding: clamp(28px, 5vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(148, 190, 255, 0.07), rgba(148, 190, 255, 0.02));
  box-shadow: 0 30px 80px -40px rgba(0, 0, 0, 1);
}

.login-card h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 700;
}

.login-card > p {
  margin: 8px 0 26px;
  font-size: 0.92rem;
  color: var(--text-muted);
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 7px;
  font-size: 0.83rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.field input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(4, 8, 16, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 0.97rem;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.field input:focus {
  outline: none;
  border-color: var(--azure-bright);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.login-card .btn {
  width: 100%;
  margin-top: 6px;
}

.admin-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}

.admin-bar h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2rem);
  font-weight: 700;
}

.admin-bar__who {
  margin: 4px 0 0;
  font-size: 0.86rem;
  color: var(--text-dim);
}

.admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 26px;
}

.stat {
  padding: 20px 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(148, 190, 255, 0.06), rgba(148, 190, 255, 0.015));
}

.stat__label {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.stat__value {
  margin-top: 6px;
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--text);
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.toolbar input[type="search"] {
  flex: 1 1 240px;
  min-width: 0;
  padding: 12px 15px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: rgba(4, 8, 16, 0.72);
  color: var(--text);
  font: inherit;
  font-size: 0.94rem;
}

.toolbar input[type="search"]:focus {
  outline: none;
  border-color: var(--azure-bright);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: rgba(4, 8, 16, 0.5);
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 0.92rem;
}

thead th {
  position: sticky;
  top: 0;
  padding: 14px 18px;
  text-align: left;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
  background: rgba(11, 17, 32, 0.96);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

tbody td {
  padding: 13px 18px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.08);
  color: var(--text-muted);
  vertical-align: middle;
}

tbody tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover td {
  background: rgba(56, 189, 248, 0.05);
}

td.col-email {
  color: var(--text);
  font-weight: 550;
  word-break: break-all;
}

td.col-actions {
  text-align: right;
  white-space: nowrap;
}

.empty-state {
  padding: 56px 24px;
  text-align: center;
  color: var(--text-dim);
}

.empty-state strong {
  display: block;
  margin-bottom: 6px;
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--text-muted);
}

/* --------------------------------------------------------------- utilities */

/* Content is only ever hidden once scripting has confirmed it will reveal it
   again (see the inline bootstrap in index.html). Without that guard a script
   failure would leave the whole feature list invisible. */
.js-anim .reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.js-anim .reveal.is-visible {
  opacity: 1;
  transform: none;
}

@media (max-width: 560px) {
  .signup__row .btn {
    width: 100%;
  }

  .site-header .shell {
    justify-content: center;
    text-align: center;
  }

  .brand {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  .js-anim .reveal {
    opacity: 1;
    transform: none;
  }
}
