/* ==========================================================================
   Components: header, nav, buttons, cards, products, forms, modal, footer
   ========================================================================== */

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--c-primary);
  --btn-fg: #fff;
  --btn-border: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-height: 48px;
  padding: .8rem 1.5rem;
  border: 1.5px solid var(--btn-border);
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--ff-display);
  font-size: var(--fs-sm);
  font-weight: 600;
  letter-spacing: .005em;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color var(--t-med), color var(--t-med), border-color var(--t-med),
              transform var(--t-med) var(--ease-out), box-shadow var(--t-med);
}
.btn:hover { color: var(--btn-fg); transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn .icon { width: 1.1em; height: 1.1em; transition: transform var(--t-med) var(--ease-out); }
.btn:hover .icon { transform: translateX(3px); }

.btn--primary { box-shadow: 0 10px 24px -10px rgba(7, 99, 201, .55); }
.btn--primary:hover { --btn-bg: var(--c-primary-hover); box-shadow: 0 14px 28px -10px rgba(7, 99, 201, .6); }

.btn--ghost { --btn-bg: transparent; --btn-fg: var(--c-ink); --btn-border: var(--c-line); }
.btn--ghost:hover { --btn-border: var(--c-primary); --btn-fg: var(--c-primary); }

.btn--light { --btn-bg: #fff; --btn-fg: var(--c-navy-800); }
.btn--light:hover { --btn-bg: var(--c-aqua-100); }

.btn--outline-light { --btn-bg: transparent; --btn-fg: #fff; --btn-border: rgba(255, 255, 255, .45); }
.btn--outline-light:hover { --btn-border: #fff; --btn-bg: rgba(255, 255, 255, .08); }

.btn--sm { min-height: 42px; padding: .6rem 1.15rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

.btn-row { display: flex; flex-wrap: wrap; gap: var(--sp-3); }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-family: var(--ff-display);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
}
.link-arrow .icon { transition: transform var(--t-med) var(--ease-out); }
.link-arrow:hover .icon { transform: translateX(4px); }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(255, 255, 255, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: height var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med), background-color var(--t-med);
}
.site-header.is-compact {
  height: var(--header-h-compact);
  background: rgba(255, 255, 255, .94);
  border-bottom-color: var(--c-line-soft);
  box-shadow: 0 8px 24px -16px rgba(11, 31, 58, .25);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-5);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: .6rem;
  text-decoration: none;
  flex-shrink: 0;
  position: relative;
  z-index: 102; /* stays visible above the open mobile drawer */
}
.brand__logo {
  width: auto;
  height: 46px;
  transition: height var(--t-med) var(--ease-out);
}
.is-compact .brand__logo { height: 38px; }
.brand__text {
  padding-left: .6rem;
  border-left: 1px solid var(--c-line);
  font-family: var(--ff-display);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--c-muted);
}

/* Mobile-first nav: off-canvas drawer */
.nav-toggle {
  position: relative;
  z-index: 102;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: #fff;
}
.nav-toggle__bars,
.nav-toggle__bars::before,
.nav-toggle__bars::after {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 2px;
  background: var(--c-ink);
  transition: transform var(--t-med) var(--ease-out), background-color var(--t-fast);
}
.nav-toggle__bars { position: relative; }
.nav-toggle__bars::before,
.nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.site-nav {
  position: fixed;
  inset: 0;
  z-index: 101;
  display: flex;
  flex-direction: column;
  gap: var(--sp-6);
  padding: calc(var(--header-h) + 1rem) var(--gutter) var(--sp-6);
  background: #fff;
  overflow-y: auto;
  visibility: hidden;
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out), visibility 0s linear var(--t-med);
}
.site-nav.is-open {
  visibility: visible;
  opacity: 1;
  transform: none;
  transition: opacity var(--t-med) var(--ease-out), transform var(--t-med) var(--ease-out);
}
.site-nav__list { display: grid; gap: .25rem; }
.site-nav__link {
  display: block;
  padding: .9rem .25rem;
  border-bottom: 1px solid var(--c-line-soft);
  font-family: var(--ff-display);
  font-size: var(--fs-lg);
  font-weight: 600;
  color: var(--c-ink);
  text-decoration: none;
}
.site-nav__link[aria-current="page"] { color: var(--c-primary); }
.site-nav__cta { align-self: flex-start; }

@media (min-width: 960px) {
  .nav-toggle { display: none; }
  .site-nav {
    position: static;
    flex-direction: row;
    align-items: center;
    gap: var(--sp-5);
    padding: 0;
    background: none;
    overflow: visible;
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: none;
  }
  .site-nav__list { display: flex; gap: .25rem; }
  .site-nav__link {
    position: relative;
    padding: .55rem .9rem;
    border: 0;
    border-radius: var(--r-pill);
    font-size: var(--fs-sm);
    font-weight: 500;
    color: var(--c-text);
    transition: color var(--t-fast), background-color var(--t-fast);
  }
  .site-nav__link:hover { color: var(--c-ink); background: var(--c-surface-3); }
  .site-nav__link[aria-current="page"] {
    color: var(--c-primary);
    font-weight: 600;
    background: var(--c-azure-50);
  }
}

/* ---------- Cards ---------- */
.card {
  position: relative;
  padding: clamp(1.4rem, 1.1rem + 1vw, 2rem);
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-lg);
  background: var(--c-surface);
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--c-line); }
.card h3 { margin-bottom: var(--sp-2); }
.card p { color: var(--c-muted); font-size: var(--fs-sm); }

.icon-badge {
  display: inline-grid;
  place-items: center;
  width: 52px;
  height: 52px;
  margin-bottom: var(--sp-4);
  border-radius: 14px;
  background: var(--c-azure-50);
  color: var(--c-primary);
}
.icon-badge .icon { width: 26px; height: 26px; }
.icon-badge--aqua { background: var(--c-aqua-100); color: #0b7c85; }
.icon-badge--crimson { background: var(--c-crimson-50); color: var(--c-crimson-500); }
.icon-badge--light { background: rgba(255, 255, 255, .12); color: var(--c-aqua-400); }

.glass {
  background: var(--glass-bg);
  border: 1px solid var(--glass-border);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  backdrop-filter: blur(16px) saturate(150%);
  box-shadow: var(--shadow-md);
}

/* ---------- Tags / pills ---------- */
.tag {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .25rem .65rem;
  border-radius: var(--r-pill);
  background: var(--c-surface-3);
  color: var(--c-text);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.4;
}
.tag .icon { width: 14px; height: 14px; }
.tag--inj { background: var(--c-azure-50); color: var(--c-azure-700); }
.tag--oral { background: var(--c-green-50); color: var(--c-green-600); }

/* ---------- Product card ---------- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  gap: clamp(1rem, .7rem + 1vw, 1.75rem);
}

.product-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--c-line-soft);
  border-radius: var(--r-lg);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform var(--t-med) var(--ease-out), box-shadow var(--t-med), border-color var(--t-med);
}
.product-card:hover,
.product-card:focus-within { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--c-line); }

.product-card__media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #fff;
}
.product-card__media picture { display: block; width: 100%; height: 100%; } /* lets the img fill the frame */
.product-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 50%;
  transform: scale(1.04);
  transition: transform var(--t-slow) var(--ease-out);
}
.product-card:hover .product-card__media img { transform: scale(1.1); }
.product-card__media .tag { position: absolute; top: 14px; left: 14px; }

.product-card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: var(--sp-3);
  padding: 1.25rem 1.35rem 1.4rem;
  border-top: 1px solid var(--c-line-soft);
}
.product-card__cat {
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--c-muted);
}
.product-card__title { margin: 0; font-size: var(--fs-md); }
.product-card__desc { margin: 0; font-size: var(--fs-sm); color: var(--c-muted); }
.product-card__specs {
  display: grid;
  grid-template-columns: repeat(3, auto);
  justify-content: space-between;
  gap: .5rem;
  margin: auto 0 0;
  padding-top: var(--sp-3);
  border-top: 1px dashed var(--c-line);
  font-size: var(--fs-xs);
}
.product-card__specs dt { color: var(--c-muted); }
.product-card__specs dd { margin: 0; font-weight: 600; color: var(--c-ink); }
.product-card__btn {
  align-self: flex-start;
  margin-top: var(--sp-2);
  padding: 0;
  border: 0;
  background: none;
  color: var(--c-primary);
}
/* Whole card is clickable via the button's stretched pseudo-element */
.product-card { position: relative; }
.product-card__btn::after { content: ""; position: absolute; inset: 0; border-radius: var(--r-lg); }
.product-card__btn:focus-visible { outline: none; }
.product-card__btn:focus-visible::after { outline: 3px solid var(--c-focus); outline-offset: 2px; }

/* ---------- Notices ---------- */
.notice {
  display: flex;
  gap: var(--sp-3);
  align-items: flex-start;
  padding: 1rem 1.25rem;
  border: 1px solid #f3c8ce;
  border-left: 4px solid var(--c-crimson-500);
  border-radius: var(--r-md);
  background: #fff8f9;
  font-size: var(--fs-sm);
  color: var(--c-text);
}
.notice .icon { margin-top: .15rem; color: var(--c-crimson-500); }
.notice--info { border-color: #cfe2fb; border-left-color: var(--c-primary); background: #f5f9ff; }
.notice--info .icon { color: var(--c-primary); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(3.5rem, 2.5rem + 5vw, 6.5rem) clamp(3rem, 2rem + 4vw, 5.5rem);
  background: var(--g-navy);
  color: #c9d7e8;
  isolation: isolate;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(40% 70% at 90% 0%, rgba(20, 184, 196, .35), transparent 70%),
    radial-gradient(35% 60% at 0% 100%, rgba(10, 132, 255, .28), transparent 70%);
}
.page-hero::after {
  /* faint pentagon motif echoing the logo */
  content: "";
  position: absolute;
  right: -70px;
  bottom: -110px;
  z-index: -1;
  width: 400px;
  height: 400px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 100'%3E%3Cpath d='M50 6 94 38 77 92H23L6 38Z' fill='none' stroke='%23d7263d' stroke-opacity='.22' stroke-width='6' stroke-linejoin='round'/%3E%3Cpath d='M50 22 79 43 68 79H32L21 43Z' fill='none' stroke='%232fd0d9' stroke-opacity='.18' stroke-width='3' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat center / contain;
}
@media (max-width: 719px) {
  .page-hero::after { width: 240px; height: 240px; right: -90px; bottom: -80px; opacity: .6; }
}
.page-hero h1 { max-width: 15ch; color: #fff; font-size: var(--fs-2xl); }
.page-hero p { max-width: 60ch; font-size: var(--fs-md); }

.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: var(--sp-5); font-size: var(--fs-sm); }
.breadcrumb li + li::before { content: "/"; margin-right: .4rem; color: rgba(255, 255, 255, .35); }
.breadcrumb a { color: #fff; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; color: #fff; }
.breadcrumb [aria-current] { color: #a9bdd6; }

/* ---------- CTA band ---------- */
.cta-band {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: var(--sp-5);
  align-items: center;
  padding: clamp(2rem, 1.2rem + 4vw, 4rem);
  border-radius: var(--r-xl);
  background: var(--g-navy);
  color: #c9d7e8;
  isolation: isolate;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: radial-gradient(50% 90% at 100% 0%, rgba(20, 184, 196, .38), transparent 70%),
              radial-gradient(40% 70% at 0% 100%, rgba(10, 132, 255, .3), transparent 70%);
}
.cta-band h2 { color: #fff; font-size: var(--fs-xl); margin-bottom: var(--sp-3); }
.cta-band p { max-width: 56ch; }
@media (min-width: 900px) {
  .cta-band { grid-template-columns: 1fr auto; }
}

/* ---------- Forms ---------- */
.form { display: grid; gap: var(--sp-5); }
.form__row { display: grid; gap: var(--sp-5); align-items: start; }
@media (min-width: 640px) {
  .form__row--2 { grid-template-columns: 1fr 1fr; }
}
.field { display: grid; gap: .45rem; }
.field label,
.field__label {
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--c-ink);
}
.field__req { color: var(--c-crimson-500); }
.field__opt { font-weight: 400; color: var(--c-muted); }
.field__hint { font-size: var(--fs-xs); color: var(--c-muted); }

.input {
  width: 100%;
  min-height: 50px;
  padding: .75rem 1rem;
  border: 1.5px solid var(--c-line);
  border-radius: var(--r-sm);
  background: #fff;
  color: var(--c-ink);
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.input::placeholder { color: #687c92; }
.input:hover { border-color: #c3d1df; }
.input:focus { outline: none; border-color: var(--c-primary); box-shadow: 0 0 0 4px rgba(10, 132, 255, .18); }
textarea.input { min-height: 160px; resize: vertical; }
select.input {
  appearance: none;
  padding-right: 2.6rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2333465c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right .9rem center;
  background-size: 18px;
}

.input[aria-invalid="true"] { border-color: var(--c-error); background: #fffafa; }
.input[aria-invalid="true"]:focus { box-shadow: 0 0 0 4px rgba(179, 25, 46, .15); }
.field__error {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--c-error);
}
.field__error .icon { width: 15px; height: 15px; }

.checkbox { display: flex; gap: .75rem; align-items: flex-start; font-size: var(--fs-sm); }
.checkbox input {
  width: 20px;
  height: 20px;
  margin: .15rem 0 0;
  flex-shrink: 0;
  accent-color: var(--c-primary);
}

/* Honeypot: off-screen for humans, still in the DOM for bots */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.form-status {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  padding: 1rem 1.2rem;
  border-radius: var(--r-md);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.form-status:empty { display: none; }
.form-status .icon { margin-top: .1rem; }
.form-status--success { background: var(--c-green-50); color: #0b5e41; border: 1px solid #b8e4cf; }
.form-status--error { background: #fdf0f2; color: #8f1425; border: 1px solid #f3c2ca; }

/* ---------- Modal (native <dialog>) ---------- */
.modal {
  width: min(960px, calc(100% - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--r-xl);
  background: #fff;
  color: var(--c-text);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.modal::backdrop {
  background: rgba(7, 21, 40, .6);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
}
.modal[open] { animation: modal-in var(--t-med) var(--ease-out); }
@keyframes modal-in {
  from { opacity: 0; transform: translateY(16px) scale(.98); }
  to { opacity: 1; transform: none; }
}
.modal__inner {
  display: grid;
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}
@media (min-width: 820px) {
  .modal__inner { grid-template-columns: 1fr 1.05fr; }
}
.modal__media {
  display: grid;
  place-items: center;
  padding: var(--sp-5);
  background: linear-gradient(160deg, #f5f9ff, #eef7f8);
}
.modal__media img { width: 100%; max-width: 440px; border-radius: var(--r-md); mix-blend-mode: multiply; }
.modal__content { padding: clamp(1.5rem, 1rem + 2vw, 2.5rem); }
.modal__content h2 { font-size: var(--fs-xl); margin: var(--sp-3) 0; padding-right: 2.5rem; }
.modal__close {
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--c-line);
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--c-ink);
  transition: background-color var(--t-fast), transform var(--t-med) var(--ease-out);
}
.modal__close:hover { background: var(--c-surface-3); transform: rotate(90deg); }

.spec-table { width: 100%; margin: var(--sp-5) 0; border-collapse: collapse; font-size: var(--fs-sm); }
.spec-table th,
.spec-table td { padding: .7rem 0; border-bottom: 1px solid var(--c-line-soft); text-align: left; vertical-align: top; }
.spec-table th { width: 40%; padding-right: 1rem; font-weight: 500; color: var(--c-muted); }
.spec-table td { font-weight: 600; color: var(--c-ink); }
.composition-list { display: grid; gap: .3rem; }
.composition-list li { display: flex; justify-content: space-between; gap: 1rem; }
.composition-list span:last-child { color: var(--c-primary); white-space: nowrap; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: auto;
  padding-top: clamp(3.5rem, 2.5rem + 4vw, 5.5rem);
  background: var(--c-navy-900);
  color: #a9bbd0;
  font-size: var(--fs-sm);
}
.site-footer a { color: #dbe6f3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.site-footer__grid {
  display: grid;
  gap: var(--sp-6);
  padding-bottom: var(--sp-7);
}
@media (min-width: 640px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .site-footer__grid { grid-template-columns: 1.5fr 1fr 1.1fr 1.4fr; }
}
.site-footer__brand p { max-width: 36ch; margin-top: var(--sp-4); }
.brand--footer {
  padding: .6rem .9rem;
  border-radius: var(--r-md);
  background: #fff;
}
.brand--footer .brand__logo { height: 44px; }
.site-footer__title {
  margin-bottom: var(--sp-4);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #fff;
}
.site-footer__col ul { display: grid; gap: .6rem; list-style: none; }
.site-footer__contact li { display: flex; gap: .65rem; align-items: flex-start; overflow-wrap: anywhere; }
.site-footer__contact .icon { margin-top: .15rem; color: var(--c-aqua-400); }
.site-footer__disclaimer {
  padding: var(--sp-5) 0;
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: var(--fs-xs);
  line-height: 1.7;
  color: #93a7bf;
}
.site-footer__disclaimer strong { color: #dbe6f3; }
.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-5) 0 var(--sp-6);
  border-top: 1px solid rgba(255, 255, 255, .1);
  font-size: var(--fs-xs);
}
.site-footer__bottom p { margin: 0; }

/* backdrop-filter creates a containing block for fixed children, which would
   trap the mobile drawer inside the header - disable it while the menu is open. */
.nav-open .site-header {
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
  background: #fff;
}
