/* ==========================================================================
   FishBytes LLC — Floating Pill Buttons + Uniform-Height Rotating Story Stage
   Zero Layout Shift: All 4 slides share a single CSS Grid stack & 390px visual card.
   ========================================================================== */

:root {
  --bg-page: #f8fafc;
  --bg-card: #ffffff;
  --bg-subtle: #f1f5f9;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;

  --text-main: #0f172a;
  --text-body: #334155;
  --text-muted: #64748b;

  --indigo: #4f46e5;
  --indigo-soft: #eef2ff;
  --indigo-border: #c7d2fe;

  --cyan: #0284c7;
  --cyan-soft: #e0f2fe;
  --cyan-border: #bae6fd;

  --teal: #0f766e;
  --teal-soft: #ccfbf1;
  --teal-border: #99f6e4;

  --pink: #be185d;
  --pink-soft: #fce7f3;
  --pink-border: #fbcfe8;

  --active-accent: var(--indigo);

  --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, sans-serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 22px;

  --shadow-sm: 0 2px 8px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 12px 30px -6px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 22px 48px -12px rgba(15, 23, 42, 0.13);

  --rotation-duration: 6.5s;
}

/* Dynamic Active App Accent & Gentle Background Shift */
html[data-active-app="primefocus"] { --active-accent: var(--indigo); }
html[data-active-app="retasq"] { --active-accent: var(--cyan); }
html[data-active-app="camcontroller"] { --active-accent: var(--teal); }
html[data-active-app="canvastitch"] { --active-accent: var(--pink); }

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

[hidden] {
  display: none !important;
}

body {
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.55;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  transition: background 0.45s ease;
}

html[data-active-app="primefocus"] body {
  background: radial-gradient(ellipse at top, #eef2ff 0%, #f8fafc 68%);
}
html[data-active-app="retasq"] body {
  background: radial-gradient(ellipse at top, #e0f2fe 0%, #f8fafc 68%);
}
html[data-active-app="camcontroller"] body {
  background: radial-gradient(ellipse at top, #ccfbf1 0%, #f8fafc 68%);
}
html[data-active-app="canvastitch"] body {
  background: radial-gradient(ellipse at top, #fce7f3 0%, #f8fafc 68%);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font-family: inherit;
}

.container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
}

/* ==========================================================================
   Site Header
   ========================================================================== */
.site-header {
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 74px;
  padding: 8px 0;
  gap: 16px;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo {
  height: 54px;
  width: auto;
  flex-shrink: 0;
  filter: drop-shadow(0 1px 2px rgba(15, 57, 96, 0.08));
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand-name {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 800;
  color: #0f3960;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 0.74rem;
  color: var(--text-muted);
  font-weight: 500;
}

.wd-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--indigo-soft);
  border: 1px solid var(--indigo-border);
  color: #312e81;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.8rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.wd-pill:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}

.wd-pill img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

/* ==========================================================================
   Main Stage Section & Header Row
   ========================================================================== */
.stage-main {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 24px 0 32px;
}

.hero-top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.hero-titles h1 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 2.5vw, 2.15rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.18;
  margin-bottom: 4px;
}

.hero-titles p {
  font-size: 0.95rem;
  color: var(--text-body);
}

/* ==========================================================================
   Top 4 Floating Pill Product Selector Buttons
   ========================================================================== */
.stage-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 16px;
}

.stage-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 15px 16px 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
  overflow: hidden;
}

.stage-tab:hover {
  background: #ffffff;
  border-color: #94a3b8;
}

.stage-tab.active {
  background: #ffffff;
  border-color: var(--active-accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}

.tab-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  object-fit: contain;
  flex-shrink: 0;
}

.icon-white-bg {
  background: #fff;
  border: 1px solid var(--border);
  padding: 3px;
}

.tab-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1;
}

.tab-name-row {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.tab-name-row strong {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main);
}

.tab-domain {
  font-size: 0.7rem;
  color: var(--text-muted);
  font-weight: 600;
}

.tab-badge-beta {
  font-size: 0.66rem;
  font-weight: 800;
  background: var(--pink-soft);
  color: var(--pink);
  padding: 1px 7px;
  border-radius: 999px;
  text-transform: uppercase;
}

.tab-sub {
  font-size: 0.78rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Progress Bar along the bottom of each Floating Pill Tab */
.tab-progress {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: transparent;
}

.stage-tab.active .tab-progress {
  background: var(--bg-subtle);
}

.tab-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--active-accent);
}

.story-stage-wrapper.is-rotating .stage-tab.active .tab-progress-bar {
  animation: tab-timer var(--rotation-duration) linear forwards;
}

.story-stage-wrapper.is-locked .stage-tab.active .tab-progress-bar {
  width: 100%;
  transition: width 0.2s ease;
}

@keyframes tab-timer {
  from { width: 0%; }
  to   { width: 100%; }
}

/* ==========================================================================
   UNIFORM-HEIGHT STAGE BODY (CSS Grid Stack = Zero Resizing Ever!)
   ========================================================================== */
.stage-body {
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-lg);
  padding: 32px 36px;
  /* CSS Grid Stack: All 4 slides occupy cell (1, 1) so height is 100% constant! */
  display: grid;
  grid-template-columns: 1fr;
}

.stage-slide {
  grid-area: 1 / 1 / 2 / 2;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.28s ease, visibility 0.28s ease;
  display: flex;
  align-items: stretch;
}

.stage-slide.active {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  z-index: 2;
}

.slide-grid {
  display: grid;
  grid-template-columns: 1fr 1.08fr;
  gap: 36px;
  align-items: stretch;
  width: 100%;
}

/* Left Copy Column — Flex Column with Pinned Bottom CTAs for Uniform Height */
.slide-copy {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 390px;
}

.slide-eyebrow-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.slide-badge {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  padding: 4px 11px;
  border-radius: 999px;
}

.badge-indigo { background: var(--indigo-soft); color: var(--indigo); }
.badge-cyan   { background: var(--cyan-soft);   color: var(--cyan); }
.badge-teal   { background: var(--teal-soft);   color: var(--teal); }
.badge-pink   { background: var(--pink-soft);   color: var(--pink); }

.slide-evolution-note {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-muted);
}

.slide-copy h2 {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 2.5vw, 2.15rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.slide-lead {
  font-size: 0.95rem;
  color: var(--text-body);
  margin-bottom: 16px;
}

.slide-lead code {
  font-size: 0.84rem;
  background: var(--bg-subtle);
  padding: 2px 5px;
  border-radius: 4px;
}

.slide-highlights {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
}

.slide-highlights li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-body);
}

.hl-icon {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}

.hl-indigo { background: var(--indigo-soft); }
.hl-cyan   { background: var(--cyan-soft); }
.hl-teal   { background: var(--teal-soft); }
.hl-pink   { background: var(--pink-soft); }

.slide-ctas {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 12px;
  margin-top: auto;
  padding-top: 8px;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.18s ease;
  white-space: nowrap;
}

.btn-lg {
  padding: 11px 18px;
  font-size: 0.9rem;
}

.btn-block {
  width: 100%;
}

.btn-indigo {
  background: linear-gradient(135deg, #4f46e5, #4338ca);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(79, 70, 229, 0.5);
}

.btn-cyan {
  background: linear-gradient(135deg, #0284c7, #0369a1);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(2, 132, 199, 0.5);
}

.btn-teal {
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(15, 118, 110, 0.5);
}

.btn-pink {
  background: linear-gradient(135deg, #db2777, #be185d);
  color: #fff;
  box-shadow: 0 8px 20px -6px rgba(190, 24, 93, 0.5);
}

.btn-indigo:hover,
.btn-cyan:hover,
.btn-teal:hover,
.btn-pink:hover {
  transform: translateY(-2px);
  filter: brightness(1.06);
}

.btn-secondary {
  background: var(--bg-card);
  border-color: var(--border-strong);
  color: var(--text-main);
}

.btn-secondary:hover {
  background: var(--bg-subtle);
}

/* ==========================================================================
   Right-Side Visual Preview Card — Locked Uniform 390px Height Across All 4 Slides!
   ========================================================================== */
.slide-visual {
  display: flex;
  flex-direction: column;
}

.preview-card {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  height: 390px;
  display: flex;
  flex-direction: column;
}

.preview-card-pink {
  border-color: var(--pink-border);
}

.preview-card-bar {
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  height: 42px;
  padding: 0 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-shrink: 0;
}

.win-title-left {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1;
}

.win-app-icon {
  width: 18px;
  height: 18px;
  object-fit: contain;
  flex-shrink: 0;
}

.win-controls {
  display: flex;
  align-items: stretch;
  height: 100%;
  flex-shrink: 0;
}

.win-btn {
  width: 36px;
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: background-color 0.12s ease, color 0.12s ease;
}

.win-btn svg {
  width: 10px;
  height: 10px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.win-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.win-btn-close:hover {
  background: #e81123;
  color: #ffffff;
}

.bar-title {
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-muted);
}

.sub-tabs {
  display: flex;
  gap: 4px;
}

.sub-tab {
  background: var(--bg-subtle);
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.73rem;
  font-weight: 700;
  color: var(--text-muted);
  cursor: pointer;
}

.sub-tab.active {
  background: var(--indigo-soft);
  border-color: var(--indigo-border);
  color: var(--indigo);
}

.sub-tab-pink.active {
  background: var(--pink-soft);
  border-color: var(--pink-border);
  color: var(--pink);
}

/* Middle Media Area — Takes remaining 310px height uniformly */
.preview-media-area {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  position: relative;
}

.preview-dark-bg {
  background: #0f172a;
}

.preview-dark-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.preview-card-foot {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  height: 36px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ==========================================================================
   Slide 2: Retasq Live Recurrence Demo (Inside Uniform 310px Media Area)
   ========================================================================== */
.btn-tiny-reset {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
}

.retasq-live-body {
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 6px;
}

.r-task {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.r-task:hover {
  border-color: var(--cyan);
}

.r-task.completed {
  background: var(--cyan-soft);
  border-color: var(--cyan-border);
}

.r-check {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  border: 2px solid var(--border-strong);
  background: #fff;
  color: #fff;
  font-weight: 800;
  font-size: 0.74rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
}

.r-task.completed .r-check {
  background: var(--cyan);
  border-color: var(--cyan);
}

.r-info {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.r-info strong {
  font-size: 0.84rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.r-task.completed .r-info strong {
  text-decoration: line-through;
  color: var(--text-muted);
}

.r-info span {
  font-size: 0.72rem;
  color: var(--cyan);
  font-weight: 600;
}

.r-pill {
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 700;
  background: var(--bg-subtle);
  padding: 2px 8px;
  border-radius: 999px;
  color: var(--text-body);
  flex-shrink: 0;
}

.r-pill-green {
  background: #dcfce7;
  color: #166534;
}

/* ==========================================================================
   Slide 4: CanvaStitch Right Card Panes (Fits Inside Exact Same 310px Media Area!)
   ========================================================================== */
.canva-pane {
  display: none;
  height: 100%;
}

.canva-pane.active {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Pane A: Compact Beta Signup Form */
#canva-pane-form {
  background: linear-gradient(145deg, #fff1f2 0%, #ffffff 65%, #fdf2f8 100%);
  padding: 14px 18px;
}

.beta-form-compact {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  height: 100%;
}

.bfc-intro {
  display: flex;
  flex-direction: column;
}

.bfc-intro strong {
  font-family: var(--font-display);
  font-size: 1rem;
  color: var(--text-main);
}

.bfc-intro span {
  font-size: 0.78rem;
  color: var(--text-body);
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.field-group label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-body);
}

.field-group input,
.field-group select,
.field-group textarea {
  padding: 6px 10px;
  border-radius: 7px;
  border: 1px solid var(--border-strong);
  background: #fff;
  font-size: 0.82rem;
  color: var(--text-main);
  font-family: inherit;
}

.field-group textarea {
  resize: none;
  height: 44px;
  line-height: 1.35;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  outline: 2px solid var(--pink);
  border-color: transparent;
}

/* Pane B: Interactive Stitch Samples inside the 310px area */
#canva-pane-samples {
  background: #ffffff;
  padding: 10px 14px;
}

.sample-viewer-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 8px;
}

.csb-tabs {
  display: flex;
  justify-content: center;
  gap: 6px;
  flex-shrink: 0;
}

.stitch-sample-btn {
  background: var(--bg-subtle);
  border: 1px solid var(--border-strong);
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.stitch-sample-btn.active,
.stitch-sample-btn:hover {
  background: var(--pink-soft);
  border-color: var(--pink);
  color: var(--pink);
}

.sample-viewer-inner img {
  flex: 1;
  min-height: 0;
  width: 100%;
  object-fit: contain;
  border-radius: 8px;
  background: #f8fafc;
}

.beta-success {
  text-align: center;
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  height: 100%;
}

.success-pill {
  display: inline-block;
  background: #dcfce7;
  color: #166534;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
}

.beta-success h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 4px;
  color: var(--text-main);
}

.beta-success p {
  font-size: 0.8rem;
  line-height: 1.4;
  color: var(--text-body);
  margin-bottom: 8px;
}

.beta-success-note {
  font-size: 0.76rem;
  line-height: 1.35;
  color: #065f46;
  background: #ecfdf5;
  border: 1px dashed #6ee7b7;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 8px;
}

.btn-sm {
  padding: 6px 14px;
  font-size: 0.78rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 16px 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.footer-logo {
  height: 38px;
  width: auto;
  flex-shrink: 0;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-weight: 600;
  color: var(--text-body);
}

.footer-links a:hover,
.footer-left a:hover {
  color: var(--active-accent);
  text-decoration: underline;
}

/* ==========================================================================
   Responsive Adjustments
   ========================================================================== */
@media (max-width: 980px) {
  .stage-tabs {
    grid-template-columns: repeat(2, 1fr);
  }

  .slide-grid {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .slide-copy {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .stage-tabs,
  .form-row-2 {
    grid-template-columns: 1fr;
  }

  .slide-ctas {
    flex-wrap: wrap;
  }

  .stage-body {
    padding: 22px 18px;
  }
}
