@import url("https://fonts.googleapis.com/css2?family=Sora:wght@400;500;600;700;800&family=Fira+Mono:wght@500&display=swap");

:root {
  --ink: #112733;
  --ink-soft: #4a6270;
  --line: rgba(30, 56, 74, 0.2);
  --card: rgba(255, 255, 255, 0.88);
  --card-strong: #ffffff;
  --brand: #1546c2;
  --brand-strong: #12389b;
  --warm: #d93b8d;
  --warm-strong: #b92f76;
  --lime: #7b61ff;
  --sky: #4cc9f0;
  --sun: #22d3ee;
  --shadow: 0 16px 44px rgba(18, 35, 46, 0.14);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

.landing-body {
  font-family: "Sora", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(1000px 560px at 8% -10%, rgba(217, 59, 141, 0.3), transparent 62%),
    radial-gradient(1000px 560px at 92% 108%, rgba(76, 201, 240, 0.3), transparent 64%),
    linear-gradient(160deg, #eef3ff 0%, #f5efff 33%, #ecf9ff 66%, #f3f0ff 100%);
}

.ambient {
  position: fixed;
  pointer-events: none;
  z-index: -1;
  border-radius: 999px;
  filter: blur(18px);
  opacity: 0.28;
}

.ambient-a {
  width: 320px;
  height: 320px;
  top: -70px;
  right: -40px;
  background: linear-gradient(40deg, var(--warm), var(--sun));
}

.ambient-b {
  width: 360px;
  height: 360px;
  bottom: -120px;
  left: -80px;
  background: linear-gradient(40deg, var(--sky), var(--lime));
}

.topbar,
.shell,
.footer,
.footer-section {
  width: min(1160px, 94vw);
  margin-left: auto;
  margin-right: auto;
}

.topbar {
  margin-top: 0.75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(6px);
  box-shadow: var(--shadow);
  padding: 0.7rem;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  column-gap: 0.62rem;
  row-gap: 0;
}

.brand {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  gap: 0.55rem;
  align-items: center;
  font-weight: 800;
}

.brand-mark {
  width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  border-radius: 10px;
  color: #f4faff;
  background: linear-gradient(140deg, #066a89, #0c3a52);
  font: 700 0.82rem/1 "Fira Mono", monospace;
}

.topnav {
  display: flex;
  grid-column: 1 / -1;
  flex-direction: column;
  align-items: stretch;
  gap: 0.4rem;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-10px);
  pointer-events: none;
  padding-top: 0;
  padding-bottom: 0;
  transition:
    max-height 280ms ease,
    opacity 220ms ease,
    transform 280ms ease,
    padding 280ms ease;
}

.topnav.is-open {
  max-height: 260px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  border-color: rgba(21, 70, 194, 0.22);
  background: linear-gradient(160deg, rgba(247, 251, 255, 0.96), rgba(240, 238, 255, 0.94));
  box-shadow: 0 10px 24px rgba(21, 70, 194, 0.12);
  padding-left: 0.4rem;
  padding-right: 0.4rem;
  padding-top: 0.44rem;
  padding-bottom: 0.12rem;
}

.nav-toggle {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid rgba(15, 77, 98, 0.3);
  background: rgba(255, 255, 255, 0.88);
  display: inline-grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  cursor: pointer;
}

.nav-toggle span {
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: #1f5266;
}

.topnav a,
.nav-auth-btn,
.nav-crm-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 0.4rem 0.65rem;
  white-space: nowrap;
  font: 700 0.81rem/1.2 "Sora", sans-serif;
  text-decoration: none;
  color: #254556;
  background: transparent;
  cursor: pointer;
}

.topnav .session-pill,
.topnav a,
.topnav .nav-auth-btn,
.topnav .nav-crm-btn {
  width: 100%;
}

.topnav a:hover,
.nav-auth-btn:hover,
.nav-crm-btn:hover {
  border-color: rgba(22, 76, 95, 0.24);
  background: rgba(255, 255, 255, 0.5);
}

.nav-auth-btn {
  border-color: rgba(217, 59, 141, 0.4);
  color: #8d1f5e;
}

.nav-crm-btn {
  border-color: rgba(21, 70, 194, 0.45);
  color: #15339d;
}

.session-pill {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(14, 75, 95, 0.24);
  border-radius: 999px;
  padding: 0.42rem 0.68rem;
  background: rgba(255, 255, 255, 0.66);
  color: #2d566a;
  font-size: 0.78rem;
  font-weight: 700;
  white-space: nowrap;
}

.shell {
  margin-top: 0.9rem;
  margin-bottom: 1.05rem;
  display: grid;
  gap: 0.8rem;
}

.section,
.hero-copy,
.hero-panel,
.card,
.how-card,
.mini-card,
.portal-card,
.price-card {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--card);
  box-shadow: var(--shadow);
}

.section {
  padding: 0.92rem;
}

.hero {
  display: grid;
  gap: 0.8rem;
}

.hero-copy,
.hero-panel {
  padding: 0.95rem;
}

.hero-visual {
  margin: 0;
  width: 100%;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid rgba(20, 75, 94, 0.26);
}

.hero-visual img {
  width: 100%;
  height: clamp(240px, 40vh, 380px);
  object-fit: cover;
  object-position: center center;
  display: block;
}

.hero-visual figcaption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 0.62rem 0.7rem;
  font-size: 0.8rem;
  color: #eff9ff;
  background: linear-gradient(180deg, rgba(12, 40, 52, 0), rgba(12, 40, 52, 0.86));
}

.eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.67rem;
  color: #5f46d8;
  font-weight: 700;
}

h1 {
  margin: 0.4rem 0 0.62rem;
  line-height: 1.15;
  font-size: clamp(1.62rem, 8vw, 2.56rem);
}

h2 {
  margin: 0.42rem 0 0;
  line-height: 1.2;
  font-size: clamp(1.25rem, 6vw, 2rem);
}

h3,
h4 {
  margin: 0;
  line-height: 1.3;
}

.lede {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.93rem;
  line-height: 1.62;
}

.hero-actions {
  margin-top: 0.86rem;
  display: flex;
  gap: 0.48rem;
  flex-wrap: wrap;
}

.btn {
  border-radius: 12px;
  border: 1px solid rgba(14, 75, 95, 0.45);
  padding: 0.58rem 0.88rem;
  font: 700 0.83rem/1 "Sora", sans-serif;
  color: #17495d;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.8);
  cursor: pointer;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-solid {
  color: #eef9ff;
  background: linear-gradient(135deg, var(--brand), #0f6079);
  border-color: #0d576f;
}

.btn-solid:hover {
  background: linear-gradient(135deg, var(--brand-strong), #0b4c60);
}

.btn-warm {
  color: #fff7f2;
  background: linear-gradient(135deg, var(--warm), #f051a5);
  border-color: #b92f76;
}

.btn-warm:hover {
  background: linear-gradient(135deg, var(--warm-strong), #9b2863);
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.78);
}

.hero-metrics {
  margin-top: 0.9rem;
  display: grid;
  gap: 0.52rem;
}

.hero-metrics article {
  border: 1px dashed rgba(19, 95, 118, 0.26);
  border-radius: 12px;
  padding: 0.64rem;
  background: linear-gradient(135deg, #fff7e9, #f0fcff);
}

.hero-metrics h3 {
  font-size: 0.93rem;
}

.hero-metrics p {
  margin: 0.2rem 0 0;
  color: #547381;
  font-size: 0.78rem;
}

.hero-panel .btn {
  width: 100%;
  margin-top: 0.5rem;
}

.stack-list {
  margin: 0.52rem 0 0;
  padding-left: 1rem;
  display: grid;
  gap: 0.42rem;
  color: #2f4b59;
  font-size: 0.86rem;
}

.section-head {
  margin-bottom: 0.62rem;
}

.cards,
.how-cards,
.mini-grid,
.pricing-grid {
  display: grid;
  gap: 0.6rem;
}

.card {
  padding: 0.86rem;
}

.card p,
.how-card p,
.mini-card {
  margin: 0.35rem 0 0;
  color: #506a77;
  font-size: 0.88rem;
  line-height: 1.56;
}

.how-card {
  padding: 0.86rem;
  background:
    radial-gradient(220px 110px at 0% 0%, rgba(123, 97, 255, 0.18), transparent 80%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.95), rgba(240, 251, 255, 0.92));
}

.how-card h3 {
  font-size: 1rem;
}

.step-badge {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: linear-gradient(140deg, #1478a1, #0f4b63);
  color: #f1fbff;
  font: 700 0.82rem/1 "Fira Mono", monospace;
}

.pricing-grid {
  margin-top: 0.2rem;
}

.price-card {
  padding: 0.86rem;
  background: linear-gradient(155deg, rgba(255, 255, 255, 0.94), rgba(245, 254, 255, 0.88));
}

.price-card .plan {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.67rem;
  color: #5f46d8;
  font-weight: 700;
}

.price-card h3 {
  margin-top: 0.38rem;
  font-size: 1.35rem;
}

.price-card h3 span {
  font-size: 0.83rem;
  font-weight: 600;
  color: #5d7886;
  margin-left: 0.18rem;
}

.price-note {
  margin: 0.2rem 0 0;
  color: #5a7684;
  font-size: 0.82rem;
}

.price-card ul {
  margin: 0.65rem 0 0.75rem;
  padding-left: 1rem;
  display: grid;
  gap: 0.34rem;
  font-size: 0.84rem;
  color: #35515f;
}

.price-card.featured {
  border-color: rgba(123, 97, 255, 0.42);
  background:
    radial-gradient(400px 220px at -20% -25%, rgba(123, 97, 255, 0.18), transparent 65%),
    linear-gradient(160deg, rgba(255, 255, 255, 0.94), rgba(243, 239, 255, 0.9));
}

.split {
  display: grid;
  gap: 0.65rem;
}

.mini-card {
  padding: 0.72rem;
  border-radius: 14px;
  background: var(--card-strong);
}

.auth-section {
  display: grid;
  gap: 0.68rem;
}

.portal-card {
  padding: 0.9rem;
}

.auth-header {
  display: flex;
  justify-content: space-between;
  gap: 0.45rem;
  align-items: baseline;
}

.auth-header p {
  margin: 0;
  color: #51707f;
  font-size: 0.82rem;
}

.auth-actions {
  margin-top: 0.72rem;
  display: grid;
  gap: 0.45rem;
}

.auth-actions .btn {
  width: 100%;
}

.footer-section {
  margin-top: 0.5rem;
}

.footer-grid {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.84);
  box-shadow: var(--shadow);
  padding: 0.9rem;
  display: grid;
  gap: 0.72rem;
}

.footer-grid h3,
.footer-grid h4 {
  margin-bottom: 0.3rem;
}

.footer-grid p {
  margin: 0;
  color: #56717f;
  font-size: 0.85rem;
  line-height: 1.55;
}

.footer-grid a,
.footer-grid button {
  display: block;
  margin: 0.24rem 0;
  color: #205165;
  text-decoration: none;
  font: 600 0.84rem/1.4 "Sora", sans-serif;
  background: transparent;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.footer-grid a:hover,
.footer-grid button:hover {
  color: #8d1f5e;
}

.footer {
  margin-top: 0.78rem;
  margin-bottom: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.7);
  padding: 0.64rem 0.84rem;
  display: grid;
  gap: 0.2rem;
  color: #4f6977;
  font-size: 0.8rem;
}

.auth-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
}

.auth-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 20, 27, 0.58);
}

.auth-shell {
  position: relative;
  width: min(520px, 92vw);
  margin: 4vh auto 0;
  border: 1px solid rgba(19, 53, 67, 0.24);
  border-radius: 16px;
  background: linear-gradient(165deg, #fffefb 0%, #eefbff 40%, #fff7ed 100%);
  box-shadow: 0 22px 64px rgba(5, 19, 25, 0.36);
  padding: 0.86rem;
}

.auth-modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.4rem;
}

#auth-modal-close {
  border: 1px solid rgba(23, 77, 97, 0.3);
  border-radius: 10px;
  width: 34px;
  height: 34px;
  background: #fff6e8;
  color: #21495c;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
}

.auth-switch {
  margin-top: 0.58rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.4rem;
}

.switch-btn {
  border: 1px solid rgba(24, 76, 95, 0.28);
  border-radius: 10px;
  padding: 0.48rem 0.55rem;
  background: #f8fbff;
  color: #27556a;
  font: 700 0.82rem/1 "Sora", sans-serif;
  cursor: pointer;
}

.switch-btn.is-active {
  border-color: rgba(217, 59, 141, 0.55);
  background: linear-gradient(135deg, #fbe8f5, #f4efff);
  color: #8d1f5e;
}

.panel {
  margin-top: 0.58rem;
  border: 1px solid rgba(28, 79, 99, 0.18);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.88);
  padding: 0.68rem;
  display: grid;
  gap: 0.45rem;
}

.panel.is-hidden {
  display: none;
}

label {
  display: grid;
  gap: 0.2rem;
  color: #4f4f4f;
  font-size: 0.76rem;
  font-weight: 700;
}

input {
  width: 100%;
  border: 1px solid rgba(33, 84, 103, 0.28);
  border-radius: 9px;
  padding: 0.54rem;
  background: #ffffff;
  color: #17313e;
  font: 500 0.83rem/1.2 "Fira Mono", monospace;
}

input:focus {
  outline: none;
  border-color: rgba(217, 59, 141, 0.62);
  box-shadow: 0 0 0 2px rgba(217, 59, 141, 0.25);
}

.log {
  margin: 0.55rem 0 0;
  border: 1px dashed rgba(25, 80, 100, 0.28);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.84);
  min-height: 2.6rem;
  max-height: 8rem;
  overflow: auto;
  padding: 0.5rem;
  white-space: pre-wrap;
  color: #365866;
  font: 500 0.75rem/1.45 "Fira Mono", monospace;
}

@media (min-width: 720px) {
  .topbar {
    grid-template-columns: auto 1fr;
    column-gap: 0.88rem;
  }

  .nav-toggle {
    display: none;
  }

  .topnav {
    grid-column: auto;
    justify-content: flex-start;
    flex-direction: column;
    align-items: flex-end;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    max-height: none;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: none;
    padding-left: 0;
    padding-right: 0;
    overflow: visible;
    padding-top: 0;
    padding-bottom: 0;
  }

  .topnav .session-pill,
  .topnav a,
  .topnav .nav-auth-btn,
  .topnav .nav-crm-btn {
    width: auto;
  }

  .hero-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

  .pricing-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

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

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

  .footer {
    grid-template-columns: auto auto;
    justify-content: space-between;
    align-items: center;
  }
}

@media (min-width: 1040px) {
  .hero {
    grid-template-columns: 1.15fr 0.85fr;
  }

  .cards.four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .how-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .split {
    grid-template-columns: 1fr 1fr;
  }

  .auth-actions {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1.2fr 0.8fr 0.8fr 0.9fr;
  }
}
