/* ============================================
   OPERIX — Global Styles & Bootstrap Overrides
   ============================================ */

/* --- Reset & Base --- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  font-size: var(--text-base);
  font-weight: var(--fw-normal);
  line-height: var(--lh-normal);
  color: var(--text);
  background-color: var(--bg);
  overflow-x: hidden;
}

/* --- Typography --- */

h1, h2, h3, h4, h5, h6,
.h1, .h2, .h3, .h4, .h5, .h6 {
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--text);
  margin-bottom: 1rem;
}

h1, .h1 { font-size: var(--text-5xl); }
h2, .h2 { font-size: var(--text-4xl); }
h3, .h3 { font-size: var(--text-3xl); }
h4, .h4 { font-size: var(--text-2xl); }
h5, .h5 { font-size: var(--text-xl); }
h6, .h6 { font-size: var(--text-lg); }

p {
  margin-bottom: 1rem;
  color: var(--muted);
  line-height: var(--lh-normal);
}

.lead {
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: var(--lh-relaxed);
}

.text-accent {
  color: var(--accent);
}

.text-muted-custom {
  color: var(--muted);
}

strong, b {
  font-weight: var(--fw-semibold);
  color: var(--text);
}

/* --- Links --- */

a {
  color: var(--accent);
  text-decoration: none;
  transition: color var(--transition-fast);
}

a:hover {
  color: var(--text);
}

/* --- Selection --- */

::selection {
  background-color: rgba(0, 229, 204, 0.3);
  color: var(--text);
}

/* --- Code --- */

code, pre {
  font-family: var(--font-code);
  font-size: var(--text-sm);
}

code {
  background-color: var(--surface);
  padding: 0.15em 0.4em;
  border-radius: var(--radius-sm);
  color: var(--accent);
}

pre {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.25rem;
  overflow-x: auto;
}

/* --- Lists --- */

ul, ol {
  color: var(--muted);
  padding-left: 1.25rem;
}

ul li, ol li {
  margin-bottom: 0.5rem;
}

/* --- HR --- */

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* --- Images --- */

img {
  max-width: 100%;
  height: auto;
}

/* ============================================
   Bootstrap Overrides
   ============================================ */

/* --- Container --- */

.container, .container-lg, .container-md,
.container-sm, .container-xl, .container-xxl {
  max-width: var(--container-max);
}

/* --- Cards --- */

.card {
  background-color: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: var(--text);
}

.card:hover {
  border-color: var(--border-hover);
}

/* --- Forms (Bootstrap override) --- */

.form-control,
.form-select {
  background-color: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: var(--radius-md);
  padding: 0.625rem 0.875rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.form-control:focus,
.form-select:focus {
  background-color: var(--surface);
  border-color: var(--accent);
  color: var(--text);
  box-shadow: 0 0 0 3px var(--accent-dim);
  outline: none;
}

.form-control::placeholder {
  color: var(--muted);
  opacity: 0.6;
}

.form-label {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: var(--fw-medium);
  color: var(--text);
  margin-bottom: 0.375rem;
}

/* --- Accordion (Bootstrap override) --- */

.accordion-item {
  background-color: var(--surface);
  border: 1px solid var(--border);
}

.accordion-button {
  background-color: var(--surface);
  color: var(--text);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  font-size: var(--text-base);
  box-shadow: none;
}

.accordion-button:not(.collapsed) {
  background-color: var(--surface-2);
  color: var(--accent);
  box-shadow: none;
}

.accordion-button::after {
  filter: brightness(0) saturate(100%) invert(83%) sepia(31%) saturate(1057%) hue-rotate(116deg) brightness(101%) contrast(101%);
}

.accordion-body {
  color: var(--muted);
  line-height: var(--lh-normal);
}

/* ============================================
   Utility Classes
   ============================================ */

.section-padding {
  padding-top: var(--section-py);
  padding-bottom: var(--section-py);
}

.section-padding-sm {
  padding-top: var(--section-py-sm);
  padding-bottom: var(--section-py-sm);
}

.bg-surface {
  background-color: var(--surface);
}

.bg-surface-2 {
  background-color: var(--surface-2);
}

.border-accent {
  border-color: var(--border-hover) !important;
}

.glow-border {
  border: 1px solid var(--border);
  transition: border-color var(--transition-base), box-shadow var(--transition-base);
}

.glow-border:hover {
  border-color: var(--border-hover);
  box-shadow: var(--shadow-glow);
}

.badge-accent {
  display: inline-block;
  background-color: var(--accent-dim);
  color: var(--accent);
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--fw-semibold);
  padding: 0.25rem 0.75rem;
  border-radius: var(--radius-full);
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.section-label {
  display: inline-block;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.75rem;
}

.section-heading {
  font-size: var(--text-4xl);
  font-weight: var(--fw-extrabold);
  margin-bottom: 1rem;
}

.section-subheading {
  font-size: var(--text-lg);
  color: var(--muted);
  max-width: 640px;
  line-height: var(--lh-relaxed);
}

.divider {
  width: 60px;
  height: 3px;
  background-color: var(--accent);
  border-radius: var(--radius-full);
  margin-bottom: 1.5rem;
}

/* ============================================
   Responsive Typography
   ============================================ */

@media (max-width: 991.98px) {
  h1, .h1 { font-size: var(--text-4xl); }
  h2, .h2 { font-size: var(--text-3xl); }
  h3, .h3 { font-size: var(--text-2xl); }
  .section-heading { font-size: var(--text-3xl); }
  .section-padding { 
    padding-top: var(--section-py-sm); 
    padding-bottom: var(--section-py-sm); 
  }
}

@media (max-width: 575.98px) {
  h1, .h1 { font-size: var(--text-3xl); }
  h2, .h2 { font-size: var(--text-2xl); }
  .section-heading { font-size: var(--text-2xl); }
}