/* ================================================================
   components.css — layout, glass, sections, interactions
   ================================================================ */

/* ----------------------------------------------------------------
   Layout helpers
   ---------------------------------------------------------------- */

.container-wide {
  max-width: var(--container-max);
  margin-inline: auto;
  padding-left: var(--margin-mobile);
  padding-right: var(--margin-mobile);
}

.centered-column {
  max-width: 820px;
  margin-inline: auto;
}

.center {
  text-align: center;
}

/* ----------------------------------------------------------------
   Liquid Glass Recipe
   ---------------------------------------------------------------- */

.liquid-glass {
  background: var(--glass-fill);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: var(--glass-border);
  border-top: var(--glass-highlight);
  box-shadow: var(--glass-shadow);
  border-radius: var(--radius-card);
}

/* Interactive sheen (light sweep across glass on hover) */
.hover-sheen {
  position: relative;
  overflow: hidden;
}

.hover-sheen::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    to right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
}

.hover-sheen:hover::after {
  animation: sheen 1s forwards;
}

@keyframes sheen {
  100% {
    left: 200%;
  }
}

/* ----------------------------------------------------------------
   Ambient background orbs
   ---------------------------------------------------------------- */

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

.ambient-tint {
  position: absolute;
  inset: 0;
  background: var(--background);
  mix-blend-mode: multiply;
  opacity: 0.5;
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  animation: drift 20s infinite ease-in-out alternate;
}

.orb-a {
  width: 24rem;
  height: 24rem;
  background: var(--secondary-fixed);
  opacity: 0.4;
  top: 10%;
  left: 10%;
  animation-delay: 0s;
}

.orb-b {
  width: 31.25rem;
  height: 31.25rem;
  background: var(--tertiary-fixed);
  opacity: 0.3;
  bottom: 20%;
  right: 5%;
  animation-delay: -5s;
}

.orb-c {
  width: 20rem;
  height: 20rem;
  background: var(--primary-fixed);
  opacity: 0.4;
  top: 40%;
  left: 60%;
  animation-delay: -10s;
}

@keyframes drift {
  0% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
  50% {
    transform: translate(100px, -50px) scale(1.2);
    opacity: 0.6;
  }
  100% {
    transform: translate(0, 0) scale(1);
    opacity: 0.4;
  }
}

/* ----------------------------------------------------------------
   Scroll reveal
   ---------------------------------------------------------------- */

.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.reveal.active {
  opacity: 1;
  transform: translateY(0);
}

/* Just in case JS is disabled */
.no-js .reveal {
  opacity: 1;
  transform: none;
}

/* ----------------------------------------------------------------
   Floating glass navbar
   ---------------------------------------------------------------- */

.nav {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 2rem;
  height: 56px;
  padding: 0 24px;
  background: var(--glass-fill);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 60px rgba(0, 0, 0, 0.08);
}

.nav-brand {
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.03em;
  color: var(--on-background);
  transition: opacity 0.3s;
}

.nav-brand:hover {
  opacity: 0.8;
}

.nav-links {
  display: none;
  align-items: center;
  gap: 0.5rem;
}

.nav-link {
  color: var(--ink-secondary);
  font-weight: 500;
  padding: 0 0.75rem;
  transition: color 0.3s;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-cta {
  display: none;
  background: var(--primary);
  color: var(--on-primary);
  padding: 10px 24px;
  border-radius: var(--radius-pill);
  box-shadow: 0 4px 12px rgba(0, 89, 181, 0.3);
  transition: background 0.3s, transform 0.15s;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--primary-container);
}

.nav-cta:active {
  transform: scale(0.95);
}

.nav.is-scrolled {
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08), 0 4px 60px rgba(0, 0, 0, 0.1);
  transition: background 0.3s, box-shadow 0.3s;
}

/* ----------------------------------------------------------------
   Buttons
   ---------------------------------------------------------------- */

.btn-dark {
  background: var(--on-background);
  color: var(--background);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: background 0.3s;
}

.btn-dark:hover {
  background: var(--inverse-surface);
}

.btn-primary {
  background: var(--primary);
  color: var(--on-primary);
  padding: 12px 24px;
  border-radius: 12px;
  font-weight: 500;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 89, 181, 0.3);
  transition: background 0.3s;
}

.btn-primary:hover {
  background: var(--primary-container);
}

.btn-pill-caps {
  border-radius: var(--radius-pill);
  text-transform: uppercase;
}

/* ----------------------------------------------------------------
   Inputs
   ---------------------------------------------------------------- */

.input {
  flex: 1;
  min-width: 0;
  background: var(--bg-tint);
  border: 1px solid var(--hairline);
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 1rem;
  color: var(--on-surface);
}

.input::placeholder {
  color: var(--ink-tertiary);
}

.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 1px var(--primary);
}

.input-no-border {
  border-color: transparent;
}

/* ----------------------------------------------------------------
   Waitlist form + scarcity bar
   ---------------------------------------------------------------- */

.form-row {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
}

.form-loading {
  position: absolute;
  inset: 0;
  background: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 12px;
  display: none;
  align-items: center;
  justify-content: center;
}

.form-loading.is-active {
  display: flex;
}

.spin {
  animation: spin 1s linear infinite;
  color: var(--primary);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.form-msg {
  margin-top: 12px;
  display: none;
}

.form-msg.is-visible {
  display: block;
  animation: msg-in 0.3s ease-out;
}

.form-msg.hide-auto {
  animation: msg-out 0.4s ease-in forwards;
}

@keyframes msg-in {
  from {
    opacity: 0;
    transform: translateY(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes msg-out {
  to {
    opacity: 0;
  }
}

.form-msg.is-success {
  color: var(--secondary);
}

.form-msg.is-error {
  color: var(--error);
}

.container-form {
  width: 100%;
  max-width: 28rem;
  margin-inline: auto;
}

.form-box {
  padding: 24px;
  border-radius: 16px;
}

.cap-note {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--primary);
}

.cap-note-label {
  color: var(--on-surface);
  white-space: nowrap;
}

.cap-sub {
  margin-top: 8px;
  font-size: 0.85rem;
  line-height: 1.6;
  text-align: center;
  max-width: 32rem;
  color: var(--ink-secondary);
}

/* ----------------------------------------------------------------
   Pulsing indicator dot
   ---------------------------------------------------------------- */

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--error);
  animation: pulse 2s infinite ease-in-out;
}

.dot-green {
  background: var(--secondary-fixed-dim);
}

.dot-sm {
  width: 6px;
  height: 6px;
}

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

/* ----------------------------------------------------------------
   Eyebrow chip
   ---------------------------------------------------------------- */

.chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-container-high);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  text-transform: uppercase;
  color: var(--on-surface);
}

/* ----------------------------------------------------------------
   Hero
   ---------------------------------------------------------------- */

.hero {
  min-height: 819px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 48px;
  padding-bottom: 80px;
}

.hero-title {
  max-width: 64rem;
  margin: 0 auto 24px;
}

.underline-flourish {
  position: relative;
  display: inline-block;
}

.underline-flourish::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -8px;
  width: 100%;
  height: 12px;
  background: var(--waste-gradient);
  opacity: 0.3;
  border-radius: var(--radius-pill);
  transform: skewX(-12deg);
}

.hero-sub {
  max-width: 42rem;
  margin: 0 auto 48px;
  color: var(--ink-secondary);
}

.section-spacer {
  margin-top: 128px;
}

/* ----------------------------------------------------------------
   Audit Machine Wizard
   ---------------------------------------------------------------- */

.wizard-card {
  border-radius: var(--radius-card);
  padding: 32px;
  position: relative;
  overflow: hidden;
}

.wizard-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--hairline);
  padding-bottom: 16px;
}

.wizard-title {
  font-size: 1.5rem;
}

.wizard-icons {
  display: flex;
  gap: 8px;
  color: var(--ink-tertiary);
  font-size: 1.25rem;
}

.wizard-steps {
  position: relative;
  min-height: 240px;
}

.wizard-step {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  opacity: 0;
  transform: translateX(60px);
  pointer-events: none;
  transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out;
}

.wizard-step.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.wizard-step.is-leaving {
  opacity: 0;
  transform: translateX(-60px);
  pointer-events: none;
}

.step-label {
  color: var(--ink-secondary);
  margin-bottom: 16px;
  font-size: 0.875rem;
}

.role-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}

.role-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 16px 8px;
  border-radius: 12px;
  background: var(--bg-tint);
  border: 1px solid transparent;
  font-size: 0.875rem;
  text-align: center;
  transition: all 0.3s;
}

.role-btn:hover {
  border-color: var(--outline-variant);
  background: var(--surface-container);
}

.role-btn.is-selected {
  border-color: var(--primary);
  background: var(--surface-container);
}

.role-icon {
  font-size: 1.5rem;
}

.role-icon.primary {
  color: var(--primary);
}
.role-icon.secondary {
  color: var(--secondary);
}
.role-icon.tertiary {
  color: var(--tertiary);
}
.role-icon.ink {
  color: var(--ink-secondary);
}

.slider-row {
  padding: 0 16px;
}

#stack-slider {
  width: 100%;
  height: 8px;
  appearance: none;
  -webkit-appearance: none;
  background: var(--surface-container-high);
  border-radius: 8px;
  cursor: pointer;
}

#stack-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--on-primary);
  box-shadow: 0 2px 8px rgba(0, 89, 181, 0.4);
  cursor: grab;
}

#stack-slider::-moz-range-thumb {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  border: 3px solid var(--on-primary);
  box-shadow: 0 2px 8px rgba(0, 89, 181, 0.4);
  cursor: grab;
}

.slider-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 16px;
}

.slider-value {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--primary);
}

.slider-actions {
  margin-top: 32px;
  display: flex;
  justify-content: flex-end;
}

.verdict-layout {
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: flex-start;
}

.verdict-card {
  flex: 1;
  width: 100%;
  background: rgba(255, 218, 214, 0.2);
  border: 1px solid var(--error-container);
  border-radius: var(--radius-card);
  padding: 24px;
}

.verdict-label {
  color: var(--error);
  margin-bottom: 8px;
}

.verdict-amount {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--error);
  margin-bottom: 4px;
}

.verdict-amount.is-saved {
  color: var(--secondary);
}

.verdict-amount-suffix {
  font-size: 1.25rem;
  color: var(--ink-secondary);
  font-weight: 400;
}

.verdict-detail {
  font-size: 0.75rem;
  color: var(--ink-secondary);
  margin-top: 16px;
}

.ledger {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.ledger-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px;
  border-radius: 12px;
  background: var(--bg-tint);
  gap: 12px;
}

.ledger-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ledger-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface-container-high);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.ledger-name {
  font-weight: 700;
  font-size: 0.875rem;
}

.ledger-sub {
  font-size: 0.75rem;
  color: var(--ink-secondary);
}

.cancel-btn {
  background: rgba(186, 26, 26, 0.1);
  color: var(--error);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  transition: all 0.3s;
}

.cancel-btn:hover {
  background: var(--error);
  color: var(--on-error);
}

.cancel-btn.is-done {
  background: rgba(0, 110, 43, 0.1);
  color: var(--secondary);
  cursor: default;
}

.locked-btn {
  background: var(--surface-variant);
  color: var(--ink-secondary);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  font-size: 0.75rem;
  cursor: not-allowed;
  white-space: nowrap;
}

.toast {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--money-gradient);
  color: var(--on-secondary);
  padding: 8px 16px;
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
  opacity: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  z-index: 5;
  transition: opacity 0.3s;
}

.toast.is-visible {
  opacity: 1;
}

/* ----------------------------------------------------------------
   Zombie Specimens
   ---------------------------------------------------------------- */

.section-title {
  margin-bottom: 48px;
  text-align: center;
}

.section-title-left {
  margin-bottom: 32px;
  text-align: left;
}

.specimen-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.specimen-card {
  display: flex;
  flex-direction: column;
  padding: 24px;
  transition: transform 0.3s;
}

.specimen-medallion {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: var(--surface-container);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 24px;
}

.specimen-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.specimen-body {
  font-size: 0.875rem;
  color: var(--ink-secondary);
  margin-bottom: 16px;
  flex-grow: 1;
}

.specimen-cost {
  font-weight: 700;
  font-size: 1.125rem;
  background: var(--waste-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* Asymmetric offsets on desktop */
.specimen-card.off-up {
  /* The Sleeper — sits higher */
}
.specimen-card.off-down {
  /* The Twin — sits lower */
}
.specimen-card.off-mid {
  /* The Ghost — slightly lower */
}

/* ----------------------------------------------------------------
   Evidence table
   ---------------------------------------------------------------- */

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.data-table th {
  padding: 12px 8px;
  border-bottom: 1px solid var(--hairline);
  color: var(--ink-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 0.75rem;
}

.data-table td {
  padding: 16px 8px;
  border-bottom: 1px solid var(--hairline);
}

.data-table tbody tr:last-child td {
  border-bottom: none;
}

.data-table tbody tr {
  transition: background 0.3s;
}

.data-table tbody tr:hover {
  background: var(--surface-container-low);
}

.evidence-card {
  padding: 32px;
  margin-bottom: 32px;
}

/* ----------------------------------------------------------------
   How it works
   ---------------------------------------------------------------- */

.steps-row {
  display: flex;
  flex-direction: column;
  gap: 24px;
  max-width: 64rem;
  margin-inline: auto;
}

.step-card {
  flex: 1;
  padding: 24px;
}

.step-number {
  font-size: 1.5rem;
  color: var(--primary);
  margin-bottom: 16px;
}

.step-copy {
  color: var(--ink-secondary);
  font-size: 1rem;
}

.soc2-chip {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.soc2-inner {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-container-high);
  border-radius: var(--radius-pill);
  padding: 8px 16px;
  text-transform: uppercase;
  color: var(--on-surface);
}

/* ----------------------------------------------------------------
   What early members get
   ---------------------------------------------------------------- */

.members-card {
  padding: 32px;
}

.members-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.members-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--hairline);
}

.members-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.members-icon {
  color: var(--secondary);
  flex-shrink: 0;
  margin-top: 2px;
}

/* ----------------------------------------------------------------
   Why us
   ---------------------------------------------------------------- */

.why-card {
  background: var(--surface-container);
  border-radius: var(--radius-card);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  align-items: center;
}

.why-quote {
  flex: 1;
  font-style: italic;
  color: var(--ink-secondary);
  margin-bottom: 24px;
}

.team-ticket {
  width: 100%;
  padding: 24px;
  border-radius: 16px;
  transform: rotate(2deg);
  transition: transform 0.3s;
}

.team-ticket:hover {
  transform: rotate(0deg);
}

.team-title {
  font-size: 1.25rem;
  margin-bottom: 8px;
}

.team-sub {
  font-size: 0.875rem;
  color: var(--ink-secondary);
}

/* ----------------------------------------------------------------
   Final CTA
   ---------------------------------------------------------------- */

.final-cta {
  padding: 32px 32px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.final-title {
  margin-bottom: 24px;
}

.final-copy {
  color: var(--ink-secondary);
  margin-bottom: 40px;
  max-width: 36rem;
  margin-inline: auto;
}

.live-note {
  margin-top: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--ink-tertiary);
  font-size: 0.72rem;
}

/* ----------------------------------------------------------------
   Footer
   ---------------------------------------------------------------- */

.footer {
  width: 100%;
  padding-top: 80px;
  padding-bottom: 40px;
  border-top: 1px solid var(--hairline);
  background: var(--background);
  color: var(--on-background);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gutter);
}

.footer-brand-row {
  grid-column: 1 / -1;
  margin-bottom: 32px;
}

.footer-brand {
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  font-weight: 600;
  text-transform: lowercase;
}

.footer-col {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-link {
  opacity: 0.8;
  transition: color 0.3s, opacity 0.3s;
}

.footer-link:hover {
  color: var(--primary);
  opacity: 1;
}

.footer-link-dim {
  color: var(--ink-secondary);
}

.footer-copy {
  grid-column: 1 / -1;
  margin-top: 48px;
  font-size: 0.875rem;
  color: var(--ink-tertiary);
  text-transform: lowercase;
}

/* ================================================================
   Responsive — md (768px) and up
   ================================================================ */

@media (min-width: 768px) {
  .container-wide {
    padding-left: var(--margin-desktop);
    padding-right: var(--margin-desktop);
  }

  .hero {
    margin-top: 96px;
  }

  .form-row {
    flex-direction: row;
  }

  .nav-links {
    display: flex;
  }

  .role-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .verdict-layout {
    flex-direction: row;
  }

  .specimen-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  /* Asymmetric zombie offsets (only on desktop) */
  .specimen-card.off-up {
    transform: translateY(-16px);
  }
  .specimen-card.off-up:hover {
    transform: translateY(0);
  }
  .specimen-card.off-down {
    transform: translateY(16px);
  }
  .specimen-card.off-down:hover {
    transform: translateY(-8px);
  }
  .specimen-card.off-mid {
    transform: translateY(-8px);
  }
  .specimen-card.off-mid:hover {
    transform: translateY(-16px);
  }
  .other-card {
    /* The Twin keeps the same base behavior */
  }

  .steps-row {
    flex-direction: row;
  }

  .why-card {
    flex-direction: row;
    padding: 48px;
  }

  .why-quote {
    margin-bottom: 0;
  }

  .team-ticket {
    width: 16rem;
    flex-shrink: 0;
  }

  .final-cta {
    padding: 64px;
  }

  .footer-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (min-width: 640px) {
  .nav-cta {
    display: inline-block;
  }
}