/* ==========================================================
   B Pharm LLC — site styles
   Palette: deep navy, white, turquoise
   ========================================================== */

:root {
  --navy-900: #0B2140;
  --navy-800: #112D52;
  --navy-700: #1A3D69;
  --navy-line: #2A4E7A;
  --teal: #18B3A4;
  --teal-strong: #0E8C80;   /* teal for text on white (AA contrast) */
  --teal-soft: #DDF3F0;
  --mist: #F1F6F8;
  --white: #FFFFFF;
  --ink: #13253D;
  --muted: #4D6077;
  --line: #D5E0E7;
  --on-navy: #C9D7E6;
  --danger: #C2412D;

  --font-display: "Unbounded", "Segoe UI", system-ui, sans-serif;
  --font-body: "Onest", "Segoe UI", system-ui, sans-serif;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;

  --container: 1180px;
  --gutter: 20px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 8px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: 16px; top: -60px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--teal);
  color: var(--navy-900);
  font-weight: 600;
  border-radius: var(--radius-s);
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid transparent;
  border-radius: 999px;
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, border-color .2s, color .2s;
}

.btn-primary {
  background: var(--teal);
  color: var(--navy-900);
}
.btn-primary:hover { background: #2BC9B9; }

.btn-ghost {
  border-color: var(--navy-line);
  color: var(--white);
}
.btn-ghost:hover { border-color: var(--teal); }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy-900);
  color: var(--white);
  transition: box-shadow .2s;
}
.site-header.is-scrolled { box-shadow: 0 1px 0 var(--navy-line); }

.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  flex-shrink: 0;
}
.brand-mark { width: 36px; height: 36px; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.125rem;
  letter-spacing: -0.01em;
}
.brand-llc {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: .8125rem;
  color: var(--teal);
  margin-left: 2px;
}

.main-nav { margin-left: auto; }
.main-nav ul {
  display: flex;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.main-nav a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-s);
  color: var(--on-navy);
  font-size: .9375rem;
  font-weight: 500;
  text-decoration: none;
  transition: color .2s;
}
.main-nav a:hover { color: var(--white); }

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.lang-switch {
  display: flex;
  padding: 3px;
  border: 1px solid var(--navy-line);
  border-radius: 999px;
}
.lang-switch button {
  min-width: 40px;
  min-height: 32px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--on-navy);
  font: 600 .8125rem/1 var(--font-body);
  cursor: pointer;
}
.lang-switch button:hover { color: var(--white); }
.lang-switch button[aria-pressed="true"] {
  background: var(--teal);
  color: var(--navy-900);
}

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  padding: 0;
  border: 1px solid var(--navy-line);
  border-radius: var(--radius-s);
  background: transparent;
  color: var(--white);
  cursor: pointer;
}
.menu-bars,
.menu-bars::before,
.menu-bars::after {
  display: block;
  width: 18px; height: 2px;
  margin: 0 auto;
  background: currentColor;
  border-radius: 2px;
  transition: transform .2s, opacity .2s;
}
.menu-bars { position: relative; }
.menu-bars::before,
.menu-bars::after { content: ""; position: absolute; left: 0; }
.menu-bars::before { top: -6px; }
.menu-bars::after { top: 6px; }
.menu-toggle[aria-expanded="true"] .menu-bars { background: transparent; }
.menu-toggle[aria-expanded="true"] .menu-bars::before { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] .menu-bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */

.hero {
  background: var(--navy-900);
  color: var(--white);
  padding: 56px 0 72px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 48px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(1.875rem, 1.1rem + 2.2vw, 2.85rem);
  line-height: 1.1;
  max-width: 16ch;
}

.hero-lead {
  margin-top: 24px;
  max-width: 46ch;
  color: var(--on-navy);
  font-size: 1.125rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

/* Route map */

.route-map { margin: 0; }
.route-map svg {
  width: 100%;
  height: auto;
  border-radius: var(--radius-l);
  background: var(--navy-800);
}

.sea { fill: var(--navy-700); }
.sea-label {
  fill: #6F8DB3;
  font: italic 500 10px var(--font-body);
}

.route { fill: none; stroke-linecap: round; }
.route-out   { stroke: var(--teal); stroke-width: 2.5; }
.route-in    { stroke: #8FB3DA; stroke-width: 2; stroke-dasharray: .015 .02; }
.route-minor { stroke: #4F739F; stroke-width: 1.5; }

.node { cursor: default; outline: none; }
.node text {
  fill: var(--white);
  font: 600 12px var(--font-display);
  letter-spacing: 0;
}
.node-hub circle { fill: var(--teal); }
.node-hub .hub-ring { fill: none; stroke: var(--teal); stroke-width: 2; opacity: .45; }
.node-market circle { fill: var(--white); stroke: var(--teal); stroke-width: 3; }
.node-minor circle { fill: #6F8DB3; }
.node-source rect { fill: none; stroke: #8FB3DA; stroke-width: 2; }
.node-source text { fill: #8FB3DA; font-size: 11px; }

.node:hover circle,
.node:focus-visible circle,
.node:hover rect,
.node:focus-visible rect { stroke: var(--white); stroke-width: 3; }

/* One orchestrated moment: routes draw in on load */
.js .route-out,
.js .route-minor { stroke-dasharray: 1; stroke-dashoffset: 1; }
.js .is-drawn .route-out,
.js .is-drawn .route-minor {
  stroke-dashoffset: 0;
  transition: stroke-dashoffset 1.4s cubic-bezier(.6,.05,.3,1);
}
.js .is-drawn .route-out:nth-of-type(n) { transition-delay: .35s; }
.js .is-drawn .route-minor { transition-delay: .9s; }

.map-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-top: 16px;
  color: var(--on-navy);
  font-size: .875rem;
}
.legend-item { display: inline-flex; align-items: center; gap: 8px; }
.key { display: inline-block; width: 12px; height: 12px; border-radius: 50%; }
.key-hub { background: var(--teal); }
.key-market { background: var(--white); box-shadow: inset 0 0 0 3px var(--teal); }
.key-minor { background: #6F8DB3; width: 8px; height: 8px; }
.key-source { border-radius: 3px; box-shadow: inset 0 0 0 2px #8FB3DA; }

/* ---------- Sections ---------- */

.section { padding: 96px 0; }
.section-tint { background: var(--mist); }

.section h2 {
  font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.375rem);
  color: var(--navy-900);
}

.section-head {
  max-width: 640px;
  margin-bottom: 48px;
}
.section-head p {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.125rem;
}

/* About */

.about-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 5fr);
  gap: 64px;
  align-items: start;
}
.about-copy p {
  margin-top: 20px;
  max-width: 62ch;
  color: var(--muted);
}
.about-copy p:first-of-type { color: var(--ink); font-size: 1.1875rem; }

.facts {
  margin: 0;
  border-top: 2px solid var(--navy-900);
}
.facts div {
  display: grid;
  grid-template-columns: minmax(120px, 2fr) 3fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--muted); font-size: .9375rem; }
.facts dd { margin: 0; font-weight: 600; }

.sub-title {
  margin-top: 88px;
  margin-bottom: 32px;
  font-size: 1.375rem;
  color: var(--navy-900);
}

.activities {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.activity {
  padding-top: 20px;
  border-top: 3px solid var(--teal);
}
.activity h4 {
  font-size: 1.0625rem;
  color: var(--navy-900);
}
.activity p {
  margin-top: 12px;
  color: var(--muted);
}

/* Products */

.products {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 20px;
}
.product {
  padding: 28px 24px 32px;
  background: var(--white);
  border-radius: var(--radius-m);
  border: 1px solid var(--line);
}
.product-icon {
  width: 48px; height: 48px;
  color: var(--teal-strong);
}
.product h3 {
  margin-top: 24px;
  font-size: 1.0625rem;
  color: var(--navy-900);
}
.product p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 1rem;
}

.products-note {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 12px;
  margin-top: 32px;
  color: var(--muted);
}
.products-note a {
  color: var(--teal-strong);
  font-weight: 600;
  text-underline-offset: 3px;
}

/* Markets */

.markets-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}
.markets-grid .section-head { margin-bottom: 0; }

.markets {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 2px solid var(--navy-900);
}
.market {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.market-dot {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--white);
  box-shadow: inset 0 0 0 3px var(--teal);
}
.market-hub .market-dot { background: var(--teal); box-shadow: none; }
.market-minor .market-dot { width: 9px; height: 9px; margin-left: 2px; background: #6F8DB3; box-shadow: none; }
.market-name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1875rem;
  color: var(--navy-900);
}
.market-minor .market-name { font-size: 1.0625rem; color: var(--ink); }
.market-role {
  color: var(--muted);
  font-size: .9375rem;
  text-align: right;
}

/* Partnership */

.partner-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: 64px;
  align-items: start;
}
.partner-lead {
  margin-top: 16px;
  color: var(--muted);
  font-size: 1.125rem;
  max-width: 52ch;
}
.partner-types {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0 32px;
  list-style: none;
  margin: 36px 0 0;
  padding: 0;
}
.partner-types li {
  position: relative;
  padding: 16px 0 16px 28px;
  border-bottom: 1px solid var(--line);
  font-weight: 500;
}
.partner-types li::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 14px; height: 7px;
  margin-top: -6px;
  border-left: 2.5px solid var(--teal-strong);
  border-bottom: 2.5px solid var(--teal-strong);
  transform: rotate(-45deg);
}

.advantages {
  padding: 36px 32px;
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--radius-l);
}
.advantages h3 { font-size: 1.25rem; }
.advantages ul {
  list-style: none;
  margin: 20px 0 0;
  padding: 0;
}
.advantages li {
  padding: 14px 0 14px 22px;
  position: relative;
  border-bottom: 1px solid var(--navy-line);
  color: var(--on-navy);
}
.advantages li:last-child { border-bottom: 0; padding-bottom: 0; }
.advantages li::before {
  content: "";
  position: absolute;
  left: 0; top: 23px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--teal);
}

/* Mission */

.mission {
  padding: 96px 0;
  background: var(--teal-soft);
}
.mission-grid {
  display: grid;
  grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
  gap: 64px;
  align-items: end;
}
.mission h2 {
  font-size: 1.125rem;
  color: var(--teal-strong);
}
.mission-text {
  margin-top: 20px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.375rem, 1rem + 1.3vw, 2.125rem);
  line-height: 1.3;
  color: var(--navy-900);
  max-width: 30ch;
}
.vision {
  padding-left: 24px;
  border-left: 3px solid var(--teal);
}
.vision h3 { font-size: 1rem; color: var(--navy-900); }
.vision p { margin-top: 10px; color: var(--ink); }

/* Contact */

.contact {
  padding: 96px 0;
  background: var(--navy-900);
  color: var(--white);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: 64px;
  align-items: start;
}
.contact h2 { font-size: clamp(1.625rem, 1.2rem + 1.4vw, 2.375rem); }
.contact-info > p {
  margin-top: 16px;
  color: var(--on-navy);
  font-size: 1.125rem;
  max-width: 42ch;
}
.contact-details { margin: 40px 0 0; }
.contact-details div {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--navy-line);
}
.contact-details dt { color: var(--on-navy); font-size: .9375rem; }
.contact-details dd { margin: 0; font-weight: 600; }
.contact-details dd.pending { color: #8FA5BF; font-weight: 500; font-style: italic; }

.contact-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  padding: 36px 32px;
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius-l);
}
.field-wide { grid-column: 1 / -1; }
.field label {
  display: block;
  margin-bottom: 6px;
  font-size: .9375rem;
  font-weight: 600;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-s);
  background: var(--white);
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 128px; }
.field input:hover,
.field select:hover,
.field textarea:hover { border-color: #AFC1CE; }
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--teal-strong);
  box-shadow: 0 0 0 3px rgba(24, 179, 164, .25);
}
.field.has-error input,
.field.has-error textarea { border-color: var(--danger); }
.field-error {
  min-height: 0;
  margin-top: 6px;
  color: var(--danger);
  font-size: .875rem;
}
.field-error:empty { display: none; }

.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}
.form-privacy { color: var(--muted); font-size: .875rem; }
.btn[disabled] { opacity: .6; cursor: progress; }

.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px; height: 1px;
  overflow: hidden;
}

.form-success,
.form-fail {
  padding: 16px 18px;
  border-radius: var(--radius-s);
  color: var(--navy-900);
}
.form-success {
  background: var(--teal-soft);
  border-left: 4px solid var(--teal-strong);
}
.form-fail {
  background: #FBE9E6;
  border-left: 4px solid var(--danger);
}

/* Footer */

.site-footer {
  padding: 40px 0;
  background: #081A33;
  color: var(--on-navy);
  font-size: .9375rem;
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 24px 48px;
  align-items: center;
}
.footer-brand .brand-name { color: var(--white); }
.footer-brand p { margin-top: 4px; font-size: .875rem; }
.footer-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { color: var(--white); }

/* ---------- Responsive ---------- */

@media (max-width: 1080px) {
  .products { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .main-nav a { padding: 8px 8px; }
}

@media (max-width: 920px) {
  .menu-toggle { display: inline-block; }

  .main-nav {
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    margin: 0;
    background: var(--navy-900);
    border-top: 1px solid var(--navy-line);
    border-bottom: 1px solid var(--navy-line);
    display: none;
  }
  .main-nav.is-open { display: block; }
  .main-nav ul {
    flex-direction: column;
    gap: 0;
    padding: 8px var(--gutter) 16px;
  }
  .main-nav a { padding: 14px 4px; font-size: 1.0625rem; border-bottom: 1px solid var(--navy-line); border-radius: 0; }
  .main-nav li:last-child a { border-bottom: 0; }
  .header-actions { margin-left: auto; }

  .hero { padding: 40px 0 56px; }
  .hero-grid,
  .about-grid,
  .markets-grid,
  .partner-grid,
  .mission-grid,
  .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .hero h1 { max-width: 20ch; }

  .section, .mission, .contact { padding: 72px 0; }
  .sub-title { margin-top: 64px; }
  .activities { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .footer-inner { grid-template-columns: minmax(0, 1fr); }
  .footer-nav { justify-content: flex-start; }
}

@media (max-width: 600px) {
  :root { --header-h: 64px; }
  body { font-size: 1rem; }
  .brand-mark { width: 32px; height: 32px; }
  .brand-name { font-size: 1rem; }
  .lang-switch button { min-width: 34px; padding: 4px 6px; }
  .products { grid-template-columns: minmax(0, 1fr); }
  .partner-types { grid-template-columns: minmax(0, 1fr); }
  .contact-form { grid-template-columns: minmax(0, 1fr); padding: 28px 20px; }
  .advantages { padding: 28px 22px; }
  .market { grid-template-columns: 16px minmax(0, 1fr); row-gap: 4px; }
  .market-role { grid-column: 2; text-align: left; }
  .facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .hero h1 { font-size: 1.625rem; }
  h1, h2, .mission-text { overflow-wrap: break-word; hyphens: auto; }
  .map-legend { font-size: .8125rem; }
}

@media (max-width: 380px) {
  .brand-llc { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .route-out,
  .js .route-minor { stroke-dasharray: none; stroke-dashoffset: 0; }
  * { transition: none !important; }
}
