@import url('https://fonts.cdnfonts.com/css/futura-std-4');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #EEEEEE;
  --text: #111111;
  --muted: #BFBFBF;
  --violet: #8578BD;
  --red: #EA4D3D;
  --font: 'Futura', 'Futura Std', 'Century Gothic', 'Avenir', sans-serif;
  --font-body: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

html { font-size: 16px; scroll-behavior: smooth; scroll-snap-type: y proximity; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.7;
  text-align: left;
  min-height: 100vh;
  overflow-x: hidden;
  position: relative;
}

h1, h2, h3, h4, h5, h6,
.site-logo, .nav-links a, .btn,
.gradient-card .card-title,
.workflow-card .wf-title,
.workflow-card .wf-category { font-family: var(--font); }

.film-grain {
  /* z-index 0: grain blends over the body background + auras only, beneath
     page content — so content images (and text) are never grained.
     Gradient/workflow cards keep their own ::after noise. */
  position: fixed; inset: 0; pointer-events: none; z-index: 0;
  opacity: 0.45; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.2' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}

.aura { position: fixed; border-radius: 50%; pointer-events: none; z-index: -1; }
.aura-violet { width: 700px; height: 700px; top: -100px; right: -50px; background: radial-gradient(circle, rgba(133, 120, 189, 0.25) 0%, rgba(133, 120, 189, 0) 65%); filter: blur(80px); }
.aura-red { width: 550px; height: 550px; top: 250px; right: 0px; background: radial-gradient(circle, rgba(234, 60, 50, 0.18) 0%, rgba(234, 60, 50, 0) 65%); filter: blur(90px); }
.aura-violet-2 { width: 500px; height: 500px; top: 500px; left: -120px; background: radial-gradient(circle, rgba(133, 120, 189, 0.2) 0%, rgba(133, 120, 189, 0) 65%); filter: blur(80px); }
.aura-red-2 { width: 450px; height: 450px; bottom: 50px; left: 20%; background: radial-gradient(circle, rgba(234, 60, 50, 0.14) 0%, rgba(234, 60, 50, 0) 65%); filter: blur(90px); }
.aura-violet-3 { width: 600px; height: 600px; top: 60%; right: 15%; background: radial-gradient(circle, rgba(133, 120, 189, 0.18) 0%, rgba(133, 120, 189, 0) 65%); filter: blur(85px); }

body.workflows-page .aura-violet { background: radial-gradient(circle, rgba(133, 120, 189, 0.45) 0%, rgba(133, 120, 189, 0) 65%); }
body.workflows-page .aura-red { background: radial-gradient(circle, rgba(234, 77, 61, 0.38) 0%, rgba(234, 77, 61, 0) 65%); }
body.workflows-page .aura-violet-2 { background: radial-gradient(circle, rgba(133, 120, 189, 0.4) 0%, rgba(133, 120, 189, 0) 65%); }
body.workflows-page .aura-red-2 { background: radial-gradient(circle, rgba(234, 77, 61, 0.32) 0%, rgba(234, 77, 61, 0) 65%); }
body.workflows-page .aura-violet-3 { background: radial-gradient(circle, rgba(133, 120, 189, 0.36) 0%, rgba(133, 120, 189, 0) 65%); }

h1, h2, h3, h4, nav a, .nav-link { font-weight: 500; letter-spacing: -0.01em; }
h1 { font-size: 2.5rem; line-height: 1.2; }
h2 { font-size: 1.75rem; line-height: 1.3; }
h3 { font-size: 1.25rem; line-height: 1.4; }
p, li, label, input, textarea, select { font-weight: 400; }
a { color: var(--violet); text-decoration: none; transition: color 0.2s ease; }
a:hover { color: var(--red); }

.page-wrapper { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; padding: 48px 64px; }

.site-nav { display: flex; align-items: baseline; gap: 40px; margin-bottom: 64px; }
.site-logo { font-size: 1.75rem; font-weight: 500; color: var(--text); letter-spacing: 0.02em; }
.site-logo span { color: var(--violet); }
.nav-links { display: flex; gap: 32px; list-style: none; }
.nav-links a { font-size: 0.85rem; font-weight: 500; color: #555; text-transform: lowercase; letter-spacing: 0.05em; transition: color 0.2s ease; }
.nav-links a:hover, .nav-links a.active { color: var(--text); }

.site-footer { margin-top: auto; padding-top: 64px; display: flex; justify-content: space-between; align-items: baseline; font-size: 0.75rem; font-weight: 400; color: #555; }
.footer-plus { letter-spacing: 0.3em; color: var(--muted); font-size: 0.7rem; }

.page-header { margin-bottom: 56px; }
.page-header h1 { margin-bottom: 8px; }
.page-header .tagline { font-size: 0.95rem; font-weight: 400; color: #555; }

.gradient-card {
  position: relative; border-radius: 24px; overflow: hidden;
  aspect-ratio: 9 / 14; display: flex; flex-direction: column;
  justify-content: flex-end; padding: 28px 24px; cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease; text-decoration: none;
}
.gradient-card:hover { transform: translateY(-6px); box-shadow: 0 12px 40px rgba(133, 120, 189, 0.2); color: inherit; }
.gradient-card .card-bg { position: absolute; inset: 0; z-index: 0; opacity: 0.6; }
.gradient-card .card-content { position: relative; z-index: 1; }
.gradient-card .card-plus { position: absolute; top: 18px; left: 20px; z-index: 2; color: rgba(255,255,255,0.85); font-family: var(--font); font-size: 0.7rem; font-weight: 500; letter-spacing: 0.02em; }
.gradient-card .card-title { font-size: 0.9rem; font-weight: 500; color: #fff; margin-bottom: 4px; }
.gradient-card .card-desc { font-size: 0.68rem; font-weight: 400; color: rgba(255,255,255,0.75); line-height: 1.5; }

.gradient-card.card-workflows .card-bg {
  background:
    radial-gradient(ellipse 140% 70% at 30% 25%, rgba(196, 181, 253, 0.95) 0%, transparent 55%),
    radial-gradient(ellipse 120% 80% at 70% 80%, rgba(234, 60, 50, 0.55) 0%, transparent 55%),
    linear-gradient(160deg, #b8a8f0 0%, #d5c8f5 25%, #e8a8a0 65%, #cc6a6a 100%);
}
.gradient-card.card-requests .card-bg {
  background:
    radial-gradient(circle at 65% 20%, rgba(196, 181, 253, 0.9) 0%, transparent 50%),
    radial-gradient(ellipse 90% 60% at 35% 75%, rgba(234, 60, 50, 0.6) 0%, transparent 60%),
    linear-gradient(195deg, #c4b5fd 0%, #e0d0f5 35%, #e09090 70%, #c85a5a 100%);
}
.gradient-card.card-faqs .card-bg {
  background:
    radial-gradient(ellipse 80% 100% at 50% 15%, rgba(196, 181, 253, 0.88) 0%, transparent 55%),
    radial-gradient(circle at 50% 85%, rgba(234, 60, 50, 0.5) 0%, transparent 55%),
    linear-gradient(180deg, #bfb0f5 0%, #e5d9f8 40%, #e5a0a0 75%, #d06868 100%);
}
.gradient-card .card-bg::after {
  content: ''; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='1.4' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 140px 140px; opacity: 0.55; mix-blend-mode: multiply;
}

.btn { display: inline-block; padding: 12px 32px; font-family: var(--font); font-weight: 500; font-size: 0.85rem; letter-spacing: 0.04em; border-radius: 8px; cursor: pointer; transition: all 0.2s ease; text-decoration: none; }
.btn-violet { background: var(--violet); color: #fff; border: none; }
.btn-violet:hover { background: #7568a8; color: #fff; }
.btn-red { background: var(--red); color: #fff; border: none; }
.btn-red:hover { background: #d84535; color: #fff; }

.form-group { margin-bottom: 28px; }
.form-group label { display: block; font-size: 0.85rem; font-weight: 500; color: var(--text); margin-bottom: 8px; letter-spacing: 0.03em; }
.form-group input, .form-group textarea, .form-group select {
  width: 100%; max-width: 520px; padding: 12px 16px; font-family: var(--font);
  font-size: 0.9rem; font-weight: 400; color: var(--text);
  background: rgba(255,255,255,0.5); border: 1px solid rgba(191,191,191,0.4);
  border-radius: 8px; outline: none; transition: border-color 0.2s ease;
}
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--violet); }
.form-group textarea { min-height: 120px; resize: vertical; }

.faq-item { padding: 20px 0; border-bottom: 1px solid rgba(191,191,191,0.3); }
.faq-question { display: flex; justify-content: space-between; align-items: center; cursor: pointer; gap: 16px; }
.faq-question h3 { font-size: 1.05rem; font-weight: 500; color: #555; }
.faq-toggle { font-size: 1.2rem; color: var(--red); transition: transform 0.3s ease; flex-shrink: 0; user-select: none; }
.faq-toggle.open { transform: rotate(45deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.35s ease, padding 0.35s ease; }
.faq-answer.open { max-height: 1200px; padding-top: 16px; }
.faq-answer p { font-size: 0.9rem; color: #555; line-height: 1.8; margin-bottom: 12px; }

/* Auto-fill so the grid fills as many cards per row as comfortably fit
   (~4 on a wide desktop, fewer as it narrows, 1 on mobile). auto-fill —
   not auto-fit — keeps empty tracks, so filtered states leave the visible
   cards left-aligned at their natural width instead of stretching them. */
.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 20px; width: 100%; min-width: 0; max-width: 1240px; margin: 32px auto 0;
  align-items: start;
}
.workflow-card {
  position: relative; display: flex; flex-direction: column; border-radius: 14px;
  overflow: hidden; transition: transform 0.25s ease, box-shadow 0.25s ease;
  isolation: isolate;
  background: rgba(255,255,255,0.55);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.workflow-card:hover { transform: translateY(-4px); box-shadow: 0 8px 32px rgba(133, 120, 189, 0.15); }
.workflow-card::before {
  content: ''; position: absolute; inset: 0; z-index: -2; opacity: 0.18;
  background:
    radial-gradient(ellipse 120% 80% at 30% 20%, rgba(133, 120, 189, 0.7) 0%, transparent 60%),
    radial-gradient(ellipse 110% 70% at 70% 80%, rgba(234, 77, 61, 0.5) 0%, transparent 60%);
}
.workflow-card::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  opacity: 0.5; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 128px 128px;
}
.workflow-card:nth-child(3n+2)::before {
  background:
    radial-gradient(circle at 70% 25%, rgba(133, 120, 189, 0.65) 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 30% 80%, rgba(234, 77, 61, 0.45) 0%, transparent 60%);
}
.workflow-card:nth-child(3n)::before {
  background:
    radial-gradient(ellipse 80% 100% at 50% 15%, rgba(133, 120, 189, 0.6) 0%, transparent 55%),
    radial-gradient(circle at 50% 85%, rgba(234, 77, 61, 0.4) 0%, transparent 55%);
}
.wf-card-link { display: block; flex: 1; padding: 26px 24px; color: inherit; text-decoration: none; }
.wf-card-link:hover { color: inherit; }
.workflow-card .wf-category { font-size: 0.68rem; font-weight: 500; color: var(--violet); text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 14px; }
.workflow-card .wf-title { font-size: 1.02rem; font-weight: 500; color: #222; margin-bottom: 10px; line-height: 1.3; }
.workflow-card .wf-desc {
  font-size: 0.74rem; font-weight: 400; color: #555; line-height: 1.65;
  text-wrap: pretty;
  max-height: 0; overflow: hidden; margin-bottom: 0;
  transition: max-height 0.35s ease, margin-bottom 0.35s ease;
}
.workflow-card .wf-desc.is-open { max-height: 600px; margin-bottom: 4px; }
.workflow-card .wf-meta { display: block; font-size: 0.66rem; color: #555; font-weight: 400; letter-spacing: 0.02em; }

.wf-toggle {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 14px 24px; min-height: 44px;
  border: 0; border-top: 1px solid rgba(191, 191, 191, 0.4);
  background: transparent; cursor: pointer;
  font-family: var(--font-body); font-size: 0.72rem; font-weight: 400;
  color: var(--red); letter-spacing: 0.04em; text-transform: lowercase;
  transition: background 0.2s ease;
}
.wf-toggle:hover { background: rgba(234, 60, 50, 0.06); }
.wf-toggle:focus-visible { outline: 2px solid var(--violet); outline-offset: -2px; }
.wf-plus {
  display: inline-block;
  font-size: 1rem;
  line-height: 1;
  transition: transform 0.3s ease;
}
.wf-toggle[aria-expanded="true"] .wf-plus { transform: rotate(45deg); }

.back-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.78rem; font-weight: 500; color: var(--violet); letter-spacing: 0.04em; margin: 0 auto 24px; max-width: 820px; width: 100%; text-transform: lowercase; }
.back-link:hover { color: var(--red); }

.workflow-detail-page {
  position: relative; max-width: 820px; margin: 0 auto;
  padding: 64px 72px 72px; border-radius: 22px;
  background: rgba(255,255,255,0.97);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  box-shadow: 0 30px 80px -40px rgba(133, 120, 189, 0.35); isolation: isolate;
}
.workflow-detail-page::before {
  content: ''; position: absolute; inset: -40%; z-index: -1;
  background:
    radial-gradient(circle at 15% 20%, rgba(133, 120, 189, 0.55), transparent 45%),
    radial-gradient(circle at 85% 75%, rgba(234, 77, 61, 0.45), transparent 50%),
    radial-gradient(circle at 60% 10%, rgba(133, 120, 189, 0.35), transparent 55%);
  filter: blur(60px); opacity: 0.9; pointer-events: none;
}
.workflow-detail-page .wf-category { font-size: 0.72rem; font-weight: 500; color: #555; text-transform: uppercase; letter-spacing: 0.08em; margin-bottom: 12px; }
.workflow-detail-page h1 { margin-bottom: 12px; }
.workflow-detail-page .wf-lead { font-size: 1rem; color: #555; margin-bottom: 48px; max-width: 560px; }
.workflow-detail-page h2 { font-size: 1.1rem; font-weight: 500; margin-top: 40px; margin-bottom: 16px; color: var(--violet); }
.workflow-detail-page ol, .workflow-detail-page ul { padding-left: 20px; margin-bottom: 16px; }
.workflow-detail-page li { font-size: 0.92rem; line-height: 1.8; margin-bottom: 6px; color: #555; }
.download-link { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 500; color: var(--red); margin-top: 8px; }
.download-link:hover { color: var(--violet); }

.page-section { display: none; }
.page-section.active { display: block; }

@media (max-width: 768px) {
  .page-wrapper { padding: 32px 24px; }
  .site-nav { flex-direction: column; gap: 16px; margin-bottom: 48px; }
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }
}

/* ---------- "How it works" section (shared across workflow detail pages) ---------- */
.how-it-works .howit-leadin { font-size: 0.95rem; color: #555; margin-bottom: 24px; }
.howit-screenshot { margin: 0 0 28px; }
.howit-screenshot__trigger {
  display: block; width: 100%; padding: 0; margin: 0;
  border: 1px solid rgba(191, 191, 191, 0.4); border-radius: 8px;
  background: transparent; cursor: zoom-in; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  font-family: inherit;
}
.howit-screenshot__trigger:hover { box-shadow: 0 10px 32px rgba(133, 120, 189, 0.18); transform: translateY(-2px); }
.howit-screenshot__trigger:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.howit-screenshot__trigger img { display: block; width: 100%; height: auto; }
.how-it-works__caption { margin-top: 10px; font-size: 0.8rem; font-style: italic; color: #555; }
.howit-errors li strong { font-weight: 600; color: #555; }

/* ---------- Homepage layout (index.html) ---------- */
.home-wrapper { padding-left: 120px; padding-right: 120px; padding-top: 0; padding-bottom: 0; }
.home-card-row { display: flex; justify-content: center; align-items: flex-start; gap: 48px; }
.home-card { width: 180px; }
.home-our-goal { max-width: 280px; padding-top: 16px; text-align: left; }
.home-tagline { font-size: 0.82rem; font-weight: 400; color: #555; margin-top: 4px; letter-spacing: 0.03em; }

/* Homepage hero section — fills the first screen on load */
.home-hero {
  position: relative;
  min-height: 100dvh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 56px;
  scroll-snap-align: start;
}
.home-hero header { text-align: center; }
.home-scroll-cue {
  position: absolute; left: 50%; bottom: 32px;
  display: flex; align-items: center; justify-content: center;
  color: #999; transition: color 0.2s ease;
  animation: scroll-cue-bob 2.4s ease-in-out infinite;
}
.home-scroll-cue:hover { color: var(--violet); }
@keyframes scroll-cue-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50% { transform: translate(-50%, 6px); }
}
@media (prefers-reduced-motion: reduce) {
  .home-scroll-cue { animation: none; transform: translateX(-50%); }
}

/* Homepage second section — cards + Our Goal, a full-height snap screen */
.home-section {
  min-height: 100dvh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 64px 0;
  scroll-snap-align: start;
}

/* Homepage brand-film hero — self-hosted video + custom Lucid controls */
.home-video { width: 100%; max-width: 900px; margin: 0 auto; }
.home-video__frame {
  position: relative; width: 100%; aspect-ratio: 16 / 9;
  border-radius: 14px; overflow: hidden;
  background: #1a1a1a;
  box-shadow: 0 24px 60px -30px rgba(133, 120, 189, 0.45);
}
.home-video__el {
  position: absolute; inset: 0; width: 100%; height: 100%;
  display: block; object-fit: contain;
}
.home-video__frame:fullscreen { aspect-ratio: auto; border-radius: 0; }

/* Custom control bar — always visible over a subtle scrim */
.home-video__controls {
  position: absolute; left: 0; right: 0; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 12px;
  padding: 28px 14px 12px;
  background: linear-gradient(to top, rgba(20, 18, 30, 0.8), rgba(20, 18, 30, 0));
}
.home-video__btn {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; padding: 0;
  background: transparent; border: 0; cursor: pointer;
  color: #fff; transition: color 0.2s ease;
}
.home-video__btn:hover { color: var(--violet); }
.home-video__btn:focus-visible { outline: 2px solid #fff; outline-offset: 2px; border-radius: 4px; }
.home-video__ic { display: block; width: 20px; height: 20px; }
.home-video__ic--pause, .home-video__ic--muted { display: none; }
.home-video__btn.is-playing .home-video__ic--play { display: none; }
.home-video__btn.is-playing .home-video__ic--pause { display: block; }
.home-video__btn.is-muted .home-video__ic--unmuted { display: none; }
.home-video__btn.is-muted .home-video__ic--muted { display: block; }

/* Draggable scrub bar */
.home-video__scrub {
  flex: 1; min-width: 0; height: 4px; margin: 0;
  -webkit-appearance: none; appearance: none;
  border-radius: 999px; cursor: pointer;
  background: linear-gradient(to right,
    var(--violet) 0%, var(--violet) var(--p, 0%),
    rgba(255, 255, 255, 0.28) var(--p, 0%), rgba(255, 255, 255, 0.28) 100%);
}
.home-video__scrub::-webkit-slider-runnable-track { height: 4px; background: transparent; }
.home-video__scrub::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; margin-top: -4.5px;
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 0; cursor: pointer;
}
.home-video__scrub::-moz-range-track { height: 4px; background: transparent; }
.home-video__scrub::-moz-range-thumb {
  width: 13px; height: 13px; border-radius: 50%;
  background: #fff; border: 0; cursor: pointer;
}
.home-video__scrub:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.home-video__caption {
  margin-top: 10px; text-align: center;
  font-size: 0.78rem; color: #555; letter-spacing: 0.03em;
}

@media (max-width: 600px) {
  .home-wrapper { padding-left: 24px; padding-right: 24px; }
  .home-card-row { flex-direction: column; align-items: stretch; gap: 32px; }
  .home-card { width: 100%; aspect-ratio: auto; height: 110px; }
  .home-our-goal { order: -1; max-width: 100%; padding-top: 0; }
  .home-tagline { font-size: 0.72rem; }
  .home-hero { gap: 36px; }
  .home-section { padding: 48px 0; }
}

/* Side-by-side image compare (used on NBP Whisperer) — stays flex row at all widths */
.how-it-works__compare { display: flex; gap: 20px; margin: 0 0 28px; align-items: flex-start; }
.how-it-works__compare .howit-screenshot { flex: 1 1 0; min-width: 0; margin: 0; }

/* Mobile: tighten .workflow-detail-page card padding so it doesn't eat the viewport */
@media (max-width: 600px) {
  .workflow-detail-page { padding: 40px 24px; }
}

/* ---------- Open workflow-landing shell (body.workflows-open) ---------- */
/* A third page shell, alongside the narrow card and the gallery card.
   Used only by the two multi-step workflow landing pages so the 3-up
   step grid gets a wider, card-free canvas on the page background. */
body.workflows-open .workflow-detail-page {
  max-width: 1150px; padding: 0;
  background: transparent; border-radius: 0;
  box-shadow: none; backdrop-filter: none; -webkit-backdrop-filter: none;
  isolation: auto;
}
body.workflows-open .workflow-detail-page::before { display: none; }
body.workflows-open .back-link { max-width: 1150px; }
body.workflows-open .wf-lead,
body.workflows-open .wf-note,
body.workflows-open .workflow-detail-page ul { max-width: 720px; }

/* BEFORE / AFTER label above the descriptive caption (compare block) */
.howit-label {
  display: block;
  font-family: var(--font);
  font-weight: 500;
  font-size: 0.85rem;
  font-style: normal;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.howit-caption-text {
  /* inherits italic + 0.8rem + #555 from .how-it-works__caption on the figcaption */
}

/* ---------- Muse Models gallery (workflow-muse-models.html) ---------- */
.muse-gallery { margin-top: 32px; }
.muse-brand-section { margin-bottom: 32px; }
.muse-brand-section:last-child { margin-bottom: 0; }
.muse-brand-header {
  display: flex; align-items: center; justify-content: space-between;
  width: 100%; padding: 16px 0; min-height: 44px;
  border: 0; border-bottom: 1px solid rgba(191, 191, 191, 0.4);
  background: transparent; cursor: pointer;
  font-family: inherit; color: inherit;
  text-align: left;
  transition: background 0.2s ease;
}
.muse-brand-header:hover { background: rgba(133, 120, 189, 0.04); }
.muse-brand-header:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.muse-brand-header h2 { margin: 0; }
.muse-brand-plus {
  display: inline-block;
  font-family: var(--font); font-weight: 500;
  font-size: 1.4rem; line-height: 1;
  color: var(--red);
  margin-left: 16px;
  transition: transform 0.3s ease;
}
.muse-brand-header[aria-expanded="true"] .muse-brand-plus { transform: rotate(45deg); }
.muse-brand-body {
  max-height: 5000px;
  overflow: hidden;
  padding-top: 24px;
  transition: max-height 0.35s ease, padding-top 0.35s ease;
}
.muse-brand-body.is-collapsed { max-height: 0; padding-top: 0; }
.muse-brand-leadin { font-size: 0.9rem; color: #555; margin-bottom: 24px; }
.muse-models-list { display: flex; flex-direction: column; gap: 32px; }
.muse-model-card { /* container only; no chrome by default */ }
.muse-model-name { font-size: 1rem; font-weight: 500; color: #222; margin-bottom: 12px; letter-spacing: 0.01em; }
.muse-thumbs { display: flex; flex-wrap: wrap; gap: 10px; }
.muse-thumb {
  display: block;
  width: 124px;
  aspect-ratio: 4 / 5;
  padding: 0;
  margin: 0;
  border: 1px solid rgba(191, 191, 191, 0.4);
  border-radius: 6px;
  background: transparent;
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  font-family: inherit;
}
.muse-thumb:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(133, 120, 189, 0.18); }
.muse-thumb:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.muse-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 600px) {
  .muse-thumb { width: calc((100% - 20px) / 3); } /* 3 per row at phone width with 10px gap */
  .muse-thumbs { gap: 10px; }
}

/* ---------- Homepage Gallery card (index.html) ---------- */
/* Gradient copied verbatim from .card-workflows so the 4th card matches
   the saturation/depth of the original three. */
.gradient-card.card-gallery .card-bg {
  background:
    radial-gradient(ellipse 140% 70% at 30% 25%, rgba(196, 181, 253, 0.95) 0%, transparent 55%),
    radial-gradient(ellipse 120% 80% at 70% 80%, rgba(234, 60, 50, 0.55) 0%, transparent 55%),
    linear-gradient(160deg, #b8a8f0 0%, #d5c8f5 25%, #e8a8a0 65%, #cc6a6a 100%);
}

/* ---------- Image Gallery (gallery.html) ---------- */
/* Wider container for the gallery only — gives the masonry grid more
   room. Overrides .workflow-detail-page / .back-link 820px without
   affecting workflow detail, request, or faqs pages. */
.gallery-detail-page { max-width: 1180px; }
.gallery-back-link { max-width: 1180px; }

/* Aspect-ratio groups — three stacked CSS grids (Square / Wide / Ultra-wide).
   Grouping like-with-like de-clutters the wall; images keep their true
   aspect ratio (uncropped), so row heights vary slightly within a group. */
.gallery-groups { margin-top: 8px; }
.gallery-group { display: grid; gap: 16px; margin-bottom: 28px; }
.gallery-group:last-child { margin-bottom: 0; }
.gallery-group--square { grid-template-columns: repeat(4, 1fr); }
.gallery-group--wide { grid-template-columns: repeat(2, 1fr); }
.gallery-group--ultra { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 820px) {
  .gallery-group--square { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 600px) {
  .gallery-group--square { grid-template-columns: repeat(2, 1fr); }
  .gallery-group--wide { grid-template-columns: 1fr; }
  .gallery-group--ultra { grid-template-columns: 1fr; }
}

/* Filter bar — shared restrained dropdown (gallery brand filter,
   workflows New/Legacy filter). Sits between a page's intro and its grid. */
.filter-bar { display: flex; align-items: center; gap: 10px; margin: 28px 0 4px; }
.filter-bar__label {
  font-family: var(--font); font-size: 0.7rem; font-weight: 500;
  text-transform: uppercase; letter-spacing: 0.1em; color: var(--violet);
}
.filter-bar__select {
  font-family: var(--font); font-size: 0.82rem; font-weight: 500;
  color: var(--text);
  padding: 8px 34px 8px 14px;
  border: 1px solid rgba(191, 191, 191, 0.55);
  border-radius: 8px;
  background-color: rgba(255, 255, 255, 0.6);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5L6 6.5L11 1.5' fill='none' stroke='%238578BD' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 13px center;
  background-size: 11px;
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  cursor: pointer;
  transition: border-color 0.2s ease;
}
.filter-bar__select:hover { border-color: var(--violet); }
.filter-bar__select:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }

.gallery-card {
  display: block; width: 100%; padding: 0; margin: 0;
  border: 1px solid rgba(191, 191, 191, 0.4); border-radius: 8px;
  background: transparent; cursor: zoom-in; overflow: hidden;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
  font-family: inherit;
}
.gallery-card:hover { box-shadow: 0 10px 32px rgba(133, 120, 189, 0.18); transform: translateY(-2px); }
.gallery-card:focus-visible { outline: 2px solid var(--violet); outline-offset: 3px; }
.gallery-card img { display: block; width: 100%; height: auto; }

/* Detail overlay — centered panel over a dark backdrop */
.gallery-overlay {
  position: fixed; inset: 0; z-index: 10000;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 48px 24px;
  background: rgba(17, 17, 17, 0.82);
  opacity: 0; visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
  overflow-y: auto;
}
.gallery-overlay--open { opacity: 1; visibility: visible; }
.gallery-overlay__panel {
  position: relative;
  width: 100%; max-width: 880px;
  background: #fff; border-radius: 12px; padding: 28px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.5);
}
.gallery-overlay__close {
  position: fixed; top: 18px; right: 22px;
  width: 40px; height: 40px; padding: 0;
  border: 0; border-radius: 50%;
  background: rgba(255, 255, 255, 0.12); color: #fff;
  font-family: var(--font); font-size: 1.6rem; line-height: 1;
  cursor: pointer; transition: background 0.2s ease;
}
.gallery-overlay__close:hover { background: rgba(255, 255, 255, 0.25); }
.gallery-overlay__close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.gallery-detail__main { display: block; width: 100%; height: auto; border-radius: 8px; }
.gallery-detail__refs { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.gallery-detail__refs img {
  display: block; height: 96px; width: auto;
  border: 1px solid rgba(191, 191, 191, 0.4); border-radius: 6px;
}
.gallery-detail__prompt-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin: 24px 0 10px;
}
.gallery-detail__prompt-head h3 {
  font-family: var(--font); font-size: 0.72rem; font-weight: 500;
  color: var(--violet); text-transform: uppercase; letter-spacing: 0.08em;
}
.gallery-copy {
  flex-shrink: 0;
  border: 1px solid rgba(133, 120, 189, 0.5); border-radius: 6px;
  background: transparent; cursor: pointer;
  font-family: var(--font-body); font-size: 0.7rem; font-weight: 500;
  color: var(--violet); letter-spacing: 0.04em;
  padding: 6px 14px; min-height: 32px;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.gallery-copy:hover { background: rgba(133, 120, 189, 0.1); }
.gallery-copy:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.gallery-copy.is-copied { background: var(--violet); color: #fff; border-color: var(--violet); }
.gallery-prompt {
  background: rgba(133, 120, 189, 0.06);
  border-left: 2px solid rgba(133, 120, 189, 0.45);
  border-radius: 0 6px 6px 0;
  padding: 14px 16px;
}
.gallery-prompt p { font-size: 0.82rem; line-height: 1.7; color: #555; margin-bottom: 12px; }
.gallery-prompt p:last-child { margin-bottom: 0; }
.gallery-detail__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.gallery-tag {
  font-family: var(--font); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(133, 120, 189, 0.1); color: var(--violet);
}
.gallery-tag--model { background: rgba(234, 60, 50, 0.1); color: var(--red); }

@media (max-width: 600px) {
  .gallery-overlay { padding: 24px 12px; }
  .gallery-overlay__panel { padding: 20px; }
  .gallery-overlay__close { top: 8px; right: 10px; }
}

/* ---------- DERMDOC Tone of Voice prompt blocks (workflow-dermdoc-tone-of-voice.html) ---------- */
.tov-block { margin-top: 32px; }
.tov-block__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; margin-bottom: 4px;
}
.tov-block__head h3 {
  font-family: var(--font); font-size: 1rem; font-weight: 500; color: #222;
}
.tov-block__desc { font-size: 0.85rem; font-style: italic; color: #555; margin-bottom: 12px; }
.tov-prompt {
  /* white-space: pre-wrap keeps the prompt's literal line breaks while
     still wrapping long lines; the text copies out with formatting intact. */
  white-space: pre-wrap;
  font-family: var(--font-body); font-size: 0.82rem; line-height: 1.7;
  color: #555;
  background: rgba(133, 120, 189, 0.06);
  border-left: 2px solid rgba(133, 120, 189, 0.45);
  border-radius: 0 6px 6px 0;
  padding: 16px 18px; margin: 0;
  overflow-x: auto;
}
.tov-footnote { margin-top: 40px; font-size: 0.85rem; color: #555; }

/* ---------- Accordion (shared — assets/accordion.js) ---------- */
/* Unused after workflow pages converted to step grids — safe to remove.
   accordion.js itself is still used by the Step 06 model grid. */
.accordion { margin-top: 8px; }
.accordion__header {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; width: 100%; padding: 16px 0; min-height: 44px;
  border: 0; border-bottom: 1px solid rgba(191, 191, 191, 0.4);
  background: transparent; cursor: pointer;
  font-family: inherit; color: inherit; text-align: left;
  transition: background 0.2s ease;
}
.accordion__header:hover { background: rgba(133, 120, 189, 0.04); }
.accordion__header:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.accordion__label { flex: 1; min-width: 0; }
.accordion__step { font-family: var(--font); font-weight: 500; font-size: 0.95rem; color: #222; }
.accordion__summary { font-size: 0.85rem; color: #555; }
.accordion__plus {
  flex-shrink: 0; font-family: var(--font); font-weight: 500;
  font-size: 1.4rem; line-height: 1; color: var(--red);
  transition: transform 0.3s ease;
}
.accordion__header[aria-expanded="true"] .accordion__plus { transform: rotate(45deg); }
.accordion__body {
  max-height: 6000px; overflow: hidden; padding-top: 18px;
  transition: max-height 0.4s ease, padding-top 0.4s ease;
}
.accordion__body.is-collapsed { max-height: 0; padding-top: 0; }
.accordion__note { font-size: 0.9rem; line-height: 1.7; color: #555; margin: 0 0 14px; }
.accordion__body .gallery-copy { margin-top: 14px; }
.accordion__note--trailing { margin: 16px 0 0; }

/* Card-style accordion (.accordion--card) — unused after workflow pages
   converted to step grids; safe to remove. accordion.js itself is still
   used by the Step 06 model grid. */
.accordion--card > .accordion__header {
  padding: 16px 20px;
  margin-top: 12px;
  border: 1px solid rgba(191, 191, 191, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
}
.accordion--card > .accordion__header:hover { background: rgba(255, 255, 255, 0.85); }
.accordion--card > .accordion__header[aria-expanded="true"] {
  border-bottom-color: transparent;
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
}
.accordion--card > .accordion__body:not(.is-collapsed) {
  padding: 6px 20px 20px;
  border: 1px solid rgba(191, 191, 191, 0.5);
  border-top: 0;
  border-radius: 0 0 12px 12px;
  background: rgba(255, 255, 255, 0.55);
}

/* Prompt block — preformatted; line breaks preserved on screen and on copy */
.prompt-pre {
  white-space: pre-wrap;
  font-family: var(--font-body); font-size: 0.82rem; line-height: 1.7;
  color: #555;
  background: rgba(133, 120, 189, 0.06);
  border-left: 2px solid rgba(133, 120, 189, 0.45);
  border-radius: 0 6px 6px 0;
  padding: 16px 18px; margin: 0;
  overflow-x: auto;
}

/* Short labelled note line (workflow detail pages) */
.wf-note { font-size: 0.92rem; line-height: 1.7; color: #555; margin: 0 0 10px; }

/* UGC Workflow — Step 06 model-look grid (workflow-ugc-video-creator.html).
   The trigger reuses .accordion__header so the shared accordion.js drives
   the click-to-reveal; these rules just restyle it as a grid card. */
.ugc-models { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 12px; }
.ugc-model { flex: 0 0 calc((100% - 48px) / 5); min-width: 0; }
.ugc-model__trigger {
  display: block; padding: 0; min-height: 0; border-bottom: 0;
}
.ugc-model__trigger:hover { background: transparent; }
.ugc-model__trigger img {
  display: block; width: 100%; height: auto;
  border-radius: 8px; border: 1px solid rgba(191, 191, 191, 0.4);
}
.ugc-model__bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; margin-top: 6px;
}
.ugc-model__label { font-family: var(--font); font-size: 0.78rem; font-weight: 500; color: #222; }
.ugc-model__bar .accordion__plus { font-size: 1.1rem; }
/* Descriptions live in their own block (.ugc-model-descs) so an expanded
   one spans the full content width. Styled like the .prompt-pre block;
   long descriptions cap height and scroll internally. */
.ugc-model-descs { margin-top: 4px; }
.ugc-model__desc { padding-top: 0; }
.ugc-model__desc:not(.is-collapsed) {
  max-height: 280px; overflow-y: auto;
  margin-top: 12px; padding: 14px 16px;
  background: rgba(133, 120, 189, 0.06);
  border-left: 2px solid rgba(133, 120, 189, 0.45);
  border-radius: 0 6px 6px 0;
}
.ugc-model__desc p { font-size: 0.85rem; line-height: 1.7; color: #555; margin: 0; }

@media (max-width: 600px) {
  .ugc-model { flex-basis: calc((100% - 12px) / 2); }
}

/* ---------- Workflow step grid + step detail pages ---------- */
/* .step-grid replaces the accordion on the multi-step workflow pages;
   each card links to that step's own detail page. */
.step-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 16px; margin-top: 48px;
}
.step-card {
  display: flex; flex-direction: column;
  padding: 20px;
  border: 1px solid rgba(191, 191, 191, 0.5);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.55);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.step-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px rgba(133, 120, 189, 0.15);
  border-color: var(--violet);
}
.step-card:focus-visible { outline: 2px solid var(--violet); outline-offset: 2px; }
.step-card__num {
  font-family: var(--font); font-size: 0.66rem; font-weight: 500;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--violet);
}
.step-card__name {
  font-family: var(--font); font-size: 1rem; font-weight: 500;
  color: #222; margin-top: 6px;
}
.step-card__summary {
  font-size: 0.82rem; line-height: 1.6; color: #555; margin-top: 8px;
}

/* Step detail page body */
.step-text { font-size: 0.95rem; line-height: 1.75; color: #555; margin: 0 0 14px; }
.copy-block > .gallery-copy { margin-top: 14px; }
.step-nav {
  display: flex; gap: 16px; align-items: baseline;
  margin-top: 40px; padding-top: 22px;
  border-top: 1px solid rgba(191, 191, 191, 0.4);
}
.step-nav__link {
  font-family: var(--font); font-size: 0.8rem; font-weight: 500;
  color: var(--violet); text-decoration: none;
}
.step-nav__link:hover { color: var(--red); }
.step-nav__prev { margin-right: auto; }
.step-nav__next { margin-left: auto; }

@media (max-width: 820px) {
  .step-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
  .step-grid { grid-template-columns: 1fr; }
}
