:root {
  --landing-bg: #080b0f;
  --landing-fg: #e2e8f0;
  --landing-card: #0f1318;
  --landing-primary: #22c55e;
  --landing-primary-fg: #080b0f;
  --landing-muted: #64748b;
  --landing-border: rgba(255, 255, 255, 0.07);
  --landing-radius: 0.625rem;
}

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

body.landing-page {
  margin: 0;
  min-height: 100vh;
  background: var(--landing-bg);
  color: var(--landing-fg);
  font-family: 'Manrope', sans-serif;
  overflow-x: hidden;
}

.landing-mono {
  font-family: 'JetBrains Mono', monospace;
}

/* ── Nav ── */
.landing-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 3.5rem;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--landing-border);
  background: rgba(8, 11, 15, 0.8);
  backdrop-filter: blur(24px);
}

@media (min-width: 768px) {
  .landing-nav {
    padding: 0 3rem;
  }
}

.landing-nav .meridia-brand-name {
  font-size: 0.875rem;
}

.landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.landing-btn-ghost {
  border: none;
  background: transparent;
  color: var(--landing-muted);
  font-size: 0.875rem;
  padding: 0.375rem 0.75rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
  font-family: inherit;
}

.landing-btn-ghost:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.05);
}

.landing-btn-primary-sm {
  border: none;
  background: var(--landing-primary);
  color: var(--landing-primary-fg);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 0.375rem 1rem;
  border-radius: 0.375rem;
  cursor: pointer;
  transition: opacity 0.2s;
  font-family: inherit;
}

.landing-btn-primary-sm:hover {
  opacity: 0.9;
}

/* ── Hero ── */
.landing-hero {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 7rem 1.5rem 4rem;
}

.landing-hero-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.4;
  background-image: radial-gradient(circle, rgba(34, 197, 94, 0.18) 1px, transparent 1px);
  background-size: 28px 28px;
}

.landing-hero-glow {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 700px;
  height: 400px;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 30%, rgba(34, 197, 94, 0.1) 0%, transparent 70%);
}

.landing-hero-inner {
  position: relative;
  width: 100%;
  max-width: 48rem;
  text-align: center;
}

.landing-carousel-viewport {
  position: relative;
  height: 272px;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 768px) {
  .landing-carousel-viewport {
    height: 240px;
  }
}

.landing-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.46s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.46s cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}

.landing-slide.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.landing-slide.is-exit-up {
  opacity: 0;
  transform: translateY(-16px);
}

.landing-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  border: 1px solid rgba(34, 197, 94, 0.25);
  background: rgba(34, 197, 94, 0.1);
  border-radius: 9999px;
  padding: 0.25rem 0.75rem;
  margin-bottom: 1.5rem;
}

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

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

.landing-tag-text {
  font-size: 10px;
  color: var(--landing-primary);
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.landing-headline {
  margin: 0 0 1rem;
  font-size: 1.9rem;
  font-weight: 800;
  line-height: 1.16;
  letter-spacing: -0.02em;
  color: #fff;
  max-width: 42rem;
}

@media (min-width: 768px) {
  .landing-headline {
    font-size: 3rem;
  }
}

.landing-subheadline {
  margin: 0;
  font-size: 0.93rem;
  line-height: 1.625;
  color: var(--landing-muted);
  max-width: 36rem;
}

@media (min-width: 768px) {
  .landing-subheadline {
    font-size: 1rem;
  }
}

.landing-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

.landing-dot {
  height: 3px;
  width: 10px;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  cursor: pointer;
  padding: 0;
  transition: width 0.3s, background 0.3s;
}

.landing-dot:hover {
  background: rgba(255, 255, 255, 0.3);
}

.landing-dot.is-active {
  width: 28px;
  background: var(--landing-primary);
}

/* ── Bullets ── */
.landing-bullets {
  border-top: 1px solid var(--landing-border);
  padding: 2.5rem 1.5rem;
}

.landing-bullets-inner {
  max-width: 36rem;
  margin: 0 auto;
}

.landing-section-label {
  font-size: 10px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--landing-muted);
  margin: 0 0 1.25rem;
}

.landing-bullet-row {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--landing-border);
}

.landing-bullet-row:last-child {
  border-bottom: none;
}

.landing-bullet-icon {
  width: 17px;
  height: 17px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--landing-primary);
  opacity: 0.8;
  transition: opacity 0.2s;
}

.landing-bullet-row:hover .landing-bullet-icon {
  opacity: 1;
}

.landing-bullet-text {
  font-size: 0.9rem;
  line-height: 1.625;
  color: var(--landing-muted);
  transition: color 0.2s;
}

.landing-bullet-row:hover .landing-bullet-text {
  color: #fff;
}

/* ── CTA ── */
.landing-cta {
  padding: 3.5rem 1.5rem;
  text-align: center;
}

.landing-cta-inner {
  max-width: 20rem;
  margin: 0 auto;
}

.landing-cta-btn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: none;
  background: var(--landing-primary);
  color: var(--landing-primary-fg);
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 700;
  padding: 0.875rem 1rem;
  border-radius: var(--landing-radius);
  cursor: pointer;
  box-shadow: 0 0 36px rgba(34, 197, 94, 0.22), 0 1px 3px rgba(0, 0, 0, 0.4);
  transition: box-shadow 0.2s;
}

.landing-cta-btn:hover {
  box-shadow: 0 0 60px rgba(34, 197, 94, 0.38), 0 1px 3px rgba(0, 0, 0, 0.4);
}

.landing-cta-btn svg {
  transition: transform 0.2s;
}

.landing-cta-btn:hover svg {
  transform: translateX(4px);
}

.landing-cta-note {
  margin: 0.875rem 0 0;
  font-size: 0.75rem;
  line-height: 1.625;
  color: var(--landing-muted);
}

/* ── Modal ── */
.landing-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.landing-modal.is-open {
  display: flex;
}

.landing-modal-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  animation: landing-fade-in 0.2s ease;
}

.landing-modal-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 24rem;
  background: var(--landing-card);
  border: 1px solid var(--landing-border);
  border-radius: calc(var(--landing-radius) + 4px);
  padding: 2rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
  animation: landing-slide-up 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  max-height: calc(100vh - 2rem);
  overflow-y: auto;
}

@keyframes landing-fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes landing-slide-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-auth-step {
  display: none;
}

.landing-auth-step.is-active {
  display: block;
  animation: landing-step-in 0.22s ease-out;
}

@keyframes landing-step-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.landing-modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.landing-modal-header-left {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
}

.landing-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
}

.landing-modal-desc {
  margin: 0.25rem 0 0;
  font-size: 0.875rem;
  color: var(--landing-muted);
}

.landing-modal-close,
.landing-modal-back {
  border: none;
  background: transparent;
  color: var(--landing-muted);
  cursor: pointer;
  padding: 0;
  line-height: 1;
  transition: color 0.2s;
  flex-shrink: 0;
}

.landing-modal-close:hover,
.landing-modal-back:hover {
  color: #fff;
}

.landing-field-label {
  display: block;
  font-size: 10px;
  color: var(--landing-muted);
  margin-bottom: 0.375rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.landing-field-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.375rem;
}

.landing-field-label-row .landing-field-label {
  margin-bottom: 0;
}

.landing-input {
  width: 100%;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--landing-border);
  border-radius: var(--landing-radius);
  padding: 0.625rem 0.75rem;
  font-size: 0.875rem;
  color: #fff;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.landing-input::placeholder {
  color: rgba(255, 255, 255, 0.15);
}

.landing-input:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.landing-field {
  margin-bottom: 0.75rem;
}

.landing-link {
  border: none;
  background: none;
  padding: 0;
  font-size: 10px;
  color: var(--landing-primary);
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  text-decoration: none;
}

.landing-link:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.landing-link-sm {
  font-size: 0.75rem;
  font-family: inherit;
}

.landing-submit {
  width: 100%;
  margin-top: 0.25rem;
  border: none;
  background: var(--landing-primary);
  color: var(--landing-primary-fg);
  font-family: inherit;
  font-size: 0.875rem;
  font-weight: 700;
  padding: 0.625rem;
  border-radius: var(--landing-radius);
  cursor: pointer;
  transition: opacity 0.2s;
}

.landing-submit:hover {
  opacity: 0.9;
}

.landing-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.landing-switch-mode {
  margin-top: 1.25rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--landing-muted);
}

.landing-alert {
  margin-top: 0.75rem;
  padding: 0.5rem 0.75rem;
  border-radius: var(--landing-radius);
  font-size: 0.8125rem;
  line-height: 1.4;
}

.landing-alert-error {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.25);
  color: #fcd34d;
}

.landing-alert-success {
  background: rgba(34, 197, 94, 0.12);
  border: 1px solid rgba(34, 197, 94, 0.25);
  color: #86efac;
}

.landing-auth-icon-wrap {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  color: var(--landing-primary);
}

.landing-auth-center-text {
  text-align: center;
  font-size: 0.875rem;
  line-height: 1.625;
  color: var(--landing-muted);
  max-width: 260px;
  margin: 0 auto 1.5rem;
}

.landing-otp-row {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1.25rem;
}

.landing-otp-cell {
  width: 2.5rem;
  height: 3rem;
  text-align: center;
  font-size: 1.125rem;
  font-weight: 700;
  color: #fff;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--landing-border);
  border-radius: var(--landing-radius);
  caret-color: var(--landing-primary);
  font-family: inherit;
}

.landing-otp-cell:focus {
  outline: none;
  border-color: rgba(34, 197, 94, 0.4);
  box-shadow: 0 0 0 1px rgba(34, 197, 94, 0.2);
}

.landing-resend-row {
  margin-top: 1rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--landing-muted);
}

.text-center {
  text-align: center;
}
