/* =========================================================
   Maple Loop landing page
   Palette pulled from the Maple Loop deck
   ========================================================= */

:root {
  --ink: #06121f;          /* deep navy, near black */
  --navy: #0e2a47;         /* deck navy panels */
  --navy-2: #133559;
  --blue: #12a4f0;         /* Maple Loop bright blue */
  --blue-deep: #0b6aa2;    /* deck heading blue */
  --sky: #5cc8ff;
  --text: #1d1d1f;
  --muted: #5f6b7a;
  --muted-dark: #9fb0c4;
  --surface: #f4f6f9;
  --white: #ffffff;
  --line: #dde3ea;

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Inter", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter: clamp(20px, 5vw, 40px);
  --section: clamp(96px, 14vw, 180px);
  --radius-lg: 28px;
  --radius-md: 18px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 64px;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.47;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
h1, h2, h3, h4, p, figure, blockquote, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
  border-radius: 6px;
}

.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  left: -999px;
  top: 8px;
  z-index: 100;
  background: var(--white);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 8px;
}
.skip:focus { left: 8px; }

/* ---------- Buttons & links ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-weight: 500;
  font-size: 17px;
  text-decoration: none;
  transition: background-color .2s var(--ease), transform .2s var(--ease);
}
.btn:hover { background: #0d93db; }
.btn:active { transform: scale(.98); }

.btn--small {
  min-height: 32px;
  padding: 0 14px;
  font-size: 13px;
}

.link {
  color: var(--sky);
  font-size: 17px;
  text-decoration: none;
}
.link:hover { text-decoration: underline; text-underline-offset: 4px; }


/* ---------- Hero ---------- */

.hero {
  background:
    radial-gradient(120% 70% at 50% 0%, #123a63 0%, transparent 60%),
    var(--ink);
  color: var(--white);
  padding: clamp(44px, 6vw, 80px) var(--gutter) 0;
  text-align: center;
  overflow: hidden;
}

.hero__copy {
  max-width: 920px;
  margin-inline: auto;
  animation: rise 1.1s var(--ease) both;
}

.hero__product {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 600;
  color: var(--white);
  margin-bottom: 20px;
}

.pill {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--sky);
  padding: 4px 10px;
  border: 1px solid rgba(92, 200, 255, .45);
  border-radius: 999px;
}

.hero__title {
  font-size: clamp(30px, 4.4vw, 60px);
  line-height: 0.8;
  padding: 10px; 	
  font-weight: 700;
  letter-spacing: -0.035em;
  background: linear-gradient(180deg, #ffffff 30%, #b9d6ef 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero__lede {
  max-width: 700px;
  margin: 28px auto 0;
  font-size: clamp(19px, 2vw, 22px);
  line-height: 1.45;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 16px 28px;
  margin-top: 36px;
}

.hero__media {
  max-width: 1240px;
  margin: clamp(56px, 8vw, 96px) auto 0;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  overflow: hidden;
  box-shadow: 0 -30px 120px rgba(18, 164, 240, .18);
  animation: rise 1.3s .15s var(--ease) both;
}
.hero__media img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
@media (max-width: 760px) {
  .hero__media { margin-inline: calc(var(--gutter) * -1); border-radius: 20px 20px 0 0; }
  .hero__media img { aspect-ratio: 4 / 3; object-position: 40% center; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- Statement ---------- */

.statement {
  background: var(--ink);
  padding: var(--section) var(--gutter);
  text-align: center;
}

.statement__text {
  font-size: clamp(44px, 9vw, 120px);
  font-weight: 700;
  padding: 15px;
  line-height: 1;
  letter-spacing: -0.045em;
  /* Text "fills" with light as it scrolls into view (where supported) */
  background: linear-gradient(90deg, #ffffff 0%, var(--sky) 50%, #26415f 50%, #26415f 100%);
  background-size: 200% 100%;
  background-position: 0% 0;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- Section heads ---------- */

.section-head { max-width: 820px; margin-bottom: clamp(48px, 7vw, 80px); }
.section-head--center { margin-inline: auto; text-align: center; }

.section-head h2 {
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.07;
  font-weight: 700;
  letter-spacing: -0.03em;
}
.section-head p {
  margin-top: 20px;
  font-size: clamp(18px, 1.8vw, 21px);
}
.section-head--center p { max-width: 640px; margin-inline: auto; }

.section-head__sub {
  margin: 0 0 12px !important;
  font-size: 19px !important;
  font-weight: 600;
  color: var(--blue-deep) !important;
}

/* ---------- Loop (how it works) ---------- */

.loop {
  background: var(--ink);
  color: var(--white);
  padding: 0 0 var(--section);
}
.loop .section-head p { color: var(--white); }

.loop__layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(40px, 7vw, 96px);
}

.loop__ring {
  position: relative;
  width: 100%;
  max-width: 460px;
  margin-inline: auto;
  aspect-ratio: 1;
}
.loop__ring svg { width: 100%; height: 100%; overflow: visible; }

.ring-track {
  fill: none;
  stroke: rgba(255, 255, 255, .08);
  stroke-width: 2;
}
.ring-trace {
  fill: none;
  stroke: url(#ringGrad);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 22 78;
  transform: rotate(-90deg);
  transform-origin: 200px 200px;
  animation: trace 6s linear infinite;
  filter: drop-shadow(0 0 10px rgba(18, 164, 240, .6));
}
.ring-node circle {
  fill: var(--ink);
  stroke: var(--sky);
  stroke-width: 3;
}

@keyframes trace {
  to { stroke-dashoffset: -100; }
}

.loop__center {
  position: absolute;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}
.loop__center-big {
  font-size: clamp(40px, 5vw, 60px);
  font-weight: 700;
  letter-spacing: -0.03em;
}
.loop__center-small {
  font-size: 15px;
  color: var(--muted-dark);
}

.loop__steps { display: grid; gap: 40px; }

.step {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 20px;
  align-items: start;
}
.step__num {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid rgba(92, 200, 255, .5);
  color: var(--sky);
  font-weight: 600;
}
.step h3 {
  font-size: clamp(24px, 2.6vw, 32px);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}
.step p { color: var(--white); font-size: 17px; max-width: 42ch; }

@media (max-width: 860px) {
  .loop__layout { grid-template-columns: 1fr; }
  .loop__ring { max-width: 340px; }
}

/* ---------- Imagine ---------- */

.imagine {
  padding: var(--section) 0;
  background: var(--white);
}

.prompt-demo {
  display: grid;
  gap: 24px;
}

.prompt-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 64px);
}
.prompt-card__label {
  font-size: 15px;
  font-weight: 600;
  color: var(--blue-deep);
  margin-bottom: 16px;
}
.prompt-card__text {
  font-size: clamp(22px, 2.8vw, 34px);
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.015em;
  max-width: 32em;
}

.returns {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 24px;
}

.returns__plot {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 24px;
}
.returns__plot img { margin-inline: auto; max-height: 420px; width: auto; }
.returns__plot figcaption {
  margin-top: 14px;
  font-size: 13px;
  color: var(--muted);
}

.returns__list {
  background: var(--navy);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.returns__list h3 {
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 28px;
}

.checks { display: grid; gap: 18px; }
.checks li {
  position: relative;
  padding-left: 38px;
  font-size: clamp(18px, 1.8vw, 22px);
  line-height: 1.35;
}
.checks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .15em;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%2306121f' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 100% no-repeat,
    var(--sky);
}

@media (max-width: 860px) {
  .returns { grid-template-columns: 1fr; }
}

/* ---------- Benefits ---------- */

.benefits {
  background: var(--surface);
  padding: var(--section) 0;
}
.benefits__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(32px, 5vw, 64px);
}
.benefit__icon {
  width: 100px;
  height: 100px;
  fill: none;
  stroke: var(--blue-deep);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 20px;
}
.benefit h3 {
  font-size: clamp(22px, 2.2vw, 28px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
}
.benefit p { color: var(--muted); }

@media (max-width: 860px) {
  .benefits__grid { grid-template-columns: 1fr; }
}

/* ---------- Stats ---------- */

.stats {
  background: var(--white);
  padding: var(--section) 0;
  text-align: center;
}
.stats__title {
  font-size: clamp(22px, 2.4vw, 28px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--muted);
  margin-bottom: 56px;
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.stat dt {
  font-size: clamp(48px, 6vw, 80px);
  font-weight: 700;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--text);
}
.stat dd {
  margin-top: 14px;
  color: var(--muted);
  max-width: 26ch;
  margin-inline: auto;
}
.stat--ours dt {
  font-size: clamp(36px, 4.2vw, 56px);
  line-height: 1.05;
  color: var(--blue-deep);
  min-height: 1.43em; /* aligns visually with the larger numerals */
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

.fineprint {
  margin-top: 56px;
  font-size: 12px;
  line-height: 1.5;
  color: #86868b;
  max-width: 820px;
}
.stats .fineprint,
.fineprint--center { margin-inline: auto; text-align: center; }

@media (max-width: 760px) {
  .stats__grid { grid-template-columns: 1fr; gap: 48px; }
  .stat--ours dt { min-height: 0; }
}

/* ---------- Outputs ---------- */

.outputs {
  background: var(--surface);
  padding: var(--section) 0;
}

.gallery {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(280px, 380px);
  gap: 24px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding: 0 max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter))) 24px;
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  scrollbar-width: none;
}
.gallery::-webkit-scrollbar { display: none; }

.gallery__item--wide { grid-column: span 1; }
@media (min-width: 900px) {
  .gallery { grid-auto-columns: auto; grid-template-columns: 1fr 1.6fr 1fr; overflow: visible; }
}

.gallery__item { scroll-snap-align: start; }

.gallery__frame {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 20px 20px 0;
  height: 420px;
  overflow: hidden;
  box-shadow: 0 1px 2px rgba(14, 42, 71, .06), 0 20px 40px -24px rgba(14, 42, 71, .25);
}
.gallery__frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top left;
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--line);
  border-bottom: 0;
}

.gallery__item figcaption {
  margin-top: 18px;
  padding-inline: 4px;
  color: var(--muted);
  font-size: 17px;
}
.gallery__item figcaption strong { color: var(--text); font-weight: 600; }

.formats__title {
  margin: clamp(80px, 10vw, 120px) 0 40px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
  text-align: center;
}

.formats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.format {
  background: var(--white);
  padding: clamp(24px, 3vw, 40px);
}
.format svg {
  width: 60px;
  height: 60px;
  fill: none;
  stroke: var(--blue-deep);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-bottom: 18px;
}
.format h4 {
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 4px;
}
.format p { color: var(--muted); font-size: 15px; }

@media (max-width: 860px) { .formats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .formats { grid-template-columns: 1fr; } }

.code-strip {
  margin-top: 24px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: 24px 48px;
  background: var(--ink);
  color: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 5vw, 56px);
}
.code-strip__copy {
  font-size: clamp(24px, 2.8vw, 34px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.02em;
}
.code-strip__code {
  margin: 0;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.7;
  color: #d6e4f2;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: var(--radius-md);
  padding: 24px 28px;
}
.code-strip__code .k { color: var(--sky); }
.code-strip__code .f { color: #ffd479; }

@media (max-width: 860px) { .code-strip { grid-template-columns: 1fr; } }

/* ---------- Engine ---------- */

.engine {
  background:
    radial-gradient(80% 60% at 50% 100%, rgba(18, 164, 240, .22), transparent 70%),
    var(--ink);
  color: var(--white);
  padding: var(--section) 0;
  text-align: center;
}
.engine__inner { max-width: 960px; }
.engine__kicker {
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 600;
  color: var(--sky);
  margin-bottom: 16px;
}
.engine__title {
  font-size: clamp(44px, 7.5vw, 96px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.engine__lede {
  max-width: 620px;
  margin: 28px auto 0;
  font-size: clamp(19px, 2vw, 22px);
}
.engine__pillars {
  margin-top: clamp(56px, 8vw, 96px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(255, 255, 255, .12);
}
.engine__pillars li {
  padding: 28px 20px 0;
  font-size: 19px;
  line-height: 1.35;
  color: var(--muted-dark);
}
.engine__pillars li + li { border-left: 1px solid rgba(255, 255, 255, .12); }
.engine__pillars strong { display: block; color: var(--white); font-weight: 600; }

@media (max-width: 760px) {
  .engine__pillars { grid-template-columns: 1fr; }
  .engine__pillars li + li { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); margin-top: 28px; }
}

/* ---------- Example ---------- */

.example {
  background: var(--white);
  padding: var(--section) 0;
}

.example__prompt {
  position: relative;
  max-width: 860px;
  margin-left: auto;
  background: var(--blue);
  color: var(--white);
  padding: clamp(24px, 4vw, 40px);
  border-radius: var(--radius-lg) var(--radius-lg) 8px var(--radius-lg);
}
.example__prompt p {
  font-size: clamp(18px, 2vw, 22px);
  line-height: 1.45;
}
.example__meta {
  display: block;
  margin-top: 16px;
  font-size: 14px;
  color: rgba(255, 255, 255, .8);
}

.example__returns-title {
  margin: clamp(56px, 8vw, 88px) 0 32px;
  font-size: clamp(28px, 3.4vw, 40px);
  font-weight: 700;
  letter-spacing: -0.025em;
}

.example__returns {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(24px, 4vw, 48px);
  border-top: 1px solid var(--line);
  padding-top: 28px;
}
.example__returns h4 {
  font-size: 21px;
  font-weight: 600;
  margin-bottom: 8px;
}
.example__returns p { color: var(--muted); }

.workspace {
  margin-top: clamp(56px, 8vw, 88px);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr);
  gap: 24px;
  align-items: stretch;
}
.workspace__shot {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 48px) clamp(24px, 4vw, 48px) 28px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 24px;
}
.workspace__shot img {
  border-radius: 14px;
  box-shadow: 0 1px 2px rgba(14, 42, 71, .08), 0 24px 48px -28px rgba(14, 42, 71, .35);
  margin-inline: auto;
}
.workspace__shot figcaption { color: var(--muted); font-size: 15px; }

@media (max-width: 860px) {
  .example__returns,
  .workspace { grid-template-columns: 1fr; }
}

/* ---------- CTA ---------- */

.cta {
  background: var(--ink);
  color: var(--white);
  padding: var(--section) 0;
  text-align: center;
}
.cta__logo { height: 100px; width: auto; margin: 0 auto 0px; }
.cta__title {
  font-size: clamp(44px, 7.5vw, 96px);
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.045em;
}
.cta__lede {
  max-width: 560px;
  margin: 28px auto 0;
  font-size: clamp(18px, 1.8vw, 21px);
}
.hero__actions--center { margin-top: 40px; }

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  border-top: 1px solid rgba(255, 255, 255, .08);
  color: #7d8a99;
  font-size: 12px;
  padding: 24px 0 calc(24px + env(safe-area-inset-bottom, 0px));
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
}

/* =========================================================
   Scroll-driven motion (progressive enhancement)
   Chrome, Edge, Safari 26+. Other browsers show the static page.
   ========================================================= */

@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {

    /* Hero image grows to full width as you scroll */
    .hero__media {
      animation: rise 1.3s .15s var(--ease) both, widen linear both;
      animation-timeline: auto, view();
      animation-range: normal, entry 0% cover 45%;
    }
    @keyframes widen {
      from { transform: scale(.88); border-radius: 40px 40px 0 0; }
      to   { transform: scale(1); }
    }

    /* Statement text fills with light */
    .statement__text {
      background-position: 100% 0;
      animation: fill linear both;
      animation-timeline: view();
      animation-range: entry 20% cover 55%;
    }
    @keyframes fill {
      to { background-position: 0% 0; }
    }

    /* Steps light up one by one */
    .step {
      animation: step-on linear both;
      animation-timeline: view();
      animation-range: entry 30% cover 40%;
    }
    @keyframes step-on {
      from { opacity: .2; transform: translateY(16px); }
      to   { opacity: 1; transform: none; }
    }

    /* Big headlines settle into place */
    .engine__title,
    .cta__title {
      animation: settle linear both;
      animation-timeline: view();
      animation-range: entry 0% cover 35%;
    }
    @keyframes settle {
      from { opacity: 0; transform: scale(.92); }
      to   { opacity: 1; transform: none; }
    }
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
  .ring-trace { stroke-dasharray: none; }
}
