/* ==========================================================================
   CognivaSoft — Components
   1.  Buttons & links      8.  Process steps
   2.  Header & navigation  9.  Quote
   3.  Theme toggle         10. Accordion
   4.  Footer               11. Tags
   5.  Marquee              12. Forms
   6.  Stat strip           13. CTA band
   7.  Rows & cards         14. Page hero
   ========================================================================== */

/* -- 1. Buttons ------------------------------------------------------------ */

.btn {
  --btn-bg: var(--clay);
  --btn-fg: var(--clay-fg);
  --btn-border: var(--clay);
  --btn-grad: var(--grad-action);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65em;
  padding: 0.9rem 1.55rem;
  background-color: var(--btn-bg);
  background-image: var(--btn-grad, none);
  color: var(--btn-fg);
  border: 1px solid var(--btn-border);
  border-radius: var(--radius-pill);
  font-size: 0.9375rem;
  font-weight: 620;
  font-stretch: 100%;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background-color var(--dur-fast) var(--ease),
    color var(--dur-fast) var(--ease),
    border-color var(--dur-fast) var(--ease),
    transform var(--dur-press) var(--ease-out),
    box-shadow var(--dur-fast) var(--ease);
}

.btn:hover {
  --btn-bg: var(--clay-hover);
  --btn-fg: var(--clay-hover-fg);
  --btn-border: var(--clay-hover);
  transform: translateY(-2px);
  /* Shadow tinted with the action colour rather than neutral black. */
  box-shadow: 0 10px 26px -12px color-mix(in srgb, var(--clay) 55%, transparent);
}

.btn--ghost:hover,
.btn--outline-light:hover,
.btn--light:hover { box-shadow: var(--shadow-m); }

/* Tactile press — the button gives under the cursor. */
.btn:active { transform: translateY(0) scale(0.985); box-shadow: none; }

.btn__arrow {
  width: 1em;
  height: 1em;
  flex: none;
  transition: transform var(--dur) var(--ease-out);
}

.btn:hover .btn__arrow { transform: translateX(3px); }

.btn--ghost {
  --btn-bg: transparent;
  --btn-fg: var(--ink);
  --btn-grad: none;
  --btn-border: var(--line-strong);
}

.btn--ghost:hover {
  --btn-bg: var(--ink);
  --btn-fg: var(--bg);
  --btn-border: var(--ink);
}

.btn--outline-light {
  --btn-bg: transparent;
  --btn-fg: var(--on-dark);
  --btn-grad: none;
  --btn-border: rgba(245, 241, 232, 0.42);
}

.btn--outline-light:hover {
  --btn-bg: var(--on-dark);
  --btn-fg: var(--pine-deep);
  --btn-border: var(--on-dark);
}

.btn--light {
  --btn-bg: var(--on-dark);
  --btn-fg: #0b241e;
  --btn-grad: none;
  --btn-border: var(--on-dark);
}

.btn--light:hover {
  --btn-bg: var(--ochre);
  --btn-fg: #0b241e;
  --btn-border: var(--ochre);
}

.btn--lg { padding: 1.1rem 1.9rem; font-size: 1rem; }

/* Touch devices get a 44px minimum target regardless of visual size. */
@media (pointer: coarse) {
  .btn, .nav-toggle, .theme-toggle, .choice span { min-height: 44px; }
}
.btn--sm { padding: 0.66rem 1.1rem; font-size: 0.875rem; }
.btn--block { width: 100%; }

/* Text link with a rule that retracts on hover */
.link-underline {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-weight: 620;
  font-size: 0.9375rem;
  color: var(--ink);
  text-decoration: none;
  padding-bottom: 0.25rem;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-size: 100% 1px;
  background-position: 0 100%;
  transition: color var(--dur-fast) var(--ease), background-size var(--dur) var(--ease-out);
}

.link-underline:hover {
  color: var(--accent-text);
  background-size: 0% 1px;
}

.link-underline svg { transition: transform var(--dur) var(--ease-out); }
.link-underline:hover svg { transform: translateX(3px); }

.section--dark .link-underline { color: var(--on-dark); }
.section--dark .link-underline:hover { color: var(--ochre); }

/* -- 2. Header & navigation ------------------------------------------------ */

.header {
  position: sticky;
  top: 0;
  z-index: var(--z-header);
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease), background-color var(--dur) var(--ease);
}

.header.is-stuck {
  border-bottom-color: var(--border);
  background: color-mix(in srgb, var(--bg) 95%, transparent);
}

/* Sentinel the header watches with IntersectionObserver — no scroll listener. */
.scroll-sentinel {
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  height: var(--header-h);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--ink);
  text-decoration: none;
  flex: none;
}

.logo__mark {
  width: 28px;
  height: 28px;
  color: var(--pine);
  transition: transform var(--dur-slow) var(--ease-out);
}

.logo:hover .logo__mark { transform: rotate(-14deg); }

.logo__mark .dot { fill: var(--clay); }

:root[data-theme="dark"] .logo__mark,
:root:not([data-theme="light"]) .logo__mark { color: var(--pine-soft); }

@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) .logo__mark { color: var(--pine); }
}

.logo__word {
  font-family: var(--font-display);
  font-stretch: 108%;
  font-size: 1.22rem;
  font-weight: 680;
  letter-spacing: -0.035em;
}

/* "Soft" uses the accent-TEXT role, not the action colour: at wordmark size
   the solid clay only reaches 3.96:1 on the dark canvas. */
.logo__word span { color: var(--accent-text); }

.nav { display: flex; align-items: center; gap: clamp(0.9rem, 2vw, 1.9rem); }

.nav__link {
  position: relative;
  font-size: 0.9375rem;
  font-weight: 520;
  color: var(--text-muted);
  text-decoration: none;
  padding-block: 0.4rem;
  transition: color var(--dur-fast) var(--ease);
}

.nav__link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1.5px;
  background: var(--clay);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}

.nav__link:hover { color: var(--ink); }
.nav__link:hover::after,
.nav__link[aria-current="page"]::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--ink); font-weight: 620; }

.header__actions { display: flex; align-items: center; gap: var(--space-2xs); }

/* Hamburger */
.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  flex: none;
  transition: background-color var(--dur-fast) var(--ease);
}

.nav-toggle:hover { background: var(--bg-alt); }

.nav-toggle__bars {
  position: relative;
  width: 16px;
  height: 10px;
}

.nav-toggle__bars span {
  position: absolute;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast) var(--ease);
}

.nav-toggle__bars span:nth-child(1) { top: 0; }
.nav-toggle__bars span:nth-child(2) { top: 50%; transform: translateY(-50%); }
.nav-toggle__bars span:nth-child(3) { bottom: 0; }

.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(1) {
  top: 50%; transform: translateY(-50%) rotate(45deg);
}
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars span:nth-child(3) {
  bottom: auto; top: 50%; transform: translateY(-50%) rotate(-45deg);
}

@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; }

  .nav {
    position: fixed;
    inset: var(--header-h) 0 auto 0;
    z-index: var(--z-menu);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: var(--space-s) var(--gutter) var(--space-l);
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-l);
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition:
      transform var(--dur) var(--ease-out),
      opacity var(--dur) var(--ease-out),
      visibility var(--dur);
  }

  .nav.is-open { transform: none; opacity: 1; visibility: visible; }

  .nav__link {
    padding-block: 0.95rem;
    font-size: 1.2rem;
    font-family: var(--font-display);
    font-stretch: 106%;
    font-weight: 600;
    letter-spacing: -0.02em;
    border-bottom: 1px solid var(--border);
  }

  .nav__link::after { display: none; }
  .nav__link[aria-current="page"] { color: var(--accent-text); }

  .nav .btn { margin-top: var(--space-m); }
  .header__actions .btn--nav { display: none; }
}

@media (min-width: 901px) {
  .nav .btn--nav-mobile { display: none; }
}

/* -- 3. Theme toggle -------------------------------------------------------- */

.theme-toggle {
  position: relative;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  color: var(--ink);
  flex: none;
  overflow: hidden;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.theme-toggle:hover { background: var(--bg-alt); border-color: var(--ink); }

.theme-toggle svg {
  grid-area: 1 / 1;
  width: 17px;
  height: 17px;
  transition: transform var(--dur) var(--ease-out), opacity var(--dur-fast) var(--ease);
}

/* Sun shows in dark mode (click to go light); moon shows in light mode. */
.theme-toggle .icon-sun  { opacity: 0; transform: rotate(-70deg) scale(0.6); }
.theme-toggle .icon-moon { opacity: 1; transform: none; }

:root[data-theme="dark"] .theme-toggle .icon-sun  { opacity: 1; transform: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { opacity: 0; transform: rotate(70deg) scale(0.6); }

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun  { opacity: 1; transform: none; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { opacity: 0; transform: rotate(70deg) scale(0.6); }
}

/* -- 4. Footer ------------------------------------------------------------- */

.footer {
  background: var(--pine-deep);
  color: var(--on-dark-soft);
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-l);
}

.footer a { color: inherit; text-decoration: none; }

.footer__top {
  display: grid;
  grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr));
  gap: var(--space-xl) var(--gutter);
  padding-bottom: var(--space-xl);
}

.footer__brand .logo { color: var(--on-dark); }
.footer__brand .logo__mark { color: var(--on-dark) !important; }
.footer__brand .logo__word span { color: var(--ochre); }

.footer__blurb {
  margin-top: var(--space-s);
  max-width: 34ch;
  font-size: var(--fs-small);
  line-height: 1.7;
}

.footer__title {
  font-size: var(--fs-micro);
  font-weight: 620;
  letter-spacing: var(--tracking-label);
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: var(--space-s);
}

.footer__list li + li { margin-top: 0.6rem; }

.footer__list a {
  font-size: var(--fs-small);
  transition: color var(--dur-fast) var(--ease);
}

.footer__list a:hover { color: var(--on-dark); text-decoration: underline; }

.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-s);
  padding-top: var(--space-m);
  border-top: 1px solid var(--on-dark-line);
  font-size: var(--fs-micro);
  color: var(--on-dark-muted);
}

.footer__bottom p { max-width: none; }
.footer__legal { display: flex; gap: var(--space-m); flex-wrap: wrap; }
.footer__legal a:hover { color: var(--on-dark); }

@media (max-width: 900px) {
  .footer__top { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer__brand { grid-column: 1 / -1; }
}

@media (max-width: 520px) {
  .footer__top { grid-template-columns: 1fr; gap: var(--space-l); }
}

/* -- 5. Marquee ------------------------------------------------------------ */

.marquee {
  overflow: hidden;
  padding-block: var(--space-m);
  border-block: 1px solid var(--border);
  background: var(--bg);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.marquee__track {
  display: flex;
  width: max-content;
  gap: var(--space-l);
  animation: marquee 48s linear infinite;
  will-change: transform;
}

.marquee:hover .marquee__track { animation-play-state: paused; }

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-l);
  font-size: var(--fs-small);
  font-weight: 520;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  white-space: nowrap;
}

.marquee__item::after {
  content: "";
  width: 4px;
  height: 4px;
  background: var(--clay);
  border-radius: 50%;
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(calc(-50% - (var(--space-l) / 2))); }
}

@media (prefers-reduced-motion: reduce) {
  .marquee__track { animation: none; }
}

/* -- 6. Name formula --------------------------------------------------------
   COGNI + VA + SOFT. This occupies the rhythm the stat strip used to hold —
   same three-up hairline grid — but carries the brand's meaning instead of
   metrics the company hasn't earned yet. */

.formula {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
}

.formula__item {
  padding: var(--space-l) var(--space-m) var(--space-l) 0;
  border-right: 1px solid var(--border);
}

.formula__item:last-child { border-right: 0; }

/* Every item after the first sits to the right of a divider, so it needs the
   same gutter on its left that the previous item has on its right. */
.formula__item + .formula__item { padding-left: var(--space-m); }

.formula__word {
  font-family: var(--font-display);
  font-stretch: var(--wdth-display);
  font-weight: 640;
  font-size: clamp(1.75rem, 1.2rem + 2vw, 2.75rem);
  line-height: 1;
  letter-spacing: -0.04em;
  color: var(--ink);
  max-width: none;
  /* Reserve the line box so typing can't shift the row height. */
  min-height: 1em;
}

/* Gradient display text. Guarded, because without background-clip support
   `color: transparent` would erase the word entirely. The ramp runs
   ink → clay: both ends clear AA, so no part of the glyph is unreadable. */
@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .formula__word {
    background-image: var(--grad-display);
    -webkit-background-clip: text;
            background-clip: text;
    color: transparent;
  }
}

/* Typing caret. Its own box, so the parent's background-clip never hides it. */
.formula__word.is-typing::after {
  content: "";
  display: inline-block;
  width: 0.07em;
  height: 0.82em;
  margin-left: 0.05em;
  vertical-align: -0.06em;
  background: var(--clay);
  animation: caret 900ms steps(1) infinite;
}

@keyframes caret { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* The gloss and body copy arrive with their word, not before it. */
.formula__gloss,
.formula__text {
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}

.formula--sequenced .formula__gloss,
.formula--sequenced .formula__text {
  opacity: 0;
  transform: translateY(6px);
}

.formula--sequenced .formula__item.is-active .formula__gloss,
.formula--sequenced .formula__item.is-active .formula__text {
  opacity: 1;
  transform: none;
}

/* Nothing hidden if JS never runs or motion is reduced. */
.no-js .formula--sequenced .formula__gloss,
.no-js .formula--sequenced .formula__text { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .formula--sequenced .formula__gloss,
  .formula--sequenced .formula__text { opacity: 1; transform: none; }
  .formula__word.is-typing::after { display: none; }
}

.formula__gloss {
  margin-top: 0.6rem;
  font-size: var(--fs-micro);
  font-weight: 620;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
}

.formula__text {
  margin-top: var(--space-s);
  font-size: 0.9375rem;
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 34ch;
}

@media (max-width: 760px) {
  .formula { grid-template-columns: 1fr; }
  .formula__item,
  .formula__item + .formula__item {
    padding-inline: 0;          /* stacked: dividers are horizontal now */
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }
  .formula__item:last-child { border-bottom: 0; }
}

/* -- 7. Rows & cards -------------------------------------------------------- */

.rows { border-top: 1px solid var(--border); }

.row-item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 6fr) 3rem;
  align-items: start;
  gap: var(--gutter);
  padding: var(--space-l) var(--space-s) var(--space-l) 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: background-color var(--dur) var(--ease);
}

.row-item::before {
  content: "";
  position: absolute;
  left: 50%;
  right: 50%;
  top: -1px;
  height: 2px;
  background: var(--clay);
  transition: left var(--dur) var(--ease-out), right var(--dur) var(--ease-out);
}

.row-item:hover::before,
.row-item:focus-visible::before { left: 0; right: 0; }

.row-item:hover { background: var(--bg-alt); }
.row-item:hover .row-item__title { color: var(--accent-text); }

.row-item__title {
  font-size: clamp(1.22rem, 1rem + 0.85vw, 1.65rem);
  transition: color var(--dur-fast) var(--ease);
}

.row-item__desc {
  color: var(--text-muted);
  font-size: 0.9688rem;
  line-height: 1.6;
  max-width: 58ch;
}

.row-item__tags {
  margin-top: var(--space-s);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.row-item__arrow {
  align-self: center;
  justify-self: end;
  width: 2.3rem;
  height: 2.3rem;
  display: grid;
  place-items: center;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  color: var(--ink);
  transition: background-color var(--dur-fast) var(--ease), color var(--dur-fast) var(--ease),
              border-color var(--dur-fast) var(--ease), transform var(--dur) var(--ease-out);
}

.row-item:hover .row-item__arrow {
  background: var(--clay);
  border-color: var(--clay);
  color: var(--clay-fg);
  transform: rotate(-45deg);
}

@media (max-width: 900px) {
  /* Title and arrow share the first row; the description + tags block spans
     the full width underneath. Every child is placed explicitly — leaving the
     body to auto-flow dropped it into the 2.3rem arrow column. */
  .row-item {
    grid-template-columns: minmax(0, 1fr) 2.3rem;
    gap: var(--space-2xs) var(--space-s);
  }
  .row-item__title { grid-column: 1; grid-row: 1; }
  .row-item__arrow { grid-column: 2; grid-row: 1; }
  .row-item__body  { grid-column: 1 / -1; grid-row: 2; }
}

/* Generic card */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-l);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-m);
  border-color: var(--line-strong);
}

.card__title { margin-bottom: var(--space-2xs); }

.card__text {
  color: var(--text-muted);
  font-size: 0.9688rem;
  line-height: 1.65;
}

/* Engagement model card */
/* Glass, used where it means something: these cards sit over the ambient
   wash, so the blur has real colour behind it to refract. backdrop-filter is
   limited to a handful of small boxes — never a full-height scrolling
   container, where it would cost repaints on every frame. */
.model {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: var(--space-l);
  border: 1px solid var(--border);
  border-radius: var(--radius-l);
  background: var(--glass-bg);
  backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(1.3);
  transition: transform var(--dur) var(--ease-out), box-shadow var(--dur) var(--ease),
              border-color var(--dur-fast) var(--ease);
}

/* Edge lighting: a hairline that catches "light" along the top of the pane
   and fades out toward the corners. */
.model::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  border-radius: var(--radius-l) var(--radius-l) 0 0;
  background: linear-gradient(90deg, transparent, var(--glass-edge) 22%,
                                     var(--glass-edge) 78%, transparent);
  pointer-events: none;
}

/* Depth comes from the shadow and the edge highlight, NOT from rotating the
   card. A 3D tilt here displaced the card's own "Start a project" button out
   from under the cursor: hit-testing then went stale, so the button could sit
   geometrically under the pointer and still never receive :hover. An
   interactive card must never move its own controls, so the lift stays a
   small, straight translate. */
.model:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-l);
  border-color: var(--line-strong);
}

/* The edge catches more light on hover — dimensional, and it moves nothing. */
.model:hover::before {
  background: linear-gradient(90deg, transparent,
    color-mix(in srgb, var(--clay) 55%, var(--glass-edge)) 20%,
    color-mix(in srgb, var(--clay) 55%, var(--glass-edge)) 80%, transparent);
}

.model--featured:hover::before {
  background: linear-gradient(90deg, transparent,
    rgba(232, 176, 74, 0.55) 20%, rgba(232, 176, 74, 0.55) 80%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .model:hover { transform: none; }
}

.model--featured {
  background: var(--grad-pine);
  background-color: var(--pine);
  border-color: var(--pine-soft);
  color: var(--on-dark);
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.model--featured::before {
  background: linear-gradient(90deg, transparent,
    rgba(245, 241, 232, 0.28) 25%, rgba(245, 241, 232, 0.28) 75%, transparent);
}

.model--featured .model__name { color: var(--on-dark); }
.model--featured .model__price { color: var(--ochre); }
.model--featured .model__desc { color: var(--on-dark-soft); }
.model--featured .model__list li { color: var(--on-dark-soft); }
.model--featured .model__list li::before { color: var(--ochre); }
.model--featured .model__head { border-color: var(--on-dark-line); }

.model__name { font-size: var(--fs-h3); }

.model__price {
  margin-top: var(--space-2xs);
  font-size: var(--fs-small);
  font-weight: 560;
  color: var(--accent-text);
  font-variant-numeric: tabular-nums;
}

.model__desc {
  margin-top: var(--space-s);
  color: var(--text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
}

.model__head {
  padding-bottom: var(--space-m);
  margin-bottom: var(--space-m);
  border-bottom: 1px solid var(--border);
}

.model__list { font-size: 0.9375rem; }
.model__list li {
  position: relative;
  padding-left: 1.45rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.model__list li + li { margin-top: 0.7rem; }
.model__list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--clay);
}
.model--featured .model__list li::before { background: var(--ochre); }

.model__foot { margin-top: auto; padding-top: var(--space-l); }

/* -- 8. Process steps ------------------------------------------------------- */

.step {
  position: relative;
  display: grid;
  grid-template-columns: 5rem minmax(0, 1fr);
  gap: var(--gutter);
  padding-block: var(--space-l);
  border-top: 1px solid var(--on-dark-line);
}

.step:last-child { border-bottom: 1px solid var(--on-dark-line); }

/* The 01–05 sequence stays: the order of the stages is the information. */
.step__index {
  font-family: var(--font-mono);
  font-size: var(--fs-small);
  color: var(--ochre);
  letter-spacing: 0.06em;
  font-variant-numeric: tabular-nums;
  padding-top: 0.35rem;
  max-width: none;
}

.step__body { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: var(--gutter); }

.step__title { font-size: var(--fs-h3); }

.step__when {
  display: block;
  margin-top: 0.4rem;
  font-size: var(--fs-micro);
  font-weight: 560;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--on-dark-muted);
}

.step__text { color: var(--on-dark-soft); font-size: 0.9688rem; line-height: 1.7; }

.step__deliverables {
  margin-top: var(--space-s);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

@media (max-width: 860px) {
  .step { grid-template-columns: 1fr; gap: var(--space-2xs); }
  .step__body { grid-template-columns: 1fr; gap: var(--space-s); }
}

/* -- 10. Accordion ---------------------------------------------------------- */

.accordion { border-top: 1px solid var(--border); }

.accordion details { border-bottom: 1px solid var(--border); }

.accordion summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-m);
  padding-block: var(--space-m);
  cursor: pointer;
  list-style: none;
  font-family: var(--font-display);
  font-stretch: 106%;
  font-weight: 600;
  letter-spacing: -0.02em;
  font-size: clamp(1.02rem, 0.95rem + 0.4vw, 1.22rem);
  line-height: 1.35;
  transition: color var(--dur-fast) var(--ease);
}

.accordion summary::-webkit-details-marker { display: none; }
.accordion summary:hover { color: var(--accent-text); }

.accordion__icon {
  position: relative;
  flex: none;
  width: 1.6rem;
  height: 1.6rem;
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}

.accordion__icon::before,
.accordion__icon::after {
  content: "";
  position: absolute;
  inset: 50% 0.4rem;
  height: 1px;
  background: var(--ink);
  transition: transform var(--dur) var(--ease-out), background-color var(--dur-fast) var(--ease);
}

.accordion__icon::after { transform: rotate(90deg); }

details[open] .accordion__icon { background: var(--clay); border-color: var(--clay); }
details[open] .accordion__icon::before,
details[open] .accordion__icon::after { background: var(--clay-fg); }
details[open] .accordion__icon::after { transform: rotate(0deg); }

.accordion__panel {
  padding-bottom: var(--space-m);
  color: var(--text-muted);
  line-height: 1.7;
}

.accordion__panel p { max-width: var(--measure); }
.accordion__panel p + p { margin-top: var(--space-s); }

/* -- 11. Tags --------------------------------------------------------------- */

.tag {
  display: inline-flex;
  align-items: center;
  padding: 0.28rem 0.68rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg);
  font-size: var(--fs-micro);
  font-weight: 520;
  letter-spacing: 0.01em;
  color: var(--text-muted);
  white-space: nowrap;
}

.section--dark .tag,
.model--featured .tag {
  background: transparent;
  border-color: var(--on-dark-line);
  color: var(--on-dark-soft);
}

.tag--solid { background: var(--clay-wash); border-color: transparent; color: var(--accent-text); }

/* -- 12. Forms -------------------------------------------------------------- */

.form { display: grid; gap: var(--space-m); }

.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-m); }

@media (max-width: 620px) { .form__row { grid-template-columns: 1fr; } }

.field { display: flex; flex-direction: column; gap: 0.45rem; }

.field__label {
  font-size: var(--fs-micro);
  font-weight: 620;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.field__label .req { color: var(--accent-text); }

.field__control {
  width: 100%;
  max-width: none;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-m);
  font-size: 1rem;
  color: var(--ink);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease),
              background-color var(--dur-fast) var(--ease);
}

.field__control::placeholder { color: var(--faint); }

.field__control:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--pine-soft);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--pine-soft) 26%, transparent);
}

textarea.field__control { min-height: 9rem; resize: vertical; line-height: 1.6; }

select.field__control {
  appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888078' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1rem center;
  background-size: 12px;
  padding-right: 2.5rem;
}

.field__error {
  font-size: var(--fs-small);
  color: var(--accent-text);
  min-height: 1.2em;
}

.field.has-error .field__control { border-color: var(--clay); }

/* Choice chips */
.choices { display: flex; flex-wrap: wrap; gap: 0.5rem; }

.choice input { position: absolute; opacity: 0; width: 0; height: 0; }

.choice span {
  display: inline-block;
  padding: 0.58rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-pill);
  font-size: 0.875rem;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease),
              color var(--dur-fast) var(--ease);
}

.choice span:hover { border-color: var(--ink); }

.choice input:checked + span {
  background: var(--pine);
  border-color: var(--pine);
  color: var(--on-dark);
}

.choice input:focus-visible + span { outline: 2px solid var(--focus); outline-offset: 3px; }

.form__consent {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  font-size: var(--fs-small);
  color: var(--text-muted);
  line-height: 1.55;
}

.form__consent input { margin-top: 0.28rem; accent-color: var(--clay); width: 1rem; height: 1rem; flex: none; }
.form__consent span { max-width: var(--measure); }

.form__status {
  padding: var(--space-m);
  border-radius: var(--radius-m);
  border: 1px solid var(--pine-soft);
  background: var(--pine-wash);
  color: var(--ink);
  font-size: 0.9375rem;
  max-width: none;
}

.form__status--error {
  border-color: var(--clay);
  background: var(--clay-wash);
  color: var(--accent-text);
}

.form__status[hidden] { display: none; }

/* -- 13. CTA band ----------------------------------------------------------- */

.cta-band {
  position: relative;
  background: var(--grad-cta);
  background-color: var(--clay);
  color: #fff;
  overflow: hidden;
}

.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background-color: rgba(255, 255, 255, 0.11);
  -webkit-mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M23.07 8.93A10 10 0 1 0 23.07 23.07' fill='none' stroke='%23000' stroke-width='3.4'/%3E%3Crect x='22.4' y='4.2' width='6.2' height='6.2' fill='%23000'/%3E%3C/svg%3E");
          mask-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M23.07 8.93A10 10 0 1 0 23.07 23.07' fill='none' stroke='%23000' stroke-width='3.4'/%3E%3Crect x='22.4' y='4.2' width='6.2' height='6.2' fill='%23000'/%3E%3C/svg%3E");
  -webkit-mask-repeat: no-repeat;
          mask-repeat: no-repeat;
  -webkit-mask-position: 104% 150%;
          mask-position: 104% 150%;
  -webkit-mask-size: min(46%, 26rem);
          mask-size: min(46%, 26rem);
}

.cta-band__inner {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 4fr);
  gap: var(--space-xl);
  align-items: center;
  padding-block: clamp(3.5rem, 2rem + 5vw, 6rem);
}

.cta-band h2 { color: #fff; font-size: var(--fs-h1); }
.cta-band p { color: rgba(255, 255, 255, 0.88); }
.cta-band .lead { color: rgba(255, 255, 255, 0.88); }

.cta-band__actions { display: flex; flex-direction: column; gap: var(--space-s); align-items: flex-start; }
.cta-band__note {
  font-size: var(--fs-micro);
  font-weight: 520;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.78);
}

.cta-band .btn--light { --btn-bg: #fff; --btn-fg: #7a2b16; --btn-border: #fff; }
.cta-band .btn--light:hover { --btn-bg: #0b241e; --btn-fg: #f5f1e8; --btn-border: #0b241e; }
.cta-band .btn--outline-light { --btn-fg: #fff; --btn-border: rgba(255, 255, 255, 0.5); }
.cta-band .btn--outline-light:hover { --btn-bg: #fff; --btn-fg: #7a2b16; --btn-border: #fff; }

@media (max-width: 860px) {
  .cta-band__inner { grid-template-columns: 1fr; gap: var(--space-l); }
}

/* -- 14. Page hero (interior pages) ----------------------------------------- */

.page-hero {
  padding-top: clamp(2.5rem, 1.6rem + 3vw, 4.5rem);
  padding-bottom: clamp(2.5rem, 1.5rem + 3vw, 4rem);
  border-bottom: 1px solid var(--border);
}

.page-hero__inner {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--gutter) clamp(2rem, 1rem + 4vw, 4.5rem);
  align-items: end;
}

.page-hero__title { font-size: var(--fs-h1); max-width: 16ch; }
.page-hero__aside { padding-bottom: 0.4rem; }

.breadcrumb {
  display: flex;
  gap: 0.5rem;
  font-size: var(--fs-micro);
  font-weight: 520;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: var(--space-m);
}

.breadcrumb a { color: var(--faint); text-decoration: none; }
.breadcrumb a:hover { color: var(--accent-text); }
.breadcrumb [aria-current] { color: var(--ink); }

@media (max-width: 860px) {
  .page-hero__inner { grid-template-columns: 1fr; gap: var(--space-m); }
  .page-hero__title { max-width: 100%; }
}
