:root {
  --bg: #f7f8fc;
  --surface: #ffffff;
  --surface-alt: #eef0f7;
  --text: #0a1d44;
  --muted: #4a5568;
  --brand: #8a6fb1;
  --brand-dark: #0a1d44;
  --ring: rgba(138, 111, 177, 0.22);
  --border: #dce1ef;
  --logo-bg: #ffffff;
  --radius-lg: 20px;
  --radius-md: 14px;
  --shadow: 0 14px 34px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, var(--logo-bg), var(--bg));
  line-height: 1.55;
}

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

a:hover {
  color: var(--brand-dark);
}

.container {
  width: min(1100px, 92vw);
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  line-height: 0;
  background: var(--logo-bg);
  border-radius: 12px;
  padding: 4px 8px;
  border: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.brand:hover {
  border-color: var(--border);
  box-shadow: 0 4px 14px rgba(10, 29, 68, 0.06);
}

.brand-logo {
  display: block;
  height: 42px;
  width: auto;
  max-width: min(200px, 52vw);
  object-fit: contain;
}

.hero-brand {
  margin: 0 0 4px;
  line-height: 0;
  background: var(--logo-bg);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  width: fit-content;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.hero-logo {
  display: block;
  height: auto;
  width: min(280px, 78vw);
  max-height: 120px;
  object-fit: contain;
}

.footer-logo {
  display: inline-block;
  height: 22px;
  width: auto;
  vertical-align: middle;
  margin: 0 4px;
  object-fit: contain;
}

.footer-copy {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin: 0;
}

.site-nav {
  display: flex;
  gap: 22px;
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
}

.btn {
  border: none;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  padding: 11px 18px;
  font-weight: 600;
  font-size: 0.96rem;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn:hover {
  background: var(--brand-dark);
  transform: translateY(-1px);
}

.btn-small {
  padding: 8px 14px;
  font-size: 0.88rem;
}

.btn-secondary {
  background: #fff;
  border: 1px solid var(--border);
  color: var(--brand-dark);
}

input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 0.96rem;
  color: var(--text);
}

input:focus {
  outline: 2px solid var(--ring);
  border-color: #c4b5d8;
}

.hero {
  padding: 74px 0 36px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 26px;
  align-items: center;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--brand);
  margin: 0 0 8px;
}

h1 {
  margin: 0;
  font-size: clamp(2.3rem, 4vw, 3.7rem);
  line-height: 1.05;
}

.hero-subtitle {
  font-size: 1.08rem;
  margin: 18px 0 24px;
  max-width: 58ch;
  color: var(--muted);
}

.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-card,
.panel,
.feature-card,
.cta-card,
.subpage-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.hero-card {
  padding: 24px;
}

.user-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--muted);
  font-weight: 600;
}

.hero-card h2 {
  margin: 0 0 14px;
  font-size: 1.1rem;
}

.status-list {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.status-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
}

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

.section {
  padding: 34px 0;
}

.section-muted {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(238, 240, 247, 0.85));
}

.section-header {
  margin-bottom: 18px;
}

.section-header h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
}

.feature-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.feature-card {
  padding: 20px;
}

.feature-card h3 {
  margin: 0 0 8px;
}

.feature-card p {
  margin: 0 0 14px;
  color: var(--muted);
}

.feature-card a {
  font-weight: 600;
}

.dashboard-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.panel {
  padding: 20px;
}

.panel h3 {
  margin: 0 0 6px;
}

.panel p {
  margin: 0 0 10px;
  color: var(--muted);
}

.panel strong {
  font-size: 1.12rem;
}

.cta-card {
  text-align: center;
  padding: 34px 20px;
}

.cta-card h2 {
  margin: 0 0 8px;
}

.cta-card p {
  color: var(--muted);
  max-width: 62ch;
  margin: 0 auto 18px;
}

.site-footer {
  border-top: 1px solid var(--border);
  margin-top: 44px;
  padding: 20px 0;
  background: rgba(255, 255, 255, 0.65);
}

.auth-page {
  box-sizing: border-box;
  min-height: 100dvh;
  height: 100dvh;
  display: flex;
  align-items: stretch;
  justify-content: center;
  padding: 10px 16px 12px;
  overflow: hidden;
}

.auth-page:has(.auth-screen--form) {
  height: auto;
  min-height: 100dvh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.auth-screen {
  width: min(720px, 100%);
  text-align: center;
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
}

.auth-screen:not(.auth-screen--form) {
  height: 100%;
  max-height: 100%;
}

.auth-screen--form {
  width: min(400px, 100%);
  justify-content: center;
  height: auto;
  max-height: none;
}

.landing-brand {
  display: block;
  align-self: center;
  line-height: 0;
  margin: 0 auto 10px;
  flex-shrink: 0;
}

.auth-logo--compact {
  display: block;
  width: min(128px, 36vw);
  height: auto;
  object-fit: contain;
}

.auth-screen--form .landing-brand {
  align-self: center;
  margin: 0 auto 16px;
}

.auth-screen--form .auth-logo--compact {
  width: min(110px, 32vw);
}

.auth-panel {
  text-align: left;
}

.auth-panel-landing {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  text-align: center;
  width: 100%;
}

.auth-panel-title {
  margin: 0 0 14px;
  font-size: 1.35rem;
  color: var(--brand-dark);
  text-align: center;
}

.dual-carousel-wrap {
  --carousel-row-height: 200px;
  --carousel-gap: 10px;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: var(--carousel-gap);
  width: 100%;
}

.feature-carousel {
  --visible-slides: 3;
  flex: 0 0 auto;
  height: var(--carousel-row-height);
  display: block;
  width: 100%;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
  height: var(--carousel-row-height);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background: #e8eaef;
}

.carousel-track {
  display: flex;
  align-items: stretch;
  height: 100%;
  will-change: transform;
}

.carousel-slide {
  flex: 0 0 auto;
  box-sizing: border-box;
  height: 100%;
}

.carousel-slide-card {
  position: relative;
  width: 100%;
  height: var(--carousel-row-height);
  min-height: 100%;
  border-radius: 12px;
  overflow: hidden;
  isolation: isolate;
  background: #e8eaef;
  cursor: default;
}

.carousel-slide-card img {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  display: block;
}

.carousel-slide-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  min-height: auto;
  padding: 10px 10px 10px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 4px;
  background: linear-gradient(
    180deg,
    rgba(10, 29, 68, 0) 0%,
    rgba(10, 29, 68, 0.82) 55%,
    rgba(10, 29, 68, 0.96) 100%
  );
  color: #ffffff;
  text-align: left;
  pointer-events: none;
  transition: background 0.25s ease, padding 0.25s ease;
}

.carousel-slide-card:hover .carousel-slide-overlay,
.carousel-slide-card:focus-visible .carousel-slide-overlay,
.carousel-slide-card.is-expanded .carousel-slide-overlay {
  min-height: 58%;
  padding: 22px 10px 10px;
  background: linear-gradient(
    180deg,
    rgba(10, 29, 68, 0.05) 0%,
    rgba(10, 29, 68, 0.78) 35%,
    rgba(10, 29, 68, 0.98) 100%
  );
}

.carousel-slide-title {
  margin: 0;
  font-size: clamp(0.82rem, 2.4vw, 1rem);
  line-height: 1.2;
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.8);
}

.carousel-slide-scene,
.carousel-slide-desc {
  max-height: 0;
  opacity: 0;
  margin: 0;
  overflow: hidden;
  transform: translateY(6px);
  transition:
    max-height 0.3s ease,
    opacity 0.25s ease,
    transform 0.25s ease,
    margin 0.25s ease;
}

.carousel-slide-scene {
  font-size: clamp(0.72rem, 2vw, 0.84rem);
  line-height: 1.25;
  font-weight: 600;
  color: #efe6ff;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.75);
}

.carousel-slide-desc {
  font-size: clamp(0.66rem, 1.8vw, 0.76rem);
  line-height: 1.35;
  color: #ffffff;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.75);
}

.carousel-slide-card:hover .carousel-slide-scene,
.carousel-slide-card:hover .carousel-slide-desc,
.carousel-slide-card:focus-visible .carousel-slide-scene,
.carousel-slide-card:focus-visible .carousel-slide-desc,
.carousel-slide-card.is-expanded .carousel-slide-scene,
.carousel-slide-card.is-expanded .carousel-slide-desc {
  max-height: 6rem;
  opacity: 1;
  transform: translateY(0);
}

.carousel-slide-card:hover .carousel-slide-desc,
.carousel-slide-card:focus-visible .carousel-slide-desc,
.carousel-slide-card.is-expanded .carousel-slide-desc {
  max-height: 5.5rem;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
}

@media (hover: none) {
  .carousel-slide-card {
    cursor: pointer;
  }
}

.landing-actions {
  margin-top: 8px;
  padding: 10px 0 calc(8px + env(safe-area-inset-bottom, 0px));
  display: grid;
  gap: 10px;
  flex-shrink: 0;
  width: 100%;
}

.landing-cta {
  width: 100%;
}

.landing-link {
  border: none;
  background: none;
  color: var(--brand-dark);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
  padding: 6px;
}

.landing-link:hover {
  color: var(--brand);
}

.auth-choice-stack,
.social-stack {
  display: grid;
  gap: 10px;
}

.social-stack-compact {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.btn-social {
  width: 100%;
}

.social-stack-compact .btn-social {
  padding-inline: 10px;
  font-size: 0.84rem;
}

.auth-divider {
  margin: 18px 0;
  color: var(--muted);
  text-align: center;
  font-size: 0.88rem;
}

.auth-divider span {
  display: inline-block;
  padding: 0 10px;
  background: var(--bg);
}

.auth-link {
  justify-self: start;
  margin: 2px 0 4px;
  padding: 0;
  border: none;
  background: none;
  color: var(--brand);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.auth-link:hover {
  color: var(--brand-dark);
}

.auth-back {
  display: block;
  width: 100%;
  margin-top: 16px;
  padding: 8px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  cursor: pointer;
}

.auth-back:hover {
  color: var(--brand-dark);
}

.auth-screen .auth-message {
  margin: 0 0 16px;
  text-align: left;
}

.auth-screen .auth-form .btn[type="submit"] {
  width: 100%;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 24px;
  align-items: start;
}

.auth-intro {
  padding-top: 10px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 22px;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.auth-tab {
  border: 1px solid var(--border);
  background: var(--surface-alt);
  color: var(--muted);
  border-radius: 999px;
  padding: 10px 12px;
  font-weight: 700;
  cursor: pointer;
}

.auth-tab.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

.auth-message {
  margin: 12px 0 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  padding: 10px 12px;
  color: var(--muted);
  font-size: 0.92rem;
}

.auth-message-success {
  border-color: #86efac;
  background: #f0fdf4;
  color: #166534;
}

.auth-message-error {
  border-color: #fecaca;
  background: #fff1f2;
  color: #9f1239;
}

.auth-form {
  display: grid;
  gap: 8px;
}

.auth-form label {
  font-weight: 600;
  font-size: 0.9rem;
}

.auth-form .btn {
  margin-top: 6px;
}

.auth-divider {
  margin: 16px 0 10px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.social-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--muted);
}

.subpage-header {
  padding: 48px 0 16px;
}

.subpage-main {
  padding: 22px;
  margin-bottom: 24px;
}

.chip-list {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  padding: 0;
  margin: 14px 0 0;
  list-style: none;
}

.chip-list li {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: 0.88rem;
  font-weight: 600;
}

@media (max-width: 900px) {
  .hero-grid,
  .feature-grid,
  .dashboard-grid,
  .auth-layout {
    grid-template-columns: 1fr;
  }

  .site-nav {
    display: none;
  }
}

@media (max-height: 720px) {
  .landing-brand {
    margin: 0 auto 4px;
  }

  .auth-logo--compact {
    width: min(100px, 30vw);
  }

  .landing-actions {
    padding-top: 6px;
    gap: 8px;
  }
}

@media (max-height: 600px) {
  .carousel-slide-overlay {
    min-height: 62%;
    padding-top: 16px;
  }

  .carousel-slide-desc {
    -webkit-line-clamp: 2;
  }
}

@media (max-width: 480px) {
  .social-stack-compact {
    grid-template-columns: 1fr;
  }
}
