:root {
  color-scheme: dark;
  --bg-0: #030303;
  --bg-1: #06040a;
  --bg-2: #0a0812;
  --panel: rgba(6, 4, 10, 0.72);
  --panel-strong: rgba(8, 10, 18, 0.92);
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.18);
  --ink: #fafafa;
  --muted: #a1a1aa;
  --muted-strong: #d7e1eb;
  --purple: #9333ea;
  --orange: #f97316;
  --gold: #d4af37;
  --emerald: #22c55e;
}

* { box-sizing: border-box; margin: 0; }
html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  color: var(--ink);
  font-family: "Plus Jakarta Sans", "Inter", system-ui, sans-serif;
  background: var(--bg-0);
}

a { color: inherit; text-decoration: none; }

/* ── Ambient Background ──────────────────────────────── */

.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.ambient-purple {
  position: absolute;
  top: -10%;
  right: -10%;
  width: 60%;
  height: 70%;
  background: rgba(147, 51, 234, 0.1);
  border-radius: 50%;
  filter: blur(150px);
  animation: breathe 8s ease-in-out infinite;
}

.ambient-orange {
  position: absolute;
  bottom: -20%;
  left: -10%;
  width: 50%;
  height: 60%;
  background: rgba(249, 115, 22, 0.05);
  border-radius: 50%;
  filter: blur(120px);
}

.ambient-line {
  position: absolute;
  top: 20%;
  left: 10%;
  width: 1px;
  height: 60%;
  background: linear-gradient(to bottom, transparent, rgba(147, 51, 234, 0.2), transparent);
}

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

/* ── Topbar ──────────────────────────────────────────── */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 2rem;
  border-bottom: 1px solid var(--line);
  background: rgba(3, 3, 3, 0.8);
  backdrop-filter: blur(24px);
}

.brand-lockup {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 50% 24%, rgba(242, 140, 61, 0.4), transparent 50%),
    linear-gradient(145deg, rgba(25, 17, 42, 0.98), rgba(9, 7, 16, 0.98));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 8px 20px rgba(0, 0, 0, 0.25);
}

.brand-mark svg { width: 1.5rem; height: 1.5rem; }

.brand-name {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.topbar-spacer { flex: 1; }

.beacon-status {
  display: none;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
}

.beacon-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 8px rgba(249, 115, 22, 0.6);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.4; }
}

@media (min-width: 768px) {
  .beacon-status { display: flex; }
}

.topbar-auth {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.topbar-btn {
  border: none;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 0.75rem;
  padding: 0.55rem 1.1rem;
  transition: background 200ms, color 200ms, box-shadow 200ms, border-color 200ms;
}

.topbar-btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  border: 1px solid var(--line);
}
.topbar-btn--ghost:hover {
  color: var(--ink);
  border-color: rgba(249, 115, 22, 0.4);
}

.topbar-btn--primary {
  background: white;
  color: black;
  border: 1px solid transparent;
  box-shadow: 0 0 20px rgba(255, 255, 255, 0.05);
}
.topbar-btn--primary:hover {
  background: var(--orange);
  color: white;
  box-shadow: 0 0 30px rgba(249, 115, 22, 0.3);
}

/* ── User Pill ───────────────────────────────────────── */

.user-pill {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem 0.35rem 0.35rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.user-pill-avatar {
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 0.6rem;
  font-weight: 800;
  color: var(--bg-0);
  background: linear-gradient(145deg, var(--purple), var(--orange));
}

.user-pill-name {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted-strong);
  max-width: 10rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

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

.hero {
  position: relative;
  z-index: 1;
  min-height: calc(100vh - 4rem);
  display: flex;
  align-items: center;
  padding: 4rem 2rem;
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4rem;
  align-items: center;
}

@media (min-width: 1024px) {
  .hero-inner {
    grid-template-columns: 1.2fr 0.8fr;
    gap: 6rem;
  }
}

.hero-content { max-width: 42rem; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1.1rem;
  border-radius: 999px;
  border: 1px solid rgba(147, 51, 234, 0.2);
  background: rgba(147, 51, 234, 0.08);
  color: #c084fc;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 2rem;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 12px rgba(249, 115, 22, 0.8);
}

.hero-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2.8rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--ink);
  margin-bottom: 1.5rem;
}

.hero-title-gradient {
  background: linear-gradient(135deg, #c084fc, #ffffff 40%, #fdba74);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.7;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 2.5rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-hero {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1rem 2rem;
  border: none;
  border-radius: 1rem;
  background: white;
  color: black;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
  transition: all 300ms;
  position: relative;
  overflow: hidden;
}

.btn-hero:hover {
  background: var(--orange);
  color: white;
  box-shadow: 0 0 40px rgba(249, 115, 22, 0.3);
  transform: scale(1.02);
}

.btn-hero:active { transform: scale(0.98); }

.btn-hero-ghost {
  padding: 1rem 2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 300ms;
}

.btn-hero-ghost:hover {
  color: var(--ink);
  border-color: rgba(249, 115, 22, 0.4);
}

/* ── Hero Aside: Wisdom Timeline ─────────────────────── */

.hero-aside {
  display: none;
}

@media (min-width: 1024px) {
  .hero-aside { display: block; }
}

.wisdom-timeline {
  position: relative;
  padding-left: 3rem;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.wisdom-line {
  position: absolute;
  left: 0;
  top: 1rem;
  bottom: 1rem;
  width: 1px;
  background: linear-gradient(to bottom, rgba(147, 51, 234, 0.5), var(--line), rgba(249, 115, 22, 0.5));
}

.wisdom-line::before,
.wisdom-line::after {
  content: "";
  position: absolute;
  left: -2px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.wisdom-line::before {
  top: 0;
  background: var(--purple);
  box-shadow: 0 0 10px var(--purple);
}

.wisdom-line::after {
  bottom: 0;
  background: var(--orange);
  box-shadow: 0 0 10px var(--orange);
}

.wisdom-quote {
  transition: color 300ms;
}

.wisdom-label {
  display: block;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.wisdom-label--purple { color: #c084fc; }
.wisdom-label--orange { color: #fdba74; }
.wisdom-label--emerald { color: #6ee7b7; }

.wisdom-text {
  font-size: 1.1rem;
  font-style: italic;
  font-weight: 300;
  line-height: 1.6;
  color: var(--muted);
  transition: color 300ms;
}

.wisdom-quote:hover .wisdom-text {
  color: var(--ink);
}

.wisdom-author {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: rgba(161, 161, 170, 0.6);
}

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

.protocol {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 6rem 2rem;
}

.protocol-header {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin-bottom: 1rem;
}

.protocol-label {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.5em;
  text-transform: uppercase;
  color: var(--purple);
}

.protocol-accent {
  width: 3rem;
  height: 1px;
  position: relative;
}

.protocol-accent--left {
  background: linear-gradient(to right, transparent, var(--purple));
}

.protocol-accent--right {
  background: linear-gradient(to left, transparent, var(--purple));
}

.protocol-title {
  text-align: center;
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 3rem;
}

.protocol-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.5rem;
}

.protocol-card {
  background: var(--panel);
  backdrop-filter: blur(20px);
  border: 1px solid var(--line);
  border-radius: 1.5rem;
  padding: 2rem;
  text-align: center;
  transition: all 400ms;
  position: relative;
  overflow: hidden;
}

.protocol-card:hover {
  border-color: rgba(255, 255, 255, 0.2);
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 4px 40px -10px color-mix(in srgb, var(--step-color) 40%, transparent);
}

.protocol-card::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(circle at 50% 30%, color-mix(in srgb, var(--step-color) 15%, transparent), transparent 60%);
  transition: opacity 400ms;
  pointer-events: none;
}

.protocol-card:hover::before { opacity: 1; }

.protocol-icon {
  width: 3.5rem;
  height: 3.5rem;
  margin: 0 auto 1.25rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  color: var(--step-color);
  transition: box-shadow 400ms;
}

.protocol-card:hover .protocol-icon {
  box-shadow: 0 0 30px color-mix(in srgb, var(--step-color) 30%, transparent);
}

.protocol-step {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  color: var(--step-color);
  margin-bottom: 0.5rem;
}

.protocol-card h3 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.6rem;
}

.protocol-card p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

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

.suite {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 4rem 2rem 6rem;
}

.suite::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 60%;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(255, 255, 255, 0.06), transparent);
}

.suite-header {
  text-align: center;
  margin-bottom: 3rem;
}

.suite-eyebrow {
  display: block;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: #c084fc;
  margin-bottom: 0.75rem;
}

.suite-title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 1rem;
}

.suite-rule {
  width: 8rem;
  height: 1px;
  margin: 0 auto;
  background: linear-gradient(to right, transparent, rgba(147, 51, 234, 0.5), transparent);
}

/* ── App Grid ────────────────────────────────────────── */

.app-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1.25rem;
}

/* ── App Card ────────────────────────────────────────── */

.app-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 1.5rem;
  padding: 1.75rem;
  border: 1px solid var(--line);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent 40%),
    var(--panel);
  backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  overflow: hidden;
  cursor: pointer;
  transition:
    transform 280ms cubic-bezier(0.22, 0.61, 0.36, 1),
    border-color 280ms ease,
    box-shadow 280ms ease;
}

.app-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.app-card:hover .card-accent { opacity: 0.2; }
.app-card:hover .card-arrow { opacity: 1; transform: translateX(0); }

.app-card:hover .card-icon {
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 16px 32px rgba(0, 0, 0, 0.3),
    0 0 24px color-mix(in srgb, var(--accent) 30%, transparent);
}

.app-card:focus-visible {
  outline: 2px solid rgba(147, 51, 234, 0.7);
  outline-offset: 3px;
}

.app-card.legacy { opacity: 0.6; }
.app-card.legacy:hover { opacity: 0.85; }

.card-accent {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: radial-gradient(ellipse at 30% 0%, var(--accent), transparent 70%);
  transition: opacity 350ms ease;
  pointer-events: none;
}

.app-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), transparent 80%);
  opacity: 0.7;
}

.card-body {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  position: relative;
  z-index: 1;
}

.card-icon {
  flex-shrink: 0;
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 1rem;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--bg-0);
  background: linear-gradient(145deg, var(--accent), rgba(255, 255, 255, 0.85));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.15),
    0 10px 24px rgba(0, 0, 0, 0.25);
  transition: box-shadow 280ms ease;
}

.card-content { flex: 1; min-width: 0; }

.card-label {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 0.35rem;
}

.card-content h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.card-content p {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.card-arrow {
  position: relative;
  z-index: 1;
  align-self: flex-end;
  color: var(--muted-strong);
  font-size: 1.5rem;
  opacity: 0;
  transform: translateX(-8px);
  transition: opacity 250ms ease, transform 250ms ease;
  margin-top: 1rem;
}

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

.footer {
  position: relative;
  z-index: 1;
  padding: 2.5rem 2rem;
  text-align: center;
  color: rgba(161, 161, 170, 0.5);
  font-size: 0.7rem;
  font-family: "JetBrains Mono", monospace;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border-top: 1px solid var(--line);
  background: rgba(5, 5, 5, 0.6);
}

/* ── Animations ──────────────────────────────────────── */

.app-card {
  animation: cardRise 500ms cubic-bezier(0.22, 0.61, 0.36, 1) both;
}

.app-card:nth-child(1) { animation-delay: 60ms; }
.app-card:nth-child(2) { animation-delay: 120ms; }
.app-card:nth-child(3) { animation-delay: 180ms; }
.app-card:nth-child(4) { animation-delay: 240ms; }
.app-card:nth-child(5) { animation-delay: 300ms; }
.app-card:nth-child(6) { animation-delay: 360ms; }
.app-card:nth-child(7) { animation-delay: 420ms; }
.app-card:nth-child(8) { animation-delay: 480ms; }

@keyframes cardRise {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.app-card.legacy { animation-name: cardRiseDim; }

@keyframes cardRiseDim {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 0.6; transform: translateY(0); }
}

.hero-content,
.hero-aside {
  animation: fadeSlideUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.hero-aside { animation-delay: 0.2s; }

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

.protocol-card {
  animation: fadeSlideUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) both;
}
.protocol-card:nth-child(1) { animation-delay: 0s; }
.protocol-card:nth-child(2) { animation-delay: 0.15s; }
.protocol-card:nth-child(3) { animation-delay: 0.3s; }

/* ── Auth Modal Overlay ──────────────────────────────── */

.auth-overlay {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(12px);
  animation: fadeIn 200ms ease;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Auth Card ───────────────────────────────────────── */

.auth-card {
  position: relative;
  width: 100%;
  max-width: 26rem;
  padding: 2.5rem;
  border-radius: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  backdrop-filter: blur(32px);
  box-shadow:
    0 40px 100px rgba(0, 0, 0, 0.5),
    0 0 50px rgba(249, 115, 22, 0.05),
    0 0 20px rgba(212, 175, 55, 0.03);
  animation: cardSlideUp 350ms cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes cardSlideUp {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Gold Corner Braiding ────────────────────────────── */

.auth-corner {
  position: absolute;
  width: 3rem;
  height: 3rem;
  pointer-events: none;
  z-index: 20;
}

.auth-corner::before,
.auth-corner::after {
  content: "";
  position: absolute;
}

.auth-corner--tl { top: -0.5rem; left: -0.5rem; }
.auth-corner--tl::before {
  top: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(to right, rgba(249, 115, 22, 0.5), transparent);
}
.auth-corner--tl::after {
  top: 0; left: 0; width: 1px; height: 100%;
  background: linear-gradient(to bottom, rgba(249, 115, 22, 0.5), transparent);
}

.auth-corner--tr { top: -0.5rem; right: -0.5rem; }
.auth-corner--tr::before {
  top: 0; right: 0; width: 100%; height: 1px;
  background: linear-gradient(to left, rgba(249, 115, 22, 0.5), transparent);
}
.auth-corner--tr::after {
  top: 0; right: 0; width: 1px; height: 100%;
  background: linear-gradient(to bottom, rgba(249, 115, 22, 0.5), transparent);
}

.auth-corner--bl { bottom: -0.5rem; left: -0.5rem; }
.auth-corner--bl::before {
  bottom: 0; left: 0; width: 100%; height: 1px;
  background: linear-gradient(to right, rgba(249, 115, 22, 0.5), transparent);
}
.auth-corner--bl::after {
  bottom: 0; left: 0; width: 1px; height: 100%;
  background: linear-gradient(to top, rgba(249, 115, 22, 0.5), transparent);
}

.auth-corner--br { bottom: -0.5rem; right: -0.5rem; }
.auth-corner--br::before {
  bottom: 0; right: 0; width: 100%; height: 1px;
  background: linear-gradient(to left, rgba(249, 115, 22, 0.5), transparent);
}
.auth-corner--br::after {
  bottom: 0; right: 0; width: 1px; height: 100%;
  background: linear-gradient(to top, rgba(249, 115, 22, 0.5), transparent);
}

.auth-glow {
  position: absolute;
  inset: 0;
  border-radius: 2.5rem;
  border: 1px solid rgba(212, 175, 55, 0.05);
  box-shadow: 0 0 20px rgba(212, 175, 55, 0.03);
  pointer-events: none;
}

/* ── Auth Close ──────────────────────────────────────── */

.auth-close {
  position: absolute;
  top: 1.5rem;
  right: 1.5rem;
  background: none;
  border: none;
  color: rgba(148, 163, 184, 0.6);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  transition: color 200ms;
}
.auth-close:hover { color: var(--ink); }

/* ── Auth Header ─────────────────────────────────────── */

.auth-header {
  text-align: center;
  margin-bottom: 2rem;
}

.auth-header h2 {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.auth-header p {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ── Auth Error ──────────────────────────────────────── */

.auth-error {
  padding: 0.85rem 1rem;
  margin-bottom: 1.25rem;
  border-radius: 0.75rem;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  border: 1px solid rgba(239, 68, 68, 0.2);
  background: rgba(239, 68, 68, 0.08);
  color: #f87171;
}

.auth-error.auth-error--success {
  border-color: rgba(34, 197, 94, 0.2);
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
}

/* ── Auth Form ───────────────────────────────────────── */

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.auth-field label {
  display: block;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.5rem;
  margin-left: 1rem;
}

.auth-field input {
  width: 100%;
  padding: 1rem 1.5rem;
  border-radius: 1rem;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(0, 0, 0, 0.4);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.88rem;
  font-weight: 500;
  outline: none;
  transition: border-color 200ms, background 200ms;
}

.auth-field input::placeholder {
  color: rgba(161, 161, 170, 0.3);
  letter-spacing: 0.06em;
}

.auth-field input:focus {
  border-color: rgba(249, 115, 22, 0.5);
  background: rgba(0, 0, 0, 0.6);
}

/* ── Remember Me ─────────────────────────────────────── */

.auth-remember label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  margin-left: 1rem;
  font-size: 0.55rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--muted);
  transition: color 200ms;
}
.auth-remember label:hover { color: var(--ink); }

.auth-remember input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.auth-check-box {
  width: 1rem;
  height: 1rem;
  border-radius: 0.3rem;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.4);
  display: grid;
  place-items: center;
  transition: background 200ms, border-color 200ms;
}

.auth-check-tick {
  font-size: 0.55rem;
  color: white;
  opacity: 0;
  transition: opacity 150ms;
}

.auth-remember input:checked ~ .auth-check-box {
  background: rgba(249, 115, 22, 0.2);
  border-color: var(--orange);
}

.auth-remember input:checked ~ .auth-check-box .auth-check-tick {
  opacity: 1;
  color: var(--orange);
}

/* ── Auth Submit ─────────────────────────────────────── */

.auth-submit {
  width: 100%;
  padding: 1.15rem;
  border: none;
  border-radius: 1rem;
  background: white;
  color: black;
  font-family: inherit;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.36em;
  text-transform: uppercase;
  cursor: pointer;
  box-shadow: 0 0 30px rgba(255, 255, 255, 0.05);
  transition: all 300ms;
}

.auth-submit:hover {
  background: var(--orange);
  color: white;
  box-shadow: 0 0 40px rgba(249, 115, 22, 0.3);
  transform: scale(1.02);
}

.auth-submit:active { transform: scale(0.98); }

.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

/* ── Auth Toggle ─────────────────────────────────────── */

.auth-toggle {
  text-align: center;
  margin-top: 1.75rem;
}

.auth-toggle button {
  background: none;
  border: none;
  color: var(--muted);
  font-family: inherit;
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 200ms;
}

.auth-toggle button:hover { color: var(--orange); }

/* ── Responsive ──────────────────────────────────────── */

@media (max-width: 900px) {
  .app-grid {
    grid-template-columns: 1fr;
  }

  .hero-title {
    font-size: clamp(2.2rem, 8vw, 3.5rem);
  }
}

@media (max-width: 600px) {
  .topbar {
    padding: 0.75rem 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .topbar-spacer { display: none; }
  .beacon-status { display: none; }

  .topbar-auth {
    width: 100%;
    justify-content: center;
  }

  .hero {
    padding: 2rem 1rem;
    min-height: auto;
  }

  .hero-sub {
    font-size: 1rem;
  }

  .protocol {
    padding: 3rem 1rem;
  }

  .suite {
    padding: 3rem 1rem;
  }

  .app-card {
    border-radius: 1.25rem;
    padding: 1.25rem;
  }

  .auth-card {
    margin: 1rem;
    padding: 2rem 1.5rem;
    border-radius: 1.75rem;
  }
}
