/* GoodUse.AI — Refined UX-Focused UI Styles (Pro Polished Final) */
:root {
  --brand: #6429B7;
  --bg: #FBFAF8;
  --ink: #1A1A1A;
  --muted: #777;
  --pill: #F5F4F8;
  --pill-hover: #EBE6F7;
  --card: #FFFFFF;
  --border: #E8E2F9;
  --shadow: 0 6px 18px rgba(0, 0, 0, 0.06);
  --sticky-h: 64px;        /* compact header height */
  --sticky-gap: 48px;      /* breathing room below header */
}

/* --- About Page Styles --- */
.logo-area {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.about-container {
  max-width: 760px;
  margin: 56px auto;
  padding: 0 24px;
  font-size: 16px;
  line-height: 1.6;
}
.about-container h2 {
  font-size: 26px;
  margin-bottom: 12px;
  font-weight: 700;
}

.brand {
  text-decoration: none;
}

/* --- Brand Wordmark Optimization --- */
.brand {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 5vw, 42px);
  letter-spacing: -0.4px;
  color: var(--brand);
}

.brand, .brand .dot {
  color: #6429B7;
}

.brand .dot {
  margin-left: -1.5px;        /* pull the period closer to the 'e' */
  letter-spacing: -0.2px;     /* tighten internal spacing of .ai */
  display: inline-block;      /* ensures margin works cleanly */
}

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.45;
  max-width: 1180px;
  margin: 0 auto;
}

/* ---------- Header ---------- */
.header {
  max-width: 940px;
  margin: 56px auto 12px;    /* tighter top & less bottom gap */
  padding: 0 20px 0 48px; /* only left pad header */
  text-align: left;
}

.brand {
  font-size: 40px;
  color: var(--brand);
  margin: 0;
  font-weight: 700;
  letter-spacing: -0.5px;
}

.dot { color: var(--brand); }

.subtitle {
  color: #444;
  margin-top: 8px;
  margin-bottom: 24px; /* adds rhythm before stepper */
  font-size: 16px;
  line-height: 1.4;
}

/* ---------- Top Nav (About link) ---------- */
.top-nav {
  display: flex;
  align-items: center;
  gap: 16px;
}

.top-nav .nav-link {
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--ink);
  padding: 4px 6px;
  transition: 0.18s ease;
}

.top-nav .nav-link:hover {
  color: var(--brand);
  opacity: 0.8;
}

/* ---------- Layout ---------- */
.main {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 40px 0px 48px; /* consistent left indent with brand */
  text-align: left;
}

/* Make stepper + question align perfectly with brand baseline */
.main .stepper,
.main section.step-pane {
  padding-left: 0;
  margin-left: 0;
}

/* ---------- Stepper ---------- */
.stepper {
  display: flex;
  gap: 10px;
  align-items: center;
  letter-spacing: 0.1px;
  margin-top: 4px;           /* tighter spacing below subtitle */
  margin-bottom: 28px;       /* reduce vertical gap */
  flex-wrap: wrap;
  justify-content: flex-start;
  font-size: 12.5px;
}

/* ---------- Center Stepper Alignment Override ---------- */
.main .stepper {
  justify-content: center !important;
  margin-left: auto;
  margin-right: auto;
  text-align: center;
  width: 100%;
}

.main .stepper .step {
  justify-content: center;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #F4EFFD;
  border: 1px solid var(--border);
  color: #5930A3;
  padding: 6px 12px;
  border-radius: 999px;
  opacity: 0.7;
  transition: 0.2s ease;
}
.step span {
  display: inline-grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #E8DBFF;
  color: #40237E;
  font-weight: 700;
}
.step.is-active {
  opacity: 1;
  box-shadow: 0 4px 12px rgba(100, 41, 183, 0.1);
  background: #E9E0FF;
  transform: translateY(-1px);
}

/* ---------- Question & Instructions ---------- */
section.step-pane {
  max-width: 940px;
  margin: 0 auto;
  padding: 0 20px; /* remove left bias */
  box-sizing: border-box;
  text-align: center;
}

section.step-pane .question,
section.step-pane .instruction {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.question {
  font-size: 22px;
  font-weight: 600;
  margin: 0 0 8px;
  text-align: left;
}

.instruction {
  font-size: 15px;
  color: var(--muted);
  margin: 0 0 24px; /* tighter visual rhythm */
  text-align: left;
  max-width: 700px;
}

.subtle-header {
  font-size: 15px;
  color: var(--muted);
  margin: 10px 0 16px;
  font-weight: 500;
  text-align: left;
}

/* ---------- Pills ---------- */
.pill-group {
  display: flex;
  flex-wrap: wrap;
  row-gap: 16px; /* more vertical space between rows */
  column-gap: 12px;
  justify-content: center;
  margin: 8px auto 28px;
  max-width: 880px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.pill {
  padding: 14px 20px;
  border-radius: 999px;
  background: var(--pill);
  border: 1px solid #E6E6E6;
  font-size: 14px;
  cursor: pointer;
  transition: 0.18s ease;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  color: var(--ink);
  min-width: 160px;
  box-shadow: 0 2px 0 rgba(0,0,0,0.02);
}
.pill:hover {
  background: var(--pill-hover);
  transform: translateY(-1px);
}
.pill.selected {
  background: var(--brand);
  color: #FFF;
  border-color: var(--brand);
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}
.hint {
  font-size: 12px;
  color: #666;
  font-weight: 400;
  margin-top: 3px;
}

.pill.selected .hint {
  color: #FFF;
  opacity: 0.9;
}

/* ---------- Not Sure Block ---------- */
.not-sure {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-top: 1rem;
  width: 100%;
}
.pill.ghost {
  background: none;
  border: 1px dashed #C7B8E9;
  color: #5D4CA4;
}
.examples {
  max-width: 520px;
  margin: 1rem auto 0;
  font-size: 14px;
  line-height: 1.45;
  color: #444;
  background: #F9F7FE;
  border: 1px dashed var(--border);
  border-radius: 12px;
  padding: 12px 16px;
  text-align: left;
  align-self: center; /* ← add this line */
}
.hidden { display: none; }

/* ---------- Buttons ---------- */
.btn {
  background: var(--brand);
  color: #FFF;
  border: none;
  border-radius: 10px;
  padding: 12px 18px;
  font-size: 14px;
  cursor: pointer;
  transition: 0.18s ease;
  box-shadow: var(--shadow);
}
.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  box-shadow: none;
}
.btn:hover:not(:disabled) {
  filter: brightness(0.95);
  transform: translateY(-1px);
}
.btn.ghost {
  background: #EFE9FF;
  color: #3F2A7E;
  box-shadow: none;
  border: 1px solid var(--border);
}
.btn.link {
  background: #FFF;
  color: #3F2A7E;
  border: 1px solid var(--border);
}
.nav-row {
  display: flex;
  gap: 10px;
  justify-content: center; /* centered for visual balance */
  margin-top: 16px;
}

/* ---------- Step Panes ---------- */
.step-pane {
  display: none;
  opacity: 0;
  transition: opacity 0.25s ease;
}
.step-pane.is-visible {
  display: block;
  opacity: 1;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
}
.card.appear { animation: rise 0.35s ease forwards; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }
.card h3 {
  margin: 0 0 6px;
  font-size: 17.5px;
  font-weight: 700;
  color: #1A1A1A;
  letter-spacing: -0.2px;
  line-height: 1.35;
}
.meta {
  font-size: 13px;
  color: #5B4E7A;
  margin-bottom: 6px;
  text-transform: uppercase;
  letter-spacing: 0.8px;
  font-weight: 500;
  opacity: 0.8;
}
.tagline {
  display: block;
  font-weight: 400;
  font-style: italic;
  color: rgba(26, 26, 26, 0.75);
  font-size: 15px;
  line-height: 1.45;
  margin-top: 2px;
  margin-bottom: 6px;
  margin-left: 0;
  padding-left: 1px; /* slight optical tweak to align with h3 */
  letter-spacing: -0.2px;
  opacity: 0.9;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.card:hover .tagline {
  color: #5B4E7A;
  opacity: 1;
}

.impact {
  font-size: 14.5px;
  margin: 10px 0 6px;
  line-height: 1.55;
}

.impact strong {
  color: #2B1D62;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13.5px;
  font-weight: 600;
}

.why {
  font-size: 14.5px;
  color: #433F58;
  margin-top: 6px;
  line-height: 1.55;
}

.why strong {
  color: #2B1D62;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-size: 13.5px;
  font-weight: 600;
}

/* ---------- How it Works Toggle ---------- */
.plan {
  display: none;
  margin-top: 6px;
  font-size: 14px;
  line-height: 1.55;
  color: #333;
  opacity: 0;
  transition: opacity 0.25s ease, max-height 0.35s cubic-bezier(0.25, 1, 0.5, 1);
  max-height: 0;
  overflow: hidden;
}

.plan.show {
  display: block;
  opacity: 1;
  max-height: 500px; /* enough space for text */
}

.plan-toggle {
  cursor: pointer;
  font-weight: 600;
  color: #1A1A1A;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 6px;
  user-select: none;
  transition: opacity 0.2s ease;
}
.plan-toggle:hover { opacity: 0.8; }

.plan-toggle .caret {
  transition: transform 0.2s ease;
}
.plan-toggle.open .caret {
  transform: rotate(90deg);
}

/* ---------- Results Cards Enhancements ---------- */
.card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(100, 41, 183, 0.08);
}

.card h3 {
  letter-spacing: -0.3px;  /* subtle Apple-like refinement */
}

.cta-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 24px 0;
}

.next-step {
  margin-top: 10px;
  font-style: italic;
  color: #444;
  opacity: 0.9;
  border-left: 3px solid #6429B7;
  padding-left: 10px;
  font-size: 13px;
}

/* Give the results screen a bottom buffer without touching other rows */
section.step-pane#step-4 { 
  padding-bottom: 96px !important; 
}


/* ---------- Spinner ---------- */
#spinner svg {
  height: 16px;
  width: 16px;
  vertical-align: middle;
  animation: spin 1s linear infinite;
}
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* ---------- Results Screen Overrides ---------- */
.step-pane.results-pane {
  text-align: left; /* ensures entire results step aligns left */
}


.results {
  display: flex;
  flex-direction: column;
  align-items: stretch; /* ensures all cards match width */
  justify-content: flex-start;
  width: 100%;
  max-width: 880px; /* perfect readable width */
  margin: 0 auto; /* centers the column */
  text-align: left;
  gap: 14px; /* consistent spacing between cards */
}
.results .card {
  width: 100%;
  box-sizing: border-box;
  text-align: left;
}

.results { padding: 8px 12px; } /* gives subtle breathing room */


/* let the sticky header span edge-to-edge on results */
body.results-pane{
  max-width: none !important;
  margin: 0 !important;
  overflow-x: hidden;
}

/* ---------- Compact Sticky Header (Results View — Edge-to-Edge & Correct Spacing) ---------- */
body.results-pane .header{
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;                 /* full viewport width */
  margin: 0;
  background: rgba(251,250,248,0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  padding: 12px 40px 10px;      /* horizontal padding only */
  z-index: 100;
  animation: fadeDown 0.35s ease forwards;
  height: var(--sticky-h);
  min-height: var(--sticky-h);
  box-sizing: border-box;
}

body.results-pane .brand{
  font-size: 22px;
  color: var(--brand);
  margin: 0;
  line-height: 1.1;
}

body.results-pane .brand::after{
  content: "AI Use Case Results";
  display: block;
  font-size: 12.5px;
  color: #555;
  font-weight: 500;
  letter-spacing: 0.4px;
  margin-top: 2px;
  opacity: 0.9;
}

body.results-pane.compact .subtitle { display:none; }

/* push the whole page content down below the sticky header */
body.results-pane .main {
  padding-top: calc(var(--sticky-h) + 72px) !important; /* start lower so sticky header is visible */
}
/* ---------- Full-Width Sticky Header Fix ---------- */
body.results-pane .header {
  width: 100vw !important;
  max-width: none !important;
  left: 0;
  right: 0;
  margin: 0;
  padding: 12px 48px 10px;
  box-sizing: border-box;
  background: rgba(251,250,248,0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  transition: all 0.3s ease;
}

/* ---------- Responsive (Mobile Polish v5 — Final Launch-Ready) ---------- */
@media (max-width: 600px) {

  /* Global mobile alignment */
  body, .main, section.step-pane {
    padding: 0 16px !important;
    text-align: center;
  }

  /* Header */
  .header {
    text-align: center !important;
    padding-left: 0;
    padding-right: 0;
    margin-top: 40px;
    margin-bottom: 12px;
  }

  .brand {
    font-size: 30px;
    margin-bottom: 2px;
    text-align: center;
  }

  .subtitle {
    text-align: center !important;
    font-size: 13.5px;
    margin-bottom: 16px;
  }

  /* Results screen header centering */
  body.results-pane .header {
    padding-left: 0 !important;
    padding-right: 0 !important;
    width: 100% !important;
    text-align: center !important;
  }

  body.results-pane .brand,
  body.results-pane .subtitle {
    margin: 0 auto !important;
    text-align: center !important;
  }

  /* Stepper */
  .stepper {
    justify-content: center;
    gap: 6px;
    margin-bottom: 18px;
  }

  /* ✅ Pill grid — good on iPhone + Chrome desktop preview */
  .pill-group {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    row-gap: 12px;
    column-gap: 10px;
    max-width: 480px;
    margin: 0 auto 24px;
  }

  /* ✅ Large phones & small tablets (2-column) */
  .pill {
    flex: 0 1 calc(48% - 10px);
    width: calc(48% - 10px);
    min-width: 0;
    max-width: none;
    padding: 12px 10px;
    font-size: 13.5px;
    border-radius: 999px;
    white-space: normal;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
  }

  .instruction, .question {
    font-size: 15.5px;
    text-align: center;
    line-height: 1.4;
    margin-bottom: 16px;
  }

  /* ✅ Next + Back full-width buttons, Next shown first */
  .nav-row, .cta-row {
    flex-direction: column-reverse; /* <-- flips order on mobile */
    gap: 10px;
    margin-top: 18px;
    width: 100%;
  }

  .nav-row .btn,
  .cta-row .btn {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    font-size: 14px;
    padding: 14px 18px;
  }
}

/* ✅ iPhone and smallest screens: 1-column pills cleanly */
@media (max-width: 415px) {
  .pill {
    flex: 1 1 100%;
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
  }
}


/* Compact state (scroll down) */
body.results-pane.compact .header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100vw;
  padding: 12px 48px 10px;
  background: rgba(251,250,248,0.98);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(0,0,0,0.06);
  height: var(--sticky-h);
  z-index: 100;
}

body.results-pane.compact .brand {
  font-size: 22px;
  line-height: 1.1;
}

body.results-pane.compact .brand::after {
  content: "AI Use Case Results";
  display: block;
  font-size: 12.5px;
  color: #555;
  font-weight: 500;
  letter-spacing: 0.4px;
  margin-top: 2px;
  opacity: 0.9;
}

/* Restore default header when not compact */
body.results-pane:not(.compact) .header {
  position: relative;
  width: auto;
  max-width: 940px;
  margin: 56px auto 12px;
  padding: 0 20px 0 48px;
  background: transparent;
  border: none;
  backdrop-filter: none;
  height: auto;
  z-index: 1;
}

/* Reset spacing when back to full header */
body.results-pane:not(.compact) .main {
  padding-top: 0 !important;
}

body.results-pane:not(.compact) .brand {
  font-size: 40px;
  line-height: 1.15;
}

body.results-pane:not(.compact) .brand::after {
  content: none;
}

/* --- About Page Mobile Fix (Left-align text) --- */
@media (max-width: 600px) {
  .about-container,
  .about-container p,
  .about-container ul,
  .about-container li {
    text-align: left !important;
  }
}



