/* ─────────────────────────────────────────
   MICRO SAAS PAGE — scoped styles
───────────────────────────────────────── */

/* ──────────── TOP BAR (GO BACK + THEME) ──────────── */
.top-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 32px;
  position: sticky;
  top: 0;
  z-index: 1000;
  background: var(--bg);
  backdrop-filter: blur(12px);
}

[data-theme="dark"] .top-bar {
  background: rgba(10, 10, 10, 0.88);
  box-shadow: 0 1px 8px rgba(0, 0, 0, 0.3);
}

.back-link {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  height: 40px;
  padding: 0 16px;
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.back-link svg {
  width: 18px;
  height: 18px;
}

.back-link:hover {
  color: var(--text);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.theme-btn-header {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.theme-btn-header:hover {
  color: var(--text);
  border-color: var(--text-muted);
  transform: translateY(-2px);
}

.theme-btn-header svg {
  width: 18px;
  height: 18px;
  transition: transform 0.5s var(--ease-out);
}

.theme-btn-header:hover svg {
  transform: rotate(20deg);
}

[data-theme="dark"] .theme-btn-header .icon-moon {
  display: none;
}

[data-theme="light"] .theme-btn-header .icon-sun {
  display: none;
}

.saas-page .container-wide {
  max-width: 920px;
  margin: 0 auto;
  padding: 0 32px;
}

/* Compact hero */
.saas-hero {
  min-height: auto;
  padding: 52px 0 64px;
  display: block;
}

.saas-hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.saas-hero-left {
  display: flex;
  flex-direction: column;
}

.saas-hero-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 14px;
  letter-spacing: -0.5px;
}

.saas-hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 56ch;
}

/* Hero CTA block */
.saas-cta-block.simple-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.saas-cta-heading {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.4rem, 3vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
}

.saas-cta-text {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 28px;
  max-width: 68ch;
}



/* Project grid */
.saas-section-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
}

.saas-section-sub {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.7;
  max-width: 58ch;
  margin-bottom: 40px;
}

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

.saas-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

@media (hover: hover) {}

.saas-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.saas-card-name {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
}

.saas-card-desc {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Status badges */
.saas-badge {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 100px;
  border: 1px solid var(--border);
  white-space: nowrap;
}

.saas-badge--idea {
  color: var(--text-muted);
  background: var(--tag-bg);
}

.saas-badge--building {
  color: #92600a;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.25);
}

[data-theme="dark"] .saas-badge--building {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.1);
}

.saas-badge--soon {
  color: #1e4a8a;
  background: rgba(59, 130, 246, 0.1);
  border-color: rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .saas-badge--soon {
  color: #93c5fd;
}

.saas-badge--live {
  color: #166534;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(34, 197, 94, 0.25);
}

[data-theme="dark"] .saas-badge--live {
  color: #86efac;
}

/* Prose blocks */
.saas-prose {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  max-width: 62ch;
}

.saas-prose+.saas-prose {
  margin-top: 16px;
}

/* Why work cards */
.saas-why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  margin-top: 40px;
}

.saas-why-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: transform var(--transition), box-shadow var(--transition);
}

@media (hover: hover) {
  .saas-why-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--hover-shadow);
  }
}

.saas-why-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.saas-why-card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Custom Steps Graph */
.custom-steps {
  display: flex;
  gap: 24px;
  margin-top: 48px;
}

.custom-step {
  flex: 1;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  position: relative;
  transition: transform var(--transition), box-shadow var(--transition);
}

.custom-step:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.04);
}

.step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 16px;
}

.custom-step h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 8px;
}

.custom-step p {
  font-size: 0.85rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Contact CTA buttons row */
.saas-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

/* Contact form */
.saas-form-wrap {
  margin-top: 48px;
}

.minimal-form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px 40px;
}

.saas-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.saas-field--full {
  grid-column: 1 / -1;
}

.saas-field input,
.saas-field select,
.saas-field textarea {
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  padding: 8px 0;
  transition: border-color var(--transition);
  width: 100%;
}

.saas-field textarea {
  min-height: 80px;
  resize: vertical;
  line-height: 1.6;
}

.saas-field input:focus,
.saas-field select:focus,
.saas-field textarea:focus {
  outline: none;
  border-bottom-color: var(--text);
}

[data-theme="dark"] .saas-field input:focus,
[data-theme="dark"] .saas-field select:focus,
[data-theme="dark"] .saas-field textarea:focus {
  border-bottom-color: #fff;
}

.saas-input--error {
  border-color: #dc2626 !important;
}

.saas-field-error {
  font-size: 0.75rem;
  color: #dc2626;
  min-height: 1em;
}

.saas-form-submit {
  grid-column: 1 / -1;
  margin-top: 8px;
}

/* Success message */
.saas-form-success {
  text-align: center;
  padding: 48px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  margin-top: 48px;
}

.saas-form-success-icon {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(34, 197, 94, 0.12);
  color: #22c55e;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 1.4rem;
}

.saas-form-success h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  margin-bottom: 8px;
}

.saas-form-success p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* Building real products banner */
.saas-build-section {
  padding-top: 48px;
}

.saas-hero-stats-wrap {
  display: flex;
  flex-direction: column;
  gap: 24px;
  margin-top: 40px;
}

.saas-build-pipeline {
  display: flex;
  align-items: center;
  gap: 12px;
  align-self: flex-start;
}

.saas-pipeline-step {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: center;
  gap: 8px;
  padding: 16px 20px;
  min-width: 88px;
}

.saas-pipeline-icon {
  font-size: 1.4rem;
  line-height: 1;
}

.saas-pipeline-label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.saas-pipeline-arrow {
  font-size: 1rem;
  color: var(--text-muted);
  opacity: 0.4;
}

.saas-build-stats {
  display: flex;
  gap: 0;
  padding-top: 12px;
}

.saas-build-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 0 24px;
  border-right: 1px solid var(--border);
}

.saas-build-stat:first-child {
  padding-left: 0;
}

.saas-build-stat:last-child {
  border-right: none;
  padding-right: 0;
}

.saas-build-stat-num {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.saas-build-stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* Bottom CTA banner */
.saas-bottom-banner {
  border-bottom: 1px solid var(--border);
  padding: 72px 32px;
  text-align: center;
}

.saas-bottom-banner .container-wide {
  max-width: 640px;
}

.saas-bottom-banner h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1.25;
  margin-bottom: 16px;
}

.saas-bottom-banner p {
  font-size: 0.95rem;
  color: var(--text-muted);
  line-height: 1.75;
  margin-bottom: 28px;
}

/* Section spacing tweaks */
.saas-page .section {
  padding: 80px 0;
}

.saas-page .section-contact-cta {
  padding-bottom: 48px;
}

@media (max-width: 992px) {
  .saas-hero-grid {
    grid-template-columns: 1fr;
    gap: 48px;
  }

  .saas-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .saas-why-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .saas-hero-title {
    font-size: 2.3rem;
  }

  .saas-hero {
    padding: 60px 0 40px;
  }

  .saas-hero-stats-wrap {
    margin-top: 32px;
  }

  .saas-build-pipeline {
    flex-wrap: wrap;
  }

  .saas-build-stats {
    gap: 28px;
  }

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

  .saas-why-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .custom-steps {
    flex-wrap: wrap;
  }

  .custom-step {
    flex: 1 1 calc(50% - 24px);
  }

  .saas-build-stat {
    padding: 0 0 0px;
  }

  .saas-page .container-wide {
    padding: 0 24px;
  }

  .saas-cta-block {
    padding: 28px 22px;
  }

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

  .saas-field--full {
    grid-column: 1;
  }

  .saas-form-submit {
    grid-column: 1;
  }

  .saas-highlights {
    grid-template-columns: 1fr;
  }

  .saas-page .section {
    padding: 64px 0;
  }

  .saas-bottom-banner {
    padding: 56px 24px;
  }
}

@media (max-width: 480px) {
  .saas-card-top {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .saas-btn-row {
    flex-direction: column;
  }

  .saas-btn-row .btn {
    width: 100%;
    text-align: center;
  }

  .custom-step {
    flex: 1 1 100%;
  }
}