/* ==========================================================================
   Folio — home page (home.html). Uses the shared --color-* tokens from
   pages.css, so the dark theme works too. The CV previews use
   cv-templates.css, the same styles as the editor. Effects are made with
   transforms and opacity only, and switch off for "reduce motion".
   ========================================================================== */

.hp {
  --hp-grad: linear-gradient(90deg, #1a5ff0, #0891b2, #1a5ff0); /* 3:1+ on the light page */
  --hp-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --hp-radius: 22px;
  interpolate-size: allow-keywords; /* lets the FAQ answers slide open */
  overflow-x: clip; /* the hero glow and floating labels may not widen the page (clip keeps the header sticky) */
}

.hp[data-theme="dark"] {
  --hp-grad: linear-gradient(90deg, #58a6ff, #4cc9ff, #58a6ff);
}

.hp main h1,
.hp main h2,
.hp main h3,
.hp main p,
.hp main ul,
.hp main ol,
.hp-footer p {
  margin: 0;
}

/* The CV previews keep their own layout */
.hp .cv-page {
  line-height: 1.5;
  pointer-events: none;
}

.hp .cv-page p,
.hp .cv-page ul,
.hp .cv-page h2 {
  margin: 0;
}

/* --------------------------------------------------------------------------
   Scroll progress and sticky header
   -------------------------------------------------------------------------- */

.hp-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 100;
  height: 3px;
  pointer-events: none;
}

.hp-progress span {
  display: block;
  height: 100%;
  background: var(--brand-gradient);
  transform: scaleX(var(--p, 0));
  transform-origin: left;
}

.hp .topbar {
  position: sticky;
  top: 12px;
  z-index: 40;
  background: color-mix(in srgb, var(--color-surface) 86%, transparent);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  transition: box-shadow 0.3s var(--hp-ease);
}

.hp .topbar.is-scrolled {
  box-shadow: 0 14px 40px -18px var(--color-shadow);
}

/* --------------------------------------------------------------------------
   Buttons and links
   -------------------------------------------------------------------------- */

.hp-btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 52px;
  padding: 0 24px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 14px;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  isolation: isolate;
  transition:
    transform 0.25s var(--hp-ease),
    box-shadow 0.25s var(--hp-ease),
    background-color 0.2s,
    border-color 0.2s,
    color 0.2s;
}

.hp-btn:hover {
  transform: translateY(-2px);
}

.hp-btn:active {
  transform: translateY(0) scale(0.98);
}

.hp-btn:focus-visible,
.hp-round:focus-visible,
.hp-link:focus-visible,
.hp-chip:focus-visible,
.hp-swatch:focus-visible,
.hp-faq__item summary:focus-visible,
.hp-carousel:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

.hp-btn__arrow {
  transition: transform 0.25s var(--hp-ease);
}

.hp-btn:hover .hp-btn__arrow {
  transform: translateX(4px);
}

.hp-btn--primary {
  background: var(--action-gradient);
  color: var(--text-on-action);
  box-shadow: 0 12px 30px -12px rgba(26, 95, 240, 0.65);
}

.hp-btn--primary:hover {
  box-shadow: 0 18px 40px -14px rgba(26, 95, 240, 0.75);
}

/* A light sweep across the button on hover */
.hp-btn--primary::after,
.hp-btn--light::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform 0.7s var(--hp-ease);
}

.hp-btn--primary:hover::after,
.hp-btn--light:hover::after {
  transform: translateX(120%);
}

.hp-btn--ghost {
  border-color: var(--color-button-line);
  background: var(--color-surface);
  color: var(--color-ink);
}

.hp-btn--ghost:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.hp-btn--light {
  background: #fff;
  color: #1550d0;
  box-shadow: 0 14px 34px -14px rgba(0, 0, 0, 0.45);
}

.hp-btn--block {
  width: 100%;
}

.hp-btn--small {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 10px;
  font-size: 0.9rem;
}

.hp-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--color-primary);
  font-weight: 700;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  transition: background-size 0.3s var(--hp-ease);
}

.hp-link::after {
  content: "→";
  transition: transform 0.25s var(--hp-ease);
}

.hp-link:hover {
  background-size: 100% 2px;
}

.hp-link:hover::after {
  transform: translateX(4px);
}

.hp-round {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid var(--color-button-line);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 1.1rem;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s, transform 0.2s;
}

.hp-round:hover:not(:disabled) {
  border-color: var(--action-primary);
  background: var(--action-primary);
  color: #fff;
  transform: scale(1.06);
}

.hp-round:disabled {
  opacity: 0.4;
  cursor: default;
}

/* --------------------------------------------------------------------------
   Hero
   -------------------------------------------------------------------------- */

.hp-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: 48px;
  padding: 72px 8px 64px;
  isolation: isolate;
}

/* Two soft colour blobs that drift slowly behind the hero */
.hp-hero__glow {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background:
    radial-gradient(28rem 22rem at 78% 30%, rgba(31, 107, 255, 0.22), transparent 70%),
    radial-gradient(24rem 20rem at 60% 80%, rgba(76, 201, 255, 0.24), transparent 70%);
  filter: blur(10px);
  animation: hp-drift 16s ease-in-out infinite alternate;
}

.hp-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 700;
}

.hp-pill__dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12b76a;
  animation: hp-pulse 2.4s ease-out infinite;
}

.hp-title {
  margin-top: 20px !important;
  color: var(--color-ink);
  font-size: clamp(2.7rem, 6vw, 4.8rem);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.hp-title__accent {
  background: var(--hp-grad);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: hp-shine 7s linear infinite;
}

.hp-lead {
  max-width: 34rem;
  margin-top: 20px !important;
  color: var(--color-muted);
  font-size: 1.15rem;
  line-height: 1.6;
}

.hp-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.hp-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 20px;
  margin-top: 26px !important;
  padding: 0;
  list-style: none;
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.hp-checks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.hp-checks li::before {
  content: "✓";
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: var(--color-surface-soft);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 800;
}

/* The demo: a real CV page with a "try it" panel on top */
.hp-hero__demo {
  position: relative;
  min-height: 600px;
}

.hp-stage {
  position: relative;
  width: min(100%, 420px);
  margin-left: auto;
  perspective: 1400px;
}

.hp-cv {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: #fff;
  box-shadow:
    0 0 0 1px rgba(14, 24, 48, 0.06),
    0 50px 90px -40px rgba(14, 24, 48, 0.55);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform 0.35s var(--hp-ease);
}

.hp-cv .cv-page {
  transition: opacity 0.25s;
}

.hp-cv.is-switching .cv-page {
  opacity: 0.35;
}

/* Little status labels floating around the CV */
.hp-float {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border: 1px solid var(--color-line);
  border-radius: 999px;
  background: var(--color-surface);
  box-shadow: 0 14px 30px -14px var(--color-shadow);
  color: var(--color-ink);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  animation: hp-bob 5s ease-in-out infinite alternate;
}

.hp-float::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #12b76a;
}

.hp-float--saved { top: 6%; right: -22px; }
.hp-float--fit { top: 44%; right: -34px; animation-delay: -1.6s; }
.hp-float--fit::before { background: var(--color-primary); }
.hp-float--pdf { bottom: 10%; right: -16px; animation-delay: -3.2s; }
.hp-float--pdf::before { background: #f79009; }

.hp-try {
  position: absolute;
  bottom: -8px;
  left: -16px;
  z-index: 3;
  display: grid;
  gap: 8px;
  width: 290px;
  padding: 18px;
  border: 1px solid var(--color-line);
  border-radius: 20px;
  background: color-mix(in srgb, var(--color-surface) 90%, transparent);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  box-shadow: 0 30px 60px -30px rgba(14, 24, 48, 0.5);
}

.hp-try__title {
  color: var(--color-ink);
  font-size: 0.95rem;
  font-weight: 800;
}

.hp-try__label {
  margin-top: 4px !important;
  color: var(--color-muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.hp-try__input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--color-control);
  border-radius: 10px;
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 16px; /* no zoom on iPhone */
}

.hp-try__input:focus {
  border-color: var(--color-primary);
  outline: none;
  box-shadow: var(--focus-ring);
}

.hp-swatches,
.hp-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.hp-swatch {
  width: 28px;
  height: 28px;
  border: 3px solid var(--color-surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--color-control);
  transition: transform 0.2s var(--hp-ease), box-shadow 0.2s;
}

.hp-swatch:hover {
  transform: scale(1.12);
}

.hp-swatch[aria-checked="true"] {
  box-shadow: 0 0 0 2px var(--color-ink);
}

.hp-chip {
  padding: 6px 11px;
  border: 1px solid var(--color-button-line);
  border-radius: 999px;
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: 0.8rem;
  font-weight: 700;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.hp-chip:hover {
  border-color: var(--color-primary);
}

/* The strong action blue in both themes, so white text stays readable */
.hp-chip[aria-checked="true"] {
  border-color: var(--action-primary);
  background: var(--action-primary);
  color: #fff;
}

.hp-try .hp-btn {
  min-height: 46px;
  margin-top: 8px;
  padding: 0 16px;
  font-size: 0.95rem;
  white-space: nowrap;
}

.hp-try__note {
  color: var(--color-muted);
  font-size: 0.78rem;
  text-align: center;
}

/* --------------------------------------------------------------------------
   Numbers
   -------------------------------------------------------------------------- */

.hp-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 26px;
  border: 1px solid var(--color-line);
  border-radius: var(--hp-radius);
  background: var(--color-surface);
}

.hp-stat {
  display: grid;
  justify-items: center;
  gap: 2px;
  text-align: center;
}

.hp-stat__num {
  background: var(--hp-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.hp-stat__label {
  color: var(--color-muted);
  font-size: 0.95rem;
  font-weight: 600;
}

/* --------------------------------------------------------------------------
   Sections
   -------------------------------------------------------------------------- */

.hp-section {
  margin-top: 128px;
  scroll-margin-top: 120px;
}

.hp-section__head {
  max-width: 680px;
}

.hp-section__head--row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  max-width: none;
}

.hp-eyebrow {
  color: var(--color-primary);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hp-h2 {
  margin-top: 10px !important;
  color: var(--color-ink);
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.028em;
}

.hp-sub {
  max-width: 34rem;
  margin-top: 12px !important;
  color: var(--color-muted);
  font-size: 1.05rem;
  line-height: 1.6;
}

.hp-center {
  margin-top: 8px !important;
  text-align: center;
}

/* How it works: the title stays in view while the steps scroll past */
.hp-how {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  align-items: start;
  gap: 64px;
}

.hp-how .hp-section__head {
  position: sticky;
  top: 140px;
}

/* A rail that fills up while you scroll */
.hp-steps {
  position: relative;
  display: grid;
  gap: 18px;
  max-width: 780px;
  margin-top: 0 !important;
  padding: 0;
  list-style: none;
}

.hp-steps::before,
.hp-steps::after {
  content: "";
  position: absolute;
  top: 28px;
  bottom: 28px;
  left: 27px;
  width: 2px;
  border-radius: 2px;
  background: var(--color-line);
}

.hp-steps::after {
  bottom: auto;
  height: calc((100% - 56px) * var(--fill, 0));
  background: var(--brand-gradient);
}

.hp-step {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.hp-step__num {
  display: grid;
  width: 56px;
  height: 56px;
  place-items: center;
  border: 2px solid var(--color-line);
  border-radius: 50%;
  background: var(--color-surface);
  color: var(--color-muted);
  font-weight: 800;
  transition: background 0.4s, color 0.4s, border-color 0.4s, transform 0.4s var(--hp-ease);
}

.hp-step > div {
  padding: 18px 24px;
  border: 1px solid var(--color-line);
  border-radius: 18px;
  background: var(--color-surface);
  transition: border-color 0.4s, box-shadow 0.4s, transform 0.4s var(--hp-ease);
}

.hp-step__title {
  color: var(--color-ink);
  font-size: 1.25rem;
  font-weight: 700;
}

.hp-step p {
  margin-top: 6px !important;
  color: var(--color-muted);
  line-height: 1.6;
}

.hp-step.is-active .hp-step__num {
  border-color: transparent;
  background: var(--action-gradient);
  color: #fff;
  transform: scale(1.08);
}

.hp-step.is-active > div {
  border-color: var(--color-primary);
  box-shadow: 0 20px 44px -26px rgba(26, 95, 240, 0.6);
  transform: translateX(6px);
}

/* Template carousel */
.hp-carousel-nav {
  display: flex;
  flex: none;
  gap: 10px;
}

.hp-carousel {
  display: grid;
  grid-auto-columns: minmax(250px, 290px);
  grid-auto-flow: column;
  gap: 20px;
  margin: 32px -8px 0 !important;
  padding: 10px 8px 28px !important;
  overflow-x: auto;
  list-style: none;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
  mask-image: linear-gradient(90deg, transparent, #000 20px, #000 calc(100% - 20px), transparent);
}

.hp-tpl {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-line);
  border-radius: var(--hp-radius);
  background: var(--color-surface);
  scroll-snap-align: start;
  transition: transform 0.35s var(--hp-ease), box-shadow 0.35s, border-color 0.35s;
}

.hp-tpl:hover,
.hp-tpl:focus-within {
  border-color: var(--color-primary);
  box-shadow: 0 26px 50px -30px rgba(26, 95, 240, 0.6);
  transform: translateY(-6px);
}

.hp-tpl__preview {
  padding: 18px 18px 0;
  background: var(--color-surface-soft);
}

.hp-mini {
  position: relative;
  overflow: hidden;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 0 0 1px rgba(14, 24, 48, 0.06);
}

/* Hover "scrolls" the page a little, as if you look further down the CV */
.hp-mini .cv-page {
  transform: translateY(var(--shift, 0px)) scale(var(--s, 0.3));
  transition: transform 0.9s var(--hp-ease);
}

.hp-tpl:hover .hp-mini .cv-page,
.hp-tpl:focus-within .hp-mini .cv-page {
  --shift: var(--shift-to, 0px);
}

.hp-tpl__body {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 16px 18px 18px;
}

.hp-tpl__body .hp-btn {
  white-space: nowrap;
}

.hp-tpl__name {
  color: var(--color-ink);
  font-size: 1.1rem;
  font-weight: 800;
}

/* Feature grid: a soft light follows the mouse over each card */
.hp-bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-top: 44px;
}

.hp-card {
  position: relative;
  overflow: hidden;
  padding: 26px;
  border: 1px solid var(--color-line);
  border-radius: var(--hp-radius);
  background: var(--color-surface);
  transition: transform 0.35s var(--hp-ease), border-color 0.35s, box-shadow 0.35s;
}

.hp-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(320px circle at var(--mx, 50%) var(--my, 50%), rgba(31, 107, 255, 0.13), transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.hp-card:hover {
  border-color: color-mix(in srgb, var(--color-primary) 45%, var(--color-line));
  box-shadow: 0 24px 50px -32px rgba(26, 95, 240, 0.55);
  transform: translateY(-4px);
}

.hp-card:hover::before {
  opacity: 1;
}

.hp-card--wide {
  grid-column: span 2;
}

.hp-card--full {
  grid-column: 1 / -1;
}

.hp-card__icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border-radius: 14px;
  background: var(--color-surface-soft);
  color: var(--color-primary);
  font-size: 1.35rem;
}

.hp-card__title {
  margin-top: 16px !important;
  color: var(--color-ink);
  font-size: 1.15rem;
  font-weight: 700;
}

.hp-card p {
  margin-top: 6px !important;
  color: var(--color-muted);
  line-height: 1.55;
}

/* Decoration: lines that "type" themselves */
.hp-typing {
  display: grid;
  gap: 8px;
  max-width: 320px;
  margin-top: 20px;
}

.hp-typing__line {
  height: 8px;
  overflow: hidden;
  border-radius: 4px;
  background: var(--color-surface-soft);
}

.hp-typing__line::after {
  content: "";
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--brand-gradient);
  transform: scaleX(0);
  transform-origin: left;
  animation: hp-type 3.6s var(--hp-ease) infinite;
}

.hp-typing__line:nth-child(2)::after { animation-delay: 0.4s; }
.hp-typing__line:nth-child(3)::after { animation-delay: 0.8s; }

.hp-typing__line--short {
  width: 60%;
}

/* Decoration: the seven colours pop in */
.hp-dots {
  display: flex;
  gap: 8px;
  margin-top: 18px;
}

.hp-dots i {
  width: 22px;
  height: 22px;
  border: 3px solid var(--color-surface);
  border-radius: 50%;
  box-shadow: 0 0 0 1px var(--color-line);
  transform: scale(0);
  transition: transform 0.5s var(--hp-ease);
}

.hp-dots i:nth-child(1) { background: #1a5ff0; }
.hp-dots i:nth-child(2) { background: #0f766e; transition-delay: 0.06s; }
.hp-dots i:nth-child(3) { background: #15803d; transition-delay: 0.12s; }
.hp-dots i:nth-child(4) { background: #6d28d9; transition-delay: 0.18s; }
.hp-dots i:nth-child(5) { background: #be185d; transition-delay: 0.24s; }
.hp-dots i:nth-child(6) { background: #c2410c; transition-delay: 0.3s; }
.hp-dots i:nth-child(7) { background: #1f2937; transition-delay: 0.36s; }

.is-visible .hp-dots i,
html:not(.js) .hp-dots i {
  transform: scale(1);
}

/* About us */
.hp-about {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 40px;
  align-items: center;
  padding: 44px;
  border: 1px solid var(--color-line);
  border-radius: 28px;
  background:
    radial-gradient(30rem 16rem at 100% 0%, rgba(76, 201, 255, 0.16), transparent 70%),
    var(--color-surface);
}

.hp-about p:not(.hp-eyebrow) {
  margin-bottom: 16px !important;
  color: var(--color-muted);
  line-height: 1.7;
}

/* FAQ */
.hp-faq__list {
  max-width: 820px;
  margin-top: 32px;
  border-top: 1px solid var(--color-line);
}

.hp-faq__item {
  border-bottom: 1px solid var(--color-line);
}

.hp-faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 4px;
  color: var(--color-ink);
  font-size: 1.1rem;
  font-weight: 700;
  list-style: none;
  cursor: pointer;
}

.hp-faq__item summary::-webkit-details-marker {
  display: none;
}

.hp-faq__item summary::after {
  content: "+";
  display: grid;
  flex: none;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid var(--color-button-line);
  border-radius: 50%;
  color: var(--color-primary);
  font-size: 1.3rem;
  font-weight: 500;
  transition: transform 0.35s var(--hp-ease), background-color 0.2s;
}

.hp-faq__item summary:hover::after {
  background: var(--color-surface-soft);
}

.hp-faq__item[open] summary::after {
  transform: rotate(45deg);
}

.hp-faq__item p {
  max-width: 680px;
  padding: 0 4px 22px;
  color: var(--color-muted);
  line-height: 1.7;
}

/* Smooth open and close where the browser supports it */
.hp-faq__item::details-content {
  block-size: 0;
  overflow: hidden;
  transition: block-size 0.4s var(--hp-ease), content-visibility 0.4s allow-discrete;
}

.hp-faq__item[open]::details-content {
  block-size: auto;
}

/* Final call to action */
.hp-cta {
  display: grid;
  justify-items: center;
  gap: 14px;
  margin-top: 128px;
  padding: 72px 32px;
  overflow: hidden;
  border-radius: 32px;
  background:
    radial-gradient(30rem 18rem at 15% 0%, rgba(255, 255, 255, 0.22), transparent 70%),
    linear-gradient(120deg, #1550d0, #1f6bff 45%, #0891b2);
  background-size: 100% 100%, 200% 200%;
  color: #fff;
  text-align: center;
  animation: hp-sky 12s ease-in-out infinite alternate;
}

.hp-cta .hp-h2 {
  max-width: 36rem;
  color: #fff;
}

.hp-eyebrow--light {
  color: rgba(255, 255, 255, 0.9);
}

.hp-cta .hp-btn {
  margin-top: 12px;
}

/* Footer */
.hp-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: 64px;
  padding: 28px 4px 8px;
  border-top: 1px solid var(--color-line);
}

.hp-footer__logo {
  height: 32px;
  width: auto;
}

.hp-footer__nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}

.hp-footer__nav a {
  color: var(--color-muted);
  font-weight: 600;
  transition: color 0.2s;
}

.hp-footer__nav a:hover {
  color: var(--color-primary);
}

.hp-footer__note {
  margin-left: auto !important;
  color: var(--color-muted);
  font-size: 0.85rem;
}

/* --------------------------------------------------------------------------
   Reveal on scroll (only when JavaScript runs)
   -------------------------------------------------------------------------- */

.js .hp [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.8s var(--hp-ease),
    transform 0.8s var(--hp-ease);
  transition-delay: var(--d, 0ms);
}

.js .hp [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

/* The step cards keep their own hover/active movement after revealing */
.js .hp .hp-step.is-visible {
  transition-delay: 0ms;
}

/* --------------------------------------------------------------------------
   Animations
   -------------------------------------------------------------------------- */

@keyframes hp-drift {
  to { transform: translate3d(-4%, 3%, 0) scale(1.08); }
}

@keyframes hp-pulse {
  0% { box-shadow: 0 0 0 0 rgba(18, 183, 106, 0.55); }
  100% { box-shadow: 0 0 0 10px rgba(18, 183, 106, 0); }
}

@keyframes hp-shine {
  to { background-position: 200% center; }
}

@keyframes hp-bob {
  to { transform: translateY(-10px); }
}

@keyframes hp-type {
  0% { transform: scaleX(0); }
  45%, 80% { transform: scaleX(1); }
  100% { transform: scaleX(1); opacity: 0; }
}

@keyframes hp-sky {
  to { background-position: 0 0, 100% 100%; }
}

/* --------------------------------------------------------------------------
   Smaller screens
   -------------------------------------------------------------------------- */

@media (max-width: 1024px) {
  .hp-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 40px;
    padding-top: 48px;
  }

  .hp-hero__demo {
    min-height: 0;
  }

  .hp-stage {
    margin: 0 auto;
  }

  .hp-try {
    position: relative;
    bottom: auto;
    left: auto;
    width: min(100%, 420px);
    margin: -60px auto 0;
  }
}

@media (max-width: 900px) {
  .hp-how {
    grid-template-columns: minmax(0, 1fr);
    gap: 36px;
  }

  .hp-how .hp-section__head {
    position: static;
  }

  .hp-bento {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hp-about {
    grid-template-columns: minmax(0, 1fr);
    gap: 16px;
    padding: 28px;
  }
}

@media (max-width: 640px) {
  .hp-section,
  .hp-cta {
    margin-top: 88px;
  }

  .hp-float {
    display: none;
  }

  .hp-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px 12px;
  }

  .hp-section__head--row {
    align-items: flex-start;
    flex-direction: column;
  }

  .hp-bento {
    grid-template-columns: minmax(0, 1fr);
  }

  .hp-card--wide {
    grid-column: auto;
  }

  .hp-step {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 14px;
  }

  .hp-step__num {
    width: 44px;
    height: 44px;
  }

  .hp-steps::before,
  .hp-steps::after {
    top: 22px;
    left: 21px;
  }

  .hp-step > div {
    padding: 16px 18px;
  }

  .hp-cta {
    padding: 52px 20px;
    border-radius: 24px;
  }

  .hp-footer__note {
    margin-left: 0 !important;
  }
}

/* --------------------------------------------------------------------------
   Reduce motion: everything is shown at once, nothing moves by itself
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .js .hp [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .hp *,
  .hp *::before,
  .hp *::after {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }

  .hp-dots i {
    transform: scale(1);
  }

  .hp-typing__line::after {
    transform: scaleX(1);
  }
}
