@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/InterVariable.woff2") format("woff2");
}

body {
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* ===== Dark mode card surfaces ===== */
:root {
  --dark-bg-main: #020617;
  --dark-card: #111827;
  --dark-border: #334155; /* stronger border for clearer separation */
}

/* main background (already applied to body via bg-slate-950) */
.bg-slate-950 {
  background-color: var(--dark-bg-main);
}

/* cards become real surfaces in dark mode */
.rounded-2xl {
  background-color: transparent;
  border-color: var(--dark-border);
}

:not(.theme-light) .rounded-2xl {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
}

/* subtle hover lift for dark mode cards */
:not(.theme-light) .rounded-2xl:hover {
  border-color: #64748b; /* brighter border on hover */
}

/* ===== Light theme – lively but serious ===== */
.theme-light {
  --bg-main: #f4f6fb; /* cool, calm background */
  --bg-card: #ffffff; /* true surface */
  --text-strong: #0b1220; /* crisp headings */
  --text-primary: #1f2a44; /* slate-blue body */
  --text-secondary: #3b4661;
  --text-muted: #5b6785;
  --border-soft: #d9dfec;
  --border-strong: #c3cbe0;
}

.theme-light .bg-slate-950 {
  background-color: var(--bg-main);
}

.theme-light .text-slate-100 {
  color: var(--text-strong);
}

.theme-light .text-slate-200 {
  color: var(--text-primary);
}

.theme-light .text-slate-300 {
  color: var(--text-secondary);
}

.theme-light .text-slate-400,
.theme-light .text-slate-500 {
  color: var(--text-muted);
}

.theme-light .border-slate-800 {
  border-color: var(--border-soft);
}

/* cards become real surfaces in light mode */
.theme-light .rounded-2xl {
  background-color: var(--bg-card);
}

/* desktop services submenu surface */
:root:not(.theme-light) .desktop-services-menu {
  background-color: var(--dark-card);
  border-color: var(--dark-border);
}

.theme-light .desktop-services-menu {
  background-color: var(--bg-card);
  border-color: var(--border-soft);
}

/* light theme desktop submenu hover */
.theme-light .desktop-services-menu a:hover {
  background-color: var(--border-soft);
}

/* dark theme desktop submenu hover */
:root:not(.theme-light) .desktop-services-menu a:hover {
  background-color: var(--dark-border);
  color: #f8fafc;
}


/* toggle */
.theme-toggle {
  align-items: center;
  background-color: #0f172a;
  border: 1px solid #334155;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  height: 28px;
  justify-content: flex-start;
  padding: 3px;
  transition: background-color 200ms ease, border-color 200ms ease;
  width: 50px;
}

.theme-toggle-track {
  align-items: center;
  display: inline-flex;
  height: 100%;
  width: 100%;
}

.theme-toggle-thumb {
  background-color: #e2e8f0;
  border-radius: 999px;
  height: 22px;
  transition: transform 200ms ease, background-color 200ms ease;
  width: 22px;
}

.theme-toggle[aria-checked="true"] .theme-toggle-thumb {
  transform: translateX(20px);
}

@media (min-width: 768px) {
  .theme-toggle-desktop {
    margin-left: 12px;
    margin-top: -4px;
  }
}

.theme-light .theme-toggle {
  background-color: var(--bg-card);
  border-color: var(--border-soft);
}

.theme-light .theme-toggle:hover {
  border-color: var(--border-strong);
}

.theme-light .theme-toggle-thumb {
  background-color: var(--text-strong);
}

/* mobile hamburger button styles */
.hamburger-button {
  align-items: center;
  border: 1px solid #334155;
  border-radius: 8px;
  display: inline-flex;
  flex-direction: column;
  gap: 4px;
  height: 36px;
  justify-content: center;
  padding: 8px;
  transition: border-color 200ms ease;
  width: 42px;
}

.hamburger-button:hover {
  border-color: #64748b;
}

.hamburger-bar {
  background-color: #e2e8f0;
  border-radius: 999px;
  display: block;
  height: 2px;
  width: 18px;
}

.hamburger-button.is-open .hamburger-bar-middle {
  opacity: 0;
}

.hamburger-button.is-open .hamburger-bar-top {
  transform: translateY(6px) rotate(45deg);
}

.hamburger-button.is-open .hamburger-bar-bottom {
  transform: translateY(-6px) rotate(-45deg);
}

.theme-light .hamburger-button {
  border-color: var(--border-soft);
}

.theme-light .hamburger-button:hover {
  border-color: var(--border-strong);
}

.theme-light .hamburger-bar {
  background-color: var(--text-strong);
}


/* mobile menu overlay container */
.menu-open {
  overflow: hidden;
}

.mobile-menu {
  background-color: var(--dark-card);
  display: flex;
  flex-direction: column;
  inset: 0;
  overflow-y: auto;
  padding: 10px 24px 24px;
  position: fixed;
  z-index: 40;
}

.mobile-menu-content {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* mobile menu row sizing + alignment */
.mobile-menu-item {
  align-items: center;
  display: flex;
  font-size: 1rem;
  font-weight: 500;
  justify-content: space-between;
  min-height: 48px;
  padding: 0 4px;
  text-transform: uppercase;
}

/* divider between mobile menu items */
.mobile-menu-divider {
  background-color: var(--dark-border);
  height: 1px;
  width: 100%;
}

/* services row and chevron */
.mobile-services-toggle {
  align-items: center;
  color: #f1f5f9;
  display: flex;
  font-size: 1rem;
  font-weight: 500;
  justify-content: space-between;
  line-height: 1;
  width: 100%;
}

.mobile-services-chevron {
  align-self: center;
  color: #94a3b8;
  display: inline-flex;
  height: 28px;
  line-height: 1;
  transform: none;
  transition: transform 200ms ease;
  width: 28px;
}

/* chevron svg sizing */
.mobile-services-chevron svg {
  height: 100%;
  width: 100%;
}

/* rotate chevron when submenu is open */
.mobile-services-toggle[aria-expanded="true"] .mobile-services-chevron {
  transform: rotate(180deg);
}

/* desktop services chevron */
.desktop-services-chevron {
  color: #94a3b8;
  display: inline-flex;
  height: 16px;
  width: 16px;
}

.desktop-services-chevron svg {
  height: 100%;
  width: 100%;
}

/* services submenu layout */
.mobile-submenu {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-left: 12px;
}

/* display mode row */
.mobile-display-mode {
  align-items: center;
  display: flex;
  justify-content: space-between;
  padding: 0 4px;
}

/* light theme overrides for mobile menu */
.theme-light .mobile-menu {
  background-color: var(--bg-card);
}

.theme-light .mobile-services-toggle {
  color: var(--text-strong);
}

.theme-light .mobile-menu-divider {
  background-color: var(--border-soft);
}

/* desktop main menu hover/focus (top-level items only) */
@media (min-width: 768px) {
  .desktop-main-menu > a,
  .desktop-main-menu > .group > button {
    position: relative;
    padding-bottom: 6px;
    transition: color 180ms ease;
  }

  .desktop-main-menu > a::after,
  .desktop-main-menu > .group > button::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    border-radius: 999px;
    background-color: currentColor;
    opacity: 0;
    transform: scaleX(0.6);
    transition: opacity 180ms ease, transform 180ms ease;
  }

  .desktop-main-menu > a:hover,
  .desktop-main-menu > .group > button:hover,
  .desktop-main-menu > a:focus-visible,
  .desktop-main-menu > .group > button:focus-visible {
    color: #f8fafc;
  }

  .desktop-main-menu > a:hover::after,
  .desktop-main-menu > .group > button:hover::after,
  .desktop-main-menu > a:focus-visible::after,
  .desktop-main-menu > .group > button:focus-visible::after {
    opacity: 1;
    transform: scaleX(1);
  }

  .theme-light .desktop-main-menu > a:hover,
  .theme-light .desktop-main-menu > .group > button:hover,
  .theme-light .desktop-main-menu > a:focus-visible,
  .theme-light .desktop-main-menu > .group > button:focus-visible {
    color: var(--text-strong);
  }
}

/* ===== Architecture Diagram ===== */
.architecture-diagram {
  max-width: 100%;
}

/* Fieldset card with legend on border */
.arch-card {
  background-color: var(--dark-card);
  border: 2px solid var(--dark-border);
  border-radius: 12px;
  margin: 0;
  min-height: 120px;
  padding: 20px 16px 16px;
}

.arch-legend {
  background-color: var(--dark-bg-main);
  border: 2px solid var(--dark-border);
  border-radius: 6px;
  color: #94a3b8;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  margin-left: 12px;
  padding: 4px 12px;
  text-transform: uppercase;
}

/* Larger legend variant (used for content cards, not diagrams) */
.arch-legend.arch-legend-large {
  font-size: 1em;
  font-weight: 500;
  letter-spacing: normal;
  padding: 6px 12px;
  text-transform: none;
}

/* Legend with icon instead of text */
.arch-legend-icon {
  align-items: center;
  display: inline-flex;
  justify-content: center;
  padding: 6px 10px;
}

.arch-legend-icon svg {
  display: block;
  height: 16px;
  width: 16px;
}

.arch-card-wide {
  max-width: 480px;
  width: 100%;
}

/* List inside cards */
.arch-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.arch-list li {
  background-color: rgba(51, 65, 85, 0.5);
  border: 1px solid #334155;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 0.875rem;
  line-height: 1;
  padding: 8px 12px;
  width: fit-content;
}

/* Inline list for warehouse */
.arch-list-inline {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  list-style: none;
  margin: 0;
  padding: 0;
}

.arch-list-inline li {
  background-color: rgba(51, 65, 85, 0.5);
  border: 1px solid #334155;
  border-radius: 6px;
  color: #cbd5e1;
  font-size: 0.875rem;
  line-height: 1;
  padding: 8px 12px;
}

/* Text inside cards */
.arch-text {
  color: #94a3b8;
  font-size: 0.875rem;
  line-height: 1.5;
  margin: 0;
}

/* ETL steps layout */
.arch-steps {
  align-items: center;
  color: #cbd5e1;
  display: flex;
  font-size: 1rem;
  font-weight: 500;
  gap: 12px;
  justify-content: center;
  padding: 8px 0;
}

.arch-step-arrow {
  color: #64748b;
  font-size: 1.25rem;
}

/* SVG connector lines */
.arch-connector {
  display: block;
  max-width: 100%;
}

.arch-line {
  stroke: #475569;
  stroke-width: 2;
  fill: none;
}

.arch-arrow-fill {
  fill: #475569;
}

/* ===== Light theme overrides for architecture ===== */
.theme-light .arch-card {
  background-color: var(--bg-card);
  border-color: var(--border-soft);
}

.theme-light .arch-legend {
  background-color: var(--bg-main);
  border-color: var(--border-soft);
  color: var(--text-muted);
}

.theme-light .arch-list li,
.theme-light .arch-list-inline li {
  background-color: rgba(215, 223, 236, 0.5);
  border-color: var(--border-soft);
  color: var(--text-primary);
}

.theme-light .arch-text {
  color: var(--text-muted);
}

.theme-light .arch-steps {
  color: var(--text-primary);
}

.theme-light .arch-step-arrow {
  color: var(--text-muted);
}

.theme-light .arch-line {
  stroke: var(--border-strong);
}

.theme-light .arch-arrow-fill {
  fill: var(--border-strong);
}

/* ===== Learn more links ===== */
.learn-more-link {
  color: #cbd5e1; /* slate-300 */
  transition: color 200ms ease;
}

.learn-more-link:hover {
  color: #f1f5f9; /* slate-100 - brighter in dark mode */
}

.theme-light .learn-more-link {
  color: #4f6385; /* slightly muted blue-gray */
}

.theme-light .learn-more-link:hover {
  color: #1e3a5f; /* deep navy on hover - darker and more visible */
}

/* ===== Clickable cards (full card clickable, text still selectable) ===== */
.card-link-stretch {
  cursor: pointer;
}

/* On desktop, text shows text cursor to indicate it's selectable (not clickable) */
@media (min-width: 768px) {
  .card-link-stretch p {
    cursor: text;
  }
}

