/* ============================================================
   COMPONENTS.CSS — Chedders Domain Services
   Navbar · Buttons · Cards · Hero · API section · Why ·
   Ecosystem · CTA · Founder · Footer CSS Grid (V3 §7.7)
   ============================================================ */

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar-chedders {
  background-color: var(--surface);
  border-bottom: 1px solid var(--border);
  min-height: 60px;
  padding-top: 0;
  padding-bottom: 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  transition: box-shadow var(--transition-base);
}

.navbar-chedders.is-scrolled {
  box-shadow: 0 2px 16px var(--shadow-md);
}

.navbar-chedders .navbar-brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 17px;
  color: var(--text);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  transition: opacity var(--transition-fast);
}

.navbar-chedders .navbar-brand:hover { opacity: 0.82; }

.nav-logo-mark {
  width: 28px;
  height: 28px;
  background-color: var(--accent);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.nav-logo-mark span {
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.04em;
}

.navbar-chedders .nav-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: var(--radius-md);
  transition: color var(--transition-fast), background-color var(--transition-fast);
  text-decoration: none;
}

.navbar-chedders .nav-link:hover,
.navbar-chedders .nav-link.active {
  color: var(--text);
  background-color: var(--surface-2);
}

.btn-theme-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--muted);
  font-size: 15px;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast);
}

.btn-theme-toggle:hover {
  background-color: var(--surface-2);
  color: var(--text);
  border-color: var(--accent);
}

/* Dark default: show sun (click = go light) */
.icon-sun  { display: inline; }
.icon-moon { display: none;   }
[data-theme="light"] .icon-sun  { display: none;   }
[data-theme="light"] .icon-moon { display: inline; }

.navbar-chedders .navbar-toggler {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 6px 10px;
  background: none;
  color: var(--text);
}

.navbar-chedders .navbar-toggler:focus {
  box-shadow: none;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-chedders-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  border-radius: var(--radius-md);
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
  cursor: pointer;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
}

.btn-chedders-primary:hover {
  background-color: var(--accent-light);
  border-color: var(--accent-light);
  color: #ffffff;
  transform: translateY(-1px);
}

.btn-chedders-primary:active { transform: translateY(0); }

.btn-chedders-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  background-color: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 11px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  line-height: 1.4;
  cursor: pointer;
  min-height: 44px;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--transition-fast),
              color var(--transition-fast),
              border-color var(--transition-fast),
              transform var(--transition-fast);
}

.btn-chedders-secondary:hover {
  background-color: var(--surface-2);
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
}

.btn-chedders-secondary:active { transform: translateY(0); }

/* ============================================================
   CARDS (V3: accent-border on hover)
   ============================================================ */
.card-chedders {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: 0 2px 8px var(--shadow);
  transition: transform var(--transition-fast),
              box-shadow var(--transition-fast),
              border-color var(--transition-fast);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-chedders:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--shadow-md);
  border-color: var(--accent-border);
}

.card-chedders__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: var(--space-sm);
  line-height: 1.3;
}

.card-chedders__body {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
  flex: 1;
}

/* ============================================================
   HERO
   ============================================================ */
.hero-section {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-2xl);
  background-color: var(--background);
  position: relative;
  overflow: hidden;
}

.hero-section::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 420px;
  height: 420px;
  border: 56px solid var(--surface-2);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0.5;
}

.hero-section__headline {
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text);
  margin-bottom: var(--space-md);
  max-width: 620px;
}

.hero-section__headline em {
  font-style: normal;
  color: var(--accent);
}

.hero-section__sub {
  font-size: 15px;
  line-height: 1.75;
  color: var(--muted);
  max-width: 500px;
  margin-bottom: var(--space-lg);
}

.hero-section__ctas {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-section__visual {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

/* ============================================================
   STATUS SECTION
   ============================================================ */
.status-section { background-color: var(--surface); }

.status-col-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding-bottom: 10px;
  margin-bottom: var(--space-md);
  border-bottom: 2px solid var(--border);
}

.status-col-label--focus   { color: var(--warning); border-bottom-color: var(--warning); }
.status-col-label--planned { color: var(--muted);   border-bottom-color: var(--border);  }

.status-list__item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.status-list__item:last-child { border-bottom: none; }
.status-list__item .bi        { font-size: 13px; flex-shrink: 0; }
.bi-arrow-right-circle-fill   { color: var(--warning); }
.bi-clock                     { color: var(--muted);   }
.bi-check-circle-fill         { color: var(--success); }

/* ============================================================
   API HIGHLIGHT
   ============================================================ */
.api-highlight-box {
  background-color: var(--surface-2);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 24px;
  margin-bottom: 20px;
}

.api-highlight-box__title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
}

.api-highlight-box__desc {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.65;
  margin: 0;
}

.api-benefit-list { list-style: none; padding: 0; margin: 0; }

.api-benefit-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  font-size: 14px;
  color: var(--text);
  border-bottom: 1px solid var(--border);
}

.api-benefit-list li:last-child { border-bottom: none; }

.api-benefit-list li .bi {
  color: var(--accent);
  font-size: 14px;
  flex-shrink: 0;
  margin-top: 2px;
}

/* ============================================================
   WHY SECTION
   ============================================================ */
.why-section {
  background-color: var(--primary);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.why-section::after {
  content: '';
  position: absolute;
  bottom: -80px;
  left: -80px;
  width: 300px;
  height: 300px;
  border: 50px solid rgba(255, 255, 255, 0.04);
  border-radius: 50%;
  pointer-events: none;
}

.why-card {
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  padding: 20px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.why-card:last-child { border-bottom: none; }

.why-card__num {
  width: 32px;
  height: 32px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.45);
  flex-shrink: 0;
}

.why-card__title {
  font-size: 15px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 4px;
}

.why-card__desc {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.6);
  margin: 0;
  line-height: 1.65;
}

/* ============================================================
   ECOSYSTEM TAGS
   ============================================================ */
.ecosystem-section { background-color: var(--surface); }

.ecosystem-tags-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 12px;
}

.ecosystem-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background-color: var(--background);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  transition: border-color var(--transition-fast),
              color var(--transition-fast);
}

.ecosystem-tag:hover {
  border-color: var(--accent-border);
  color: var(--accent);
}

.ecosystem-tag .bi {
  font-size: 14px;
  color: var(--accent);
}

/* ============================================================
   FOUNDER NOTE
   ============================================================ */
.founder-note {
  background-color: var(--surface-2);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
  padding: 28px var(--space-lg);
}

.founder-note__text {
  font-size: 15px;
  font-style: italic;
  color: var(--text);
  line-height: 1.8;
  margin: 0 0 14px;
}

.founder-note__attribution {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin: 0;
}

/* ============================================================
   CTA / EARLY ACCESS
   ============================================================ */
.cta-section { background-color: var(--background); }

.cta-box {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  box-shadow: 0 4px 24px var(--shadow);
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background-color: var(--accent);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
}

.cta-box__title {
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.cta-box__desc {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 420px;
  margin: 0 auto 28px;
}

.cta-access-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  max-width: 480px;
  margin: 0 auto var(--space-lg);
  text-align: left;
}

.cta-access-list li {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-size: 14px;
  color: var(--muted);
}

.cta-access-list li .bi { color: var(--success); font-size: 13px; flex-shrink: 0; }

/* ============================================================
   FORM
   ============================================================ */
.form-chedders input[type="email"] {
  height: 44px;
  background-color: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  padding: 0 14px;
  font-size: 14px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  outline: none;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
  width: 100%;
}

.form-chedders input[type="email"]:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-subtle);
}

.form-chedders input[type="email"]::placeholder { color: var(--muted); }

.form-inline-group {
  display: flex;
  gap: 10px;
  max-width: 440px;
  margin: 0 auto;
}

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

.form-feedback {
  font-size: 13px;
  margin-top: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  display: none;
}

.form-feedback--success {
  background-color: rgba(0, 229, 160, 0.1);
  color: var(--success);
  border: 1px solid rgba(0, 229, 160, 0.25);
}

.form-feedback--error {
  background-color: rgba(244, 63, 94, 0.1);
  color: var(--danger);
  border: 1px solid rgba(244, 63, 94, 0.25);
}

/* ============================================================
   FOOTER — 4-col CSS Grid (V3 §7.7)
   ============================================================ */
.footer-chedders {
  background-color: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: 56px;
  padding-bottom: var(--space-lg);
}

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

.footer-chedders__brand {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 800;
  font-size: 16px;
  color: var(--text);
  letter-spacing: -0.03em;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  text-decoration: none;
  margin-bottom: 10px;
}

.footer-chedders__tagline {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 220px;
}

.footer-col-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text);
  margin-bottom: 14px;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }

.footer-links a {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  transition: color var(--transition-fast);
}

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

.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding-top: 24px;
  margin-top: var(--space-lg);
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 13px;
  color: var(--muted);
  margin: 0;
}

.footer-social {
  display: flex;
  gap: var(--space-sm);
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-social a {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 14px;
  transition: border-color var(--transition-fast),
              color var(--transition-fast),
              background-color var(--transition-fast);
}

.footer-social a:hover {
  border-color: var(--accent);
  color: var(--accent);
  background-color: var(--accent-subtle);
}
