/* ═══════════════════════════════════════════
   comni — Stitch Design System
   Clean · White · Green accents · Structured
   ═══════════════════════════════════════════ */

:root {
  --green:       #00BA87;
  --green-dark:  #009E72;
  --green-soft:  #E6FAF2;
  --green-bg:    #F0FDF7;
  --gold:        #F5A500;
  --gold-soft:   #FFF5DD;
  --purple:      #6A2488;
  --purple-soft: #F3EAFA;
  --navy:        #003B6C;
  --navy-dark:   #0A1F33;

  --bg:      #F5F6F4;
  --surface: #FFFFFF;
  --border:  #E5E5E0;
  --text:    #1A1A1A;
  --text-2:  #555;
  --text-3:  #999;

  --r: 16px; --r-lg: 24px; --r-xl: 32px;
  --wrap: 1120px;
  --shadow: 0 2px 12px rgba(0,0,0,.04);
  --shadow-lg: 0 8px 30px rgba(0,0,0,.06);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Inter', system-ui, sans-serif;
  color: var(--text); background: var(--bg);
  overflow-x: hidden; line-height: 1.65;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

.wrap { width: min(var(--wrap), calc(100% - 2rem)); margin-inline: auto; }

/* ═══════════════════════
   NAV
   ═══════════════════════ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  padding: 1rem 0; transition: padding 300ms, background 300ms;
}
.nav--scrolled {
  padding: .5rem 0;
  background: rgba(245,246,244,.9);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
}

.nav__bar {
  display: flex; align-items: center; gap: 1.5rem;
}

.nav__brand { flex-shrink: 0; display: flex; align-items: flex-start; gap: .6rem; }
.nav__logo-icon { height: 70px; width: auto; transition: height .25s ease; }
.nav__logo-text { height: 90px; width: auto; transition: height .25s ease; }
.nav--scrolled .nav__logo-icon { height: 40px; }
.nav--scrolled .nav__logo-text { height: 46px; }

.nav__right {
  display: flex; align-items: center; gap: 1rem; margin-left: auto;
}

.nav__cta {
  font-size: .85rem; font-weight: 700; color: #fff;
  background: var(--green); border: none; border-radius: 999px;
  padding: .55rem 1.3rem; cursor: pointer;
  transition: transform 200ms, box-shadow 200ms;
}
.nav__cta:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(0,186,135,.25); }

/* ── Modal ── */
.modal {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 250ms ease;
}
.modal.open { opacity: 1; pointer-events: auto; }
.modal__backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,.45); backdrop-filter: blur(6px);
}
.modal__panel {
  position: relative; z-index: 1;
  background: var(--surface); border-radius: var(--r-lg);
  padding: 2.5rem; width: 90%; max-width: 520px;
  box-shadow: 0 24px 64px rgba(0,0,0,.15);
  transform: translateY(16px); transition: transform 250ms ease;
}
.modal.open .modal__panel { transform: translateY(0); }
.modal__close {
  position: absolute; top: 1rem; right: 1.2rem;
  background: none; border: none; font-size: 1.6rem;
  color: var(--text-2); cursor: pointer; line-height: 1;
}
.modal__close:hover { color: var(--text); }
.modal__title {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.5rem; font-weight: 700; margin-bottom: .35rem;
}
.modal__desc {
  font-size: .9rem; color: var(--text-2); margin-bottom: 1.5rem;
}

/* ── Contact Form ── */
.visually-hidden { position: absolute; overflow: hidden; clip: rect(0,0,0,0); width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; }
.contact-form { display: flex; flex-direction: column; gap: 1rem; }
.contact-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form__field { display: flex; flex-direction: column; gap: .3rem; }
.contact-form__field label {
  font-size: .78rem; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em;
}
.contact-form__field input,
.contact-form__field textarea {
  font-family: 'Inter', sans-serif; font-size: .92rem;
  padding: .65rem .85rem;
  border: 1px solid var(--border); border-radius: var(--r);
  background: var(--bg); color: var(--text);
  transition: border-color 200ms, box-shadow 200ms;
  outline: none;
}
.contact-form__field input:focus,
.contact-form__field textarea:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(0,186,135,.12);
}
.contact-form__field textarea { resize: vertical; }
.contact-form__submit { margin-top: .5rem; width: 100%; }
.contact-form__success {
  text-align: center; padding: 2rem 0;
  font-size: 1.1rem; font-weight: 600; color: var(--green);
}
@media (max-width: 480px) {
  .contact-form__row { grid-template-columns: 1fr; }
  .modal__panel { padding: 1.8rem 1.4rem; }
}

/* ═══════════════════════
   BUTTONS
   ═══════════════════════ */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: .9rem; padding: .65rem 1.4rem;
  border-radius: 999px; border: none; cursor: pointer;
  transition: transform 200ms, box-shadow 200ms;
}
.btn:hover { transform: translateY(-1px); }
.btn--primary { color: #fff; background: var(--green); box-shadow: 0 4px 14px rgba(0,186,135,.2); }
.btn--primary:hover { box-shadow: 0 6px 20px rgba(0,186,135,.3); }
.btn--ghost { color: var(--text); background: transparent; border: 1.5px solid var(--border); }
.btn--ghost:hover { border-color: var(--green); color: var(--green-dark); }
.btn--white { color: var(--navy-dark); background: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.08); }
.btn--white:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); }
.btn--ghost-dark { color: rgba(255,255,255,.8); background: transparent; border: 1.5px solid rgba(255,255,255,.25); }
.btn--ghost-dark:hover { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--lg { padding: .78rem 1.8rem; font-size: .94rem; }

/* ═══════════════════════
   HERO — split layout
   ═══════════════════════ */
.hero {
  padding: 10rem 0 2rem;
  background: var(--surface);
}

.hero__split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 2rem; align-items: center;
}

.hero__text h1 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1; letter-spacing: -.03em;
  color: var(--text);
}
.hero__text p {
  margin-top: 1rem; color: var(--text-2);
  font-size: .98rem; line-height: 1.75; max-width: 480px;
}
.hero__actions {
  margin-top: 1.6rem; display: flex; flex-wrap: wrap; gap: .6rem;
}

.hero__svg {
  width: 100%; max-width: 480px; margin: 0 auto; display: block;
}

/* Floating node animation */
.node-float {
  animation: nodeFloat 4s ease-in-out infinite alternate;
  animation-delay: var(--d, 0s);
}
@keyframes nodeFloat {
  to { transform: translateY(-6px); }
}

/* ═══════════════════════
   STATS BAR — green rounded
   ═══════════════════════ */
.improve-bar {
  position: relative; z-index: 1;
  margin-top: -.5rem; padding: 1.5rem 0;
}
.improve-bar__inner {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem;
}
.improve-bar__item {
  display: flex; align-items: center; gap: .65rem;
  padding: .85rem 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  transition: box-shadow .25s ease, border-color .25s ease;
}
.improve-bar__item:hover {
  border-color: var(--green);
  box-shadow: 0 4px 16px rgba(0,186,135,.08);
}
.improve-bar__arrow {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border-radius: 50%;
  flex-shrink: 0;
}
.improve-bar__arrow--up {
  background: rgba(0,186,135,.1); color: var(--green);
}
.improve-bar__arrow--down {
  background: rgba(0,186,135,.1); color: var(--green);
}
.improve-bar__label {
  display: block;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .95rem; font-weight: 600; color: var(--text);
  line-height: 1.2;
}
.improve-bar__desc {
  display: none;
  font-size: .75rem; color: var(--text-2); font-weight: 400;
}
@media (min-width: 900px) {
  .improve-bar__item { flex-wrap: wrap; }
  .improve-bar__desc { display: block; width: 100%; padding-left: calc(30px + .65rem); margin-top: -.15rem; }
}

/* ═══════════════════════
   SECTIONS
   ═══════════════════════ */
.section { padding: 4.5rem 0; }

.section__title {
  text-align: center;
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  color: var(--text); margin-bottom: 2.5rem;
}

/* ── Problem ── */
.section--problem { background: var(--surface); }

.problem-grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem;
  text-align: center;
}
.problem-card__icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--green-bg);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto .8rem;
}
.problem-card h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1rem; font-weight: 700; color: var(--text); margin-bottom: .5rem;
}
.problem-card p {
  color: var(--text-2); font-size: .88rem; line-height: 1.68;
}

/* ── Answer ── */
.section--answer {
  background: var(--bg);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.answer {
  display: flex; align-items: center; justify-content: center; gap: 2rem;
  margin-bottom: 2rem;
}
.answer__side {
  display: flex; flex-direction: column; gap: .6rem;
}
.answer__tag {
  font-size: .82rem; font-weight: 600; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; padding: .4rem 1rem;
  position: relative;
}
.answer__side--left .answer__tag::after,
.answer__side--right .answer__tag::before {
  content: ''; position: absolute; top: 50%;
  width: 24px; height: 1.5px; background: var(--green);
  opacity: .4;
}
.answer__side--left .answer__tag::after { right: -26px; }
.answer__side--right .answer__tag::before { left: -26px; }

.answer__hub {
  width: 130px; height: 130px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--green);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 24px rgba(0,186,135,.12);
  flex-shrink: 0;
}
.answer__logo { width: 90px; height: auto; }

.answer__copy {
  max-width: 780px; margin: 0 auto; text-align: center;
}
.answer__copy p {
  color: var(--text-2); font-size: .94rem; line-height: 1.75;
  margin-top: .8rem;
}

/* ── How it Works (combined) ── */
.section--how {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
}

.step-block {
  position: relative;
  padding: 2.2rem 2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-right: none;
  transition: background .25s ease, box-shadow .25s ease;
}
.step-block:first-child { border-radius: var(--r-lg) 0 0 var(--r-lg); }
.step-block:last-child { border-radius: 0 var(--r-lg) var(--r-lg) 0; border-right: 1px solid var(--border); }

.step-block:hover {
  background: var(--bg);
  box-shadow: 0 8px 32px rgba(0,0,0,.04);
}

.step-block__icon {
  display: flex; align-items: center; justify-content: center;
  width: 46px; height: 46px; border-radius: 12px;
  flex-shrink: 0;
}
.step-block--green .step-block__icon { background: rgba(0,186,135,.1); color: var(--green); }
.step-block--gold .step-block__icon { background: rgba(245,165,0,.1); color: var(--gold); }
.step-block--purple .step-block__icon { background: rgba(106,36,136,.1); color: var(--purple); }
.step-block--navy .step-block__icon { background: rgba(0,59,108,.1); color: var(--navy); }

.step-block__num {
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 800; font-size: .78rem; color: #fff;
  flex-shrink: 0;
}
.step-block--green .step-block__num { background: var(--green); }
.step-block--gold .step-block__num { background: var(--gold); }
.step-block--purple .step-block__num { background: var(--purple); }
.step-block--navy .step-block__num { background: var(--navy); }

.step-block__header {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.2rem;
}

.step-block--green { border-top: 3px solid var(--green); }
.step-block--gold { border-top: 3px solid var(--gold); }
.step-block--purple { border-top: 3px solid var(--purple); }
.step-block--navy { border-top: 3px solid var(--navy); }

.step-block__connector {
  position: absolute;
  top: 2.2rem; right: -1.5rem;
  width: 3rem; height: 44px;
  z-index: 2;
  display: flex; align-items: center; justify-content: center;
}
.step-block__connector::before {
  content: '';
  display: block; width: 100%; height: 2px;
  background: var(--green);
  opacity: .35;
}
.step-block__connector::after {
  content: '';
  position: absolute; right: 4px;
  width: 8px; height: 8px;
  border-top: 2px solid var(--green);
  border-right: 2px solid var(--green);
  transform: rotate(45deg);
  opacity: .45;
}

.step-block h3 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.25rem; font-weight: 700; color: var(--text);
  margin-bottom: .5rem;
}
.step-block p {
  color: var(--text-2);
  font-size: .9rem; line-height: 1.7;
}

/* ═══════════════════════
   CTA — dark card
   ═══════════════════════ */
.cta { padding-bottom: 4rem; }
.cta__card {
  text-align: center;
  background: var(--navy-dark);
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 5vw, 4rem);
  color: #fff;
  box-shadow: 0 16px 48px rgba(10,31,51,.25);
}
.cta__card h2 {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.3rem); line-height: 1.12;
}
.cta__card p {
  margin: .8rem auto 1.6rem; color: rgba(255,255,255,.7);
  max-width: 600px; font-size: .94rem; line-height: 1.75;
}
.cta__actions {
  display: flex; flex-wrap: wrap; gap: .6rem; justify-content: center;
}

/* ═══════════════════════
   FOOTER
   ═══════════════════════ */
.footer {
  padding: 2rem 0 2.5rem;
  background: var(--bg);
}
.footer__inner {
  display: flex; align-items: center; justify-content: space-between;
}
.footer__logo { height: 48px; width: auto; opacity: .7; }
.footer__copy {
  font-size: .8rem; color: var(--text-3); margin: 0;
}

/* ═══════════════════════
   SCROLL TO TOP
   ═══════════════════════ */
.scroll-top {
  position: fixed; bottom: 2rem; right: 2rem; z-index: 90;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--green); color: #fff; border: none;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0,186,135,.25);
  opacity: 0; transform: translateY(12px);
  pointer-events: none;
  transition: opacity .3s ease, transform .3s ease, background .2s ease;
}
.scroll-top.visible {
  opacity: 1; transform: translateY(0);
  pointer-events: auto;
}
.scroll-top:hover {
  background: var(--green-dark);
  box-shadow: 0 6px 20px rgba(0,186,135,.35);
}

/* ═══════════════════════
   REVEAL
   ═══════════════════════ */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity 550ms cubic-bezier(.16,1,.3,1), transform 550ms cubic-bezier(.16,1,.3,1);
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ═══════════════════════
   RESPONSIVE
   ═══════════════════════ */
@media (max-width: 1060px) {
  .hero__split { grid-template-columns: 1fr; }
  .hero__svg { max-width: 400px; }
  .problem-grid { grid-template-columns: 1fr; gap: 1.5rem; }
  .steps-grid { grid-template-columns: 1fr 1fr; }
  .step-block:first-child { border-radius: var(--r-lg) 0 0 0; }
  .step-block:nth-child(2) { border-radius: 0 var(--r-lg) 0 0; border-right: 1px solid var(--border); }
  .step-block:nth-child(3) { border-radius: 0 0 0 var(--r-lg); border-top: none; }
  .step-block:last-child { border-radius: 0 0 var(--r-lg) 0; border-top: none; }
  .step-block:nth-child(2) .step-block__connector { display: none; }
  .step-block:nth-child(3) .step-block__connector { display: none; }
  .answer { flex-wrap: wrap; }
}

@media (max-width: 720px) {
  .nav__right { display: none; }

  .hero { padding: 9rem 0 1.5rem; }
  .hero__text h1 { font-size: clamp(1.8rem, 8vw, 2.4rem); }

  .improve-bar__inner { grid-template-columns: 1fr 1fr; }

  .answer { flex-direction: column; }
  .answer__side--left .answer__tag::after,
  .answer__side--right .answer__tag::before { display: none; }

  .steps-grid { grid-template-columns: 1fr; }
  .step-block { border-right: 1px solid var(--border) !important; border-radius: 0 !important; }
  .step-block:first-child { border-radius: var(--r-lg) var(--r-lg) 0 0 !important; }
  .step-block:last-child { border-radius: 0 0 var(--r-lg) var(--r-lg) !important; }
  .step-block:not(:first-child) { border-top: none; }
  .step-block__connector { display: none; }

  .hero__actions .btn,
  .cta__actions .btn { width: 100%; }

  .footer__inner { flex-direction: column; gap: 1rem; text-align: center; }
}

@media (max-width: 480px) {
  .improve-bar__inner { grid-template-columns: 1fr 1fr; gap: .75rem; }
  .improve-bar__item { padding: .7rem .85rem; }
  .section { padding: 3rem 0; }
  .step-block { padding: 1.5rem 1.2rem; }
}
