/* Darwin Framework — Shared Styles
   Dark theme: #0f172a background, #A51C30 primary
   Part of OPC Ecosystem */

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

:root {
  --bg: #0f172a;
  --bg-card: #1e293b;
  --bg-card-hover: #253349;
  --border: rgba(255,255,255,0.08);
  --primary: #A51C30;
  --primary-light: #d42a42;
  --primary-glow: rgba(165,28,48,0.25);
  --accent: #e74c6f;
  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --gradient: linear-gradient(135deg, #A51C30, #e74c6f);
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 4px 24px rgba(0,0,0,0.3);
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  padding-top: 64px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--accent); text-decoration: none; transition: color 0.2s; }
a:hover { color: #f1788e; }

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

/* ===================== OPC FLOATING NAV ===================== */
#opc-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 9999;
  background: rgba(15,23,42,0.92);
  backdrop-filter: blur(20px) saturate(1.4);
  -webkit-backdrop-filter: blur(20px) saturate(1.4);
  border-bottom: 1px solid rgba(165,28,48,0.2);
  padding: 0 2rem;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: var(--transition);
}

#opc-nav.scrolled {
  background: rgba(15,23,42,0.98);
  box-shadow: 0 4px 30px rgba(0,0,0,0.4);
  border-bottom-color: rgba(165,28,48,0.35);
}

#opc-nav .nav-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: #fff;
  font-weight: 700;
  font-size: 1rem;
}

#opc-nav .nav-brand .brand-text {
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

#opc-nav .nav-links {
  display: flex;
  gap: 4px;
  align-items: center;
}

#opc-nav .nav-links a {
  color: rgba(255,255,255,0.7);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 8px;
  transition: var(--transition);
  font-weight: 500;
}

#opc-nav .nav-links a:hover {
  color: #fff;
  background: rgba(165,28,48,0.15);
}

#opc-nav .nav-links a.btn-nav-primary {
  background: var(--gradient);
  color: #fff;
  font-weight: 600;
  padding: 8px 18px;
  box-shadow: 0 2px 12px var(--primary-glow);
}

#opc-nav .nav-links a.btn-nav-primary:hover {
  box-shadow: 0 4px 20px rgba(165,28,48,0.4);
  transform: translateY(-1px);
}

/* Mobile nav toggle */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 4px;
}

/* ===================== HERO ===================== */
.hero {
  padding: 7rem 0 4rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: -40%; left: -20%;
  width: 140%; height: 140%;
  background:
    radial-gradient(ellipse at 30% 40%, rgba(165,28,48,0.1) 0%, transparent 55%),
    radial-gradient(ellipse at 70% 60%, rgba(231,76,111,0.06) 0%, transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.hero > * { position: relative; z-index: 1; }

.hero .badge {
  display: inline-block;
  padding: 6px 18px;
  border-radius: 20px;
  background: rgba(165,28,48,0.15);
  color: var(--accent);
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  border: 1px solid rgba(165,28,48,0.25);
  letter-spacing: 0.02em;
}

.hero h1 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fff 20%, var(--accent) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.1rem;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto 2rem;
}

.hero .hero-desc {
  font-size: 1rem;
  color: var(--text-dim);
  max-width: 600px;
  margin: 0 auto 2rem;
}

/* ===================== BUTTONS ===================== */
.btn-group {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: var(--transition);
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(165,28,48,0.45);
  color: #fff;
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255,255,255,0.15);
}

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

/* ===================== SECTIONS ===================== */
.section { padding: 5rem 0; }

.section-title {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 0.5rem;
  color: #fff;
}

.section-desc {
  text-align: center;
  color: var(--text-muted);
  margin-bottom: 3rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* ===================== CARDS ===================== */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}

.card:hover {
  border-color: rgba(165,28,48,0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(165,28,48,0.1);
  background: var(--bg-card-hover);
}

.card h3 {
  color: #fff;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.92rem;
}

.card .icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

/* ===================== FEATURE CARDS ===================== */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  transition: var(--transition);
}

.feature-card:hover {
  border-color: rgba(165,28,48,0.3);
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(165,28,48,0.1);
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: rgba(165,28,48,0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
}

.feature-card h3 {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.feature-card p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

/* ===================== GRID LAYOUTS ===================== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

/* ===================== STATS ===================== */
.stats {
  display: flex;
  justify-content: center;
  gap: 3rem;
  margin: 3rem 0;
  flex-wrap: wrap;
}

.stat { text-align: center; }

.stat .num {
  font-size: 2.5rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat .lbl, .stat .label {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ===================== PRICING ===================== */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.pricing-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
  position: relative;
}

.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(165,28,48,0.1);
}

.pricing-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 40px var(--primary-glow);
}

.pricing-card.featured::before {
  content: 'POPULAR';
  position: absolute;
  top: -12px; left: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: #fff;
  padding: 4px 16px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.pricing-name {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #fff;
}

.pricing-price {
  font-size: 3rem;
  font-weight: 900;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pricing-features {
  list-style: none;
  margin: 1.5rem 0;
  text-align: left;
}

.pricing-features li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.pricing-features li::before {
  content: '✓ ';
  color: var(--accent);
  font-weight: 700;
}

.price-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
  transition: var(--transition);
}

.price-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(165,28,48,0.1);
}

.price-card.featured {
  border-color: var(--primary);
  box-shadow: 0 0 40px var(--primary-glow);
  transform: scale(1.03);
}

.price-card h3 { color: #fff; margin-bottom: 0.5rem; }

.price {
  font-size: 2.2rem;
  font-weight: 800;
  background: var(--gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin: 0.8rem 0;
}

.price span { font-size: 0.9rem; color: var(--text-dim); }

.price-card ul {
  list-style: none;
  text-align: left;
  margin: 1.5rem 0;
}

.price-card li {
  padding: 0.4rem 0;
  color: var(--text-muted);
  border-bottom: 1px solid var(--border);
  font-size: 0.95rem;
}

.price-card li::before {
  content: '✓ ';
  color: var(--accent);
}

/* ===================== TIMELINE ===================== */
.timeline { position: relative; padding-left: 2rem; }

.timeline::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--primary), rgba(165,28,48,0.2));
}

.timeline-item {
  position: relative;
  margin-bottom: 2rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -2.35rem; top: 0.5rem;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 8px var(--primary-glow);
}

.timeline-item h4 { color: #fff; margin-bottom: 0.3rem; }
.timeline-item p { color: var(--text-muted); font-size: 0.95rem; }

/* ===================== CTA ===================== */
.cta-section {
  padding: 5rem 0;
  text-align: center;
  background: linear-gradient(180deg, transparent, rgba(165,28,48,0.06));
}

.cta-section h2 {
  font-size: 2.5rem;
  font-weight: 900;
  margin-bottom: 1rem;
  color: #fff;
}

.cta-section p {
  color: var(--text-muted);
  margin-bottom: 2rem;
  max-width: 500px;
  margin-left: auto;
  margin-right: auto;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius-sm);
  font-weight: 600;
  transition: var(--transition);
}

.cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(165,28,48,0.4);
  color: #fff;
}

.cta-outline {
  background: transparent;
  border: 2px solid rgba(165,28,48,0.4);
  color: var(--accent);
}

.cta-outline:hover {
  border-color: var(--primary);
  background: rgba(165,28,48,0.08);
}

/* ===================== FORM ELEMENTS ===================== */
.form-group { margin-bottom: 20px; }

.form-group label {
  display: block;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 6px;
  font-weight: 500;
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text);
  font-size: 0.95rem;
  font-family: inherit;
  transition: border-color 0.2s;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group select { appearance: none; cursor: pointer; }

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 32px;
  background: var(--gradient);
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
}

.btn-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(165,28,48,0.4);
}

/* ===================== INFO ITEMS ===================== */
.info-item {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--border);
}

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

.info-icon {
  width: 40px; height: 40px;
  background: rgba(165,28,48,0.1);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.info-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.info-value { font-size: 0.95rem; margin-top: 2px; }

/* ===================== FAQ ===================== */
.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}

.faq-item:hover { border-color: rgba(165,28,48,0.2); }

.faq-q {
  padding: 18px 24px;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 0.95rem;
}

.faq-q:hover { background: rgba(165,28,48,0.05); }

.faq-q .arrow {
  transition: transform 0.3s;
  color: var(--primary);
}

.faq-a {
  padding: 0 24px;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s, padding 0.3s;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.7;
}

.faq-item.open .faq-a {
  max-height: 250px;
  padding: 0 24px 18px;
}

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

/* ===================== FOOTER ===================== */
.footer {
  padding: 3rem 0;
  border-top: 1px solid var(--border);
  text-align: center;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: color 0.2s;
}

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

footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border);
  padding: 48px 0 32px;
  margin-top: 4rem;
}

footer a { color: var(--accent); text-decoration: none; }
footer a:hover { color: #f1788e; }

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

.footer-brand p {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-top: 8px;
}

.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.footer-col a {
  display: block;
  color: var(--text-muted);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: color 0.2s;
}

.footer-col a:hover { color: var(--accent); }

.footer-bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

/* ===================== SCROLL ANIMATIONS ===================== */
.fade-up {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-left {
  opacity: 0;
  transform: translateX(-30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-left.visible {
  opacity: 1;
  transform: translateX(0);
}

.fade-right {
  opacity: 0;
  transform: translateX(30px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.fade-right.visible {
  opacity: 1;
  transform: translateX(0);
}

.scale-in {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.scale-in.visible {
  opacity: 1;
  transform: scale(1);
}

/* Staggered animation delays for children */
.stagger > *:nth-child(1) { transition-delay: 0ms; }
.stagger > *:nth-child(2) { transition-delay: 80ms; }
.stagger > *:nth-child(3) { transition-delay: 160ms; }
.stagger > *:nth-child(4) { transition-delay: 240ms; }
.stagger > *:nth-child(5) { transition-delay: 320ms; }
.stagger > *:nth-child(6) { transition-delay: 400ms; }
.stagger > *:nth-child(7) { transition-delay: 480ms; }
.stagger > *:nth-child(8) { transition-delay: 560ms; }
.stagger > *:nth-child(9) { transition-delay: 640ms; }

/* ===================== RESPONSIVE ===================== */
@media (max-width: 768px) {
  body { padding-top: 56px; }

  #opc-nav { height: 56px; padding: 0 1rem; }

  .nav-toggle { display: block; }

  #opc-nav .nav-links {
    display: none;
    position: absolute;
    top: 56px;
    left: 0;
    right: 0;
    background: rgba(15,23,42,0.98);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    padding: 1rem;
    gap: 4px;
  }

  #opc-nav .nav-links.open { display: flex; }

  #opc-nav .nav-links a {
    width: 100%;
    text-align: center;
    padding: 12px;
  }

  .hero { padding: 4rem 0 2.5rem; }
  .hero h1 { font-size: 2rem; }
  .section { padding: 3rem 0; }
  .section-title { font-size: 1.7rem; }

  .features-grid,
  .grid {
    grid-template-columns: 1fr;
  }

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

  .stats { gap: 1.5rem; }
  .stat .num { font-size: 2rem; }

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

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

  .cta-section h2 { font-size: 1.8rem; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .btn-group { flex-direction: column; align-items: center; }
  .btn { width: 100%; justify-content: center; }
}
