/* The home page, laid out like the home page of the FinDash Figma file (the
   "Area" kit): a display headline over the product in a device frame, then
   sections divided by thin rules, each with a mono caption, a serif heading
   and plain text, the kit's numbered lists, comparison table and three
   steps, a centred call to action and the questions people ask. Colours,
   type, buttons, the nav and the footer come from site.css. */

main {
  padding: 0 var(--gutter);
}
main > section,
main > .photo {
  max-width: var(--page-width);
  margin-left: auto;
  margin-right: auto;
}

/* ---- the header: headline, buttons, the product ---- */
.hero {
  padding-top: clamp(32px, 6vw, 72px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.eyebrow {
  margin: 0 0 28px;
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.4;
  letter-spacing: -0.01em;
  color: var(--caption);
  text-wrap: balance;
}
/* The kit's display headline: one line from a small laptop up, two on a
   phone. */
.hero-title {
  margin: 0;
  font-size: clamp(52px, 10.4vw, 150px);
  text-wrap: balance;
}
/* What FinDash is, and the waitlist button, under the product. */
.intro {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(56px, 8vw, 104px) 0 clamp(64px, 9vw, 120px);
}
.intro .caption {
  margin: 0;
}
.lede {
  margin: 24px 0 0;
  max-width: 54ch;
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.cta-row {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 12px;
}
.cta-note {
  margin-top: 16px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--ink-3);
}

/* The product in a device frame, standing on a sage block. The frame rises
   above the block and is cut off at its foot, as in the kit. */
.hero-visual {
  position: relative;
  width: 100%;
  margin-top: clamp(8px, 2vw, 24px);
  padding-top: clamp(16px, 3.6vw, 64px);
  overflow: hidden;
}
.hero-block {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 80%;
  background: #8e9c78;
  border-radius: var(--radius-image);
}
.device {
  position: relative;
  width: min(907px, 80%);
  margin: 0 auto -18%;
  aspect-ratio: 907 / 644;
  padding: 16px 18px 0;
  background: #000000;
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-bottom: 0;
  border-radius: 24px;
  box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}
.device img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  border-radius: 16px;
  background: #ffffff;
}
.device {
  transform-origin: 50% 100%;
}

/* ---- sections: a thin rule above, the kit's spacing ---- */
.section {
  border-top: 1px solid var(--line);
  padding: clamp(56px, 7vw, 80px) 0 clamp(48px, 6vw, 60px);
}
.section-text {
  display: flex;
  flex-direction: column;
  gap: clamp(24px, 4vw, 50px);
  padding-right: min(400px, 30%);
}
.section-text > *,
.split-text > *,
.specs-text > * {
  margin: 0;
}
/* "What is FinDash?": the kit's Heading 1, set here rather than by a class so
   the heading reads the same in the HTML that search engines and AI agents
   see. */
.section-text h2 {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: clamp(40px, 5.4vw, 60px);
  line-height: 0.9;
  letter-spacing: -0.03em;
}
.about-lede,
.section-more {
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink-2);
}
.section-more {
  margin: 8px 0 0;
}
.section-more a,
.specs-text a {
  color: var(--ink);
  text-underline-offset: 3px;
}

/* The kit's row of four, each under a thin rule with an icon. */
.benefits {
  list-style: none;
  margin: 0;
  padding: 40px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.benefits li {
  flex: 1 1 0;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 40px 20px 40px 0;
}
.benefits svg {
  color: var(--ink);
}
.benefits h3,
.three-up h3 {
  margin: 4px 0 0;
}
.benefits p,
.three-up p {
  margin: 0;
  font-size: 15px;
  line-height: 1.4;
  color: var(--ink-2);
}

/* ---- photos: the kit's, as decoration ---- */
.photo {
  overflow: hidden;
  border-radius: var(--radius-image);
}
.photo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.photo-wide {
  aspect-ratio: 1200 / 620;
  margin-bottom: clamp(64px, 9vw, 120px);
}

/* ---- the kit's numbered list beside a photo ---- */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding-bottom: clamp(64px, 9vw, 120px);
}
.split-text {
  border-top: 1px solid var(--line);
  padding: 60px 0 80px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 40px;
}
.split-text .heading-1,
.split-text .paragraph {
  padding-right: 80px;
}
.numbered {
  list-style: none;
  width: 100%;
  margin: 0;
  padding: 0;
}
.numbered li {
  display: flex;
  gap: 30px;
  border-top: 1px solid var(--line);
  padding: 20px 80px 20px 0;
  font-size: 15px;
  line-height: 1.4;
}
.numbered span {
  flex: none;
  font-weight: 700;
  color: var(--ink-2);
}
.numbered p {
  margin: 0;
  color: var(--ink);
}
.photo-tall {
  min-height: 480px;
}

/* ---- the sample figures, as the kit's comparison table ---- */
.specs {
  border-top: 1px solid var(--line-strong);
  padding-bottom: clamp(64px, 9vw, 120px);
}
.specs-text {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
  padding: clamp(56px, 7vw, 80px) min(240px, 12%);
}
.preview {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: 20px;
}
.preview .cell {
  min-width: 0;
  padding: 32px 30px;
  border-left: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.preview .cell:first-child {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.preview .cell:nth-child(2) {
  border-left: 0;
}
.preview .cell p {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--caption);
}
.preview .cell strong {
  display: block;
  margin: 18px 0 10px;
  font-size: clamp(30px, 3.4vw, 40px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.045em;
  color: var(--ink);
}
.preview .cell small {
  display: block;
  font-size: 13px;
  color: var(--ink-2);
}
.preview .cell small.bad,
.preview .cell strong.bad {
  color: var(--critical);
}

/* ---- the forecast example ---- */
.forecast-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
}
.forecast-head > div:first-child {
  flex: 1 1 520px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}
.forecast-head > div:first-child > * {
  margin: 0;
}
.forecast-legend {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: -0.01em;
  color: var(--ink-2);
}
.forecast-legend > span {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink);
}
.legend-dot.proj {
  background: transparent;
  border: 2px solid var(--accent);
}
.forecast-chart {
  display: block;
  width: 100%;
  max-width: 900px;
  height: auto;
  margin: 40px auto 0;
  overflow: visible;
}
.forecast-chart .grid-line {
  stroke: var(--line);
  stroke-width: 1;
}
.forecast-chart .divider {
  stroke: var(--line-strong);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}
.forecast-chart .line-actual {
  fill: none;
  stroke: var(--ink);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.forecast-chart .line-projected {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.5;
  stroke-dasharray: 7 6;
  stroke-linecap: round;
}
.forecast-chart .dot-actual {
  fill: var(--ink);
}
.forecast-chart .dot-projected {
  fill: var(--ground);
  stroke: var(--accent);
  stroke-width: 2.5;
}
.forecast-chart .axis-label {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 9px;
}
.forecast-chart .proj-label {
  fill: var(--caption);
  font-family: var(--mono);
  font-size: 9px;
}
.forecast-chart .zero-line {
  stroke: var(--line-strong);
  stroke-width: 1;
}
.forecast-chart .zero-label {
  fill: var(--ink-2);
  font-family: var(--mono);
  font-size: 9px;
}
.forecast-note {
  margin: 24px 0 0;
  font-size: 13px;
  color: var(--ink-3);
}

/* ---- the kit's three steps ---- */
.steps-section {
  padding-bottom: clamp(64px, 9vw, 120px);
}
.steps-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}
.steps-head .heading-1 {
  margin: 0;
}
.three-up {
  list-style: none;
  margin: clamp(48px, 6vw, 80px) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}
.three-up li {
  flex: 1 1 0;
  min-width: 240px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  border-top: 1px solid var(--line);
  padding: 60px 30px 20px 0;
}
.step-number {
  margin-bottom: 40px;
  font-size: 80px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink-faint);
}

/* ---- the kit's centred call to action ---- */
.centered-cta {
  border-top: 1px solid var(--line);
  padding: clamp(72px, 9vw, 120px) min(300px, 15%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 40px;
  text-align: center;
}
.centered-cta > * {
  margin: 0;
}
.coming-actions {
  width: 100%;
}
.coming-actions .button {
  width: 100%;
}

/* ---- questions ---- */
.faq {
  padding-bottom: clamp(64px, 9vw, 120px);
}
.faq .heading-1 {
  margin: 24px 0 40px;
}

/* ---- narrower screens ---- */
@media (max-width: 960px) {
  .section-text {
    padding-right: 0;
  }
  .split {
    grid-template-columns: 1fr;
  }
  .split-text {
    padding-bottom: 40px;
  }
  .split-text .heading-1,
  .split-text .paragraph,
  .numbered li {
    padding-right: 0;
  }
  .photo-tall {
    min-height: 0;
    aspect-ratio: 590 / 711;
    max-height: 560px;
  }
  .preview {
    grid-template-columns: repeat(2, 1fr);
  }
  .preview .cell:nth-child(3) {
    border-left: 0;
  }
  .specs-text,
  .centered-cta {
    padding-left: 0;
    padding-right: 0;
  }
}
@media (max-width: 560px) {
  .preview {
    grid-template-columns: 1fr;
  }
  .preview .cell {
    border-left: 0;
  }
  .device {
    width: 88%;
    padding: 8px 9px 0;
    border-radius: 16px;
  }
  .device img {
    border-radius: 10px;
  }
}

/* The phone-only "Join the waitlist" bar (sticky-cta.js shows it once the
   page's own buttons have scrolled away). */
.sticky-cta {
  display: none;
}
@media (max-width: 640px) {
  .sticky-cta:not([hidden]) {
    display: flex;
    width: 100%;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
  }
  /* Room under the footer so the bar never covers its last line. */
  .site-footer {
    padding-bottom: 96px;
  }
}

/* ---- the scroll animation (js/scroll-motion.js) ----
   Only on screen, only once the script has added "motion" to <html>, and
   never for visitors who ask their system for less motion. Everything here
   is a transform or opacity, so the page never shifts. */
@media screen and (prefers-reduced-motion: no-preference) {
  /* On arrival, the headline and the product come up into place. */
  html.motion .eyebrow,
  html.motion .hero-title {
    animation: rise-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) backwards;
  }
  html.motion .hero-title {
    animation-delay: 0.08s;
  }
  html.motion .hero-visual {
    animation: rise-in 1.1s cubic-bezier(0.2, 0.7, 0.2, 1) 0.2s backwards;
  }

  /* While scrolling through the header (--p goes from 0 to 1): the
     headline drifts up, the sage block widens to the page's edges and the
     product rises and grows to full size. */
  html.motion .hero-title {
    transform: translateY(calc(var(--p, 0) * -48px));
  }
  html.motion .hero-block {
    transform: scaleX(calc(0.92 + var(--p, 0) * 0.08));
  }
  html.motion .device {
    transform: translateY(calc((1 - var(--p, 0)) * 24px)) scale(calc(0.88 + var(--p, 0) * 0.12));
  }

  /* Sections fade and rise in as they come into view; a group's items one
     after another. The transition is on the way in only, so sections
     further down are hidden at once rather than fading out first. */
  html.motion [data-reveal],
  html.motion [data-reveal-item] {
    opacity: 0;
    transform: translateY(28px);
  }
  html.motion [data-reveal].is-visible,
  html.motion [data-reveal-item].is-visible {
    opacity: 1;
    transform: none;
    transition:
      opacity 0.7s ease,
      transform 0.8s cubic-bezier(0.2, 0.7, 0.2, 1);
    transition-delay: calc(var(--i, 0) * 90ms);
  }

  /* Photos move a little slower than the page (--p goes from -1 below the
     middle of the screen to 1 above it). The photo is drawn slightly larger
     than its frame so its edges never show. */
  html.motion .photo[data-parallax] img {
    transform: translateY(calc(var(--p, 0) * 5%)) scale(1.12);
  }
}

/* The headline's and the product's arrival. "translate" and "opacity",
   so the scroll movement above (a "transform") is untouched. */
@keyframes rise-in {
  from {
    opacity: 0;
    translate: 0 32px;
  }
  to {
    opacity: 1;
    translate: 0 0;
  }
}
