/* marketing styles split from app/static/styles.css. */

.marketing-toast-stack {
  position: fixed;
  top: 28px;
  left: 50%;
  z-index: 160;
  display: grid;
  gap: 10px;
  width: min(440px, calc(100% - 28px));
  transform: translateX(-50%);
  pointer-events: none;
}

.marketing-toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 52px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid #e5e7eb;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 10px 28px rgba(15, 23, 42, 0.12),
    0 2px 8px rgba(15, 23, 42, 0.08);
  color: #1f2937;
  opacity: 0;
  transform: translateY(-10px) scale(0.98);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
  pointer-events: auto;
  backdrop-filter: blur(10px);
}

.marketing-toast::before {
  content: "";
  width: 20px;
  height: 20px;
  border-radius: 999px;
  flex: 0 0 auto;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 12px 12px;
}

.marketing-toast.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.marketing-toast.is-leaving {
  opacity: 0;
  transform: translateY(-10px) scale(0.97);
}

.marketing-toast-success {
  border-color: #d1fae5;
  background: rgba(240, 253, 244, 0.97);
}

.marketing-toast-success::before {
  background-color: #10b981;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M6.5 11.2 3.8 8.5l-1 1 3.7 3.7L13.2 6.5l-1-1z'/%3E%3C/svg%3E");
}

.marketing-toast-error {
  border-color: #fee2e2;
  background: rgba(254, 242, 242, 0.97);
}

.marketing-toast-error::before {
  background-color: #ef4444;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='white' d='M8 3a.9.9 0 0 1 .9.9v4.3a.9.9 0 1 1-1.8 0V3.9A.9.9 0 0 1 8 3m0 9.9a1.05 1.05 0 1 1 0-2.1 1.05 1.05 0 0 1 0 2.1'/%3E%3C/svg%3E");
}

.marketing-toast-content {
  font-size: 14px;
  line-height: 1.45;
  font-weight: 600;
}

.marketing-toast-close {
  width: 24px;
  height: 24px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #9ca3af;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.marketing-toast-close:hover {
  background: rgba(15, 23, 42, 0.06);
  color: #4b5563;
}

.marketing-body {
  min-height: 100vh;
  overflow: auto;
  background: #080906;
  color: #f8fafc;
}

.marketing-body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(8, 9, 6, 0.52) 0%, rgba(8, 9, 6, 0.8) 48%, #080906 100%),
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.18), transparent 34%),
    url("/static/backImg.png") center top / cover no-repeat,
    #080906;
}

.marketing-shell {
  width: min(1500px, calc(100% - 64px));
  margin: 0 auto;
  padding: 26px 0 72px;
}

.marketing-nav {
  min-height: 52px;
  display: grid;
  grid-template-columns: minmax(160px, 1fr) auto minmax(160px, 1fr);
  align-items: center;
  gap: 28px;
  animation: marketing-rise 520ms ease both;
}

.marketing-brand img {
  width: 156px;
  filter: brightness(0) invert(1);
}

.marketing-nav nav {
  display: flex;
  align-items: center;
  gap: 52px;
}

.marketing-nav a {
  color: rgba(255, 255, 255, 0.76);
  font-weight: 800;
  text-decoration: none;
}

.marketing-nav a:hover {
  color: #fff;
}

.marketing-nav-button,
.marketing-primary-button {
  border: 0;
  border-radius: 999px;
  background: #f8f7f0;
  color: #11120d;
  font-weight: 900;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.marketing-nav-button:hover,
.marketing-primary-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px rgba(248, 247, 240, 0.18);
  background: #fff;
}

.marketing-nav-button {
  justify-self: end;
  min-height: 44px;
  padding: 0 24px;
}

.marketing-hero {
  min-height: 880px;
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 70px;
  padding: 92px 0 0;
  text-align: center;
}

.marketing-hero-copy {
  width: min(780px, 100%);
  display: grid;
  justify-items: center;
  gap: 22px;
  animation: marketing-rise 680ms 80ms ease both;
}

.marketing-kicker {
  margin: 0;
  color: #9db7ff;
  font-size: 15px;
  font-weight: 900;
  letter-spacing: 0;
}

.marketing-hero h1 {
  margin: 0;
  color: #f8f7f0;
  font-family: Georgia, "Times New Roman", "Microsoft YaHei", serif;
  font-size: 72px;
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: 0;
}

.marketing-subtitle {
  width: min(660px, 100%);
  margin: 0;
  color: rgba(255, 255, 255, 0.68);
  font-size: 17px;
  line-height: 1.8;
}

.marketing-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 10px;
}

.marketing-primary-button {
  min-height: 56px;
  padding: 0 38px;
  font-size: 17px;
}

.marketing-secondary-link {
  color: rgba(255, 255, 255, 0.78);
  font-weight: 900;
  text-decoration: none;
  transition: color 160ms ease;
}

.marketing-secondary-link:hover {
  color: #fff;
}

.marketing-preview {
  width: min(1380px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 370px;
  overflow: hidden;
  border-radius: 18px;
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.88), rgba(235, 235, 229, 0.78)),
    #f3f1ec;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.28);
  text-align: left;
  animation: marketing-rise 760ms 180ms ease both;
  transition:
    transform 260ms ease,
    box-shadow 260ms ease;
}

.marketing-preview:hover {
  transform: translateY(-4px);
  box-shadow: 0 38px 105px rgba(0, 0, 0, 0.36);
}

.preview-canvas {
  min-height: 390px;
  border-radius: 12px 0 0 12px;
  padding: 24px;
  background: #171713;
  color: #f8fafc;
}

.preview-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 13px;
}

.preview-toolbar span {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #f8f7f0;
}

.preview-grid {
  min-height: 315px;
  display: grid;
  grid-template-columns: 1fr 1.25fr 1fr;
  align-items: end;
  gap: 34px;
  padding: 38px 26px 0;
}

.preview-card {
  min-height: 150px;
  border-radius: 4px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(200, 205, 212, 0.78)),
    #e5e7eb;
  animation: marketing-float 5.8s ease-in-out infinite;
}

.preview-card.tall {
  min-height: 210px;
  animation-delay: -1.2s;
}

.preview-card.featured {
  min-height: 280px;
  display: grid;
  place-items: center;
  outline: 2px solid #60a5fa;
  background:
    linear-gradient(160deg, #f9fafb 0%, #bfc6cf 50%, #111827 100%);
  animation-delay: -2.4s;
}

.preview-card.featured span {
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  font-weight: 900;
}

.preview-side-panel {
  min-height: 390px;
  display: grid;
  align-content: center;
  gap: 22px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 0 12px 12px 0;
  padding: 34px;
  background: #22211d;
  color: rgba(255, 255, 255, 0.72);
}

.preview-side-panel small {
  color: rgba(255, 255, 255, 0.46);
}

.preview-side-panel p {
  margin: 0;
  line-height: 1.7;
}

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

.preview-side-panel li::before {
  content: "·";
  margin-right: 10px;
}

.marketing-feature-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-top: 96px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 28px;
  padding: 42px;
  background:
    radial-gradient(circle at 50% 0%, rgba(157, 183, 255, 0.14), transparent 46%),
    rgba(255, 255, 255, 0.04);
  box-shadow: 0 28px 90px rgba(0, 0, 0, 0.34);
  animation: marketing-rise 620ms 220ms ease both;
}

.marketing-feature-strip article {
  display: grid;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  padding: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.06));
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.18);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    background 220ms ease;
}

.marketing-feature-strip article:hover {
  transform: translateY(-5px);
  border-color: rgba(157, 183, 255, 0.42);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.08));
}

.marketing-feature-strip strong {
  color: #f8fafc;
  font-size: 18px;
}

.marketing-feature-strip span {
  color: rgba(226, 232, 240, 0.78);
  line-height: 1.7;
}

.marketing-credit-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border: 1px solid rgba(157, 183, 255, 0.24);
  border-radius: 18px;
  margin-top: 18px;
  padding: 20px 24px;
  background: rgba(157, 183, 255, 0.1);
  color: #f8fafc;
  animation: marketing-rise 620ms 280ms ease both;
}

.marketing-credit-note strong {
  white-space: nowrap;
  font-size: 18px;
}

.marketing-credit-note span {
  color: rgba(226, 232, 240, 0.76);
  line-height: 1.6;
}

.marketing-workflow {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 84px 0 26px;
  color: rgba(226, 232, 240, 0.78);
  animation: marketing-rise 620ms 340ms ease both;
}

.marketing-workflow h2 {
  margin: 8px 0 0;
  color: #f8fafc;
  font-size: 36px;
}

.workflow-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.workflow-steps span {
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 10px 15px;
  background: rgba(255, 255, 255, 0.08);
  color: #f8fafc;
  font-weight: 800;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.16);
  transition:
    transform 180ms ease,
    background 180ms ease,
    border-color 180ms ease;
}

.workflow-steps span:hover {
  transform: translateY(-2px);
  border-color: rgba(157, 183, 255, 0.38);
  background: rgba(255, 255, 255, 0.14);
}

@keyframes marketing-rise {
  from {
    opacity: 0;
    transform: translateY(18px);
    filter: blur(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes marketing-float {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-8px);
  }
}

.marketing-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 24px;
  background: rgba(10, 12, 16, 0.24);
  backdrop-filter: blur(10px) saturate(1.08);
  -webkit-backdrop-filter: blur(10px) saturate(1.08);
}

.login-modal-open .marketing-login-overlay {
  display: grid;
  animation: glass-surface-in 180ms ease both;
}

.marketing-login-dialog {
  position: relative;
  width: min(420px, 100%);
  display: grid;
  gap: 16px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 30px;
  padding: 42px 42px 34px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.76));
  backdrop-filter: blur(24px) saturate(1.16);
  -webkit-backdrop-filter: blur(24px) saturate(1.16);
  color: #111827;
  box-shadow:
    0 30px 88px rgba(0, 0, 0, 0.2),
    0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.marketing-login-dialog::before {
  content: "";
  position: absolute;
  inset: 1px;
  border-radius: 29px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.58), transparent 48%),
    radial-gradient(circle at 50% 0%, rgba(255, 255, 255, 0.78), transparent 40%);
  pointer-events: none;
}

.marketing-login-dialog > * {
  position: relative;
  z-index: 1;
}

.marketing-login-close {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 34px;
  height: 34px;
  border: 0;
  background: transparent;
  color: #6b7280;
  font-size: 30px;
  line-height: 1;
}

.login-dialog-brand {
  display: grid;
  place-items: center;
}

.login-dialog-brand img {
  width: 168px;
  height: auto;
  object-fit: contain;
}

.marketing-login-dialog h2 {
  margin: 28px 0 0;
  text-align: center;
  font-size: 34px;
  font-weight: 900;
  line-height: 1.15;
}

.marketing-login-dialog > p {
  margin: -6px 0 20px;
  color: #5f6673;
  text-align: center;
  font-size: 14px;
  font-weight: 700;
}

.login-form {
  display: grid;
  gap: 20px;
  margin-top: 0;
}

.marketing-auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.marketing-auth-tab {
  border: 1px solid #dbe3ef;
  border-radius: 999px;
  padding: 10px 14px;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.marketing-auth-tab:hover {
  border-color: #93b4f7;
  color: #172033;
  transform: translateY(-1px);
}

.marketing-auth-tab.is-active {
  border-color: #111827;
  background: #111827;
  color: #fff;
}

.marketing-auth-panels {
  display: grid;
}

.marketing-auth-panels [hidden] {
  display: none !important;
}

.auth-panel-head {
  display: grid;
  gap: 6px;
}

.auth-panel-title {
  margin: 0;
  color: #111827;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.1;
}

.auth-panel-subtitle {
  margin: 0;
  color: #667085;
  font-size: 14px;
  line-height: 1.6;
}

.login-form label {
  display: grid;
  gap: 6px;
  color: #111827;
  font-size: 13px;
  font-weight: 900;
}

.login-form label > input {
  height: 52px;
  border: 1px solid rgba(17, 24, 39, 0.07);
  border-radius: 999px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  font-size: 17px;
  font-weight: 800;
  outline: none;
  box-shadow: none;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease;
}

.login-form label > input:-webkit-autofill,
.login-form label > input:-webkit-autofill:hover,
.login-form label > input:-webkit-autofill:focus {
  -webkit-text-fill-color: #111827;
  box-shadow: 0 0 0 1000px rgba(255, 255, 255, 0.88) inset;
  caret-color: #111827;
}

.login-form label > input:focus {
  border-color: rgba(17, 24, 39, 0.22);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.06);
}

.login-code-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
}

.login-code-row input {
  width: 100%;
  min-width: 0;
  height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.86);
  color: #111827;
  font-size: 17px;
  font-weight: 800;
  outline: none;
  box-shadow: none;
  appearance: none;
  transition:
    background 160ms ease,
    box-shadow 160ms ease;
}

.login-code-row input:focus {
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 0 0 4px rgba(17, 24, 39, 0.06);
}

.login-code-button {
  min-width: 132px;
  height: 52px;
  border: 0;
  border-radius: 999px;
  padding: 0 18px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  font-weight: 900;
}

.login-code-button:disabled {
  cursor: not-allowed;
  background: #9ca3af;
}

.login-inline-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
}

.auth-inline-link,
.auth-footer-link {
  border: 0;
  padding: 0;
  background: transparent;
  color: #0f172a;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.auth-inline-link:hover,
.auth-footer-link:hover {
  color: #2563eb;
}

.login-form-hint {
  margin: -4px 0 0;
  color: #737985;
  font-size: 12px;
  line-height: 1.7;
  font-weight: 700;
}

.button-is-busy {
  cursor: wait !important;
  opacity: 0.72;
}

.auth-panel-footer {
  margin: 0;
  color: #737985;
  font-size: 13px;
  line-height: 1.6;
  text-align: center;
}

@media (max-width: 640px) {
  .marketing-auth-tabs {
      grid-template-columns: 1fr;
    }

  .login-code-row {
      grid-template-columns: 1fr;
    }

  .login-code-button {
      width: 100%;
    }
}

.login-form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: -4px;
  color: #737985;
  font-size: 12px;
  font-weight: 800;
}

.login-remember {
  display: inline-flex !important;
  grid-template-columns: none !important;
  align-items: center;
  gap: 7px !important;
  color: #4f5663 !important;
  font-size: 12px !important;
}

.login-remember input {
  width: 15px;
  height: 15px;
  border: 1px solid #b8b5af;
  border-radius: 4px;
  padding: 0;
  background: rgba(255, 255, 255, 0.72);
  accent-color: #111827;
}

.login-future-entry {
  border-top: 0;
  margin-top: 18px;
  color: #6b7280;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
}

.marketing-login-dialog .primary-button {
  min-height: 54px;
  border-radius: 999px;
  margin-top: 6px;
  background: #1b1b20;
  color: #fff;
  font-size: 15px;
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    background 180ms ease;
}

.marketing-login-dialog .primary-button:hover {
  transform: translateY(-1px);
  background: #09090b;
  box-shadow: 0 16px 34px rgba(17, 24, 39, 0.2);
}

@media (max-width: 900px) {
  .marketing-shell {
      width: min(100% - 28px, 760px);
      padding: 18px 0 52px;
    }

  .marketing-nav {
      grid-template-columns: 1fr auto;
    }

  .marketing-nav nav {
      display: none;
    }

  .marketing-brand img {
      width: 132px;
    }

  .marketing-hero {
      min-height: auto;
      gap: 42px;
      padding: 58px 0 0;
    }

  .marketing-hero h1 {
      font-size: 46px;
    }

  .marketing-preview {
      grid-template-columns: 1fr;
      padding: 18px;
    }

  .preview-canvas,
    .preview-side-panel {
      min-height: auto;
      border-radius: 12px;
    }

  .preview-grid {
      grid-template-columns: 1fr;
      min-height: auto;
      gap: 14px;
      padding: 24px 0 0;
    }

  .preview-card,
    .preview-card.tall,
    .preview-card.featured {
      min-height: 150px;
    }

  .marketing-feature-strip,
    .marketing-credit-note,
    .marketing-workflow {
      grid-template-columns: 1fr;
      display: grid;
    }

  .marketing-feature-strip {
      gap: 12px;
      margin-top: 52px;
      padding: 18px;
    }

  .marketing-credit-note,
    .marketing-workflow {
      gap: 14px;
    }

  .marketing-login-dialog {
      padding: 42px 22px 28px;
    }
}


@media (max-width: 900px) {
  .marketing-shell {
      width: min(100% - 24px, 760px);
    }

  .marketing-hero {
      gap: 30px;
      padding-top: 42px;
    }

  .marketing-hero h1 {
      font-size: clamp(36px, 10vw, 46px);
    }

  .marketing-preview {
      border-radius: 16px;
    }

  .marketing-login-overlay {
      align-items: start;
      overflow: auto;
      padding: 16px;
    }

  .marketing-login-dialog {
      max-height: calc(100dvh - 32px);
      overflow: auto;
    }
}

@media (max-width: 760px) {
  .marketing-nav {
      gap: 14px;
    }

  .marketing-subtitle {
      font-size: 15px;
    }

  .marketing-actions {
      gap: 12px;
    }

  .marketing-primary-button {
      min-height: 48px;
      padding: 0 26px;
      font-size: 15px;
    }
}

@media (max-width: 560px) {
  .marketing-shell {
      width: min(100% - 20px, 520px);
      padding-top: 16px;
    }

  .marketing-nav {
      grid-template-columns: 1fr auto;
    }

  .marketing-nav-button {
      min-height: 40px;
      padding: 0 16px;
    }

  .marketing-preview {
      padding: 12px;
    }

  .marketing-login-overlay {
      padding: 0;
    }

  .marketing-login-dialog {
      width: 100%;
      min-height: 100dvh;
      max-height: none;
      border-radius: 0;
      padding: 38px 18px 28px;
    }
}
