/* ==========================================================================
   Design Tokens
   ========================================================================== */
:root {
  /* Colors */
  --color-primary: #4F46E5;        /* Indigo */
  --color-primary-hover: #4338CA;
  --color-primary-active: #3730A3;
  --color-secondary: #139C88;      /* Teal */
  --color-secondary-hover: #0F766E;
  --color-secondary-active: #0D5C56;
  --color-text: #0F172A;           /* Slate */
  --color-text-muted: #475569;
  --color-bg: #FFFFFF;
  --color-bg-alt: #F8FAFC;         /* Lavender-Gray */
  --color-border: #E2E8F0;
  --color-tg-bg: #EFF6FF;          /* Telegram soft blue */
  --color-tg-bubble-in: #FFFFFF;
  --color-tg-bubble-out: #E0F2FE;
  --color-tg-text: #1E293B;

  /* Typography */
  --font-headings: 'Segoe UI Variable Display', 'Segoe UI', system-ui, sans-serif;
  --font-body: 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;

  /* Geometry & Grid */
  --container-max-width: 1120px;
  --radius-lg: 16px;
  --radius-md: 8px;
  --radius-sm: 4px;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(15, 23, 42, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(15, 23, 42, 0.05), 0 2px 4px -2px rgba(15, 23, 42, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(15, 23, 42, 0.05), 0 4px 6px -4px rgba(15, 23, 42, 0.05);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3 {
  font-family: var(--font-headings);
  font-weight: 700;
  line-height: 1.25;
}

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

/* ==========================================================================
   Layout & Container
   ========================================================================== */
.container {
  max-width: var(--container-max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.section {
  padding: 5rem 0;
}

.section-alt {
  background-color: var(--color-bg-alt);
}

.section-header {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 3rem auto;
}

.section-title {
  font-size: 2rem;
  color: var(--color-text);
  margin-bottom: 1rem;
}

.section-subtitle {
  color: var(--color-text-muted);
  font-size: 1.125rem;
}

/* ==========================================================================
   Header (Navigation)
   ========================================================================== */
.header {
  height: 5rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  background-color: rgba(25, 25, 25, 0.01);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 100;
}

.header .container {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: var(--font-headings);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--color-text);
  display: flex;
  align-items: center;
}

.logo-dot {
  color: var(--color-primary);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.header-account-link {
  color: var(--color-text-muted);
  font-size: .95rem;
  font-weight: 600;
  transition: color 150ms ease;
}

.header-account-link:hover {
  color: var(--color-primary);
}

@media (max-width: 600px) {
  .header-actions { gap: .6rem; }
  .header-account-link { font-size: .82rem; }
  .header-actions .btn { padding-inline: .85rem; font-size: .82rem; }
}

/* ==========================================================================
   Buttons & Links
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 150ms ease-in-out;
  text-align: center;
  min-height: 48px;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

.btn-primary:hover {
  background-color: var(--color-primary-hover);
}

.btn-primary:active {
  background-color: var(--color-primary-active);
}

.btn-secondary {
  background-color: var(--color-secondary);
  color: #FFFFFF;
}

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

.btn-secondary:active {
  background-color: var(--color-secondary-active);
}

.btn-outline {
  border-color: var(--color-border);
  background-color: transparent;
  color: var(--color-text);
}

.btn-outline:hover {
  background-color: var(--color-bg-alt);
  border-color: var(--color-text-muted);
}

.btn:focus-visible, a:focus-visible, button:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

.btn-icon {
  margin-left: 0.5rem;
  width: 20px;
  height: 20px;
  stroke: currentColor;
  stroke-width: 2;
  fill: none;
}

/* Loading spinner styles */
.btn-loading {
  position: relative;
  color: transparent !important;
  cursor: not-allowed;
  pointer-events: none;
}

.btn-loading::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  top: 50%;
  left: 50%;
  margin-top: -10px;
  margin-left: -10px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #FFFFFF;
  animation: spinner 0.6s linear infinite;
}

.btn-outline.btn-loading::after {
  border-color: rgba(15, 23, 42, 0.1);
  border-top-color: var(--color-text);
}

@keyframes spinner {
  to { transform: rotate(360deg); }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
  padding: 6rem 0;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 4rem;
  align-items: center;
}

.hero-title {
  font-size: 3rem;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  letter-spacing: -0.025em;
}

.hero-text {
  font-size: 1.125rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  max-width: 540px;
}

.hero-cta {
  display: flex;
  gap: 1rem;
  align-items: center;
}

/* ==========================================================================
   CSS Telegram Bot Mockup
   ========================================================================== */
.tg-mockup {
  background-color: var(--color-tg-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  height: 480px;
  display: flex;
  flex-direction: column;
}

.tg-header {
  background-color: #FFFFFF;
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--color-border);
}

.tg-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  margin-right: 0.75rem;
  font-size: 1rem;
}

.tg-info {
  display: flex;
  flex-direction: column;
}

.tg-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
  line-height: 1.2;
}

.tg-status {
  font-size: 0.75rem;
  color: var(--color-secondary);
}

.tg-chat {
  flex-grow: 1;
  padding: 1rem;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.tg-bubble {
  max-width: 80%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  font-size: 0.875rem;
  line-height: 1.4;
  color: var(--color-tg-text);
  box-shadow: var(--shadow-sm);
  position: relative;
}

.tg-bubble-in {
  background-color: var(--color-tg-bubble-in);
  align-self: flex-start;
  border-top-left-radius: 2px;
}

.tg-bubble-out {
  background-color: var(--color-tg-bubble-out);
  align-self: flex-end;
  border-top-right-radius: 2px;
}

.tg-bubble-meta {
  display: block;
  font-size: 0.6875rem;
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 0.25rem;
}

.tg-bubble-bold {
  font-weight: 500;
}

.tg-typing {
  align-self: flex-start;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.75rem 1rem;
  background-color: var(--color-tg-bubble-in);
  border-radius: 12px;
  border-top-left-radius: 2px;
  box-shadow: var(--shadow-sm);
}

.tg-dot {
  width: 6px;
  height: 6px;
  background-color: var(--color-text-muted);
  border-radius: 50%;
  animation: typing 1.4s infinite ease-in-out;
}

.tg-dot:nth-child(2) { animation-delay: 200ms; }
.tg-dot:nth-child(3) { animation-delay: 400ms; }

@keyframes typing {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.tg-input-area {
  background-color: #FFFFFF;
  border-top: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.tg-input-placeholder {
  flex-grow: 1;
  color: var(--color-text-muted);
  font-size: 0.875rem;
}

.tg-send-icon {
  width: 24px;
  height: 24px;
  color: var(--color-primary);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ==========================================================================
   Pains Section (Grid cards)
   ========================================================================== */
.pains-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.pain-card {
  --pain-accent: #635bff;
  --pain-soft: #eeecff;
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-rows: auto 190px auto 1fr auto;
  min-width: 0;
  min-height: 530px;
  overflow: hidden;
  padding: 1.25rem;
  border: 1px solid rgba(148, 163, 184, .2);
  border-radius: 28px;
  background: linear-gradient(165deg, rgba(255,255,255,.98), rgba(248,250,255,.94));
  box-shadow: 0 18px 55px rgba(30, 41, 59, .07), inset 0 1px rgba(255,255,255,.95);
  transition: transform 420ms var(--ease-cinematic), border-color 300ms ease, box-shadow 420ms ease;
}

.pain-card-copy {
  --pain-accent: #8b5cf6;
  --pain-soft: #f3e8ff;
}

.pain-card-cost {
  --pain-accent: #0f9f94;
  --pain-soft: #dff8f4;
}

.pain-card::before {
  content: "";
  position: absolute;
  z-index: -1;
  width: 220px;
  height: 220px;
  top: -135px;
  right: -100px;
  border-radius: 50%;
  background: var(--pain-accent);
  opacity: .1;
  filter: blur(2px);
  transition: transform 600ms var(--ease-cinematic), opacity 300ms ease;
}

.pain-card::after {
  content: attr(data-number);
  position: absolute;
  z-index: -1;
  right: .65rem;
  bottom: 3.9rem;
  color: var(--pain-accent);
  opacity: .035;
  font-size: clamp(6rem, 9vw, 8.5rem);
  font-weight: 800;
  line-height: .8;
  letter-spacing: -.08em;
  pointer-events: none;
}

.pain-card:hover {
  transform: translateY(-8px);
  border-color: color-mix(in srgb, var(--pain-accent) 26%, transparent);
  box-shadow: 0 30px 80px rgba(30, 41, 59, .13), inset 0 1px rgba(255,255,255,.95);
}

.pain-card:hover::before {
  transform: scale(1.22) translate(-12px, 12px);
  opacity: .14;
}

.pain-card-top {
  display: flex;
  align-items: center;
  min-width: 0;
  margin-bottom: .9rem;
  gap: .5rem;
}

.pain-index {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 11px;
  color: #fff;
  background: var(--pain-accent);
  box-shadow: 0 9px 22px color-mix(in srgb, var(--pain-accent) 28%, transparent);
  font-size: .68rem;
  font-weight: 750;
}

.pain-category {
  color: #475569;
  font-size: .69rem;
  font-weight: 750;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pain-frequency {
  margin-left: auto;
  color: #94a3b8;
  font-size: .62rem;
  font-weight: 650;
  white-space: nowrap;
}

.pain-visual {
  position: relative;
  min-width: 0;
  overflow: hidden;
  padding: .85rem;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 20px;
  color: #e2e8f0;
  background:
    radial-gradient(circle at 90% 10%, color-mix(in srgb, var(--pain-accent) 30%, transparent), transparent 44%),
    linear-gradient(145deg, #11152c, #191d3a 62%, #101326);
  box-shadow: inset 0 1px rgba(255,255,255,.08), 0 18px 30px rgba(15,23,42,.12);
}

.pain-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 18px 18px;
  mask-image: linear-gradient(to bottom, #000, transparent 90%);
}

.pain-visual-caption {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: .38rem;
  color: #94a3b8;
  font-size: .57rem;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.pain-visual-caption > span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fb7185;
  box-shadow: 0 0 0 4px rgba(251,113,133,.1);
}

.pain-visual-caption b {
  margin-left: auto;
  color: #cbd5e1;
  font-size: .55rem;
}

.pain-calendar {
  position: relative;
  z-index: 2;
  display: grid;
  gap: .42rem;
  width: calc(100% - 46px);
  margin-top: .85rem;
}

.pain-calendar > div {
  display: grid;
  grid-template-columns: 25px minmax(0,1fr) auto;
  align-items: center;
  gap: .4rem;
  min-height: 31px;
  padding: .35rem .45rem;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 9px;
  background: rgba(255,255,255,.055);
  transition: transform 420ms var(--ease-cinematic), background 300ms ease;
}

.pain-calendar strong { color: #a5b4fc; font-size: .56rem; }
.pain-calendar span { overflow: hidden; color: #e2e8f0; font-size: .62rem; text-overflow: ellipsis; white-space: nowrap; }
.pain-calendar small { color: #64748b; font-size: .54rem; }
.pain-calendar .is-warning { border-color: rgba(251,113,133,.22); background: rgba(251,113,133,.08); transform: translateX(5px); }
.pain-calendar .is-warning strong,
.pain-calendar .is-warning small { color: #fda4af; }

.pain-clock {
  position: absolute;
  z-index: 3;
  right: .65rem;
  bottom: .75rem;
  display: grid;
  place-items: center;
  width: 55px;
  height: 55px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 50%;
  background: rgba(15,23,42,.75);
  box-shadow: 0 10px 24px rgba(0,0,0,.22), inset 0 0 0 4px rgba(99,91,255,.1);
}

.pain-clock::before {
  content: "";
  position: absolute;
  inset: 5px;
  border: 2px solid transparent;
  border-top-color: #818cf8;
  border-right-color: #818cf8;
  border-radius: 50%;
  transform: rotate(22deg);
  transition: transform 700ms var(--ease-cinematic);
}

.pain-card:hover .pain-clock::before { transform: rotate(170deg); }
.pain-clock b { margin-top: 5px; color: #fff; font-size: .68rem; }
.pain-clock small { margin-top: -7px; color: #94a3b8; font-size: .45rem; }

.pain-editor {
  position: relative;
  z-index: 2;
  height: 132px;
  margin-top: .72rem;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 13px;
  background: rgba(255,255,255,.055);
}

.pain-editor-toolbar {
  display: flex;
  align-items: center;
  gap: .3rem;
  height: 30px;
  padding: 0 .55rem;
  border-bottom: 1px solid rgba(255,255,255,.07);
}

.pain-editor-toolbar i { width: 5px; height: 5px; border-radius: 50%; background: #475569; }
.pain-editor-toolbar i:first-child { background: #fb7185; }
.pain-editor-toolbar em { margin-left: .25rem; color: #64748b; font-size: .52rem; font-style: normal; }
.pain-editor-title { display: flex; align-items: center; padding: 1rem .7rem .75rem; color: #f8fafc; font-size: .72rem; font-weight: 650; }
.pain-editor-title i { width: 1px; height: 14px; margin-left: .3rem; background: #a78bfa; transition: opacity 180ms ease; }
.pain-card:hover .pain-editor-title i { opacity: .18; }
.pain-editor-tags { display: flex; gap: .35rem; padding: 0 .7rem; }
.pain-editor-tags span { padding: .27rem .45rem; border: 1px dashed rgba(167,139,250,.27); border-radius: 7px; color: #a78bfa; background: rgba(139,92,246,.08); font-size: .53rem; transition: transform 400ms var(--ease-cinematic); }
.pain-card:hover .pain-editor-tags span:nth-child(1) { transform: translateY(-3px) rotate(-2deg); }
.pain-card:hover .pain-editor-tags span:nth-child(3) { transform: translateY(2px) rotate(2deg); }

.pain-cost-list {
  position: relative;
  z-index: 2;
  display: grid;
  gap: .42rem;
  margin-top: .72rem;
}

.pain-cost-list > div {
  display: grid;
  grid-template-columns: 27px 1fr auto;
  align-items: center;
  gap: .5rem;
  min-height: 31px;
  padding: .3rem .45rem;
  border: 1px solid rgba(255,255,255,.07);
  border-radius: 10px;
  background: rgba(255,255,255,.055);
  transition: transform 420ms var(--ease-cinematic);
}

.pain-cost-list > div:nth-child(2) { transform: translateX(6px); }
.pain-card:hover .pain-cost-list > div:nth-child(1) { transform: translateX(4px); }
.pain-card:hover .pain-cost-list > div:nth-child(2) { transform: translateX(10px); }
.pain-card:hover .pain-cost-list > div:nth-child(3) { transform: translateX(6px); }
.pain-cost-list i { display:grid; place-items:center; width:25px; height:25px; border-radius:8px; color:#ccfbf1; background:rgba(15,159,148,.18); font-size:.55rem; font-style:normal; font-weight:750; }
.pain-cost-list span { color:#e2e8f0; font-size:.61rem; }
.pain-cost-list strong { display:flex; gap:2px; }
.pain-cost-list strong b { width:7px; height:12px; border-radius:2px; background:#2dd4bf; opacity:.75; }

.pain-cost-total {
  position: absolute;
  z-index: 3;
  right: .65rem;
  bottom: .55rem;
  display: flex;
  align-items: center;
  gap: .3rem;
  padding: .36rem .48rem;
  border: 1px solid rgba(45,212,191,.16);
  border-radius: 9px;
  color: #99f6e4;
  background: rgba(13,148,136,.12);
  font-size: .5rem;
}

.pain-cost-total b { color:#f0fdfa; font-size:.56rem; }
.pain-cost-total i { font-size:.72rem; font-style:normal; }

.pain-copy {
  padding: 1.35rem .25rem 0;
}

.pain-title {
  max-width: 15ch;
  font-size: 1.32rem;
  line-height: 1.13;
  letter-spacing: -.025em;
  color: var(--color-text);
  margin-bottom: 0.75rem;
}

.pain-desc {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.pain-resolution {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 34px minmax(0,1fr);
  align-items: center;
  gap: .65rem;
  margin-top: 1.2rem;
  padding: .7rem;
  border: 1px solid color-mix(in srgb, var(--pain-accent) 13%, transparent);
  border-radius: 14px;
  background: color-mix(in srgb, var(--pain-soft) 70%, white);
  transition: transform 420ms var(--ease-cinematic), box-shadow 300ms ease;
}

.pain-card:hover .pain-resolution {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px color-mix(in srgb, var(--pain-accent) 10%, transparent);
}

.pain-resolution-icon {
  display:grid;
  place-items:center;
  width:34px;
  height:34px;
  border-radius:11px;
  color:#fff;
  background:var(--pain-accent);
  font-size:.9rem;
  font-weight:700;
}

.pain-resolution div { display:flex; min-width:0; flex-direction:column; gap:.08rem; }
.pain-resolution small { color:var(--pain-accent); font-size:.55rem; font-weight:750; letter-spacing:.08em; text-transform:uppercase; }
.pain-resolution b { color:#27324a; font-size:.66rem; line-height:1.25; }

@supports not (color: color-mix(in srgb, red, blue)) {
  .pain-card:hover { border-color: rgba(99,91,255,.26); }
  .pain-index,
  .pain-resolution-icon { box-shadow: 0 9px 22px rgba(99,91,255,.2); }
  .pain-resolution { border-color: rgba(99,91,255,.13); background: #f2f1ff; }
}

.pains-action {
  text-align: center;
  margin-top: 3rem;
}

.pains-link {
  color: var(--color-primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  cursor: pointer;
}

.pains-link:hover {
  color: var(--color-primary-hover);
  text-decoration: underline;
}

/* ==========================================================================
   How It Works (Steps Timeline)
   ========================================================================== */
.steps-timeline {
  max-width: 800px;
  margin: 0 auto;
  position: relative;
  padding-left: 3rem;
}

.steps-timeline::before {
  content: "";
  position: absolute;
  left: 15px;
  top: 10px;
  bottom: 10px;
  width: 2px;
  background-color: var(--color-border);
}

.step-item {
  position: relative;
  margin-bottom: 3.5rem;
}

.step-item:last-child {
  margin-bottom: 0;
}

.step-number {
  position: absolute;
  left: calc(-3rem - 15px);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  font-size: 0.875rem;
  border: 4px solid var(--color-bg);
  box-shadow: 0 0 0 1px var(--color-border);
}

.step-content {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  box-shadow: var(--shadow-sm);
  display: flex;
  gap: 2rem;
  align-items: center;
}

.step-info {
  flex-grow: 1;
}

.step-title {
  font-size: 1.25rem;
  color: var(--color-text);
  margin-bottom: 0.5rem;
}

.step-desc {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
}

.step-icon-box {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  background-color: var(--color-bg-alt);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.step-icon {
  width: 32px;
  height: 32px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ==========================================================================
   Showcase Slider (Tabs based)
   ========================================================================== */
.showcase-tabs {
  display: flex;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
}

.tab-btn {
  background: none;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--color-text-muted);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: all 150ms ease-in-out;
}

.tab-btn:hover {
  background-color: var(--color-bg-alt);
  color: var(--color-text);
}

.tab-btn.active {
  background-color: var(--color-primary);
  color: #FFFFFF;
}

.showcase-content {
  display: none;
}

.showcase-content.active {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 2.5rem;
  align-items: stretch;
}

/* Showcase Landing Mockup */
.mock-landing {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background-color: #FFFFFF;
  display: flex;
  flex-direction: column;
}

.mock-landing-header {
  background-color: var(--color-bg-alt);
  padding: 0.5rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: 1px solid var(--color-border);
}

.mock-dots {
  display: flex;
  gap: 4px;
}

.mock-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: #CBD5E1;
}

.mock-url {
  background-color: #FFFFFF;
  border: 1px solid var(--color-border);
  font-size: 0.75rem;
  color: var(--color-text-muted);
  padding: 0.125rem 1rem;
  border-radius: 10px;
  flex-grow: 1;
  max-width: 400px;
}

.mock-landing-body {
  padding: 2.5rem 2rem;
  flex-grow: 1;
}

.mock-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--color-primary);
  text-transform: uppercase;
  margin-bottom: 0.75rem;
  letter-spacing: 0.05em;
}

.mock-title {
  font-size: 1.75rem;
  margin-bottom: 1rem;
  color: var(--color-text);
  letter-spacing: -0.02em;
}

.mock-desc {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

.mock-features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 2rem;
}

.mock-feature {
  font-size: 0.875rem;
  color: var(--color-text);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.mock-feature-icon {
  width: 16px;
  height: 16px;
  color: var(--color-secondary);
  flex-shrink: 0;
}

/* Showcase Social Media Mockup */
.mock-social {
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  background-color: #FFFFFF;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.mock-social-header {
  display: flex;
  align-items: center;
  margin-bottom: 1.25rem;
}

.mock-social-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background-color: var(--color-border);
  margin-right: 0.75rem;
  overflow: hidden;
}

.mock-social-meta {
  display: flex;
  flex-direction: column;
}

.mock-social-name {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--color-text);
}

.mock-social-time {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

.mock-social-body {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-text);
  flex-grow: 1;
}

.mock-social-body p {
  margin-bottom: 0.75rem;
}

.mock-social-footer {
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  margin-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  color: var(--color-text-muted);
  font-size: 0.8125rem;
}

/* ==========================================================================
   FAQ Section (Accordion)
   ========================================================================== */
.faq-list {
  max-width: 800px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--color-border);
}

.faq-item:first-child {
  border-top: 1px solid var(--color-border);
}

.faq-trigger {
  width: 100%;
  background: none;
  border: none;
  padding: 1.5rem 0.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  text-align: left;
  color: var(--color-text);
  font-family: var(--font-headings);
  font-size: 1.25rem;
  font-weight: 600;
  transition: color 150ms ease-in-out;
}

.faq-trigger:hover {
  color: var(--color-primary);
}

.faq-icon {
  width: 24px;
  height: 24px;
  transition: transform 200ms cubic-bezier(0.4, 0, 0.2, 1);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  flex-shrink: 0;
  margin-left: 1rem;
}

.faq-panel {
  max-height: 0;
  overflow: hidden;
  transition: max-height 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

.faq-content {
  padding: 0 0.5rem 1.5rem 0.5rem;
  color: var(--color-text-muted);
  line-height: 1.6;
  font-size: 0.9375rem;
}

/* Accordion open states controlled by JS */
.faq-item.open .faq-icon {
  transform: rotate(45deg);
}

.faq-item.open .faq-panel {
  max-height: 200px; /* arbitrary height to fit contents */
}

/* ==========================================================================
   Outro / Lead Generation Block
   ========================================================================== */
.outro {
  background-color: var(--color-text);
  color: #FFFFFF;
  border-radius: var(--radius-lg);
  padding: 5rem 3rem;
  text-align: center;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.outro::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(circle at 10% 20%, rgba(79, 70, 229, 0.15) 0%, transparent 50%),
              radial-gradient(circle at 90% 80%, rgba(20, 184, 166, 0.15) 0%, transparent 50%);
  pointer-events: none;
}

.outro-title {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.outro-text {
  font-size: 1.125rem;
  color: #94A3B8;
  margin-bottom: 2.5rem;
  max-width: 580px;
  margin-left: auto;
  margin-right: auto;
}

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

.footer-container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-nav {
  display: flex;
  gap: 1.5rem;
}

.footer-link:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

/* ==========================================================================
   Mobile Sticky Bar
   ========================================================================== */
.mobile-sticky-bar {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: rgba(255, 255, 255, 0.95);
  border-top: 1px solid var(--color-border);
  padding: 0.75rem 1rem;
  z-index: 99;
  box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.05);
}

.mobile-sticky-bar .btn {
  width: 100%;
}

/* ==========================================================================
   Legal Template Styles (Internal Pages)
   ========================================================================== */
.legal-page {
  max-width: 720px;
  margin: 4rem auto;
  padding: 0 1.5rem;
  color: var(--color-text);
  line-height: 1.6;
}

.legal-header {
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
}

.legal-title {
  font-size: 2.25rem;
  margin-bottom: 0.5rem;
}

.legal-date {
  font-size: 0.875rem;
  color: var(--color-text-muted);
}

.legal-section {
  margin-bottom: 2rem;
}

.legal-section-title {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
  color: var(--color-text);
  font-family: var(--font-headings);
}

.legal-text {
  margin-bottom: 1rem;
}

.legal-text strong {
  color: var(--color-text);
}

.legal-list {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-list li {
  margin-bottom: 0.5rem;
}

.legal-back-link {
  display: inline-flex;
  align-items: center;
  color: var(--color-primary);
  font-weight: 500;
  margin-bottom: 2rem;
}

.legal-back-link:hover {
  text-decoration: underline;
}

/* ==========================================================================
   Responsive Adaptability
   ========================================================================== */
@media (max-width: 1024px) {
  .hero-grid {
    gap: 3rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
}

@media (max-width: 768px) {
  .section {
    padding: 3.5rem 0;
  }

  .header {
    height: 4.5rem;
  }

  .hero {
    padding: 3rem 0;
  }

  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
    text-align: center;
  }

  .hero-text {
    margin-left: auto;
    margin-right: auto;
  }

  .hero-cta {
    justify-content: center;
  }

  .pains-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .pain-card {
    grid-template-rows: auto 190px auto 1fr auto;
    min-height: 0;
    padding: 1.15rem;
  }

  .pain-title {
    max-width: 24ch;
  }

  .steps-timeline {
    padding-left: 2.5rem;
  }

  .steps-timeline::before {
    left: 10px;
  }

  .step-number {
    left: calc(-2.5rem - 10px);
    width: 28px;
    height: 28px;
    font-size: 0.8125rem;
  }

  .step-content {
    flex-direction: column;
    text-align: center;
    gap: 1.25rem;
    padding: 1.5rem 1.25rem;
  }

  .step-icon-box {
    order: -1;
  }

  .showcase-content.active {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .showcase-tabs {
    flex-wrap: wrap;
    gap: 0.5rem;
  }

  .tab-btn {
    padding: 0.5rem 1rem;
    font-size: 0.9375rem;
  }

  .mock-landing-body {
    padding: 1.5rem;
  }

  .mock-title {
    font-size: 1.5rem;
  }

  .faq-trigger {
    font-size: 1.125rem;
    padding: 1.25rem 0.25rem;
  }

  .outro {
    padding: 3.5rem 1.5rem;
  }

  .outro-title {
    font-size: 2rem;
  }

  .footer {
    padding: 2rem 0 5.5rem 0; /* extra padding bottom to account for sticky cta bar */
  }

  .footer-container {
    flex-direction: column;
    gap: 1.5rem;
    text-align: center;
  }

  .footer-nav {
    flex-direction: column;
    gap: 1rem;
  }

  .mobile-sticky-bar {
    display: block;
  }
}

/* ==========================================================================
   Accessibility & Animation Fallback
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *, *::before, *::after {
    animation-delay: -1ms !important;
    animation-duration: 1ms !important;
    animation-iteration-count: 1 !important;
    background-attachment: initial !important;
    scroll-behavior: auto !important;
    transition-duration: 0s !important;
    transition-delay: 0s !important;
  }
}

/* ==========================================================================
   Modals for Legal Content
   ========================================================================== */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(15, 23, 42, 0.6);
  backdrop-filter: blur(4px);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 250ms ease-in-out;
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-content {
  background-color: #FFFFFF;
  border-radius: var(--radius-lg);
  max-width: 760px;
  width: 92%;
  max-height: 85vh;
  overflow-y: auto;
  padding: 3rem 2.5rem 2.5rem 2.5rem;
  box-shadow: var(--shadow-xl);
  position: relative;
  transform: scale(0.95);
  transition: transform 250ms cubic-bezier(0.16, 1, 0.3, 1);
}

.modal.open .modal-content {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--color-text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background-color 150ms, color 150ms;
}

.modal-close:hover {
  background-color: var(--color-bg-alt);
  color: var(--color-text);
}

.modal-close:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Modal Legal Styling */
.modal-title {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 1.5rem;
  padding-right: 2rem;
}

.modal-date {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--color-border);
  padding-bottom: 1rem;
}

.modal-body h3 {
  font-size: 1.25rem;
  color: var(--color-text);
  margin: 1.5rem 0 0.75rem 0;
}

.modal-body p {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.modal-body ul {
  padding-left: 1.25rem;
  margin-bottom: 1.5rem;
}

.modal-body li {
  color: var(--color-text-muted);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.modal-body strong {
  color: var(--color-text);
}

@media (max-width: 768px) {
  .modal-content {
    padding: 2.5rem 1.5rem 1.5rem 1.5rem;
  }
  .modal-title {
    font-size: 1.5rem;
  }
}

/* ========================================================================== 
   Flex Advexo — cinematic product layer
   ========================================================================== */
:root {
  --cinematic-ink: #090b18;
  --cinematic-indigo: #675ff4;
  --cinematic-cyan: #5eead4;
  --cinematic-glow: rgba(99, 102, 241, 0.28);
  --ease-cinematic: cubic-bezier(0.16, 1, 0.3, 1);
}

body {
  overflow-x: hidden;
}

.header {
  background: rgba(255, 255, 255, 0.76);
  border-bottom-color: rgba(226, 232, 240, 0.72);
}

.hero {
  min-height: calc(100svh - 5rem);
  display: flex;
  align-items: center;
  position: relative;
  padding: 4.5rem 0 5.5rem;
  background:
    radial-gradient(circle at 78% 18%, rgba(99, 102, 241, 0.14), transparent 32%),
    radial-gradient(circle at 88% 76%, rgba(20, 184, 166, 0.11), transparent 28%),
    linear-gradient(180deg, #fff 0%, #fbfcff 100%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.25;
  background-image: linear-gradient(rgba(79, 70, 229, 0.08) 1px, transparent 1px), linear-gradient(90deg, rgba(79, 70, 229, 0.08) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: linear-gradient(to right, transparent 5%, #000 55%, transparent 100%);
}

.hero-grid {
  grid-template-columns: minmax(0, 0.92fr) minmax(500px, 1.08fr);
  gap: 4.5rem;
  position: relative;
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 3;
  min-width: 0;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.45rem 0.7rem;
  margin-bottom: 1.25rem;
  border: 1px solid rgba(79, 70, 229, 0.16);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--color-primary);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.055em;
  text-transform: uppercase;
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.07);
  backdrop-filter: blur(12px);
}

.hero-eyebrow span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cinematic-cyan);
  box-shadow: 0 0 0 5px rgba(94, 234, 212, 0.15);
}

.hero-title {
  font-size: clamp(2.75rem, 4vw, 4rem);
  line-height: 1.01;
  letter-spacing: -0.055em;
  max-width: 590px;
  text-wrap: balance;
}

.hero-text {
  max-width: 610px;
  line-height: 1.7;
}

.hero .btn-primary {
  min-height: 56px;
  padding-inline: 1.65rem;
  border-radius: 12px;
  background: linear-gradient(135deg, #5b54ed, #4338ca);
  box-shadow: 0 14px 34px rgba(79, 70, 229, 0.28), inset 0 1px rgba(255, 255, 255, 0.24);
  transition: transform 180ms var(--ease-cinematic), box-shadow 180ms ease, background 180ms ease;
}

.hero .btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 19px 42px rgba(79, 70, 229, 0.34), inset 0 1px rgba(255, 255, 255, 0.24);
}

.hero .btn-primary:active {
  transform: translateY(1px) scale(0.985);
}

.hero-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem 1.15rem;
  margin-top: 1.35rem;
  color: #64748b;
  font-size: 0.78rem;
  font-weight: 500;
}

.hero-proof span::before {
  content: "✓";
  margin-right: 0.35rem;
  color: var(--color-secondary);
  font-weight: 700;
}

.hero-visual {
  --tilt-x: 0deg;
  --tilt-y: 0deg;
  position: relative;
  min-height: 610px;
  isolation: isolate;
  perspective: 1200px;
  transform-style: preserve-3d;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 1% -7% 0 -5%;
  z-index: -2;
  border: 1px solid rgba(99, 102, 241, 0.1);
  border-radius: 34px 0 0 34px;
  background:
    radial-gradient(circle at 72% 22%, rgba(99, 102, 241, 0.18), transparent 42%),
    radial-gradient(circle at 16% 78%, rgba(20, 184, 166, 0.13), transparent 34%),
    linear-gradient(145deg, rgba(242, 243, 255, 0.92), rgba(247, 250, 255, 0.72));
  box-shadow: inset 0 1px rgba(255,255,255,.8);
}

.hero-webgl {
  position: absolute;
  inset: -8% -12%;
  width: 124%;
  height: 116%;
  opacity: 0;
  z-index: -1;
  pointer-events: none;
  filter: saturate(1.04) blur(0.6px);
  mask-image: radial-gradient(ellipse 66% 64% at 50% 50%, #000 48%, rgba(0,0,0,.82) 68%, transparent 100%);
  transition: opacity 700ms ease;
}

.webgl-ready .hero-webgl {
  opacity: 0.82;
}

.hero-orbit {
  position: absolute;
  border: 1px solid rgba(99, 102, 241, 0.16);
  border-radius: 50%;
  pointer-events: none;
}

.hero-orbit-one { width: 500px; height: 500px; top: 4%; left: 2%; transform: rotateX(64deg) rotateZ(14deg); }
.hero-orbit-two { width: 360px; height: 360px; top: 18%; left: 16%; border-color: rgba(20, 184, 166, 0.16); transform: rotateX(62deg) rotateZ(-18deg); }

.hero-visual .tg-mockup {
  position: absolute;
  width: min(390px, 78%);
  height: 500px;
  top: 50%;
  left: 50%;
  z-index: 3;
  border-radius: 25px;
  border-color: rgba(255, 255, 255, 0.78);
  background: rgba(239, 246, 255, 0.88);
  box-shadow: 0 45px 90px rgba(34, 30, 91, 0.2), 0 14px 30px rgba(15, 23, 42, 0.12), inset 0 1px rgba(255,255,255,.85);
  backdrop-filter: blur(18px);
  transform: translate(-50%, -50%) rotateX(var(--tilt-x)) rotateY(var(--tilt-y)) rotateZ(-1.8deg);
  transform-style: preserve-3d;
  transition: transform 220ms ease-out;
}

.hero-visual .tg-header,
.hero-visual .tg-input-area {
  background: rgba(255, 255, 255, 0.86);
}

.result-card {
  position: absolute;
  z-index: 5;
  display: grid;
  grid-template-columns: 34px 1fr;
  grid-template-rows: auto auto;
  column-gap: 0.65rem;
  min-width: 178px;
  padding: 0.8rem 0.9rem;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: 0 20px 44px rgba(30, 41, 59, 0.13);
  backdrop-filter: blur(16px);
  transform-style: preserve-3d;
  transition: transform 250ms var(--ease-cinematic);
}

.result-card .result-icon {
  grid-row: 1 / 3;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, var(--cinematic-indigo), #8179ff);
  box-shadow: 0 8px 18px rgba(79, 70, 229, 0.25);
}

.result-card strong { font-size: 0.82rem; line-height: 1.2; }
.result-card small { color: #64748b; font-size: 0.68rem; }
.result-card-week { top: 12%; right: -4%; transform: translateZ(85px) rotate(2deg); }
.result-card-post { bottom: 18%; left: -7%; transform: translateZ(110px) rotate(-3deg); }
.result-card-channel { bottom: 5%; right: 1%; transform: translateZ(75px) rotate(2deg); }
.result-card-channel .result-icon { background: linear-gradient(135deg, #0f9f8a, #43c6b4); }

.scene-status {
  position: absolute;
  z-index: 5;
  left: 3%;
  top: 2%;
  display: flex;
  align-items: center;
  gap: 0.55rem;
  color: #475569;
  font-size: 0.69rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: .48rem .65rem;
  border: 1px solid rgba(255,255,255,.8);
  border-radius: 999px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 28px rgba(30,41,59,.08);
  backdrop-filter: blur(12px);
}

.scene-status i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cinematic-cyan);
  box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.5);
  animation: scene-pulse 2s infinite;
}

@keyframes scene-pulse { 60% { box-shadow: 0 0 0 9px rgba(94, 234, 212, 0); } }

/* Reveals */
.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 700ms ease, transform 850ms var(--ease-cinematic);
}

.motion-ready [data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Cinematic three-step story */
#steps {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #f7f8ff 46%, #fff 100%);
}

.steps-cinematic {
  display: grid;
  grid-template-columns: minmax(320px, 0.8fr) minmax(500px, 1.2fr);
  gap: 3.75rem;
  align-items: start;
  min-height: 1100px;
  padding-bottom: 0;
}

.steps-timeline {
  padding-top: 0.5rem;
  padding-bottom: 10rem;
}

.steps-timeline::before {
  left: 23px;
  background: linear-gradient(to bottom, rgba(79, 70, 229, 0.1), rgba(79, 70, 229, 0.45), rgba(19, 156, 136, 0.2));
}

.step-item {
  min-height: 340px;
  margin-bottom: 0;
}

.step-content {
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 18px;
  padding: 1.35rem;
  background: rgba(255, 255, 255, 0.7);
  box-shadow: 0 12px 38px rgba(30, 41, 59, 0.05);
  transition: transform 450ms var(--ease-cinematic), border-color 300ms ease, box-shadow 300ms ease, opacity 300ms ease;
}

.step-item.is-active .step-content {
  transform: translateX(8px);
  border-color: rgba(79, 70, 229, 0.28);
  box-shadow: 0 20px 48px rgba(79, 70, 229, 0.12);
}

.step-item.is-active .step-number {
  background: linear-gradient(135deg, #6158ee, #4338ca);
  box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

.story-stage {
  --story-progress: 0;
  position: sticky;
  top: 7rem;
  height: 610px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 28px;
  background:
    radial-gradient(circle at 24% 22%, rgba(94, 234, 212, 0.19), transparent 25%),
    radial-gradient(circle at 74% 76%, rgba(99, 102, 241, 0.34), transparent 38%),
    linear-gradient(145deg, #11142a 0%, #080a15 100%);
  box-shadow: 0 34px 80px rgba(15, 23, 42, 0.2), inset 0 1px rgba(255,255,255,.08);
  perspective: 1100px;
  transform-style: preserve-3d;
}

.story-stage::before {
  content: "";
  position: absolute;
  width: 260px;
  height: 260px;
  right: -50px;
  top: -70px;
  border-radius: 50%;
  background: #5b54ed;
  filter: blur(95px);
  opacity: 0.32;
}

.story-stage-grid {
  position: absolute;
  inset: 0;
  opacity: 0.2;
  background-image: linear-gradient(rgba(255,255,255,.1) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.1) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, #000, transparent 88%);
}

.story-phone {
  position: absolute;
  z-index: 3;
  width: 300px;
  height: 405px;
  left: 50%;
  top: 46%;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 25px;
  color: #fff;
  background: linear-gradient(160deg, rgba(255,255,255,.13), rgba(255,255,255,.055));
  box-shadow: 0 34px 70px rgba(0,0,0,.32), inset 0 1px rgba(255,255,255,.1);
  backdrop-filter: blur(15px);
  transform: translate(-50%, -50%) rotateY(calc(-8deg + var(--story-progress) * 9deg)) rotateX(2deg);
  transition: width 700ms var(--ease-cinematic), height 700ms var(--ease-cinematic), left 700ms var(--ease-cinematic), opacity 500ms ease, transform 80ms linear;
}

.story-phone-head { display: grid; grid-template-columns: 36px 1fr 8px; gap: .65rem; align-items: center; padding-bottom: 1rem; border-bottom: 1px solid rgba(255,255,255,.1); }
.story-phone-head span { display:grid; place-items:center; width:36px; height:36px; border-radius:50%; background:#635bde; font-weight:700; }
.story-phone-head b { font-size:.78rem; }
.story-phone-head i { width:7px; height:7px; border-radius:50%; background:#5eead4; box-shadow:0 0 12px #5eead4; }
.story-message { position:absolute; right:1rem; top:112px; width:78%; padding:.85rem 1rem; border-radius:14px 3px 14px 14px; background:linear-gradient(135deg,#655df0,#4f46e5); font-size:.78rem; line-height:1.45; box-shadow:0 12px 28px rgba(79,70,229,.3); }
.story-thinking { position:absolute; top:190px; left:1rem; display:flex; gap:4px; padding:.7rem .85rem; border-radius:3px 12px 12px; background:rgba(255,255,255,.11); }
.story-thinking span { width:5px; height:5px; border-radius:50%; background:#dbeafe; animation:typing 1.4s infinite ease-in-out; }
.story-thinking span:nth-child(2){animation-delay:.18s}.story-thinking span:nth-child(3){animation-delay:.36s}

.story-output {
  position: absolute;
  z-index: 4;
  display: flex;
  flex-direction: column;
  padding: 1.15rem;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 16px;
  color: #fff;
  background: linear-gradient(145deg, rgba(255,255,255,.16), rgba(255,255,255,.07));
  box-shadow: 0 22px 45px rgba(0,0,0,.25);
  backdrop-filter: blur(15px);
  opacity: 0;
  transform: translateY(24px) scale(.92);
  transition: opacity 600ms ease, transform 750ms var(--ease-cinematic);
}

.story-output small { color:#a5b4fc; font-size:.6rem; font-weight:700; letter-spacing:.12em; margin-bottom:.75rem; }
.story-output b { font-family:var(--font-headings); font-size:1rem; line-height:1.2; margin-bottom:.9rem; }
.story-output > span { display:block; height:5px; margin-top:6px; border-radius:4px; background:rgba(255,255,255,.14); }
.story-output > span:last-child { width:62%; }
.story-output-week { width:230px; height:190px; left:7%; top:14%; }
.story-output-post { width:185px; height:180px; right:7%; top:16%; }
.story-output-channel { width:220px; height:185px; right:10%; bottom:15%; }
.story-output-channel em { margin-top:auto; color:#5eead4; font-size:.64rem; font-style:normal; font-weight:600; }
.story-calendar { display:grid; grid-template-columns:repeat(3,1fr); gap:7px; }
.story-calendar i { height:22px; border-radius:5px; background:rgba(94,234,212,.2); border:1px solid rgba(94,234,212,.2); }

.story-stage[data-step="2"] .story-phone { left:28%; width:255px; height:345px; opacity:.88; }
.story-stage[data-step="2"] .story-output-week { opacity:1; transform:translateY(0) rotateY(-7deg); }
.story-stage[data-step="3"] .story-phone { left:18%; width:215px; height:300px; opacity:.58; }
.story-stage[data-step="3"] .story-output-week { opacity:1; transform:translateY(0) rotateY(-8deg) translateX(-8px); }
.story-stage[data-step="3"] .story-output-post { opacity:1; transform:translateY(0) rotateY(7deg); transition-delay:100ms; }
.story-stage[data-step="3"] .story-output-channel { opacity:1; transform:translateY(0) rotateY(5deg); transition-delay:220ms; }

.story-progress { position:absolute; left:2rem; right:2rem; bottom:3.25rem; height:2px; background:rgba(255,255,255,.12); }
.story-progress span { display:block; height:100%; width:calc(var(--story-progress) * 100%); background:linear-gradient(90deg,#5eead4,#8179ff); box-shadow:0 0 14px rgba(94,234,212,.5); }
.story-caption { position:absolute; left:2rem; bottom:1.4rem; color:rgba(255,255,255,.52); font-size:.69rem; letter-spacing:.03em; }

/* Showcase depth */
#showcase { position:relative; overflow:hidden; }
#showcase::before { content:""; position:absolute; width:520px; height:520px; left:50%; top:18%; transform:translateX(-50%); border-radius:50%; background:rgba(79,70,229,.08); filter:blur(100px); pointer-events:none; }
.showcase-tabs,
.showcase-content { display:none !important; }
.showcase-tabs { position:relative; z-index:3; border:0; }
.tab-btn { border:1px solid transparent; }
.tab-btn.active { box-shadow:0 10px 26px rgba(79,70,229,.2); }
.showcase-content.active { position:relative; z-index:2; perspective:1300px; animation:showcase-enter 650ms var(--ease-cinematic) both; }
.showcase-content.active::before,
.showcase-content.active::after { content:""; position:absolute; inset:18px 22px -18px; z-index:-1; border:1px solid rgba(79,70,229,.12); border-radius:22px; background:rgba(255,255,255,.58); transform:translateZ(-70px) rotateX(2deg); box-shadow:0 24px 55px rgba(15,23,42,.06); }
.showcase-content.active::after { inset:34px 44px -34px; z-index:-2; opacity:.55; transform:translateZ(-130px) rotateX(3deg); }
.showcase-content.active .mock-landing,
.showcase-content.active .mock-social { transform:rotateX(var(--showcase-x, 0deg)) rotateY(var(--showcase-y, 0deg)); transform-style:preserve-3d; transition:transform 180ms ease-out, box-shadow 250ms ease; }
.showcase-content.active .mock-social { transform:translateZ(22px) rotateX(var(--showcase-x, 0deg)) rotateY(var(--showcase-y, 0deg)); }
@keyframes showcase-enter { from { opacity:0; transform:translateY(22px) scale(.985); } to { opacity:1; transform:none; } }

.channel-showcase {
  --showcase-x: 0deg;
  --showcase-y: 0deg;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
  align-items: start;
  perspective: 1500px;
  transform-style: preserve-3d;
}

.channel-card {
  min-height: 500px;
  padding: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.9);
  border-radius: 22px;
  background: rgba(255,255,255,.9);
  box-shadow: 0 25px 60px rgba(30,41,59,.1);
  transform-style: preserve-3d;
  transition: transform 260ms ease-out, box-shadow 260ms ease;
}

.channel-card-plan {
  transform: translateY(20px) rotateX(var(--showcase-x)) rotateY(calc(var(--showcase-y) + 3deg));
}

.channel-card-post {
  z-index: 2;
  transform: translateZ(32px) rotateX(var(--showcase-x)) rotateY(var(--showcase-y));
  box-shadow: 0 34px 74px rgba(79,70,229,.16);
}

.channel-card-ready {
  transform: translateY(20px) rotateX(var(--showcase-x)) rotateY(calc(var(--showcase-y) - 3deg));
}

.channel-card-head {
  display: grid;
  grid-template-columns: 38px minmax(0,1fr) auto;
  gap: .7rem;
  align-items: start;
  padding-bottom: 1rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--color-border);
}

.channel-card-index {
  display:grid;
  place-items:center;
  width:38px;
  height:38px;
  border-radius:11px;
  color:#fff;
  background:linear-gradient(135deg,#655df0,#4338ca);
  font-size:.72rem;
  font-weight:700;
  box-shadow:0 9px 20px rgba(79,70,229,.22);
}

.channel-card-head small { display:block; margin-bottom:.2rem; color:#64748b; font-size:.62rem; font-weight:700; letter-spacing:.09em; text-transform:uppercase; }
.channel-card-head h3 { font-size:1rem; line-height:1.18; }
.channel-card-status { padding:.28rem .48rem; border-radius:999px; color:#0f766e; background:#ccfbf1; font-size:.58rem; font-weight:700; white-space:nowrap; }
.channel-card-status-draft { color:#6d28d9; background:#ede9fe; }
.channel-card-status-live { display:flex; align-items:center; gap:.3rem; }
.channel-card-status-live i { width:6px; height:6px; border-radius:50%; background:#14b8a6; box-shadow:0 0 0 4px rgba(20,184,166,.12); }

.week-grid { display:grid; gap:.5rem; }
.week-grid > div { display:grid; grid-template-columns:32px 1fr auto; gap:.55rem; align-items:center; min-height:42px; padding:.55rem .65rem; border:1px solid #eef2f7; border-radius:10px; color:#475569; background:#f8fafc; font-size:.68rem; }
.week-grid b { color:#4f46e5; font-size:.62rem; }
.week-grid i { color:#94a3b8; font-size:.58rem; font-style:normal; }
.week-grid .week-active { color:#fff; border-color:transparent; background:linear-gradient(135deg,#5d55ed,#4338ca); box-shadow:0 12px 25px rgba(79,70,229,.2); transform:translateX(6px); }
.week-grid .week-active b,
.week-grid .week-active i { color:#e0e7ff; }

.post-preview { padding:1rem; border:1px solid #e8edf5; border-radius:16px; background:linear-gradient(180deg,#fff,#fafbff); box-shadow:inset 0 1px #fff; }
.post-author { display:flex; align-items:center; gap:.65rem; margin-bottom:1.2rem; }
.post-author > span { display:grid; place-items:center; width:38px; height:38px; border-radius:50%; color:#fff; background:linear-gradient(135deg,#5d55ed,#8b85ff); font-weight:700; }
.post-author div { display:flex; flex-direction:column; }
.post-author b { font-size:.72rem; }
.post-author small { color:#94a3b8; font-size:.58rem; }
.post-preview h4 { margin-bottom:.8rem; font-family:var(--font-headings); font-size:1.05rem; line-height:1.25; }
.post-preview p { color:#475569; font-size:.75rem; line-height:1.65; }
.post-tags { display:flex; flex-wrap:wrap; gap:.4rem; margin-top:1.1rem; }
.post-tags span { padding:.3rem .5rem; border-radius:8px; color:#4f46e5; background:#eef2ff; font-size:.58rem; font-weight:600; }

.channel-cover { height:115px; display:grid; place-items:center; margin:-.1rem -.1rem 1rem; border-radius:15px; background:radial-gradient(circle at 30% 20%,rgba(94,234,212,.55),transparent 28%),linear-gradient(135deg,#1d2348,#4f46e5); }
.channel-cover span { display:grid; place-items:center; width:58px; height:58px; border:1px solid rgba(255,255,255,.45); border-radius:50%; color:#fff; background:rgba(255,255,255,.14); font-size:1.45rem; font-weight:700; box-shadow:0 16px 30px rgba(0,0,0,.2); backdrop-filter:blur(10px); }
.channel-meta { margin-bottom:1rem; }
.channel-meta h4 { font-family:var(--font-headings); font-size:1rem; }
.channel-meta p { color:#64748b; font-size:.65rem; }
.schedule-list { display:grid; gap:.65rem; }
.schedule-list > div { display:grid; gap:.24rem; padding:.7rem; border:1px solid #edf1f7; border-radius:11px; background:#f8fafc; }
.schedule-list span { color:#64748b; font-size:.56rem; }
.schedule-list b { font-size:.68rem; line-height:1.25; }
.schedule-list i { justify-self:start; color:#0f766e; font-size:.55rem; font-style:normal; font-weight:700; }
.schedule-list > div:last-child i { color:#4f46e5; }

.channel-showcase-note { display:flex; justify-content:center; align-items:center; gap:.55rem; margin-top:2.5rem; color:#64748b; font-size:.75rem; }
.channel-showcase-note span { width:7px; height:7px; border-radius:50%; background:#5eead4; box-shadow:0 0 0 5px rgba(94,234,212,.14); }

/* Cursor light and final gradient mesh */
.cursor-light {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 90;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(circle, rgba(99,102,241,.1), transparent 68%);
  transform: translate3d(calc(var(--cursor-x, -300px) - 50%), calc(var(--cursor-y, -300px) - 50%), 0);
  transition: opacity 300ms ease;
  mix-blend-mode: multiply;
}

.has-fine-pointer .cursor-light { opacity:1; }

.outro::after {
  content:"";
  position:absolute;
  inset:-45%;
  pointer-events:none;
  background: conic-gradient(from 110deg, transparent, rgba(94,234,212,.22), transparent 32%, rgba(129,121,255,.28), transparent 68%);
  animation:mesh-drift 16s linear infinite;
}

.outro .container { position:relative; z-index:2; }
@keyframes mesh-drift { to { transform:rotate(360deg) scale(1.08); } }

@media (max-width: 1024px) {
  .hero-grid { grid-template-columns:minmax(0,.95fr) minmax(430px,1.05fr); gap:2.5rem; }
  .hero-visual { min-height:560px; transform:scale(.92); transform-origin:center right; }
  .result-card-week { right:-1%; }
  .result-card-post { left:-2%; }
  .steps-cinematic { grid-template-columns:minmax(280px,.85fr) minmax(420px,1.15fr); gap:2rem; }
  .story-output-week { left:4%; }
  .story-output-post { right:4%; }
  .story-output-channel { right:5%; }
  .channel-showcase { gap:.8rem; }
  .channel-card { min-height:485px; padding:1rem; }
  .channel-card-head { grid-template-columns:34px minmax(0,1fr); }
  .channel-card-status { display:none; }
}

@media (max-width: 900px) {
  .hero-grid {
    grid-template-columns: 1fr;
    gap: 3rem;
  }
  .hero-content {
    max-width: 680px;
  }
  .hero-title {
    max-width: 650px;
  }
  .hero-visual {
    width: min(100%, 620px);
    min-height: 560px;
    margin-inline: auto;
    transform: none;
  }
  .hero-visual::before {
    inset: 0;
    border-radius: 30px;
  }
  .steps-cinematic {
    display: block;
    min-height: 0;
  }
  .steps-timeline {
    padding-bottom: 0;
  }
  .step-item {
    min-height: auto;
    margin-bottom: 1.5rem;
  }
  .step-item.is-active .step-content {
    transform: none;
  }
  .story-stage {
    position: relative;
    top: auto;
    width: min(100%, 620px);
    margin: 2.5rem auto 0;
  }
  .channel-showcase {
    grid-template-columns: 1fr;
    max-width: 620px;
    margin-inline: auto;
    gap: 1rem;
  }
  .channel-card,
  .channel-card-plan,
  .channel-card-post,
  .channel-card-ready {
    min-height: 0;
    transform: none;
  }
  .channel-card-status {
    display: flex;
    justify-self: end;
    align-self: start;
  }
  .channel-card-head {
    grid-template-columns: 34px minmax(0,1fr) auto;
  }
}

@media (max-width: 520px) {
  .channel-card-head {
    grid-template-columns: 34px minmax(0,1fr);
  }
  .channel-card-status {
    grid-column: 2;
    grid-row: 2;
    justify-self: start;
    margin-top: .1rem;
  }
}

@media (max-width: 768px) {
  .hero { min-height:auto; padding:3.5rem 0 4.5rem; }
  .hero-grid { grid-template-columns:1fr; gap:2.75rem; }
  .hero-title { font-size:clamp(2.55rem,12vw,3.5rem); }
  .hero-text { font-size:1rem; }
  .hero-visual { min-height:510px; transform:none; }
  .hero-webgl { inset:-4% -14%; width:128%; height:108%; }
  .hero-visual .tg-mockup { width:min(340px,82%); height:440px; }
  .hero-orbit-one { width:420px; height:420px; left:50%; transform:translateX(-50%) rotateX(64deg); }
  .hero-orbit-two { left:50%; transform:translateX(-50%) rotateX(62deg); }
  .result-card { min-width:150px; padding:.66rem; }
  .result-card-week { right:1.25rem; top:9%; }
  .result-card-post { left:1.25rem; bottom:14%; }
  .result-card-channel { right:1.25rem; bottom:1%; }
  .scene-status { display:none; }
  .steps-cinematic { display:block; }
  .steps-cinematic { min-height:0; padding-bottom:0; }
  .steps-timeline { padding-bottom:0; }
  .step-item { min-height:auto; margin-bottom:1.5rem; }
  .step-item.is-active .step-content { transform:none; }
  .story-stage { position:relative; top:auto; height:520px; margin-top:2.5rem; }
  .story-output-week { width:185px; height:160px; left:4%; }
  .story-output-post { width:150px; height:150px; right:4%; }
  .story-output-channel { width:180px; height:160px; right:5%; }
  .story-phone { width:260px; height:360px; }
  .showcase-content.active::before,
  .showcase-content.active::after { display:none; }
  .channel-showcase { grid-template-columns:1fr; gap:1rem; }
  .channel-card { min-height:0; transform:none; }
  .channel-card-plan,
  .channel-card-post,
  .channel-card-ready { transform:none; }
  .channel-card-status { display:flex; }
  .cursor-light { display:none; }
  .mobile-sticky-bar {
    display:block;
    visibility:hidden;
    pointer-events:none;
    opacity:0;
    transform:translateY(110%);
    transition:opacity 260ms ease, transform 380ms var(--ease-cinematic), visibility 0s linear 380ms;
  }
  .mobile-sticky-bar.is-visible {
    visibility:visible;
    pointer-events:auto;
    opacity:1;
    transform:translateY(0);
    transition-delay:0s;
  }
}

@media (max-width: 440px) {
  .hero-proof { gap:.55rem .8rem; }
  .hero-visual { min-height:470px; margin-inline:auto; }
  .hero-visual .tg-mockup { width:78%; height:405px; }
  .hero-visual .tg-chat { padding:.75rem; gap:.65rem; }
  .hero-visual .tg-bubble { font-size:.71rem; padding:.65rem .75rem; }
  .result-card { min-width:135px; grid-template-columns:29px 1fr; column-gap:.5rem; }
  .result-card .result-icon { width:29px; height:29px; }
  .result-card strong { font-size:.72rem; }
  .result-card small { font-size:.59rem; }
  .scene-status { font-size:.57rem; }
  .story-stage { height:470px; border-radius:22px; }
  .story-phone { width:230px; height:330px; }
  .story-stage[data-step="2"] .story-phone { width:205px; height:300px; left:25%; }
  .story-stage[data-step="3"] .story-phone { width:170px; height:255px; left:19%; }
  .story-output-week { width:160px; height:145px; }
  .story-output-post { width:132px; height:138px; }
  .story-output-channel { width:160px; height:145px; bottom:16%; }
  .story-caption { right:1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-webgl { display:none; }
  .hero-visual .tg-mockup { transform:translate(-50%, -50%) rotateZ(-1deg); transition:none; }
  .result-card,
  .story-phone,
  .story-output,
  .channel-card,
  .showcase-content.active .mock-landing,
  .showcase-content.active .mock-social { transition:none; transform:none; }
  .story-stage { position:relative; top:auto; }
  .story-stage .story-phone { left:50%; opacity:.48; }
  .story-stage .story-output-week,
  .story-stage .story-output-post,
  .story-stage .story-output-channel { opacity:1; transform:none; }
  .scene-status i,
  .outro::after { animation:none; }
  .motion-ready [data-reveal] { opacity:1; transform:none; transition:none; }
}

/* ========================================================================== 
   Reversible problem cards: character stories that flip on scroll
   ========================================================================== */
.pains-grid {
  align-items: start;
  gap: 1.25rem;
}

.pain-card.flip-card {
  --flip-accent: #655df0;
  --flip-accent-soft: #e8e7ff;
  display: block;
  height: 570px;
  min-height: 0;
  padding: 0;
  overflow: visible;
  border: 0;
  border-radius: 30px;
  background: transparent;
  box-shadow: none;
  perspective: 1500px;
  isolation: isolate;
}

.pain-card.flip-card-copy {
  --flip-accent: #8b5cf6;
  --flip-accent-soft: #f0e7ff;
}

.pain-card.flip-card-cost {
  --flip-accent: #0f9f94;
  --flip-accent-soft: #dcf7f3;
}

.pain-card.flip-card::before,
.pain-card.flip-card::after {
  content: none !important;
}

.pain-card.flip-card:hover {
  transform: none;
  border-color: transparent;
  box-shadow: none;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform: none;
}

.flip-card.is-solved .flip-card-inner {
  transform: none;
}

.pain-face {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  overflow: hidden;
  padding: 1.25rem;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 30px;
  box-shadow: 0 22px 58px rgba(30,41,59,.09), inset 0 1px rgba(255,255,255,.85);
  transition:
    opacity 360ms ease,
    transform 520ms cubic-bezier(.2,.78,.2,1),
    visibility 0s;
  will-change: opacity, transform;
}

.pain-face::before {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  top: -160px;
  right: -100px;
  border-radius: 50%;
  background: var(--flip-accent);
  opacity: .11;
  pointer-events: none;
}

.pain-face-problem {
  color: var(--color-text);
  background: linear-gradient(160deg,#fff 0%,#fbfcff 62%,#f5f7fb 100%);
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.pain-face-solved {
  color: #fff;
  border-color: rgba(255,255,255,.12);
  background:
    radial-gradient(circle at 85% 8%, color-mix(in srgb,var(--flip-accent) 72%,white), transparent 34%),
    linear-gradient(150deg,#191b38 0%,#11142d 72%,#0e1228 100%);
  box-shadow: 0 28px 70px rgba(30,41,59,.2), inset 0 1px rgba(255,255,255,.1);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.985);
}

.flip-card.is-solved .pain-face-problem {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px) scale(.985);
}

.flip-card.is-solved .pain-face-solved {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.pain-face-solved::before {
  top: auto;
  right: auto;
  left: -110px;
  bottom: -170px;
  opacity: .2;
  filter: blur(8px);
}

.pain-face-top {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 34px;
  gap: .75rem;
}

.pain-face-top span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 .7rem;
  border-radius: 10px;
  color: #fff;
  background: var(--flip-accent);
  box-shadow: 0 8px 18px color-mix(in srgb,var(--flip-accent) 24%,transparent);
  font-size: .61rem;
  font-weight: 760;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.pain-face-top b {
  color: #64748b;
  font-size: .62rem;
  font-weight: 720;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.pain-face-solved .pain-face-top span {
  color: #052e2b;
  background: #5eead4;
  box-shadow: 0 8px 24px rgba(45,212,191,.2);
}

.pain-face-solved .pain-face-top b { color: #a5b4fc; }

.character-scene {
  position: relative;
  z-index: 2;
  flex: 0 0 200px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb,var(--flip-accent) 12%,transparent);
  border-radius: 22px;
  background:
    radial-gradient(circle at 50% 115%,color-mix(in srgb,var(--flip-accent) 22%,white),transparent 52%),
    linear-gradient(150deg,#f8f9ff,#eef1fb);
}

.character-scene::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 8px;
  width: 150px;
  height: 18px;
  border-radius: 50%;
  background: rgba(30,41,59,.1);
  filter: blur(7px);
  transform: translateX(-50%);
}

.pain-face-solved .character-scene {
  border-color: rgba(255,255,255,.1);
  background:
    radial-gradient(circle at 50% 115%,color-mix(in srgb,var(--flip-accent) 50%,transparent),transparent 55%),
    linear-gradient(150deg,rgba(255,255,255,.11),rgba(255,255,255,.035));
  box-shadow: inset 0 1px rgba(255,255,255,.07);
}

.pain-character {
  position: absolute;
  z-index: 3;
  left: 50%;
  bottom: 10px;
  width: 108px;
  height: 165px;
  transform: translateX(-50%);
}

.character-head {
  position: absolute;
  z-index: 4;
  top: 18px;
  left: 28px;
  width: 54px;
  height: 58px;
  border-radius: 46% 46% 48% 48%;
  background: #ffd7c2;
  box-shadow: inset -6px -6px rgba(231,164,140,.14);
}

.character-hair {
  position: absolute;
  z-index: 5;
  top: 10px;
  left: 25px;
  width: 59px;
  height: 30px;
  border-radius: 52% 55% 24% 26%;
  background: #28334d;
  transform: rotate(-3deg);
}

.character-hair::after {
  content: "";
  position: absolute;
  right: -2px;
  bottom: -15px;
  width: 13px;
  height: 30px;
  border-radius: 8px;
  background: #28334d;
  transform: rotate(-8deg);
}

.character-head i {
  position: absolute;
  top: 27px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #243047;
}

.character-head i:first-child { left: 14px; }
.character-head i:nth-child(2) { right: 14px; }
.character-head b {
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 17px;
  height: 8px;
  border-top: 2px solid #8f4f4d;
  border-radius: 50%;
  transform: translateX(-50%);
}

.character-body {
  position: absolute;
  z-index: 2;
  left: 18px;
  bottom: 0;
  width: 74px;
  height: 96px;
  border-radius: 36px 36px 14px 14px;
  background: linear-gradient(150deg,var(--flip-accent),color-mix(in srgb,var(--flip-accent) 65%,#27306d));
  box-shadow: inset -9px -6px rgba(20,25,60,.12);
}

.character-arm {
  position: absolute;
  z-index: 1;
  top: 86px;
  width: 18px;
  height: 64px;
  border-radius: 12px;
  background: var(--flip-accent);
  transform-origin: 50% 10px;
}

.arm-left { left: 15px; transform: rotate(23deg); }
.arm-right { right: 13px; transform: rotate(-23deg); }
.character-stressed { transform: translateX(-50%) rotate(-2deg); }
.character-stressed .character-head i { height: 3px; border-radius: 2px; transform: rotate(12deg); }
.character-stressed .character-head i:nth-child(2) { transform: rotate(-12deg); }

.character-happy { left: 58%; transform: translateX(-50%) rotate(2deg); }
.character-happy .character-head b {
  height: 9px;
  border-top: 0;
  border-bottom: 3px solid #8f4f4d;
}
.character-happy .character-body,
.character-happy .character-arm { background: linear-gradient(150deg,#2dd4bf,#0f9f94); }
.character-happy .arm-left { transform: rotate(42deg); }
.character-happy .arm-right { transform: rotate(-48deg); }

.scene-note,
.role-bubble {
  position: absolute;
  z-index: 4;
  padding: .38rem .55rem;
  border: 1px solid rgba(99,91,240,.15);
  border-radius: 9px;
  color: #5b6478;
  background: rgba(255,255,255,.9);
  box-shadow: 0 8px 18px rgba(30,41,59,.08);
  font-size: .55rem;
  font-weight: 700;
}

.note-one { top: 26px; left: 17px; transform: rotate(-5deg); }
.note-two { top: 48px; right: 14px; transform: rotate(5deg); }
.note-three { left: 22px; bottom: 24px; transform: rotate(3deg); }
.scene-clock { position:absolute; z-index:4; right:18px; bottom:22px; display:grid; place-items:center; width:48px; height:48px; border:4px solid #fda4af; border-radius:50%; color:#be123c; background:#fff; font-size:.65rem; font-weight:800; box-shadow:0 8px 18px rgba(190,18,60,.13); }

.empty-editor {
  position: absolute;
  z-index: 1;
  left: 17px;
  right: 17px;
  top: 18px;
  height: 96px;
  padding: 1.1rem .8rem;
  border: 1px solid rgba(99,91,240,.12);
  border-radius: 13px;
  background: rgba(255,255,255,.82);
  box-shadow: 0 12px 28px rgba(30,41,59,.07);
}
.empty-editor span { display:block; width:58%; height:6px; margin-bottom:9px; border-radius:4px; background:#e2e8f0; }
.empty-editor span:nth-child(2) { width:34%; }
.empty-editor b { position:absolute; top:10px; right:10px; color:#fb7185; font-size:.54rem; }
.character-scene-copy .pain-character { bottom:-10px; transform:translateX(-50%) scale(.9); }
.character-scene-copy .note-one { top:112px; left:10px; }
.character-scene-copy .note-two { top:128px; right:9px; }

.role-one { top:23px; left:13px; transform:rotate(-5deg); }
.role-two { top:36px; right:11px; transform:rotate(5deg); }
.role-three { left:17px; bottom:24px; transform:rotate(3deg); }
.character-scene-cost .pain-character { transform:translateX(-50%) scale(.94); }

.solved-calendar {
  position: absolute;
  z-index: 4;
  left: 18px;
  top: 31px;
  display: grid;
  gap: 7px;
  width: 102px;
  padding: 11px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 14px;
  background: rgba(255,255,255,.1);
  box-shadow: 0 16px 28px rgba(0,0,0,.14);
  transform: rotate(-4deg);
}
.solved-calendar span { display:flex; justify-content:space-between; padding:.35rem .42rem; border-radius:7px; color:#e0e7ff; background:rgba(255,255,255,.08); font-size:.53rem; font-weight:700; }
.solved-calendar i { color:#5eead4; font-style:normal; }
.scene-spark { position:absolute; z-index:5; color:#fef08a; text-shadow:0 0 16px rgba(254,240,138,.7); }
.spark-one { top:25px; right:21px; font-size:1.1rem; }
.spark-two { right:34px; bottom:29px; font-size:.7rem; }

.ready-post {
  position: absolute;
  z-index: 4;
  left: 14px;
  top: 25px;
  width: 118px;
  height: 145px;
  padding: .7rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 14px;
  color:#fff;
  background: rgba(255,255,255,.1);
  box-shadow: 0 16px 30px rgba(0,0,0,.15);
  transform: rotate(-4deg);
}
.ready-post > i { display:block; width:22px; height:22px; margin-bottom:.6rem; border-radius:8px; background:#818cf8; }
.ready-post strong { display:block; margin-bottom:.7rem; font-size:.61rem; }
.ready-post > span { display:block; width:92%; height:5px; margin-bottom:6px; border-radius:4px; background:rgba(255,255,255,.3); }
.ready-post > span:nth-of-type(2) { width:78%; }
.ready-post > span:nth-of-type(3) { width:55%; }
.ready-post b { position:absolute; left:10px; bottom:9px; color:#5eead4; font-size:.52rem; }

.advexo-orb {
  position: absolute;
  z-index: 4;
  left: 15px;
  top: 24px;
  display: grid;
  grid-template-columns: 42px 1fr;
  align-items: center;
  gap: 5px 8px;
  width: 135px;
  padding: .7rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 16px;
  background: rgba(255,255,255,.1);
  box-shadow: 0 16px 30px rgba(0,0,0,.15);
  transform: rotate(-4deg);
}
.advexo-orb span { grid-row:1/4; display:grid; place-items:center; width:42px; height:42px; border-radius:14px; color:#fff; background:linear-gradient(145deg,#655df0,#8b5cf6); font-size:1rem; font-weight:800; }
.advexo-orb i { color:#cbd5e1; font-size:.5rem; font-style:normal; font-weight:650; }

.flip-card .pain-copy {
  position: relative;
  z-index: 3;
  padding: .15rem .2rem 0;
}

.flip-card .pain-title {
  max-width: 18ch;
  margin: 0 0 .65rem;
  color: var(--color-text);
  font-size: 1.42rem;
  line-height: 1.12;
  letter-spacing: -.035em;
}

.flip-card .pain-desc {
  margin: 0;
  color: #64748b;
  font-size: .83rem;
  line-height: 1.52;
}

.pain-face-solved .pain-title { max-width: 20ch; color:#fff; }
.pain-face-solved .pain-desc { color:#b8c0d6; }
.solved-label { display:block; margin-bottom:.38rem; color:#5eead4; font-size:.58rem; font-weight:780; letter-spacing:.08em; text-transform:uppercase; }

.pain-flip-hint {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: .55rem;
  margin-top: auto;
  padding-top: .85rem;
  border-top: 1px solid #e7eaf1;
  color: #8a94a8;
  font-size: .62rem;
  font-weight: 650;
}
.pain-flip-hint span { display:grid; place-items:center; width:25px; height:25px; border-radius:9px; color:var(--flip-accent); background:var(--flip-accent-soft); font-size:.75rem; }

.solved-tags {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: .38rem;
  margin-top: auto;
  padding-top: .85rem;
  border-top: 1px solid rgba(255,255,255,.1);
}
.solved-tags span { padding:.34rem .5rem; border:1px solid rgba(94,234,212,.16); border-radius:8px; color:#99f6e4; background:rgba(45,212,191,.08); font-size:.54rem; font-weight:700; }

@media (max-width: 1100px) and (min-width: 769px) {
  .pain-card.flip-card { height: 585px; }
  .pain-face { gap: .85rem; padding: 1rem; }
  .character-scene { flex-basis: 190px; }
  .flip-card .pain-title { font-size: 1.24rem; }
  .flip-card .pain-desc { font-size: .78rem; }
  .pain-face-top b { font-size: .54rem; }
  .pain-flip-hint { font-size: .54rem; }
}

@media (max-width: 768px) {
  .pains-grid { gap: 1.5rem; }
  .pain-card.flip-card { width: min(100%, 560px); height: 550px; margin-inline: auto; padding: 0; }
  .pain-face { padding: 1.2rem; }
  .character-scene { flex-basis: 205px; }
  .flip-card .pain-title { max-width: 25ch; font-size: 1.45rem; }
  .pain-face-solved .pain-title { max-width: 25ch; }
}

@media (max-width: 440px) {
  .pain-card.flip-card { height: 560px; }
  .pain-face { gap: .9rem; padding: 1rem; border-radius: 25px; }
  .character-scene { flex-basis: 195px; border-radius: 18px; }
  .flip-card .pain-title { font-size: 1.34rem; }
  .flip-card .pain-desc { font-size: .8rem; }
  .pain-face-top b { font-size: .55rem; }
  .pain-flip-hint { font-size: .57rem; }
}

@media (prefers-reduced-motion: reduce) {
  .flip-card-inner { transition: none; }
}

/* Horizontal editorial layout for reversible character cards */
.pains-grid {
  grid-template-columns: 1fr;
  width: min(100%, 1060px);
  margin-inline: auto;
  gap: 1.75rem;
}

.pain-card.flip-card {
  height: 370px;
  border-radius: 26px;
  perspective: 1800px;
}

.pain-face {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 38%);
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: .8rem 2.25rem;
  padding: 1.65rem 2rem;
  overflow: hidden;
  border: 1px solid rgba(148,163,184,.2);
  border-radius: 26px;
  background: rgba(255,255,255,.92);
  box-shadow: 0 18px 55px rgba(30,41,59,.075), inset 0 1px rgba(255,255,255,.9);
}

.pain-face::before {
  width: 3px;
  height: auto;
  inset: 30px auto 30px 0;
  border-radius: 0 4px 4px 0;
  background: linear-gradient(to bottom, transparent, var(--flip-accent), transparent);
  opacity: .8;
  filter: none;
}

.pain-face::after {
  position: absolute;
  right: 3.8rem;
  bottom: -1.1rem;
  color: var(--flip-accent);
  opacity: .055;
  font-size: 9rem;
  font-weight: 820;
  line-height: 1;
  letter-spacing: -.1em;
  pointer-events: none;
}

.flip-card-plan .pain-face::after { content: "01"; }
.flip-card-copy .pain-face::after { content: "02"; right:auto; left:3.8rem; }
.flip-card-cost .pain-face::after { content: "03"; }

.pain-face-problem {
  background: linear-gradient(105deg,rgba(255,255,255,.98),rgba(248,250,255,.9));
}

.pain-face-solved {
  color: var(--color-text);
  border-color: rgba(15,159,148,.18);
  background: linear-gradient(105deg,#fff,rgba(240,253,250,.86));
  box-shadow: 0 22px 62px rgba(15,118,110,.1), inset 0 1px rgba(255,255,255,.9);
}

.pain-face-solved::before {
  width: 3px;
  height: auto;
  inset: 30px auto 30px 0;
  background: linear-gradient(to bottom,transparent,#2dd4bf,transparent);
  opacity: .9;
  filter: none;
}

.pain-face-solved .pain-face-top b { color:#0f766e; }
.pain-face-solved .pain-title { color:var(--color-text); }
.pain-face-solved .pain-desc { color:#64748b; }

.pain-face-top {
  grid-column: 1;
  grid-row: 1;
  align-self: start;
  justify-content: flex-start;
  gap: .65rem;
}

.pain-face-top b {
  padding-left: .65rem;
  border-left: 1px solid #e2e8f0;
}

.flip-card .pain-copy {
  grid-column: 1;
  grid-row: 2;
  align-self: center;
  max-width: 580px;
  padding: 0;
}

.flip-card .pain-title {
  max-width: 18ch;
  margin-bottom: .75rem;
  font-size: clamp(1.65rem,2.2vw,2.15rem);
  line-height: 1.04;
  letter-spacing: -.045em;
}

.flip-card .pain-desc {
  max-width: 57ch;
  font-size: .92rem;
  line-height: 1.58;
}

.pain-flip-hint,
.solved-tags {
  grid-column: 1;
  grid-row: 3;
  align-self: end;
  margin: 0;
  padding-top: .72rem;
}

.character-scene {
  grid-column: 2;
  grid-row: 1 / 4;
  align-self: stretch;
  width: 100%;
  height: 100%;
  min-height: 0;
  overflow: visible;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.character-scene::before {
  content: "";
  position: absolute;
  z-index: 0;
  left: 50%;
  top: 50%;
  width: 185px;
  height: 185px;
  border: 1px solid color-mix(in srgb,var(--flip-accent) 16%,transparent);
  border-radius: 50%;
  transform: translate(-50%,-50%);
}

.character-scene::after {
  left: 50%;
  bottom: 22px;
  width: 180px;
  height: 17px;
  background: rgba(30,41,59,.11);
  filter: blur(9px);
}

.pain-character {
  bottom: 27px;
  transform: translateX(-50%) scale(1.15);
  transform-origin: 50% 100%;
}

.character-stressed { transform:translateX(-50%) scale(1.15) rotate(-2deg); }
.character-happy { left:55%; transform:translateX(-50%) scale(1.15) rotate(2deg); }
.character-scene-copy .pain-character { bottom:18px; transform:translateX(-50%) scale(1.05); }
.character-scene-cost .pain-character { bottom:25px; transform:translateX(-50%) scale(1.08); }

.pain-character::before,
.pain-character::after {
  content: "";
  position: absolute;
  z-index: 0;
  bottom: -27px;
  width: 18px;
  height: 42px;
  border-radius: 9px 9px 6px 6px;
  background: #33405b;
  box-shadow: inset 0 -8px #202a41;
}
.pain-character::before { left:27px; transform:rotate(2deg); }
.pain-character::after { right:25px; transform:rotate(-2deg); }

.character-head::before {
  content: "";
  position: absolute;
  left: -4px;
  top: 27px;
  width: 8px;
  height: 13px;
  border-radius: 50%;
  background: #f4bea7;
  box-shadow: 54px 0 #f4bea7;
}
.character-head::after {
  content: "";
  position: absolute;
  left: 26px;
  top: 31px;
  width: 4px;
  height: 6px;
  border-radius: 50%;
  border-right: 1px solid rgba(143,79,77,.45);
  transform:rotate(12deg);
}
.character-arm::after {
  content:"";
  position:absolute;
  left:2px;
  bottom:-5px;
  width:14px;
  height:14px;
  border-radius:50%;
  background:#ffd7c2;
}

.scene-note,
.role-bubble {
  padding: .42rem .62rem;
  border: 1px solid rgba(99,91,240,.13);
  border-radius: 4px 10px 10px 10px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 10px 24px rgba(30,41,59,.08);
  font-size: .58rem;
}

.scene-clock { right:8px; bottom:38px; }
.character-scene-copy .note-one { top:105px; left:0; }
.character-scene-copy .note-two { top:127px; right:0; }
.empty-editor {
  left: 18px;
  right: 18px;
  top: 15px;
  height: 88px;
  border: 0;
  background: rgba(255,255,255,.84);
  box-shadow: 0 13px 32px rgba(30,41,59,.08);
}

.solved-calendar,
.ready-post,
.advexo-orb {
  left: 0;
  top: 48px;
  transform: rotate(-5deg);
}

.pain-face-solved .character-scene {
  border: 0;
  background: transparent;
  box-shadow: none;
}
.pain-face-solved .character-scene::before { border-color:rgba(15,159,148,.2); }
.pain-face-solved .character-scene::after { background:rgba(15,118,110,.13); }
.pain-face-solved .solved-calendar,
.pain-face-solved .ready-post,
.pain-face-solved .advexo-orb {
  color:#334155;
  border-color:rgba(15,159,148,.15);
  background:rgba(255,255,255,.94);
  box-shadow:0 16px 34px rgba(15,118,110,.1);
}
.pain-face-solved .solved-calendar span { color:#475569; background:#f0fdfa; }
.pain-face-solved .ready-post strong { color:#27324a; }
.pain-face-solved .ready-post > span { background:#cbd5e1; }
.pain-face-solved .ready-post b { color:#0f9f94; }
.pain-face-solved .advexo-orb i { color:#64748b; }
.pain-face-solved .scene-spark { color:#f59e0b; text-shadow:0 0 14px rgba(245,158,11,.25); }

.pain-face-solved .solved-label { color:#0f9f94; }
.pain-face-solved .solved-tags { border-top-color:#dbe7e5; }
.pain-face-solved .solved-tags span { color:#0f766e; border-color:#bce9e3; background:#ecfdf9; }

.flip-card-copy .pain-face {
  grid-template-columns: minmax(280px,38%) minmax(0,1fr);
}
.flip-card-copy .character-scene { grid-column:1; }
.flip-card-copy .pain-face-top,
.flip-card-copy .pain-copy,
.flip-card-copy .pain-flip-hint,
.flip-card-copy .solved-tags { grid-column:2; }
.flip-card-copy .pain-face::before { inset:30px 0 30px auto; border-radius:4px 0 0 4px; }
.flip-card-copy.is-solved .flip-card-inner { transform:none; }
.flip-card-copy .pain-face-solved { transform:translateY(12px) scale(.985); }
.flip-card-copy.is-solved .pain-face-solved { transform:none; }

@media (max-width: 900px) {
  .pain-card.flip-card { height: 390px; }
  .pain-face,
  .flip-card-copy .pain-face { grid-template-columns:minmax(0,1fr) minmax(210px,35%); padding:1.35rem 1.5rem; gap:.65rem 1.25rem; }
  .flip-card-copy .pain-face { grid-template-columns:minmax(210px,35%) minmax(0,1fr); }
  .flip-card .pain-title { font-size:clamp(1.45rem,3vw,1.85rem); }
  .flip-card .pain-desc { font-size:.84rem; }
}

@media (max-width: 600px) {
  .pains-grid { gap:1.15rem; }
  .pain-card.flip-card { width:100%; height:430px; }
  .pain-face,
  .flip-card-copy .pain-face {
    grid-template-columns:minmax(0,1fr) 112px;
    gap:.55rem .55rem;
    padding:1rem;
    border-radius:22px;
  }
  .flip-card-copy .pain-face { grid-template-columns:112px minmax(0,1fr); }
  .pain-face::after { right:.8rem; bottom:.2rem; font-size:5rem; }
  .flip-card-copy .pain-face::after { left:.8rem; }
  .pain-face-top { min-height:28px; gap:.35rem; }
  .pain-face-top span { min-height:27px; padding:0 .52rem; font-size:.52rem; }
  .pain-face-top b { padding-left:.4rem; font-size:.48rem; letter-spacing:.05em; }
  .flip-card .pain-copy { align-self:start; padding-top:.15rem; }
  .flip-card .pain-title { max-width:16ch; margin-bottom:.55rem; font-size:1.23rem; line-height:1.06; }
  .flip-card .pain-desc { font-size:.72rem; line-height:1.48; }
  .pain-flip-hint { gap:.35rem; font-size:.5rem; }
  .pain-flip-hint span { width:22px; height:22px; }
  .solved-tags { gap:.28rem; }
  .solved-tags span { padding:.27rem .36rem; font-size:.46rem; }
  .character-scene { overflow:visible; }
  .character-scene::before { width:105px; height:105px; }
  .character-scene::after { width:100px; bottom:45px; }
  .pain-character,
  .character-stressed { bottom:70px; transform:translateX(-50%) scale(.78); }
  .character-happy { left:50%; bottom:70px; transform:translateX(-50%) scale(.78) rotate(2deg); }
  .character-scene-copy .pain-character,
  .character-scene-cost .pain-character { bottom:66px; transform:translateX(-50%) scale(.72); }
  .scene-note,
  .role-bubble { padding:.3rem .38rem; font-size:.43rem; }
  .note-one { top:65px; left:-4px; }
  .note-two { top:82px; right:-4px; }
  .note-three { left:-2px; bottom:58px; }
  .scene-clock { right:-2px; bottom:58px; width:37px; height:37px; border-width:3px; font-size:.5rem; }
  .empty-editor { left:0; right:0; top:52px; height:69px; padding:.8rem .55rem; }
  .character-scene-copy .note-one { top:118px; left:-3px; }
  .character-scene-copy .note-two { top:140px; right:-3px; }
  .role-one { top:72px; left:-4px; }
  .role-two { top:92px; right:-4px; }
  .role-three { left:-4px; bottom:62px; }
  .solved-calendar,
  .ready-post,
  .advexo-orb { left:-4px; top:73px; transform:rotate(-5deg) scale(.72); transform-origin:0 0; }
  .scene-spark.spark-one { top:67px; right:0; }
  .scene-spark.spark-two { right:5px; bottom:75px; }
}

/* Compact prop-only version: no characters, only the problem visualisation */
.pains-grid {
  width: min(100%, 960px);
  gap: 1.2rem;
}

.pain-card.flip-card {
  height: 285px;
}

.pain-face,
.flip-card-copy .pain-face {
  grid-template-columns: minmax(0,1fr) 255px;
  gap: .55rem 1.5rem;
  padding: 1.25rem 1.5rem;
}

.flip-card-copy .pain-face {
  grid-template-columns: 255px minmax(0,1fr);
}

.flip-card .pain-title {
  font-size: clamp(1.48rem,2vw,1.85rem);
}

.flip-card .pain-desc {
  font-size: .83rem;
  line-height: 1.5;
}

.character-scene::before {
  width: 160px;
  height: 160px;
  border-style: dashed;
  opacity: .78;
}

.character-scene::after {
  display: none;
}

.character-scene-plan .note-one { top:31px; left:7px; transform:rotate(-6deg); }
.character-scene-plan .note-two { top:48px; right:4px; transform:rotate(5deg); }
.character-scene-plan .note-three { left:26px; bottom:35px; transform:rotate(3deg); }
.character-scene-plan .scene-clock { right:32px; bottom:25px; width:50px; height:50px; }

.character-scene-copy .empty-editor {
  left: 10px;
  right: 10px;
  top: 23px;
  height: 112px;
  padding: 1.3rem .9rem;
}
.character-scene-copy .note-one { top:auto; bottom:31px; left:0; }
.character-scene-copy .note-two { top:auto; bottom:17px; right:0; }

.character-scene-cost .role-bubble {
  min-width: 96px;
  text-align: center;
}
.character-scene-cost .role-one { top:34px; left:3px; }
.character-scene-cost .role-two { top:78px; right:1px; }
.character-scene-cost .role-three { left:24px; bottom:35px; }

.solved-calendar {
  left: 50%;
  top: 36px;
  width: 150px;
  padding: 14px;
  gap: 9px;
  transform: translateX(-50%) rotate(-4deg);
}
.solved-calendar span { padding:.45rem .55rem; font-size:.6rem; }

.ready-post {
  left: 50%;
  top: 20px;
  width: 148px;
  height: 190px;
  padding: .9rem;
  transform: translateX(-50%) rotate(-4deg);
}
.ready-post > i { width:28px; height:28px; }
.ready-post strong { font-size:.68rem; }

.advexo-orb {
  left: 50%;
  top: 52px;
  width: 178px;
  padding: .9rem;
  transform: translateX(-50%) rotate(-4deg);
}
.advexo-orb span { width:48px; height:48px; }
.advexo-orb i { font-size:.57rem; }

.pain-face-solved .spark-one { top:23px; right:20px; }
.pain-face-solved .spark-two { right:25px; bottom:27px; }

@media (max-width: 900px) {
  .pain-card.flip-card { height: 300px; }
  .pain-face,
  .flip-card-copy .pain-face { grid-template-columns:minmax(0,1fr) 210px; padding:1.15rem 1.25rem; gap:.5rem 1rem; }
  .flip-card-copy .pain-face { grid-template-columns:210px minmax(0,1fr); }
  .flip-card .pain-title { font-size:1.45rem; }
}

@media (max-width: 600px) {
  .pains-grid { gap:.9rem; }
  .pain-card.flip-card { height: 340px; }
  .pain-face,
  .flip-card-copy .pain-face {
    grid-template-columns:minmax(0,1fr) 105px;
    gap:.45rem .45rem;
    padding:.9rem;
  }
  .flip-card-copy .pain-face { grid-template-columns:105px minmax(0,1fr); }
  .flip-card .pain-title { font-size:1.16rem; }
  .flip-card .pain-desc { font-size:.69rem; }
  .character-scene::before { width:92px; height:92px; }
  .scene-note,
  .role-bubble { padding:.28rem .35rem; font-size:.4rem; }
  .character-scene-plan .note-one { top:47px; left:-5px; }
  .character-scene-plan .note-two { top:82px; right:-4px; }
  .character-scene-plan .note-three { left:-2px; bottom:62px; }
  .character-scene-plan .scene-clock { right:1px; bottom:46px; width:36px; height:36px; font-size:.48rem; }
  .character-scene-copy .empty-editor { left:0; right:0; top:55px; height:75px; padding:.8rem .55rem; }
  .character-scene-copy .note-one { bottom:72px; left:-4px; }
  .character-scene-copy .note-two { bottom:50px; right:-4px; }
  .character-scene-cost .role-one { top:55px; left:-4px; }
  .character-scene-cost .role-two { top:98px; right:-4px; }
  .character-scene-cost .role-three { left:-4px; bottom:54px; }
  .character-scene-cost .role-bubble { min-width:72px; }
  .solved-calendar { top:70px; width:100px; padding:8px; gap:5px; transform:translateX(-50%) rotate(-4deg); }
  .solved-calendar span { padding:.28rem .33rem; font-size:.43rem; }
  .ready-post { top:54px; width:94px; height:145px; padding:.58rem; transform:translateX(-50%) rotate(-4deg); }
  .ready-post > i { width:20px; height:20px; }
  .ready-post strong { font-size:.5rem; }
  .advexo-orb { top:79px; width:105px; padding:.58rem; gap:4px 5px; transform:translateX(-50%) rotate(-4deg); }
  .advexo-orb span { width:34px; height:34px; font-size:.75rem; }
  .advexo-orb i { font-size:.4rem; }
}

/* Final minimal card content: state label, copy and visualisation only */
.pains-grid {
  width: min(100%, 920px);
  gap: 1rem;
}

.pain-card.flip-card {
  height: 250px;
}

.pain-face::after {
  content: none !important;
}

.pain-face,
.flip-card-copy .pain-face {
  grid-template-rows: auto minmax(0,1fr);
  padding: 1.1rem 1.35rem;
}

.character-scene {
  grid-row: 1 / 3;
}

.flip-card .pain-copy {
  grid-row: 2;
}

.ready-post {
  top: 17px;
  height: 165px;
}

@media (max-width: 900px) {
  .pain-card.flip-card { height: 265px; }
}

@media (max-width: 600px) {
  .pain-card.flip-card { height: 300px; }
  .pain-face,
  .flip-card-copy .pain-face { padding:.82rem; }
}

/* Text-only reversible cards */
.pains-grid {
  width: min(100%, 760px);
  gap: .85rem;
}

.pain-card.flip-card {
  height: 190px;
}

.pain-face,
.flip-card-copy .pain-face {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: .85rem;
  padding: 1.25rem 1.5rem;
}

.pain-face-top {
  min-height: 28px;
}

.flip-card .pain-copy {
  width: 100%;
  max-width: 620px;
  padding: 0;
}

.flip-card .pain-title {
  max-width: 24ch;
  margin-bottom: .55rem;
}

.flip-card .pain-desc {
  max-width: 66ch;
}

@media (max-width: 600px) {
  .pain-card.flip-card { height: 200px; }
  .pain-face,
  .flip-card-copy .pain-face { gap:.65rem; padding:1rem; }
}

/* Readable steps on narrow screens; the cinematic stage needs a parallel column. */
@media (max-width: 900px) {
  .steps-cinematic {
    display: block;
    min-height: 0;
    padding-bottom: 0;
  }

  .steps-timeline {
    padding-bottom: 0;
  }

  .story-stage {
    display: none;
  }
}

/* Extra scroll runway keeps the final solved state on screen long enough to read. */
@media (min-width: 901px) {
  .pains-grid {
    padding-bottom: clamp(5rem, 14vh, 8rem);
  }

  .steps-cinematic {
    padding-bottom: clamp(12rem, 28vh, 18rem);
  }
}

/* Keep inactive card content out of the paint tree.
   This avoids Safari exposing a mirrored 3D back face during scrolling. */
.pain-face[aria-hidden="true"] {
  display: none !important;
}
