.home-hero {
  position: relative;
  min-height: calc(100vh - var(--header));
  display: grid;
  align-items: end;
  padding-bottom: 24px;
  overflow: hidden;
}
.home-kicker {
  display: flex;
  justify-content: space-between;
  padding: 28px var(--pad) 0;
  font-size: 13px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.flower-wrap {
  display: grid;
  justify-items: center;
  margin-top: 12px;
}
.flower {
  width: min(420px, 70vw);
  cursor: grab;
  touch-action: none;
  user-select: none;
  filter: drop-shadow(0 30px 40px rgba(80, 20, 20, 0.18));
}
.flower:active { cursor: grabbing; }
.bloom {
  margin: 8px 0 0;
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.08em;
  color: var(--muted);
}
.mega {
  margin: 0;
  padding-inline: var(--pad);
  font-size: clamp(72px, 23vw, 330px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.78;
}
.home-cta-row {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  padding: 18px var(--pad) 48px;
}
.home-cta-row p { max-width: 34ch; font-size: 20px; }

.manifesto { padding: 80px 0; }
.manifesto p {
  max-width: 18ch;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}

.cap-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 16px;
}
.tile {
  min-height: 280px;
  padding: 28px;
  border-radius: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.tile-dark {
  background: linear-gradient(160deg, #0f1116, #2a2370);
  color: var(--white);
  border: 0;
  position: relative;
  overflow: hidden;
}
.tile-dark .phone {
  position: absolute;
  right: 24px;
  bottom: -80px;
  width: 150px;
  height: 300px;
  box-shadow: 0 20px 40px rgba(79, 70, 229, 0.35);
}
.tile h3 {
  margin: 12px 0 0;
  font-size: clamp(32px, 3vw, 48px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 0.95;
}
.tile small { color: var(--muted); letter-spacing: 0.04em; }
.tile-dark small { color: #c7d2fe; }
.tile-link {
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  border-radius: 28px;
  border: 1px solid var(--line);
  background: var(--white);
  font-size: 28px;
  font-weight: 500;
  letter-spacing: -0.03em;
}
.cap-bottom { display: contents; }

.section { padding: 72px 0; }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 28px;
}
.link-arrow { font-weight: 600; color: var(--red); border-bottom: 1px solid var(--red); }

.work-list { border-top: 1px solid var(--line); }
.work-row {
  display: grid;
  grid-template-columns: 48px 1.4fr 1.2fr auto auto 48px;
  gap: 16px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.work-row strong {
  font-size: clamp(36px, 5vw, 72px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 1;
}
.work-row .red { color: var(--red); }
.work-row .grey { color: #8a8680; }
.work-row em { font-style: normal; color: var(--muted); }
.badge {
  font-size: 11px;
  letter-spacing: 0.08em;
  font-weight: 600;
}
.arrow-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.work-row:hover .arrow-btn { background: var(--red); color: var(--white); border-color: var(--red); transform: rotate(45deg); }

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 48px 0 16px;
}
.stats b {
  display: block;
  font-size: clamp(56px, 7vw, 104px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 1;
}
.stats b:has(> span) { white-space: nowrap; }
.stats b span { display: inline; margin-top: 0; max-width: none; line-height: 1; color: inherit; }
.stats span { display: block; margin-top: 12px; color: var(--muted); max-width: 16ch; }

.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0 36px; }
.chip {
  border: 0;
  background: transparent;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  font-weight: 500;
}
.chip.is-on { background: var(--ink); color: var(--white); }

.case {
  position: relative;
  min-height: 620px;
  border-radius: 32px;
  overflow: hidden;
  color: var(--white);
  padding: 48px;
  margin-bottom: 28px;
}
.case.sf { background: linear-gradient(152deg, var(--sf-a), var(--sf-end)); }
.case.hf { background: linear-gradient(155deg, var(--hf-a), var(--hf-b)); }
.case.erp { background: #121416; }
.case .kicker { letter-spacing: 0.1em; font-size: 13px; font-weight: 600; }
.case.sf .kicker { color: #c7d2fe; }
.case.hf .kicker { color: var(--hf-gold); }
.case.erp .kicker { color: #e54d4d; }
.case h2 {
  margin: 180px 0 8px;
  font-size: clamp(64px, 8vw, 110px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
}
.case .sub { max-width: 28ch; font-size: 20px; opacity: 0.88; }
.case .phones { position: absolute; right: 48px; top: 70px; width: 460px; height: 520px; }
.case .phone.front { width: 230px; height: 470px; left: 0; top: 20px; }
.case .phone.back { width: 200px; height: 410px; right: 0; top: 70px; }
.case .phone.mid { width: 190px; height: 390px; left: 150px; top: 0; z-index: 3; }
.case-block[hidden] {
  display: none !important;
}
.meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr) auto;
  gap: 16px;
  align-items: end;
  margin: -8px 0 72px;
  font-size: 14px;
}
.meta[hidden] {
  display: none !important;
}
.meta small { display: block; letter-spacing: 0.08em; color: var(--muted); font-size: 11px; }
.meta .actions { display: flex; gap: 18px; justify-content: flex-end; }
.meta .actions a:first-child { color: var(--red); font-weight: 600; text-decoration: underline; }
.meta .actions a:last-child { color: var(--muted); }
.erp-ui {
  position: absolute;
  right: 40px;
  top: 70px;
  width: min(520px, 46%);
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 20px;
  padding: 18px;
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  font-size: 13px;
}
.erp-ui nav { display: grid; gap: 14px; opacity: 0.7; }
.erp-ui nav b { opacity: 1; color: var(--white); }
.erp-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.erp-cards div, .erp-row {
  background: rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 12px;
}
.erp-row { grid-column: 1 / -1; margin-top: 8px; opacity: 0.75; }

.service { border-bottom: 1px solid var(--line); }
.service summary { list-style: none; cursor: pointer; }
.service summary::-webkit-details-marker { display: none; }
.closed-row, .open-card { }
.closed-row {
  display: grid;
  grid-template-columns: 70px 1fr 1fr 56px;
  align-items: center;
  min-height: 120px;
  gap: 12px;
}
.closed-row b { font-size: clamp(32px, 4vw, 56px); font-weight: 500; letter-spacing: -0.04em; }
.closed-row span { color: var(--muted); }
.plus {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  font-size: 26px;
}
details[open] .closed-row { display: none; }
.open-card { display: none; }
details[open] .open-card {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 56px;
  gap: 24px;
  margin: 12px 0 20px;
  padding: 48px;
  border-radius: 32px;
  background: #121416;
  color: var(--white);
}
.open-card h3 {
  margin: 18px 0 12px;
  font-size: clamp(40px, 4.5vw, 64px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1;
}
.open-card .desc { color: rgba(255,255,255,0.7); max-width: 36ch; }
.open-card .flag { margin-top: 48px; letter-spacing: 0.1em; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.5); }
.open-card .what { color: #e54d4d; font-size: 12px; font-weight: 600; letter-spacing: 0.12em; }
.open-card ul { margin: 12px 0 0; padding: 0; list-style: none; font-size: 18px; line-height: 2.1; }
.minus {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--red);
  display: grid;
  place-items: center;
  font-size: 28px;
}

/* JS accordion: crossfade the row and card while height eases. */
.service.js-service summary {
  display: flow-root;
  position: relative;
}
.service.js-service .closed-row {
  transition: opacity 0.22s ease 0.1s, visibility 0s linear 0s;
}
.service.js-service[open] .closed-row { display: grid; }
.service.js-service .open-card {
  display: grid;
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 1;
  transition: opacity 0.14s ease, visibility 0s linear 0.14s;
}
.service.js-service:not(.is-open) .open-card { margin: 0; }
.service.js-service.is-open .open-card {
  position: relative;
  top: auto;
  left: auto;
  right: auto;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 0.28s ease 0.12s, visibility 0s linear 0s;
}
.service.js-service.is-open .closed-row {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.12s ease, visibility 0s linear 0.12s;
}
@media (prefers-reduced-motion: reduce) {
  .service.js-service .closed-row,
  .service.js-service .open-card {
    transition: none;
  }
}

.steps, .models { display: grid; gap: 16px; }
.steps { grid-template-columns: repeat(5, 1fr); }
.models { grid-template-columns: repeat(3, 1fr); }
.step, .model {
  min-height: 300px;
  padding: 24px;
  border-radius: 24px;
  border: 1px solid rgba(14, 14, 16, 0.14);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.step b, .model b { font-size: 56px; font-weight: 500; letter-spacing: -0.05em; color: var(--red); }
.step h3, .model h3 { margin: 0 0 8px; font-size: 28px; }
.step p, .model p, .model li { color: var(--muted); }
.step.dark, .model.featured { background: #121416; color: var(--white); border: 0; }
.model.featured { background: var(--red); }
.step.dark b { color: #e54d4d; }
.step.dark p, .model.featured p, .model.featured li { color: rgba(255,255,255,0.8); }
.model h3 { font-size: 36px; letter-spacing: -0.04em; font-weight: 500; }
.model ul { padding: 0; margin: 16px 0 0; list-style: none; line-height: 1.9; }
.model .tag { font-size: 12px; font-weight: 600; letter-spacing: 0.12em; color: var(--red); }
.model.featured .tag, .model.featured h3 { color: var(--white); }

.story {
  background: #121416;
  color: var(--white);
  border-radius: 32px;
  padding: 64px;
  margin: 48px 0;
}
.story h2 {
  max-width: 16ch;
  margin: 16px 0 28px;
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.principles { border-top: 1px solid var(--line); }
.principle {
  display: grid;
  grid-template-columns: 70px 1fr 1fr;
  gap: 16px;
  align-items: center;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
}
.principle h3 { margin: 0; font-size: clamp(28px, 3vw, 44px); font-weight: 500; letter-spacing: -0.04em; }
.principle p { color: var(--muted); }

.cs-hero {
  min-height: 640px;
  border-radius: 32px;
  padding: 48px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.cs-hero.sf { background: linear-gradient(152deg, var(--sf-a), var(--sf-b)); }
.cs-hero.hf { background: linear-gradient(155deg, var(--hf-a), var(--hf-b)); }
.cs-hero h1 {
  margin: 120px 0 12px;
  font-size: clamp(64px, 8vw, 120px);
  font-weight: 500;
  letter-spacing: -0.05em;
  line-height: 0.9;
}
.crumb { font-size: 13px; letter-spacing: 0.08em; margin-bottom: 20px; }
.store {
  display: inline-flex;
  margin-top: 28px;
  height: 50px;
  padding: 0 20px;
  border-radius: 25px;
  background: var(--white);
  color: var(--ink);
  align-items: center;
  font-weight: 600;
}
.facts {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 12px;
  padding: 28px 0 8px;
  font-size: 15px;
}
.facts small { display: block; color: var(--muted); letter-spacing: 0.08em; font-size: 11px; }
.split { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 40px; }
.split h2 { font-size: clamp(40px, 4vw, 64px); font-weight: 500; letter-spacing: -0.04em; line-height: 1; margin: 0 0 8px; }
.pair + .pair { margin-top: 24px; }
.pair strong { display: block; margin-bottom: 8px; font-size: 13px; letter-spacing: 0.08em; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature {
  min-height: 280px;
  padding: 24px;
  border-radius: 24px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.feature.sf { background: #f6f6ff; border: 1px solid #e3e4fb; }
.feature.hf { background: #faf6f0; border: 1px solid #eadfcb; }
.feature .num { font-weight: 600; }
.feature.sf .num { color: var(--sf-a); }
.feature.hf .num { color: #7a4ea8; }
.feature h3 { margin: 12px 0 8px; font-size: 28px; }
.feature p { color: var(--muted); }
.ico {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--white);
  font-size: 22px;
}
.feature.sf .ico { background: linear-gradient(135deg, var(--sf-a), var(--sf-b)); }
.feature.hf .ico { background: linear-gradient(135deg, #1e1b33, #3b1a5c); color: var(--hf-gold); }
.process {
  background: #121416;
  color: var(--white);
  border-radius: 32px;
  padding: 56px;
}
.process .eyebrow {
  color: #e54d4d;
  font-weight: 500;
  letter-spacing: 0.08em;
  margin-bottom: 20px;
}
.process h2 {
  margin: 0 0 98px;
  font-size: clamp(32px, 4vw, 48px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.05;
}
.process-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
}
.process-grid > div {
  border-top: 1px solid rgba(255, 255, 255, 0.15);
  padding-top: 24px;
}
.process-grid span {
  display: block;
  color: #e54d4d;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.08em;
}
.process-grid strong {
  display: block;
  margin: 12px 0 11px;
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.process-grid p {
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.55;
  max-width: 250px;
}
.gallery {
  border-radius: 32px;
  padding: 48px 24px;
  display: flex;
  justify-content: center;
  gap: 28px;
  overflow-x: auto;
}
.gallery.sf { background: linear-gradient(160deg, #0f1116, #2a2370); }
.gallery.hf { background: linear-gradient(160deg, var(--hf-a), var(--hf-b)); }
.gallery .phone { position: relative; width: 220px; height: 450px; flex: none; }
.chips-row {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 10px;
}
.tech {
  display: inline-flex;
  align-items: center;
  border: 1px solid #e5e2de;
  border-radius: 999px;
  padding: 12px 20px;
  background: #fff;
  color: #0d0f11;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
}
.results {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 40px;
  align-items: start;
  background: #0f1116;
  color: var(--white);
  border-radius: 32px;
  padding: 120px 56px 74px;
}
.results small {
  position: absolute;
  top: 56px;
  left: 56px;
  color: #c7d2fe;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.results b {
  display: block;
  font-size: clamp(40px, 4.5vw, 56px);
  font-weight: 500;
  letter-spacing: -0.04em;
  line-height: 1.2;
}
.results p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 15px;
  line-height: 1.55;
  max-width: 250px;
}
.next {
  display: block;
  min-height: 600px;
  border-radius: 32px;
  padding: 56px;
  color: var(--white);
  position: relative;
  overflow: hidden;
}
.next.hf { background: linear-gradient(155deg, var(--hf-a), var(--hf-b)); }
.next.sf { background: linear-gradient(155deg, var(--sf-a), var(--sf-end)); }
.next-copy { position: relative; z-index: 2; max-width: 36ch; }
.next-kicker {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.next.hf .next-kicker { color: var(--hf-gold); }
.next.sf .next-kicker { color: #c7d2fe; }
.next h2 {
  margin: 248px 0 12px;
  font-size: clamp(56px, 8vw, 110px);
  font-weight: 500;
  letter-spacing: -0.06em;
  line-height: 0.9;
}
.next-sub {
  margin: 0;
  max-width: 34ch;
  font-size: 20px;
  line-height: 1.3;
  color: rgba(244, 238, 227, 0.85);
}
.next-link {
  display: inline-block;
  margin-top: 41px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.next.hf .next-link { color: var(--hf-gold); }
.next.sf .next-link { color: #c7d2fe; }
.next .phones {
  position: absolute;
  right: 48px;
  top: 80px;
  width: 560px;
  height: 480px;
  pointer-events: none;
}
.next.hf .phone {
  width: 216px;
  height: 394px;
  border-radius: 34px;
  padding: 8px;
}
.next.hf .phone img { border-radius: 26px; }
.next.hf .phone.back.left { left: 0; top: 80px; }
.next.hf .phone.back.right { right: 0; left: auto; top: 80px; }
.next.hf .phone.mid { left: 160px; top: 0; z-index: 3; }
.next.sf .phone.front {
  left: 20px;
  top: 0;
  width: 260px;
  height: 518px;
  border-radius: 40px;
}
.next.sf .phone.back {
  right: 0;
  left: auto;
  top: 60px;
  width: 230px;
  height: 456px;
  border-radius: 40px;
}
.next.sf .phone img { border-radius: 30px; }
.doc { display: grid; grid-template-columns: 240px 1fr; gap: 48px; padding-bottom: 40px; }
.toc { position: sticky; top: 110px; align-self: start; font-size: 14px; }
.toc a { display: block; padding: 6px 0; color: var(--muted); }
.toc a:hover { color: var(--ink); }
.prose { max-width: 720px; }
.prose h1 { font-size: clamp(48px, 6vw, 80px); font-weight: 500; letter-spacing: -0.05em; margin: 0 0 8px; }
.prose h2 { margin: 36px 0 8px; font-size: 28px; }
.prose p { margin-bottom: 8px; font-size: 17px; }
.prose a { color: var(--red); text-decoration: underline; }

@media (max-width: 900px) {
  .cap-grid, .work-row, .stats, .meta, .steps, .models, .features, .process-grid, .results, .facts, .split, .doc, .principle, .closed-row, details[open] .open-card {
    grid-template-columns: 1fr;
  }
  .work-row { gap: 6px; }
  .case .phones, .erp-ui { position: relative; right: auto; top: auto; width: 100%; margin-top: 24px; }
  .case { min-height: 0; }
  .case h2 { margin-top: 40px; }
  .next {
    min-height: 0;
    padding: 36px 28px 28px;
  }
  .next-copy { max-width: none; }
  .next h2 { margin: 36px 0 12px; font-size: 56px; }
  .next .phones {
    position: relative;
    right: auto;
    top: auto;
    width: 100%;
    height: 360px;
    margin-top: 28px;
  }
  .next.hf .phone.back.left,
  .next.hf .phone.back.right,
  .next.hf .phone.mid {
    width: 140px;
    height: 280px;
  }
  .next.hf .phone.back.left { top: 40px; }
  .next.hf .phone.back.right { top: 40px; }
  .next.hf .phone.mid { left: 50%; top: 0; transform: translateX(-50%); }
  .next.sf .phone.front {
    left: 12%;
    width: 160px;
    height: 320px;
  }
  .next.sf .phone.back {
    width: 140px;
    height: 280px;
    top: 40px;
  }
  .story, .cs-hero, .open-card { padding: 28px; }
  .process { padding: 36px 28px; }
  .process h2 { margin-bottom: 40px; }
  .process-grid { gap: 28px; }
  .process-grid p { max-width: none; }
  .results {
    gap: 28px;
    padding: 72px 28px 36px;
  }
  .results small { top: 28px; left: 28px; }
  .results p { max-width: none; }
  .home-cta-row { flex-direction: column; align-items: flex-start; }
}
