/* =========================================================
   Social Media Studio — Enhancements
   Loaded after style.css on every page.
   1. Fixes
   2. Styles for components that had no CSS yet
      (How It Works consoles, guide page, policy pages, 404)
   3. Motion layer (works with assets/js/enhancements.js)
   Everything animated respects "reduce motion" settings.
   ========================================================= */

/* =========================================================
   1. FIXES
   ========================================================= */

/* Footer "Enquire Now" button was forced to inline-block and wrapped */
.footer-col a.btn { display: flex; }

/* Hero demo: the approval badge covered the demo's first tab */
.floating-badge-approval { top: auto; bottom: 26%; left: -64px; }
@media (max-width: 1100px) { .floating-badge-approval { left: -16px; bottom: 12%; } }

/* Policy pages: website + dates were dark text on the dark hero */
.doc-hero .doc-org-sub { color: #DBCDE3; margin: 0 0 1.1rem; font-size: 0.98rem; }
.doc-meta { color: #EBDFF0; font-size: 0.92rem; line-height: 1.75; margin-bottom: 1.5rem; }
.doc-meta strong { color: #FFFFFF; }
.doc-meta a { color: var(--saffron-light); }
.doc-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }

/* Never allow sideways page scrolling (clip keeps sticky elements working) */
html, body { overflow-x: clip; }
.doc-layout > * { min-width: 0; }

/* Wide policy tables scroll inside their own box on phones */
.table-scroll {
  overflow-x: auto;
  margin-block: 1.25rem 1.75rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-m);
  -webkit-overflow-scrolling: touch;
}
.table-scroll table { margin: 0; min-width: 560px; }
.table-scroll tr.header th { background: var(--aubergine); color: #FFFFFF; }
.table-scroll tr.even td { background: var(--mist); }

/* "All policies" block at the end of every document */
.doc-footer-nav {
  margin-top: 3rem;
  padding: 1.75rem;
  border-radius: var(--radius-l);
  background: var(--mist);
  border: 1px solid var(--line-light);
}
.doc-footer-nav h2 { font-size: var(--step-2); margin-bottom: 1rem; }
.policy-links {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.5rem;
}
.policy-links a {
  display: block;
  padding: 0.65rem 0.9rem;
  border-radius: var(--radius-s);
  background: #FFFFFF;
  border: 1px solid var(--line);
  color: var(--aubergine);
  font-weight: 600;
  font-size: 0.9rem;
  text-decoration: none;
  transition: transform var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast);
}
.policy-links a:hover { transform: translateY(-2px); border-color: var(--orchid); box-shadow: var(--shadow-s); }
.policy-links a[aria-current="page"] { background: var(--aubergine); color: #FFFFFF; border-color: var(--aubergine); }

/* Contact page */
.req { color: #C2361B; font-weight: 700; margin-left: 0.1rem; }
.req-note { margin: -1rem 0 1.5rem; font-size: 0.85rem; color: var(--muted); }
.char-count { margin-top: 0.35rem; text-align: right; font-size: 0.8rem; color: var(--muted); }
.char-count.is-full { color: var(--saffron-ink); font-weight: 700; }
.hp-field { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status.is-error { color: #A4301A; background: #FDECEA; border: 1px solid #F5C2B7; padding: 0.8rem 1rem; border-radius: var(--radius-s); }
.contact-info { display: grid; gap: 1rem; align-content: start; }
.check-field .check { display: flex; gap: 0.7rem; align-items: flex-start; font-size: 0.9rem; line-height: 1.5; cursor: pointer; }
.check-field input[type="checkbox"] { width: 18px; height: 18px; margin-top: 0.15rem; flex: none; accent-color: var(--plum); }

/* =========================================================
   2. COMPONENTS THAT HAD NO STYLES
   ========================================================= */

/* ---------- How It Works: preview consoles ---------- */
.step-preview-box {
  margin-block: 1.5rem 1.25rem;
  padding: 1.1rem;
  border-radius: var(--radius-m);
  background: linear-gradient(160deg, var(--aubergine-card) 0%, var(--aubergine-deep) 100%);
  color: #EBDFF0;
  border: 1px solid rgba(192, 98, 154, 0.25);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 14px 34px -14px rgba(30, 8, 43, 0.6);
  position: relative;
  overflow: hidden;
}
.step-preview-box::before {
  /* faint scan grid */
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}
.step-preview-box > * { position: relative; }

.preview-box-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.live-dot-wrap { display: inline-flex; align-items: center; gap: 0.55rem; color: #FFFFFF; }
.live-dot {
  position: relative;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--emerald);
  box-shadow: 0 0 0 0 var(--emerald-glow);
  animation: fxLivePulse 2s ease-out infinite;
}
@keyframes fxLivePulse {
  0% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
  100% { box-shadow: 0 0 0 9px rgba(16, 185, 129, 0); }
}
.preview-status-pill {
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--saffron-light);
  background: rgba(232, 137, 26, 0.12);
  border: 1px solid rgba(232, 137, 26, 0.35);
  transition: color 0.3s, background-color 0.3s, border-color 0.3s;
}
.preview-status-pill.is-ok { color: #6EE7B7; background: rgba(16, 185, 129, 0.12); border-color: rgba(16, 185, 129, 0.4); }

/* Stage 1: objective chips */
.objective-live-display {
  display: grid;
  gap: 0.2rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.obj-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #BFA9CB; }
.obj-val { font-family: var(--font-display); font-size: 1.35rem; color: #FFFFFF; }
.obj-target { font-size: 0.85rem; color: var(--saffron-light); }
.obj-val.fx-swap, .obj-target.fx-swap { animation: fxSwap 0.45s var(--ease-spring); }
@keyframes fxSwap { from { opacity: 0; transform: translateY(8px); filter: blur(4px); } to { opacity: 1; transform: none; filter: none; } }

.chips--interactive { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip-btn {
  padding: 0.5rem 0.9rem;
  border-radius: var(--radius-full);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  color: #E7DAEE;
  font: 600 0.8rem/1.2 var(--font-sans);
  cursor: pointer;
  transition: background-color var(--trans-fast), border-color var(--trans-fast), color var(--trans-fast), transform var(--trans-fast);
}
.chip-btn:hover { border-color: var(--orchid); transform: translateY(-2px); }
.chip-btn.is-active {
  background: var(--ribbon);
  border-color: transparent;
  color: #FFFFFF;
  box-shadow: 0 6px 18px -6px rgba(232, 137, 26, 0.6);
}

/* Stage 2: knowledge feeds */
.feed-grid { display: grid; gap: 0.6rem; }
.feed-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform var(--trans-base), border-color var(--trans-base), background-color var(--trans-base);
}
.feed-item:hover { transform: translateX(4px); border-color: rgba(192, 98, 154, 0.5); background: rgba(255, 255, 255, 0.08); }
.feed-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(192, 98, 154, 0.18);
  color: var(--rose);
}
.feed-icon svg { width: 20px; height: 20px; }
.feed-title { font-weight: 700; font-size: 0.92rem; color: #FFFFFF; }
.feed-meta { font-size: 0.78rem; color: #BFA9CB; }
.feed-badge {
  padding: 0.25rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  color: #6EE7B7;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.35);
}

/* Stage 3: guardrail bars */
.guardrail-bars { display: grid; gap: 0.95rem; }
.guard-info { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.25rem 1rem; margin-bottom: 0.45rem; font-size: 0.82rem; color: #BFA9CB; }
.guard-info strong { color: #FFFFFF; font-weight: 600; }
.guard-track { height: 8px; border-radius: var(--radius-full); background: rgba(255, 255, 255, 0.08); overflow: hidden; }
.guard-fill {
  position: relative;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--plum), var(--orchid) 60%, var(--saffron));
  overflow: hidden;
  transform-origin: left;
}
.guard-fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.55), transparent);
  width: 30%;
  animation: fxBarSheen 2.8s ease-in-out infinite;
}
@keyframes fxBarSheen { from { transform: translateX(-120%); } to { transform: translateX(380%); } }
.guard-fill.fx-grow { animation: fxGrow 1.4s var(--ease-spring) both; }
@keyframes fxGrow { from { transform: scaleX(0); } }

/* Stage 4: element cards (base grid already exists as .elements) */
.element-card { position: relative; }
.elements div.elem-badge {
  /* .elements div styles every div as a card; undo that for the badge */
  min-height: 0;
  border: 0;
  box-shadow: none;
  transform: none;
  display: inline-block;
  margin-bottom: 0.6rem;
  padding: 0.22rem 0.6rem;
  border-radius: var(--radius-full);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--plum);
  background: var(--line-light);
}

/* Stage 5: platform tabs */
.platform-tabs {
  display: flex;
  gap: 0.35rem;
  padding: 0.3rem;
  margin-bottom: 0.9rem;
  border-radius: var(--radius-full);
  background: rgba(255, 255, 255, 0.06);
  overflow-x: auto;
  scrollbar-width: none;
}
.platform-tabs::-webkit-scrollbar { display: none; }
.plat-tab {
  flex: 1 0 auto;
  padding: 0.55rem 1rem;
  border: 0;
  border-radius: var(--radius-full);
  background: transparent;
  color: #D7C6E0;
  font: 600 0.82rem/1 var(--font-sans);
  cursor: pointer;
  transition: background-color var(--trans-fast), color var(--trans-fast);
}
.plat-tab:hover { color: #FFFFFF; }
.plat-tab.is-active { background: #FFFFFF; color: var(--aubergine); box-shadow: 0 4px 14px -4px rgba(0, 0, 0, 0.4); }
.plat-spec-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.spec-cell {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.spec-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: #BFA9CB; }
.spec-val { font-size: 0.88rem; color: #FFFFFF; line-height: 1.35; }
.spec-val.fx-swap { animation: fxSwap 0.45s var(--ease-spring); }

/* Stage 6: approval simulator */
.approval-simulator { display: grid; gap: 0.9rem; }
.approval-meta { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; font-size: 0.82rem; }
.meta-tag { color: #BFA9CB; }
.meta-status { font-weight: 700; color: var(--saffron-light); transition: color 0.3s; }
.meta-status.is-ok { color: #6EE7B7; }
.approval-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.approval-actions .btn-outline { color: #FFFFFF; background: transparent; border-color: rgba(255, 255, 255, 0.35); }
.approval-actions .btn-outline:hover { background: rgba(255, 255, 255, 0.1); border-color: #FFFFFF; color: #FFFFFF; }
.approval-toast {
  padding: 0.75rem 0.95rem;
  border-radius: var(--radius-s);
  font-size: 0.85rem;
  color: #D1FAE5;
  background: rgba(16, 185, 129, 0.14);
  border: 1px solid rgba(16, 185, 129, 0.4);
  animation: fxSwap 0.5s var(--ease-spring);
}
.fx-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-right: 0.4rem;
  vertical-align: -2px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: fxSpin 0.7s linear infinite;
}
@keyframes fxSpin { to { transform: rotate(360deg); } }

/* Stage 7: dispatch pipeline */
.dispatch-pipeline { display: flex; align-items: stretch; gap: 0.5rem; position: relative; }
.dispatch-pipeline .pipeline-step { flex: 1 1 0; }
.pipeline-arrow { display: grid; place-items: center; flex: none; color: var(--saffron-light); }
.pipeline-arrow svg { width: 18px; height: 18px; animation: fxNudge 1.6s ease-in-out infinite; }
@keyframes fxNudge { 50% { transform: translateX(4px); } }
.pipeline-step {
  display: grid;
  gap: 0.25rem;
  padding: 0.8rem 0.9rem;
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  position: relative;
}
.p-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: #BFA9CB; }
.pipeline-step strong { font-size: 0.92rem; color: #FFFFFF; }
.pipeline-step .ok { color: #6EE7B7; }
.pipeline-step .live { color: var(--saffron-light); }
.pipeline-step .live::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 0.4rem;
  border-radius: 50%;
  background: var(--saffron-light);
  animation: fxBlink 1.2s ease-in-out infinite;
}
@keyframes fxBlink { 50% { opacity: 0.25; } }
.dispatch-pipeline::after {
  /* a packet travelling across the pipeline */
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 60px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--saffron-light), transparent);
  animation: fxPacket 2.8s ease-in-out infinite;
}
@keyframes fxPacket { from { transform: translateX(0); opacity: 0; } 15%, 85% { opacity: 1; } to { transform: translateX(calc(100cqw - 60px)); opacity: 0; } }
.dispatch-pipeline { container-type: inline-size; }

/* Stage 8: telemetry */
.telemetry-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; }
.telem-card {
  padding: 0.9rem;
  border-radius: var(--radius-s);
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.telem-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: #BFA9CB; }
.telem-val { margin-block: 0.3rem 0.2rem; font-family: var(--font-display); font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); color: #FFFFFF; font-variant-numeric: tabular-nums; }
.telem-delta { font-size: 0.75rem; color: #6EE7B7; }

@media (max-width: 640px) {
  .plat-spec-row, .telemetry-grid { grid-template-columns: 1fr; }
  .dispatch-pipeline { flex-direction: column; }
  .pipeline-arrow svg { transform: rotate(90deg); animation: none; }
  .feed-item { grid-template-columns: auto 1fr; }
  .feed-badge { grid-column: 2; justify-self: start; }
}

/* ---------- Get Social Media Studio ---------- */
.big-steps,
.prose .big-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  margin-top: 1.5rem;
  font-family: var(--font-display);
  font-size: var(--step-3);
  line-height: 1.15;
  color: var(--aubergine);
}
.big-steps span:nth-child(2) { color: var(--plum); }
.big-steps span:nth-child(3) { color: var(--saffron-ink); }
.section--dark .big-steps { color: #FFFFFF; }
.section--dark .big-steps span:nth-child(2) { color: var(--rose); }
.section--dark .big-steps span:nth-child(3) { color: var(--saffron-light); }
.lane--before { opacity: 0.85; }
.lane--before h3 { color: var(--muted); }

/* ---------- Content Strategy Guide ---------- */
.guide-toc {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.6rem;
  margin-block: 1.5rem 2.5rem;
}
.guide-toc a {
  display: grid;
  gap: 0.15rem;
  height: 100%;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-m);
  background: #FFFFFF;
  border: 1px solid var(--line);
  text-decoration: none;
  transition: transform var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast);
}
.guide-toc a:hover { transform: translateY(-3px); border-color: var(--orchid); box-shadow: var(--shadow-m); }
.guide-toc a span:first-child { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.08em; color: var(--saffron-ink); }
.guide-toc a span:last-child { font-weight: 600; color: var(--aubergine); line-height: 1.35; }
.flowline {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-m);
  background: var(--mist);
  border: 1px dashed var(--orchid);
  color: var(--muted);
  line-height: 2;
}
.flowline strong { color: var(--aubergine); padding: 0.15rem 0.5rem; border-radius: var(--radius-xs); background: #FFFFFF; box-shadow: var(--shadow-xs); }
.guide-part {
  margin-top: 3rem !important;
  padding: 0.75rem 1rem;
  border-left: 4px solid var(--saffron);
  border-radius: 0 var(--radius-s) var(--radius-s) 0;
  background: linear-gradient(90deg, rgba(232, 137, 26, 0.1), transparent);
  letter-spacing: 0.04em;
  color: var(--aubergine);
}
.canvas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; margin-block: 1.25rem; }
.canvas-grid > div {
  display: grid;
  gap: 0.35rem;
  min-height: 120px;
  padding: 1rem;
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
  background: repeating-linear-gradient(180deg, #FFFFFF 0 27px, var(--line-light) 27px 28px);
  white-space: pre-line;
}
.canvas-grid strong { color: var(--aubergine); }
.canvas-grid em { color: var(--muted); font-size: 0.88rem; }

/* ---------- 404 ---------- */
.notfound { padding-block: clamp(4rem, 10vw, 8rem); text-align: center; position: relative; overflow: hidden; }
.notfound .big {
  font-family: var(--font-display);
  font-size: clamp(6rem, 4rem + 12vw, 12rem);
  font-weight: 700;
  line-height: 1;
  background: var(--ribbon);
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 6s ease infinite;
}
.notfound .lead { max-width: 52ch; margin: 1rem auto 2rem; }

/* =========================================================
   3. MOTION LAYER
   ========================================================= */

/* ---------- Smooth page-to-page transitions ----------
   Modern browsers (Chrome, Edge, Safari 18+) cross-fade between
   pages natively; no coloured screen is shown. Older browsers get a
   quick fade-out / fade-in of the page itself (see enhancements.js). */
@view-transition { navigation: auto; }
::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 0.32s;
  animation-timing-function: ease;
}

/* ---------- Hero intro (home) ---------- */
.fx-ready .hero .cap-word {
  opacity: 0;
  transform: translateY(0.6em) rotateX(-40deg);
  transform-origin: 50% 100%;
  filter: blur(6px);
}
.fx-ready .hero.fx-in .cap-word {
  animation: fxCapIn 0.9s var(--ease-spring) forwards;
}
.fx-ready .hero.fx-in .cap-create { animation-delay: 0.15s; }
.fx-ready .hero.fx-in .cap-approve { animation-delay: 0.32s; }
.fx-ready .hero.fx-in .cap-perform { animation-delay: 0.49s; }
@keyframes fxCapIn { to { opacity: 1; transform: none; filter: none; } }

/* "Approve." gets a slow moving brand gradient once it has landed */
.hero .cap-approve.fx-glint {
  background: linear-gradient(100deg, var(--saffron) 0%, var(--saffron-light) 35%, #FFD08A 50%, var(--saffron-light) 65%, var(--saffron) 100%);
  background-size: 250% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: fxGlint 4.5s ease-in-out infinite;
}
@keyframes fxGlint { 0%, 100% { background-position: 100% 50%; } 50% { background-position: 0% 50%; } }

.fx-ready .hero .hero-badge,
.fx-ready .hero .hero-sub,
.fx-ready .hero .hero-body,
.fx-ready .hero .btn-row { opacity: 0; transform: translateY(18px); }
.fx-ready .hero.fx-in .hero-badge { animation: fxUp 0.7s var(--ease-spring) 0.05s forwards; }
.fx-ready .hero.fx-in .hero-sub { animation: fxUp 0.8s var(--ease-spring) 0.7s forwards; }
.fx-ready .hero.fx-in .hero-body { animation: fxUp 0.8s var(--ease-spring) 0.82s forwards; }
.fx-ready .hero.fx-in .btn-row { animation: fxUp 0.8s var(--ease-spring) 0.95s forwards; }
@keyframes fxUp { to { opacity: 1; transform: none; } }

.fx-ready .hero .post-card { opacity: 0; transform: perspective(1100px) rotateY(-14deg) translateY(30px) scale(0.96); }
.fx-ready .hero.fx-in .post-card { animation: fxCardIn 1.1s var(--ease-spring) 0.4s forwards; }
@keyframes fxCardIn { to { opacity: 1; transform: perspective(1100px) rotateX(0) rotateY(0) scale3d(1, 1, 1); } }

/* ---------- Typed demo copy ---------- */
.fx-caret::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  background: var(--saffron);
  animation: fxBlink 0.8s steps(1) infinite;
}

/* ---------- Word-by-word heading reveal ---------- */
.fx-split .fx-w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.fx-split .fx-w > span {
  display: inline-block;
  transform: translateY(110%);
  transition: transform 0.85s var(--ease-spring);
  transition-delay: calc(var(--i, 0) * 45ms + 80ms);
}
.fx-split.fx-in .fx-w > span { transform: none; }

/* ---------- Accent rule draws itself ---------- */
.rule.fx-rule { transform: scaleX(0); transform-origin: left; transition: transform 0.9s var(--ease-spring) 0.1s; }
.center .rule.fx-rule { transform-origin: center; }
.rule.fx-rule.fx-in { transform: scaleX(1); }

/* ---------- Reveal variants (adds direction to the existing fade-up) ---------- */
@media (min-width: 901px) {
  .split > div.reveal-item:first-child { transform: translateX(-36px); }
  .split > div.reveal-item:last-child { transform: translateX(36px); }
  .split > div.reveal-item.is-revealed { transform: none; }
}
.res-card.reveal-item,
.quote-card.reveal-item,
.lane.reveal-item { transform: translateY(32px) scale(0.97); }
.res-card.reveal-item.is-revealed,
.quote-card.reveal-item.is-revealed,
.lane.reveal-item.is-revealed { transform: none; }

/* ---------- Cursor spotlight on cards ---------- */
.fx-spot-host { isolation: isolate; }
.fx-spot-host.fx-rel { position: relative; }
.fx-spot {
  /* z-index -1 inside an isolated card: above the card background, below its content */
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.35s ease;
  background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 137, 26, 0.13), rgba(192, 98, 154, 0.08) 40%, transparent 70%);
}
.fx-spot::after {
  /* glowing border that follows the cursor */
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 137, 26, 0.75), rgba(192, 98, 154, 0.45) 45%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box exclude, linear-gradient(#000 0 0);
}
.fx-spot-host:hover > .fx-spot { opacity: 1; }
.section--dark .fx-spot { background: radial-gradient(380px circle at var(--mx, 50%) var(--my, 50%), rgba(232, 137, 26, 0.16), transparent 70%); }

.fx-lift { transition: transform 0.45s var(--ease-spring), box-shadow 0.45s var(--ease-spring); }
.fx-lift:hover { transform: translateY(-6px); box-shadow: var(--shadow-l); }

/* ---------- Floating particles in dark sections ---------- */
.fx-particles { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 0; }
.fx-particles i {
  position: absolute;
  bottom: -12px;
  left: var(--x);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: var(--c);
  opacity: 0;
  box-shadow: 0 0 10px var(--c);
  animation: fxRise var(--d) linear var(--delay) infinite;
}
@keyframes fxRise {
  0% { transform: translate(0, 0); opacity: 0; }
  10% { opacity: 0.8; }
  80% { opacity: 0.5; }
  100% { transform: translate(var(--drift), calc(-1 * var(--h, 600px))); opacity: 0; }
}
.section--dark > .container,
.cta-band > .container,
.doc-hero > .container { position: relative; z-index: 1; }

/* ---------- Capability marquee (home) ---------- */
.fx-marquee {
  position: relative;
  overflow: hidden;
  padding-block: 1.1rem;
  background: var(--aubergine-dark);
  border-block: 1px solid rgba(192, 98, 154, 0.25);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.fx-marquee__track {
  display: flex;
  width: max-content;
  gap: 2.5rem;
  animation: fxMarquee 38s linear infinite;
}
.fx-marquee:hover .fx-marquee__track { animation-play-state: paused; }
.fx-marquee__item {
  display: inline-flex;
  align-items: center;
  gap: 2.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 0.95rem + 0.8vw, 1.6rem);
  font-weight: 600;
  white-space: nowrap;
  color: #EBDFF0;
}
.fx-marquee__item:nth-child(3n + 2) { color: var(--saffron-light); }
.fx-marquee__item::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--ribbon);
  transform: rotate(45deg);
}
@keyframes fxMarquee { to { transform: translateX(-50%); } }

/* ---------- Count-up numbers ---------- */
.fx-count { font-variant-numeric: tabular-nums; }

/* ---------- Buttons: magnetic + click ripple ---------- */
.btn.fx-magnetic { transition: transform 0.35s var(--ease-spring), background-color var(--trans-fast), border-color var(--trans-fast), box-shadow var(--trans-fast), color var(--trans-fast); }
.fx-ripple {
  position: absolute;
  z-index: 0;
  width: 12px;
  height: 12px;
  margin: -6px 0 0 -6px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  pointer-events: none;
  animation: fxRipple 0.7s ease-out forwards;
}
@keyframes fxRipple { to { transform: scale(28); opacity: 0; } }
.btn > span, .btn > svg { position: relative; z-index: 3; }

/* ---------- Nav: animated underline ---------- */
@media (min-width: 1201px) {
  .site-nav .nav-link { position: relative; }
  .site-nav .nav-link::after {
    content: "";
    position: absolute;
    left: 14%;
    right: 14%;
    bottom: 4px;
    height: 2px;
    border-radius: 2px;
    background: var(--ribbon);
    transform: scaleX(0);
    transition: transform 0.35s var(--ease-spring);
  }
  .site-nav .nav-link:hover::after,
  .site-nav .nav-link[aria-current="page"]::after { transform: scaleX(1); }
}

/* Fallback for browsers without native page transitions */
@supports not (view-transition-name: none) {
  body { animation: fxPageIn 0.35s ease both; }
  html.fx-leaving body { opacity: 0; transition: opacity 0.18s ease; }
}
@keyframes fxPageIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Workflow ribbon: a pulse travels along it once lit ---------- */
.flow { position: relative; }
.flow .dot { transition: transform 0.5s var(--ease-spring), box-shadow 0.5s ease; }
.flow li.is-lit .dot { animation: fxDotPop 0.6s var(--ease-spring); }
@keyframes fxDotPop { 50% { transform: scale(1.25); box-shadow: 0 0 0 8px rgba(232, 137, 26, 0.18); } }
.flow li:hover .dot { transform: translateY(-4px) scale(1.08); }

/* ---------- CTA band: animated conic glow behind the panel ---------- */
.cta-band { isolation: isolate; }
.cta-band .fx-conic {
  position: absolute;
  z-index: 0;
  width: 900px;
  height: 900px;
  right: -300px;
  top: 50%;
  margin-top: -450px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, rgba(232, 137, 26, 0.16), rgba(192, 98, 154, 0.2), rgba(126, 52, 140, 0.12), rgba(232, 137, 26, 0.16));
  filter: blur(60px);
  animation: fxSpin 28s linear infinite;
  pointer-events: none;
}

/* ---------- Scroll progress bar gets a glow tip ---------- */
.global-scroll-progress { box-shadow: 0 0 12px rgba(232, 137, 26, 0.6); }

/* ---------- Reduced motion: switch everything off ---------- */
@media (prefers-reduced-motion: reduce) {
  ::view-transition-old(root), ::view-transition-new(root) { animation: none; }
  .fx-ready .hero .cap-word,
  .fx-ready .hero .hero-badge,
  .fx-ready .hero .hero-sub,
  .fx-ready .hero .hero-body,
  .fx-ready .hero .btn-row,
  .fx-ready .hero .post-card { opacity: 1 !important; transform: none !important; filter: none !important; animation: none !important; }
  .fx-split .fx-w > span,
  .rule.fx-rule { transform: none !important; transition: none !important; }
  .fx-particles, .cta-band .fx-conic { display: none; }
  .fx-marquee__track, .pipeline-arrow svg, .guard-fill::after, .guard-fill.fx-grow, .dispatch-pipeline::after, .live-dot, .hero .cap-approve.fx-glint { animation: none !important; }
  body { animation: none; }
}

/* =========================================================
   4. HOME — "Built for the People Who Run Social Media"
   Two card panels (who it's for → what they want) joined by
   a Social Media Studio connector.
   ========================================================= */
.people { overflow: hidden; }
.people .section-head { margin-bottom: clamp(2.5rem, 5vw, 3.5rem); }
.people .section-head .sub { font-size: var(--step-2); }
.people .section-head h2 { text-wrap: balance; }

.people-flow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: stretch;
  gap: 0;
}

.people-panel {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(1.5rem, 3vw, 2.25rem);
  border-radius: var(--radius-xl);
}
.people-panel--who {
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-m);
}
.people-panel--goal {
  background:
    radial-gradient(70% 60% at 100% 0%, rgba(192, 98, 154, 0.35), transparent 70%),
    radial-gradient(60% 50% at 0% 100%, rgba(232, 137, 26, 0.22), transparent 70%),
    var(--aubergine-deep);
  color: #EBDFF0;
  box-shadow: var(--shadow-xl);
  overflow: hidden;
}
.people-panel--goal::before {
  /* thin animated brand edge along the top */
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 3px;
  background: var(--ribbon-laser);
  background-size: 200% 100%;
  animation: fxEdge 6s linear infinite;
}
@keyframes fxEdge { to { background-position: -200% 0; } }

.people-label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.35rem;
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 600;
  color: var(--aubergine);
}
.people-panel--goal .people-label { color: #FFFFFF; }
.people-step {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 12px;
  font-family: var(--font-sans);
  font-size: 0.8rem;
  font-weight: 800;
  color: #FFFFFF;
  background: var(--ribbon);
  box-shadow: 0 6px 16px -4px rgba(126, 52, 140, 0.5);
}

.people-cards {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin: 0;
  padding: 0;
}
.people-cards > li:last-child { grid-column: 1 / -1; }

.people-card {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 74px;
  padding: 0.9rem 1rem;
  border-radius: var(--radius-m);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.3;
  transition: opacity 0.7s var(--ease-spring), transform 0.4s var(--ease-spring), box-shadow 0.4s var(--ease-spring), border-color 0.3s, background-color 0.3s;
}
.people-card__icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  flex: none;
  border-radius: 14px;
  transition: transform 0.45s var(--ease-spring);
}
.people-card:hover .people-card__icon { transform: rotate(-8deg) scale(1.1); }

.people-card--who {
  background: var(--mist);
  border: 1px solid var(--line-light);
  color: var(--aubergine);
}
.people-card--who .people-card__icon {
  background: #FFFFFF;
  color: var(--plum);
  box-shadow: 0 4px 12px -4px rgba(126, 52, 140, 0.35);
}
.people-card--who:hover {
  transform: translateY(-4px);
  border-color: var(--orchid);
  background: #FFFFFF;
  box-shadow: var(--shadow-m);
}

.people-card--goal {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #FFFFFF;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.people-card--goal .people-card__icon {
  background: linear-gradient(135deg, var(--saffron) 0%, #F59A33 100%);
  color: #1A0B00;
  box-shadow: 0 6px 18px -6px rgba(232, 137, 26, 0.7);
}
.people-card--goal:hover {
  transform: translateY(-4px);
  border-color: rgba(232, 137, 26, 0.65);
  background: rgba(255, 255, 255, 0.1);
  box-shadow: 0 14px 30px -12px rgba(232, 137, 26, 0.45);
}

.people-note {
  margin-top: auto;
  padding-top: 1.35rem;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--muted);
}
.people-panel--goal .people-note { color: #CBB8D4; }
.people-panel--goal .people-note strong { color: var(--saffron-light); }

/* Connector between the two panels (horizontal on desktop) */
.people-bridge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  width: clamp(84px, 8vw, 120px);
}
.people-bridge__line {
  flex: 1;
  height: 2px;
  min-width: 10px;
  background: repeating-linear-gradient(90deg, var(--orchid) 0 6px, transparent 6px 12px);
  background-size: 24px 2px;
  opacity: 0.7;
  animation: fxDashX 1.2s linear infinite;
}
.people-bridge__line:last-child { position: relative; }
.people-bridge__line:last-child::after {
  /* arrow head pointing at the goals panel */
  content: "";
  position: absolute;
  right: -2px;
  top: 50%;
  width: 8px;
  height: 8px;
  border-top: 2px solid var(--saffron);
  border-right: 2px solid var(--saffron);
  transform: translateY(-50%) rotate(45deg);
}
@keyframes fxDashX { to { background-position: 24px 0; } }
@keyframes fxDash { to { background-position: 0 24px; } }
.people-bridge__core {
  position: relative;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  flex: none;
  border-radius: 50%;
  background: #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
}
.people-bridge__core img { width: 40px; height: auto; }
.people-bridge__core::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(from 0deg, var(--plum), var(--orchid), var(--saffron), var(--plum)) border-box;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0);
  animation: fxSpin 6s linear infinite;
}

/* Tablet & phone: stack the panels, connector turns vertical */
@media (max-width: 960px) {
  .people-flow { grid-template-columns: 1fr; }
  .people-bridge { flex-direction: column; width: auto; height: 104px; }
  .people-bridge__line {
    width: 2px;
    height: auto;
    min-height: 10px;
    background: repeating-linear-gradient(180deg, var(--orchid) 0 6px, transparent 6px 12px);
    background-size: 2px 24px;
    animation-name: fxDash;
  }
  .people-bridge__line:last-child::after { right: auto; left: 50%; top: auto; bottom: -2px; transform: translateX(-50%) rotate(135deg); }
}
@media (max-width: 520px) {
  .people-cards { grid-template-columns: 1fr; }
  .people-cards > li:last-child { grid-column: auto; }
  .people-card { min-height: 64px; }
}
@media (prefers-reduced-motion: reduce) {
  .people-panel--goal::before, .people-bridge__line, .people-bridge__core::before { animation: none; }
}

/* Message shown when the Admin link is clicked on a server without PHP */
.admin-help { position: fixed; inset: 0; z-index: 10000; display: grid; place-items: center; padding: 1rem; background: rgba(20, 5, 29, 0.6); }
.admin-help__card { position: relative; width: min(520px, 100%); padding: 1.75rem 1.75rem 1.5rem; border-radius: 18px; background: #FFFFFF; box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.5); }
.admin-help__card h2 { font-size: var(--step-2); margin: 0 2rem 0.75rem 0; color: var(--aubergine); }
.admin-help__card p { margin: 0 0 0.75rem; font-size: 0.95rem; line-height: 1.6; color: var(--ink); }
.admin-help__card code { padding: 0.1rem 0.35rem; border-radius: 6px; background: var(--mist); color: var(--plum); font-size: 0.88em; word-break: break-all; }
.admin-help__close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--mist); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; }
.admin-help__close:hover { background: var(--line); }


/* =========================================================
   5. HOME: "What does Social Media Studio do?" teaser
   ========================================================= */
.does-teaser__panel {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.4fr);
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(60% 80% at 100% 0%, rgba(232, 137, 26, 0.10), transparent 65%),
    radial-gradient(50% 70% at 0% 100%, rgba(192, 98, 154, 0.10), transparent 65%),
    #FFFFFF;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-l);
  overflow: hidden;
}
.does-teaser__panel::before { /* thin brand edge on top */
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: var(--ribbon-laser); background-size: 200% 100%; animation: fxEdge 6s linear infinite;
}
.does-teaser__intro h2 { margin-bottom: 0.9rem; font-size: var(--step-4); line-height: 1.12; text-wrap: balance; }
.does-teaser__lead { font-size: 1.05rem; line-height: 1.65; color: var(--muted); }
.does-teaser__lead strong { color: var(--aubergine); }
.does-teaser__tag {
  margin-top: 1rem; font-family: var(--font-display); font-size: var(--step-1); font-weight: 600;
  background: var(--ribbon); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.does-teaser__btn { margin-top: 1.5rem; }

.does-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; position: relative; }
.does-card {
  position: relative; display: flex; flex-direction: column; gap: 0.6rem;
  padding: 1.35rem 1.25rem 1.4rem; border-radius: var(--radius-l);
  background: var(--mist); border: 1px solid var(--line-light);
  transition: opacity 0.7s var(--ease-spring), transform 0.45s var(--ease-spring), box-shadow 0.45s var(--ease-spring), border-color 0.3s;
}
.does-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-m); border-color: var(--orchid); }
.does-card + .does-card::before { /* arrow between cards */
  content: ""; position: absolute; left: -0.95rem; top: 2.3rem; width: 0.9rem; height: 2px;
  background: linear-gradient(90deg, var(--orchid), var(--saffron));
}
.does-card__top { display: flex; align-items: center; justify-content: space-between; }
.does-card__icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; color: #FFFFFF; box-shadow: 0 8px 18px -8px rgba(30, 8, 43, 0.5); }
.does-card--create .does-card__icon { background: linear-gradient(135deg, var(--aubergine), var(--plum)); }
.does-card--approve .does-card__icon { background: linear-gradient(135deg, var(--plum), var(--orchid)); }
.does-card--perform .does-card__icon { background: linear-gradient(135deg, var(--saffron), #F5A44A); }
.does-card__num { font-family: var(--font-display); font-size: 1.6rem; font-weight: 700; color: var(--line); line-height: 1; }
.does-card h3 { font-size: var(--step-2); margin: 0.2rem 0 0; color: var(--aubergine); }
.does-card--perform h3 { color: var(--saffron-ink); }
.does-card p { margin: 0; font-size: 0.95rem; line-height: 1.55; color: var(--muted); }


@media (max-width: 1080px) {
  .does-teaser__panel { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .does-cards { grid-template-columns: 1fr; }
  .does-card + .does-card::before { left: 2.3rem; top: -0.95rem; width: 2px; height: 0.9rem; background: linear-gradient(180deg, var(--orchid), var(--saffron)); }
  .does-teaser__btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .does-teaser__panel::before { animation: none; } }

/* =========================================================
   6. MOBILE & TABLET EXPERIENCE (desktop/laptop unchanged)
   ========================================================= */
.nav-ico, .nav-extra, .m-cta, .swipe-hint { display: none; }

@media (max-width: 1200px) {
  /* FIX: the header's blur effect trapped the fixed menu inside the
     78px header bar, so the open menu had almost no height. */
  .site-header { -webkit-backdrop-filter: none; backdrop-filter: none; background: rgba(255, 255, 255, 0.97); transition: top 0.35s var(--ease-spring), box-shadow 0.25s; }
  .site-header.is-hidden { top: calc(-1 * var(--header-h) - 4px); }
  body.nav-open .site-header { top: 0; }

  /* Menu button */
  .nav-toggle { width: 44px; height: 44px; border-radius: 12px; border-color: var(--line); flex: none; }
  .nav-toggle[aria-expanded="true"] { background: var(--aubergine); border-color: var(--aubergine); }
  .nav-toggle[aria-expanded="true"] span:not(.sr-only) { background: #FFFFFF; }

  /* Full-screen menu sheet */
  .site-nav {
    top: var(--header-h);
    display: flex;
    gap: 0;
    padding: 1.25rem var(--gutter) calc(1.5rem + env(safe-area-inset-bottom, 0px));
    background:
      radial-gradient(90% 45% at 100% 0%, rgba(192, 98, 154, 0.12), transparent 70%),
      radial-gradient(80% 40% at 0% 100%, rgba(232, 137, 26, 0.10), transparent 70%),
      #FFFFFF;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.4s var(--ease-spring), visibility 0.3s;
    box-shadow: none;
    overscroll-behavior: contain;
  }
  .site-nav.is-open { transform: none; }
  .nav-list > li { border-bottom: 0; opacity: 0; transform: translateX(22px); }
  .site-nav.is-open .nav-list > li { animation: navIn 0.5s var(--ease-spring) forwards; animation-delay: calc(var(--i, 0) * 55ms + 80ms); }
  @keyframes navIn { to { opacity: 1; transform: none; } }

  .nav-link, .sub-toggle {
    display: flex; align-items: center; gap: 0.9rem;
    margin-bottom: 0.35rem; padding: 0.8rem 0.85rem;
    border-radius: 14px; font-size: 1.08rem; font-weight: 700; color: var(--aubergine);
    transition: background-color 0.2s, transform 0.15s;
  }
  .nav-link::after { /* arrow on the right */
    content: ""; margin-left: auto; width: 8px; height: 8px;
    border-top: 2px solid var(--muted-light, #9B88A6); border-right: 2px solid var(--muted-light, #9B88A6);
    transform: rotate(45deg); transition: transform 0.2s;
  }
  .nav-link:active, .sub-toggle:active { transform: scale(0.98); background: var(--mist); }
  .nav-ico {
    display: grid; place-items: center; flex: none; width: 40px; height: 40px; border-radius: 12px;
    background: var(--mist); color: var(--plum); border: 1px solid var(--line-light);
  }
  .nav-ico svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
  .nav-link[aria-current="page"], .has-sub.is-current > .sub-toggle {
    border-left: 0; padding-left: 0.85rem;
    background: linear-gradient(90deg, rgba(232, 137, 26, 0.12), rgba(192, 98, 154, 0.06));
    box-shadow: inset 4px 0 0 var(--saffron);
  }
  .nav-link[aria-current="page"] .nav-ico, .has-sub.is-current > .sub-toggle .nav-ico { background: var(--ribbon); color: #FFFFFF; border-color: transparent; }

  /* Resources accordion */
  .sub-toggle > svg { margin-left: auto; width: 14px; height: 14px; transition: transform 0.3s var(--ease-spring); }
  .has-sub.is-open > .sub-toggle > svg { transform: rotate(180deg); }
  .sub-toggle .nav-ico svg { width: 20px !important; height: 20px !important; margin: 0; transform: none !important; }
  .sub-menu, .has-sub.is-open > .sub-menu {
    display: block; max-height: 0; overflow: hidden; margin: 0 0 0 3.6rem; padding: 0;
    background: transparent; border-left: 2px solid var(--line); border-radius: 0;
    transition: max-height 0.4s var(--ease-spring), margin 0.3s;
  }
  .has-sub.is-open > .sub-menu { max-height: 420px; margin-bottom: 0.6rem; }
  .sub-menu a { display: block; padding: 0.6rem 0.9rem; font-size: 0.95rem; font-weight: 600; color: var(--muted); border-radius: 10px; }
  .sub-menu a:active, .sub-menu a[aria-current="page"] { color: var(--plum); background: var(--mist); }
  .sub-menu .sub-all { color: var(--saffron-ink); }

  /* Bottom of the menu */
  .nav-cta { margin-top: 1.25rem; min-height: 52px; font-size: 1.02rem; }
  .site-nav.is-open .nav-cta { animation: navUp 0.5s var(--ease-spring) 0.4s both; }
  .nav-extra { display: grid; gap: 0.35rem; margin-top: auto; padding-top: 1.5rem; text-align: center; }
  .site-nav.is-open .nav-extra { animation: navUp 0.5s var(--ease-spring) 0.5s both; }
  @keyframes navUp { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
  .nav-extra a { font-weight: 700; color: var(--plum); text-decoration: none; }
  .nav-extra .nav-extra__tag { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; background: var(--ribbon); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
  .nav-extra small { color: var(--muted); font-size: 0.78rem; }
  body.nav-open .sms-notif-panel, body.nav-open .sms-toast, body.nav-open .m-cta { display: none !important; }
}

@media (max-width: 760px) {
  :root { --section: clamp(3.25rem, 9vw, 4.25rem); }
  html { -webkit-tap-highlight-color: transparent; }

  /* ---------- Hero ---------- */
  .hero { padding-block: 2rem 3.25rem; }
  .hero .btn-row { flex-direction: column; align-items: stretch; gap: 0.75rem; }
  .hero .btn-row .btn { width: 100%; min-height: 52px; }
  .hero-grid { gap: 3rem; }
  .post-stage { margin-inline: auto; width: 100%; margin-top: 0.75rem; margin-bottom: 1.5rem; }
  .floating-badge-approval, .perf-chip { position: absolute; width: auto; margin: 0; z-index: 3; }
  .floating-badge-approval { top: -18px; left: 10px; bottom: auto; transform: scale(0.86); transform-origin: left top; }
  .perf-chip { bottom: -26px; right: 8px; top: auto; left: auto; transform: scale(0.82); transform-origin: right bottom; }

  /* Trust strip: 2 x 2 grid of small cards */
  .trust-strip { grid-template-columns: 1fr 1fr; gap: 0.75rem; }
  .trust-item { flex-direction: column; align-items: flex-start; gap: 0.6rem; padding: 0.95rem; border-radius: var(--radius-m); background: var(--mist); border: 1px solid var(--line-light); }

  /* ---------- Swipe rows (8-step workflow, Create/Approve/Perform) ---------- */
  .flow, .does-cards {
    display: flex !important; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scrollbar-width: none;
    gap: 0.75rem; margin-inline: calc(-1 * var(--gutter)); padding: 0.25rem var(--gutter) 0.75rem;
    scroll-padding-inline: var(--gutter);
  }
  .flow::-webkit-scrollbar, .does-cards::-webkit-scrollbar { display: none; }
  .flow li { flex: 0 0 40%; scroll-snap-align: start; min-height: 132px; }
  .does-cards > li { flex: 0 0 82%; scroll-snap-align: start; }
  .does-teaser .does-cards { margin-inline: 0; padding-inline: 0; scroll-padding-inline: 0; }
  .does-card + .does-card::before { display: none; }
  .swipe-hint {
    display: flex; align-items: center; justify-content: center; gap: 0.5rem; margin-top: 0.5rem;
    font-size: 0.8rem; font-weight: 700; color: var(--muted);
  }
  .section--dark .swipe-hint { color: #CBB8D4; }
  .swipe-hint i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: 0.35; transition: opacity 0.2s, width 0.25s; }
  .swipe-hint i.is-on { opacity: 1; width: 18px; border-radius: 3px; background: var(--saffron); }
  .swipe-hint span { animation: swipeNudge 1.8s ease-in-out infinite; }
  @keyframes swipeNudge { 50% { transform: translateX(5px); } }

  /* ---------- Audience / goal cards: 2 per row ---------- */
  .people-cards { grid-template-columns: 1fr 1fr; gap: 0.6rem; }
  .people-cards > li:last-child { grid-column: 1 / -1; }
  .people-card { flex-direction: column; align-items: flex-start; gap: 0.6rem; min-height: 0; padding: 0.85rem; font-size: 0.88rem; }
  .people-card__icon { width: 38px; height: 38px; border-radius: 11px; }
  .people-cards > li:last-child.people-card { flex-direction: row; align-items: center; }

  /* ---------- Touch feedback ---------- */
  .btn:active, .does-card:active, .people-card:active, .res-card:active, .quote-card:active, .lane:active, .trust-item:active, .flow li:active { transform: scale(0.97); }

  /* ---------- Footer: tap-to-open sections ---------- */
  .footer-col.is-collapsible h2 {
    display: flex; align-items: center; justify-content: space-between; margin: 0; padding: 1rem 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); cursor: pointer;
  }
  .footer-col.is-collapsible h2[style] { margin-top: 0 !important; }
  .footer-col.is-collapsible h2::after { content: "+"; font-size: 1.4rem; font-weight: 400; color: var(--saffron-light); transition: transform 0.3s var(--ease-spring); }
  .footer-col.is-collapsible h2.is-open::after { transform: rotate(45deg); }
  .footer-col.is-collapsible ul { max-height: 0; overflow: hidden; margin: 0; transition: max-height 0.4s var(--ease-spring), padding 0.3s; }
  .footer-col.is-collapsible h2.is-open + ul { max-height: 600px; padding: 0.5rem 0 1rem; }

  /* ---------- Sticky "Enquire Now" bar ---------- */
  .m-cta {
    position: fixed; left: 0.75rem; right: 0.75rem; bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)); z-index: 900;
    display: flex; align-items: center; gap: 0.75rem; padding: 0.6rem 0.6rem 0.6rem 1rem;
    border-radius: 18px; background: rgba(30, 8, 43, 0.94); color: #FFFFFF;
    box-shadow: 0 18px 40px -12px rgba(30, 8, 43, 0.55);
    transform: translateY(140%); opacity: 0; transition: transform 0.45s var(--ease-spring), opacity 0.3s;
  }
  .m-cta.is-on { transform: none; opacity: 1; }
  .m-cta__text { display: grid; line-height: 1.2; font-size: 0.78rem; color: #CBB8D4; }
  .m-cta__text strong { color: #FFFFFF; font-size: 0.95rem; }
  .m-cta .btn { margin-left: auto; min-height: 44px; padding-inline: 1.1rem; font-size: 0.92rem; }
  body.has-mcta .to-top { bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px)); }
}

@media (max-width: 400px) {
  .flow li { flex-basis: 46%; }
  .trust-item { padding: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) {
  .nav-list > li, .site-nav.is-open .nav-list > li { opacity: 1; transform: none; animation: none !important; }
  .swipe-hint span { animation: none; }
  .m-cta { transition: opacity 0.2s; }
}

/* Small phones: logo, bell and menu button always fit on one line */
@media (max-width: 480px) {
  .site-header .nav-wrap { gap: 0.6rem; }
  .site-header .brand { min-width: 0; flex: 1 1 auto; gap: 0.5rem; }
  .site-header .brand img { flex: none; }
  .site-header .brand-text { min-width: 0; }
  .site-header .brand-tag { display: none; }
  .site-header .brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .site-header .nav-toggle, .sms-bell-wrap { flex: none; }
}
@media (max-width: 400px) {
  .site-header .brand img { width: 46px; height: auto; }
  .site-header .brand-name { font-size: 0.98rem; }
}
@media (max-width: 330px) {
  .site-header .brand img { width: 40px; }
  .site-header .brand-name { font-size: 0.9rem; }
}
@media (max-width: 340px) {
  .site-nav .nav-link, .site-nav .sub-toggle { font-size: 0.98rem; gap: 0.7rem; padding-inline: 0.6rem; }
  .site-nav .nav-ico { width: 36px; height: 36px; }
}
