/* ==========================================================================
   MergeStudio — Landing & Authentication Page Styles
   Obsidian & Titanium Aesthetic matching Studio Inspector
   ========================================================================== */

:root {
  --bg-root: #070709;
  --bg-surface: #0d0e12;
  --bg-elevated: #14161d;
  --bg-hover: #1b1e28;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: rgba(255, 255, 255, 0.24);

  --text-primary: #f4f4f6;
  --text-secondary: #9ca3af;
  --text-muted: #6b7280;

  --accent-indigo: #6366f1;
  --accent-emerald: #10b981;
  --accent-amber: #f59e0b;

  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 9999px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-sans);
  background: var(--bg-root);
  color: var(--text-primary);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  position: relative;
}

/* Ambient Atmospheric Glow */
.bg-glow {
  position: fixed;
  top: -180px;
  left: 50%;
  transform: translateX(-50%);
  width: 960px;
  height: 520px;
  background: radial-gradient(ellipse at center, rgba(99, 102, 241, 0.14) 0%, rgba(236, 72, 153, 0.06) 40%, rgba(7, 7, 9, 0) 72%);
  pointer-events: none;
  z-index: 0;
}

/* ==========================================================================
   Navigation Bar
   ========================================================================== */
.navbar {
  position: sticky;
  top: 0;
  z-index: 50;
  height: 60px;
  background: rgba(7, 7, 9, 0.8);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-subtle);
}

.nav-inner {
  max-width: 1160px;
  margin: 0 auto;
  height: 100%;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.brand-mark {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: linear-gradient(135deg, #ffffff 0%, #a5b4fc 100%);
  color: #070709;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-size: 0.98rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-tag {
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  padding: 2px 6px;
  border-radius: 5px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-links a:hover {
  color: var(--text-primary);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-sans);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 9px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 0.15s ease;
}

.btn-sm {
  padding: 6px 13px;
  font-size: 0.8rem;
}

.btn-lg {
  padding: 11px 20px;
  font-size: 0.9rem;
}

.btn-full {
  width: 100%;
}

.btn-primary {
  background: #ffffff;
  color: #070709;
}

.btn-primary:hover {
  background: #e5e7eb;
}

.btn-secondary {
  background: var(--bg-elevated);
  border-color: var(--border-subtle);
  color: var(--text-primary);
}

.btn-secondary:hover {
  background: var(--bg-hover);
  border-color: var(--border-focus);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
}

.btn-ghost:hover {
  color: var(--text-primary);
  background: rgba(255, 255, 255, 0.06);
}

.btn-amber {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #070709;
  font-weight: 700;
}

.btn-amber:hover {
  filter: brightness(1.08);
}

/* Account Chip */
.account-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  padding: 4px 8px 4px 5px;
  border-radius: var(--radius-pill);
}

.plan-badge {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  border-radius: var(--radius-pill);
}

.plan-badge.free {
  background: rgba(255, 255, 255, 0.08);
  color: var(--text-secondary);
}

.plan-badge.pro {
  background: linear-gradient(135deg, #fbbf24, #d97706);
  color: #070709;
}

.chip-email {
  font-size: 0.78rem;
  color: var(--text-secondary);
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ==========================================================================
   Hero Split Section
   ========================================================================== */
.container {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.hero {
  padding: 68px 0 60px 0;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  padding: 5px 12px;
  border-radius: var(--radius-pill);
  margin-bottom: 20px;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-emerald);
  box-shadow: 0 0 8px var(--accent-emerald);
}

.hero-title {
  font-size: clamp(2.2rem, 4.2vw, 3.35rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.035em;
  color: var(--text-primary);
  margin-bottom: 18px;
}

.hero-title span {
  background: linear-gradient(90deg, #ffffff 20%, #a5b4fc 60%, #f472b6 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-subtitle {
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 540px;
  margin-bottom: 28px;
}

.hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border-subtle);
}

.metric-item {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.metric-val {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.metric-lbl {
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Right Auth / Quick Access Card
   ========================================================================== */
.auth-card {
  background: rgba(13, 14, 18, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: 0 24px 64px -16px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  padding: 3px;
  border-radius: var(--radius-md);
  margin-bottom: 20px;
}

.auth-tab {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  font-family: var(--font-sans);
  font-size: 0.82rem;
  font-weight: 500;
  padding: 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.auth-tab.active {
  background: rgba(255, 255, 255, 0.1);
  color: var(--text-primary);
  font-weight: 600;
}

.auth-header {
  margin-bottom: 18px;
}

.auth-header h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 4px;
}

.auth-header p {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.form-field label {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-field input {
  width: 100%;
  background: var(--bg-root);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  padding: 10px 12px;
  border-radius: var(--radius-md);
  font-family: var(--font-sans);
  font-size: 0.86rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.form-field input:focus {
  border-color: var(--accent-indigo);
}

.auth-error {
  font-size: 0.78rem;
  color: #f87171;
  min-height: 18px;
  margin-bottom: 10px;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border-subtle);
}

.signed-in-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.signed-in-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.signed-in-info {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.signed-in-label {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.signed-in-email {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* ==========================================================================
   Features Grid
   ========================================================================== */
.section {
  padding: 64px 0;
  border-top: 1px solid var(--border-subtle);
}

.section-head {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 44px auto;
}

.section-eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #a5b4fc;
  margin-bottom: 10px;
}

.section-head h2 {
  font-size: 1.9rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 10px;
}

.section-head p {
  font-size: 0.94rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

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

.feature-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 22px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.feature-card:hover {
  border-color: rgba(255, 255, 255, 0.18);
  transform: translateY(-2px);
}

.feature-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}

.feature-card h3 {
  font-size: 0.94rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.feature-card p {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ==========================================================================
   Pricing Section
   ========================================================================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 780px;
  margin: 0 auto;
}

.pricing-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px;
  display: flex;
  flex-direction: column;
}

.pricing-card.pro-card {
  background: linear-gradient(180deg, rgba(245, 158, 11, 0.06) 0%, var(--bg-surface) 100%);
  border-color: rgba(245, 158, 11, 0.35);
}

.pricing-tier {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.pricing-tier span.tier-title {
  font-size: 0.95rem;
  font-weight: 600;
}

.price-tag {
  font-size: 2.1rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.price-tag small {
  font-size: 0.85rem;
  font-weight: 400;
  color: var(--text-muted);
}

.pricing-desc {
  font-size: 0.82rem;
  color: var(--text-secondary);
  margin-bottom: 20px;
}

.pricing-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 24px;
  flex: 1;
}

.pricing-list li {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 0.83rem;
  color: var(--text-primary);
}

.pricing-list li svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

.pro-card .pricing-list li svg {
  color: var(--accent-amber);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  border-top: 1px solid var(--border-subtle);
  padding: 28px 0;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-inner {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
}

.footer-links a:hover {
  color: var(--text-primary);
}

/* ==========================================================================
   Live Sample Phone Simulation Showcase (Hero Right)
   ========================================================================== */
.demo-phone-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.demo-phone {
  position: relative;
  width: 300px;
  aspect-ratio: 9 / 16;
  background: #000000;
  border-radius: 26px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  box-shadow: 0 30px 80px -12px rgba(0, 0, 0, 0.9), 0 0 50px rgba(99, 102, 241, 0.14);
}

canvas#landingDemoCanvas,
.demo-video {
  width: 100%;
  height: 100%;
  border-radius: 20px;
  display: block;
  object-fit: cover;
  cursor: pointer;
}

.demo-hint {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  color: var(--text-muted);
}

/* ==========================================================================
   How It Works Workflow (3 Steps)
   ========================================================================== */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.step-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
}

.step-num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.12);
  border: 1px solid rgba(99, 102, 241, 0.25);
  padding: 3px 9px;
  border-radius: var(--radius-pill);
  display: inline-block;
  margin-bottom: 14px;
}

.step-card h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.step-card p {
  font-size: 0.84rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* ==========================================================================
   Auth Split Band
   ========================================================================== */
.auth-split {
  display: grid;
  grid-template-columns: 1fr 420px;
  gap: 48px;
  align-items: center;
  background: radial-gradient(circle at top left, rgba(99, 102, 241, 0.08), transparent 55%), var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: 22px;
  padding: 36px;
}

.auth-split-copy h2 {
  font-size: 1.85rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 12px;
}

.auth-split-copy p {
  font-size: 0.92rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 20px;
}

.auth-benefits {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.auth-benefits li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  color: var(--text-primary);
}

.auth-benefits svg {
  color: var(--accent-emerald);
  flex-shrink: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 960px) {
  .hero {
    grid-template-columns: 1fr;
    padding: 40px 0;
    gap: 36px;
  }
  .workflow-grid {
    grid-template-columns: 1fr;
  }
  .auth-split {
    grid-template-columns: 1fr;
    padding: 24px;
    gap: 28px;
  }
  .features-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav-links {
    display: none;
  }
}

@media (max-width: 600px) {
  .features-grid,
  .pricing-grid {
    grid-template-columns: 1fr;
  }
}
