/* Use-case landing pages (/ecommerce-app-builder/, /figma-to-flutter/,
   /booking-app-builder/) — the `usecase` fgs family.

   One sheet for the three pages, so they read as one set. Everything is
   built from the spatial tokens (platters, pills, radii, easing) and the
   Nightfall palette; the hero wears the shared page head
   (`_fluttergo-pagehead.css`), and the copy sits in `fgs-container`
   sections like /product and /integrations/mcp. Markup vocabulary:
   `fgs-uc-*` only, see src/marketing/static-pages/usecase/. */

.fgs-uc-kicker {
  display: inline-block;
  margin: 0 0 0.75rem;
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nf-sky, #50C6FD);
}

.fgs-uc-hero .fgs-h1 em {
  font-style: italic;
  color: var(--nf-sky, #50C6FD);
}

.fgs-uc-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.7rem;
  margin: 1.5rem auto 0;
}

.fgs-uc-note {
  margin: 0.95rem auto 0;
  max-width: 48ch;
  font-size: 0.88rem;
  line-height: 1.5;
  color: var(--nf-dim, #77839b);
}

/* ---- Sections ---------------------------------------------------------- */

.fgs-uc-section {
  position: relative;
  padding: clamp(36px, 5vw, 72px) 0;
}
.fgs-uc-section--line {
  border-top: 1px solid var(--nf-line, rgba(148, 170, 220, 0.13));
}

.fgs-uc-head {
  max-width: 62ch;
  margin: 0 0 clamp(22px, 3vw, 34px);
}

.fgs-uc-h2 {
  margin: 0 0 0.6rem;
  font-family: var(--nf-display, Fraunces, Georgia, serif);
  font-size: clamp(1.7rem, 2.8vw, 2.3rem);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.02em;
  color: var(--nf-star, #e9eef9);
  text-wrap: balance;
}

.fgs-uc-lead {
  margin: 0;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--nf-muted, #94a0b6);
  text-wrap: pretty;
}

/* Running copy inside a section (paragraphs, lists, inline code). */
.fgs-uc-prose {
  max-width: 68ch;
}
.fgs-uc-prose p,
.fgs-uc-prose li {
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--nf-muted, #94a0b6);
}
.fgs-uc-prose p { margin: 0 0 1rem; }
.fgs-uc-prose ul,
.fgs-uc-prose ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.fgs-uc-prose li { margin: 0.35rem 0; }
.fgs-uc-prose strong { color: var(--nf-star, #e9eef9); font-weight: 600; }
.fgs-uc-prose a { color: var(--nf-sky, #50C6FD); text-decoration: none; font-weight: 500; }
.fgs-uc-prose a:hover { text-decoration: underline; text-underline-offset: 3px; }
.fgs-uc-prose code,
.fgs-uc-card code,
.fgs-uc-faq code {
  padding: 1px 6px;
  border-radius: 6px;
  border: 1px solid var(--nf-line, rgba(148, 170, 220, 0.13));
  background: var(--nf-panel, #0a101b);
  font-family: var(--nf-mono, ui-monospace, Menlo, monospace);
  font-size: 0.86em;
  color: var(--nf-star, #e9eef9);
}
.fgs-uc-prose > :last-child { margin-bottom: 0; }

/* Links inside running text are underlined, not told apart by colour alone
   (axe link-in-text-block); buttons, pills and the CTA link keep their look. */
.fgs-uc :is(p, li, td) a:not(.fgs-btn):not(.fgs-uc-pill):not(.fgs-uc-cta__alt) {
  color: var(--nf-sky, #50C6FD);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: color-mix(in srgb, var(--nf-sky, #50C6FD) 45%, transparent);
}
.fgs-uc :is(p, li, td) a:not(.fgs-btn):not(.fgs-uc-pill):not(.fgs-uc-cta__alt):hover {
  text-decoration-color: var(--nf-sky, #50C6FD);
}

/* ---- Demo: real screens of the app, in a row -------------------------- */

.fgs-uc-shots {
  display: flex;
  gap: 18px;
  margin: 0;
  padding: 4px 0 8px;
  overflow-x: auto;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
}
.fgs-uc-shots::-webkit-scrollbar { display: none; }
.fgs-uc-shots:focus-visible { outline: 2px solid var(--nf-sky, #50C6FD); outline-offset: 4px; border-radius: 26px; }

.fgs-uc-shot {
  flex: none;
  width: 224px;
  margin: 0;
  scroll-snap-align: start;
}
.fgs-uc-shot img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 26px;
  border: 1px solid var(--glass-edge-color, rgba(148, 170, 220, 0.16));
  background: var(--nf-panel, #0a101b);
  box-shadow: var(--glass-shadow-platter, 0 18px 40px -26px rgba(0, 0, 0, 0.9));
  transition: transform var(--dur-enter, 200ms) var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
.fgs-uc-shot:hover img { transform: translateY(-6px); }
.fgs-uc-shot figcaption {
  margin: 10px 4px 0;
  font-size: 13px;
  line-height: 1.4;
  color: var(--nf-dim, #77839b);
}
.fgs-uc-shot figcaption b {
  font-weight: 600;
  color: var(--nf-muted, #94a0b6);
}

/* A wide capture of the workspace (code, deploy, the ship rail). */
.fgs-uc-window {
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius-card, 18px);
  border: 1px solid var(--glass-edge-color, rgba(148, 170, 220, 0.16));
  background: var(--nf-panel, #0a101b);
  box-shadow: var(--glass-shadow-platter, 0 18px 40px -26px rgba(0, 0, 0, 0.9));
}
.fgs-uc-window img { display: block; width: 100%; height: auto; }
.fgs-uc-window figcaption {
  padding: 10px 14px;
  border-top: 1px solid var(--nf-line, rgba(148, 170, 220, 0.13));
  font-size: 13px;
  color: var(--nf-dim, #77839b);
}

.fgs-uc-sample {
  margin: 14px 0 0;
  font-size: 13px;
  line-height: 1.5;
  color: var(--nf-dim, #77839b);
}
.fgs-uc-sample + .fgs-uc-prose { margin-top: 22px; }

/* A slot that is waiting for its real capture: a dashed platter with the
   same footprint as a phone screen, so the layout does not change when the
   capture lands. */
.fgs-uc-shot--pending {
  display: grid;
  place-items: center;
  aspect-ratio: 540 / 1169;
  padding: 18px;
  text-align: center;
  border-radius: 26px;
  border: 1px dashed var(--glass-edge-color-hover, rgba(148, 170, 220, 0.3));
  background: var(--glass-fill-platter, rgba(10, 16, 27, 0.5));
  font-size: 13px;
  line-height: 1.5;
  color: var(--nf-dim, #77839b);
}

/* ---- Cards (a platter per feature) ------------------------------------ */

/* Three across by default. Four cards sit two by two and five sit three
   over two (a six-track grid), so no row ends with a lone card. */
.fgs-uc-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.fgs-uc-grid:has(> :nth-child(4):last-child) {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.fgs-uc-grid:has(> :nth-child(5):last-child) {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.fgs-uc-grid:has(> :nth-child(5):last-child) > * { grid-column: span 2; }
.fgs-uc-grid:has(> :nth-child(5):last-child) > :nth-child(n + 4) { grid-column: span 3; }

.fgs-uc-card {
  position: relative;
  padding: 22px 22px 20px;
  border-radius: var(--radius-card, 18px);
  border: 1px solid var(--glass-edge-color, rgba(148, 170, 220, 0.16));
  background: var(--glass-platter, rgba(10, 16, 27, 0.5));
  box-shadow: var(--glass-shadow-platter, 0 18px 40px -26px rgba(0, 0, 0, 0.9));
}
.fgs-uc-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  margin-bottom: 14px;
  border-radius: var(--radius-pill, 999px);
  background: var(--pill-rest, rgba(233, 238, 249, 0.07));
  color: var(--nf-sky, #50C6FD);
}
.fgs-uc-card__icon svg { width: 20px; height: 20px; }
.fgs-uc-card h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--nf-star, #e9eef9);
}
.fgs-uc-card p {
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
  color: var(--nf-muted, #94a0b6);
}
.fgs-uc-card p + p { margin-top: 10px; }
.fgs-uc-card .fgs-uc-tag {
  display: inline-block;
  margin-top: 12px;
  padding: 3px 10px;
  border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--glass-edge-color, rgba(148, 170, 220, 0.16));
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--nf-muted, #94a0b6);
}
.fgs-uc-tag--ok { color: var(--nf-ok, #34d399); }

/* ---- Steps (how to build it) ------------------------------------------- */

.fgs-uc-steps {
  display: grid;
  gap: 18px;
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  counter-reset: uc-step;
}
.fgs-uc-step {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 16px;
  align-items: start;
  max-width: 72ch;
}
.fgs-uc-step::before {
  counter-increment: uc-step;
  content: counter(uc-step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-pill, 999px);
  background: var(--pill-rest, rgba(233, 238, 249, 0.07));
  border: 1px solid var(--glass-edge-color, rgba(148, 170, 220, 0.16));
  font-family: var(--nf-display, Fraunces, Georgia, serif);
  font-size: 17px;
  color: var(--nf-sky, #50C6FD);
}
.fgs-uc-step h3 {
  margin: 6px 0 6px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.3;
  color: var(--nf-star, #e9eef9);
}
.fgs-uc-step p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: var(--nf-muted, #94a0b6);
}

/* The reusable prompt: a quote of what you would type into FlutterGo. */
.fgs-uc-prompt {
  max-width: 72ch;
  margin: 0;
  padding: 16px 18px 18px;
  border-radius: var(--radius-card, 18px);
  border: 1px solid var(--glass-edge-color, rgba(148, 170, 220, 0.16));
  background: var(--nf-panel, #0a101b);
}
.fgs-uc-prompt figcaption {
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nf-sky, #50C6FD);
}
/* The prompt is prose you would type, not code: undo the site-wide
   `html.nf-page pre` look (mono face, inset box, forced dark fill). */
html.nf-page .fgs-uc-prompt pre {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent !important;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--nf-body, Inter, sans-serif);
  font-size: 15px;
  line-height: 1.65;
  color: var(--nf-star, #e9eef9);
}

/* ---- Two columns: copy beside a capture -------------------------------- */

.fgs-uc-split {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  gap: clamp(24px, 4vw, 56px);
  align-items: center;
}
.fgs-uc-split .fgs-uc-head { margin-bottom: 18px; }

.fgs-uc-facts {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
}
.fgs-uc-facts li {
  position: relative;
  padding-left: 28px;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--nf-muted, #94a0b6);
}
.fgs-uc-facts li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.45em;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--nf-sky, #50C6FD);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}
.fgs-uc-facts strong { color: var(--nf-star, #e9eef9); font-weight: 600; }

/* ---- Checklist (what to test before launch) --------------------------- */

.fgs-uc-check {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 10px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fgs-uc-check li {
  position: relative;
  padding: 12px 14px 12px 42px;
  border-radius: 14px;
  border: 1px solid var(--nf-line, rgba(148, 170, 220, 0.13));
  background: var(--glass-fill-platter, rgba(10, 16, 27, 0.5));
  font-size: 15px;
  line-height: 1.55;
  color: var(--nf-muted, #94a0b6);
}
.fgs-uc-check li::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 14px;
  width: 16px;
  height: 16px;
  border-radius: 5px;
  border: 1.5px solid var(--nf-sky, #50C6FD);
  opacity: 0.8;
}
.fgs-uc-check strong { color: var(--nf-star, #e9eef9); font-weight: 600; }

/* ---- Table (what becomes what) ----------------------------------------- */

.fgs-uc-table {
  margin: 0;
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--glass-edge-color, rgba(148, 170, 220, 0.16));
  background: var(--glass-fill-platter, rgba(10, 16, 27, 0.5));
}
.fgs-uc-table:focus-visible { outline: 2px solid var(--nf-sky, #50C6FD); outline-offset: 2px; }
.fgs-uc-table table {
  width: 100%;
  min-width: 520px;
  margin: 0;
  border-collapse: collapse;
  font-size: 14.5px;
}
.fgs-uc-table th,
.fgs-uc-table td {
  padding: 13px 15px;
  text-align: left;
  vertical-align: top;
  line-height: 1.5;
  border-bottom: 1px solid var(--nf-line, rgba(148, 170, 220, 0.13));
  color: var(--nf-muted, #94a0b6);
}
.fgs-uc-table tbody tr:last-child th,
.fgs-uc-table tbody tr:last-child td { border-bottom: 0; }
.fgs-uc-table thead th {
  font-size: 13px;
  font-weight: 600;
  color: var(--nf-dim, #77839b);
}
.fgs-uc-table tbody th {
  width: 34%;
  font-weight: 600;
  color: var(--nf-star, #e9eef9);
}

/* ---- Questions ---------------------------------------------------------- */

.fgs-uc-faq {
  max-width: 72ch;
}
.fgs-uc-faq__item {
  padding: 18px 0;
  border-top: 1px solid var(--nf-line, rgba(148, 170, 220, 0.13));
}
.fgs-uc-faq__item:last-child {
  border-bottom: 1px solid var(--nf-line, rgba(148, 170, 220, 0.13));
}
.fgs-uc-faq h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--nf-star, #e9eef9);
}
.fgs-uc-faq p {
  margin: 0;
  font-size: 15.5px;
  line-height: 1.7;
  color: var(--nf-muted, #94a0b6);
}
.fgs-uc-faq a { color: var(--nf-sky, #50C6FD); text-decoration: none; }
.fgs-uc-faq a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Related reading: glass pills ------------------------------------- */

.fgs-uc-related {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.fgs-uc-pill {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--radius-pill, 999px);
  border: 1px solid var(--glass-edge-color, rgba(148, 170, 220, 0.16));
  background: var(--pill-rest, rgba(233, 238, 249, 0.07));
  font-size: 14px;
  font-weight: 500;
  color: var(--nf-star, #e9eef9);
  text-decoration: none;
  transition: background-color var(--dur-quick, 120ms) var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1)),
    border-color var(--dur-quick, 120ms) var(--ease-out, cubic-bezier(0.23, 1, 0.32, 1));
}
.fgs-uc-pill:hover {
  background: var(--pill-hover, rgba(148, 170, 220, 0.12));
  border-color: var(--glass-edge-color-hover, rgba(148, 170, 220, 0.3));
}
.fgs-uc-pill:focus-visible { outline: 2px solid var(--nf-sky, #50C6FD); outline-offset: 2px; }

/* ---- Closing action ----------------------------------------------------- */

.fgs-uc-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 26px 26px;
  border-radius: var(--radius-card, 18px);
  border: 1px solid rgba(80, 198, 253, 0.28);
  background: rgba(80, 198, 253, 0.06);
}
.fgs-uc-cta__copy { flex: 1 1 320px; margin: 0; }
.fgs-uc-cta__copy strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--nf-display, Fraunces, Georgia, serif);
  font-size: 1.35rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--nf-star, #e9eef9);
}
.fgs-uc-cta__copy span {
  font-size: 15px;
  line-height: 1.55;
  color: var(--nf-muted, #94a0b6);
}
.fgs-uc-cta__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
}
.fgs-uc-cta__alt {
  font-size: 15px;
  font-weight: 600;
  color: var(--nf-sky, #50C6FD);
  text-decoration: none;
}
.fgs-uc-cta__alt:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Phones ------------------------------------------------------------- */

/* Desktop: the demo screens share the row (up to 260px each) instead of
   scrolling, so three or five captures both fill it. */
@media (min-width: 861px) {
  .fgs-uc-shots { overflow: visible; }
  .fgs-uc-shot { flex: 1 1 0; min-width: 0; max-width: 260px; width: auto; }
}

@media (max-width: 960px) {
  .fgs-uc-grid,
  .fgs-uc-grid:has(> :nth-child(5):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fgs-uc-grid:has(> :nth-child(5):last-child) > *,
  .fgs-uc-grid:has(> :nth-child(5):last-child) > :nth-child(n + 4) { grid-column: auto; }
}

@media (max-width: 860px) {
  .fgs-uc-split { grid-template-columns: 1fr; }
  .fgs-uc-split .fgs-uc-window { order: -1; }
}

@media (max-width: 640px) {
  .fgs-uc-grid,
  .fgs-uc-grid:has(> :nth-child(4):last-child),
  .fgs-uc-grid:has(> :nth-child(5):last-child) { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .fgs-uc-section { padding: 32px 0; }
  /* Bleed to the screen edges, but snap the first screen to the gutter. */
  .fgs-uc-shots { gap: 12px; margin-inline: calc(var(--page-gutter, 22px) * -1); padding-inline: var(--page-gutter, 22px); scroll-padding-inline: var(--page-gutter, 22px); }
  .fgs-uc-shot { width: 168px; }
  .fgs-uc-shot img { border-radius: 20px; }
  .fgs-uc-shot--pending { border-radius: 20px; }
  .fgs-uc-step { grid-template-columns: 34px 1fr; gap: 12px; }
  .fgs-uc-step::before { width: 32px; height: 32px; font-size: 15px; }
  .fgs-uc-cta { padding: 20px 18px; }
  .fgs-uc-actions .fgs-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .fgs-uc-shot img,
  .fgs-uc-pill { transition: none; }
  .fgs-uc-shot:hover img { transform: none; }
}
