/* ============================================================
   STYLE GUIDE (read me first)
   ------------------------------------------------------------
   Colors live in the :root block below. Change them there and
   the whole site updates.

   Shape rule for the whole site:
     - Buttons  = pill (fully rounded)
     - Cards    = 16px corners
     - Inputs   = 10px corners

   Fonts:
     - Headlines = "Space Grotesk"
     - Body text = "Instrument Sans"

   Sections in this file, in order:
     1. Tokens + reset        5. Pain section
     2. Buttons               6. How it works
     3. Nav bar               7. Results
     4. Hero                  8. Contact form
                              9. Footer
                             10. Animations + reduced motion
   ============================================================ */

/* ---------- 1. TOKENS + RESET ---------- */
:root {
  /* The one accent color. Used for buttons, numbers, highlights. */
  --accent: #4733f2;
  --accent-dark: #3423cc;      /* hover state */
  --accent-tint: #edebfe;      /* pale indigo wash for backgrounds */
  --accent-glow: rgba(71, 51, 242, 0.22);

  --bg: #fbfbfd;               /* page background (off-white, not pure white) */
  --ink: #15151c;              /* main text (off-black) */
  --ink-soft: #565664;         /* secondary text */
  --line: #e6e6ee;             /* hairline borders */

  --font-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "Instrument Sans", "Helvetica Neue", Arial, sans-serif;

  --radius-card: 16px;
  --radius-input: 10px;

  --container: 1160px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

/* Shared section heading style */
.section-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2rem, 4.5vw, 3.25rem);
  line-height: 1.05;
  letter-spacing: -0.02em;
  margin: 0 0 1.5rem;
}

/* The single small uppercase label on the page (hero only) */
.eyebrow {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1rem;
}

/* ---------- 2. BUTTONS ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  text-decoration: none;
  border: none;
  border-radius: 999px;              /* pill shape, per the shape rule */
  cursor: pointer;
  white-space: nowrap;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.25s cubic-bezier(0.16, 1, 0.3, 1),
              background-color 0.25s ease,
              border-color 0.25s ease;
}

.btn--primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: 0 6px 18px -8px var(--accent-glow);
}
.btn--primary:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -10px var(--accent-glow);
}
.btn--primary:active { transform: translateY(0) scale(0.98); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border: 1.5px solid var(--line);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}
.btn--ghost:active { transform: translateY(0) scale(0.98); }

.btn--lg { padding: 16px 32px; font-size: 1.0625rem; }
.btn--sm { padding: 10px 22px; font-size: 0.9375rem; }

/* ---------- 3. NAV BAR ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  transition: background-color 0.3s ease, box-shadow 0.3s ease,
              backdrop-filter 0.3s ease;
}
/* .nav--scrolled is added by JS once the page moves */
.nav--scrolled {
  background: rgba(251, 251, 253, 0.82);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
}
/* Little square monogram mark next to the name */
.nav__mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: linear-gradient(135deg, var(--accent), #7a63ff);
  flex-shrink: 0;
}

/* ---------- 4. HERO ---------- */
.hero {
  position: relative;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  overflow: hidden;
  padding-top: 68px;   /* clears the fixed nav */
}
.hero__inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 56px;
  align-items: center;
}
.hero__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.5rem, 4.6vw, 3.875rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin: 0 0 1.5rem;
}
.hero__sub {
  font-size: clamp(1.0625rem, 2vw, 1.3125rem);
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 0 2.25rem;
}
.hero__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* Small trust line under the hero buttons: "Free 20 minute call" etc.
   Each item gets an indigo check mark drawn in CSS. */
.hero__trust {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 22px;
  margin: 18px 0 0;
  padding: 0;
  color: var(--ink-soft);
  font-size: 0.9375rem;
  font-weight: 500;
}
.hero__trust li {
  display: flex;
  align-items: center;
  gap: 8px;
}
.hero__trust li::before {
  content: "";
  width: 14px;
  height: 8px;
  border-left: 2.5px solid var(--accent);
  border-bottom: 2.5px solid var(--accent);
  transform: rotate(-45deg) translateY(-2px);
  flex-shrink: 0;
}

/* The soft indigo glow, drifting slowly behind the headline */
.hero__glow {
  position: absolute;
  top: -10%;
  right: -12%;
  width: 58vw;
  height: 58vw;
  max-width: 820px;
  max-height: 820px;
  background: radial-gradient(circle at center,
              var(--accent-glow) 0%,
              rgba(122, 99, 255, 0.10) 42%,
              transparent 68%);
  border-radius: 50%;
  animation: glow-drift 14s ease-in-out infinite alternate;
  pointer-events: none;
}
/* Faint grid texture on the right side, fades toward the text */
.hero__grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 60% 60% at 78% 40%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 60% 60% at 78% 40%, black 0%, transparent 70%);
  opacity: 0.7;
  pointer-events: none;
}

@keyframes glow-drift {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-6%, 8%) scale(1.12); }
}

/* The hero chart: a typical week, before vs after automation.
   The bars grow from zero once the card fades in. */
.hero__visual { min-width: 0; }
.chart {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 28px 26px;
  box-shadow: 0 30px 70px -35px rgba(21, 21, 28, 0.25);
}
.chart__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.0625rem;
  margin: 0 0 6px;
}
.chart__legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.8125rem;
  color: var(--ink-soft);
  margin: 0 0 18px;
}
.chart__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}
.chart__dot--before { background: #d9d9e3; }
.chart__dot--after { background: var(--accent); margin-left: 12px; }

.chart__row { margin-bottom: 14px; }
.chart__label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.chart__track {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 3px;
}
.chart__bar {
  display: block;
  height: 9px;
  border-radius: 999px;
  width: 0; /* grows to --w when the card reveals */
  transition: width 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.35s;
}
.reveal--in .chart__bar { width: var(--w); }
.chart__bar--before { background: #d9d9e3; }
.chart__bar--after { background: var(--accent); }
.chart__val {
  font-size: 0.75rem;
  color: var(--ink-soft);
  min-width: 30px;
  font-variant-numeric: tabular-nums;
}
.chart__total {
  border-top: 1px solid var(--line);
  padding-top: 14px;
  margin: 18px 0 0;
  font-size: 0.9375rem;
}
.chart__total strong { color: var(--accent); }
.chart__footnote {
  font-size: 0.75rem;
  color: var(--ink-soft);
  margin: 6px 0 0;
}

/* ---------- 5. PAIN SECTION ---------- */
.pain {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}
.pain__layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 48px;
  align-items: start;
}
.pain__head { position: sticky; top: 100px; }
/* The busywork-to-blocks image under the heading */
.pain__image {
  display: block;
  width: 100%;
  max-width: 340px;
  height: auto;
  margin-top: 28px;
  border-radius: var(--radius-card);
  border: 1px solid var(--line);
}
.pain__list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.pain__item {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  padding: 32px 0;
}
.pain__item + .pain__item { border-top: 1px solid var(--line); }

/* ---------- 6. HOW IT WORKS ---------- */
.how {
  padding: 120px 0 140px;
  background: linear-gradient(180deg, var(--bg) 0%, var(--accent-tint) 160%);
  border-top: 1px solid var(--line);
}
.how__title { max-width: 22ch; margin-bottom: 4rem; }

.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
/* The connecting line behind the step numbers */
.steps__line {
  position: absolute;
  top: 27px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(71, 51, 242, 0.15));
  z-index: 0;
}
.step {
  position: relative;
  z-index: 1;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 32px 28px 36px;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
}
.step:hover {
  transform: translateY(-6px);
  border-color: var(--accent);
  box-shadow: 0 24px 48px -24px var(--accent-glow);
}
/* Staircase offsets so the three cards do not sit in a flat row */
.step--mid  { margin-top: 44px; }
.step--last { margin-top: 88px; }

.step__num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.125rem;
  color: #ffffff;
  background: var(--accent);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
}
.step__icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
  margin-bottom: 14px;
}
.step__chip {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--accent);
  background: var(--accent-tint);
  border-radius: 999px;
  padding: 4px 12px;
  margin-bottom: 8px;
}
.step__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.375rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.5rem;
}
.step__body {
  color: var(--ink-soft);
  margin: 0;
}

/* ---------- 6.5 THE TOOLBOX ---------- */
.toolbox {
  padding: 110px 0;
  border-top: 1px solid var(--line);
}
.toolbox__sub {
  color: var(--ink-soft);
  margin: -0.5rem 0 2.5rem;
}
.toolbox__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px 40px;
}
.toolgroup__label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1rem;
  margin: 0 0 10px;
}
.toolgroup__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.toolgroup__chips span {
  display: inline-block;
  background: var(--accent-tint);
  color: var(--ink);
  font-size: 0.875rem;
  font-weight: 500;
  border-radius: 999px;
  padding: 6px 14px;
}
.toolbox__note {
  margin: 2.75rem 0 0;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.125rem;
  max-width: 34rem;
}

/* ---------- 7. RESULTS ---------- */
.results {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}
.results__layout {
  display: grid;
  grid-template-columns: 6fr 5fr;
  gap: 64px;
  align-items: start;
}
.stat { margin-top: 2.5rem; }
.stat__num {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(3rem, 7vw, 5rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--accent);
}
.stat__label {
  display: block;
  color: var(--ink-soft);
  max-width: 26rem;
  margin-top: 0.5rem;
}
/* The "part-time employee, minus the payroll" comparison line */
.results__note {
  margin: 2.5rem 0 0;
  padding-left: 18px;
  border-left: 3px solid var(--accent);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1875rem;
  max-width: 28rem;
}
.results__examples {
  background: var(--accent-tint);
  border-radius: var(--radius-card);
  padding: 40px 36px;
}
.results__examples-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  margin: 0 0 1.5rem;
}
.examples {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 20px;
}
.examples__item {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-weight: 500;
}
.examples__check {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--accent);
  margin-top: 2px;
}

/* ---------- 8. CONTACT FORM ---------- */
.contact {
  padding: 120px 0;
  border-top: 1px solid var(--line);
}
.contact__layout {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 64px;
  align-items: start;
}
.next-steps {
  margin: 1rem 0 0;
  padding: 0 0 0 1.25rem;
  display: grid;
  gap: 14px;
  color: var(--ink-soft);
}
.next-steps__item { padding-left: 6px; }
.next-steps__item::marker {
  color: var(--accent);
  font-weight: 700;
  font-family: var(--font-display);
}

.form {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: var(--radius-card);
  padding: 40px 36px;
  box-shadow: 0 30px 60px -40px rgba(21, 21, 28, 0.18);
}
.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.form__group {
  display: grid;
  gap: 7px;
  margin-bottom: 18px;
}
.form__label {
  font-weight: 600;
  font-size: 0.9375rem;
}
.form__optional {
  font-weight: 400;
  color: var(--ink-soft);
}
.form__input {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--radius-input);
  padding: 12px 14px;
  width: 100%;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.form__input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.form__input::placeholder { color: #8b8b99; }
.form__select { appearance: none; }
.form__textarea { resize: vertical; min-height: 100px; }

/* Error message under each field. Hidden until JS shows it. */
.form__error {
  display: none;
  color: #c02543;
  font-size: 0.875rem;
  margin: 0;
}
.form__group--invalid .form__error { display: block; }
.form__group--invalid .form__input { border-color: #c02543; }

/* Honeypot spam trap: moved off screen, invisible to people */
.form__trap {
  position: absolute;
  left: -9999px;
  top: -9999px;
}

.form__submit {
  width: 100%;
  margin-top: 6px;
}
.form__submit:disabled {
  opacity: 0.6;
  cursor: wait;
  transform: none;
}

/* Step 2 of the form: the optional deep-dive questions */
.form--step2 { margin-top: 0; }
.form__step2-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.25rem;
}
.form__step2-sub {
  color: var(--ink-soft);
  margin: 0 0 1.5rem;
}
.form__fieldset {
  border: none;
  padding: 0;
  margin: 0 0 18px;
}
.form__checks {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 16px;
}
.form__check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.9375rem;
  cursor: pointer;
}
.form__check input {
  accent-color: var(--accent);
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
}
.form__skip {
  display: block;
  width: 100%;
  margin-top: 12px;
  background: none;
  border: none;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 0.9375rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.form__skip:hover { color: var(--accent); }

/* Status line after submitting (success or failure) */
.form__status {
  margin: 16px 0 0;
  font-weight: 500;
  display: none;
}
.form__status--ok    { display: block; color: #147a4d; }
.form__status--fail  { display: block; color: #c02543; }

/* ---------- 9. FOOTER ---------- */
.footer {
  border-top: 1px solid var(--line);
  padding: 100px 0 60px;
  text-align: center;
  background: linear-gradient(180deg, var(--bg) 0%, var(--accent-tint) 220%);
}
.footer__inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 22px;
}
.footer__pitch {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 3vw, 2rem);
  letter-spacing: -0.01em;
  margin: 0;
}
.footer__email {
  color: var(--ink-soft);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: color 0.2s ease, border-color 0.2s ease;
}
.footer__email:hover {
  color: var(--accent);
  border-color: var(--accent);
}
.footer__legal {
  color: var(--ink-soft);
  font-size: 0.875rem;
  margin: 18px 0 0;
}

/* ---------- 10. ANIMATIONS + REDUCED MOTION ---------- */
/* Elements with .reveal start invisible and slide up when they
   scroll into view. JS adds .reveal--in to trigger it. */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal--in {
  opacity: 1;
  transform: translateY(0);
}

/* If the visitor asked their device for less motion, respect it:
   everything appears instantly and nothing drifts. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero__glow { animation: none; }
  .btn, .step { transition: none; }
  .chart__bar { transition: none; width: var(--w); }
}

/* ---------- MOBILE LAYOUT (under 860px) ---------- */
@media (max-width: 860px) {
  /* The forced headline line break only helps on wide screens.
     On phones we let the text wrap naturally. */
  .desktop-break { display: none; }

  /* Hero stacks: text first, chart below */
  .hero { padding-top: 100px; padding-bottom: 60px; }
  .hero__inner { grid-template-columns: 1fr; gap: 40px; }

  /* Step 2 checkboxes go single column */
  .form__checks { grid-template-columns: 1fr; }

  /* Toolbox groups stack in one column */
  .toolbox { padding: 80px 0; }
  .toolbox__grid { grid-template-columns: 1fr; gap: 26px; }

  .pain, .how, .results, .contact { padding-top: 80px; padding-bottom: 80px; }

  .hero__inner { margin-left: 24px; }

  .pain__layout,
  .results__layout,
  .contact__layout {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .pain__head { position: static; }

  /* Steps become a vertical timeline */
  .steps { grid-template-columns: 1fr; gap: 22px; }
  .steps__line {
    top: 5%;
    bottom: 5%;
    left: 27px;
    right: auto;
    width: 2px;
    height: auto;
    background: linear-gradient(180deg, var(--accent), rgba(71, 51, 242, 0.15));
  }
  .step--mid, .step--last { margin-top: 0; }

  .form { padding: 28px 20px; }
  .form__row { grid-template-columns: 1fr; gap: 0; }
}

/* Very small phones: hide the nav CTA text less, shrink brand */
@media (max-width: 420px) {
  .nav__brand { font-size: 0.9375rem; }
  .btn--sm { padding: 9px 16px; font-size: 0.875rem; }
}
