/* Fractional Distillation — B/R laboratory design system */

:root {
  --navy: #1b3a5f;
  --navy-deep: #0f243d;
  --navy-mid: #2a5080;
  --steel: #5a6f86;
  --mist: #eef2f7;
  --paper: #f7f9fc;
  --white: #ffffff;
  --ink: #1a2332;
  --muted: #5c6b7a;
  --line: #d5dee8;
  --teal: #0e7c7b;
  --teal-soft: #e6f4f4;
  --radius: 10px;
  --shadow: 0 8px 28px rgba(15, 36, 61, 0.08);
  --shadow-lg: 0 16px 48px rgba(15, 36, 61, 0.12);
  --nav-h: 72px;
  --font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "IBM Plex Serif", Georgia, "Times New Roman", serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  padding-top: var(--nav-h);
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--navy-mid); text-decoration: none; }
a:hover { color: var(--teal); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.25;
  color: var(--navy-deep);
  letter-spacing: -0.02em;
}

p { margin: 0 0 1rem; }
.text-muted { color: var(--muted) !important; }

/* ---- Nav ---- */
.site-nav {
  background: var(--navy-deep);
  min-height: var(--nav-h);
  box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}

.site-nav .navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.site-nav .navbar-brand img {
  height: 36px;
  width: auto;
  border-radius: 4px;
  background: #fff;
  padding: 2px;
}

.site-nav .brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.site-nav .brand-text small {
  font-size: 0.68rem;
  font-weight: 400;
  opacity: 0.7;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.site-nav .nav-link {
  color: rgba(255,255,255,0.82) !important;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.55rem 0.85rem !important;
  border-radius: 6px;
  transition: color 0.15s, background 0.15s;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus,
.site-nav .nav-link.active {
  color: #fff !important;
  background: rgba(255,255,255,0.08);
}

.site-nav .dropdown-menu {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  padding: 0.4rem;
  margin-top: 0.4rem !important;
}

.site-nav .dropdown-item {
  border-radius: 6px;
  font-size: 0.9rem;
  padding: 0.5rem 0.85rem;
  color: var(--ink);
}

.site-nav .dropdown-item:hover {
  background: var(--mist);
  color: var(--navy);
}

.site-nav .nav-cta {
  background: var(--teal) !important;
  color: #fff !important;
  margin-left: 0.35rem;
  padding: 0.5rem 1rem !important;
}

.site-nav .nav-cta:hover {
  background: #0b6867 !important;
}

.site-nav .navbar-toggler {
  border-color: rgba(255,255,255,0.25);
  padding: 0.35rem 0.55rem;
}

.site-nav .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba%28255,255,255,.85%29' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* ---- Hero ---- */
.hero {
  position: relative;
  background:
    linear-gradient(135deg, rgba(15,36,61,0.94) 0%, rgba(27,58,95,0.88) 55%, rgba(14,124,123,0.75) 100%),
    url("../img/9600%20Fractional%20Distillation%20System.jpg") center/cover no-repeat;
  color: #fff;
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 100%);
}

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

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.85);
  margin-bottom: 1.1rem;
}

.hero-eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  background: var(--teal);
}

.hero h1 {
  font-family: var(--font-display);
  font-size: clamp(2.1rem, 4.5vw, 3.35rem);
  font-weight: 600;
  color: #fff;
  margin: 0 0 1.1rem;
  max-width: 16ch;
}

.hero-sub {
  font-size: 1.15rem;
  line-height: 1.65;
  color: rgba(255,255,255,0.88);
  max-width: 38rem;
  margin-bottom: 1.75rem;
}

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

.btn-primary-lab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: var(--teal);
  color: #fff !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: none;
  transition: background 0.15s, transform 0.15s;
}

.btn-primary-lab:hover {
  background: #0b6867;
  transform: translateY(-1px);
}

.btn-ghost-lab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: transparent;
  color: #fff !important;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 0.75rem 1.35rem;
  border-radius: 999px;
  border: 1.5px solid rgba(255,255,255,0.45);
  transition: border-color 0.15s, background 0.15s;
}

.btn-ghost-lab:hover {
  border-color: #fff;
  background: rgba(255,255,255,0.08);
}

/* ---- Stats ---- */
.stats-bar {
  background: var(--white);
  border-bottom: 1px solid var(--line);
  margin-top: -1.5rem;
  position: relative;
  z-index: 2;
}

.stats-bar .container {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  padding: 0.25rem 0;
}

.stat-item {
  text-align: center;
  padding: 1.25rem 1rem;
  border-right: 1px solid var(--line);
}

.stat-item:last-child { border-right: none; }

.stat-number {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.1;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-top: 0.3rem;
  font-weight: 500;
}

@media (max-width: 767px) {
  .stat-item {
    border-right: none;
    border-bottom: 1px solid var(--line);
  }
  .stat-item:nth-child(odd) {
    border-right: 1px solid var(--line);
  }
  .stat-item:nth-last-child(-n+2) { border-bottom: none; }
}

/* ---- Sections ---- */
.section {
  padding: 4rem 0;
}

.section-muted { background: var(--paper); }

.section-label {
  margin-bottom: 2rem;
}

.section-label .eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.5rem;
}

.section-label h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0 0 0.5rem;
}

.section-label p {
  color: var(--muted);
  max-width: 40rem;
  margin: 0;
}

/* ---- Cards ---- */
.equip-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: transform 0.2s, box-shadow 0.2s;
  color: inherit;
  text-decoration: none;
}

.equip-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  color: inherit;
}

.equip-card-img {
  aspect-ratio: 4/3;
  background: var(--mist);
  overflow: hidden;
}

.equip-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s;
}

.equip-card:hover .equip-card-img img {
  transform: scale(1.04);
}

.equip-card-body {
  padding: 1.25rem 1.35rem 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.equip-card-body .range {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 0.35rem;
}

.equip-card-body h3 {
  font-size: 1.15rem;
  margin: 0 0 0.5rem;
}

.equip-card-body p {
  font-size: 0.92rem;
  color: var(--muted);
  margin: 0 0 1rem;
  flex: 1;
}

.equip-card-body .more {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--navy);
}

.app-tile {
  display: block;
  height: 100%;
  padding: 1.5rem;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--white);
  transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s;
  color: inherit;
  text-decoration: none;
}

.app-tile:hover {
  border-color: var(--navy-mid);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
  color: inherit;
}

.app-tile .icon-dot {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--teal-soft);
  color: var(--teal);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

.app-tile h3 {
  font-size: 1.05rem;
  margin: 0 0 0.4rem;
}

.app-tile p {
  font-size: 0.9rem;
  color: var(--muted);
  margin: 0;
}

/* ---- Content pages ---- */
.page-hero {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy-mid));
  color: #fff;
  padding: 2.75rem 0 2.25rem;
}

.page-hero h1 {
  color: #fff;
  font-size: clamp(1.7rem, 3.2vw, 2.35rem);
  margin: 0 0 0.5rem;
}

.page-hero .lead {
  color: rgba(255,255,255,0.85);
  font-size: 1.05rem;
  margin: 0;
  max-width: 42rem;
}

.page-hero .breadcrumb {
  margin-bottom: 0.75rem;
  font-size: 0.85rem;
}

.page-hero .breadcrumb a { color: rgba(255,255,255,0.7); }
.page-hero .breadcrumb a:hover { color: #fff; }
.page-hero .breadcrumb-item + .breadcrumb-item::before { color: rgba(255,255,255,0.4); }
.page-hero .breadcrumb-item.active { color: rgba(255,255,255,0.95); }

.content-wrap {
  padding: 3rem 0 4rem;
}

.content-main {
  max-width: 48rem;
}

.content-main h2 {
  font-size: 1.45rem;
  margin: 2rem 0 0.75rem;
}

.content-main h1 { margin-top: 0; }

.content-main p,
.content-main li {
  color: var(--ink);
}

.content-main ul {
  padding-left: 1.2rem;
  margin-bottom: 1.25rem;
}

.content-main li { margin-bottom: 0.35rem; }

.content-main img.float-end,
.content-main img.float-start,
.content-main img.content-img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  margin: 0.5rem 0 1.25rem;
}

.content-main img.float-end {
  float: right;
  margin-left: 1.5rem;
  max-width: min(42%, 280px);
}

.content-main img.float-start {
  float: left;
  margin-right: 1.5rem;
  max-width: min(42%, 280px);
}

@media (max-width: 575px) {
  .content-main img.float-end,
  .content-main img.float-start {
    float: none;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
}

.side-panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.side-panel h2 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  margin: 0 0 0.85rem;
  font-family: var(--font);
  font-weight: 700;
}

.side-panel .list-group-item {
  border: none;
  background: transparent;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.92rem;
}

.side-panel .list-group-item:last-child { border-bottom: none; }

.side-panel a {
  color: var(--navy);
  font-weight: 500;
}

.side-panel a:hover { color: var(--teal); }

/* ---- Process steps (home) ---- */
.process-step {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.process-step .num {
  flex: 0 0 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.process-step h3 {
  font-size: 1.05rem;
  margin: 0.15rem 0 0.35rem;
  font-family: var(--font);
}

.process-step p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* ---- CTA band ---- */
.cta-band {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy-mid) 60%, #145a5a);
  color: #fff;
  padding: 3.5rem 0;
  text-align: center;
}

.cta-band h2 {
  color: #fff;
  margin: 0 0 0.75rem;
}

.cta-band p {
  color: rgba(255,255,255,0.85);
  max-width: 34rem;
  margin: 0 auto 1.5rem;
}

/* ---- Footer ---- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.8);
  padding: 3rem 0 1.5rem;
  font-size: 0.92rem;
}

.site-footer h3 {
  color: #fff;
  font-family: var(--font);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin: 0 0 1rem;
}

.site-footer a {
  color: rgba(255,255,255,0.75);
}

.site-footer a:hover { color: #fff; }

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li { margin-bottom: 0.45rem; }

.site-footer .footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  margin-top: 2rem;
  padding-top: 1.25rem;
  font-size: 0.82rem;
  color: rgba(255,255,255,0.55);
}

/* ---- Utility ---- */
.prose-clearfix::after {
  content: "";
  display: table;
  clear: both;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .equip-card,
  .equip-card-img img,
  .app-tile,
  .btn-primary-lab {
    transition: none;
  }
}
