/* =========================================================
   STORY PAGES: shared layout for the service pages
   (SEO, Social Media, Shopify & Google, Lead Generation).
   Each page adds its own animation in its own CSS file.
   ========================================================= */

.section-sub {
  max-width: 640px;
  margin: -16px auto 36px;
  font-size: 17px;
}

/* ---------- Hero: animation left, words right ---------- */

.story-hero {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 56px;
  align-items: center;
  max-width: 1240px;
  margin: 0 auto;
  padding: 50px 40px 40px;
  text-align: left;
}

.story-text h1 {
  font-size: 46px;
  line-height: 1.15;
  margin: 12px 0 14px;
}

.story-lead {
  font-size: 18px;
  line-height: 1.6;
  margin: 0 0 26px;
}

.story-buttons {
  justify-content: flex-start;
  margin: 0 0 14px;
}

.story-buttons .btn,
.story-buttons .btn-outline {
  margin: 0;
}

.story-reassure {
  margin: 0;
  font-size: 14px;
  opacity: 0.75;
}

/* ---------- The demo area and the little labels above it ---------- */

.story-demo {
  position: relative;
}

.demo-chips {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.demo-tabs {
  display: flex;
  gap: 6px;
}

.demo-tab,
.demo-stat {
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: 99px;
  background: #1f1f2a;
  color: #8a8a9a;
  transition: background 0.4s, color 0.4s;
}

.demo-tab.active {
  background: rgba(108, 92, 231, 0.25);
  color: #ffffff;
}

.demo-stat {
  color: #e8e8f0;
}

.demo-stat.good {
  background: rgba(85, 239, 196, 0.15);
  color: #55efc4;
}

.demo-stat.bump {
  animation: story-bump 0.35s ease;
}

@keyframes story-bump {
  50% { transform: scale(1.12); }
}

/* A simple browser window, used by several animations */
.demo-browser {
  border-radius: 14px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
}

.demo-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 10px 14px;
  background: #ececf1;
}

.demo-bar span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #c8c8d0;
}

.demo-bar em {
  margin-left: 10px;
  font-style: normal;
  font-size: 12px;
  color: #777777;
}

.demo-screen {
  position: relative;
  height: 380px;
  overflow: hidden;
  font-family: 'Poppins', sans-serif;
  color: #2d2d2d;
}

/* ---------- "In plain words" cards ---------- */

.explain-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.explain-card {
  background: #15151c;
  border: 1px solid #2a2a35;
  border-radius: 16px;
  padding: 30px 26px;
  text-align: left;
}

/* The full name under a short title, e.g. "Search Engine Optimisation" */
.explain-full {
  display: block;
  margin: -4px 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: #00d2ff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.explain-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(108, 92, 231, 0.25), rgba(0, 210, 255, 0.2));
  font-size: 22px;
}

.explain-card h3 {
  font-size: 20px;
  margin: 16px 0 8px;
}

.explain-card p {
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

/* ---------- Four numbered steps ---------- */

.story-steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}

.story-steps li {
  background: #15151c;
  border: 1px solid #2a2a35;
  border-radius: 16px;
  padding: 26px 22px;
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6c5ce7, #00d2ff);
  color: #ffffff;
  font-weight: 700;
}

.story-steps h3 {
  font-size: 18px;
  margin: 14px 0 8px;
}

.story-steps p {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}

/* Two buttons side by side inside the price band */
.price-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.price-actions .btn,
.price-actions .btn-outline {
  margin-top: 0;
  white-space: nowrap;
}

/* ---------- Tablets and phones ---------- */

@media (max-width: 900px) {
  .story-hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding: 30px 18px;
    text-align: center;
  }

  .story-text h1 {
    font-size: 32px;
  }

  .story-buttons {
    justify-content: center;
  }

  .story-demo {
    text-align: left;
  }

  .explain-grid {
    grid-template-columns: 1fr;
  }

  .story-steps {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .demo-screen {
    height: 350px;
  }

  .demo-tab,
  .demo-stat {
    font-size: 12px;
    padding: 5px 10px;
  }

  .story-steps {
    grid-template-columns: 1fr;
  }
}

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

  .demo-stat.bump {
    animation: none;
  }
}

/* ---------- The mouse cursor used in the demos (added by demo-cursor.js) ---------- */

.demo-cursor {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 20;
  pointer-events: none;
  transition-property: transform;
  transition-timing-function: cubic-bezier(0.45, 0, 0.25, 1);
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.demo-cursor svg {
  display: block;
  transition: transform 0.15s;
}

.demo-cursor.pressing svg {
  transform: scale(0.85);
}

/* A ring that spreads out on every click */
.demo-ripple {
  position: absolute;
  z-index: 19;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border-radius: 50%;
  border: 2px solid #6c5ce7;
  pointer-events: none;
  animation: demo-ripple 0.6s ease-out forwards;
}

@keyframes demo-ripple {
  from { transform: scale(0.3); opacity: 1; }
  to { transform: scale(1.6); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .demo-cursor {
    display: none;
  }
}

/* ---------- Clickable tabs above the demos ---------- */

button.demo-tab {
  border: none;
  font-family: 'Poppins', sans-serif;
  cursor: pointer;
}

button.demo-tab:hover {
  background: #2a2a38;
  color: #ffffff;
}

button.demo-tab.active:hover {
  background: rgba(108, 92, 231, 0.35);
}

button.demo-tab:focus-visible {
  outline: 2px solid #00d2ff;
  outline-offset: 2px;
}
