/* ------------------------------------------------------------
   Tokens
   ------------------------------------------------------------ */
:root {
  --bg: #FFFFFF;
  --panel: #F5F6F8;
  --ink: #1B1B1B;
  --muted: #5B6470;
  --rule: #E1E5EA;
  --blue: #3B66DE;
  --blue-soft: #C3D0F7;
  --pass: #0F6F49;
  --pass-bright: #4ADE9B;
  --bar: #1B1B1B;
  --bar-text: #FFFFFF;
  --bar-muted: #A9B0B9;
  --todo: #FFE066;

  --font: "Inter Tight", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(1.25rem, 5vw, 3.5rem);
  --measure: 62ch;
  --max: 1160px;
  --shadow: 0 2px 24px rgba(20, 30, 50, 0.08);
}

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

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.15rem;
  font-weight: 350;
  line-height: 1.7;
}

strong { font-weight: 650; }

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

a { color: var(--ink); text-underline-offset: 0.22em; text-decoration-thickness: 1px; }
a:hover { color: var(--blue); text-decoration-thickness: 2px; }

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--blue);
  color: #fff;
  padding: 0.6rem 1rem;
  z-index: 10;
}
.skip:focus { left: 0; }

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* Placeholder marker. Search for class="todo" before publishing. */
.todo {
  background: var(--todo);
  color: #000;
  padding: 0 0.3em;
}

/* ------------------------------------------------------------
   Type
   ------------------------------------------------------------ */
h1, h2, h3 {
  font-weight: 650;
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
  color: var(--ink);
}

h2 { font-size: clamp(1.9rem, 4vw, 2.6rem); margin-bottom: 1rem; }
h3 { font-size: 1.35rem; letter-spacing: -0.02em; line-height: 1.2; margin-bottom: 0.4rem; }

.page-title {
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: -0.04em;
  line-height: 1;
  max-width: 18ch;
}

.lede {
  font-size: 1.3rem;
  line-height: 1.65;
  max-width: 48ch;
  margin: 1.5rem 0 0;
}

.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1.2rem; }
.prose ul { padding-left: 1.2rem; margin: 0 0 1.2rem; }
.prose li { margin-bottom: 0.5rem; }

.center { text-align: center; }
.center .lede { margin-left: auto; margin-right: auto; }

/* ------------------------------------------------------------
   Header and footer: one dark bar system
   ------------------------------------------------------------ */
.site-head,
.site-foot {
  background: var(--bar);
  color: var(--bar-text);
}

.bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  padding-top: 1.1rem;
  padding-bottom: 1.1rem;
}

.brand {
  font-weight: 700;
  font-size: 1.55rem;
  letter-spacing: -0.04em;
  line-height: 1;
  color: var(--bar-text);
  text-decoration: none;
}
.brand:hover { color: var(--bar-text); }
.brand__dot { color: var(--pass-bright); }

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav a {
  font-weight: 500;
  font-size: 1.02rem;
  color: var(--bar-text);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--bar-text); border-bottom-color: var(--bar-muted); }
.nav a[aria-current="page"] { border-bottom-color: var(--pass-bright); }

.site-foot { margin-top: clamp(4rem, 9vw, 7rem); }
.site-foot .bar { padding-top: 2.25rem; padding-bottom: 2.25rem; }
.site-foot .brand { font-size: 2rem; }

.site-foot__note {
  margin: 0;
  padding: 1.25rem 0 2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  font-size: 0.95rem;
  color: var(--bar-muted);
}

/* ------------------------------------------------------------
   Buttons
   ------------------------------------------------------------ */
.actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

.btn {
  display: inline-block;
  font-weight: 600;
  font-size: 1.02rem;
  line-height: 1.2;
  padding: 0.85rem 1.4rem;
  border: 2px solid var(--ink);
  border-radius: 6px;
  background: var(--ink);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: var(--blue); border-color: var(--blue); color: #fff; }

.btn--plain { background: transparent; color: var(--ink); }
.btn--plain:hover { background: var(--ink); border-color: var(--ink); color: #fff; }

/* ------------------------------------------------------------
   Hero + checks panel (home)
   ------------------------------------------------------------ */
.hero {
  padding-top: clamp(2.5rem, 7vw, 5rem);
  padding-bottom: clamp(1.5rem, 4vw, 3rem);
}

.hero__title {
  font-size: clamp(2.9rem, 8.5vw, 6.4rem);
  font-weight: 700;
  letter-spacing: -0.045em;
  line-height: 0.98;
  max-width: 13ch;
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 2.5rem 4rem;
  margin-top: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.hero__intro .lede { margin-top: 0; }
.hero__open { margin: 1.25rem 0 0; color: var(--muted); font-size: 1rem; max-width: 46ch; }

.run {
  position: relative;
  background: var(--bg);
  border: 1px solid var(--rule);
  border-radius: 10px;
  box-shadow: var(--shadow);
  margin-bottom: 2rem;
}

.run__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
  padding: 0.9rem 1.2rem;
  background: var(--bar);
  color: var(--bar-text);
  border-radius: 9px 9px 0 0;
}
.run__title { font-weight: 650; font-size: 1.05rem; letter-spacing: -0.01em; }
.run__sum { font-weight: 500; font-size: 0.95rem; font-variant-numeric: tabular-nums; color: var(--bar-text); }

.run__list { list-style: none; margin: 0; padding: 0; }

.run__row {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr) auto;
  gap: 0.9rem;
  align-items: start;
  padding: 1rem 1.2rem;
  border-top: 1px solid var(--rule);
}
.run__row:first-child { border-top: 0; }

.run__name { display: block; font-weight: 600; font-size: 1.08rem; letter-spacing: -0.015em; line-height: 1.3; }
.run__detail { display: block; font-size: 0.95rem; line-height: 1.5; color: var(--muted); margin-top: 0.15rem; }
.run__status { font-weight: 600; font-size: 0.9rem; color: var(--muted); padding-top: 0.1rem; }

.run__icon {
  position: relative;
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  border: 2px solid var(--muted);
  margin-top: 0.1rem;
}

.run__row[data-state="running"] .run__icon {
  border-color: var(--rule);
  border-top-color: var(--blue);
  animation: spin 0.8s linear infinite;
}
.run__row[data-state="running"] .run__status { color: var(--blue); }

.run__row[data-state="passed"] .run__icon { background: var(--pass); border-color: var(--pass); }
.run__row[data-state="passed"] .run__icon::after {
  content: "";
  position: absolute;
  left: 0.42rem;
  top: 0.15rem;
  width: 0.34rem;
  height: 0.7rem;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.run__row[data-state="passed"] .run__status { color: var(--pass); }

.run__foot { padding: 0.8rem 1.2rem 0.95rem; border-top: 1px solid var(--rule); }
.run__replay {
  font-family: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  background: none;
  border: 0;
  padding: 0;
  color: var(--blue);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}
.run__replay[disabled] { color: var(--muted); text-decoration: none; cursor: default; }

.stamp {
  position: absolute;
  right: -0.5rem;
  bottom: -1.7rem;
  font-weight: 800;
  font-size: 2.2rem;
  letter-spacing: -0.02em;
  line-height: 1;
  text-transform: uppercase;
  color: var(--pass);
  background: var(--bg);
  border: 4px solid var(--pass);
  border-radius: 4px;
  padding: 0.4rem 1rem 0.35rem;
  box-shadow: inset 0 0 0 3px var(--bg), inset 0 0 0 5px var(--pass);
  opacity: 0;
  transform: rotate(-8deg) scale(1.6);
  transform-origin: 100% 100%;
  pointer-events: none;
}

.run.is-approved .stamp {
  opacity: 1;
  transform: rotate(-8deg) scale(1);
  transition: opacity 0.12s ease-out, transform 0.28s cubic-bezier(0.2, 1.5, 0.4, 1);
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------------------------------------
   Sections and work rows
   ------------------------------------------------------------ */
.section { padding-top: clamp(3rem, 7vw, 5.5rem); }
.section__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 2rem;
  margin-bottom: 1.5rem;
}
.section__head h2 { margin-bottom: 0; }
.section__note { margin: 0.5rem 0 0; color: var(--muted); max-width: 40rem; }

.work-row {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 1rem 3rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--rule);
}

.work-row__title {
  font-weight: 650;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  letter-spacing: -0.035em;
  line-height: 1.05;
  margin: 0;
}
.work-row__title a { color: var(--ink); text-decoration: none; }
.work-row__title a:hover { color: var(--blue); text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.15em; }

.work-row__body p { margin: 0 0 1rem; max-width: var(--measure); }

.facts {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.35rem 1.25rem;
  margin: 1.25rem 0 0;
  font-size: 1rem;
}
.facts dt { font-weight: 650; color: var(--muted); }
.facts dd { margin: 0; }

/* ------------------------------------------------------------
   Case study flow
   ------------------------------------------------------------ */
.flow {
  list-style: none;
  margin: 2rem 0 0.75rem;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  counter-reset: step;
}

.flow__step {
  counter-increment: step;
  background: var(--panel);
  border: 1px solid var(--rule);
  margin-left: -1px;
  padding: 1rem 1rem 1.2rem;
}
.flow__step:first-child { margin-left: 0; border-radius: 8px 0 0 8px; }
.flow__step:last-child { border-radius: 0 8px 8px 0; }

.flow__step--gate { background: #fff; border: 2px solid var(--pass); position: relative; z-index: 1; }

.flow__name {
  display: block;
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-bottom: 0.4rem;
}
.flow__name::before { content: counter(step) ". "; color: var(--muted); }
.flow__step--gate .flow__name { color: var(--pass); }
.flow__step p { margin: 0; font-size: 0.95rem; line-height: 1.5; }

.figcap { font-size: 0.95rem; color: var(--muted); margin: 0 0 2rem; max-width: var(--measure); }

/* ------------------------------------------------------------
   About, testimonials, contact
   ------------------------------------------------------------ */
.photo-wrap { padding-top: 0; }
.photo-slot {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  max-width: 44rem;
  border: 2px dashed var(--rule);
  border-radius: 10px;
  text-align: center;
  padding: 1rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: 1rem 3rem;
  padding: 2rem 0 2.5rem;
  border-top: 1px solid var(--rule);
}
.split h2 { margin: 0; }

.stack { display: grid; gap: 1.5rem; }
.stack h3 { margin-bottom: 0.15rem; }
.stack p, .stack ul { margin: 0; }
.stack ul { padding-left: 1.2rem; }

.role { margin: 0 0 1.5rem; }
.role h3 { margin-bottom: 0.15rem; }
.role__meta { margin: 0 0 0.75rem; color: var(--muted); font-size: 1rem; }
.role ul { margin: 0; padding-left: 1.2rem; }
.role li { margin-bottom: 0.4rem; }

.band { background: var(--panel); margin-top: clamp(2rem, 5vw, 4rem); padding: clamp(3rem, 7vw, 5rem) 0; }

.quote-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: 1.5rem;
}

.quote-card {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  padding: 2rem 2rem 1.75rem;
  background: var(--bg);
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.quote-card::before {
  content: "\201C";
  font-size: 5rem;
  font-weight: 800;
  line-height: 0.6;
  height: 2rem;
  color: var(--blue);
}
.quote-card__text { margin: 0; font-size: 1.15rem; line-height: 1.65; }
.quote-card__who { display: flex; align-items: center; gap: 0.9rem; margin-top: auto; font-size: 1rem; line-height: 1.4; }
.avatar { flex: none; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--rule); }
.avatar--initials { display: grid; place-items: center; font-size: 0.95rem; font-weight: 700; color: var(--muted); }
img.avatar { object-fit: cover; }
.quote-card--wide { grid-column: 1 / -1; }
.quote-card--wide .quote-card__text p { margin: 0 0 1rem; }
.quote-card--wide .quote-card__text p:last-child { margin-bottom: 0; }
.quote-card--wide .quote-card__rest p { margin: 0 0 1rem; }
.quote-card--wide .quote-card__rest p:last-child { margin-bottom: 0; }
.quote-card__rest[hidden] { display: none; }
.quote-card__toggle {
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--blue);
  cursor: pointer;
}
.quote-card__rest:not([hidden]) + .quote-card__toggle { margin-top: 1rem; }
.quote-card__toggle:hover { text-decoration: underline; }
.quote-card__toggle:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 3px; }

.contact-list {
  list-style: none;
  margin: 2.5rem auto 0;
  padding: 0;
  max-width: 38rem;
  text-align: left;
}
.contact-list li {
  display: grid;
  grid-template-columns: 7rem minmax(0, 1fr);
  gap: 0.5rem 1.5rem;
  align-items: baseline;
  border-top: 1px solid var(--rule);
  padding: 1rem 0;
}
.contact-list strong { font-weight: 650; }

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
@media (max-width: 860px) {
  .hero__grid,
  .work-row,
  .split { grid-template-columns: minmax(0, 1fr); }

  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow__step { margin-left: 0; margin-top: -1px; border-radius: 0; }
  .flow__step:first-child { margin-top: 0; border-radius: 8px 8px 0 0; }
  .flow__step:last-child { border-radius: 0 0 8px 8px; }

  .contact-list li { grid-template-columns: minmax(0, 1fr); }
  .stamp { right: 0.5rem; font-size: 1.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .run__row[data-state="running"] .run__icon { animation: none; }
  .run.is-approved .stamp { transition: none; }
}

.center .page-title { margin-left: auto; margin-right: auto; }

/* ------------------------------------------------------------
   Animated flow states (wreath sales flow)
   ------------------------------------------------------------ */
.flow--six { grid-template-columns: repeat(6, minmax(0, 1fr)); }

.flow--six .flow__step {
  position: relative;
  padding-bottom: 2.6rem;
  transition: opacity 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.flow--six .flow__step[data-state="idle"] { opacity: 0.4; }

.flow--six .flow__step[data-state="active"] {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 2px var(--blue);
  background: #fff;
  z-index: 1;
}
.flow--six .flow__step[data-state="active"] .flow__name { color: var(--blue); }

.flow--six .flow__step[data-state="done"] .flow__name { color: var(--pass); }
.flow--six .flow__step[data-state="done"]::after {
  content: "\2713";
  position: absolute;
  bottom: 0.7rem;
  right: 0.7rem;
  display: grid;
  place-items: center;
  width: 1.25rem;
  height: 1.25rem;
  border-radius: 50%;
  background: var(--pass);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  line-height: 1;
}

@media (max-width: 1100px) and (min-width: 861px) {
  .flow--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .flow--six .flow__step:nth-child(4) { margin-left: 0; }
  .flow--six .flow__step:nth-child(n+4) { margin-top: -1px; }
  .flow--six .flow__step:nth-child(3) { border-radius: 0 8px 0 0; }
  .flow--six .flow__step:nth-child(4) { border-radius: 0 0 0 8px; }
  .flow--six .flow__step:nth-child(1) { border-radius: 8px 0 0 0; }
  .flow--six .flow__step:nth-child(6) { border-radius: 0 0 8px 0; }
  .flow--six .flow__step:nth-child(2),
  .flow--six .flow__step:nth-child(5) { border-radius: 0; }
}

@media (max-width: 860px) {
  .flow--six { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .flow--six .flow__step { transition: none; }
}

.shots { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 16px 0; }
.shots figure { margin: 0; }
.shots img { width: 100%; height: auto; border: 1px solid var(--line, #d9d9d9); }
.shots figcaption { font-size: 0.875rem; margin-top: 6px; opacity: 0.75; }
@media (max-width: 640px) { .shots { grid-template-columns: 1fr; } }
