/* BioSys Laboratories – site styles
   Colors and sizes are defined once here as "tokens" and reused below. */

:root {
  --blue: #0170bc;          /* brand blue, from the original site */
  --blue-dark: #0a4f86;
  --blue-light: #e8f2fa;
  --navy: #0b2239;
  --red: #d7262a;           /* the red in the logo; used sparingly */
  --text: #1c2733;
  --text-muted: #4f5d6b;
  --border: #d8e1ea;
  --bg: #ffffff;
  --bg-alt: #f4f8fb;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(11, 34, 57, .06), 0 6px 20px rgba(11, 34, 57, .08);
  --container: 1180px;
}

/* ---------- Base ---------- */

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  /* Keep the footer at the bottom of the window on short pages */
  overflow-wrap: break-word;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; }

img { max-width: 100%; height: auto; display: block; }

a { color: var(--blue); text-underline-offset: 2px; }
a:hover { color: var(--blue-dark); }

:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .6em; color: var(--navy); letter-spacing: -.01em; overflow-wrap: break-word; }
h1 { font-size: clamp(2rem, 4.5vw, 3rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3, .h3 { font-size: 1.2rem; }
p, ul, ol { margin: 0 0 1em; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }

.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 6px;
}
.skip-link:focus { top: 12px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

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

.button {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  border: 2px solid var(--blue);
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  line-height: 1.2;
}
.button:hover { background: var(--blue-dark); border-color: var(--blue-dark); color: #fff; }
.button-light { background: #fff; border-color: #fff; color: var(--blue-dark); }
.button-light:hover { background: var(--blue-light); border-color: var(--blue-light); color: var(--blue-dark); }
.button-outline-light { background: transparent; border-color: #fff; color: #fff; }
.button-outline-light:hover { background: rgba(255, 255, 255, .15); border-color: #fff; }

.text-link { font-weight: 600; text-decoration: none; }
.text-link::after { content: " →"; }
.text-link:hover { text-decoration: underline; }

/* ---------- Promo bar + header ---------- */

.promo-bar { background: var(--blue); text-align: center; font-size: .95rem; }
.promo-bar a { display: block; padding: 8px 20px; color: #fff; text-decoration: none; }
.promo-bar a:hover { text-decoration: underline; }

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 76px; flex-wrap: wrap; }
.logo { margin-right: auto; }
.logo img { width: 150px; }

.header-phone {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 16px; border-radius: 999px;
  background: var(--blue); color: #fff; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.header-phone:hover { background: var(--blue-dark); color: #fff; }

.menu-toggle {
  display: none; align-items: center; gap: 8px;
  padding: 9px 14px; border: 1px solid var(--border); border-radius: 8px;
  background: #fff; color: var(--navy); font: inherit; font-weight: 600; cursor: pointer;
}
.menu-toggle-bars, .menu-toggle-bars::before, .menu-toggle-bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; border-radius: 2px; position: relative;
}
.menu-toggle-bars::before, .menu-toggle-bars::after { content: ""; position: absolute; left: 0; }
.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after { top: 6px; }

.nav-list, .submenu { list-style: none; margin: 0; padding: 0; }

.nav-list > li > a, .submenu-toggle {
  display: block; padding: 10px 12px;
  color: var(--navy); font: inherit; font-size: .98rem; font-weight: 600; text-decoration: none;
  background: none; border: 0; cursor: pointer; border-radius: 6px;
}
.nav-list > li > a:hover, .submenu-toggle:hover { color: var(--blue); background: var(--blue-light); }
.nav-list a[aria-current="page"] { color: var(--blue); }

.submenu-toggle::after {
  content: ""; display: inline-block; margin-left: 6px; vertical-align: 3px;
  border: 5px solid transparent; border-top-color: currentColor; border-bottom-width: 0;
}
.submenu-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }

.submenu a {
  display: block; padding: 9px 14px; color: var(--text); text-decoration: none; border-radius: 6px; line-height: 1.35;
}
.submenu a:hover, .submenu a[aria-current="page"] { background: var(--blue-light); color: var(--blue-dark); }

/* Without JavaScript the dropdowns simply stay open as a list. */
.js .submenu-toggle[aria-expanded="false"] + .submenu { display: none; }

/* Desktop menu */
@media (min-width: 1100px) {
  .site-nav { order: 0; }
  .nav-list { display: flex; align-items: center; gap: 2px; }
  .has-submenu { position: relative; }
  .submenu {
    position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
    min-width: 320px; padding: 8px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow);
  }
  html:not(.js) .submenu { display: none; }
  html:not(.js) .has-submenu:hover .submenu,
  html:not(.js) .has-submenu:focus-within .submenu { display: block; }
}

/* Mobile/tablet menu */
@media (max-width: 1099.98px) {
  .js .menu-toggle { display: inline-flex; order: 2; }
  .header-phone { order: 1; padding: 8px 12px; font-size: .95rem; }
  .site-nav { order: 3; flex-basis: 100%; padding-bottom: 12px; max-height: calc(100vh - 90px); overflow-y: auto; }
  .js .site-nav:not(.is-open) { display: none; }
  .nav-list > li { border-top: 1px solid var(--border); }
  .nav-list > li > a, .submenu-toggle { width: 100%; text-align: left; padding: 14px 4px; border-radius: 0; }
  .submenu { padding: 0 0 10px 12px; }
}
@media (max-width: 520px) {
  .header-phone .phone-label { display: none; }
  .header-phone { padding: 10px; }
  .logo img { width: 120px; }
  .header-inner { gap: 10px; }
}

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

.section { padding: clamp(48px, 8vw, 88px) 0; }
.section-alt { background: var(--bg-alt); }
.section-intro { max-width: 760px; margin: 0 auto 40px; text-align: center; }
.section-intro p { color: var(--text-muted); }
.eyebrow {
  display: block; margin-bottom: 10px;
  color: var(--blue); font-size: .85rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
}

/* ---------- Home: hero ---------- */

.hero { position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.hero-image, .hero-image img {
  position: absolute; inset: 0; width: 100%; height: 100%;
}
.hero-image img { object-fit: cover; object-position: right 30%; }
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(11, 34, 57, .88) 0%, rgba(11, 34, 57, .7) 40%, rgba(11, 34, 57, .1) 75%);
}
.hero-content { position: relative; z-index: 1; padding: clamp(64px, 8vw, 104px) 20px; }
.hero-text { max-width: 560px; }
.hero h1 { color: #fff; margin-bottom: .4em; }
.hero p { font-size: 1.2rem; color: #e6eef6; margin-bottom: 1.6em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
/* Small screens: photo as a strip on top, text below on solid navy. */
@media (max-width: 700px) {
  .hero-image, .hero-image img { position: static; height: auto; }
  .hero-image img { aspect-ratio: 2.4 / 1; object-position: right center; }
  .hero::after { display: none; }
  .hero-content { padding: 32px 20px 44px; }
}

/* ---------- Home: intro ---------- */

.intro { max-width: 820px; margin: 0 auto; text-align: center; }
.intro p { font-size: 1.12rem; color: var(--text-muted); }

/* ---------- Feature cards ("Why choose") ---------- */

.feature-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.feature {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 28px 24px;
}
.feature-icon {
  display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 18px;
  border-radius: 12px; background: var(--blue-light); color: var(--blue);
}
.feature-icon svg { width: 28px; height: 28px; }
.feature p { color: var(--text-muted); font-size: 1rem; margin: 0; }

/* ---------- Two-column media + text ---------- */

.split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: center; }
@media (min-width: 820px) {
  .split { grid-template-columns: 1fr 1fr; }
  .split-reverse > :first-child { order: 2; }
}
.split img { border-radius: var(--radius); width: 100%; box-shadow: var(--shadow); }
.split p { color: var(--text-muted); font-size: 1.08rem; }

/* ---------- Product cards ---------- */

.product-grid { display: grid; gap: 24px; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.product-card {
  display: flex; flex-direction: column;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.product-card img { width: 100%; aspect-ratio: 349 / 196; object-fit: cover; background: var(--bg-alt); }
.product-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 26px; }
.product-card ul { padding-left: 1.1em; color: var(--text-muted); font-size: .98rem; }
.product-card li { margin-bottom: .35em; }
.product-card ul ul { margin: .35em 0 0; }
.product-card .text-link { margin-top: auto; }

/* ---------- Contact block ---------- */

.contact-grid { display: grid; gap: 32px; }
@media (min-width: 820px) { .contact-grid { grid-template-columns: 1fr 1.3fr; align-items: start; } }
.contact-details { font-style: normal; }
.contact-details dt { font-weight: 700; color: var(--navy); margin-top: 16px; }
.contact-details dd { margin: 2px 0 0; }

/* Placeholder shown until the Google Form embed code is added. */
.form-placeholder {
  display: grid; place-items: center; min-height: 320px; padding: 32px; text-align: center;
  border: 2px dashed var(--blue); border-radius: var(--radius); background: var(--blue-light); color: var(--blue-dark);
}
.form-placeholder strong { display: block; font-size: 1.1rem; }

/* Contact page map */
.map-embed iframe { display: block; width: 100%; height: 420px; border: 0; border-radius: var(--radius); }

/* Google Form embeds: full width, fixed height set per page. */
.form-embed iframe { display: block; width: 100%; border: 0; }
/* Heights measured from each form (taller on phones, where questions wrap). */
.form-embed--warranty iframe { height: 2020px; }
.form-embed--new-account iframe { height: 2380px; }
@media (max-width: 700px) {
  .form-embed--warranty iframe { height: 2300px; }
  .form-embed--new-account iframe { height: 2640px; }
}

/* ---------- Inner pages ---------- */

.page-banner img { width: 100%; height: clamp(120px, 18vw, 260px); object-fit: cover; }
.page-banner + .section, .page-top { padding-top: clamp(36px, 5vw, 56px); }
.quick-contact { border-top: 1px solid var(--border); }

.page-lead { font-size: 1.15rem; color: var(--text-muted); max-width: 820px; }

/* Readable text column for long-form pages */
.prose { max-width: 820px; }
.prose p, .prose li { color: var(--text); }
.prose h2 { margin-top: 1.6em; }
.prose img { border: 1px solid var(--border); border-radius: 6px; margin: 16px 0 8px; }

/* Product page: photo + key features side by side */
.product-intro { display: grid; gap: clamp(24px, 4vw, 48px); align-items: start; margin-bottom: 48px; }
@media (min-width: 820px) { .product-intro { grid-template-columns: minmax(0, 444px) 1fr; } }
.product-intro img { width: 100%; border-radius: var(--radius); }
.product-intro h1 { margin-bottom: .3em; }
.product-intro .subtitle { font-size: 1.25rem; color: var(--blue); font-weight: 600; margin-bottom: 1.2em; }
.product-intro h2 { font-size: 1.15rem; margin-bottom: .5em; }
.product-intro .feature-columns { gap: 8px 32px; align-items: start; }
.product-intro .feature-columns h3 { color: var(--blue-dark); }

.check-list { list-style: none; padding: 0; }
.check-list > li { position: relative; padding-left: 28px; margin-bottom: .5em; }
.check-list > li::before {
  content: ""; position: absolute; left: 2px; top: .5em; width: 12px; height: 7px;
  border-left: 2.5px solid var(--blue); border-bottom: 2.5px solid var(--blue); transform: rotate(-45deg);
}
.check-list ul { list-style: disc; padding-left: 1.2em; margin: .4em 0 0; color: var(--text-muted); }

.columns-2 { columns: 2 280px; column-gap: 40px; }
.columns-2 > li { break-inside: avoid; }

.block + .block { margin-top: 56px; }
.block.split { align-items: start; }
/* Pages with several products: a divider and extra space between them */
.product-block + .product-block { margin-top: 72px; padding-top: 64px; border-top: 1px solid var(--border); }
.product-intro h2.product-title { font-size: clamp(1.35rem, 2.4vw, 1.7rem); margin-bottom: .6em; }
.block > h2 { font-size: clamp(1.35rem, 2.4vw, 1.7rem); }
.note { font-size: .95rem; color: var(--text-muted); margin-top: 12px; }

/* Data tables: scroll sideways on small screens rather than squashing */
.table-wrap { position: relative; overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius); margin: 8px 0 12px; }
.table-wrap:focus-visible { outline-offset: 0; }
.data-table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: .97rem; }
.data-table.compact { min-width: 0; }  /* two-column tables can wrap instead of scrolling */
.data-table th, .data-table td { padding: 12px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
.data-table thead th { background: var(--blue-light); color: var(--navy); font-weight: 700; white-space: nowrap; }
.data-table tbody tr:last-child > * { border-bottom: 0; }
.data-table tbody tr:nth-child(even) { background: #fafcfe; }
.data-table td:first-child, .data-table th[scope="row"] { font-weight: 700; color: var(--navy); white-space: nowrap; }
.data-table .item-desc strong { display: block; color: var(--navy); }
.data-table ul { margin: .4em 0 0; padding-left: 1.1em; }
.data-table .group-row th { background: var(--bg-alt); color: var(--blue-dark); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; }
.data-table tfoot td { font-weight: 400; color: var(--text-muted); background: var(--bg-alt); white-space: normal; }
.data-table .center { text-align: center; }
.dot { color: var(--blue); font-size: 1.2rem; line-height: 1; }
.strip-matrix th, .strip-matrix td { padding: 10px 8px; }
.strip-matrix thead th.rot { white-space: nowrap; writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; padding: 12px 6px; }

/* FAQ */
.faq-list { max-width: 860px; }
.faq-item { padding: 24px 0; border-bottom: 1px solid var(--border); }
.faq-item:first-child { padding-top: 0; }
.faq-item h2 { font-size: 1.05rem; margin-bottom: .45em; }
.faq-item p { margin: 0; color: var(--text-muted); }

/* Downloads list */
.download-list { list-style: none; padding: 0; max-width: 640px; }
.download-list li + li { margin-top: 12px; }
.download-list a {
  display: flex; align-items: center; gap: 14px; padding: 16px 20px;
  border: 1px solid var(--border); border-radius: var(--radius); text-decoration: none; font-weight: 600;
}
.download-list a:hover { border-color: var(--blue); background: var(--blue-light); }
.download-list small { display: block; font-weight: 400; color: var(--text-muted); }
.download-list svg { flex: none; width: 28px; height: 28px; color: var(--red); }

/* Numbered instructions */
.steps { padding-left: 1.3em; }
.steps > li { margin-bottom: .8em; padding-left: .3em; }
.steps > li::marker { font-weight: 700; color: var(--blue); }
.steps ul { margin-top: .4em; }

/* 404 */
.link-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 760px; padding: 0; list-style: none; }
.link-grid a { display: block; padding: 14px 18px; border: 1px solid var(--border); border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.link-grid a:hover { border-color: var(--blue); background: var(--blue-light); }

/* ---------- Footer ---------- */

.site-footer { background: var(--navy); color: #c9d6e3; font-size: .98rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; color: #fff; }
.footer-grid { display: grid; gap: 32px; padding-top: 56px; padding-bottom: 40px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.2fr 1fr 1fr; } }
.footer-name, .footer-heading { color: #fff; font-weight: 700; margin-bottom: 12px; }
.site-footer address { font-style: normal; margin-bottom: 1em; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 8px; }
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 18px; padding-bottom: 18px; font-size: .9rem; }
.footer-bottom p { margin: 0; }
