/* ==========================================================================
   Fluxis Studio — components.css
   Cards, service accordion, bento grid, marquee, process, forms, FAQ, article
   ========================================================================== */

/* ------------------------------ Generic card ---------------------------- */
.card {
  position: relative;
  padding: clamp(1.5rem, 2.4vw, 2rem);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card--hover:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); }
.card--shadow { box-shadow: var(--shadow); }

.card--amber { background: color-mix(in srgb, var(--amber) 22%, var(--card)); }
.card--forest { background: var(--forest); color: var(--on-forest); border-color: var(--forest); }
.card--verm { background: var(--vermilion); color: var(--on-verm); border-color: var(--vermilion); }

.card--ink {
  background: var(--inv-bg);
  color: var(--inv-fg);
  border-color: var(--inv-bg);
}
.card--ink h1, .card--ink h2, .card--ink h3, .card--ink h4 { color: var(--inv-fg); }
.card--ink p, .card--ink li { color: var(--inv-fg-2); }
.card--ink .eyebrow { color: var(--inv-fg-3); }

/* Solid-accent cards inherit their own readable foreground, so secondary text
   is dimmed with opacity rather than a hardcoded colour that only suits one
   theme. */
.card--forest p, .card--verm p,
.card--forest li, .card--verm li { color: inherit; opacity: 0.86; }

.card--amber p, .card--amber li { color: var(--ink-2); }

/* Numbered icon tile */
.tile {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--paper-2);
  flex: none;
}

.tile--amber { background: var(--amber); color: var(--on-amber); }
.tile--verm { background: var(--vermilion); color: var(--on-verm); }
.tile--forest { background: var(--forest); color: var(--on-forest); }

/* Generic responsive grids */
.grid-2, .grid-3, .grid-4 { display: grid; gap: clamp(1rem, 2vw, 1.6rem); }

@media (min-width: 640px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 960px) {
  .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ------------------------------ Marquee --------------------------------- */
.marquee {
  display: flex;
  overflow: hidden;
  user-select: none;
  gap: var(--mq-gap, 2rem);
  padding-block: 1.05rem;
  border-block: 2px solid var(--line);
  background: var(--amber);
  color: var(--on-amber);
  mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 5%, #000 95%, transparent);
}

.marquee--plain { background: var(--paper-2); color: var(--ink); }
.marquee--ink {
  background: var(--inv-bg);
  color: var(--inv-fg);
  border-color: var(--inv-bg);
}

.marquee__track {
  flex: none;
  display: flex;
  align-items: center;
  gap: var(--mq-gap, 2rem);
  min-width: 100%;
  animation: mq-scroll var(--mq-dur, 32s) linear infinite;
}

.marquee--rev .marquee__track { animation-direction: reverse; }
.marquee:hover .marquee__track { animation-play-state: paused; }

@keyframes mq-scroll {
  to { transform: translateX(calc(-100% - var(--mq-gap, 2rem))); }
}

.marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: clamp(0.85rem, 1.1vw, 1rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}

.marquee__item::after {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
}

/* Big display marquee (footer band) */
.marquee--display { padding-block: 0.75rem; }
.marquee--display .marquee__item {
  font-family: var(--display);
  font-size: clamp(1.6rem, 4.5vw, 3.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  text-transform: none;
}
.marquee--display .marquee__item::after { width: 11px; height: 11px; }

/* ------------------------------ Service accordion ----------------------- */
.svc-list {
  border-top: 2px solid var(--line);
}

.svc {
  border-bottom: 2px solid var(--line);
  transition: background-color 0.35s var(--ease);
}

.svc.is-open { background: var(--paper-2); }

/* Rows carry inline padding at all times so the tinted open state never
   butts straight up against the text. */
.svc__head {
  width: 100%;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(0.9rem, 2.5vw, 2rem);
  padding: clamp(1.15rem, 2.4vw, 1.85rem) clamp(1rem, 2.2vw, 1.75rem);
  text-align: left;
  cursor: pointer;
}

.svc__num {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: var(--ink-3);
  transition: color 0.3s var(--ease);
}

.svc.is-open .svc__num { color: var(--verm-solid); }

.svc__title {
  font-family: var(--display);
  font-size: clamp(1.4rem, 3.3vw, 2.3rem);
  font-weight: 600;
  line-height: 1.06;
  letter-spacing: -0.025em;
  transition: color 0.3s var(--ease), transform 0.4s var(--ease);
}

.svc__head:hover .svc__title { color: var(--verm-solid); transform: translateX(6px); }
.svc.is-open .svc__title { color: var(--verm-solid); }

.svc__toggle {
  position: relative;
  width: 42px; height: 42px;
  flex: none;
  border: 2px solid var(--line);
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background-color 0.3s var(--ease), transform 0.4s var(--ease),
              color 0.3s var(--ease);
}

.svc__head:hover .svc__toggle { background: var(--amber); color: var(--on-amber); }
.svc.is-open .svc__toggle {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: var(--on-verm);
  transform: rotate(45deg);
}

.svc__toggle::before,
.svc__toggle::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.svc__toggle::before { width: 15px; height: 2px; }
.svc__toggle::after { width: 2px; height: 15px; }

.svc__panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.45s var(--ease);
}
.svc.is-open .svc__panel { grid-template-rows: 1fr; }

.svc__panel > div { overflow: hidden; }

.svc__inner {
  display: grid;
  gap: clamp(1.25rem, 3vw, 2.5rem);
  padding: 0.25rem clamp(1rem, 2.2vw, 1.75rem) clamp(1.65rem, 3vw, 2.5rem);
}

@media (min-width: 880px) {
  .svc__inner {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: start;
  }
}

.svc__desc { color: var(--ink-2); max-width: 46ch; }

.svc__points { display: grid; gap: 0.6rem; }

.svc__points li {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.925rem;
  color: var(--ink-2);
}

.svc__points li::before {
  content: "";
  width: 9px; height: 9px;
  margin-top: 0.5em;
  flex: none;
  background: var(--vermilion);
  transform: rotate(45deg);
}

/* When this list sits on an inverted panel it needs the panel's foreground.
   Scoped selectors here outrank the plain `.svc__points li` colour above. */
.section--ink .svc__points li,
.card--ink .svc__points li,
.site-footer .svc__points li { color: var(--inv-fg-2); }

/* ------------------------------ Bento work grid ------------------------- */
.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.chip {
  padding: 0.6em 1.15em;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.82rem;
  font-weight: 700;
  transition: background-color 0.22s var(--ease), color 0.22s var(--ease),
              transform 0.22s var(--ease);
}

.chip:hover { transform: translateY(-2px); background: var(--amber); color: var(--on-amber); }

.chip[aria-pressed="true"] {
  background: var(--ink);
  color: var(--paper);
}

.bento {
  display: grid;
  gap: clamp(1rem, 1.8vw, 1.5rem);
  grid-auto-rows: minmax(0, auto);
}

@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .work-card { grid-column: span 3; }
  .work-card--wide { grid-column: span 4; }
  .work-card--narrow { grid-column: span 2; }
  .work-card--full { grid-column: span 6; }
}

.work-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease),
              opacity 0.35s var(--ease);
}

.work-card:hover { transform: translate(-4px, -4px); box-shadow: var(--shadow); }

.work-card.is-hidden {
  display: none;
}

.work-card__visual {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
  border-bottom: 2px solid var(--line);
  background: var(--paper-2);
}

.work-card--full .work-card__visual { aspect-ratio: 21 / 9; }

.work-card__visual svg,
.work-card__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s var(--ease);
}

.work-card:hover .work-card__visual svg,
.work-card:hover .work-card__visual img { transform: scale(1.055); }

.work-card__tagrow {
  position: absolute;
  top: 0.85rem;
  left: 0.85rem;
  display: flex;
  gap: 0.4rem;
  z-index: 2;
}

.work-card__tag {
  padding: 0.3em 0.7em;
  border: 1.5px solid var(--ink);
  border-radius: 999px;
  background: var(--paper);
  color: var(--ink);
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.work-card__body {
  display: grid;
  gap: 0.6rem;
  padding: clamp(1.1rem, 2vw, 1.5rem);
  flex: 1;
  align-content: start;
}

.work-card__title {
  font-family: var(--display);
  font-size: clamp(1.15rem, 1.9vw, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.work-card__desc { font-size: 0.925rem; color: var(--ink-2); }

.work-card__stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.35rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line-soft);
}

.work-card__stat { display: grid; gap: 0.1rem; }

.work-card__stat b {
  font-family: var(--display);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1;
}

.work-card__stat span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ------------------------------ Process timeline ------------------------ */
.process { display: grid; gap: clamp(2rem, 4vw, 3.5rem); }

@media (min-width: 980px) {
  .process { grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr); align-items: start; }
  .process__aside { position: sticky; top: calc(var(--header-h) + 2rem); }
}

.steps { display: grid; counter-reset: step; border-top: 2px solid var(--line); }

.step {
  counter-increment: step;
  display: grid;
  gap: 0.6rem;
  padding: clamp(1.4rem, 2.6vw, 2rem) 0;
  border-bottom: 2px solid var(--line);
  position: relative;
  padding-left: clamp(3.25rem, 6vw, 4.5rem);
  transition: padding-left 0.4s var(--ease);
}

.step:hover { padding-left: clamp(3.75rem, 6.5vw, 5rem); }

.step::before {
  content: "0" counter(step);
  position: absolute;
  left: 0;
  top: clamp(1.4rem, 2.6vw, 2rem);
  font-family: var(--display);
  font-size: clamp(1.5rem, 2.6vw, 2.1rem);
  font-weight: 600;
  line-height: 1;
  color: var(--verm-solid);
  font-variant-numeric: tabular-nums;
}

.step h3 {
  font-family: var(--display);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  letter-spacing: -0.02em;
}

.step p { color: var(--ink-2); font-size: 0.95rem; max-width: 52ch; }

.step__meta {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

/* ------------------------------ Stats band ------------------------------ */
.stats {
  display: grid;
  gap: 0;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

@media (min-width: 560px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.stat {
  display: grid;
  gap: 0.35rem;
  padding: clamp(1.4rem, 2.6vw, 2.1rem);
  border-right: 2px solid var(--line);
  border-bottom: 2px solid var(--line);
}

.stat:last-child { border-right: 0; }

@media (min-width: 900px) {
  .stat { border-bottom: 0; }
  .stat:nth-child(4n) { border-right: 0; }
}

.stat b {
  font-family: var(--display);
  font-size: clamp(2.1rem, 4vw, 3rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.stat span {
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.stat small { font-size: 0.85rem; color: var(--ink-2); }

/* ------------------------------ Testimonials ---------------------------- */
.quote-card {
  width: clamp(280px, 78vw, 400px);
  flex: none;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 1.1rem;
  padding: clamp(1.4rem, 2.4vw, 1.9rem);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  white-space: normal;
}

.quote-card__stars { display: flex; gap: 0.15rem; color: var(--amber); }

.quote-card blockquote {
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.5vw, 1.2rem);
  font-weight: 500;
  line-height: 1.35;
  letter-spacing: -0.015em;
}

.quote-card__who {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--line-soft);
}

.avatar {
  width: 44px; height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 50%;
  background: var(--paper-3);
  font-family: var(--display);
  font-size: 0.925rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.quote-card__name { font-weight: 700; font-size: 0.925rem; line-height: 1.3; }
.quote-card__role { font-size: 0.8rem; color: var(--ink-3); }

/* Two-row scrolling testimonial rails.
   The rail itself must be a flex row: main.js appends a duplicate track for a
   seamless loop, and without this the clone wraps onto a second line.
   --mq-gap has to be a real value here because the mq-scroll keyframe offsets
   by exactly one track width plus one gap. */
.rail {
  --mq-gap: clamp(1rem, 2vw, 1.5rem);
  display: flex;
  gap: var(--mq-gap);
  overflow: hidden;
  padding-block: 0.5rem;
  mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 4%, #000 96%, transparent);
}

.rail__track {
  flex: none;
  display: flex;
  align-items: stretch;
  gap: var(--mq-gap);
  width: max-content;
  animation: mq-scroll var(--mq-dur, 54s) linear infinite;
}

.rail--rev .rail__track { animation-direction: reverse; }
.rail:hover .rail__track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .rail { overflow-x: auto; }
  .rail__track { animation: none; }
}

/* ------------------------------ FAQ ------------------------------------- */
.faq { border-top: 2px solid var(--line); }

.faq__item { border-bottom: 2px solid var(--line); }

.faq__item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.1rem, 2vw, 1.5rem) 0;
  cursor: pointer;
  list-style: none;
  font-family: var(--display);
  font-size: clamp(1.05rem, 1.9vw, 1.35rem);
  font-weight: 600;
  letter-spacing: -0.015em;
  line-height: 1.2;
  transition: color 0.25s var(--ease);
}

.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary:hover { color: var(--verm-solid); }

.faq__icon {
  position: relative;
  width: 34px; height: 34px;
  flex: none;
  border: 2px solid var(--line);
  border-radius: 50%;
  transition: background-color 0.3s var(--ease), transform 0.35s var(--ease),
              border-color 0.3s var(--ease);
}

.faq__icon::before,
.faq__icon::after {
  content: "";
  position: absolute;
  top: 50%; left: 50%;
  translate: -50% -50%;
  background: currentColor;
}
.faq__icon::before { width: 13px; height: 2px; }
.faq__icon::after { width: 2px; height: 13px; transition: opacity 0.25s var(--ease); }

.faq__item[open] .faq__icon {
  background: var(--vermilion);
  border-color: var(--vermilion);
  color: var(--on-verm);
  transform: rotate(180deg);
}
.faq__item[open] .faq__icon::after { opacity: 0; }

.faq__answer {
  padding-bottom: clamp(1.1rem, 2vw, 1.5rem);
  max-width: 68ch;
  color: var(--ink-2);
  animation: faq-in 0.4s var(--ease-out);
}

.faq__answer p + p { margin-top: 0.85rem; }

@keyframes faq-in {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: none; }
}

/* ------------------------------ Forms ----------------------------------- */
.form { display: grid; gap: 1.35rem; }

.field { display: grid; gap: 0.45rem; }

.field > label {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.field .req { color: var(--verm-solid); }

.input,
.textarea,
.select {
  width: 100%;
  padding: 0.9em 1.05em;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--ink);
  font-size: 0.95rem;
  transition: box-shadow 0.22s var(--ease), border-color 0.22s var(--ease),
              background-color 0.22s var(--ease);
}

.input::placeholder, .textarea::placeholder { color: var(--ink-3); }

.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--vermilion);
  box-shadow: var(--shadow-sm);
}

.textarea { min-height: 150px; resize: vertical; line-height: 1.6; }

.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%2314110E' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 1.1em center;
  padding-right: 2.6em;
}
[data-theme="dark"] .select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' viewBox='0 0 14 9'%3E%3Cpath d='M1 1l6 6 6-6' stroke='%23F3F3F5' stroke-width='2' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
}

@media (min-width: 640px) {
  .field-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.35rem; }
}

/* Selectable chips (checkbox / radio) */
.chip-set { display: flex; flex-wrap: wrap; gap: 0.55rem; }

.chip-opt { position: relative; }

.chip-opt input {
  position: absolute;
  opacity: 0;
  width: 100%; height: 100%;
  inset: 0;
  cursor: pointer;
}

.chip-opt span {
  display: inline-block;
  padding: 0.62em 1.1em;
  border: 2px solid var(--line);
  border-radius: 999px;
  background: var(--card);
  font-size: 0.85rem;
  font-weight: 700;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease),
              transform 0.2s var(--ease);
}

.chip-opt input:hover + span { transform: translateY(-2px); background: var(--paper-2); }

.chip-opt input:checked + span {
  background: var(--verm-solid);
  border-color: var(--verm-solid);
  color: var(--on-verm);
}

.chip-opt input:focus-visible + span {
  outline: 3px solid var(--vermilion);
  outline-offset: 3px;
}

.form-note { font-size: 0.82rem; color: var(--ink-3); }

.error-text {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--verm-solid);
  display: none;
}
.field.has-error .error-text { display: block; }
.field.has-error .input,
.field.has-error .textarea,
.field.has-error .select { border-color: var(--vermilion); }

.form-status {
  padding: 1rem 1.15rem;
  border: 2px solid var(--forest);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--forest) 12%, var(--card));
  font-size: 0.925rem;
  font-weight: 600;
  display: none;
}
.form-status.is-on { display: block; }

/* Checkbox row (consent) */
.check-row {
  display: flex;
  align-items: flex-start;
  gap: 0.7rem;
  font-size: 0.875rem;
  color: var(--ink-2);
}

.check-row input[type="checkbox"] {
  width: 20px; height: 20px;
  flex: none;
  margin-top: 0.15em;
  accent-color: var(--vermilion);
}

/* ------------------------------ Contact details ------------------------- */
.contact-list { display: grid; gap: 1.1rem; }

.contact-item {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid var(--line-soft);
}

.contact-item:last-child { border-bottom: 0; padding-bottom: 0; }

.contact-item h3 {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 0.3rem;
}

.contact-item p, .contact-item a { font-size: 0.975rem; font-weight: 600; }
.contact-item a:hover { color: var(--verm-solid); }

/* ------------------------------ Article / prose ------------------------- */
.post-card {
  display: grid;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  transition: transform 0.32s var(--ease), box-shadow 0.32s var(--ease);
}

.post-card:hover { transform: translate(-4px, -4px); box-shadow: var(--shadow); }

.post-card__visual {
  aspect-ratio: 16 / 9;
  border-bottom: 2px solid var(--line);
  overflow: hidden;
  background: var(--paper-2);
}
.post-card__visual svg { width: 100%; height: 100%; object-fit: cover; }

.post-card__body { display: grid; gap: 0.7rem; padding: clamp(1.2rem, 2vw, 1.6rem); align-content: start; }

.post-card__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.post-card__meta .sep { opacity: 0.5; }

.post-card__title {
  font-family: var(--display);
  font-size: clamp(1.15rem, 1.8vw, 1.4rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.post-card:hover .post-card__title { color: var(--verm-solid); }

.post-card__excerpt { font-size: 0.925rem; color: var(--ink-2); }

/* Featured post spans wider */
@media (min-width: 880px) {
  .post-card--feature { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); align-items: stretch; }
  .post-card--feature .post-card__visual { aspect-ratio: auto; height: 100%; border-bottom: 0; border-right: 2px solid var(--line); }
  .post-card--feature .post-card__body { padding: clamp(1.6rem, 3vw, 2.6rem); align-content: center; }
  .post-card--feature .post-card__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
}

/* Long-form prose */
.prose { max-width: 72ch; }

.prose > * + * { margin-top: 1.15rem; }

.prose h2 {
  font-size: clamp(1.5rem, 2.6vw, 2.05rem);
  margin-top: 2.75rem;
  padding-top: 0.35rem;
  letter-spacing: -0.025em;
}

.prose h3 {
  font-size: clamp(1.2rem, 1.9vw, 1.45rem);
  margin-top: 2rem;
  letter-spacing: -0.02em;
}

.prose p { color: var(--ink-2); font-size: 1.03rem; line-height: 1.72; text-wrap: pretty; }

.prose strong { color: var(--ink); font-weight: 700; }

.prose a {
  color: var(--verm-solid);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}
.prose a:hover { background: var(--amber); color: var(--on-amber); text-decoration-color: transparent; }

.prose ul, .prose ol { display: grid; gap: 0.6rem; padding-left: 0; }

.prose ul li {
  position: relative;
  padding-left: 1.6rem;
  color: var(--ink-2);
  line-height: 1.65;
}
.prose ul li::before {
  content: "";
  position: absolute;
  left: 0.15rem; top: 0.62em;
  width: 9px; height: 9px;
  background: var(--vermilion);
  transform: rotate(45deg);
}

.prose ol { counter-reset: p; }
.prose ol li {
  position: relative;
  padding-left: 2rem;
  color: var(--ink-2);
  counter-increment: p;
  line-height: 1.65;
}
.prose ol li::before {
  content: counter(p) ".";
  position: absolute;
  left: 0;
  font-family: var(--display);
  font-weight: 700;
  color: var(--verm-solid);
}

.prose blockquote {
  padding: 1.25rem 1.5rem;
  border-left: 4px solid var(--vermilion);
  background: var(--paper-2);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--display);
  font-size: 1.15rem;
  line-height: 1.45;
  letter-spacing: -0.015em;
}

.prose figure { margin: 2rem 0; }
.prose figcaption { font-size: 0.85rem; color: var(--ink-3); margin-top: 0.6rem; }

.prose code {
  padding: 0.15em 0.4em;
  border: 1px solid var(--line-soft);
  border-radius: 4px;
  background: var(--paper-2);
  font-size: 0.9em;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
}

/* Table of contents */
.toc {
  padding: 1.35rem 1.5rem;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper-2);
}
.toc h2 {
  font-family: var(--sans) !important;
  font-size: 0.72rem !important;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin: 0 0 0.85rem !important;
  padding: 0 !important;
}
.toc ol { display: grid; gap: 0.5rem; counter-reset: t; }
.toc li { counter-increment: t; padding-left: 1.75rem; position: relative; }
.toc li::before {
  content: "0" counter(t);
  position: absolute; left: 0;
  font-size: 0.72rem; font-weight: 800;
  color: var(--verm-solid);
  top: 0.25em;
}
.toc a { font-weight: 600; font-size: 0.95rem; }
.toc a:hover { color: var(--verm-solid); }

/* Author byline */
.byline {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem;
  padding-block: 1.1rem;
  border-block: 1px solid var(--line-soft);
  font-size: 0.875rem;
  color: var(--ink-2);
}

/* ------------------------------ Logo wall ------------------------------- */
.logo-wall {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--card);
}

@media (min-width: 700px) { .logo-wall { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .logo-wall { grid-template-columns: repeat(6, minmax(0, 1fr)); } }

.logo-wall__cell {
  display: grid;
  place-items: center;
  padding: 1.35rem 1rem;
  border-right: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  font-family: var(--display);
  font-size: 1.02rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ink-3);
  transition: background-color 0.25s var(--ease), color 0.25s var(--ease);
}

.logo-wall__cell:hover { background: var(--amber); color: var(--on-amber); }

/* ------------------------------ Pricing / packages ---------------------- */
.pkg {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: clamp(1.5rem, 2.6vw, 2.15rem);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.pkg:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); }

.pkg--featured {
  background: var(--inv-bg);
  color: var(--inv-fg);
  border-color: var(--inv-bg);
  box-shadow: var(--shadow);
}
.pkg--featured .pkg__price { color: var(--inv-fg); }
.pkg--featured .pkg__price small,
.pkg--featured .pkg__desc { color: var(--inv-fg-2); }
.pkg--featured .pkg__list li { color: var(--inv-fg-2); }

.pkg__price {
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.2vw, 2.5rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.03em;
}
.pkg__price small {
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: block;
  margin-top: 0.4rem;
}

.pkg__desc { font-size: 0.925rem; color: var(--ink-2); }

.pkg__list { display: grid; gap: 0.6rem; flex: 1; }
.pkg__list li {
  display: flex;
  gap: 0.6rem;
  align-items: flex-start;
  font-size: 0.925rem;
  color: var(--ink-2);
}
.pkg__list li::before {
  content: "✓";
  color: var(--verm-solid);
  font-weight: 800;
  flex: none;
}
.pkg--featured .pkg__list li::before { color: var(--amber); }

/* ------------------------------ Team ------------------------------------ */
.person {
  display: grid;
  gap: 0.9rem;
  padding: clamp(1.2rem, 2vw, 1.6rem);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.person:hover { transform: translate(-3px, -3px); box-shadow: var(--shadow); }

.person__photo {
  aspect-ratio: 1;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--paper-3);
}
.person__photo svg { width: 100%; height: 100%; }

.person__name {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.person__role {
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--verm-solid);
}

.person p { font-size: 0.9rem; color: var(--ink-2); }

/* ------------------------------ Hero card stack ------------------------- */
.stack-cards {
  position: relative;
  aspect-ratio: 4 / 4.4;
  max-width: 520px;
  margin-inline: auto;
  z-index: 1;
}

.stack-card {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  border: 2px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.75s var(--ease-out), opacity 0.6s var(--ease);
  transform-origin: 50% 100%;
}

.stack-card[data-pos="0"] { transform: rotate(-3deg) translateY(0) scale(1); z-index: 3; }
.stack-card[data-pos="1"] { transform: rotate(3.5deg) translateY(-14px) scale(0.955); z-index: 2; }
.stack-card[data-pos="2"] { transform: rotate(-7deg) translateY(-26px) scale(0.91); z-index: 1; opacity: 0.92; }

.stack-card__visual {
  flex: 1;
  border-bottom: 2px solid var(--line);
  overflow: hidden;
  background: var(--paper-2);
}
.stack-card__visual svg { width: 100%; height: 100%; object-fit: cover; }

.stack-card__foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 1.15rem;
  background: var(--card);
}

.stack-card__label { font-family: var(--display); font-weight: 600; letter-spacing: -0.015em; }
.stack-card__kind {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.stack-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1.35rem;
}

.stack-dots button {
  width: 30px; height: 5px;
  border-radius: 999px;
  background: var(--line-soft);
  transition: background-color 0.3s var(--ease), width 0.3s var(--ease);
}
.stack-dots button[aria-selected="true"] { background: var(--vermilion); width: 46px; }

/* ------------------------------ Callout --------------------------------- */
.callout {
  display: grid;
  gap: 1.5rem;
  padding: clamp(1.75rem, 4vw, 3.25rem);
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--amber);
  color: var(--on-amber);
  box-shadow: var(--shadow);
}

@media (min-width: 860px) {
  .callout { grid-template-columns: minmax(0, 1.3fr) auto; align-items: center; }
}

.callout h2 { color: var(--on-amber); }
.callout p { color: rgba(20, 17, 14, 0.78); max-width: 52ch; }

/* ------------------------------ Compare table --------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
}

table.tbl { width: 100%; border-collapse: collapse; min-width: 560px; }

table.tbl th, table.tbl td {
  padding: 0.95rem 1.1rem;
  text-align: left;
  border-bottom: 1px solid var(--line-soft);
  font-size: 0.925rem;
}

table.tbl thead th {
  background: var(--paper-2);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-2);
}

table.tbl tbody tr:last-child td { border-bottom: 0; }
table.tbl tbody tr:hover { background: var(--paper-2); }
table.tbl td:first-child { font-weight: 700; }

/* ------------------------------ 404 ------------------------------------- */
.nf {
  display: grid;
  place-items: center;
  text-align: center;
  gap: 1.5rem;
  padding-block: clamp(4rem, 12vw, 9rem);
}

.nf__num {
  font-family: var(--display);
  font-size: clamp(6rem, 24vw, 16rem);
  font-weight: 600;
  line-height: 0.82;
  letter-spacing: -0.05em;
  color: var(--verm-solid);
}
