/* ==========================================================================
   Xylento — Design Tokens & Base Styles
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,500;9..144,600;9..144,700&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  /* ---- Color: warm monochrome + single restrained accent ---- */
  --ink: #0b0b0c;
  --ink-soft: #1c1c1e;
  --paper: #faf9f6;
  --white: #ffffff;
  --surface: #ffffff;
  --surface-alt: #f2f0ea;
  --border: #e3e0d6;
  --border-strong: #cfcabc;
  --text: #171614;
  --text-muted: #605c53;
  --text-faint: #8a8578;
  --accent: #93712f;
  --accent-deep: #6f5522;
  --danger: #ac2b21;
  --on-ink: #f5f3ee;
  --on-ink-muted: #a7a49b;

  /* ---- Type ---- */
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, sans-serif;

  /* ---- Spacing scale (8px base) ---- */
  --space-1: 0.5rem;
  --space-2: 1rem;
  --space-3: 1.5rem;
  --space-4: 2rem;
  --space-5: 3rem;
  --space-6: 4rem;
  --space-7: 6rem;
  --space-8: 8rem;

  /* ---- Radius / Shadow ---- */
  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 2px rgba(11, 11, 12, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 11, 12, 0.08);
  --shadow-lg: 0 16px 48px rgba(11, 11, 12, 0.12);

  /* ---- Motion ---- */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 150ms;
  --dur-base: 250ms;
  --dur-slow: 500ms;

  --container: 1180px;
}

/* ==========================================================================
   Reset
   ========================================================================== */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--text);
  background: var(--paper);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}

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

a { color: inherit; text-decoration: none; }

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; background: none; border: none; }

ul, ol { list-style: none; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  color: var(--text);
}

::selection { background: var(--ink); color: var(--paper); }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ==========================================================================
   Layout utilities
   ========================================================================== */

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

.section {
  padding-block: var(--space-7);
}

@media (max-width: 767px) {
  .section { padding-block: var(--space-6); }
}

.section--inverted {
  background: var(--ink);
  color: var(--on-ink);
}
.section--inverted h1, .section--inverted h2, .section--inverted h3 {
  color: var(--white);
}
.section--alt {
  background: var(--surface-alt);
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-deep);
}
.section--inverted .eyebrow { color: var(--accent); }

.eyebrow::before {
  content: '';
  width: 22px;
  height: 1px;
  background: currentColor;
}

.section-head {
  max-width: 640px;
  margin-bottom: var(--space-5);
}
.section-head h2 { margin-top: var(--space-2); }
.section-head p {
  margin-top: var(--space-2);
  font-size: 1.0625rem;
  color: var(--text-muted);
}
.section--inverted .section-head p { color: var(--on-ink-muted); }

.text-center { text-align: center; }
.section-head.text-center { margin-inline: auto; }

/* ==========================================================================
   Typography scale
   ========================================================================== */

.h-display {
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  font-weight: 500;
  letter-spacing: -0.02em;
}
.h-1 { font-size: clamp(2rem, 3.6vw, 2.75rem); }
.h-2 { font-size: clamp(1.5rem, 2.4vw, 1.875rem); }
.h-3 { font-size: 1.25rem; font-weight: 600; }

.lede {
  font-size: 1.125rem;
  color: var(--text-muted);
  max-width: 46ch;
}
.section--inverted .lede { color: var(--on-ink-muted); }

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.85rem 1.5rem;
  font-size: 0.9375rem;
  font-weight: 600;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  white-space: nowrap;
  transition: transform var(--dur-fast) var(--ease-out),
              background-color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              color var(--dur-base) var(--ease-out);
  min-height: 44px;
}
.btn:active { transform: scale(0.97); }

.btn--primary {
  background: var(--ink);
  color: var(--white);
  border-color: var(--ink);
}
.btn--primary:hover { background: var(--ink-soft); }

.section--inverted .btn--primary {
  background: var(--white);
  color: var(--ink);
  border-color: var(--white);
}
.section--inverted .btn--primary:hover { background: var(--on-ink); }

.btn--ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}
.btn--ghost:hover { border-color: var(--ink); }
.section--inverted .btn--ghost {
  color: var(--on-ink);
  border-color: rgba(245, 243, 238, 0.3);
}
.section--inverted .btn--ghost:hover { border-color: var(--white); }

.btn--sm { padding: 0.6rem 1.1rem; font-size: 0.875rem; min-height: 38px; }
.btn--block { width: 100%; }

.btn--link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
  padding-bottom: 2px;
  transition: border-color var(--dur-base) var(--ease-out), gap var(--dur-base) var(--ease-out);
}
.btn--link:hover { border-color: var(--ink); gap: 0.6rem; }
.btn--link svg { width: 16px; height: 16px; }

/* ==========================================================================
   Navbar
   ========================================================================== */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  padding-block: 1.15rem;
  transition: background-color var(--dur-base) var(--ease-out),
              border-color var(--dur-base) var(--ease-out),
              padding-block var(--dur-base) var(--ease-out);
  border-bottom: 1px solid transparent;
}
.navbar.is-scrolled {
  background: rgba(250, 249, 246, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-color: var(--border);
  padding-block: 0.8rem;
}
.navbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}
.brand {
  font-family: var(--font-display);
  font-size: 1.375rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.brand__mark {
  width: 10px; height: 10px;
  background: var(--ink);
  border-radius: 2px;
  transform: rotate(45deg);
  flex-shrink: 0;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-4);
}
.nav-links a {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-muted);
  transition: color var(--dur-base) var(--ease-out);
}
.nav-links a:hover { color: var(--ink); }

.navbar__actions { display: flex; align-items: center; gap: var(--space-2); }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
}
.nav-toggle svg { width: 22px; height: 22px; }

@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-toggle { display: inline-flex; }
  .navbar__actions .btn--primary { display: none; }
}

.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 99;
  background: var(--paper);
  padding: 6.5rem var(--space-3) var(--space-4);
  transform: translateY(-8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.mobile-menu.is-open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.mobile-menu a {
  font-family: var(--font-display);
  font-size: 1.75rem;
  padding-block: 0.5rem;
  border-bottom: 1px solid var(--border);
}
.mobile-menu__cta { margin-top: var(--space-3); }

/* ==========================================================================
   Hero
   ========================================================================== */

.hero {
  padding-top: calc(var(--space-8) + 2rem);
  padding-bottom: var(--space-7);
  text-align: center;
}
.hero__inner { max-width: 820px; margin-inline: auto; }
.hero h1 { margin-top: var(--space-3); }
.hero p.lede { margin-inline: auto; margin-top: var(--space-3); max-width: 52ch; font-size: 1.1875rem; }
.hero__actions {
  margin-top: var(--space-4);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.trust-strip {
  margin-top: var(--space-6);
  display: flex;
  justify-content: center;
  gap: var(--space-5);
  flex-wrap: wrap;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border);
}
.trust-strip__item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  font-weight: 500;
}
.trust-strip__item svg { width: 18px; height: 18px; color: var(--accent-deep); flex-shrink: 0; }

/* ==========================================================================
   Philosophy / quote block
   ========================================================================== */

.quote-block {
  text-align: center;
}
.quote-block blockquote {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3.4vw, 2.5rem);
  line-height: 1.28;
  max-width: 880px;
  margin-inline: auto;
  font-weight: 400;
}
.quote-block cite {
  display: block;
  margin-top: var(--space-4);
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--on-ink-muted);
  font-weight: 500;
}

/* ==========================================================================
   Comparison
   ========================================================================== */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
@media (max-width: 767px) {
  .compare { grid-template-columns: 1fr; }
}
.compare__col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4);
}
.compare__col--highlight {
  border-color: var(--ink);
  box-shadow: var(--shadow-md);
}
.compare__col h3 {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: var(--space-3);
}
.compare__list li {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  padding-block: 0.6rem;
  border-top: 1px solid var(--border);
  font-size: 0.9375rem;
  color: var(--text-muted);
}
.compare__list li:first-child { border-top: none; }
.compare__list svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  margin-top: 2px;
}
.compare__col--highlight .compare__list svg { color: var(--accent-deep); }
.compare__col:not(.compare__col--highlight) .compare__list svg { color: var(--text-faint); }
.compare__col--highlight .compare__list li { color: var(--text); }

/* ==========================================================================
   Process steps
   ========================================================================== */

.steps {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: var(--space-3);
  counter-reset: step;
}
@media (max-width: 1023px) {
  .steps { grid-template-columns: 1fr; gap: 0; }
}

.step {
  position: relative;
  padding: var(--space-3) var(--space-2) var(--space-3) 0;
}
.step__num {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--border-strong);
  display: block;
  margin-bottom: var(--space-2);
}
.step h3 { font-size: 1.0625rem; margin-bottom: 0.5rem; }
.step p { font-size: 0.9375rem; color: var(--text-muted); }

@media (min-width: 1024px) {
  .step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 2.2rem;
    right: -1px;
    width: 1px;
    height: calc(100% - 2.2rem - var(--space-3));
    background: var(--border);
  }
}
@media (max-width: 1023px) {
  .step {
    padding: var(--space-3) 0 var(--space-3) var(--space-5);
    border-left: 1px solid var(--border);
    margin-left: 1rem;
  }
  .step__num {
    position: absolute;
    left: -1.05rem;
    top: var(--space-3);
    background: var(--paper);
    width: 2.1rem;
    height: 2.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    font-size: 1rem;
    margin-bottom: 0;
  }
}

/* ==========================================================================
   Feature cards
   ========================================================================== */

.grid-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-3);
}
@media (max-width: 900px) {
  .grid-cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .grid-cards { grid-template-columns: 1fr; }
}
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-3);
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out);
}
.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.card__icon {
  width: 42px; height: 42px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: var(--space-2);
}
.card__icon svg { width: 22px; height: 22px; color: var(--accent-deep); }
.card h3 { font-size: 1.0625rem; margin-bottom: 0.5rem; }
.card p { font-size: 0.9375rem; color: var(--text-muted); }

/* ==========================================================================
   Split layout (two-column sections that must stack on mobile)
   ========================================================================== */

.split-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-5);
  align-items: center;
}
@media (max-width: 900px) {
  .split-layout { grid-template-columns: 1fr; }
}

.grid-cards--1col { grid-template-columns: 1fr; }
.grid-cards--2col { grid-template-columns: 1fr 1fr; }
@media (max-width: 480px) {
  .grid-cards--2col { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Dashboard preview strip
   ========================================================================== */

.preview-panel {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.preview-panel__bar {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem var(--space-3);
  border-bottom: 1px solid var(--border);
  background: var(--surface-alt);
}
.preview-panel__bar span {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--border-strong);
}
.preview-panel__body { padding: var(--space-4); }

.status-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: var(--space-2);
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}
.status-row:last-child { border-bottom: none; }
.status-row__label { font-size: 0.875rem; color: var(--text-muted); font-weight: 500; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8125rem;
  font-weight: 600;
  padding: 0.3rem 0.7rem;
  border-radius: 999px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}
.badge__dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); }
.badge--pending .badge__dot { background: var(--accent); }
.badge--done .badge__dot { background: #3f6b4f; }

.timeline-mini { display: flex; flex-direction: column; gap: 0.9rem; }
.timeline-mini__item { display: flex; align-items: center; gap: 0.75rem; font-size: 0.9375rem; }
.timeline-mini__icon {
  width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
}
.timeline-mini__item--done .timeline-mini__icon {
  background: var(--ink); border-color: var(--ink); color: var(--white);
}
.timeline-mini__item--done .timeline-mini__icon svg { width: 12px; height: 12px; }
.timeline-mini__item--active .timeline-mini__icon { border-color: var(--accent); background: rgba(147,113,47,0.12); }
.timeline-mini__item--active span:last-child { font-weight: 600; }
.timeline-mini__item--future { color: var(--text-faint); }

/* ==========================================================================
   FAQ Accordion
   ========================================================================== */

.faq-list { border-top: 1px solid var(--border); max-width: 780px; margin-inline: auto; }
.faq-item { border-bottom: 1px solid var(--border); }
.faq-item__q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-3) 0.25rem;
  text-align: left;
  font-size: 1.0625rem;
  font-weight: 600;
}
.faq-item__q svg {
  width: 18px; height: 18px;
  flex-shrink: 0;
  transition: transform var(--dur-base) var(--ease-out);
}
.faq-item.is-open .faq-item__q svg { transform: rotate(180deg); }
.faq-item__a {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows var(--dur-base) var(--ease-out);
}
.faq-item.is-open .faq-item__a { grid-template-rows: 1fr; }
.faq-item__a-inner { overflow: hidden; }
.faq-item__a p {
  padding: 0 0.25rem var(--space-3);
  color: var(--text-muted);
  max-width: 62ch;
}

/* ==========================================================================
   Closing CTA — plain text on the page background, no card, no color block
   ========================================================================== */

.closing-cta {
  text-align: center;
  padding-top: var(--space-4);
  padding-bottom: var(--space-7);
}
.closing-cta .eyebrow { justify-content: center; }
.closing-cta h2 { margin-top: var(--space-2); margin-bottom: var(--space-2); }
.closing-cta .lede { margin-inline: auto; margin-bottom: var(--space-4); }

@media (max-width: 767px) {
  .closing-cta { padding-bottom: var(--space-6); }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  padding-block: var(--space-5);
  background: var(--ink);
  color: var(--on-ink);
}
.site-footer .brand { color: var(--white); }
.site-footer .brand__mark { background: var(--white); }

.footer__top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-bottom: var(--space-4);
}
.footer__brand p {
  margin-top: 0.6rem;
  color: var(--on-ink-muted);
  font-size: 0.9375rem;
  max-width: 32ch;
}
.footer__links {
  display: flex;
  gap: var(--space-6);
  flex-wrap: wrap;
}
.footer__col h4 {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: rgba(245, 243, 238, 0.45);
  margin-bottom: var(--space-2);
}
.footer__col li { margin-bottom: 0.6rem; }
.footer__col a {
  font-size: 0.9375rem;
  color: var(--on-ink-muted);
  transition: color var(--dur-base) var(--ease-out);
}
.footer__col a:hover { color: var(--white); }
.footer__bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  padding-top: var(--space-3);
  border-top: 1px solid rgba(245, 243, 238, 0.14);
  font-size: 0.8125rem;
  color: var(--on-ink-muted);
}

/* ==========================================================================
   Scroll reveal
   ========================================================================== */

[data-reveal] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}
[data-reveal-group] [data-reveal]:nth-child(1) { transition-delay: 0ms; }
[data-reveal-group] [data-reveal]:nth-child(2) { transition-delay: 90ms; }
[data-reveal-group] [data-reveal]:nth-child(3) { transition-delay: 180ms; }
[data-reveal-group] [data-reveal]:nth-child(4) { transition-delay: 270ms; }
[data-reveal-group] [data-reveal]:nth-child(5) { transition-delay: 360ms; }

@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Forms (shared with apply.html)
   ========================================================================== */

.field { margin-bottom: var(--space-3); }
.field label {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}
.field .optional-tag {
  font-weight: 400;
  color: var(--text-faint);
  text-transform: none;
  letter-spacing: 0;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="number"],
.field input[type="url"],
.field select,
.field textarea {
  width: 100%;
  min-height: 46px;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  font-size: 0.9375rem;
  transition: border-color var(--dur-base) var(--ease-out), box-shadow var(--dur-base) var(--ease-out);
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(11,11,12,0.08);
  outline: none;
}
.field .hint { margin-top: 0.4rem; font-size: 0.8125rem; color: var(--text-faint); }
.error-msg {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--danger);
  display: none;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--danger); }
.field.has-error .error-msg { display: block; }

.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-3); }
@media (max-width: 640px) { .field-row { grid-template-columns: 1fr; } }

fieldset { border: none; }
legend { font-family: var(--font-display); font-size: 1.375rem; margin-bottom: var(--space-3); padding: 0; }

/* ==========================================================================
   Application flow (apply.html)
   ========================================================================== */

.apply-shell {
  padding-top: calc(var(--space-7) + 1.5rem);
  padding-bottom: var(--space-8);
}
.apply-header { max-width: 640px; margin-bottom: var(--space-5); }
.apply-header .eyebrow { margin-bottom: var(--space-2); }

.progress-track {
  display: flex;
  gap: 0.4rem;
  margin-bottom: var(--space-5);
}
.progress-track__seg {
  flex: 1;
  height: 4px;
  border-radius: 2px;
  background: var(--border);
  overflow: hidden;
}
.progress-track__seg::after {
  content: '';
  display: block;
  height: 100%;
  width: 0%;
  background: var(--ink);
  transition: width 400ms var(--ease-out);
}
.progress-track__seg.is-complete::after { width: 100%; }
.progress-track__seg.is-active::after { width: 55%; }

.progress-steps {
  display: flex;
  justify-content: space-between;
  margin-bottom: var(--space-4);
  font-size: 0.8125rem;
  color: var(--text-faint);
  font-weight: 600;
}
.progress-steps span.is-current { color: var(--ink); }

.form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  max-width: 760px;
}
@media (max-width: 640px) {
  .form-card { padding: var(--space-3); }
}

.form-step { display: none; }
.form-step.is-active { display: block; animation: step-in 350ms var(--ease-out); }
@keyframes step-in {
  from { opacity: 0; transform: translateX(12px); }
  to { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .form-step.is-active { animation: none; }
}

.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border);
}

.stage-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}
.stage-pill {
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  padding: 0.55rem 1.05rem;
  font-size: 0.875rem;
  font-weight: 600;
  transition: all var(--dur-base) var(--ease-out);
}
.stage-pill:hover { border-color: var(--ink); }
.stage-pill.is-selected {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}

.dropzone {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: var(--space-4);
  text-align: center;
  cursor: pointer;
  transition: border-color var(--dur-base) var(--ease-out), background-color var(--dur-base) var(--ease-out);
}
.dropzone:hover, .dropzone.is-dragover {
  border-color: var(--ink);
  background: var(--surface-alt);
}
.dropzone svg { width: 30px; height: 30px; margin: 0 auto var(--space-2); color: var(--text-faint); }
.dropzone p { font-size: 0.9375rem; font-weight: 600; }
.dropzone span { display: block; margin-top: 0.3rem; font-size: 0.8125rem; color: var(--text-faint); }
.dropzone input[type="file"] { display: none; }

.file-list { margin-top: var(--space-2); display: flex; flex-direction: column; gap: 0.5rem; }
.file-list__item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  padding: 0.6rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.875rem;
  background: var(--surface-alt);
}
.file-list__item span:first-child {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-list__item svg { width: 16px; height: 16px; flex-shrink: 0; color: var(--text-faint); }
.file-list__remove { color: var(--text-faint); flex-shrink: 0; }
.file-list__remove:hover { color: var(--danger); }

.review-summary { display: flex; flex-direction: column; gap: 0; margin-bottom: var(--space-4); }
.review-summary__row {
  display: flex;
  justify-content: space-between;
  gap: var(--space-2);
  padding-block: 0.7rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.9375rem;
}
.review-summary__row dt { color: var(--text-muted); }
.review-summary__row dd { font-weight: 600; text-align: right; }

.pay-summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}
.pay-summary strong { font-family: var(--font-display); font-size: 1.5rem; font-weight: 500; }
.pay-summary__note { font-size: 0.8125rem; color: var(--text-faint); margin-top: 0.2rem; }

.field-label-standalone {
  display: block;
  font-size: 0.875rem;
  font-weight: 600;
  margin-bottom: 0.45rem;
}

.payment-element {
  padding: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--white);
  min-height: 44px;
}

.btn[disabled] {
  opacity: 0.6;
  cursor: default;
}
.btn .spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: currentColor;
  animation: spin 700ms linear infinite;
  display: none;
}
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading #payButtonLabel { opacity: 0.85; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .btn .spinner { animation: none; }
}

.demo-notice {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.9rem var(--space-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  font-size: 0.8125rem;
  color: var(--text-muted);
  margin-bottom: var(--space-4);
}
.demo-notice svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--accent-deep); margin-top: 1px; }

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  font-size: 0.875rem;
  color: var(--text-muted);
}
.checkbox-row input { margin-top: 3px; width: 18px; height: 18px; flex-shrink: 0; }

/* ---- Thank-you screen ---- */

.thanks {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
}
.thanks__icon {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: var(--ink);
  color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto var(--space-3);
}
.thanks__icon svg { width: 30px; height: 30px; }
.thanks .app-id {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-display);
  font-size: 1.75rem;
  letter-spacing: 0.03em;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0.9rem 1.5rem;
  margin-block: var(--space-3);
  background: var(--surface);
}
.thanks .app-id button {
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
}
.thanks .app-id button svg { width: 16px; height: 16px; }
.thanks .app-id button.is-copied svg { color: #3f6b4f; }
.thanks__notice {
  font-size: 0.875rem;
  color: var(--text-faint);
  margin-top: var(--space-1);
}
.thanks__actions {
  margin-top: var(--space-4);
  display: flex;
  gap: var(--space-2);
  justify-content: center;
  flex-wrap: wrap;
}
