:root {
  color-scheme: light;
  --brand-blue: #2a6fff;
  --brand-amber: #d97706;
  --brand-teal: #0ea5a8;
  --surface: #ffffff;
  --surface-muted: #f5f7fb;
  --border-color: rgba(15, 23, 42, 0.12);
  --text-color: #0f172a;
  --muted-text: #475569;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --surface: #0f172a;
  --surface-muted: #020617;
  --border-color: rgba(255, 255, 255, 0.1);
  --text-color: #f8fafc;
  --muted-text: #cbd5f5;
  --shadow-soft: 0 15px 40px rgba(2, 6, 23, 0.6);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
  background-color: var(--surface-muted);
  color: var(--text-color);
  transition: background-color 0.25s ease, color 0.25s ease;
}

.brand-logo-dark {
  display: none;
}

:root[data-theme="dark"] .brand-logo-dark {
  display: inline-block;
}

:root[data-theme="dark"] .brand-logo-light {
  display: none;
}

::selection {
  background-color: rgba(14, 165, 168, 0.25);
  color: #0f172a;
}

h1,
h2,
h3,
h4 {
  font-weight: 700;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2.5rem, 4vw, 3rem);
}

h2 {
  font-size: clamp(2rem, 3vw, 2.4rem);
}

h3 {
  font-size: clamp(1.5rem, 2.5vw, 1.875rem);
}

.anchor-target {
  scroll-margin-top: 6rem;
}

@media (min-width: 768px) {
  .anchor-target {
    scroll-margin-top: 8.5rem;
  }
}

.skip-link {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  padding: 0.75rem 1.25rem;
  background: var(--brand-amber);
  color: #fff;
  border-radius: 9999px;
  z-index: 999;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.bg-white\/5,
.bg-gray-900\/40,
.bg-black\/30,
.bg-slate-900,
.bg-slate-950 {
  background-color: var(--surface) !important;
  border-color: var(--border-color) !important;
  box-shadow: var(--shadow-soft);
}

.border-white\/10,
.border-white\/5 {
  border-color: var(--border-color) !important;
}

.divide-white\/10 {
  border-color: var(--border-color) !important;
}

.text-white,
.text-gray-200,
.text-slate-100,
.text-slate-200 {
  color: var(--text-color) !important;
}

.text-gray-300,
.text-gray-400,
.text-gray-500 {
  color: var(--muted-text) !important;
}

.text-brand-blue {
  color: var(--brand-blue) !important;
}

.text-brand-orange,
.text-brand-amber {
  color: var(--brand-amber) !important;
}

.text-brand-teal {
  color: var(--brand-teal) !important;
}

.bg-brand-orange,
.bg-brand-amber {
  background-color: var(--brand-amber) !important;
}

.bg-brand-blue {
  background-color: var(--brand-blue) !important;
}

.text-brand-blue:hover {
  color: var(--brand-amber) !important;
}

.theme-text-strong {
  color: var(--text-color) !important;
}

.theme-text-muted {
  color: var(--muted-text) !important;
}

.products-dropdown-panel {
  background-color: var(--surface);
  border-color: var(--border-color);
  box-shadow: var(--shadow-soft);
  color: var(--text-color);
}

.product-menu-link {
  color: inherit;
  border: 1px solid transparent;
}

.product-menu-link:hover {
  border-color: rgba(42, 111, 255, 0.25);
  background-color: rgba(15, 23, 42, 0.05);
  color: var(--brand-blue);
}

:root[data-theme="dark"] .product-menu-link:hover {
  background-color: rgba(255, 255, 255, 0.08);
}

.menu-link-title {
  color: var(--text-color);
}

.menu-link-summary {
  color: var(--muted-text);
}

.mobile-products-card {
  background-color: var(--surface-muted);
  border-color: var(--border-color);
  color: var(--text-color);
  box-shadow: var(--shadow-soft);
}

.mobile-product-link {
  background-color: var(--surface);
  border-color: transparent;
  color: var(--text-color);
}

.mobile-product-link:hover {
  border-color: rgba(42, 111, 255, 0.4);
  color: var(--brand-blue);
}

.mobile-view-all-link {
  border-color: var(--border-color);
}

.mobile-view-all-link:hover {
  border-color: var(--brand-blue);
}

.rfq-input {
  width: 100%;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background-color: rgba(248, 250, 252, 0.7);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-color);
}

.rfq-input:focus {
  outline: 2px solid rgba(42, 111, 255, 0.35);
  outline-offset: 1px;
}

.rfq-textarea {
  width: 100%;
  min-height: 120px;
  border-radius: 0.75rem;
  border: 1px solid rgba(15, 23, 42, 0.15);
  background-color: rgba(248, 250, 252, 0.7);
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  color: var(--text-color);
}

.rfq-textarea:focus {
  outline: 2px solid rgba(42, 111, 255, 0.35);
  outline-offset: 1px;
}

:root[data-theme="dark"] .rfq-input,
:root[data-theme="dark"] .rfq-textarea {
  background-color: rgba(15, 23, 42, 0.9);
  border-color: rgba(255, 255, 255, 0.2);
  color: #f8fafc;
}

:root[data-theme="dark"] body {
  background-color: #020617;
  background-image: radial-gradient(circle at top, rgba(42, 111, 255, 0.15), transparent 45%),
    radial-gradient(circle at 20% 20%, rgba(13, 148, 136, 0.12), transparent 35%);
  color: var(--text-color);
}

:root[data-theme="dark"] .site-header {
  border-color: rgba(148, 163, 184, 0.2);
  background-color: rgba(2, 6, 23, 0.92);
}

:root[data-theme="dark"] .site-footer {
  background-color: #020617;
  border-color: rgba(148, 163, 184, 0.2);
  color: #e2e8f0;
}

:root[data-theme="dark"] .nav-link {
  color: #cbd5f5;
}

:root[data-theme="dark"] .nav-link:hover {
  color: var(--brand-blue);
}

:root[data-theme="dark"] .nav-link[aria-current="page"] {
  color: var(--brand-blue) !important;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.6);
}

:root[data-theme="dark"] .bg-white,
:root[data-theme="dark"] .bg-slate-50,
:root[data-theme="dark"] .bg-white\/5,
:root[data-theme="dark"] .bg-slate-100,
:root[data-theme="dark"] .bg-slate-200 {
  background-color: #0f172a !important;
  color: #f8fafc;
  border-color: rgba(255, 255, 255, 0.1) !important;
}

:root[data-theme="dark"] .border-slate-200 {
  border-color: rgba(255, 255, 255, 0.15) !important;
}

:root[data-theme="dark"] .text-slate-900,
:root[data-theme="dark"] .text-slate-800 {
  color: #f8fafc !important;
}

:root[data-theme="dark"] .text-slate-700,
:root[data-theme="dark"] .text-slate-600,
:root[data-theme="dark"] .text-slate-500 {
  color: #cbd5f5 !important;
}

:root[data-theme="dark"] .shadow-xl,
:root[data-theme="dark"] .shadow-sm,
:root[data-theme="dark"] .shadow-md {
  box-shadow: var(--shadow-soft);
}

:root[data-theme="dark"] table thead {
  background-color: rgba(255, 255, 255, 0.03) !important;
}

:root[data-theme="dark"] table td,
:root[data-theme="dark"] table th {
  color: #e2e8f0 !important;
}
:root[data-theme="dark"] #theme-toggle {
  background-color: #0f172a;
  border-color: rgba(148, 163, 184, 0.4);
  color: #e2e8f0;
}

.cta-secondary {
  border: 1px solid rgba(15, 23, 42, 0.2);
  color: #0f172a;
  background-color: rgba(255, 255, 255, 0.85);
}

.cta-secondary:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  box-shadow: 0 8px 20px rgba(42, 111, 255, 0.2);
}

:root[data-theme="dark"] .cta-secondary {
  border-color: rgba(255, 255, 255, 0.35);
  color: #f8fafc;
  background-color: rgba(255, 255, 255, 0.08);
}

:root[data-theme="dark"] .cta-secondary:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
