/* SmartRx public landing — dark clinical + electric blue (#2563eb)
   Patient-first marketing; pharmacist portal is a quiet side door. */

:root {
  --blue: #2563eb;
  --blue-bright: #3b82f6;
  --blue-glow: rgba(37, 99, 235, 0.4);
  --purple-glow: rgba(147, 51, 234, 0.2);
  --bg: #000000;
  --surface: #0f172a;
  --surface-2: #1e293b;
  --text: #ffffff;
  --muted: #94a3b8;
  --muted-2: #64748b;
  --border: rgba(148, 163, 184, 0.18);
  --green: #22c55e;
  --amber: #fbbf24;
  --radius: 1rem;
  --max: 68rem;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--blue-bright);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

.wrap {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
}

/* Ambient glows */
.bg-glows {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.bg-glows::before,
.bg-glows::after {
  content: "";
  position: absolute;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  filter: blur(80px);
}

.bg-glows::before {
  top: -8rem;
  left: -6rem;
  background: rgba(37, 99, 235, 0.2);
}

.bg-glows::after {
  bottom: 10%;
  right: -8rem;
  background: var(--purple-glow);
}

.site {
  position: relative;
  z-index: 1;
}

/* Draft feedback badge */
.draft-badge {
  position: sticky;
  top: 0;
  z-index: 40;
  text-align: center;
  padding: 0.45rem 1rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #78350f;
  background: linear-gradient(90deg, #fbbf24, #f59e0b);
  border-bottom: 1px solid rgba(0, 0, 0, 0.15);
}

/* Header */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 0;
  position: relative;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: inherit;
  text-decoration: none;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 0.65rem;
  box-shadow: 0 0 24px var(--blue-glow);
}

.brand .rx {
  color: var(--blue-bright);
}

.nav-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem 1.1rem;
  font-size: 0.875rem;
  color: var(--muted);
}

.nav-links a {
  color: var(--muted);
}

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

/* Quiet pharmacist side door — muted, not a CTA button */
.nav-links .nav-pharm-quiet,
.nav-links .nav-login {
  color: var(--muted-2);
  font-weight: 500;
  font-size: 0.8125rem;
}

.nav-links .nav-pharm-quiet:hover,
.nav-links .nav-login:hover {
  color: var(--muted);
}

.btn-nav {
  padding: 0.45rem 0.9rem !important;
  font-size: 0.8125rem !important;
  border-radius: 0.55rem !important;
}

.nav-links .btn-nav {
  color: #fff;
}

.nav-links .btn-nav:hover {
  color: #fff;
}

/* Mobile hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0.45rem;
  border-radius: 0.55rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  cursor: pointer;
}

.nav-toggle-bar {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text);
  border-radius: 2px;
  transition: transform 0.15s, opacity 0.15s;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

@media (max-width: 860px) {
  .nav-toggle {
    display: inline-flex;
    margin-left: auto;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: calc(100% - 0.25rem);
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.45);
    z-index: 30;
  }

  .nav-links.is-open {
    display: flex;
  }

  .nav-links a {
    padding: 0.85rem 1rem;
    border-radius: 0.55rem;
  }

  .nav-links a:hover {
    background: var(--surface-2);
  }

  .nav-links .btn-nav {
    text-align: center;
    margin-top: 0.35rem;
  }
}

/* Hero */
.hero {
  padding: 3rem 0 4rem;
  text-align: center;
  position: relative;
}

.hero-glow-ring {
  position: absolute;
  left: 50%;
  top: 2.5rem;
  transform: translateX(-50%);
  width: 14rem;
  height: 14rem;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.35) 0%, transparent 70%);
  filter: blur(8px);
  pointer-events: none;
  z-index: 0;
}

.hero-logo {
  position: relative;
  z-index: 1;
  width: 6rem;
  height: 6rem;
  margin: 0 auto 1.5rem;
  border-radius: 1.25rem;
  box-shadow: 0 0 30px var(--blue-glow), 0 0 60px rgba(37, 99, 235, 0.25);
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero h1 .rx {
  color: var(--blue-bright);
}

.hero-tag,
.hero-tagline {
  position: relative;
  z-index: 1;
  margin: 1.15rem auto 0;
  max-width: 34rem;
  color: var(--text);
  font-size: clamp(1.15rem, 2.5vw, 1.35rem);
  font-weight: 550;
  line-height: 1.4;
}

.hero-sub {
  position: relative;
  z-index: 1;
  margin: 0.85rem auto 0;
  max-width: 36rem;
  color: var(--muted);
  font-size: 1rem;
}

.hero-actions {
  position: relative;
  z-index: 1;
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.85rem 1.4rem;
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s, border-color 0.15s, color 0.15s, opacity 0.15s;
}

.btn:hover {
  text-decoration: none;
}

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: #1d4ed8;
  color: #fff;
}

.btn-primary:disabled,
.btn-primary[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
}

.btn-ghost {
  background: var(--surface-2);
  color: var(--text);
  border-color: var(--border);
}

.btn-ghost:hover {
  border-color: var(--blue-bright);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--blue-bright);
  border-color: rgba(59, 130, 246, 0.45);
}

.btn-outline:hover {
  background: rgba(37, 99, 235, 0.12);
  color: #fff;
}

.btn-install {
  background: rgba(37, 99, 235, 0.1);
  color: #bfdbfe;
  border-color: rgba(59, 130, 246, 0.35);
}

.btn-install:hover {
  background: rgba(37, 99, 235, 0.18);
  color: #fff;
  border-color: rgba(59, 130, 246, 0.55);
}

.btn-status {
  color: var(--muted);
  font-size: 0.8em;
  font-weight: 500;
}

.btn-icon {
  display: inline-block;
  vertical-align: -0.15em;
  margin-right: 0.15rem;
}

.compliance-note {
  margin: 1.5rem auto 0;
  max-width: 40rem;
  font-size: 0.8125rem;
  color: var(--muted-2);
}

/* App availability */
.app-section {
  position: relative;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 2.5rem 1.5rem;
  border: 1px solid rgba(59, 130, 246, 0.35);
  border-radius: calc(var(--radius) + 0.25rem);
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.78));
  box-shadow: 0 0 42px rgba(37, 99, 235, 0.1);
}

.app-section-glow {
  position: absolute;
  width: 18rem;
  height: 18rem;
  top: -8rem;
  right: -4rem;
  border-radius: 50%;
  background: rgba(37, 99, 235, 0.25);
  filter: blur(45px);
  pointer-events: none;
}

.app-copy {
  position: relative;
  z-index: 1;
}

.app-copy .lead {
  margin-bottom: 1.35rem;
}

.store-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 0 0 1rem;
}

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 10.8rem;
  padding: 0.65rem 0.9rem;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 0.7rem;
  background: rgba(2, 6, 23, 0.72);
  color: var(--text);
  text-align: left;
  cursor: not-allowed;
  opacity: 0.92;
}

.store-badge:disabled {
  opacity: 0.92;
}

.store-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.65rem;
  height: 1.65rem;
  flex: 0 0 1.65rem;
  color: #fff;
  font-size: 1.55rem;
  line-height: 1;
}

.store-icon-play {
  width: 0;
  height: 0;
  flex-basis: 0;
  margin-left: 0.15rem;
  border-top: 0.58rem solid transparent;
  border-bottom: 0.58rem solid transparent;
  border-left: 0.95rem solid var(--blue-bright);
}

.store-badge-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.store-badge-kicker {
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.store-badge strong {
  margin-top: 0.15rem;
  font-size: 1rem;
  font-weight: 750;
}

.app-note {
  max-width: 42rem;
  margin: 0 0 1rem;
  color: var(--muted-2);
  font-size: 0.8rem;
}

@media (min-width: 720px) {
  .app-section {
    padding: 3rem;
  }
}

/* Sections */
section {
  padding: 3rem 0;
}

.section-label {
  display: inline-block;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-bright);
}

section h2 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 1.75rem;
  max-width: 40rem;
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
}

.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.125rem;
  font-weight: 700;
}

.card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* Patient benefits */
.benefit-grid {
  display: grid;
  gap: 1.25rem;
  grid-template-columns: 1fr;
}

@media (min-width: 720px) {
  .benefit-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.ai-disclaimer {
  margin: 1.5rem 0 0;
  max-width: 40rem;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--muted-2);
}

/* How-it-works steps */
.steps {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
  counter-reset: step;
}

@media (min-width: 640px) {
  .steps.steps-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

.step {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}

.step::before {
  counter-increment: step;
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.75rem;
  height: 1.75rem;
  margin-bottom: 0.75rem;
  border-radius: 0.5rem;
  background: var(--blue);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 800;
}

.step h3 {
  margin: 0 0 0.4rem;
  font-size: 1rem;
}

.step p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--muted);
}

/* Trust */
.trust-block {
  max-width: 40rem;
}

.trust-list {
  margin: 0;
  padding-left: 1.15rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.trust-list li + li {
  margin-top: 0.5rem;
}

.pharmacist-aside {
  margin: 1.5rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px dashed var(--border);
  background: rgba(15, 23, 42, 0.45);
  color: var(--muted-2);
  font-size: 0.8125rem;
  max-width: 36rem;
}

/* FAQ (kept for privacy/terms adjacent pages if reused) */
.faq-list {
  display: grid;
  gap: 0.65rem;
  max-width: 44rem;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  padding: 0.15rem 1rem;
}

.faq-item summary {
  cursor: pointer;
  padding: 0.9rem 0;
  font-weight: 650;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  float: right;
  color: var(--blue-bright);
  font-weight: 700;
}

.faq-item[open] summary::after {
  content: "–";
}

.faq-item p {
  margin: 0 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

/* Address / footer */
.address-block {
  text-align: center;
  padding: 2.5rem 0 1rem;
}

.address-block p {
  margin: 0.35rem 0;
  color: var(--muted);
  font-size: 0.875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.address-block .domain {
  color: var(--blue-bright);
  font-weight: 700;
}

/* Waitlist */
.waitlist {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.25rem);
  padding: 2rem 1.5rem;
  text-align: center;
}

.waitlist-lead {
  margin-left: auto;
  margin-right: auto;
}

.waitlist-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0.25rem auto 0;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: var(--amber);
  font-size: 0.75rem;
  font-weight: 600;
}

.waitlist-status-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
}

.waitlist form,
.waitlist-form {
  margin: 1.5rem auto 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.65rem;
  max-width: 28rem;
}

.waitlist input[type="email"],
.waitlist-form input[type="email"] {
  flex: 1 1 14rem;
  min-width: 0;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
}

.waitlist input:disabled,
.waitlist-form input:disabled,
.waitlist-form.is-disabled input {
  opacity: 0.65;
  cursor: not-allowed;
}

.waitlist input::placeholder {
  color: var(--muted-2);
}

.waitlist input:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.waitlist .hint {
  margin-top: 0.85rem;
  font-size: 0.75rem;
  color: var(--muted-2);
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 2rem;
  padding: 1.75rem 0 2.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--muted-2);
}

.footer-address {
  margin-bottom: 1rem;
}

.footer-address p {
  margin: 0.2rem 0;
}

.footer-address strong {
  color: var(--muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 0.8rem;
}

.footer-email span {
  color: var(--muted-2);
  font-weight: 400;
}

.site-footer nav {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem 1rem;
}

.site-footer a {
  color: var(--muted);
}

.footer-pharm-links {
  margin: 0.35rem 0 1rem;
  font-size: 0.75rem;
  color: var(--muted-2);
}

.footer-pharm-links a {
  color: var(--muted-2);
  font-weight: 500;
}

.footer-pharm-links a:hover {
  color: var(--muted);
}

.footer-copy {
  margin-top: 0.5rem;
}

/* Legal stubs */
.legal {
  padding: 2rem 0 4rem;
  max-width: 42rem;
}

.legal h1 {
  margin: 0 0 0.75rem;
  font-size: 2rem;
  font-weight: 800;
}

.legal h2 {
  margin: 1.75rem 0 0.5rem;
  font-size: 1.15rem;
}

.legal p,
.legal li {
  color: var(--muted);
  font-size: 0.95rem;
}

.legal ul {
  padding-left: 1.2rem;
}

.legal .back {
  display: inline-block;
  margin-bottom: 1.25rem;
  font-size: 0.875rem;
  color: var(--blue-bright);
}

.draft-banner {
  margin: 1rem 0 1.5rem;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  color: #fbbf24;
  font-size: 0.8125rem;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Auth / capture pages (pharmacist side doors) */
.auth-page {
  padding: 1.5rem 0 4rem;
  max-width: 32rem;
}

.auth-page.auth-wide {
  max-width: 40rem;
}

.auth-page h1 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.6rem, 3vw, 2rem);
  font-weight: 800;
}

.auth-lead {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.preview-banner {
  margin: 0 0 1.25rem;
  padding: 0.75rem 1rem;
  border-radius: 0.65rem;
  background: rgba(37, 99, 235, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.35);
  color: #93c5fd;
  font-size: 0.8125rem;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 0.15rem);
  padding: 1.5rem;
}

.form-grid {
  display: grid;
  gap: 1rem;
}

.form-grid-2 {
  display: grid;
  gap: 1rem;
  grid-template-columns: 1fr;
}

@media (min-width: 560px) {
  .form-grid-2 {
    grid-template-columns: 1fr 1fr;
  }
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.field .optional {
  font-weight: 500;
  color: var(--muted-2);
}

.field input,
.field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-size: 0.95rem;
}

.field input:focus,
.field select:focus {
  outline: 2px solid var(--blue);
  outline-offset: 1px;
}

.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.7rem;
  color: var(--muted-2);
}

.check-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  padding: 0.85rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.5);
}

.check-row input[type="checkbox"] {
  margin-top: 0.2rem;
  width: 1.05rem;
  height: 1.05rem;
  accent-color: var(--blue);
  flex-shrink: 0;
}

.check-row label {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.check-row a {
  color: var(--blue-bright);
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

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

.auth-compliance {
  margin-top: 1.25rem;
  font-size: 0.75rem;
  color: var(--muted-2);
}

.thank-you {
  display: none;
  text-align: center;
  padding: 1.5rem 0.5rem;
}

.thank-you.is-visible {
  display: block;
}

.thank-you h2 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
}

.thank-you p {
  margin: 0.5rem auto;
  max-width: 28rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.auth-form.is-hidden {
  display: none;
}

.login-demo-note {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 0.65rem;
  border: 1px dashed var(--border);
  font-size: 0.8rem;
  color: var(--muted-2);
  text-align: left;
}

.public-site-note {
  margin: 0 0 1.25rem;
  padding: 0.55rem 0.9rem;
  border-radius: 0.55rem;
  border: 1px dashed var(--border);
  background: rgba(15, 23, 42, 0.45);
  color: var(--muted-2);
  font-size: 0.8rem;
}

.public-site-note a {
  color: var(--blue-bright);
  font-weight: 600;
}
