/* CSS Variables */
:root {
  --primary: #b81421;
  --primary-600: #a1121e;
  --primary-200: #d34a52;
  --bg: #f7f7f8;
  --card: #ffffff;
  --text: #222222;
  --muted: #666666;
  --border: #e6e6e6;
}

/* Reset & Base */
* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Ubuntu, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

/* Layout */
.container {
  width: min(1120px, 92vw);
  margin-inline: auto;
  padding: 0 1.5rem;
}

.content {
  padding: 2.5rem 0;
}

.content-alt {
  background: var(--card);
  padding: 2.5rem 0;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

/* Grid */
.grid-2 {
  display: grid;
  gap: 2rem;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@media (max-width: 900px) {
  .grid-2 {
    grid-template-columns: 1fr;
  }
}

/* Header */
header {
  background-color: var(--primary);
  color: #ffffff;
}

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

.logo a {
  font-weight: 700;
  font-size: 1.3rem;
  color: #ffffff;
  text-decoration: none;
}

nav a {
  margin-left: 1.5rem;
  font-weight: 600;
  color: #ffffff;
  border-bottom: 2px solid transparent;
  padding-bottom: 0.2rem;
  text-decoration: none;
}

nav a.active,
nav a:hover {
  border-bottom-color: #ffffff;
  text-decoration: none;
}

/* Buttons */
.btn-primary,
.btn-secondary {
  display: inline-block;
  padding: 0.8rem 1.6rem;
  border-radius: 0.6rem;
  text-decoration: none;
  font-weight: 700;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-primary {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.btn-primary:hover {
  background: var(--primary-600);
  border-color: var(--primary-600);
  text-decoration: none;
}

.btn-secondary {
  background: #ffffff;
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  background: #f6f6f7;
  text-decoration: none;
}

/* Hero */
.hero {
  background: linear-gradient(180deg, #ffffff, #fafafb);
  padding: 3rem 0 3.5rem;
  border-bottom: 1px solid var(--border);
}

.hero-inner {
  display: grid;
  gap: 2rem;
  grid-template-columns: 1.2fr 0.8fr;
  align-items: center;
}

@media (max-width: 980px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }
}

.hero-text h1 {
  margin: 0.2rem 0 1rem;
  font-size: clamp(1.6rem, 2.3vw, 2.1rem);
  color: var(--primary);
  line-height: 1.2;
}

.hero-text p {
  color: var(--muted);
  max-width: 720px;
  margin-bottom: 1.5rem;
}

.hero-media img {
  border-radius: 0.8rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 3-Yes Funnel */
.yes-funnel {
  margin-top: 1.5rem;
}

.yes-funnel fieldset {
  border: 1px solid var(--border);
  padding: 1rem;
  border-radius: 0.6rem;
  background: #ffffff;
  margin-bottom: 1rem;
}

.yes-funnel legend {
  font-weight: 700;
  padding: 0 0.3rem;
}

.yes-funnel label {
  display: block;
  margin: 0.5rem 0;
  cursor: pointer;
}

.yes-funnel input[type="checkbox"] {
  margin-right: 0.5rem;
  accent-color: var(--primary);
  cursor: pointer;
}

.yes-funnel .meta-note {
  font-size: 0.9rem;
  color: #555555;
  margin-top: 0.6rem;
  text-align: center;
}

/* Typography */
h1, h2, h3, h4 {
  color: var(--primary);
  margin-top: 0;
  line-height: 1.2;
}

h2 {
  font-size: clamp(1.3rem, 2vw, 1.6rem);
  margin: 2rem 0 0.8rem;
}

h3 {
  font-size: clamp(1.05rem, 1.5vw, 1.15rem);
  margin: 1.5rem 0 0.5rem;
}

h4 {
  margin: 1rem 0 0.3rem;
}

p {
  margin: 0.25rem 0 1rem;
}

/* Lists */
.bullet-list {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.numbered-list {
  list-style: decimal;
  padding-left: 1.5rem;
  margin-bottom: 1.5rem;
}

.bullet-list li,
.numbered-list li {
  margin: 0.5rem 0;
}

/* Chart */
.chart {
  margin: 1.5rem 0 2rem;
}

.chart svg {
  max-width: 100%;
  height: auto;
}

.chart-note {
  color: #666666;
  font-size: 0.9rem;
  margin-top: 0.5rem;
  text-align: center;
}

/* CTA Box */
.cta-box {
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 0.8rem;
  padding: 1.5rem;
  margin-top: 2rem;
  border-left: 4px solid var(--primary);
}

.cta-box h3 {
  margin-top: 0;
}

.cta-box .btn-primary,
.cta-box .btn-secondary {
  margin-right: 0.8rem;
  margin-top: 0.5rem;
}

.cta-inline {
  margin-top: 1rem;
}

/* Testimonials */
.testimonials {
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.testimonials blockquote {
  background: #ffffff;
  border-left: 4px solid var(--primary);
  padding: 1.2rem;
  margin: 0;
  border-radius: 0.4rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.testimonials p {
  margin: 0 0 0.5rem;
}

.testimonials footer {
  color: #666666;
  font-size: 0.9rem;
  font-style: italic;
}

/* Footer CTA */
.footer-cta {
  background: #222222;
  color: #ffffff;
  padding: 2.5rem 0;
  margin-top: 2rem;
}

.footer-cta h2 {
  color: #ffffff;
  margin: 0.2rem 0 0.8rem;
}

.footer-cta p {
  color: #dddddd;
  margin: 0.2rem 0 1.2rem;
}

.footer-cta .btn-primary {
  background: var(--primary);
  border-color: var(--primary);
}

.footer-inner {
  text-align: center;
}

/* Footer links */
.footer-inner a {
  color: #000000;
}

.footer-inner a:hover {
  color: #333333;
  text-decoration: underline;
}

/* Accessibility */
a:focus,
button:focus,
input:focus {
  outline: 3px solid rgba(184, 20, 33, 0.35);
  outline-offset: 2px;
}

/* Interactive Elements - Conversation Generator & Message Builder */
.interactive-box {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 1.5rem;
  margin: 1.5rem 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.interactive-box h3 {
  margin-top: 0;
  color: var(--primary);
}

.question-generator {
  background: linear-gradient(135deg, var(--bg), #ffffff);
  padding: 2rem;
  border-radius: 0.8rem;
  text-align: center;
  margin: 1.5rem 0;
}

.question-generator .output-box {
  background: #ffffff;
  border: 2px solid var(--primary);
  border-radius: 0.6rem;
  padding: 1.5rem;
  margin: 1rem 0;
  min-height: 80px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  box-shadow: 0 2px 8px rgba(184, 20, 33, 0.1);
}

.topic-category {
  display: inline-block;
  padding: 0.4rem 0.8rem;
  margin: 0.3rem;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 1rem;
  cursor: pointer;
  transition: all 0.2s ease;
  font-size: 0.9rem;
}

.topic-category:hover,
.topic-category.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.checklist-item {
  display: flex;
  align-items: center;
  padding: 0.8rem;
  margin: 0.5rem 0;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.checklist-item:hover {
  background: var(--bg);
  border-color: var(--primary-200);
}

.checklist-item input[type="checkbox"] {
  margin-right: 0.8rem;
  width: 20px;
  height: 20px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checklist-item.checked {
  background: #e8f5e9;
  border-color: #4caf50;
}

.checklist-item.checked label {
  text-decoration: line-through;
  color: #666;
}

/* Message Template Builder */
.template-builder {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.8rem;
  padding: 2rem;
  margin: 1.5rem 0;
}

.builder-step {
  margin-bottom: 1.5rem;
}

.builder-step label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--primary);
}

.builder-step select,
.builder-step textarea {
  width: 100%;
  padding: 0.8rem;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  font-family: inherit;
  font-size: 1rem;
}

.builder-step select:focus,
.builder-step textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(184, 20, 33, 0.1);
}

.message-output {
  background: var(--bg);
  border: 2px dashed var(--border);
  border-radius: 0.6rem;
  padding: 1.5rem;
  margin-top: 1rem;
  font-family: monospace;
  white-space: pre-wrap;
  min-height: 100px;
}

.message-output.filled {
  background: #e8f5e9;
  border-style: solid;
  border-color: #4caf50;
}

.score-display {
  display: flex;
  gap: 1rem;
  margin: 1rem 0;
  flex-wrap: wrap;
}

.score-item {
  flex: 1;
  min-width: 120px;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 0.4rem;
  padding: 1rem;
  text-align: center;
}

.score-item .label {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 0.3rem;
}

.score-item .value {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary);
}

.score-item .value.low {
  color: #dc3545;
}

.score-item .value.medium {
  color: #fd7e14;
}

.score-item .value.high {
  color: #28a745;
}

.before-after-slider {
  position: relative;
  margin: 1.5rem 0;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  overflow: hidden;
}

.before-after-slider .section {
  padding: 1.5rem;
}

.before-after-slider .section.bad {
  background: #ffebee;
  border-bottom: 1px solid #ef9a9a;
}

.before-after-slider .section.good {
  background: #e8f5e9;
}

.before-after-slider h4 {
  margin-top: 0;
  color: var(--primary);
}

.comparison-toggle {
  display: flex;
  gap: 0.5rem;
  margin: 1rem 0;
  justify-content: center;
}

.comparison-toggle button {
  padding: 0.5rem 1rem;
  border: 1px solid var(--border);
  background: #ffffff;
  border-radius: 0.3rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.comparison-toggle button.active {
  background: var(--primary);
  color: #ffffff;
  border-color: var(--primary);
}

.tab-content {
  display: none;
}

.tab-content.active {
  display: block;
}

/* Responsive */
@media (max-width: 640px) {
  .header-inner {
    flex-direction: column;
    align-items: flex-start;
    padding-top: 0.75rem;
    padding-bottom: 0.8rem;
  }

  nav {
    margin-top: 0.4rem;
  }

  nav a {
    margin-left: 0;
    margin-right: 1rem;
  }

  .hero {
    padding: 2rem 0 2.5rem;
  }

  .hero-text h1 {
    font-size: 1.5rem;
  }

  .btn-primary,
  .btn-secondary {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 0.6rem;
  }

  .cta-box .btn-primary,
  .cta-box .btn-secondary {
    display: block;
    width: 100%;
    margin-right: 0;
  }

  .score-display {
    flex-direction: column;
  }

  .topic-category {
    display: block;
    margin: 0.3rem 0;
  }
}
