:root {
  --home-max: 1120px;
  --home-pad: 1.5rem;
  --home-radius: var(--radius-lg);
  --home-card-bg: var(--surface-elevated);
  --home-card-border: var(--border-accent);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(1100px 750px at 20% 12%, var(--glow) 0%, transparent 65%),
    radial-gradient(900px 660px at 92% 18%, var(--glow) 0%, transparent 60%),
    radial-gradient(600px 500px at 50% 60%, var(--glow-strong) 0%, transparent 55%),
    var(--bg);
  --brand-width: var(--home-max);
  --brand-padding: 2.5rem var(--home-pad) 0;
  --brand-justify: space-between;
  --brand-gap: 0.75rem;
  --logo-bg: var(--surface-elevated);
  --logo-border: var(--border-accent);
  --logo-shadow: var(--shadow);
  --logo-height: 30px;
  overflow-x: hidden;
}

.home-wrapper {
  max-width: var(--home-max);
  margin: 0 auto;
  padding: 3.5rem var(--home-pad) 5rem;
  display: flex;
  flex-direction: column;
  gap: 2.25rem;
}

.home-hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 3rem;
  align-items: center;
}

.home-hero__copy {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.home-eyebrow {
  margin: 0;
  width: fit-content;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-on-surface);
  background: var(--surface-dim);
  border: 1px solid var(--border-accent);
  border-radius: 9999px;
  padding: 0.45rem 0.85rem;
  box-shadow: var(--shadow);
}

.home-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 4.4vw, 3.8rem);
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.home-lede {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 44rem;
  font-size: 1.05rem;
}

.home-hero__cta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.7rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-weight: 700;
  border: 1px solid transparent;
  background-clip: padding-box;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
  will-change: transform;
}

.btn--primary {
  background: var(--accent-gradient);
  border: 0;
  color: #fff;
  box-shadow: 0 4px 14px var(--glow-strong);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px var(--glow-strong);
}

.btn--ghost {
  background: var(--surface-dim);
  border-color: var(--border);
  color: var(--text);
}

.btn--ghost:hover {
  background: var(--surface-elevated);
}

.home-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.home-proof__pill {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.85rem;
  border-radius: 9999px;
  background: var(--surface-dim);
  border: 1px solid var(--border-accent);
  box-shadow: var(--shadow);
  color: var(--text-on-surface);
  font-weight: 650;
  font-size: 0.92rem;
}

.home-proof__pill .material-symbols-rounded::before {
  font-size: 1.1rem;
}

.home-hero__visual {
  display: flex;
  justify-content: flex-end;
}

.home-phone {
  width: min(360px, 92vw);
  border-radius: var(--radius-lg);
  background: var(--surface-dim);
  border: 1px solid var(--border);
  box-shadow: 0 38px 76px rgba(0, 0, 0, 0.14), 0 18px 48px var(--glow);
  overflow: hidden;
  transform: rotate(1.25deg);
}

.home-phone__top {
  display: flex;
  gap: 0.45rem;
  padding: 0.9rem 1.05rem;
  background: var(--surface-dim);
  border-bottom: 1px solid var(--border);
}

.home-phone__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--line);
}

.home-phone__screen {
  padding: 1.2rem 1.1rem 1.35rem;
  background:
    radial-gradient(460px 380px at 80% 20%, var(--glow) 0%, transparent 60%),
    radial-gradient(420px 360px at 10% 0%, var(--glow) 0%, transparent 62%),
    var(--surface-dim);
}

.home-phone__profile {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.1rem;
}

.home-phone__avatar {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, rgba(236, 72, 153, 0.95), rgba(138, 0, 69, 0.85));
  box-shadow: 0 18px 32px var(--glow-strong);
}

.home-phone__name {
  font-weight: 800;
  color: var(--text-on-surface);
}

.home-phone__tag {
  color: var(--text-faint);
  font-weight: 650;
  font-size: 0.9rem;
}

.home-phone__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
}

.home-phone__card {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
}

.home-phone__thumb {
  height: 68px;
  background:
    linear-gradient(135deg, rgba(236, 72, 153, 0.32), rgba(138, 0, 69, 0.14)),
    var(--glow);
}

.home-phone__thumb--alt {
  background:
    linear-gradient(135deg, rgba(244, 114, 182, 0.25), var(--glow)),
    var(--glow);
}

.home-phone__meta {
  padding: 0.55rem 0.65rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.home-phone__line {
  height: 8px;
  border-radius: 9999px;
  background: var(--line);
}

.home-phone__line--short {
  width: 70%;
}

.home-phone__btn {
  margin: 0.25rem 0.6rem 0.8rem;
  padding: 0.35rem 0.25rem;
  text-align: center;
  border-radius: var(--radius-sm);
  background: var(--ghost-bg);
  color: var(--text-on-surface);
  font-weight: 800;
  font-size: 0.8rem;
}

.home-phone__hint {
  margin-top: 1.1rem;
  text-align: center;
  font-weight: 750;
  color: var(--text-mid);
}

.home-phone__screen > a.btn {
  display: flex;
  width: fit-content;
  margin: 0.9rem auto 0;
}

/* ── Social proof strip ──────────────────────────────── */
.home-strip {
  margin: 0 calc(50% - 50vw);
  padding: 1.65rem 0;
  background: var(--surface-dim);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.home-strip__inner {
  max-width: var(--home-max);
  margin: 0 auto;
  padding: 0 var(--home-pad);
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.home-strip__title {
  margin: 0;
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  color: var(--text-on-surface);
}

.home-strip__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.home-kpi {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1.05rem;
  border-radius: var(--radius-md);
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.home-kpi__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--ghost-bg);
  border: 1px solid var(--border-accent);
  flex: 0 0 auto;
}

.home-kpi__icon::before {
  font-size: 1.45rem;
}

.home-kpi__label {
  font-weight: 850;
  color: var(--text-on-surface);
}

.home-kpi__copy {
  color: var(--text-mid);
  line-height: 1.45;
  margin-top: 0.15rem;
}

/* ── Panels ──────────────────────────────────────────── */
.home-panel {
  background: var(--surface-dim);
  border: 1px solid var(--border);
  border-radius: var(--home-radius);
  padding: 2.6rem 2.35rem;
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}

.home-panel--gradient {
  background:
    radial-gradient(680px 420px at 0% 0%, var(--glow) 0%, transparent 65%),
    var(--surface-dim);
  border-color: var(--border-accent);
}

.home-panel__content {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
}

.home-panel__content h2 {
  margin: 0;
  font-size: clamp(1.9rem, 2.45vw, 2.35rem);
  letter-spacing: -0.02em;
}

.home-panel__content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
  max-width: 46rem;
}

/* ── Steps ───────────────────────────────────────────── */
.home-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  margin: 1.35rem 0 0;
  padding: 0;
  list-style: none;
}

.home-steps__item {
  background: var(--home-card-bg);
  border: 1px solid var(--home-card-border);
  border-radius: var(--radius-md);
  padding: 1.15rem 1.15rem 1.2rem;
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  box-shadow: var(--shadow);
}

.home-steps__icon {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  background: var(--ghost-bg);
  border: 1px solid var(--border-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
}

.home-steps__icon::before {
  font-size: 1.3rem;
}

.home-steps__content h3 {
  margin: 0 0 0.35rem;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.home-steps__content p {
  margin: 0;
  color: var(--text-mid);
  line-height: 1.5;
}

/* ── Section heads ───────────────────────────────────── */
.home-section-head {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  max-width: 50rem;
  margin-bottom: 1.35rem;
}

.home-section-head h2 {
  margin: 0;
  font-size: clamp(1.9rem, 2.35vw, 2.35rem);
  letter-spacing: -0.02em;
}

.home-section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

/* ── Features grid ───────────────────────────────────── */
.home-features {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.1rem;
}

.home-usecases {
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.home-usecases h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.home-usecases__grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.home-usecases__pill {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 9999px;
  background: var(--chip-bg);
  border: 1px solid var(--border-accent);
  color: var(--text-on-surface);
  font-weight: 750;
}

.home-feature {
  border-radius: var(--radius-md);
  background: var(--home-card-bg);
  border: 1px solid var(--border);
  padding: 1.4rem 1.3rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.home-feature__icon {
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  background: var(--ghost-bg);
  border: 1px solid var(--border);
}

.home-feature__icon::before {
  font-size: 1.5rem;
}

.home-feature h3 {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.home-feature p {
  margin: 0;
  color: var(--text-mid);
  line-height: 1.55;
}

/* ── FAQ ─────────────────────────────────────────────── */
.home-panel--faq {
  background: var(--surface-dim);
}

.home-faq {
  display: grid;
  gap: 0.85rem;
}

.home-faq details {
  background: var(--surface-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 0.95rem 1.15rem;
  box-shadow: var(--shadow);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

@media (hover: hover) {
  .home-kpi:hover,
  .home-feature:hover,
  .home-faq details:hover {
    transform: translateY(-2px);
    border-color: var(--border-accent);
    box-shadow: var(--shadow);
  }
}

.home-faq summary {
  cursor: pointer;
  list-style: none;
  font-weight: 850;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.home-faq summary::-webkit-details-marker {
  display: none;
}

.home-faq summary::after {
  content: '';
  width: 10px;
  height: 10px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  transition: transform 160ms ease;
  flex: 0 0 auto;
}

.home-faq details[open] summary::after {
  transform: rotate(225deg);
}

.home-faq p {
  margin: 0.75rem 0 0;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 52rem;
}

/* ── CTA panel ───────────────────────────────────────── */
.home-panel--cta {
  text-align: center;
  background:
    radial-gradient(760px 460px at 50% 0%, var(--glow) 0%, transparent 65%),
    var(--surface-dim);
  border-color: var(--border-accent);
}

.home-cta {
  display: flex;
  flex-direction: column;
  gap: 1.1rem;
  align-items: center;
}

.home-cta h2 {
  margin: 0;
  font-size: clamp(2.05rem, 3vw, 2.65rem);
  letter-spacing: -0.02em;
}

.home-cta p {
  margin: 0;
  max-width: 44rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ── Animations ──────────────────────────────────────── */
@media (prefers-reduced-motion: no-preference) {
  .js-ready .home-hero__copy > * {
    animation: home-rise 620ms ease both;
  }
  .js-ready .home-hero__copy > *:nth-child(1) { animation-delay: 40ms; }
  .js-ready .home-hero__copy > *:nth-child(2) { animation-delay: 90ms; }
  .js-ready .home-hero__copy > *:nth-child(3) { animation-delay: 140ms; }
  .js-ready .home-hero__copy > *:nth-child(4) { animation-delay: 190ms; }
  .js-ready .home-hero__copy > *:nth-child(5) { animation-delay: 240ms; }
  .js-ready .home-hero__copy > *:nth-child(6) { animation-delay: 290ms; }
  .js-ready .home-phone {
    animation: home-float 6.5s ease-in-out 900ms infinite;
  }
}

@keyframes home-rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes home-float {
  0%, 100% { transform: rotate(1.25deg) translateY(0); }
  50% { transform: rotate(1.25deg) translateY(-10px); }
}

/* ── Responsive ──────────────────────────────────────── */
@media (max-width: 980px) {
  .home-hero {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .home-hero__visual {
    justify-content: flex-start;
  }

  .home-phone {
    transform: rotate(0deg);
    animation: none;
  }

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

@media (max-width: 820px) {
  .home-strip__grid {
    grid-template-columns: 1fr;
  }

  .home-steps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  body {
    --brand-padding: 1.75rem 1.15rem 0;
    --brand-justify: center;
  }

  .portal-logo {
    width: 100%;
    justify-content: center;
  }

  .home-wrapper {
    padding: 2.75rem 1.15rem 4rem;
  }

  .btn {
    width: 100%;
  }

  .home-phone__screen > a.btn {
    width: fit-content;
  }

  .home-panel {
    padding: 2.1rem 1.35rem;
  }
}
