/* ========================================
   Tool page — shared sections (Steps + Content)
   Used by /views/pages/write-tool-page.hbs and image-tool-page.hbs.
   Depends on /css/styles.css for --primary, --gray-*, --font-heading, etc.
   ======================================== */

/* ===== Steps section ===== */
.section--steps {
  background: #f3f5fb;
  padding: 68px 0 36px;
  text-align: center;
}

.section--steps .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.steps-wrap {
  position: relative;
  text-align: center;
}

.steps-wrap__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  background: var(--white);
  border: 1px solid var(--gray-200);
  color: var(--primary);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 12px;
}

.steps-wrap__eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.section--steps .section__heading {
  margin-bottom: 12px;
  font-size: 30px;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 40px;
  counter-reset: step-counter;
  position: relative;
}

.steps-grid .step-card {
  position: relative;
  text-align: center;
  padding: 28px 22px 24px;
  background: var(--step-card-bg, var(--white));
  border: none;
  border-radius: 16px;
  counter-increment: step-counter;
  overflow: visible;
  animation: step-card-pulse 3s ease-in-out infinite;
  will-change: transform;
  --step-color: #ffffff;
  --step-color-soft: rgba(255, 255, 255, 0.20);
  --step-color-deep: #ffffff;
}

.steps-grid .step-card:nth-child(1) { --step-card-bg: #8b5cf6; } /* violet */
.steps-grid .step-card:nth-child(2) { --step-card-bg: #ec4899; animation-delay: 0.45s; } /* pink */
.steps-grid .step-card:nth-child(3) { --step-card-bg: #f97316; animation-delay: 0.90s; } /* orange */

@keyframes step-card-pulse {
  0%, 30%, 100% { transform: translateY(0); }
  10%           { transform: translateY(-12px); }
}

@media (prefers-reduced-motion: reduce) {
  .steps-grid .step-card { animation: none; }
}

/* Step counter pill (auto-numbered via CSS counter) */
.step-card__counter {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px 5px 9px;
  background: var(--step-color-soft);
  color: var(--step-color);
  border-radius: 999px;
  font-family: var(--font-heading);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1;
}

.step-card__counter::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--step-color);
  margin-right: 2px;
}

.step-card__counter::after {
  content: "Step " counter(step-counter, decimal-leading-zero);
}

/* Icon: Font Awesome glyph inside a colored circular badge */
.steps-grid .step-card__icon-wrap {
  width: 82px;
  height: 82px;
  margin: 18px auto 16px;
  border-radius: 50%;
  background: var(--step-color-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.steps-grid .step-card__icon-wrap::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 1.5px dashed var(--step-color);
  opacity: 0.32;
}

.steps-grid .step-card__icon {
  width: 48px;
  height: 48px;
  margin: 0;
  object-fit: contain;
}

.steps-grid .step-card__icon-wrap i {
  font-size: 30px;
  color: var(--step-color);
  line-height: 1;
}

.steps-grid .step-card__text {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--step-color-deep);
  font-family: var(--font-body);
  line-height: 1.6;
  margin: 0;
}

/* Connector arrow between cards — picks up the next card's color */
.steps-grid .step-card:not(:last-child)::after {
  content: "\f054"; /* fa-chevron-right */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 12px;
  color: var(--white);
  position: absolute;
  left: calc(100% + 12px);
  top: 50%;
  transform: translate(-50%, -50%);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 3px solid #f3f5fb;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
}

.steps-grid .step-card:nth-child(1)::after {
  background: #ec4899;
  box-shadow: 0 4px 12px rgba(236, 72, 153, 0.40);
}

.steps-grid .step-card:nth-child(2)::after {
  background: #f97316;
  box-shadow: 0 4px 12px rgba(249, 115, 22, 0.40);
}

@media (max-width: 900px) {
  .section--steps {
    padding: 48px 0 24px;
  }
  .steps-grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .steps-grid .step-card {
    padding: 18px 16px 16px;
    border-radius: 14px;
    max-width: 320px;
    width: 100%;
    margin-left: auto;
    margin-right: auto;
  }
  .steps-grid .step-card__icon-wrap {
    width: 60px;
    height: 60px;
    margin: 12px auto 10px;
  }
  .steps-grid .step-card__icon-wrap::before {
    inset: -5px;
  }
  .steps-grid .step-card__icon-wrap i {
    font-size: 22px;
  }
  .steps-grid .step-card__text {
    font-size: 13px;
    line-height: 1.5;
  }
  .step-card__counter {
    font-size: 9.5px;
    padding: 3px 9px 3px 7px;
    gap: 5px;
  }
  .step-card__counter::before {
    width: 5px;
    height: 5px;
  }
  .steps-grid .step-card:not(:last-child)::after {
    left: 50%;
    top: calc(100% + 2px);
    width: 26px;
    height: 26px;
    font-size: 10px;
    transform: translate(-50%, 0) rotate(90deg);
  }
}

/* ===== Section content — typography polish ===== */
.section--content {
  background: #f3f5fb;
  padding: 40px 0 96px;
}

.section--content .container--narrow {
  max-width: 820px;
}

/* Headings — soft blue tinted "label" bg with brand-blue left bar */
.section--content .content-heading {
  position: relative;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--gray-800);
  letter-spacing: -0.015em;
  margin: 44px 0 18px;
  line-height: 1.3;
  background: #eef1fe;
  border-left: 4px solid var(--primary);
  border-radius: 0 10px 10px 0;
  padding: 14px 18px;
}

.section--content h2.content-heading { font-size: 28px; }
.section--content h3.content-heading {
  font-size: 21px;
  border-left-width: 3px;
  padding: 12px 16px;
  margin-top: 32px;
}
.section--content h4.content-heading {
  font-size: 17px;
  border-left-width: 3px;
  padding: 10px 14px;
  margin-top: 28px;
}
.section--content .content-heading--bold {
  font-size: 17px;
  border-left-width: 3px;
  padding: 10px 14px;
}

.section--content .content-heading:first-child {
  margin-top: 0;
  background: #fef3c7;          /* amber-100 */
  border-left-color: #d97706;   /* amber-600 */
  color: #78350f;               /* amber-900 — readable on the warm bg */
}

/* Paragraphs — comfortable rhythm + lede emphasis */
.section--content .content-text {
  font-size: 16.5px;
  line-height: 1.85;
  color: #374151;
  margin-bottom: 18px;
}

.section--content .content-text:first-of-type {
  font-size: 18px;
  color: var(--gray-800);
  font-weight: 500;
}

.section--content .content-text strong {
  color: var(--gray-800);
  font-weight: 600;
}

/* Links */
.section--content .content-text a {
  color: var(--primary);
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1.5px;
  text-decoration-color: rgba(42, 65, 232, 0.35);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
}

.section--content .content-text a:hover {
  text-decoration-color: var(--primary);
  color: #1e33c9;
}

/* Lists — custom branded bullets / numbered chips */
.section--content .content-list {
  margin: 14px 0 26px;
  padding-left: 0;
  font-size: 16.5px;
  line-height: 1.85;
  color: #374151;
  list-style: none;
}

.section--content ul.content-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 12px;
}

.section--content ul.content-list li::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 12px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px rgba(42, 65, 232, 0.16);
}

.section--content ol.content-list {
  counter-reset: content-counter;
}

.section--content ol.content-list li {
  position: relative;
  padding-left: 40px;
  margin-bottom: 14px;
  counter-increment: content-counter;
}

.section--content ol.content-list li::before {
  content: counter(content-counter);
  position: absolute;
  left: 0;
  top: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(42, 65, 232, 0.10);
  color: var(--primary);
  font-family: var(--font-heading);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.section--content .content-list li strong {
  color: var(--gray-800);
  font-weight: 600;
}

@media (max-width: 768px) {
  .section--content {
    padding: 28px 0 72px;
  }
  .section--content h2.content-heading { font-size: 22px; padding: 12px 14px; }
  .section--content h3.content-heading { font-size: 18px; padding: 10px 12px; }
  .section--content .content-text { font-size: 15.5px; line-height: 1.75; }
  .section--content .content-text:first-of-type { font-size: 16.5px; }
  .section--content .content-list { font-size: 15.5px; line-height: 1.75; }
}

/* ===== Sidebar tips list (image-tool sidebar) ===== */
.wt-tips-list {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wt-tips-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13.5px;
  line-height: 1.5;
  color: var(--gray-700);
}

.wt-tips-list li i {
  flex-shrink: 0;
  margin-top: 4px;
  width: 18px;
  height: 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(42, 65, 232, 0.12);
  color: var(--primary);
  font-size: 9px;
}

/* ===== Image renderer — empty state + generated card ===== */
.output-boxes {
  margin-top: 18px;
}

/* Empty state — pretty placeholder shown until JS injects an image */
.output-empty {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 36px 22px 30px;
  background:
    radial-gradient(circle at 20% 18%, rgba(42, 65, 232, 0.08), transparent 55%),
    radial-gradient(circle at 82% 82%, rgba(124, 58, 237, 0.08), transparent 55%),
    #f7f9ff;
  border: 1.5px dashed rgba(42, 65, 232, 0.30);
  border-radius: 18px;
  overflow: hidden;
}

.output-empty__frame {
  position: relative;
  width: 88px;
  height: 88px;
  border-radius: 22px;
  background: var(--white);
  border: 1px solid rgba(42, 65, 232, 0.18);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 12px 28px rgba(42, 65, 232, 0.14);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  animation: output-empty-bob 4s ease-in-out infinite;
}

.output-empty__icon {
  font-size: 34px;
  color: var(--primary);
}

@keyframes output-empty-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-6px); }
}

.output-empty__sparkle {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  color: #f59e0b;
}

.output-empty__sparkle--1 {
  top: -10px;
  right: -14px;
  font-size: 16px;
  animation: output-empty-twinkle 2.4s ease-in-out infinite;
}

.output-empty__sparkle--2 {
  bottom: -8px;
  left: -16px;
  font-size: 12px;
  color: #ec4899;
  animation: output-empty-twinkle 3s ease-in-out infinite 0.6s;
}

.output-empty__sparkle--3 {
  top: 8px;
  left: -22px;
  font-size: 9px;
  color: #8b5cf6;
  animation: output-empty-twinkle 2s ease-in-out infinite 1.2s;
}

@keyframes output-empty-twinkle {
  0%, 100% { transform: scale(0.7) rotate(0deg);   opacity: 0.55; }
  50%      { transform: scale(1.1) rotate(20deg);  opacity: 1;    }
}

.output-empty__title {
  font-family: var(--font-heading);
  font-size: 17px;
  font-weight: 700;
  color: var(--gray-800);
  margin: 0 0 4px;
  letter-spacing: -0.01em;
}

.output-empty__sub {
  font-size: 13.5px;
  color: var(--gray-600);
  margin: 0;
  line-height: 1.5;
}

.output-empty__sub strong {
  color: var(--primary);
  font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
  .output-empty__frame,
  .output-empty__sparkle { animation: none; }
}

/* Generated image card */
.output-box.output-box--image {
  position: relative;
  background: var(--white);
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-radius: 18px;
  padding: 12px 12px 16px;
  margin-top: 0;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 14px 32px rgba(15, 23, 42, 0.08);
  overflow: hidden;
  animation: output-image-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes output-image-in {
  from { opacity: 0; transform: translateY(10px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.output-box--image img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  background: #f3f5fb; /* shows while loading */
}

.output-box--image .btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 11px 18px;
  border-radius: 12px;
  font-weight: 700;
  font-size: 14px;
  background: var(--primary);
  color: var(--white);
  border: none;
  cursor: pointer;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 3px 0 #1e33c9,
    0 5px 12px rgba(42, 65, 232, 0.30);
  transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.output-box--image .btn::before {
  content: "\f019"; /* fa-download */
  font-family: "Font Awesome 6 Free";
  font-weight: 900;
  font-size: 13px;
}

.output-box--image .btn:hover {
  transform: translateY(-1px);
}

.output-box--image .btn:active {
  transform: translateY(2px);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.30),
    inset 0 -2px 0 rgba(0, 0, 0, 0.18),
    0 1px 0 #1e33c9,
    0 2px 6px rgba(42, 65, 232, 0.20);
}

@media (max-width: 600px) {
  .output-empty {
    padding: 28px 16px 26px;
  }
  .output-empty__frame {
    width: 72px;
    height: 72px;
  }
  .output-empty__icon {
    font-size: 28px;
  }
}
