/* =========================================================================
   PROFITABLE ON PURPOSE BUSINESS SCAN — STYLESHEET
   =========================================================================
   BRAND COLOUR NOTE:
   --pop-accent (#EC177C) is the Profitable on Purpose brand pink, confirmed
   from POP's existing conference materials. --pop-accent-deep is a darker
   shade of that same pink (used for hover/active states only) — it is not
   a separate brand colour, just a tint of the confirmed one. Every other
   colour below is a neutral (black, white, warm grey) rather than a guessed
   brand hue. If POP's exact secondary brand colour is confirmed later,
   set it in --pop-secondary and it will apply everywhere that variable
   is used.
   ========================================================================= */

:root {
  /* ---- Brand colour tokens (edit here) ---- */
  --pop-black: #1a1a1a;
  --pop-white: #ffffff;
  --pop-accent: #ec177c;      /* POP brand pink — confirmed */
  --pop-accent-deep: #b8115f; /* darker shade of the pink above, for hover states */
  --pop-secondary: #1a1a1a;   /* reserved for a second brand colour if confirmed later */
  --pop-muted: #6b6b6b;
  --pop-muted-soft: #9a9a9a;
  --pop-border: #e4e0da;
  --pop-bg-soft: #faf9f7;

  /* ---- Type tokens ---- */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* ---- Layout tokens ---- */
  --content-max: 720px;
  --radius-sm: 4px;
  --radius-md: 10px;
  --transition-fast: 150ms ease;
  --transition-base: 260ms ease;
}

/* ---------------------------------------------------------------------- */
/* RESET / BASE                                                            */
/* ---------------------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

body {
  margin: 0;
  background: var(--pop-white);
  color: var(--pop-black);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--pop-black);
}

p { margin: 0 0 1em; }

a { color: inherit; }

img { max-width: 100%; display: block; }

button { font-family: inherit; }

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--pop-black);
  color: var(--pop-white);
  padding: 12px 20px;
  z-index: 1000;
  border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 3px solid var(--pop-accent);
  outline-offset: 2px;
}

/* ---------------------------------------------------------------------- */
/* HEADER / FOOTER                                                         */
/* ---------------------------------------------------------------------- */

.site-header {
  display: flex;
  justify-content: center;
  padding: 28px 24px 0;
}

.site-header__logo {
  height: 56px;
  width: auto;
}

.site-footer {
  text-align: center;
  color: var(--pop-muted-soft);
  font-size: 13px;
  letter-spacing: 0.02em;
  padding: 40px 24px 56px;
}

/* ---------------------------------------------------------------------- */
/* SHARED LAYOUT                                                           */
/* ---------------------------------------------------------------------- */

.screen {
  width: 100%;
  max-width: var(--content-max);
  margin: 0 auto;
  padding: 48px 24px 80px;
}

.eyebrow {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.03em;
  color: var(--pop-accent);
  margin: 0 0 18px;
}

.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 16px;
  padding: 15px 30px;
  border-radius: var(--radius-sm);
  border: 2px solid transparent;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background-color var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast), transform var(--transition-fast);
}

.btn:active { transform: translateY(1px); }

.btn--primary {
  background: var(--pop-black);
  color: var(--pop-white);
  border-color: var(--pop-black);
}
.btn--primary:hover { background: var(--pop-accent); border-color: var(--pop-accent); }

.btn--outline {
  background: transparent;
  color: var(--pop-black);
  border-color: var(--pop-black);
}
.btn--outline:hover { background: var(--pop-black); color: var(--pop-white); }

.btn--ghost {
  background: transparent;
  color: var(--pop-muted);
  border-color: transparent;
  padding-left: 8px;
  padding-right: 8px;
}
.btn--ghost:hover { color: var(--pop-black); }

.btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.btn--cta {
  background: var(--pop-accent);
  border-color: var(--pop-accent);
  color: var(--pop-white);
  width: 100%;
  padding: 18px 24px;
  font-size: 17px;
}
.btn--cta:hover { background: var(--pop-accent-deep); border-color: var(--pop-accent-deep); }

/* ---------------------------------------------------------------------- */
/* LANDING SCREEN                                                          */
/* ---------------------------------------------------------------------- */

.screen--landing {
  padding-top: 8vh;
  padding-bottom: 8vh;
}

.landing__headline {
  font-size: clamp(2.1rem, 5vw, 3.2rem);
  max-width: 14ch;
}

.landing__subhead {
  font-size: 18px;
  color: var(--pop-muted);
  max-width: 52ch;
  margin-bottom: 32px;
}

.landing__meta {
  margin-top: 18px;
  font-size: 14px;
  color: var(--pop-muted-soft);
}

/* ---------------------------------------------------------------------- */
/* QUIZ SCREEN                                                             */
/* ---------------------------------------------------------------------- */

.quiz__progress-wrap {
  margin-bottom: 36px;
}

.quiz__progress-track {
  height: 6px;
  background: var(--pop-border);
  border-radius: 999px;
  overflow: hidden;
}

.quiz__progress-fill {
  height: 100%;
  width: 10%;
  background: var(--pop-accent);
  border-radius: 999px;
  transition: width var(--transition-base);
}

.quiz__progress-label {
  margin: 10px 0 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--pop-muted);
}

.quiz__card {
  border: 1px solid var(--pop-border);
  border-radius: var(--radius-md);
  padding: 40px 32px;
  margin-bottom: 24px;
  animation: fadeSlide var(--transition-base);
}

@keyframes fadeSlide {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce) {
  .quiz__card { animation: none; }
}

.quiz__question {
  font-size: clamp(1.3rem, 3vw, 1.7rem);
  margin-bottom: 28px;
}

.quiz__options {
  border: 0;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.quiz__option {
  display: block;
  position: relative;
}

.quiz__option input[type="radio"] {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.quiz__option label {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  border: 1.5px solid var(--pop-border);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
  font-size: 16px;
}

.quiz__option label:hover {
  border-color: var(--pop-black);
}

.quiz__option .option-marker {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  border: 1.5px solid var(--pop-muted-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: border-color var(--transition-fast), background-color var(--transition-fast);
}

.quiz__option .option-marker::after {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--pop-accent);
  transform: scale(0);
  transition: transform var(--transition-fast);
}

.quiz__option input[type="radio"]:checked + label {
  border-color: var(--pop-accent);
  background: rgba(236, 23, 124, 0.05);
}

.quiz__option input[type="radio"]:checked + label .option-marker {
  border-color: var(--pop-accent);
}

.quiz__option input[type="radio"]:checked + label .option-marker::after {
  transform: scale(1);
}

.quiz__option input[type="radio"]:focus-visible + label {
  outline: 3px solid var(--pop-accent);
  outline-offset: 2px;
}

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

/* ---------------------------------------------------------------------- */
/* LOADING SCREEN                                                         */
/* ---------------------------------------------------------------------- */

.screen--loading {
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

 .screen--loading[hidden] { display: none; }

.loading__inner {
  text-align: center;
}

.loading__spinner {
  width: 40px;
  height: 40px;
  margin: 0 auto 20px;
  border-radius: 50%;
  border: 3px solid var(--pop-border);
  border-top-color: var(--pop-accent);
  animation: spin 0.8s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
  .loading__spinner { animation: none; border-top-color: var(--pop-accent); }
}

.loading__text {
  color: var(--pop-muted);
  font-size: 15px;
}

/* ---------------------------------------------------------------------- */
/* RESULT SCREEN                                                          */
/* ---------------------------------------------------------------------- */

.result__headline {
  font-size: clamp(2rem, 5vw, 2.8rem);
  margin-bottom: 24px;
}

.result__explanation {
  font-size: 19px;
  color: var(--pop-black);
  margin-bottom: 40px;
}

.result__block {
  padding: 28px 0;
  border-top: 1px solid var(--pop-border);
}

.result__block-title {
  font-size: 15px;
  font-family: var(--font-body);
  font-weight: 700;
  color: var(--pop-black);
  margin-bottom: 14px;
}

.result__list {
  margin: 0;
  padding-left: 20px;
}

.result__list li {
  margin-bottom: 10px;
}

.result__block--question {
  background: var(--pop-bg-soft);
  border-top: none;
  border-radius: var(--radius-md);
  padding: 26px 28px;
  margin: 8px 0;
}

.result__question {
  font-family: var(--font-display);
  font-size: 20px;
  font-style: italic;
  margin: 0;
}

.result__chart-wrap {
  padding: 32px 0;
  border-top: 1px solid var(--pop-border);
}

.result__chart {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 14px;
}

.chart-row {
  display: grid;
  grid-template-columns: 140px 1fr 34px;
  align-items: center;
  gap: 12px;
}

.chart-row__label {
  font-size: 14px;
  font-weight: 600;
}

.chart-row__label.is-primary { color: var(--pop-accent); }

.chart-row__track {
  height: 10px;
  background: var(--pop-bg-soft);
  border: 1px solid var(--pop-border);
  border-radius: 999px;
  overflow: hidden;
}

.chart-row__fill {
  height: 100%;
  background: var(--pop-muted-soft);
  border-radius: 999px;
  transition: width 700ms ease;
  width: 0%;
}

.chart-row__fill.is-primary { background: var(--pop-accent); }

.chart-row__value {
  font-size: 13px;
  color: var(--pop-muted);
  text-align: right;
}

.result__chart-note {
  font-size: 14px;
  color: var(--pop-muted);
  font-style: italic;
}

.result__block--secondary {
  background: var(--pop-bg-soft);
  border-top: none;
  border-radius: var(--radius-md);
  padding: 26px 28px;
}

.result__block--secondary .result__block-title { color: var(--pop-black); }

.result__cta {
  margin-top: 40px;
  padding: 40px 32px;
  background: var(--pop-black);
  color: var(--pop-white);
  border-radius: var(--radius-md);
  text-align: center;
}

.result__cta-headline {
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  color: var(--pop-white);
  margin-bottom: 18px;
}

.result__cta-body {
  color: rgba(255,255,255,0.82);
  max-width: 48ch;
  margin-left: auto;
  margin-right: auto;
}

.result__cta .btn--cta {
  margin-top: 16px;
}

.result__learn-more {
  display: inline-block;
  margin-top: 18px;
  font-size: 14px;
  color: rgba(255,255,255,0.75);
  text-decoration: underline;
}
.result__learn-more:hover { color: var(--pop-white); }

.result__actions {
  display: flex;
  justify-content: center;
  gap: 18px;
  margin-top: 36px;
  flex-wrap: wrap;
}

.result__share-confirm {
  text-align: center;
  color: var(--pop-accent);
  font-size: 14px;
  font-weight: 600;
  height: 1em;
  margin-top: 12px;
}

/* ---------------------------------------------------------------------- */
/* RESPONSIVE ADJUSTMENTS                                                  */
/* ---------------------------------------------------------------------- */

@media (max-width: 480px) {
  body { font-size: 16px; }
  .screen { padding: 32px 18px 64px; }
  .quiz__card { padding: 28px 20px; }
  .quiz__nav { gap: 12px; }
  .chart-row { grid-template-columns: 96px 1fr 30px; }
  .result__cta { padding: 32px 20px; }
  .result__block--question,
  .result__block--secondary { padding: 22px 20px; }
}

@media (min-width: 1440px) {
  body { font-size: 18px; }
  .screen { max-width: 760px; }
}
