/* Public home landing — modern mesh background */
.landing-page {
  --landing-primary: #3b82f6;
  --landing-primary-hover: #2563eb;
  --landing-headline: #0f172a;
  --landing-muted: #64748b;
  --landing-border: rgba(15, 23, 42, 0.1);
  --landing-card: rgba(255, 255, 255, 0.78);
  position: relative;
  overflow-x: hidden;
  overflow-y: visible;
  height: auto;
  isolation: isolate;
  max-width: 100vw;
  background-color: #f0f4ff;
  background-image:
    radial-gradient(ellipse 120% 80% at 50% -30%, rgba(191, 219, 254, 0.9), transparent 50%),
    radial-gradient(ellipse 70% 50% at 100% 0%, rgba(186, 230, 253, 0.55), transparent 45%),
    radial-gradient(ellipse 60% 45% at 0% 30%, rgba(221, 214, 254, 0.5), transparent 45%),
    radial-gradient(ellipse 50% 40% at 80% 85%, rgba(167, 243, 208, 0.35), transparent 50%),
    linear-gradient(165deg, #f8fafc 0%, #eef2ff 38%, #f0fdfa 100%);
}

/* Dot grid + subtle noise */
.landing-page::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.55;
  background-image:
    radial-gradient(rgba(59, 130, 246, 0.14) 1px, transparent 1px),
    radial-gradient(rgba(148, 163, 184, 0.08) 1px, transparent 1px);
  background-size: 32px 32px, 64px 64px;
  background-position: 0 0, 16px 16px;
  mask-image: radial-gradient(ellipse 90% 75% at 50% 35%, black 15%, transparent 72%);
  -webkit-mask-image: radial-gradient(ellipse 90% 75% at 50% 35%, black 15%, transparent 72%);
}

/* Aurora beam across hero */
.landing-page::after {
  content: "";
  position: fixed;
  inset: -20% -10%;
  pointer-events: none;
  z-index: 0;
  background:
    conic-gradient(
      from 210deg at 50% 40%,
      transparent 0deg,
      rgba(59, 130, 246, 0.07) 55deg,
      rgba(139, 92, 246, 0.09) 110deg,
      rgba(45, 212, 191, 0.07) 165deg,
      transparent 220deg
    );
  filter: blur(48px);
  opacity: 0.85;
  animation: landing-aurora 18s ease-in-out infinite alternate;
}

.landing-page > * {
  position: relative;
  z-index: 1;
}

/* Floating mesh orbs */
.landing-bg-layer {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.landing-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(72px);
  will-change: transform;
}

.landing-blob-1 {
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  top: -12%;
  left: 18%;
  background: radial-gradient(circle, rgba(59, 130, 246, 0.55) 0%, rgba(59, 130, 246, 0) 68%);
  animation: landing-drift-1 22s ease-in-out infinite;
}

.landing-blob-2 {
  width: min(440px, 60vw);
  height: min(440px, 60vw);
  top: 8%;
  right: -8%;
  background: radial-gradient(circle, rgba(139, 92, 246, 0.4) 0%, rgba(139, 92, 246, 0) 70%);
  animation: landing-drift-2 26s ease-in-out infinite;
}

.landing-blob-3 {
  width: min(400px, 55vw);
  height: min(400px, 55vw);
  bottom: 5%;
  left: -6%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.42) 0%, rgba(45, 212, 191, 0) 70%);
  animation: landing-drift-3 24s ease-in-out infinite;
}

.landing-blob-4 {
  width: min(360px, 50vw);
  height: min(360px, 50vw);
  bottom: 18%;
  right: 12%;
  background: radial-gradient(circle, rgba(244, 114, 182, 0.28) 0%, rgba(244, 114, 182, 0) 72%);
  animation: landing-drift-4 20s ease-in-out infinite;
}

.landing-spark {
  position: absolute;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 0 12px 2px rgba(59, 130, 246, 0.45);
}

.landing-spark-1 {
  top: 22%;
  left: 28%;
  animation: landing-sparkle 4s ease-in-out infinite;
}

.landing-spark-2 {
  top: 38%;
  right: 22%;
  animation: landing-sparkle 5.5s ease-in-out infinite 1.2s;
}

.landing-spark-3 {
  top: 58%;
  left: 62%;
  animation: landing-sparkle 6s ease-in-out infinite 0.6s;
}

@keyframes landing-aurora {
  0% {
    transform: translate3d(-2%, -1%, 0) rotate(0deg);
    opacity: 0.7;
  }
  100% {
    transform: translate3d(2%, 2%, 0) rotate(8deg);
    opacity: 1;
  }
}

@keyframes landing-drift-1 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(36px, 28px) scale(1.08); }
}

@keyframes landing-drift-2 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-40px, 32px) scale(1.06); }
}

@keyframes landing-drift-3 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(28px, -24px) scale(1.05); }
}

@keyframes landing-drift-4 {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-24px, -30px) scale(1.07); }
}

@keyframes landing-sparkle {
  0%, 100% { opacity: 0.25; transform: scale(0.85); }
  50% { opacity: 1; transform: scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
  .landing-page::after,
  .landing-blob,
  .landing-spark,
  .landing-hero-decor::before,
  .landing-hero-decor::after {
    animation: none !important;
  }
}

.landing-page .app-public-header,
.landing-page .landing-public-header {
  background: transparent;
  border-bottom: none;
  padding: 1.25rem 1.5rem;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

.landing-page .app-brand {
  color: var(--landing-headline);
  font-size: 1.25rem;
  font-weight: 700;
  gap: 0.6rem;
}

.landing-page .app-brand i {
  width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0.5rem;
  background: var(--landing-primary);
  color: #fff;
  font-size: 1rem;
}

.landing-page .app-brand-authentik {
  gap: 0;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(220px, 48vw);
  overflow: hidden;
}

/* Logo from Content/images/authentik-logo.png — fixed boxes prevent huge intrinsic PNG size */
.authentik-logo-wrap {
  display: inline-block;
  line-height: 0;
  vertical-align: middle;
}

.authentik-logo-wrap .authentik-logo {
  display: block;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  object-position: left center;
}

.authentik-logo-wrap--header {
  width: min(200px, 42vw);
  height: 2.75rem;
}

.authentik-logo-wrap--sm {
  width: min(180px, 40vw);
  height: 2.5rem;
}

.authentik-logo-wrap--sidebar {
  width: 100%;
  height: 52px;
}

.authentik-logo-wrap--auth {
  width: 240px;
  max-width: 100%;
  height: 52px;
}

.authentik-logo-wrap--md {
  width: min(280px, 72vw);
  height: 4.5rem;
}

.authentik-logo-wrap--lg {
  display: block;
  width: min(440px, 92vw);
  height: 6.75rem;
  margin: 0 auto;
}

.authentik-logo-wrap--lg .authentik-logo {
  object-position: center center;
}

.landing-page .app-brand:hover {
  color: var(--landing-headline);
  opacity: 0.9;
}

.landing-page .landing-nav-actions {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-shrink: 0;
}

.landing-page a.landing-nav-link,
.landing-page a.landing-nav-link:visited {
  color: #64748b;
  color: var(--landing-muted, #64748b);
  font-weight: 500;
  font-size: 0.9375rem;
  text-decoration: none !important;
  padding: 0.35rem 0.5rem;
  transition: color 0.15s;
}

.landing-page a.landing-nav-link:hover,
.landing-page a.landing-nav-link:focus {
  color: #0f172a;
  color: var(--landing-headline, #0f172a);
}

.landing-page .app-content {
  padding: 0;
  flex: 1 0 auto;
  min-height: auto;
  overflow: visible;
  display: flex;
  flex-direction: column;
}

.landing-page footer {
  background: transparent;
  border: none;
  color: #94a3b8;
  padding: 2rem 1rem 2.5rem;
}

/* Hero */
.landing-hero-wrap {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 2.5rem;
  min-height: auto;
  z-index: 1;
}

.landing-hero-decor {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

.landing-hero-decor::before,
.landing-hero-decor::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(59, 130, 246, 0.12);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 0 80px rgba(59, 130, 246, 0.06);
}

.landing-hero-decor::before {
  width: min(760px, 98vw);
  height: min(760px, 98vw);
  animation: landing-ring-pulse 14s ease-in-out infinite;
}

.landing-hero-decor::after {
  width: min(540px, 78vw);
  height: min(540px, 78vw);
  border-color: rgba(139, 92, 246, 0.14);
  animation: landing-ring-pulse 14s ease-in-out infinite reverse;
}

@keyframes landing-ring-pulse {
  0%, 100% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 0.85;
  }
  50% {
    transform: translate(-50%, -50%) scale(1.03);
    opacity: 1;
  }
}

.landing-hero {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 820px;
  margin: 0 auto;
}

.landing-hero-icon {
  width: 3.25rem;
  height: 3.25rem;
  margin: 0 auto 1.5rem;
  border-radius: 0.75rem;
  background: linear-gradient(135deg, #3b82f6, #60a5fa);
  background: linear-gradient(135deg, var(--landing-primary, #3b82f6), #60a5fa);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 8px 24px rgba(59, 130, 246, 0.25);
}

.landing-page .app-brand-authentik .authentik-logo-wrap,
.landing-hero-brand .authentik-logo-wrap {
  filter: drop-shadow(0 2px 8px rgba(15, 23, 42, 0.06));
}

.landing-hero-brand {
  margin-bottom: 2rem;
  width: 100%;
  text-align: center;
  overflow: hidden;
}

.landing-hero-brand .authentik-logo-wrap--lg .authentik-logo {
  object-position: center center;
}

.landing-hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.03em;
  margin-bottom: 1.25rem;
}

.landing-headline-dark {
  color: var(--landing-headline);
  display: block;
}

.landing-headline-accent {
  color: #3b82f6;
  color: var(--landing-primary, #3b82f6);
  display: block;
}

.landing-hero .lead {
  font-size: clamp(1rem, 2vw, 1.125rem);
  line-height: 1.65;
  color: var(--landing-muted);
  max-width: 36rem;
  margin: 0 auto 2rem;
  font-weight: 400;
}

.landing-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
}

a.landing-btn,
button.landing-btn,
input.landing-btn,
a.landing-btn:hover,
button.landing-btn:hover,
input.landing-btn:hover,
a.landing-btn:focus,
button.landing-btn:focus,
input.landing-btn:focus,
a.landing-btn:visited,
button.landing-btn:visited,
input.landing-btn:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 0.5rem;
  text-decoration: none !important;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, box-shadow 0.15s, color 0.15s, transform 0.15s;
  border: 1px solid transparent;
  line-height: 1.25;
}

a.landing-btn-primary,
button.landing-btn-primary,
input.landing-btn-primary,
a.landing-btn-primary:hover,
button.landing-btn-primary:hover,
input.landing-btn-primary:hover,
a.landing-btn-primary:focus,
button.landing-btn-primary:focus,
input.landing-btn-primary:focus,
a.landing-btn-primary:visited,
button.landing-btn-primary:visited,
input.landing-btn-primary:visited {
  background: #3b82f6;
  background: var(--landing-primary, #3b82f6);
  color: #fff !important;
  border-color: #3b82f6;
  border-color: var(--landing-primary, #3b82f6);
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

a.landing-btn-primary:hover,
button.landing-btn-primary:hover,
input.landing-btn-primary:hover {
  background: #2563eb;
  background: var(--landing-primary-hover, #2563eb);
  border-color: #2563eb;
  border-color: var(--landing-primary-hover, #2563eb);
  color: #fff !important;
  box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
  transform: translateY(-1px);
}

a.landing-btn-outline,
button.landing-btn-outline,
input.landing-btn-outline,
a.landing-btn-outline:hover,
button.landing-btn-outline:hover,
input.landing-btn-outline:hover,
a.landing-btn-outline:focus,
button.landing-btn-outline:focus,
input.landing-btn-outline:focus,
a.landing-btn-outline:visited,
button.landing-btn-outline:visited,
input.landing-btn-outline:visited {
  background: #fff;
  color: #0f172a !important;
  color: var(--landing-headline, #0f172a) !important;
  border-color: rgba(15, 23, 42, 0.1);
  border-color: var(--landing-border, rgba(15, 23, 42, 0.1));
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
}

a.landing-btn-outline:hover,
button.landing-btn-outline:hover,
input.landing-btn-outline:hover {
  background: #f8fafc;
  color: #0f172a !important;
  border-color: rgba(15, 23, 42, 0.18);
}

input.landing-btn-primary,
button.landing-btn-primary {
  width: 100%;
}

.landing-header-btn {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
  border-radius: 0.5rem;
}

/* Feature cards */
.landing-features {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem 3rem;
  width: 100%;
}

.landing-feature-card {
  height: 100%;
  background: var(--landing-card);
  backdrop-filter: blur(16px) saturate(1.2);
  -webkit-backdrop-filter: blur(16px) saturate(1.2);
  border: 1px solid rgba(255, 255, 255, 0.85);
  border-radius: 0.875rem;
  padding: 1.25rem 1.35rem;
  box-shadow:
    0 4px 24px rgba(15, 23, 42, 0.06),
    0 0 0 1px rgba(59, 130, 246, 0.04) inset;
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.landing-feature-card:hover {
  box-shadow: 0 8px 32px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.landing-feature-card h2 {
  font-family: var(--font-display);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--landing-headline);
  margin-bottom: 0.35rem;
}

.landing-feature-card h2 i {
  color: var(--landing-primary);
}

.landing-feature-card p {
  font-size: 0.875rem;
  color: var(--landing-muted);
  margin: 0;
  line-height: 1.5;
}

/* Pricing / plans on landing */
.landing-plans {
  position: relative;
  z-index: 1;
  max-width: 1320px;
  margin: 0 auto;
  padding: 1rem 1.5rem 3.5rem;
  width: 100%;
}

.landing-plans-header {
  text-align: center;
  margin-bottom: 2rem;
}

.landing-plans-header h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--landing-headline);
  letter-spacing: -0.03em;
  margin-bottom: 0.5rem;
}

.landing-plans-header .lead {
  color: var(--landing-muted);
  font-size: 1.0625rem;
  max-width: 36rem;
  margin: 0 auto;
}

.landing-plans-empty {
  text-align: center;
  color: var(--landing-muted);
  padding: 2rem;
  background: var(--landing-card);
  border-radius: 0.875rem;
  border: 1px dashed rgba(15, 23, 42, 0.12);
}

/* Tab switcher — Individual / Organization */
.landing-plans-tabs-root {
  width: 100%;
  position: relative;
  z-index: 2;
}

.landing-plans-tabs {
  display: flex;
  justify-content: center;
  gap: 0.35rem;
  padding: 0.4rem;
  margin: 0 auto 2rem;
  width: fit-content;
  max-width: 100%;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 999px;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  position: relative;
  z-index: 3;
  pointer-events: auto;
}

.landing-plans-tab {
  border: none;
  background: transparent;
  padding: 0.7rem 1.75rem;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--landing-muted);
  cursor: pointer;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}

.landing-plans-tab:hover:not(:disabled):not(.is-active) {
  color: var(--landing-headline);
  background: rgba(59, 130, 246, 0.08);
}

.landing-plans-tab.is-active {
  background: var(--landing-primary);
  color: #fff;
  box-shadow: 0 4px 14px rgba(59, 130, 246, 0.35);
}

.landing-plans-tab:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.landing-plans-panel {
  display: none !important;
}

.landing-plans-panel.is-active {
  display: block !important;
  animation: landing-tab-fade 0.25s ease;
}

@keyframes landing-tab-fade {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Packages in a single horizontal row — grid keeps equal card heights */
.landing-plan-cards-row {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(220px, 1fr);
  grid-template-rows: 1fr;
  align-items: stretch;
  gap: 1rem;
  overflow-x: auto;
  padding: 0.25rem 0.25rem 0.75rem;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.landing-plan-cards-row .landing-plan-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  min-width: 220px;
  scroll-snap-align: start;
}

.landing-plan-card {
  background: #fff;
  border: 1px solid #e8eef5;
  border-radius: 1rem;
  padding: 1.35rem 1.25rem;
  box-shadow: 0 4px 24px rgba(15, 23, 42, 0.06);
  transition: box-shadow 0.2s, transform 0.2s, border-color 0.2s;
}

.landing-plan-card:hover {
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.12);
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.25);
}

.landing-plan-card-featured {
  border-color: rgba(59, 130, 246, 0.45);
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.15);
}

.landing-plan-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
  min-height: 1.75rem;
  flex-shrink: 0;
}

.landing-plan-card-type {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--landing-muted);
}

.landing-plan-card-badge {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--landing-primary);
  background: rgba(59, 130, 246, 0.1);
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
}

.landing-plan-card-title {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--landing-headline);
  margin-bottom: 0.35rem;
  flex-shrink: 0;
}

.landing-plan-card-desc {
  color: var(--landing-muted);
  font-size: 0.9rem;
  margin-bottom: 1rem;
  flex-shrink: 0;
  min-height: 2.6rem;
}

.landing-plan-price {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--landing-primary);
  margin-bottom: 0.85rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.landing-plan-features {
  list-style: none;
  padding: 0;
  margin: 0 0 1rem;
  flex: 1 1 auto;
  min-height: 0;
}

.landing-plan-features li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: #334155;
  margin-bottom: 0.5rem;
}

.landing-plan-features li i {
  color: var(--landing-primary);
  margin-top: 0.15rem;
  flex-shrink: 0;
}

.landing-plan-card-actions {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: auto;
  flex-shrink: 0;
  padding-top: 0.25rem;
}

.landing-plan-card-actions .landing-btn-primary {
  width: 100%;
}

.landing-plan-signin-link {
  text-align: center;
  font-size: 0.875rem;
  color: var(--landing-muted);
  font-weight: 500;
  text-decoration: none;
}

.landing-plan-signin-link:hover {
  color: var(--landing-primary);
  text-decoration: underline;
}

@media (min-width: 1200px) {
  .landing-plan-cards-row {
    overflow-x: visible;
    gap: 1.15rem;
    grid-auto-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767.98px) {
  .landing-hero-wrap {
    padding-top: 1rem;
  }

  .landing-page .app-public-header {
    padding: 1rem;
  }

  .landing-page .app-brand-authentik {
    max-width: min(160px, 52vw);
  }

  .authentik-logo-wrap--header {
    width: min(160px, 52vw);
    height: 2.25rem;
  }

  .authentik-logo-wrap--sm {
    height: 2rem;
  }

  .authentik-logo-wrap--lg {
    width: min(360px, 94vw);
    height: 5.5rem;
  }
}
