:root {
  --bg: #f7f8fb;
  --surface: #ffffff;
  --surface-alt: #eef1f7;
  --text-primary: #0b1220;
  --text-secondary: #4b5563;
  --border: #dde2ea;
  --accent: #1E3A8A;
  --accent-contrast: #ffffff;
  --gold: #C9A24B;
  --success: #16794c;
  --warning: #a15c07;
  --danger: #b3261e;
  --muted: #8a94a6;
  color-scheme: light;
}

[data-theme="dark"] {
  --bg: #0a0e17;
  --surface: #121826;
  --surface-alt: #1a2233;
  --text-primary: #eef1f7;
  --text-secondary: #b4bccb;
  --border: #29344a;
  --accent: #4d7fe0;
  --accent-contrast: #0a0e17;
  --gold: #d9b86a;
  --success: #3fbf85;
  --warning: #e0a63f;
  --danger: #e5675f;
  --muted: #6b7688;
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="dark"]) {
    --bg: #0a0e17;
    --surface: #121826;
    --surface-alt: #1a2233;
    --text-primary: #eef1f7;
    --text-secondary: #b4bccb;
    --border: #29344a;
    --accent: #4d7fe0;
    --accent-contrast: #0a0e17;
    --gold: #d9b86a;
    --success: #3fbf85;
    --warning: #e0a63f;
    --danger: #e5675f;
    --muted: #6b7688;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--bg);
  color: var(--text-primary);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}

a { color: var(--accent); }

.navbar-yohal {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.hero-illustration {
  max-width: 100%;
  height: auto;
  position: relative;
}

/* ---- Stage 19: public Home visual redesign ---- */

.eyebrow {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section-heading {
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem);
  margin-bottom: 1.5rem;
}

.section-block {
  padding: clamp(3rem, 2.4rem + 2.4vw, 5rem) 0;
}

.section-block-alt {
  background: var(--surface-alt);
}

/* Hero */

.hero-v2 {
  position: relative;
  overflow: hidden;
  background: linear-gradient(160deg, var(--surface) 0%, var(--surface-alt) 100%);
  border-bottom: 1px solid var(--border);
  padding: clamp(3rem, 2rem + 4vw, 6rem) 0;
}

.hero-v2-geometry {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(48rem 28rem at 85% 10%, color-mix(in srgb, var(--accent) 16%, transparent) 0%, transparent 60%),
    radial-gradient(30rem 20rem at 100% 100%, color-mix(in srgb, var(--gold) 14%, transparent) 0%, transparent 65%);
}

.hero-v2-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 2.5rem;
  flex-wrap: wrap;
}

.hero-v2-copy {
  flex: 1 1 26rem;
  min-width: 0;
}

.hero-v2-copy h1 {
  font-weight: 700;
  letter-spacing: -0.01em;
  font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem);
  margin-bottom: 1rem;
}

.hero-v2-lead {
  color: var(--text-secondary);
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  max-width: 40rem;
  margin-bottom: 1.75rem;
}

.hero-v2-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.hero-v2-visual {
  flex: 1 1 18rem;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.hero-v2-visual img {
  max-width: min(100%, 420px);
}

/* Trust / services strip */

.trust-strip {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.trust-strip-inner {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.trust-strip-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}

.trust-strip-item:hover,
.trust-strip-item:focus-visible {
  background: var(--surface-alt);
  color: var(--text-primary);
}

.trust-strip-item i {
  font-size: 1rem;
  color: var(--accent);
}

/* Division cards */

.division-card-v2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.75rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  border-top: 3px solid var(--division-accent, var(--accent));
}

.division-card-v2:hover,
.division-card-v2:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 12px 28px rgb(0 0 0 / 0.1);
  border-color: var(--division-accent, var(--accent));
}

.division-icon {
  width: 3rem;
  height: 3rem;
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--division-accent, var(--accent)) 14%, transparent);
  color: var(--division-accent, var(--accent));
  font-size: 1.4rem;
  margin-bottom: 1rem;
}

.division-card-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-weight: 600;
  color: var(--division-accent, var(--accent));
  text-decoration: none;
}

.division-card-cta i {
  transition: transform 0.15s ease;
}

.division-card-v2:hover .division-card-cta i {
  transform: translateX(3px);
}

/* How YOHAL helps */

.steps-row {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.step-item {
  flex: 1 1 14rem;
  max-width: 16rem;
  text-align: center;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-contrast);
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step-connector {
  color: var(--muted);
  font-size: 1.5rem;
  align-self: center;
  margin-top: 1.25rem;
}

@media (max-width: 768px) {
  .steps-row {
    flex-direction: column;
    align-items: center;
  }

  .step-connector {
    transform: rotate(90deg);
    margin-top: 0;
  }
}

/* Human trust */

.human-trust {
  position: relative;
}

.human-trust-inner {
  position: relative;
  max-width: 42rem;
  text-align: center;
  margin: 0 auto;
}

.human-trust-geometry {
  position: absolute;
  inset: -2rem;
  z-index: -1;
  pointer-events: none;
  background: radial-gradient(24rem 16rem at 50% 0%, color-mix(in srgb, var(--gold) 12%, transparent) 0%, transparent 70%);
}

/* Content cards */

.content-card-v2 {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  height: 100%;
}

/* Final CTA */

.final-cta-v2 {
  padding: clamp(3rem, 2.4rem + 2.4vw, 5rem) 0;
  background: linear-gradient(160deg, var(--surface-alt) 0%, var(--surface) 100%);
  border-top: 1px solid var(--border);
}

/* Scroll header state (no layout shift — border/shadow only) */

.navbar-yohal.is-scrolled {
  box-shadow: 0 2px 12px rgb(0 0 0 / 0.06);
}

@media (prefers-reduced-motion: reduce) {
  .division-card-v2,
  .division-card-cta i {
    transition: none;
  }
}

.reveal-item {
  opacity: 1;
}

.nav-link {
  color: var(--text-primary);
}

/* Bootstrap's .text-muted uses its own --bs-secondary-color, which only ever
   switches under [data-bs-theme="dark"] — a Bootstrap-native attribute this
   project never sets (theme switching here uses [data-theme] + the custom
   properties above). Left alone, --bs-secondary-color stays pinned to its
   light-mode default (a near-black, low-opacity gray) even in our dark theme,
   making any .text-muted text nearly invisible on the dark background (found
   live: the footer "Developed by" credit and, less obviously, the legal
   disclaimer line above it). Overriding with !important to match .text-muted's
   own specificity/importance and tracking our already theme-aware
   --text-secondary fixes every .text-muted usage site-wide, not just the new
   footer line. */
.text-muted {
  color: var(--text-secondary) !important;
}

.navbar-brand {
  color: var(--text-primary);
}

.division-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.5rem;
  height: 100%;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-top: 4px solid var(--division-accent, var(--accent));
}

.division-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgb(0 0 0 / 0.08);
}

.icon-btn {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 0.4rem 0.9rem;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
  padding: 1.5rem 0;
}

@media (prefers-reduced-motion: reduce) {
  .division-card { transition: none; }
}

/* ---- Admin shell (Stage 3) ---- */

.admin-body {
  display: flex;
  min-height: 100vh;
}

.admin-sidebar {
  width: 240px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: width 0.2s ease;
}

.admin-sidebar.collapsed {
  width: 64px;
}

.admin-sidebar .brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem;
  border-bottom: 1px solid var(--border);
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
}

.admin-sidebar .brand-name {
  font-weight: 700;
}

.admin-sidebar.collapsed .brand-name,
.admin-sidebar.collapsed .nav-label {
  display: none;
}

.admin-nav {
  list-style: none;
  margin: 0;
  padding: 0.5rem;
  flex: 1;
}

.admin-nav .nav-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  border-radius: 0.5rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
}

.admin-nav .nav-link:hover {
  background: var(--surface-alt);
  color: var(--text-primary);
}

.admin-nav .nav-link.active {
  background: var(--accent);
  color: var(--accent-contrast);
}

.admin-sidebar-toggle {
  border: none;
  background: transparent;
  padding: 0.5rem;
  margin: 0.5rem;
  border-radius: 0.5rem;
  color: var(--text-secondary);
}

.admin-sidebar-toggle:hover {
  background: var(--surface-alt);
}

.admin-main {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.admin-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.admin-content {
  padding: 1.5rem;
  flex: 1;
}

.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1.25rem;
  height: 100%;
}

.admin-card .metric {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent);
}

.admin-flash {
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  margin-bottom: 1rem;
}

.admin-flash.success {
  background: color-mix(in srgb, var(--success) 15%, var(--surface));
  border: 1px solid var(--success);
  color: var(--text-primary);
}

.admin-flash.error {
  background: color-mix(in srgb, var(--danger) 15%, var(--surface));
  border: 1px solid var(--danger);
  color: var(--text-primary);
}

@media (max-width: 991.98px) {
  .admin-sidebar {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-sidebar { transition: none; }
}
