/* Public landing page — independent of the PWA gray shell */

.landing-body {
  --lp-navy: #0f172a;
  --lp-navy-mid: #1e293b;
  --lp-ink: #0f172a;
  --lp-muted: #475569;
  --lp-soft: #64748b;
  --lp-line: #e2e8f0;
  --lp-paper: #f8fafc;
  --lp-white: #ffffff;
  --lp-accent: #3b82f6;
  --lp-accent-hover: #2563eb;
  --lp-accent-soft: #eff6ff;
  --lp-content: 1240px;

  min-height: 100dvh;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--lp-paper);
  color: var(--lp-ink);
  overflow-x: hidden;
}

html:has(.landing-body),
html:has(.landing-body) body.landing-body {
  background: var(--lp-paper);
  overflow-x: hidden;
}

.landing-main {
  flex: 1;
  width: 100%;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Header + hero share one navy canvas — no separate white/light strip */
.landing-stage {
  background:
    radial-gradient(ellipse 70% 55% at 85% 18%, rgba(59, 130, 246, 0.16), transparent 62%),
    var(--lp-navy);
  color: #fff;
}

.landing-header {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  min-height: 4.5rem;
  padding: calc(14px + env(safe-area-inset-top, 0px)) calc(16px + env(safe-area-inset-right, 0px)) 14px
    calc(16px + env(safe-area-inset-left, 0px));
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: transparent;
}

.landing-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
  max-width: 100%;
  color: #f8fafc;
  text-decoration: none;
}

.landing-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  display: block;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.32);
}

.landing-mark-sm {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  box-shadow: none;
}

.landing-brand-name {
  font-size: 1.4375rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.landing-cta:hover {
  background: var(--lp-accent-hover);
}

.landing-hero {
  display: grid;
  gap: 20px;
  padding: 28px calc(16px + env(safe-area-inset-right, 0px)) 44px
    calc(16px + env(safe-area-inset-left, 0px));
  background: transparent;
  color: #fff;
}

.landing-hero-copy {
  max-width: 42rem;
  min-width: 0;
}

.landing-eyebrow {
  margin: 0 0 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
}

.landing-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(2.5rem, 9.5vw, 4.35rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 1.06;
}

.landing-support {
  margin: 0 0 22px;
  max-width: 38rem;
  font-size: 1.3125rem;
  color: #cbd5e1;
  line-height: 1.5;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.landing-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-height: 60px;
  padding: 16px 30px;
  border-radius: 10px;
  background: var(--lp-accent);
  color: #fff;
  font-weight: 600;
  font-size: 1.25rem;
  text-decoration: none;
  white-space: nowrap;
}

.landing-cta-secondary {
  background: transparent;
  border: 1px solid rgba(147, 197, 253, 0.55);
  color: #dbeafe;
}

.landing-cta-secondary:hover {
  background: rgba(59, 130, 246, 0.16);
}

.landing-text-link {
  display: inline-flex;
  margin-top: 10px;
  padding: 0;
  border: 0;
  background: none;
  color: #2563eb;
  font: inherit;
  cursor: pointer;
  text-decoration: underline;
}

.landing-hero-visual {
  min-width: 0;
}

.landing-preview {
  width: 100%;
  max-width: 36rem;
  margin: 0 auto;
  padding: 20px 20px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 16px;
  background: #111827;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

.landing-preview-chrome {
  display: flex;
  gap: 6px;
  margin-bottom: 16px;
}

.landing-preview-chrome span {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #334155;
}

.landing-preview-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 16px;
}

.landing-preview-kicker {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #64748b;
}

.landing-preview-head strong {
  font-size: 1.1875rem;
  font-weight: 600;
  color: #e2e8f0;
}

.landing-preview-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 14px;
}

.landing-preview-list li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) 108px;
  align-items: center;
  gap: 10px;
}

.landing-status {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.landing-status.is-transit {
  background: #3b82f6;
}

.landing-status.is-out {
  background: #f59e0b;
}

.landing-status.is-delivered {
  background: #22c55e;
}

.landing-preview-label {
  font-size: 1rem;
  color: #cbd5e1;
}

.landing-meter {
  height: 8px;
  border-radius: 99px;
  background: #1e293b;
  overflow: hidden;
}

.landing-meter i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #3b82f6;
}

.landing-meter .is-62 {
  width: 62%;
}

.landing-meter .is-84 {
  width: 84%;
}

.landing-meter .is-100 {
  width: 100%;
}

.landing-preview-route {
  display: block;
  width: 100%;
  height: auto;
  margin-top: 12px;
}

.landing-features {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  flex: 1;
  width: min(var(--lp-content), 100%);
  margin: 0 auto;
  padding: 36px calc(16px + env(safe-area-inset-right, 0px)) 40px
    calc(16px + env(safe-area-inset-left, 0px));
  align-content: start;
}

.landing-feature {
  padding: 28px 22px;
  border: 1px solid var(--lp-line);
  border-radius: 16px;
  background: var(--lp-white);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.landing-feature-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: 16px;
  border-radius: 12px;
  background: var(--lp-accent-soft);
  color: var(--lp-accent-hover);
}

.landing-feature-icon svg {
  width: 24px;
  height: 24px;
}

.landing-feature h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.landing-feature p {
  margin: 0;
  font-size: 1rem;
  color: var(--lp-muted);
  line-height: 1.55;
}

.landing-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 22px 16px calc(18px + env(safe-area-inset-bottom, 0px));
  color: var(--lp-soft);
  font-size: 0.875rem;
  font-weight: 500;
}

.landing-body.landing-modal-open {
  overflow: hidden;
}

.landing-login-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px 16px calc(20px + env(safe-area-inset-bottom, 0px));
  background: rgba(15, 23, 42, 0.62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

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

.landing-login-modal[hidden] {
  display: none !important;
}

.landing-login-panel {
  position: relative;
  width: min(420px, 100%);
  max-height: min(100%, calc(100dvh - 40px));
  overflow: auto;
  padding: 28px 22px 24px;
  border-radius: 16px;
  background: var(--lp-white);
  color: var(--lp-ink);
  box-shadow: 0 24px 48px rgba(15, 23, 42, 0.35);
}

.landing-login-panel .login-brand h2 {
  margin: 0 0 8px;
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.03em;
  color: var(--lp-navy);
}

.landing-login-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  min-width: 36px;
  min-height: 36px;
  padding: 0;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--lp-muted);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.landing-login-close:hover,
.landing-login-close:focus-visible {
  background: var(--lp-accent-soft);
  color: var(--lp-navy);
}

.landing-login-panel .login-form button[type="submit"] {
  background: var(--lp-accent);
  color: #fff;
}

.landing-login-panel .login-form button[type="submit"]:hover {
  background: var(--lp-accent-hover);
}

.landing-auth-page {
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
}

.landing-primary-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 12px;
  padding: 10px 14px;
  border: none;
  border-radius: 10px;
  background: var(--lp-accent);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-sizing: border-box;
}

.landing-primary-btn:hover,
.landing-primary-btn:focus-visible {
  background: var(--lp-accent-hover);
  color: #fff;
}

.signup-confirmation h2 {
  margin: 0 0 10px;
  font-size: 1.25rem;
  font-weight: 650;
  letter-spacing: -0.02em;
  color: var(--lp-navy);
}

.signup-confirmation p {
  margin: 0 0 10px;
  color: var(--lp-muted);
  line-height: 1.5;
}

#signup-confirmation-email {
  color: var(--lp-ink);
  font-weight: 650;
  word-break: break-all;
}

.verify-error-panel {
  margin-top: 8px;
}

@media (max-width: 639px) {
  .landing-cta-row {
    flex-direction: column;
    align-items: stretch;
  }

  .landing-cta {
    width: 100%;
  }
}

@media (max-width: 389px) {
  .landing-brand-name {
    font-size: 1.3125rem;
  }

  .landing-mark {
    width: 52px;
    height: 52px;
    border-radius: 13px;
  }

  .landing-hero h1 {
    font-size: clamp(2.2rem, 10.5vw, 2.75rem);
  }

  .landing-support {
    font-size: 1.1875rem;
  }
}

@media (min-width: 880px) {
  .landing-header {
    min-height: 5.25rem;
    padding: 16px max(40px, calc((100% - var(--lp-content)) / 2));
  }

  .landing-mark {
    width: 64px;
    height: 64px;
    border-radius: 16px;
  }

  .landing-brand {
    gap: 16px;
  }

  .landing-brand-name {
    font-size: 1.6875rem;
  }

  .landing-hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(380px, 1fr);
    align-items: center;
    gap: 44px;
    padding: 40px max(40px, calc((100% - var(--lp-content)) / 2)) 64px;
  }

  .landing-preview {
    max-width: 42rem;
    margin: 0 0 0 auto;
    padding: 24px 24px 14px;
  }

  .landing-features {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
    padding: 56px 40px 48px;
  }

  .landing-feature {
    padding: 32px 28px;
  }
}
