/* ==========================================================================
   SetupWise — Design System
   Brand: SetupWise — Build Your Perfect Setup
   Visual Identity: Premium editorial, warm ivory surfaces, deep charcoal,
   forest-green/olive accents, strong typography, generous spacing.
   ========================================================================== */

/* ------------------------------------------------------------------ */
/* Design Tokens                                                      */
/* ------------------------------------------------------------------ */
:root {
  /* Brand colors — forest green / olive palette */
  --sw-color-green-dark:  #2d5a27;
  --sw-color-green:       #4a7c43;
  --sw-color-green-light: #a8c98f;
  --sw-color-olive:       #6b7a47;
  --sw-color-olive-light: #d4d8b8;

  /* Neutral surfaces — warm ivory / off-white */
  --sw-color-surface:     #fbfaf5;      /* warm ivory */
  --sw-color-surface-2:   #f2f0e7;      /* slightly darker ivory */
  --sw-color-surface-3:   #e8e5d8;      /* muted ivory */
  --sw-color-text-dark:   #1a1a18;      /* deep charcoal */
  --sw-color-text-med:    #3d3d38;
  --sw-color-text-light:  #6b6b66;
  --sw-color-text-muted:  #8a8a84;

  /* Accent colors */
  --sw-color-accent:      #2d5a27;
  --sw-color-accent-hover:#3d7033;
  --sw-color-accent-bg:   #eef4e9;

  /* Semantic colors */
  --sw-color-success:     #2d5a27;
  --sw-color-warning:     #b58900;
  --sw-color-error:       #c0392b;
  --sw-color-info:        #2c6e7d;

  /* Typography */
  --sw-font-serif:  'Source Serif Pro', Georgia, serif;
  --sw-font-sans:   'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

  /* Spacing */
  --sw-space-xs:  0.5rem;
  --sw-space-sm:  1rem;
  --sw-space-md:  1.5rem;
  --sw-space-lg:  2rem;
  --sw-space-xl:  3rem;
  --sw-space-xxl: 4rem;

  /* Borders & radius */
  --sw-border-radius: 8px;
  --sw-border-radius-lg: 12px;
  --sw-border-color:    #d8d6c6;

  /* Shadows */
  --sw-shadow-sm:  0 1px 3px rgba(0,0,0,0.06);
  --sw-shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --sw-shadow-lg:  0 8px 24px rgba(0,0,0,0.10);

  /* Transitions */
  --sw-transition: 0.2s ease;
}

/* ------------------------------------------------------------------ */
/* Reset & Base                                                       */
/* ------------------------------------------------------------------ */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--sw-font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--sw-color-text-dark);
  background: var(--sw-color-surface);
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--sw-font-serif);
  font-weight: 600;
  color: var(--sw-color-text-dark);
  line-height: 1.25;
}

h1 { font-size: 2.5rem; margin-bottom: 1rem; }
h2 { font-size: 2rem; margin-bottom: 0.875rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.25rem; margin-bottom: 0.625rem; }
h5 { font-size: 1.125rem; margin-bottom: 0.5rem; }

p {
  margin-bottom: 1rem;
  color: var(--sw-color-text-med);
}

a {
  color: var(--sw-color-accent);
  text-decoration: none;
  transition: color var(--sw-transition);
}

a:hover {
  color: var(--sw-color-accent-hover);
  text-decoration: underline;
}

a:focus-visible {
  outline: 2px solid var(--sw-color-accent);
  outline-offset: 2px;
}

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

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--sw-color-accent);
  color: #fff;
  padding: 0.75rem 1.5rem;
  text-decoration: none;
  border-radius: var(--sw-border-radius);
  z-index: 10000;
}

.skip-link:focus {
  top: 1rem;
}

/* ------------------------------------------------------------------ */
/* Buttons                                                            */
/* ------------------------------------------------------------------ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  font-family: var(--sw-font-sans);
  font-size: 0.95rem;
  font-weight: 600;
  border: none;
  border-radius: var(--sw-border-radius);
  cursor: pointer;
  text-decoration: none;
  transition: all var(--sw-transition);
}

.btn-primary {
  background: var(--sw-color-accent);
  color: #fff;
}

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

.btn-secondary {
  background: transparent;
  color: var(--sw-color-text-dark);
  border: 2px solid var(--sw-color-text-dark);
}

.btn-secondary:hover {
  background: var(--sw-color-text-dark);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--sw-color-text-dark);
  border: 2px solid var(--sw-border-color);
}

.btn-outline:hover {
  border-color: var(--sw-color-accent);
  color: var(--sw-color-accent);
}

.btn-ghost {
  background: transparent;
  color: var(--sw-color-text-light);
}

.btn-ghost:hover {
  color: var(--sw-color-accent);
}

.btn-sm {
  padding: 0.5rem 1rem;
  font-size: 0.875rem;
}

.btn-lg {
  padding: 1rem 2rem;
  font-size: 1.125rem;
}

.btn-block {
  width: 100%;
}

/* ------------------------------------------------------------------ */
/* Cards                                                              */
/* ------------------------------------------------------------------ */
.card {
  background: #fff;
  border: 1px solid var(--sw-border-color);
  border-radius: var(--sw-border-radius-lg);
  overflow: hidden;
  transition: transform var(--sw-transition), box-shadow var(--sw-transition);
}

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

.card-header {
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--sw-border-color);
  background: var(--sw-color-surface-2);
}

.card-body {
  padding: 1.5rem;
}

.card-footer {
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--sw-border-color);
  background: var(--sw-color-surface-2);
}

/* ------------------------------------------------------------------ */
/* Header                                                             */
/* ------------------------------------------------------------------ */
.sw-header {
  background: #fff;
  border-bottom: 1px solid var(--sw-border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.sw-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 0;
}

.sw-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
}

.sw-brand-mark {
  background: var(--sw-color-accent);
  color: #fff;
  width: 44px;
  height: 44px;
  border-radius: var(--sw-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.25rem;
}

.sw-brand-text {
  display: flex;
  flex-direction: column;
}

.sw-brand-name {
  font-family: var(--sw-font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sw-color-text-dark);
  line-height: 1.1;
}

.sw-brand-tagline {
  font-size: 0.75rem;
  color: var(--sw-color-text-light);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

.sw-nav {
  display: none;
  gap: 2rem;
  align-items: center;
}

.sw-nav-link {
  font-family: var(--sw-font-sans);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--sw-color-text-dark);
  text-decoration: none;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: all var(--sw-transition);
}

.sw-nav-link:hover,
.sw-nav-link.active {
  color: var(--sw-color-accent);
  border-bottom-color: var(--sw-color-accent);
  text-decoration: none;
}

.sw-nav-cta {
  background: var(--sw-color-accent);
  color: #fff;
  padding: 0.625rem 1.25rem;
  border-radius: var(--sw-border-radius);
  font-weight: 600;
  text-decoration: none;
}

.sw-nav-cta:hover {
  background: var(--sw-color-accent-hover);
  color: #fff;
  text-decoration: none;
}

.sw-mobile-toggle {
  background: none;
  border: none;
  color: var(--sw-color-text-dark);
  font-size: 1.25rem;
  cursor: pointer;
  display: none;
}

/* ------------------------------------------------------------------ */
/* Hero Section                                                       */
/* ------------------------------------------------------------------ */
.sw-hero {
  background: var(--sw-color-accent);
  color: #fff;
  padding: 4rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sw-hero::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.1) 0%, transparent 70%);
}

.sw-hero h1 {
  color: #fff;
  font-size: 3rem;
  margin-bottom: 1rem;
  position: relative;
  z-index: 1;
}

.sw-hero p {
  color: rgba(255,255,255,0.9);
  font-size: 1.25rem;
  max-width: 650px;
  margin: 0 auto 2rem;
  line-height: 1.7;
}

.sw-hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ------------------------------------------------------------------ */
/* Sections                                                           */
/* ------------------------------------------------------------------ */
.sw-section {
  padding: 4rem 0;
}

.sw-section.bg-light {
  background: var(--sw-color-surface);
}

.sw-section-header {
  text-align: center;
  margin-bottom: 3rem;
}

.sw-section-eyebrow {
  display: inline-block;
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--sw-color-accent);
  margin-bottom: 0.5rem;
}

.sw-section-title {
  font-family: var(--sw-font-serif);
  font-size: 2.5rem;
  color: var(--sw-color-text-dark);
  margin-bottom: 1rem;
}

.sw-section-subtitle {
  font-size: 1.125rem;
  color: var(--sw-color-text-light);
  max-width: 650px;
  margin: 0 auto;
}

/* ------------------------------------------------------------------ */
/* Feature Cards (non-card layout)                                    */
/* ------------------------------------------------------------------ */
.sw-feature {
  padding: 2rem;
  border-radius: var(--sw-border-radius-lg);
  background: #fff;
  border: 1px solid var(--sw-border-color);
}

.sw-feature-icon {
  width: 48px;
  height: 48px;
  background: var(--sw-color-accent-bg);
  border-radius: var(--sw-border-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  margin-bottom: 1rem;
  color: var(--sw-color-accent);
}

.sw-feature h3 {
  font-family: var(--sw-font-serif);
  margin-bottom: 0.5rem;
}

.sw-feature p {
  color: var(--sw-color-text-light);
  font-size: 0.95rem;
  line-height: 1.7;
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ */
/* Product Cards                                                      */
/* ------------------------------------------------------------------ */
.product-card {
  background: #fff;
  border: 1px solid var(--sw-border-color);
  border-radius: var(--sw-border-radius-lg);
  overflow: hidden;
  transition: transform var(--sw-transition), box-shadow var(--sw-transition);
  height: 100%;
}

.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--sw-shadow-lg);
}

.product-image {
  position: relative;
  height: 240px;
  background: var(--sw-color-surface-2);
  overflow: hidden;
}

.product-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--sw-transition);
}

.product-card:hover .product-image img {
  transform: scale(1.05);
}

.product-badge {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: var(--sw-color-accent);
  color: #fff;
  padding: 0.375rem 0.75rem;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.product-content {
  padding: 1.5rem;
}

.product-category {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--sw-color-accent);
  margin-bottom: 0.5rem;
}

.product-title {
  font-family: var(--sw-font-serif);
  font-size: 1.25rem;
  margin-bottom: 0.5rem;
  color: var(--sw-color-text-dark);
}

.product-description {
  font-size: 0.9rem;
  color: var(--sw-color-text-light);
  line-height: 1.6;
  margin-bottom: 1rem;
}

.product-price {
  font-family: var(--sw-font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sw-color-text-dark);
  margin-bottom: 1rem;
}

.product-price .sale {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--sw-color-success);
  margin-left: 0.5rem;
}

/* ------------------------------------------------------------------ */
/* Comparison Table                                                   */
/* ------------------------------------------------------------------ */
.sw-comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: #fff;
  border: 1px solid var(--sw-border-color);
  border-radius: var(--sw-border-radius-lg);
  overflow: hidden;
}

.sw-comparison-table th,
.sw-comparison-table td {
  padding: 1rem;
  border-bottom: 1px solid var(--sw-border-color);
  border-right: 1px solid var(--sw-border-color);
  text-align: left;
  vertical-align: top;
}

.sw-comparison-table th:last-child,
.sw-comparison-table td:last-child {
  border-right: none;
}

.sw-comparison-table th {
  background: var(--sw-color-surface-2);
  font-family: var(--sw-font-serif);
  font-weight: 600;
  color: var(--sw-color-text-dark);
  border-bottom: 2px solid var(--sw-color-accent);
}

.sw-comparison-table tr:last-child td {
  border-bottom: none;
}

.sw-comparison-table tr:hover {
  background: var(--sw-color-surface-2);
}

.sw-badge-compatible {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(45, 90, 39, 0.1);
  color: var(--sw-color-accent);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.sw-badge-incompatible {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(192, 57, 43, 0.1);
  color: var(--sw-color-error);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

.sw-badge-unknown {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.75rem;
  background: rgba(138, 138, 132, 0.1);
  color: var(--sw-color-text-muted);
  border-radius: 4px;
  font-size: 0.875rem;
  font-weight: 600;
}

/* ------------------------------------------------------------------ */
/* Setup Plan Cards                                                   */
/* ------------------------------------------------------------------ */
.sw-plan-card {
  background: #fff;
  border: 2px solid var(--sw-border-color);
  border-radius: var(--sw-border-radius-lg);
  overflow: hidden;
  transition: all var(--sw-transition);
}

.sw-plan-card:hover {
  border-color: var(--sw-color-accent);
  transform: translateY(-2px);
  box-shadow: var(--sw-shadow-lg);
}

.sw-plan-card.featured {
  border-color: var(--sw-color-accent);
  background: var(--sw-color-accent-bg);
}

.sw-plan-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--sw-border-color);
}

.sw-plan-title {
  font-family: var(--sw-font-serif);
  font-size: 1.5rem;
  margin-bottom: 0.25rem;
}

.sw-plan-subtitle {
  font-size: 0.875rem;
  color: var(--sw-color-text-light);
  margin-bottom: 1rem;
}

.sw-plan-price {
  font-family: var(--sw-font-serif);
  font-size: 2rem;
  font-weight: 700;
  color: var(--sw-color-text-dark);
}

.sw-plan-price .currency {
  font-size: 1rem;
  vertical-align: top;
}

.sw-plan-body {
  padding: 1.5rem;
}

.sw-plan-list {
  list-style: none;
  margin-bottom: 1.5rem;
}

.sw-plan-list li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--sw-border-color);
  color: var(--sw-color-text-med);
  font-size: 0.95rem;
}

.sw-plan-list li:last-child {
  border-bottom: none;
}

.sw-plan-cta {
  padding: 1.5rem;
  border-top: 1px solid var(--sw-border-color);
  background: var(--sw-color-surface-2);
}

/* ------------------------------------------------------------------ */
/* Form Elements                                                      */
/* ------------------------------------------------------------------ */
.sw-form-group {
  margin-bottom: 1.25rem;
}

.sw-form-label {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--sw-color-text-dark);
  margin-bottom: 0.5rem;
}

.sw-form-control {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid var(--sw-border-color);
  border-radius: var(--sw-border-radius);
  font-family: var(--sw-font-sans);
  font-size: 0.95rem;
  background: #fff;
}

.sw-form-control:focus {
  outline: none;
  border-color: var(--sw-color-accent);
  box-shadow: 0 0 0 3px rgba(45, 90, 39, 0.1);
}

.sw-select,
.sw-radio-group,
.sw-checkbox-group {
  margin-bottom: 1.25rem;
}

/* Radio and Checkbox */
.sw-radio-group label,
.sw-checkbox-group label {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.95rem;
  color: var(--sw-color-text-dark);
  cursor: pointer;
}

.sw-radio-group input[type="radio"],
.sw-checkbox-group input[type="checkbox"] {
  accent-color: var(--sw-color-accent);
}

/* ------------------------------------------------------------------ */
/* Honesty Badge (for demos)                                          */
/* ------------------------------------------------------------------ */
.sw-demo-badge {
  position: fixed;
  bottom: 1rem;
  right: 1rem;
  z-index: 9999;
  background: rgba(29, 53, 37, 0.9);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  box-shadow: var(--sw-shadow-md);
  letter-spacing: 0.05em;
}

/* ------------------------------------------------------------------ */
/* Footer                                                             */
/* ------------------------------------------------------------------ */
.sw-footer {
  background: var(--sw-color-text-dark);
  color: #fff;
  padding: 4rem 0 2rem;
}

.sw-footer h5 {
  color: #fff;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
}

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

.sw-footer-links li {
  margin-bottom: 0.75rem;
}

.sw-footer-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.95rem;
}

.sw-footer-links a:hover {
  color: #fff;
  text-decoration: none;
}

.sw-footer-bottom {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  font-size: 0.875rem;
  color: rgba(255,255,255,0.5);
}

.sw-footer-bottom a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  margin-left: 1rem;
}

.sw-footer-bottom a:hover {
  color: #fff;
}

/* ------------------------------------------------------------------ */
/* Responsive                                                         */
/* ------------------------------------------------------------------ */
@media (max-width: 768px) {
  .sw-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    padding: 1rem;
    border: 1px solid var(--sw-border-color);
    border-top: none;
  }

  .sw-nav.active {
    display: flex;
  }

  .sw-mobile-toggle {
    display: block;
  }

  .sw-header-inner {
    flex-wrap: wrap;
    gap: 1rem;
  }

  .sw-hero h1 {
    font-size: 2rem;
  }

  .sw-section-title {
    font-size: 2rem;
  }

  .sw-section {
    padding: 3rem 0;
  }

  .sw-footer-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .sw-hero-actions {
    flex-direction: column;
  }

  .sw-hero-actions .btn {
    width: 100%;
  }

  .sw-comparison-table {
    font-size: 0.875rem;
  }

  .sw-comparison-table th,
  .sw-comparison-table td {
    padding: 0.75rem 0.5rem;
  }
}

/* ------------------------------------------------------------------ */
/* Reduced Motion                                                     */
/* ------------------------------------------------------------------ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }
}