/* ===== DESIGN TOKENS ===== */
:root {
  --green-900: #1a3a0a;
  --green-800: #2d5016;
  --green-700: #3a6a1e;
  --green-600: #4a7c2e;
  --green-500: #5a9438;
  --green-400: #6ba344;
  --green-300: #8bbf6a;
  --green-200: #b5d89e;
  --green-100: #dcefd0;
  --green-50: #f0f8ea;

  --sand-100: #f5f0e8;
  --sand-200: #e8e0d0;
  --sand-300: #d4c9b5;

  --text-primary: #2c2c2c;
  --text-secondary: #5a5a5a;
  --text-muted: #888;
  --white: #fff;

  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;

  --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
  --shadow-md: 0 4px 12px rgba(0,0,0,0.1);
  --shadow-lg: 0 8px 30px rgba(0,0,0,0.12);

  --max-width: 1120px;
  --transition: 0.2s ease;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: var(--text-primary);
  background: var(--white);
  line-height: 1.65;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--green-600);
  text-decoration: none;
  transition: color var(--transition);
}

a:hover {
  color: var(--green-800);
}

h1, h2, h3, h4 {
  line-height: 1.25;
  font-weight: 700;
  color: var(--text-primary);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 1.85rem; }
h3 { font-size: 1.35rem; }
h4 { font-size: 1.1rem; }

/* ===== LAYOUT ===== */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 24px;
}

.section {
  padding: 80px 0;
}

.section--sand {
  background: var(--sand-100);
}

.section--green-light {
  background: var(--green-50);
}

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

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

.logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--green-800);
  display: flex;
  align-items: center;
  gap: 8px;
}

.logo svg {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}

.nav a:hover,
.nav a.active {
  color: var(--green-700);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-toggle svg {
  width: 26px;
  height: 26px;
  color: var(--text-primary);
}

/* ===== HERO ===== */
.hero {
  padding: 100px 0 80px;
  text-align: center;
  background: linear-gradient(180deg, var(--green-50) 0%, var(--white) 100%);
}

.hero h1 {
  max-width: 720px;
  margin: 0 auto 20px;
  font-size: 2.75rem;
  letter-spacing: -0.02em;
}

.hero h1 span {
  color: var(--green-600);
}

.hero .subtitle {
  font-size: 1.2rem;
  color: var(--text-secondary);
  max-width: 560px;
  margin: 0 auto 40px;
  line-height: 1.6;
}

/* ===== BUTTONS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  border: none;
  text-decoration: none;
}

.btn--primary {
  background: var(--green-600);
  color: var(--white);
}

.btn--primary:hover {
  background: var(--green-700);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.btn--secondary {
  background: var(--white);
  color: var(--green-700);
  border: 2px solid var(--green-600);
}

.btn--secondary:hover {
  background: var(--green-50);
  color: var(--green-800);
}

.btn--small {
  padding: 10px 22px;
  font-size: 0.9rem;
}

.btn--full {
  width: 100%;
}

/* ===== HOW IT WORKS ===== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
  margin-top: 48px;
}

.step {
  text-align: center;
}

.step-number {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: var(--green-100);
  color: var(--green-700);
  font-size: 1.25rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}

.step h3 {
  margin-bottom: 10px;
}

.step p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

/* ===== SOCIAL PROOF ===== */
.testimonials {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.testimonial {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-md);
  padding: 28px;
}

.testimonial p {
  color: var(--text-secondary);
  font-style: italic;
  margin-bottom: 16px;
  font-size: 0.95rem;
}

.testimonial-author {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
}

.testimonial-role {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ===== PRODUCT CARDS ===== */
.kits {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 48px;
}

.kit-card {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.kit-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-3px);
}

.kit-card--featured {
  border: 2px solid var(--green-400);
  position: relative;
}

.kit-badge {
  position: absolute;
  top: 16px;
  right: 16px;
  background: var(--green-600);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kit-image {
  width: 100%;
  height: 200px;
  background: var(--sand-100);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  padding: 20px;
  border-bottom: 1px solid var(--sand-200);
}

.kit-body {
  padding: 28px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.kit-body h3 {
  margin-bottom: 8px;
}

.kit-desc {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 20px;
}

.kit-includes {
  list-style: none;
  margin-bottom: 24px;
  flex: 1;
}

.kit-includes li {
  padding: 6px 0;
  padding-left: 24px;
  position: relative;
  font-size: 0.9rem;
  color: var(--text-secondary);
}

.kit-includes li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 12px;
  width: 14px;
  height: 14px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%234a7c2e'%3E%3Cpath fill-rule='evenodd' d='M16.707 5.293a1 1 0 010 1.414l-8 8a1 1 0 01-1.414 0l-4-4a1 1 0 011.414-1.414L8 12.586l7.293-7.293a1 1 0 011.414 0z' clip-rule='evenodd'/%3E%3C/svg%3E") no-repeat center / contain;
}

.kit-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--green-800);
  margin-bottom: 16px;
}

.kit-price span {
  font-size: 0.85rem;
  color: var(--text-muted);
  font-weight: 400;
}

/* ===== DECISION GUIDE ===== */
.guide-box {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  padding: 48px;
  max-width: 680px;
  margin: 40px auto 0;
}

.guide-question {
  margin-bottom: 32px;
}

.guide-question:last-of-type {
  margin-bottom: 0;
}

.guide-question label {
  display: block;
  font-weight: 600;
  margin-bottom: 12px;
  font-size: 1.05rem;
}

.guide-options {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.guide-option {
  flex: 1;
  min-width: 140px;
}

.guide-option input {
  display: none;
}

.guide-option span {
  display: block;
  padding: 12px 20px;
  border: 2px solid var(--sand-200);
  border-radius: var(--radius-sm);
  text-align: center;
  cursor: pointer;
  font-size: 0.95rem;
  transition: all var(--transition);
  font-weight: 500;
}

.guide-option input:checked + span {
  border-color: var(--green-500);
  background: var(--green-50);
  color: var(--green-800);
}

.guide-option span:hover {
  border-color: var(--green-300);
}

.guide-result {
  margin-top: 32px;
  padding: 24px;
  background: var(--green-50);
  border-radius: var(--radius-md);
  border: 1px solid var(--green-200);
  display: none;
}

.guide-result.active {
  display: block;
}

.guide-result h4 {
  color: var(--green-800);
  margin-bottom: 8px;
}

.guide-result p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.guide-result a {
  font-weight: 600;
}

/* ===== GUIDE PAGE ===== */
.guide-content {
  max-width: 740px;
  margin: 0 auto;
}

.guide-content h2 {
  margin-top: 56px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-100);
}

.guide-content h2:first-child {
  margin-top: 0;
}

.guide-content p {
  margin-bottom: 16px;
  color: var(--text-secondary);
}

.guide-content ul, .guide-content ol {
  margin-bottom: 16px;
  padding-left: 24px;
}

.guide-content li {
  margin-bottom: 8px;
  color: var(--text-secondary);
}

.guide-content strong {
  color: var(--text-primary);
}

.tip-box {
  background: var(--green-50);
  border-left: 4px solid var(--green-400);
  padding: 20px 24px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 24px 0;
}

.tip-box p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.tip-box strong {
  color: var(--green-700);
}

/* ===== ABOUT PAGE ===== */
.about-content {
  max-width: 680px;
  margin: 0 auto;
}

.about-content p {
  margin-bottom: 20px;
  color: var(--text-secondary);
  font-size: 1.05rem;
}

.about-content p:first-of-type {
  font-size: 1.15rem;
}

/* ===== PAGE HEADER ===== */
.page-header {
  background: var(--green-50);
  padding: 56px 0 48px;
  text-align: center;
}

.page-header h1 {
  margin-bottom: 12px;
}

.page-header p {
  color: var(--text-secondary);
  font-size: 1.1rem;
  max-width: 560px;
  margin: 0 auto;
}

/* ===== CTA BANNER ===== */
.cta-banner {
  text-align: center;
  padding: 72px 0;
  background: var(--green-800);
  color: var(--white);
}

.cta-banner h2 {
  color: var(--white);
  margin-bottom: 16px;
}

.cta-banner p {
  color: var(--green-200);
  max-width: 480px;
  margin: 0 auto 32px;
  font-size: 1.05rem;
}

.cta-banner .btn--primary {
  background: var(--white);
  color: var(--green-800);
}

.cta-banner .btn--primary:hover {
  background: var(--green-100);
}

/* ===== FOOTER ===== */
.footer {
  background: var(--green-900);
  color: var(--green-200);
  padding: 48px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 40px;
}

.footer h4 {
  color: var(--white);
  margin-bottom: 16px;
  font-size: 1rem;
}

.footer p {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--green-300);
}

.footer-links {
  list-style: none;
}

.footer-links li {
  margin-bottom: 8px;
}

.footer-links a {
  color: var(--green-300);
  font-size: 0.9rem;
}

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

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: 24px;
  font-size: 0.8rem;
  color: var(--green-300);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-bottom a {
  color: var(--green-200);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  .kits {
    grid-template-columns: 1fr;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
  }

  .steps {
    grid-template-columns: 1fr;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
    gap: 32px;
  }

  .testimonials {
    grid-template-columns: 1fr;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .footer-bottom {
    flex-direction: column;
    gap: 8px;
    text-align: center;
  }
}

@media (max-width: 768px) {
  h1 { font-size: 2rem; }
  h2 { font-size: 1.5rem; }

  .hero { padding: 64px 0 56px; }
  .hero h1 { font-size: 2.1rem; }
  .hero .subtitle { font-size: 1.05rem; }

  .section { padding: 56px 0; }

  .nav {
    display: none;
    position: absolute;
    top: 68px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px 24px;
    gap: 16px;
    border-bottom: 1px solid var(--sand-200);
    box-shadow: var(--shadow-md);
  }

  .nav.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

  .guide-box {
    padding: 28px 20px;
  }

  .guide-options {
    flex-direction: column;
  }

  .guide-option {
    min-width: auto;
  }

  .page-header {
    padding: 40px 0 36px;
  }

  .cta-banner {
    padding: 56px 0;
  }
}

/* ===== SECTION HEADER ===== */
.section-header {
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}

.section-header p {
  color: var(--text-secondary);
  margin-top: 12px;
  font-size: 1.05rem;
}

/* ===== SHOP TABS ===== */
.shop-tabs {
  display: flex;
  justify-content: center;
  gap: 4px;
  margin-bottom: 48px;
  background: var(--sand-100);
  border-radius: var(--radius-md);
  padding: 4px;
  max-width: 420px;
  margin-left: auto;
  margin-right: auto;
}

.shop-tab {
  flex: 1;
  padding: 12px 24px;
  border: none;
  background: transparent;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}

.shop-tab:hover {
  color: var(--text-primary);
}

.shop-tab.active {
  background: var(--white);
  color: var(--green-700);
  box-shadow: var(--shadow-sm);
}

.shop-panel {
  display: none;
}

.shop-panel.active {
  display: block;
}

/* ===== CUSTOM BUILDER ===== */
.builder {
  display: grid;
  grid-template-columns: 380px 1fr;
  gap: 32px;
  align-items: start;
}

/* Component Picker */
.picker {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.picker-header {
  padding: 20px 24px;
  border-bottom: 1px solid var(--sand-200);
  background: var(--sand-100);
}

.picker-header h3 {
  font-size: 1.1rem;
  margin-bottom: 4px;
}

.picker-header p {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.picker-item {
  display: flex;
  align-items: center;
  padding: 16px 24px;
  border-bottom: 1px solid var(--sand-100);
  gap: 16px;
}

.picker-item:last-child {
  border-bottom: none;
}

.picker-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  background: var(--green-50);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.picker-icon svg {
  width: 22px;
  height: 22px;
  color: var(--green-600);
}

.picker-info {
  flex: 1;
  min-width: 0;
}

.picker-name {
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--text-primary);
  margin-bottom: 2px;
}

.picker-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.picker-price {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green-700);
  white-space: nowrap;
  margin-right: 12px;
}

.picker-qty {
  display: flex;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
}

.picker-qty button {
  width: 32px;
  height: 32px;
  border: 1px solid var(--sand-200);
  background: var(--white);
  font-size: 1.1rem;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all var(--transition);
}

.picker-qty button:hover {
  background: var(--green-50);
  border-color: var(--green-300);
  color: var(--green-700);
}

.picker-qty button:first-child {
  border-radius: var(--radius-sm) 0 0 var(--radius-sm);
}

.picker-qty button:last-child {
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.picker-qty .qty-value {
  width: 36px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  border-top: 1px solid var(--sand-200);
  border-bottom: 1px solid var(--sand-200);
  background: var(--sand-100);
  color: var(--text-primary);
}

.picker-qty .qty-value.has-items {
  background: var(--green-100);
  color: var(--green-800);
}

/* Build Visualizer */
.visualizer {
  position: sticky;
  top: 92px;
}

.diagram-container {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
}

.diagram-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}

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

.diagram-empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.diagram-empty svg {
  width: 48px;
  height: 48px;
  margin: 0 auto 16px;
  color: var(--sand-300);
}

/* Compatibility Panel */
.compat-panel {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 20px;
}

.compat-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--sand-200);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--sand-100);
  display: flex;
  align-items: center;
  gap: 8px;
}

.compat-header svg {
  width: 18px;
  height: 18px;
}

.compat-messages {
  padding: 4px 0;
}

.compat-msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 20px;
  font-size: 0.85rem;
  line-height: 1.5;
}

.compat-msg svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  margin-top: 2px;
}

.compat-msg--error {
  color: #b91c1c;
}

.compat-msg--error svg {
  color: #dc2626;
}

.compat-msg--warn {
  color: #92400e;
}

.compat-msg--warn svg {
  color: #d97706;
}

.compat-msg--ok {
  color: var(--green-700);
}

.compat-msg--ok svg {
  color: var(--green-500);
}

.compat-empty {
  padding: 16px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
}

/* Price Summary */
.price-summary {
  background: var(--white);
  border: 1px solid var(--sand-200);
  border-radius: var(--radius-lg);
  padding: 24px;
}

.price-lines {
  margin-bottom: 16px;
}

.price-line {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  font-size: 0.88rem;
  color: var(--text-secondary);
}

.price-line.hidden {
  display: none;
}

.price-line span:last-child {
  font-weight: 600;
  color: var(--text-primary);
}

.price-total {
  display: flex;
  justify-content: space-between;
  padding-top: 16px;
  border-top: 2px solid var(--sand-200);
  font-size: 1.2rem;
  font-weight: 700;
}

.price-total span:last-child {
  color: var(--green-800);
}

.price-summary .btn {
  margin-top: 16px;
}

.btn--disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== BUILDER RESPONSIVE ===== */
@media (max-width: 900px) {
  .builder {
    grid-template-columns: 1fr;
  }

  .visualizer {
    position: static;
  }

  .shop-tabs {
    max-width: 100%;
  }
}

@media (max-width: 768px) {
  .picker-item {
    flex-wrap: wrap;
    gap: 10px;
  }

  .picker-price {
    margin-right: 0;
  }

  .picker-qty {
    margin-left: auto;
  }

  .picker-info {
    flex-basis: calc(100% - 56px);
  }
}

/* ===== UTILITY ===== */
.text-center { text-align: center; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.mt-48 { margin-top: 48px; }
