/* ==========================================================================
   Cyberbond Security — Component Styles
   ========================================================================== */

/* Header & Navigation */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: var(--bg-header);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-hairline);
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 4.25rem;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
  color: var(--text-primary);
  white-space: nowrap;
}

.brand-mark {
  width: 1.85rem;
  height: 1.85rem;
  flex-shrink: 0;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: auto;
  margin-left: 1rem;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.5rem 0.85rem;
  border-radius: var(--radius-sm);
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: color 150ms ease, background-color 150ms ease;
}

.nav-link:hover,
.nav-link[aria-expanded="true"],
.nav-link[aria-current="page"] {
  color: var(--text-primary);
  background-color: var(--cta-secondary-hover);
}

.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  width: 22rem;
  padding: 0.5rem;
  background-color: var(--bg-surface-elevated);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  z-index: 200;
}

.nav-dropdown[hidden] {
  display: none;
}

.nav-dropdown__item {
  display: block;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  transition: background-color 150ms ease;
}

.nav-dropdown__item:hover {
  background-color: var(--bg-surface-subtle);
}

.nav-dropdown__title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.nav-dropdown__desc {
  display: block;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin-top: 0.15rem;
}

.dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot--teal { background-color: var(--accent-teal); }
.dot--indigo { background-color: var(--accent-indigo); }
.dot--magenta { background-color: var(--accent-magenta); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 0.625rem;
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem;
  height: 2.35rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 150ms ease, border-color 150ms ease, background-color 150ms ease;
}

.icon-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong);
}

[data-theme="dark"] .theme-icon-moon { display: none; }
[data-theme="light"] .theme-icon-sun { display: none; }

.mobile-menu-btn {
  display: none;
}

@media (max-width: 880px) {
  .header-nav,
  .header-cta {
    display: none;
  }
  .mobile-menu-btn {
    display: inline-flex;
  }
}

/* Mobile Dialog Drawer */
.mobile-drawer {
  width: min(24rem, 100%);
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  margin: 0 0 0 auto;
  padding: 1.5rem;
  border: 0;
  border-left: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  color: var(--text-primary);
}

.mobile-drawer::backdrop {
  background: rgba(9, 13, 22, 0.55);
  backdrop-filter: blur(4px);
}

.mobile-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border-hairline);
  margin-bottom: 1.25rem;
}

.mobile-drawer__links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.mobile-drawer__link {
  display: block;
  padding: 0.75rem 0.65rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
}

.mobile-drawer__link:hover {
  background: var(--bg-surface-subtle);
}

.mobile-drawer__sub {
  display: block;
  font-weight: 400;
  font-size: 0.8125rem;
  color: var(--text-secondary);
}

/* Hero Section with Atmospheric Mesh & Architectural Grid */
.hero {
  padding-block: clamp(3.5rem, 6.5vw, 6rem);
  position: relative;
  overflow-x: clip;
  background-image:
    radial-gradient(ellipse 65% 55% at 15% 15%, var(--hero-glow-1), transparent 70%),
    radial-gradient(ellipse 55% 55% at 85% 20%, var(--hero-glow-2), transparent 70%);
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 80%);
}

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

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, 0.88fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

@media (max-width: 900px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}

.illustration-card {
  position: relative;
  background: var(--bg-glass);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  box-shadow: var(--shadow-lg), var(--inner-highlight);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  background-image: radial-gradient(circle at 50% 35%, var(--service-accent-soft), transparent 68%);
}

.illustration-card img {
  width: 100%;
  border-radius: var(--radius-md);
}

.illustration-card__caption {
  margin-top: 1rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-hairline);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.breadcrumb a:hover {
  color: var(--text-primary);
  text-decoration: underline;
}

/* Sticky Service Sub-Nav */
.subnav-bar {
  position: sticky;
  top: 4.25rem;
  z-index: 50;
  background: var(--bg-header);
  backdrop-filter: blur(12px);
  border-block: 1px solid var(--border-hairline);
}

.subnav-bar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-block: 0.75rem;
  overflow-x: auto;
}

.subnav-bar__label {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.subnav-bar__links {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  white-space: nowrap;
}

.subnav-bar__link {
  position: relative;
  font-size: 0.875rem;
  font-weight: 500;
  padding: 0.35rem 0.7rem;
  border-radius: var(--radius-pill);
  color: var(--text-secondary);
  transition: color 150ms ease, background-color 150ms ease;
}

.subnav-bar__link:hover {
  color: var(--text-primary);
  background: var(--cta-secondary-hover);
}

.subnav-bar__link[aria-current="location"] {
  color: var(--service-accent);
  background: var(--service-accent-soft);
  font-weight: 600;
}

/* Cards */
.card {
  display: flex;
  flex-direction: column;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm), var(--inner-highlight);
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md), var(--inner-highlight);
  transform: translateY(-2px);
}

.card--teal {
  border-top: 3px solid var(--accent-teal);
  background-image: radial-gradient(ellipse 80% 40% at 50% 0%, var(--accent-teal-soft), transparent 70%);
}
.card--indigo {
  border-top: 3px solid var(--accent-indigo);
  background-image: radial-gradient(ellipse 80% 40% at 50% 0%, var(--accent-indigo-soft), transparent 70%);
}
.card--magenta {
  border-top: 3px solid var(--accent-magenta);
  background-image: radial-gradient(ellipse 80% 40% at 50% 0%, var(--accent-magenta-soft), transparent 70%);
}

.card__footer {
  margin-top: auto;
  padding-top: 1.25rem;
}

.bullet-list {
  list-style: none;
  padding: 0;
  margin: 0.85rem 0 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-size: 0.9375rem;
}

.bullet-list li {
  position: relative;
  padding-left: 1.15rem;
}

.bullet-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.6em;
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 50%;
  background-color: var(--text-muted);
}

/* Callout / Scope Note */
.callout {
  margin-top: 2rem;
  padding: 1.25rem 1.5rem;
  border-radius: var(--radius-md);
  background-color: var(--bg-surface-subtle);
  border: 1px solid var(--border-hairline);
  border-left: 3px solid var(--service-accent);
  font-size: 0.9375rem;
  color: var(--text-secondary);
}

/* Hypothetical Example & Connected Work */
.flow-diagram {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.flow-step {
  position: relative;
  padding: 1.05rem 1.25rem;
  border-radius: var(--radius-md);
  background: var(--bg-surface-subtle);
  border: 1px solid var(--border-hairline);
}

.flow-step + .flow-step {
  margin-top: 1.35rem;
}

.flow-step + .flow-step::before {
  content: "";
  position: absolute;
  left: 1.5rem;
  top: -1.35rem;
  width: 2px;
  height: 1.35rem;
  background: var(--border-strong);
}

.flow-step--magenta { border-left: 3px solid var(--accent-magenta); }
.flow-step--teal { border-left: 3px solid var(--accent-teal); }
.flow-step--indigo { border-left: 3px solid var(--accent-indigo); }

/* How We Work Stepper */
.stepper {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: start;
}

@media (max-width: 860px) {
  .stepper {
    grid-template-columns: 1fr;
  }
}

.stepper__tabs {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.stepper__tab {
  width: 100%;
  text-align: left;
  padding: 1.15rem 1.25rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-hairline);
  background: var(--bg-surface);
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease, box-shadow 150ms ease;
}

.stepper__tab[aria-selected="true"] {
  border-color: var(--accent-indigo);
  background: var(--bg-surface-elevated);
  box-shadow: var(--shadow-md);
}

.stepper__tab-num {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
  display: block;
  margin-bottom: 0.25rem;
}

.stepper__tab-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--text-primary);
  display: block;
}

.stepper__tab-desc {
  font-size: 0.9375rem;
  color: var(--text-secondary);
  display: block;
  margin-top: 0.25rem;
}

.stepper__panel {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: 2rem;
  box-shadow: var(--shadow-md);
}

.stepper__panel[hidden] {
  display: none;
}

/* Deliverable Excerpt Artifact Card */
.excerpt-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg), var(--inner-highlight);
}

.excerpt-card__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1.35rem;
  background: var(--bg-surface-subtle);
  border-bottom: 1px solid var(--border-hairline);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.excerpt-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  background: var(--service-accent-soft);
  border: 1px solid var(--service-accent-border);
  color: var(--service-accent);
  font-size: 0.75rem;
  font-weight: 600;
}

.excerpt-card__body {
  padding: 1.5rem;
}

.excerpt-kv {
  display: grid;
  gap: 0.85rem;
  margin-top: 1.25rem;
}

.excerpt-kv__item {
  padding-top: 0.85rem;
  border-top: 1px solid var(--border-hairline);
}

.excerpt-kv__label {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  margin-bottom: 0.25rem;
}

.excerpt-kv__val {
  font-size: 0.9375rem;
  color: var(--text-primary);
}

.excerpt-card__foot {
  padding: 0.85rem 1.35rem;
  background: var(--bg-surface-subtle);
  border-top: 1px solid var(--border-hairline);
  font-size: 0.8125rem;
  color: var(--text-muted);
}

/* Workflow Happy-Path Chain */
.workflow-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  margin: 1rem 0;
}

.workflow-node {
  padding: 0.45rem 0.8rem;
  border-radius: var(--radius-sm);
  background: var(--service-accent-soft);
  border: 1px solid var(--service-accent-border);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

/* CTA Band */
.cta-band {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  box-shadow: var(--shadow-md);
}

.cta-band__content {
  max-width: 38rem;
}

/* Forms */
.form-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-hairline);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 3vw, 2.25rem);
  box-shadow: var(--shadow-md);
}

.form-group {
  margin-bottom: 1.35rem;
}

.form-label {
  display: block;
  font-weight: 600;
  font-size: 0.9375rem;
  margin-bottom: 0.45rem;
  color: var(--text-primary);
}

.form-input,
.form-textarea {
  width: 100%;
  padding: 0.72rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-canvas);
  color: var(--text-primary);
  transition: border-color 150ms ease, box-shadow 150ms ease;
}

.form-input:focus,
.form-textarea:focus {
  outline: none;
  border-color: var(--focus-ring);
  box-shadow: 0 0 0 3px var(--accent-indigo-soft);
}

.form-input[aria-invalid="true"],
.form-textarea[aria-invalid="true"] {
  border-color: var(--status-error);
}

.form-hint {
  margin-top: 0.4rem;
  font-size: 0.8125rem;
  color: var(--text-muted);
}

.form-error {
  margin-top: 0.4rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--status-error);
}

.interest-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

@media (max-width: 520px) {
  .interest-grid {
    grid-template-columns: 1fr;
  }
}

.interest-option {
  position: relative;
}

.interest-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.interest-option label {
  display: block;
  padding: 0.72rem 0.95rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--bg-canvas);
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 150ms ease, background-color 150ms ease;
}

.interest-option input:focus-visible + label {
  outline: 2px solid var(--focus-ring);
  outline-offset: 2px;
}

.interest-option input:checked + label {
  border-color: var(--accent-indigo);
  background: var(--accent-indigo-soft);
  color: var(--text-primary);
  font-weight: 600;
}

.alert {
  padding: 1rem 1.25rem;
  border-radius: var(--radius-md);
  margin-bottom: 1.5rem;
  font-size: 0.9375rem;
}

.alert--error {
  background: var(--status-error-soft);
  border: 1px solid var(--status-error-border);
  color: var(--status-error);
}

.alert--success {
  background: var(--status-success-soft);
  border: 1px solid var(--status-success-border);
}

/* Footer */
.site-footer {
  background-color: var(--bg-footer);
  color: var(--text-footer);
  padding-block: clamp(3.5rem, 6vw, 5rem) 2rem;
  margin-top: var(--section-space);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 2.5rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

@media (max-width: 900px) {
  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}

.footer-heading {
  font-size: 0.8125rem;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-footer-muted);
  margin-bottom: 1rem;
}

.footer-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.footer-link {
  color: var(--text-footer);
  font-size: 0.9375rem;
  opacity: 0.88;
}

.footer-link:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-bottom {
  padding-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--text-footer-muted);
}

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

.link-btn {
  background: none;
  border: 0;
  padding: 0;
  color: inherit;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Analytics Consent Banner */
.consent-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 500;
  width: min(22.5rem, calc(100vw - 2.5rem));
  background: var(--bg-glass);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.15rem 1.25rem;
  box-shadow: var(--shadow-lg), var(--inner-highlight);
}

.consent-panel[hidden] {
  display: none;
}

.consent-panel__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1rem;
}
