:root {
  --bg: #eef2f8;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #c5d0e0;
  --shell-border: #94a3b8;
  --accent: #3d8bfd;
  --accent-2: #7c5cff;
  --success: #0f9d58;
  --shadow: 0 12px 36px rgba(15, 23, 42, 0.08);
  --razorpay: #072654;
}

* {
  box-sizing: border-box;
}

body.landing-page {
  margin: 0;
  height: 100dvh;
  overflow: hidden;
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  display: grid;
  place-items: center;
  padding: 0.5rem;
}

.landing-shell {
  width: min(980px, 100%);
  height: 100%;
  max-height: calc(100dvh - 1rem);
  display: flex;
  flex-direction: column;
  border: 2px solid var(--shell-border);
  border-radius: 20px;
  background: var(--card);
  box-shadow: var(--shadow);
  overflow: hidden;
  position: relative;
}

.landing-header {
  flex: 0 0 50%;
  min-height: 0;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0.35rem 0.75rem 0.25rem;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, #fff, #f8fafc);
}

.landing-logo {
  display: block;
  width: auto;
  height: 100%;
  max-width: 92%;
  max-height: 100%;
  margin-inline: auto;
  object-fit: contain;
  object-position: center center;
}

.landing-main {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 0.45rem;
  padding: 0.45rem 0.65rem;
  overflow: hidden;
}

.landing-card {
  background: #fbfdff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.55rem 0.65rem;
  min-height: 0;
  overflow: hidden;
}

.landing-card h1,
.landing-card h2 {
  margin: 0 0 0.45rem;
  font-size: 0.92rem;
}

.mode-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.35rem;
  margin-bottom: 0.5rem;
}

.mode-tab {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  padding: 0.4rem 0.4rem;
  font: inherit;
  font-size: 0.76rem;
  color: var(--text);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  text-align: left;
  font-weight: 700;
}

.mode-tab .mode-label {
  font-weight: 700;
}

.mode-tab .mode-rate {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 500;
}

.mode-tab.is-active {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(61, 139, 253, 0.12), rgba(124, 92, 255, 0.08));
}

.duration-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 0.35rem;
}

.duration-value {
  color: var(--text);
  font-weight: 700;
}

.duration-fields {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
  margin-top: 0.45rem;
}

.duration-field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  font-size: 0.78rem;
  color: var(--muted);
}

.duration-field input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.45rem 0.55rem;
  font: inherit;
  color: var(--text);
  background: #fff;
}

.duration-field input[readonly] {
  background: #f1f5f9;
  color: var(--text);
  font-weight: 700;
}

.price-panel {
  margin-top: 0.45rem;
  padding: 0.45rem 0.55rem;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(61, 139, 253, 0.08), rgba(124, 92, 255, 0.08));
  border: 1px solid rgba(61, 139, 253, 0.18);
}

.price-line {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.price-total {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
}

.muted {
  color: var(--muted);
}

.plan-tiles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.55rem;
}

.plan-tile {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  padding: 0.55rem;
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.plan-tile:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 20px rgba(61, 139, 253, 0.1);
}

.plan-icon {
  display: inline-flex;
  width: 1.6rem;
  height: 1.6rem;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(61, 139, 253, 0.12);
  margin-bottom: 0.35rem;
  font-size: 0.9rem;
}

.plan-tile strong {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 0.2rem;
}

.plan-copy {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.landing-footer {
  flex: 0 0 auto;
  padding: 0.35rem 0.75rem 0.5rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  border-top: 1px solid var(--border);
}

.landing-footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 0.65rem;
  margin: 0 0 0.35rem;
  padding: 0;
  list-style: none;
}

.landing-footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 0.7rem;
}

.landing-footer-links a:hover {
  color: var(--accent);
  text-decoration: underline;
}

.landing-toast {
  position: absolute;
  top: 0.55rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 30;
  max-width: min(92%, 520px);
  padding: 0.55rem 0.8rem;
  border-radius: 10px;
  background: #991b1b;
  color: #fff;
  font-size: 0.82rem;
}

.landing-toast.hidden {
  display: none;
}

.payment-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: grid;
  place-items: center;
  padding: 1rem;
  z-index: 40;
}

.payment-overlay.hidden {
  display: none;
}

.payment-modal {
  width: min(440px, 100%);
  max-height: calc(100dvh - 2rem);
  overflow: auto;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 24px 80px rgba(15, 23, 42, 0.28);
}

.payment-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
  padding: 0.85rem 1rem;
  background: var(--razorpay);
  color: #fff;
}

.payment-kicker {
  margin: 0;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.8;
}

.payment-header h2 {
  margin: 0.15rem 0 0;
  font-size: 1rem;
}

.payment-close {
  border: none;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 1.8rem;
  height: 1.8rem;
  border-radius: 999px;
  font-size: 1.2rem;
  line-height: 1;
  cursor: pointer;
}

.payment-body {
  padding: 0.85rem 1rem 1rem;
}

.payment-summary {
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f8fafc;
  margin-bottom: 0.75rem;
  font-size: 0.86rem;
}

.payment-summary p {
  margin: 0.15rem 0;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.payment-amount-row strong {
  color: var(--razorpay);
}

.payment-form label {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-bottom: 0.65rem;
  font-size: 0.8rem;
  color: var(--muted);
}

.payment-form label.payment-bulk-only {
  display: none !important;
}

.payment-form label.payment-bulk-only.is-visible {
  display: flex !important;
}

.payment-form input {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
}

.payment-form textarea {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  font: inherit;
  resize: vertical;
  min-height: 4.5rem;
}

.payment-form .full-width {
  grid-column: 1 / -1;
}

.payment-field-hint {
  font-size: 0.75rem;
  line-height: 1.35;
}

.field-required {
  color: #ef4444;
  font-weight: 700;
}

.field-optional {
  color: var(--muted);
  font-size: 0.82em;
}

.required {
  color: #b45309;
  font-size: 0.72rem;
}

.payment-note {
  margin: 0 0 0.7rem;
  font-size: 0.75rem;
  line-height: 1.35;
}

.payment-submit {
  width: 100%;
  border: none;
  border-radius: 8px;
  padding: 0.7rem 1rem;
  font: inherit;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  cursor: pointer;
}

.payment-submit:disabled {
  opacity: 0.65;
  cursor: wait;
}

.payment-submit.secondary {
  background: #e2e8f0;
  color: var(--text);
}

.payment-success {
  text-align: center;
  padding: 0.35rem 0 0.15rem;
}

.payment-success.hidden {
  display: none;
}

.success-title {
  margin: 0;
  font-size: 1.05rem;
  color: var(--success);
  font-weight: 700;
}

.success-copy {
  color: var(--muted);
  line-height: 1.4;
  font-size: 0.88rem;
}

@media (max-width: 820px) {
  body.landing-page {
    padding: 0;
    height: auto;
    min-height: 100dvh;
    overflow-x: auto;
    overflow-y: auto;
    display: block;
    -webkit-overflow-scrolling: touch;
  }

  .landing-shell {
    width: 100%;
    height: auto;
    min-height: 100dvh;
    max-height: none;
    border-radius: 0;
    border-left: none;
    border-right: none;
    overflow-x: auto;
    overflow-y: visible;
  }

  .landing-header {
    flex: 0 0 auto;
    min-height: 0;
    width: 100%;
    padding: 0.65rem 0.75rem 0.5rem;
    justify-content: center;
    align-items: center;
  }

  .landing-logo {
    width: auto;
    height: auto;
    max-width: min(92vw, 320px);
    max-height: min(36dvh, 200px);
    margin-inline: auto;
    flex-shrink: 0;
  }

  .landing-main {
    flex: 0 0 auto;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto;
    overflow: visible;
    padding: 0.65rem 0.75rem 0.85rem;
    gap: 0.65rem;
  }

  .landing-card {
    overflow: visible;
  }

  .mode-tabs {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.35rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }

  .mode-tab {
    flex: 0 0 auto;
    min-width: 7.5rem;
  }

  .plan-tiles {
    display: flex;
    gap: 0.45rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 0.15rem;
    scrollbar-width: thin;
  }

  .plan-tile {
    flex: 0 0 min(78vw, 280px);
  }

  .duration-fields {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .payment-modal {
    overflow-x: auto;
  }

  .landing-footer {
    padding-bottom: max(0.75rem, env(safe-area-inset-bottom));
  }
}
