:root {
  --bg: #f3f4f8;
  --bg-soft: #c4daf8;
  --surface: #ffffff;
  --surface-tint: #a9c7f1;
  --panel: #e9c1f5;
  --ink: #234391;
  --ink-soft: #4e68b0;
  --muted: #d46ce7;
  --line: #b7d3fb;
  --line-strong: #96bbea;
  --shadow-soft: 0 18px 40px rgba(35, 67, 145, 0.08);
  --font-display: "Vetrino", "Vetrino Regular", "Times New Roman", serif;
  --font-body: "Pragmatica", "Pragmatica Light", "Pragmatica Medium", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

@font-face {
  font-family: "Vetrino";
  src: local("Vetrino"), local("Vetrino Regular"), url("/static/fonts/Vetrino-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pragmatica";
  src: local("Pragmatica Light"), url("/static/fonts/Pragmatica-Light.otf") format("opentype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pragmatica";
  src: local("Pragmatica"), local("Pragmatica Regular"), url("/static/fonts/Pragmatica-Regular.otf") format("opentype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Pragmatica";
  src: local("Pragmatica Medium"), url("/static/fonts/Pragmatica-Medium.otf") format("opentype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

body {
  margin: 0;
  background:
    radial-gradient(1200px 600px at 80% -50%, #d9e9ff 0%, transparent 70%),
    radial-gradient(1000px 600px at -20% 110%, #f5ddff 0%, transparent 65%),
    var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

.section-wrap {
  width: min(1280px, calc(100% - 48px));
  margin: 0 auto;
}

.landing {
  padding: 16px 0 0;
}

.brand {
  font-family: var(--font-display);
  font-size: clamp(2rem, 3vw, 2.5rem);
  line-height: 1;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0.92;
  margin: 0;
}

.site-header {
  backdrop-filter: blur(6px);
  border-bottom: 1px dashed rgba(255, 255, 255, 0.72);
  padding: 12px 0 20px;
}

.site-header--frame {
  padding: 12px 0 20px;
}

.site-header__inner {
  align-items: center;
  display: flex;
  justify-content: space-between;
  min-height: 64px;
}

.site-header__actions {
  align-items: center;
  display: flex;
  flex: 0 0 auto;
  gap: 16px;
}

.ui-switch {
  background: var(--line);
  border-radius: 18px;
  display: flex;
  gap: 4px;
  height: 52px;
  padding: 6px;
}

.ui-switch__link {
  border-radius: 12px;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  height: 100%;
  min-width: 48px;
  padding: 0 14px;
  transition: background-color 0.2s ease;
}

.ui-switch__link.active {
  background: var(--surface);
}

.ui-button {
  align-items: center;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 16px;
  box-shadow: var(--shadow-soft);
  color: var(--ink);
  cursor: pointer;
  display: inline-flex;
  font-weight: 500;
  justify-content: center;
  line-height: 1;
  padding: 12px 24px;
  text-decoration: none;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
  white-space: nowrap;
}

.ui-button--outline {
  border-color: var(--line);
}

.site-header__button {
  align-self: center;
  height: 52px;
  min-width: 148px;
  padding-inline: 28px;
}

.ui-button--wide {
  width: 100%;
}

.ui-button--hero {
  min-height: 54px;
  width: 100%;
}

.ui-button:hover {
  border-color: var(--line-strong);
  transform: translateY(-1px);
}

.ui-button.is-disabled,
.ui-button[disabled] {
  cursor: default;
  opacity: 0.68;
  pointer-events: none;
}

.ui-input {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(35, 67, 145, 0.18);
  border-radius: 12px;
  color: var(--ink);
  outline: none;
  padding: 10px 12px;
  width: 100%;
}

.ui-input:focus {
  border-color: var(--line-strong);
}

.ui-card {
  background: var(--surface-tint);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 24px;
  box-shadow: var(--shadow-soft);
  padding: 22px 26px;
}

.hero {
  display: grid;
  gap: 24px;
  margin-top: 64px;
  margin-bottom: 110px;
}

.pill {
  background: var(--line);
  border-radius: 14px;
  font-size: 13px;
  justify-self: start;
  padding: 8px 14px;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3rem, 10vw, 10rem);
  font-weight: 500;
  line-height: 0.86;
  margin: 0;
  text-transform: none;
}

.hero-title span {
  display: block;
}

.hero-subtitle {
  color: var(--ink-soft);
  line-height: 1.65;
  margin: 0;
  max-width: 680px;
}

.workflow {
  --workflow-steps: 4;
  min-height: calc(var(--workflow-steps) * 82vh);
  margin-bottom: 160px;
  position: relative;
}

.workflow-stage {
  position: sticky;
  top: 10vh;
}

.workflow-grid {
  align-items: stretch;
  display: grid;
  gap: 64px;
  grid-template-columns: 1fr 1fr;
  min-height: 620px;
}

.eyebrow {
  color: var(--muted);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 2px;
  margin: 0 0 12px;
  text-transform: uppercase;
}

.workflow-copy {
  align-self: end;
}

.workflow-copy.slide-out {
  opacity: 0;
  transform: translateY(-22px) scale(0.985);
  transition: transform 0.22s ease, opacity 0.22s ease;
}

.workflow-copy.slide-in {
  animation: workflow-rise 0.34s cubic-bezier(0.22, 0.8, 0.2, 1);
}

@keyframes workflow-rise {
  0% {
    opacity: 0;
    transform: translateY(28px);
  }

  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

.workflow-title,
.waitlist-title {
  font-family: var(--font-display);
  font-size: clamp(2.6rem, 6vw, 4.5rem);
  line-height: 0.92;
  margin: 0;
  text-transform: uppercase;
}

.waitlist-title {
  text-transform: none;
}

.workflow-description,
.waitlist-subtitle {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 16px 0 0;
  max-width: 680px;
}

.chat-bubble {
  border: 4px solid var(--line);
  border-radius: 16px 16px 16px 0;
  margin: 18px 0 0;
  max-width: fit-content;
  padding: 12px 16px;
}

.workflow-progress {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-top: 34px;
}

.progress-dot {
  border: 1px solid var(--line);
  border-radius: 100px;
  height: 8px;
  transition: background-color 0.25s ease;
}

.progress-dot.active {
  background: var(--line);
}

.workflow-media {
  align-items: center;
  background: linear-gradient(180deg, rgba(233, 193, 245, 0.75), rgba(169, 199, 241, 0.48));
  border-radius: 16px;
  display: flex;
  justify-content: center;
  min-height: 100%;
  opacity: 1;
  transition: opacity 0.28s ease;
}

.workflow-media.fade {
  opacity: 0.15;
}

.workflow-media span {
  color: #888;
}

.workflow-video {
  border-radius: 16px;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.workflow-scroll {
  color: var(--muted);
  margin-top: 20px;
  text-align: center;
  text-transform: lowercase;
}

.waitlist {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin-bottom: 120px;
  text-align: center;
}

.waitlist-form {
  align-items: center;
  background: var(--line);
  border-radius: 16px;
  display: flex;
  gap: 4px;
  margin-top: 28px;
  padding: 4px;
}

.waitlist-form input {
  background: var(--surface);
  border: none;
  border-radius: 12px;
  color: var(--ink);
  min-width: 300px;
  outline: none;
  padding: 12px 16px;
}

.waitlist-form button {
  background: transparent;
  border: none;
  border-radius: 12px;
  color: #fff;
  cursor: pointer;
  font-weight: 500;
  padding: 12px 20px;
}

.waitlist-feedback {
  min-height: 24px;
}

.waitlist-feedback.error {
  color: #d14040;
}

.waitlist-feedback.success {
  color: #2a8f4f;
}

.site-footer {
  background: var(--bg-soft);
  border-radius: 0 0 24px 24px;
  padding: 52px 0 36px;
}

.site-footer--flat {
  border-radius: 0;
  margin-top: 10px;
  width: 100%;
}

.site-footer__tagline {
  margin-top: 6px;
}

.site-footer__bottom {
  border-top: 1px solid var(--ink);
  display: flex;
  justify-content: space-between;
  margin-top: 44px;
  padding-top: 26px;
}

.site-footer__links {
  display: flex;
  gap: 24px;
}

.legal-page {
  min-height: 100vh;
}

.legal-content {
  margin-top: 48px;
  margin-bottom: 96px;
  max-width: 860px;
}

.legal-title {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 0.95;
  margin: 18px 0 0;
}

.legal-updated {
  margin-top: 8px;
}

.legal-note {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 20px 0 8px;
}

.legal-back-btn {
  font-size: 18px;
  gap: 10px;
  line-height: 1;
  margin-bottom: 20px;
  padding: 12px 20px;
}

.legal-back-btn-bottom {
  margin-top: 20px;
}

.legal-intro {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 16px 0 26px;
  max-width: 860px;
}

.legal-section {
  background: transparent;
  border: none;
  border-radius: 0;
  margin-bottom: 16px;
  padding: 0;
}

.legal-section h2 {
  color: var(--ink-soft);
  font-size: 32px;
  font-weight: 400;
  line-height: 1.45;
  margin: 0 0 4px;
}

.legal-section p {
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 10px;
}

.legal-section p:last-child {
  margin-bottom: 0;
}

.cabinet-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  padding: 20px 0 0;
}

.cabinet-shell {
  flex: 1;
  margin: 0 auto;
  width: min(1280px, calc(100% - 24px));
}

.cabinet-frame {
  background: var(--bg);
  border-radius: 30px;
  overflow: hidden;
}

.cabinet-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(250px, 330px) 1fr;
  padding: 0 32px 22px;
}

.cabinet-right-grid {
  display: grid;
  gap: 12px;
}

.cabinet-page .ui-button {
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: none;
  font-size: 14px;
  min-height: 40px;
  padding: 10px 18px;
}

.profile-card {
  display: flex;
  flex-direction: column;
  min-height: 560px;
}

.profile-avatar {
  align-items: center;
  background: rgba(255, 255, 255, 0.45);
  border-radius: 14px;
  color: var(--ink);
  display: flex;
  font-size: 36px;
  height: 52px;
  justify-content: center;
  margin-bottom: 14px;
  width: 52px;
}

.profile-avatar img {
  border-radius: inherit;
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.profile-avatar-lg {
  border-radius: 16px;
  height: 238px;
  margin-bottom: 14px;
  width: 100%;
}

.label-row {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 0;
}

.value-row {
  font-size: 20px;
  line-height: 1;
  margin: 2px 0 10px;
}

.profile-card .value-row {
  font-size: 18px;
  letter-spacing: 0.01em;
}

.profile-actions {
  margin-top: 6px;
}

.profile-actions .ui-button {
  width: 100%;
}

.cabinet-logout {
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  font-family: inherit;
  font-size: 16px;
  margin-top: auto;
  padding-top: 18px;
  text-align: center;
}

.status-text {
  color: var(--ink-soft);
  font-size: 13px;
  min-height: 18px;
}

.card-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 14px;
}

.card-header h3 {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 2.6vw, 3rem);
  font-weight: 400;
  letter-spacing: 0;
  margin: 0;
  text-transform: uppercase;
}

.tokens-progress {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 999px;
  height: 18px;
  overflow: hidden;
}

.tokens-progress-fill {
  background: #d8a8ea;
  border-radius: inherit;
  display: block;
  height: 100%;
  transition: width 0.25s ease;
}

.tokens-meta {
  color: var(--ink-soft);
  display: flex;
  font-size: 14px;
  justify-content: space-between;
  margin-top: 8px;
  padding: 0 3px;
}

.team-caption {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 0 0 8px;
}

.team-table-wrap {
  margin-top: 10px;
  overflow-x: auto;
}

.team-card table {
  border-collapse: collapse;
  width: 100%;
}

.team-card th,
.team-card td {
  color: var(--ink);
  font-size: 14px;
  font-weight: 400;
  padding: 6px 4px;
  text-align: left;
}

.team-card th {
  color: var(--ink-soft);
}

.team-card .remove-btn {
  background: transparent;
  border: none;
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  padding: 0 4px;
}

.team-card .remove-btn:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.token-request-panel,
.team-invite-panel {
  border-top: 1px solid rgba(35, 67, 145, 0.3);
  margin-top: 14px;
  padding-top: 14px;
}

.token-request-panel form,
.team-invite-panel form {
  display: grid;
  gap: 8px;
}

.token-request-panel label,
.team-invite-panel label {
  color: var(--ink-soft);
  font-size: 14px;
}

.token-request-panel button,
.team-invite-panel button {
  justify-self: start;
}

.invisible {
  display: none;
}

.login-frame {
  min-height: 72vh;
  padding: 8px 24px 28px;
}

.login-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr 1fr;
  margin: 20px auto 0;
  max-width: 1060px;
}

.login-card,
.register-card {
  min-height: 640px;
  padding: 54px 42px 40px;
}

.login-title {
  font-family: var(--font-display);
  font-size: clamp(2.2rem, 3vw, 3.2rem);
  line-height: 0.95;
  margin: 0 0 26px;
  text-align: center;
}

.login-subtitle {
  color: var(--ink-soft);
  font-size: 16px;
  line-height: 1.45;
  margin: 0 0 20px;
}

.login-subtitle-tight {
  margin-bottom: 10px;
}

.login-links-row {
  align-items: center;
  color: var(--ink-soft);
  display: flex;
  font-size: 16px;
  gap: 12px;
  margin: 0 0 30px;
}

.login-link {
  color: var(--ink-soft);
  text-decoration: underline;
}

.login-form {
  display: grid;
  gap: 14px;
}

.login-form .ui-input {
  font-size: 16px;
  min-height: 52px;
  padding: 10px 16px;
}

.login-form .ui-button {
  margin-top: 14px;
  width: 100%;
}

.register-card .waitlist-form.auth-waitlist-form {
  background: #dca5ea;
  border-radius: 16px;
  gap: 0;
  margin-top: auto;
  max-width: none;
  width: 100%;
}

.register-card .waitlist-form.auth-waitlist-form input {
  border-radius: 16px;
  min-width: 0;
}

.register-card .waitlist-form.auth-waitlist-form button {
  background: transparent;
  color: #f5e8fb;
  font-size: 16px;
  font-weight: 600;
  min-height: 52px;
  white-space: nowrap;
}

.register-card .waitlist-feedback {
  margin-top: 12px;
}

@media (max-width: 960px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 20px;
  }

  .site-header--frame {
    padding: 12px 0 20px;
  }

  .workflow-grid {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .workflow {
    min-height: auto;
  }

  .workflow-stage {
    position: static;
  }

  .workflow-copy {
    order: 2;
  }

  .workflow-media {
    min-height: 340px;
    order: 1;
  }

  .waitlist-form {
    flex-direction: column;
    width: min(460px, 100%);
  }

  .waitlist-form input,
  .waitlist-form button {
    width: 100%;
  }

  .site-footer__bottom {
    flex-direction: column;
    gap: 18px;
  }

  .cabinet-grid {
    gap: 14px;
    grid-template-columns: 1fr;
    padding: 0 14px 20px;
  }

  .login-grid {
    grid-template-columns: 1fr;
    max-width: 680px;
  }

  .login-card,
  .register-card {
    min-height: unset;
    padding: 30px 24px;
  }

  .login-subtitle,
  .login-links-row {
    font-size: 15px;
  }

  .login-form .ui-input {
    font-size: 16px;
    min-height: 48px;
  }

  .register-card .waitlist-form.auth-waitlist-form button {
    font-size: 15px;
    min-height: 48px;
  }
}

@media (max-width: 640px) {
  .section-wrap {
    width: min(1280px, calc(100% - 28px));
  }

  .site-header__actions {
    gap: 12px;
    justify-content: space-between;
    width: 100%;
  }

  .site-header__button {
    min-width: 132px;
  }

  .workflow-progress {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cabinet-shell {
    width: calc(100% - 12px);
  }

  .card-header {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .cabinet-page .ui-button,
  .cabinet-page .token-request-panel button,
  .cabinet-page .team-invite-panel button {
    width: 100%;
  }

  .tokens-meta {
    font-size: 15px;
    padding: 0;
  }
}
