/* ===================================================
   BeforeIBuyThis.com — Stylesheet
   Mobile-first, responsive
=================================================== */

:root {
  --bg:           #f7f6f2;
  --surface:      #ffffff;
  --surface-2:    #f0efe9;
  --border:       #e2e0d8;
  --text:         #1a1a18;
  --text-2:       #5a5a54;
  --text-3:       #9a9990;
  --accent:       #e05a2b;
  --accent-soft:  #faeae2;
  --accent-hover: #c44d22;
  --green:        #1a7f5a;
  --green-soft:   #e2f5ee;
  --amber:        #b06b10;
  --amber-soft:   #fef3e2;
  --red:          #c0312b;
  --red-soft:     #fdecea;
  --font-head:    'Sora', sans-serif;
  --font-body:    'DM Sans', sans-serif;
  --radius-sm:    6px;
  --radius-md:    10px;
  --radius-lg:    16px;
  --shadow-sm:    0 1px 4px rgba(0,0,0,0.06);
  --shadow-md:    0 4px 20px rgba(0,0,0,0.08);
}

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

html, body {
  overflow-x: hidden;
  width: 100%;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ===== UTILITIES ===== */
.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ===== HEADER ===== */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.logo-link {
  display: flex;
  align-items: center;
  text-decoration: none;
  color: var(--text);
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark-svg {
  height: 22px;
  width: auto;
  color: var(--accent);
}

.logo-wordmark {
  font-family: var(--font-head);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
}

.logo-before { color: var(--text); }
.logo-accent { color: var(--accent); }

.site-nav {
  display: flex;
  gap: 1.5rem;
}

.site-nav a {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}

.site-nav a:hover { color: var(--accent); }

/* ===== AD SLOTS ===== */
.ad-slot { width: 100%; }

.ad-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 90px;
  background: var(--surface-2);
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  color: var(--text-3);
  font-size: 0.75rem;
  font-family: var(--font-body);
  letter-spacing: 0.05em;
}

.ad-sidebar .ad-placeholder {
  min-height: 250px;
}

/* ===== HERO ===== */
.hero {
  padding: 3rem 0 2rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}

.hero-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.hero-text { flex: 1; min-width: 0; }

.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  font-family: var(--font-head);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 4px 12px;
  border-radius: 99px;
  margin-bottom: 1rem;
}

.hero-heading {
  font-family: var(--font-head);
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  line-height: 1.15;
  color: var(--text);
  margin-bottom: 1rem;
}

.hero-heading em {
  font-style: normal;
  color: var(--accent);
}

.hero-sub {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 1.5rem;
  max-width: 440px;
}

.hero-platforms {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.platform-tag {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-2);
  background: var(--surface-2);
  border: 1px solid var(--border);
  padding: 4px 12px;
  border-radius: 99px;
}

.hero-visual {
  flex-shrink: 0;
  display: none;
}

.hero-icon { width: 120px; height: 120px; }

@media (min-width: 640px) {
  .hero-visual { display: block; }
}

/* ===== MAIN LAYOUT ===== */
.main-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding-top: 2rem;
  padding-bottom: 4rem;
  align-items: start;
}

@media (min-width: 900px) {
  .main-layout {
    grid-template-columns: 1fr 300px;
  }
}

/* ===== QUIZ CARD ===== */
.quiz-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-md);
  min-width: 0;
}

.quiz-top { margin-bottom: 1.25rem; }

.item-label {
  display: block;
  font-family: var(--font-head);
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.quiz-top input[type="text"] {
  width: 100%;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  color: var(--text);
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  outline: none;
  transition: border-color 0.2s;
}

.quiz-top input[type="text"]:focus { border-color: var(--accent); }
.quiz-top input[type="text"]::placeholder { color: var(--text-3); }

/* Progress bar */
.progress-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.5rem;
}

.progress-bar-wrap {
  flex: 1;
  height: 5px;
  background: var(--surface-2);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: 99px;
  transition: width 0.3s ease;
}

.progress-label {
  font-size: 0.75rem;
  color: var(--text-3);
  white-space: nowrap;
  font-family: var(--font-body);
}

/* Question sections */
.q-section { margin-bottom: 1.25rem; }

.q-section-label {
  font-family: var(--font-head);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border);
}

.q-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
}

.q-row:last-child { border-bottom: none; }

.q-row-multi {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.q-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.45;
  flex: 1;
  min-width: 0;
}

.q-toggle {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.btn-yn {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-yn:hover { border-color: var(--text-2); }

.btn-yn.active-yes,
.btn-yn.active-no {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* Multi-option buttons */
.q-multi-opts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex-shrink: 0;
}

.btn-multi {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 5px 12px;
  border-radius: var(--radius-sm);
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.15s;
}

.btn-multi:hover { border-color: var(--text-2); }

.btn-multi.active-yes,
.btn-multi.active-mid,
.btn-multi.active-no {
  background: var(--accent-soft);
  color: var(--accent);
  border-color: var(--accent);
  font-weight: 600;
}

/* Analyze button */
.analyze-btn {
  width: 100%;
  margin-top: 1.25rem;
  padding: 14px;
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.01em;
}

.analyze-btn:hover { background: var(--accent-hover); }
.analyze-btn:active { transform: scale(0.98); }

/* Result box */
.result-box {
  margin-top: 1.5rem;
  padding: 1.25rem;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border);
  background: var(--surface-2);
  animation: fadeIn 0.3s ease;
}

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

.result-verdict {
  font-family: var(--font-head);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.result-verdict.buy   { color: var(--green); }
.result-verdict.maybe { color: var(--amber); }
.result-verdict.skip  { color: var(--red); }

.result-score-wrap { margin: 10px 0 1rem; }

.result-score-bar {
  height: 7px;
  background: var(--border);
  border-radius: 99px;
  overflow: hidden;
}

.result-score-fill {
  height: 100%;
  border-radius: 99px;
  transition: width 0.5s ease;
}

.result-reasons {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
}

.reason-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 5px;
}

.reason-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-top: 7px;
  flex-shrink: 0;
}

.reset-btn {
  margin-top: 1rem;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 0.875rem;
  color: var(--text-3);
  cursor: pointer;
  text-decoration: underline;
  padding: 0;
  display: block;
  width: 100%;
  text-align: center;
  transition: color 0.2s;
}

.reset-btn:hover { color: var(--text); }

/* ===== UNANSWERED HIGHLIGHT ===== */
.q-row.unanswered,
.q-row-multi.unanswered {
  background: #fff8f5;
  border-radius: var(--radius-sm);
  padding-left: 8px;
  padding-right: 8px;
  margin-left: -8px;
  margin-right: -8px;
  outline: 1.5px solid var(--accent);
  animation: pulse-highlight 0.4s ease;
}

@keyframes pulse-highlight {
  0%   { outline-color: transparent; }
  50%  { outline-color: var(--accent); }
  100% { outline-color: var(--accent); }
}

/* ===== SIDEBAR ===== */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.sidebar-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
}

.sidebar-card-title {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.875rem;
}

.how-list {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.how-list li {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.55;
}

.how-list strong {
  color: var(--text);
  font-weight: 500;
}

.sidebar-card p {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 0.75rem;
}

.sidebar-card p:last-child { margin-bottom: 0; }

/* ===== FOOTER ===== */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: 2rem 0;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.75rem;
  text-align: center;
}

.footer-logo { color: var(--text-2); }

.footer-copy {
  font-size: 0.825rem;
  color: var(--text-3);
  max-width: 420px;
  line-height: 1.6;
}

.footer-disclaimer {
  font-size: 0.75rem;
  color: var(--text-3);
  max-width: 420px;
  line-height: 1.5;
  font-style: italic;
}

.footer-links { font-size: 0.825rem; color: var(--text-3); }

.footer-links a {
  color: var(--text-3);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-links a:hover { color: var(--accent); }

/* ===== PROSE PAGES (privacy, contact) ===== */
.prose-page {
  padding-top: 2.5rem;
  padding-bottom: 4rem;
  max-width: 720px;
}

.prose-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.prose-title {
  font-family: var(--font-head);
  font-size: clamp(1.5rem, 4vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.375rem;
}

.prose-date {
  font-size: 0.825rem;
  color: var(--text-3);
  margin-bottom: 2rem;
}

.prose-lead {
  font-size: 1rem;
  color: var(--text-2);
  line-height: 1.7;
  margin-bottom: 2rem;
}

.prose-section { margin-bottom: 1.75rem; }

.prose-section h2 {
  font-family: var(--font-head);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.625rem;
}

.prose-section p {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.75;
  margin-bottom: 0.625rem;
}

.prose-section p:last-child { margin-bottom: 0; }

.prose-section ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.375rem;
  margin-bottom: 0.75rem;
}

.prose-section li {
  font-size: 0.9rem;
  color: var(--text-2);
  line-height: 1.6;
}

.prose-section a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-soft);
  transition: border-color 0.2s;
}

.prose-section a:hover { border-color: var(--accent); }

/* ===== CONTACT PAGE ===== */
.contact-card { max-width: 560px; }

.contact-block {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  padding: 1.25rem;
  background: var(--accent-soft);
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
}

.contact-icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  background: var(--surface);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--accent);
}

.contact-icon svg { width: 20px; height: 20px; }

.contact-label {
  font-size: 0.8rem;
  color: var(--text-3);
  margin-bottom: 2px;
}

.contact-email {
  display: block;
  font-family: var(--font-head);
  font-size: 1.0625rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  margin-bottom: 6px;
  transition: color 0.2s;
}

.contact-email:hover { color: var(--accent-hover); }

.contact-note {
  font-size: 0.825rem;
  color: var(--text-2);
  line-height: 1.5;
}

.contact-divider {
  height: 1px;
  background: var(--border);
  margin-bottom: 1.5rem;
}

.contact-reasons h2 {
  font-family: var(--font-head);
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.75rem;
}

.contact-reasons ul {
  padding-left: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.contact-reasons li {
  font-size: 0.875rem;
  color: var(--text-2);
  line-height: 1.6;
}

.contact-back {
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-2);
  text-decoration: none;
  transition: color 0.2s;
}

.back-link:hover { color: var(--accent); }
.back-link svg { width: 14px; height: 14px; }

/* ===== MOBILE TWEAKS ===== */
@media (max-width: 600px) {
  .site-nav { display: none; }
  .hero { padding: 2rem 0 1.5rem; }
  .quiz-card { padding: 1.25rem 1rem; }
  .btn-yn { padding: 5px 9px; }
  .q-row-multi {
    flex-direction: column;
    align-items: flex-start;
  }
  .q-row-multi .q-text { margin-bottom: 8px; }
  .q-multi-opts {
    width: 100%;
    flex-direction: column;
  }
  .btn-multi {
    width: 100%;
    text-align: center;
    padding: 8px 12px;
  }
}
