/* ============================================================
   Clearwork Guides - Component Styles
   Dark-first design system components.
   Requires tokens.css for custom property definitions.
   ============================================================ */


/* ----------------------------------------------------------
   1. Product Cards
   ---------------------------------------------------------- */

.product-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  border-left: 4px solid var(--accent);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  transition: all var(--transition-base);
  position: relative;
  overflow: hidden;
}

.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 40px rgba(212, 145, 94, 0.12);
  border-left-color: var(--accent-light);
}

.product-card__category {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-3);
}

.product-card__title {
  font-family: var(--font-display);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-2);
  line-height: var(--leading-tight);
}

.product-card__desc {
  color: var(--text-muted);
  font-size: var(--text-sm);
  margin-bottom: var(--space-5);
  line-height: var(--leading-relaxed);
  flex: 1;
}

.product-card__price {
  font-family: var(--font-mono);
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--accent);
  margin-bottom: var(--space-5);
}

.product-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-6) 0;
}

.product-card__features li {
  padding: var(--space-2) 0;
  padding-left: var(--space-6);
  position: relative;
  color: var(--text-muted);
  font-size: var(--text-sm);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.product-card__features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}

.product-card__cta {
  display: block;
  text-align: center;
  background: transparent;
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 12px 24px;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--transition-fast);
}

.product-card__cta:hover {
  background: var(--accent);
  color: var(--bg);
}


/* ----------------------------------------------------------
   2. Feature / Benefit Cards
   ---------------------------------------------------------- */

.feature-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--border);
}

.feature-card__icon {
  width: 48px;
  height: 48px;
  background: var(--accent-glow);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--space-4);
  color: var(--accent);
}

.feature-card__icon svg {
  width: 24px;
  height: 24px;
}

.feature-card__title {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-2);
}

.feature-card__desc {
  color: var(--text-muted);
  font-size: var(--text-sm);
  line-height: var(--leading-relaxed);
}


/* ----------------------------------------------------------
   3. Bento Grid Feature Layout
   ---------------------------------------------------------- */

.bento-grid {
  display: grid;
  gap: var(--space-6);
}

@media (min-width: 768px) {
  .bento-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .bento-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .bento-grid .feature-card:first-child {
    grid-column: span 2;
  }
}


/* ----------------------------------------------------------
   4. Pricing Cards
   ---------------------------------------------------------- */

.pricing-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  display: flex;
  flex-direction: column;
  border: 2px solid var(--border);
  position: relative;
}

.pricing-card--popular {
  border-color: var(--accent);
  box-shadow: var(--shadow-accent);
}

.pricing-card__badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--accent);
  color: var(--bg);
  padding: 4px 20px;
  border-radius: var(--radius-full);
  font-size: var(--text-xs);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  white-space: nowrap;
}

.pricing-card__tier {
  font-family: var(--font-body);
  font-size: var(--text-xl);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.pricing-card__price {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--text);
  line-height: 1;
}

.pricing-card__period {
  font-size: var(--text-sm);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}

.pricing-card__features {
  list-style: none;
  padding: 0;
  margin: 0 0 var(--space-8) 0;
  flex: 1;
}

.pricing-card__features li {
  padding: var(--space-2) 0;
  padding-left: var(--space-6);
  position: relative;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

.pricing-card__features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--success);
  font-weight: bold;
}

.pricing-card .btn {
  width: 100%;
}


/* ----------------------------------------------------------
   5. Hero Section
   ---------------------------------------------------------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--space-20) 0;
}

@media (min-width: 1024px) {
  .hero {
    padding: 7rem 0;
  }
}

.hero--dark {
  background: var(--bg);
}

.hero__glow {
  position: absolute;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
  pointer-events: none;
  filter: blur(40px);
  opacity: 0.6;
  transition: transform 0.1s linear;
}

.hero__content {
  position: relative;
  z-index: 2;
}

.hero__title {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: var(--space-6);
  background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero__subtitle {
  font-size: var(--text-xl);
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: var(--space-8);
  line-height: var(--leading-relaxed);
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-full);
  padding: 6px 16px;
  font-size: var(--text-xs);
  font-family: var(--font-mono);
  color: var(--text-muted);
  margin-bottom: var(--space-6);
}


/* ----------------------------------------------------------
   6. CTA Section (light background)
   ---------------------------------------------------------- */

.cta-section {
  background: var(--bg-light);
  color: var(--bg);
  padding: var(--space-20) 0;
}

.cta-section .cta-title {
  font-family: var(--font-display);
  color: var(--bg);
  font-size: var(--text-4xl);
}

.cta-section p {
  color: #5a5a6e;
}

.cta-grid {
  display: grid;
  gap: var(--space-8);
  align-items: center;
}

@media (min-width: 1024px) {
  .cta-grid {
    grid-template-columns: 1fr 1fr;
  }
}

.cta-card {
  background: var(--surface-light);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid #e8e6e3;
  box-shadow: var(--shadow-sm);
}

.cta-card__label {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: var(--space-4);
}

.cta-card__price {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 700;
  color: var(--bg);
}

.cta-card__period {
  font-size: var(--text-sm);
  color: #5a5a6e;
  margin-bottom: var(--space-6);
}

.cta-card__features {
  list-style: none;
  padding: 0;
  margin: 0;
}

.cta-card__features li {
  padding: 8px 0;
  padding-left: 24px;
  position: relative;
  font-size: 0.95rem;
  color: #5a5a6e;
}

.cta-card__features li::before {
  content: "\2713";
  position: absolute;
  left: 0;
  color: var(--accent);
  font-weight: bold;
}


/* ----------------------------------------------------------
   7. Stats Section
   ---------------------------------------------------------- */

.stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: var(--space-8);
  text-align: center;
}

.stat__number {
  font-family: var(--font-display);
  font-size: var(--text-5xl);
  font-weight: 800;
  color: var(--accent);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stat__label {
  font-size: var(--text-sm);
  color: var(--text-muted);
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}


/* ----------------------------------------------------------
   8. Testimonial Cards
   ---------------------------------------------------------- */

.testimonial-card {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  border: 1px solid var(--border);
}

.testimonial-card__quote {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--text);
  margin-bottom: var(--space-6);
  line-height: var(--leading-relaxed);
}

.testimonial-card__quote::before {
  content: "\201C";
  font-size: var(--text-4xl);
  color: var(--accent);
  line-height: 0;
  vertical-align: -0.3em;
  margin-right: var(--space-2);
}

.testimonial-card__author {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.testimonial-card__role {
  font-size: var(--text-xs);
  color: var(--text-light);
}


/* ----------------------------------------------------------
   9. Forms
   ---------------------------------------------------------- */

.form-group {
  margin-bottom: var(--space-5);
}

.form-label {
  display: block;
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-base);
  transition: border-color var(--transition-fast);
  outline: none;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder {
  color: var(--text-light);
}

.inline-checkout {
  display: flex;
  gap: var(--space-3);
  align-items: stretch;
}

@media (max-width: 639px) {
  .inline-checkout {
    flex-direction: column;
  }
}

.inline-checkout .form-input {
  flex: 1;
}

.inline-checkout .btn {
  white-space: nowrap;
}


/* ----------------------------------------------------------
   10. Modal
   ---------------------------------------------------------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(4px);
  z-index: var(--z-overlay);
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-6);
}

.modal-overlay.is-open {
  display: flex;
}

.modal {
  background: var(--surface);
  border-radius: var(--radius-lg);
  padding: var(--space-8);
  max-width: 480px;
  width: 100%;
  border: 1px solid var(--border);
  position: relative;
  animation: modal-in 0.3s ease;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: scale(0.95) translateY(10px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal__close {
  position: absolute;
  top: var(--space-4);
  right: var(--space-4);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--space-2);
  font-size: var(--text-xl);
  transition: color var(--transition-fast);
}

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


/* ----------------------------------------------------------
   11. FAQ Accordion
   ---------------------------------------------------------- */

.faq-item {
  border-bottom: 1px solid var(--border);
}

.faq-question {
  width: 100%;
  padding: var(--space-5) 0;
  background: none;
  border: none;
  color: var(--text);
  font-family: var(--font-body);
  font-size: var(--text-lg);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.faq-question:hover {
  color: var(--accent);
}

.faq-question__icon {
  transition: transform var(--transition-base);
  color: var(--text-muted);
  flex-shrink: 0;
}

.faq-item.is-open .faq-question__icon {
  transform: rotate(180deg);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height var(--transition-slow), padding-bottom var(--transition-slow);
  padding: 0;
}

.faq-item.is-open .faq-answer {
  max-height: 500px;
  padding-bottom: var(--space-5);
}

.faq-answer p {
  color: var(--text-muted);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
}


/* ----------------------------------------------------------
   12. Toast Notifications
   ---------------------------------------------------------- */

.toast {
  position: fixed;
  bottom: var(--space-8);
  right: var(--space-8);
  padding: var(--space-4) var(--space-6);
  border-radius: var(--radius-md);
  color: white;
  font-weight: 500;
  z-index: var(--z-toast);
  animation: toast-in 0.3s ease;
}

.toast--success {
  background: var(--success);
}

.toast--error {
  background: var(--error);
}

.toast--info {
  background: var(--accent);
}

@keyframes toast-in {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}


/* ----------------------------------------------------------
   13. Sticky Mobile CTA
   ---------------------------------------------------------- */

.sticky-cta {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding: var(--space-4) var(--space-6);
  z-index: var(--z-sticky);
  backdrop-filter: blur(20px);
}

@media (max-width: 767px) {
  .sticky-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
  }
}

.sticky-cta__price {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: var(--text-xl);
  color: var(--accent);
}

.sticky-cta .btn {
  flex-shrink: 0;
}


/* ----------------------------------------------------------
   14. Guarantee Badge
   ---------------------------------------------------------- */

.guarantee-badge {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--accent-glow);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.guarantee-badge svg {
  color: var(--accent);
  flex-shrink: 0;
}


/* ----------------------------------------------------------
   15. Contents / Chapter List
   ---------------------------------------------------------- */

.contents-list {
  display: grid;
  gap: var(--space-3);
}

.contents-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  transition: transform var(--transition-fast), border-color var(--transition-fast);
}

.contents-item:hover {
  transform: translateX(6px);
  border-color: var(--accent);
}

.contents-item__number {
  width: 36px;
  height: 36px;
  background: var(--accent-glow);
  color: var(--accent);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-mono);
  font-weight: var(--weight-bold);
  font-size: var(--text-sm);
  flex-shrink: 0;
}

.contents-item__title {
  font-size: var(--text-base);
  color: var(--text);
}
