/* Charles Public Site - styles.css */

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

:root {
  --primary: #3B82F6;
  --primary-hover: #2563EB;
  --foreground: #0f172a;
  --foreground-muted: #64748b;
  --background: #ffffff;
  --background-subtle: #f8fafc;
  --border: #e2e8f0;
  --radius: 0.5rem;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  line-height: 1.6;
  color: var(--foreground);
  background-color: var(--background);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Container */
.container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* Navigation */
.nav {
  position: sticky;
  top: 0;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}

.nav-container {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 64px;
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  text-decoration: none;
}

.nav-logo-img {
  width: 32px;
  height: auto;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--foreground-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.nav-link:hover {
  color: var(--foreground);
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.875rem 1.75rem;
  font-size: 1.1rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: var(--radius);
  transition: all 0.15s ease;
}

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

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.btn-secondary {
  background-color: transparent;
  color: var(--foreground);
  border: 1px solid var(--border);
}

.btn-secondary:hover {
  background-color: var(--background-subtle);
}

/* Section headers */
.section-header {
  font-size: 2.1rem;
  font-weight: 600;
  margin-bottom: 2.5rem;
  color: var(--foreground);
  position: relative;
  padding-bottom: 1rem;
}

.section-header::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background: var(--primary);
  border-radius: 2px;
}

/* Hero Section */
.hero {
  padding: 5rem 0 4rem;
  background: var(--background);
}

.hero-container {
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-content {
  flex: 1;
}

.hero-logo {
  flex-shrink: 0;
}

.charles-logo {
  width: 340px;
  height: auto;
  border-radius: 50%;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.hero-headline {
  font-size: 3rem;
  font-weight: 600;
  line-height: 1.2;
  max-width: 800px;
  margin-bottom: 1rem;
  color: var(--foreground);
}

.hero-tagline {
  font-size: 1.5rem;
  color: var(--foreground-muted);
  max-width: 700px;
  margin-bottom: 2rem;
  line-height: 1.6;
}

.hero-subheadline {
  font-size: 1.35rem;
  color: var(--foreground-muted);
  max-width: 700px;
  margin-bottom: 2rem;
  line-height: 1.7;
}

.hero-ctas {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.hero-subtext {
  font-size: 1.1rem;
  color: var(--foreground-muted);
}

/* How It Works */
.how-it-works {
  padding: 5rem 0;
  background: var(--background-subtle);
  border-top: 3px solid var(--primary);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.5rem;
}

.card {
  background: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card-title {
  font-size: 1.35rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
  color: var(--primary);
}

.card-text {
  font-size: 1.1rem;
  color: var(--foreground-muted);
  line-height: 1.6;
}

/* Why Charles */
.why-charles {
  padding: 5rem 0;
  background: var(--background);
  border-top: 1px solid var(--border);
}

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

.why-list li {
  font-size: 1.2rem;
  color: var(--foreground-muted);
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.why-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
}

.why-statement {
  font-size: 1.2rem;
  color: var(--foreground);
  font-weight: 500;
  margin-top: 1rem;
}

/* Who It's For */
.who-its-for {
  padding: 5rem 0;
  background: var(--background-subtle);
  border-top: 1px solid var(--border);
}

.who-list {
  list-style: none;
}

.who-list li {
  font-size: 1.2rem;
  color: var(--foreground-muted);
  padding: 0.5rem 0;
  padding-left: 1.5rem;
  position: relative;
}

.who-list li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.9rem;
  width: 6px;
  height: 6px;
  background-color: var(--primary);
  border-radius: 50%;
}

/* About */
.about {
  padding: 5rem 0;
  background: var(--background);
  border-top: 1px solid var(--border);
}

.about-text {
  font-size: 1.2rem;
  color: var(--foreground-muted);
  max-width: 700px;
  margin-bottom: 1rem;
  line-height: 1.7;
}

.about-statement {
  font-size: 1.2rem;
  color: var(--foreground);
  font-weight: 500;
  margin-top: 1.5rem;
}

/* Footer */
.footer {
  padding: 2rem 0;
  background: var(--background-subtle);
  border-top: 1px solid var(--border);
}

.footer-content {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
}

.footer-copyright {
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.footer-link {
  font-size: 0.875rem;
  color: var(--foreground-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-link:hover {
  color: var(--foreground);
}

.footer-disclaimer {
  font-size: 0.8125rem;
  color: var(--foreground-muted);
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 768px) {
  .hero-container {
    flex-direction: column-reverse;
    gap: 2rem;
    text-align: center;
  }

  .hero-content {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .charles-logo {
    width: 220px;
  }

  .hero-headline {
    font-size: 2.25rem;
  }

  .hero-tagline {
    font-size: 1.25rem;
  }

  .hero-subheadline {
    font-size: 1.15rem;
  }

  .hero-ctas {
    flex-direction: column;
    align-items: center;
  }

  .nav-links {
    gap: 1rem;
  }

  .nav-link {
    font-size: 0.875rem;
  }

  .section-header {
    font-size: 1.75rem;
  }

  .cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .nav-container {
    flex-direction: column;
    height: auto;
    padding: 1rem 1.5rem;
    gap: 0.75rem;
  }

  .nav-links {
    width: 100%;
    justify-content: center;
  }

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

  .hero-headline {
    font-size: 1.75rem;
  }

  .hero-tagline {
    font-size: 1.1rem;
  }
}

/* ===========================================
   Purchase Page Styles (Phase 8-Lite)
   =========================================== */

.purchase-section {
  padding: 3rem 0 5rem;
  background: var(--background);
}

.purchase-intro {
  font-size: 1.2rem;
  color: var(--foreground-muted);
  margin-bottom: 2.5rem;
  max-width: 600px;
}

.purchase-form-container {
  max-width: 600px;
}

.purchase-form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

/* Form Elements */
.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.form-label {
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
}

.form-input {
  padding: 0.875rem 1rem;
  font-size: 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--background);
  color: var(--foreground);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.form-input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input::placeholder {
  color: var(--foreground-muted);
  opacity: 0.6;
}

.quantity-input {
  width: 120px;
}

.form-help {
  font-size: 0.875rem;
  color: var(--foreground-muted);
  line-height: 1.5;
}

/* License Type Options */
.license-type-options {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.license-type-option {
  flex: 1;
  min-width: 200px;
}

.license-type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.license-type-card {
  display: flex;
  flex-direction: column;
  padding: 1.25rem;
  border: 2px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}

.license-type-option input[type="radio"]:checked + .license-type-card {
  border-color: var(--primary);
  background-color: rgba(59, 130, 246, 0.05);
}

.license-type-option:hover .license-type-card {
  border-color: var(--primary);
}

.license-type-name {
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.25rem;
}

.license-type-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 0.25rem;
}

.license-type-period {
  font-size: 0.875rem;
  color: var(--foreground-muted);
}

.license-type-savings {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #059669;
  background-color: #d1fae5;
  border-radius: 4px;
  width: fit-content;
}

.license-type-limit {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: #0369a1;
  background-color: #e0f2fe;
  border-radius: 4px;
  width: fit-content;
}

.trial-card {
  border-color: #0ea5e9;
}

.license-type-option input[type="radio"]:checked + .trial-card {
  border-color: #0284c7;
  background-color: #f0f9ff;
}

.trial-unavailable {
  color: #b45309;
  background-color: #fef3c7;
  padding: 0.5rem 0.75rem;
  border-radius: 4px;
  margin-top: 0.5rem;
}

/* Discount Tiers */
.discount-tiers {
  padding: 1rem 1.25rem;
  background: var(--background-subtle);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.discount-tiers-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 0.75rem;
}

.discount-tiers-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.discount-tiers-list li {
  font-size: 0.9375rem;
  color: var(--foreground-muted);
}

.discount-qty {
  display: inline-block;
  width: 120px;
}

.discount-pct {
  font-weight: 500;
  color: #059669;
}

/* Price Summary */
.price-summary {
  padding: 1.25rem;
  background: var(--background-subtle);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.price-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.5rem 0;
}

.price-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.price-label {
  font-size: 1rem;
  color: var(--foreground-muted);
}

.price-value {
  font-size: 1rem;
  font-weight: 500;
  color: var(--foreground);
}

.discount-value {
  color: #059669;
}

.price-total .price-label {
  font-weight: 600;
  color: var(--foreground);
}

.price-total .price-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--primary);
}

/* Purchase Button */
.btn-purchase {
  width: 100%;
  padding: 1rem 2rem;
  font-size: 1.125rem;
  margin-top: 0.5rem;
}

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

.form-disclaimer {
  font-size: 0.8125rem;
  color: var(--foreground-muted);
  text-align: center;
  line-height: 1.5;
}

/* Error Message */
.error-message {
  padding: 1rem 1.25rem;
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: var(--radius);
  color: #dc2626;
  font-size: 0.9375rem;
  margin-top: 1rem;
}

/* ===========================================
   Confirmation Page Styles
   =========================================== */

.confirmation-section {
  padding: 4rem 0 6rem;
  background: var(--background);
}

.confirmation-card {
  max-width: 600px;
  margin: 0 auto;
  text-align: center;
}

.confirmation-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100px;
  height: 100px;
  background-color: #d1fae5;
  border-radius: 50%;
  color: #059669;
  margin-bottom: 1.5rem;
}

.confirmation-title {
  font-size: 2rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.confirmation-message {
  font-size: 1.25rem;
  color: var(--foreground-muted);
  margin-bottom: 1.5rem;
}

.confirmation-details {
  padding: 1rem 1.5rem;
  background: var(--background-subtle);
  border-radius: var(--radius);
  margin-bottom: 2rem;
}

.confirmation-detail-item {
  font-size: 0.9375rem;
  color: var(--foreground-muted);
  word-break: break-all;
}

.confirmation-next-steps {
  text-align: left;
  margin-bottom: 2rem;
}

.next-steps-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 1rem;
}

.next-steps-list {
  padding-left: 1.5rem;
}

.next-steps-list li {
  font-size: 1rem;
  color: var(--foreground-muted);
  padding: 0.5rem 0;
  line-height: 1.6;
}

.confirmation-important {
  padding: 1rem 1.25rem;
  background-color: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: var(--radius);
  color: #92400e;
  font-size: 0.9375rem;
  text-align: left;
  margin-bottom: 2rem;
  line-height: 1.6;
}

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

.confirmation-actions .btn {
  min-width: 180px;
}

/* Responsive Purchase Page */
@media (max-width: 768px) {
  .license-type-options {
    flex-direction: column;
  }

  .license-type-option {
    min-width: 100%;
  }

  .confirmation-actions {
    flex-direction: column;
  }

  .confirmation-actions .btn {
    width: 100%;
  }
}
