/* ------------------------------------------------------------------
   Balance Medical — Single-page landing site
   Palette derived from the Balance Medical+ logo:
     Navy:  #1b2a8c
     Red:   #e21e28
   ------------------------------------------------------------------ */

:root {
  --navy: #1b2a8c;
  --navy-900: #141f6b;
  --navy-700: #2636a6;
  --navy-50: #eef1fb;
  --red: #e21e28;
  --red-700: #b8141d;
  --ink: #0f1430;
  --ink-2: #3a3f5c;
  --muted: #6b7088;
  --paper: #ffffff;
  --paper-2: #f6f7fb;
  --paper-3: #eef0f7;
  --line: #e3e6f0;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(20, 31, 107, 0.06);
  --shadow-md: 0 10px 30px rgba(20, 31, 107, 0.10);
  --shadow-lg: 0 20px 60px rgba(20, 31, 107, 0.14);
  --font-sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-display: "Manrope", "Inter", sans-serif;
  --transition: 240ms cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a { color: var(--navy); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--red); }

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

h1 { font-size: clamp(2.2rem, 4.8vw, 3.75rem); font-weight: 800; }
h2 { font-size: clamp(1.75rem, 3.4vw, 2.6rem); font-weight: 800; }
h3 { font-size: clamp(1.25rem, 1.8vw, 1.55rem); font-weight: 700; }

p { margin: 0 0 1rem; color: var(--ink-2); }

.container {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
  margin-bottom: 14px;
}
.eyebrow.red { color: var(--red); }

/* --------------------------- BUTTONS --------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--transition), background var(--transition), color var(--transition), border-color var(--transition), box-shadow var(--transition);
  white-space: nowrap;
}
.btn-primary {
  background: var(--navy);
  color: #fff;
  box-shadow: 0 6px 16px rgba(27, 42, 140, 0.25);
}
.btn-primary:hover {
  background: var(--red);
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(226, 30, 40, 0.30);
}
.btn-ghost {
  background: transparent;
  color: var(--navy);
  border-color: var(--navy);
}
.btn-ghost:hover {
  background: var(--navy);
  color: #fff;
}
.btn-block { width: 100%; }

/* --------------------------- HEADER --------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 14px 24px;
}
.brand { display: inline-flex; align-items: center; }
.brand-logo { height: 44px; width: auto; }

.primary-nav { margin-left: auto; }
.primary-nav ul {
  display: flex;
  gap: 28px;
  list-style: none;
  margin: 0;
  padding: 0;
}
.primary-nav a {
  color: var(--ink);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 2px;
  position: relative;
}
.primary-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  height: 2px;
  width: 0;
  background: var(--red);
  transition: width var(--transition);
}
.primary-nav a:hover { color: var(--navy); }
.primary-nav a:hover::after { width: 100%; }

.nav-cta { padding: 10px 18px; font-size: 0.9rem; }

.nav-toggle {
  display: none;
  background: transparent;
  border: 0;
  width: 40px;
  height: 40px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
  align-items: center;
  justify-content: center;
}
.nav-toggle span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--navy);
  transition: transform var(--transition), opacity var(--transition);
}

/* --------------------------- HERO --------------------------- */
.hero {
  position: relative;
  padding: 80px 0 90px;
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(226, 30, 40, 0.08), transparent 60%),
    radial-gradient(900px 500px at -10% 20%, rgba(27, 42, 140, 0.10), transparent 55%),
    linear-gradient(180deg, #fbfbff 0%, #ffffff 100%);
  overflow: hidden;
}
.hero-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}
.hero-copy h1 {
  background: linear-gradient(90deg, var(--navy) 0%, var(--navy-700) 60%, var(--red) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.lede {
  font-size: 1.12rem;
  color: var(--ink-2);
  max-width: 54ch;
}
.hero-cta {
  display: flex;
  gap: 14px;
  margin: 26px 0 40px;
  flex-wrap: wrap;
}
.hero-stats {
  display: flex;
  gap: 40px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.hero-stats li { display: flex; flex-direction: column; }
.hero-stats strong {
  font-family: var(--font-display);
  font-size: 1.75rem;
  color: var(--navy);
  font-weight: 800;
}
.hero-stats span {
  font-size: 0.82rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.12em;
}

.hero-visual {
  position: relative;
  min-height: 360px;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(0.5px);
}
.orb-navy {
  width: 300px; height: 300px;
  background: radial-gradient(circle at 30% 30%, var(--navy-700), var(--navy));
  top: 0; right: 20px;
  opacity: 0.95;
  box-shadow: 0 30px 80px rgba(27, 42, 140, 0.35);
}
.orb-red {
  width: 90px; height: 90px;
  background: radial-gradient(circle at 30% 30%, #ff525c, var(--red));
  bottom: 40px; left: 40px;
  box-shadow: 0 20px 50px rgba(226, 30, 40, 0.35);
  animation: floaty 6s ease-in-out infinite;
}
@keyframes floaty {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

.hero-card {
  position: absolute;
  left: 10%;
  bottom: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 26px;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 240px;
}
.hero-card-row {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  color: var(--ink);
}
.dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-red { background: var(--red); box-shadow: 0 0 0 4px rgba(226, 30, 40, 0.12); }
.dot-navy { background: var(--navy); box-shadow: 0 0 0 4px rgba(27, 42, 140, 0.12); }

/* --------------------------- SECTION COMMON --------------------------- */
.section {
  padding: 100px 0;
}
.section.device-section.alt {
  background: var(--paper-2);
}
.section-head {
  max-width: 780px;
  margin-bottom: 54px;
}
.section-head.center {
  margin: 0 auto 54px;
  text-align: center;
}
.section-lede {
  font-size: 1.08rem;
  color: var(--ink-2);
}

/* --------------------------- ABOUT --------------------------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.pill-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}
.pill {
  background: var(--navy-50);
  color: var(--navy);
  border: 1px solid #dce1f4;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
}

/* --------------------------- DEVICE SECTIONS --------------------------- */
.device-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 70px;
  align-items: center;
}
.device-grid.reverse {
  grid-template-columns: 1.1fr 1fr;
}
.device-grid.reverse .device-visual { order: 2; }
.device-copy h3 { margin-bottom: 14px; }

.feature-list {
  list-style: none;
  padding: 0;
  margin: 0 0 28px;
  display: grid;
  gap: 18px;
}
.feature-list li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 4px 14px;
  padding-left: 18px;
  position: relative;
}
.feature-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 10px;
  width: 8px;
  height: 8px;
  background: var(--red);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(226, 30, 40, 0.12);
}
.feature-list strong {
  grid-column: 1 / -1;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.02rem;
}
.feature-list span {
  grid-column: 1 / -1;
  color: var(--ink-2);
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 10px 0 28px;
}
.spec {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  box-shadow: var(--shadow-sm);
}
.device-section.alt .spec { background: #fff; }
.spec-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  font-weight: 700;
}
.spec-value {
  color: var(--ink);
  font-weight: 700;
}

/* Device cards (visuals) */
.device-card {
  position: relative;
  border-radius: 28px;
  padding: 38px 32px;
  min-height: 420px;
  color: #fff;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.device-card-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}
.device-card-sub {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.85;
  margin-top: 4px;
}

.device-card-hero {
  background:
    radial-gradient(400px 200px at 80% 0%, rgba(226,30,40,0.45), transparent 60%),
    linear-gradient(160deg, var(--navy-700) 0%, var(--navy) 50%, var(--navy-900) 100%);
}
.device-card-badge {
  align-self: flex-start;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 20px;
}

.wand-cluster {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 28px;
}
.wand {
  background: rgba(255,255,255,0.09);
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 14px;
  padding: 14px 10px;
  text-align: center;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}
.wand::before {
  content: "";
  display: block;
  width: 10px;
  height: 60px;
  margin: 0 auto 10px;
  border-radius: 6px 6px 18px 18px;
  background: linear-gradient(180deg, #fff, rgba(255,255,255,0.25));
  box-shadow: 0 4px 14px rgba(255,255,255,0.25);
}
.wand-large::before { height: 70px; width: 14px; }
.wand-body::before { height: 80px; width: 18px; }

.device-card-wave {
  background:
    radial-gradient(500px 260px at 20% 100%, rgba(27,42,140,0.35), transparent 60%),
    linear-gradient(160deg, #2a3caf 0%, var(--navy) 55%, #0d1552 100%);
  align-items: flex-start;
}
.wave-rings {
  position: relative;
  width: 220px;
  height: 220px;
  margin: 30px auto 20px;
}
.wave-rings span {
  position: absolute;
  inset: 50% 50% 50% 50%;
  border: 2px solid rgba(255,255,255,0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  animation: ring 2.6s ease-out infinite;
  opacity: 0;
}
.wave-rings span:nth-child(1) { animation-delay: 0s; }
.wave-rings span:nth-child(2) { animation-delay: 0.6s; }
.wave-rings span:nth-child(3) { animation-delay: 1.2s; }
.wave-rings span:nth-child(4) { animation-delay: 1.8s; }
@keyframes ring {
  0% {
    width: 24px; height: 24px;
    opacity: 0.9;
    border-color: rgba(226, 30, 40, 0.85);
  }
  100% {
    width: 220px; height: 220px;
    opacity: 0;
    border-color: rgba(255,255,255,0.2);
  }
}
.device-card-wave .device-card-title,
.device-card-wave .device-card-sub {
  text-align: left;
  width: 100%;
}

.device-card-cryo {
  background:
    radial-gradient(500px 260px at 100% 0%, rgba(116, 195, 255, 0.35), transparent 60%),
    linear-gradient(160deg, #3a9bdd 0%, #1b64b5 50%, #0c3b7a 100%);
}
.frost-layer {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 90%, rgba(255,255,255,0.35), transparent 40%),
    radial-gradient(circle at 85% 20%, rgba(255,255,255,0.25), transparent 40%),
    repeating-linear-gradient(115deg, rgba(255,255,255,0.05) 0 2px, transparent 2px 10px);
  pointer-events: none;
}
.temp-readout {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 24px;
  padding: 18px 26px;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 14px;
  width: fit-content;
  font-family: var(--font-display);
}
.temp-readout span:first-child {
  font-size: 3rem;
  font-weight: 800;
  line-height: 1;
}
.temp-readout .unit {
  font-size: 1.4rem;
  font-weight: 600;
  opacity: 0.8;
}

/* --------------------------- WHY --------------------------- */
.why { background: var(--paper-2); }
.why-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
}
.why-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}
.why-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.why-num {
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--red);
  font-size: 1.4rem;
  margin-bottom: 10px;
}
.why-card h3 { margin-bottom: 8px; font-size: 1.15rem; }
.why-card p { margin: 0; font-size: 0.96rem; }

/* --------------------------- CONTACT --------------------------- */
.contact {
  background:
    radial-gradient(900px 400px at 90% 0%, rgba(226,30,40,0.08), transparent 60%),
    linear-gradient(180deg, #fff 0%, #f4f6fd 100%);
}
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}
.contact-info {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  gap: 18px;
}
.contact-info li {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 16px;
  color: var(--ink-2);
}
.ci-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--navy);
  font-weight: 700;
}

.contact-form {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 30px;
  box-shadow: var(--shadow-md);
  display: grid;
  gap: 16px;
}
.contact-form label {
  display: grid;
  gap: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.contact-form input,
.contact-form select,
.contact-form textarea {
  font: inherit;
  font-size: 0.95rem;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 500;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
  border-color: var(--navy);
  box-shadow: 0 0 0 4px rgba(27, 42, 140, 0.12);
}
.form-success {
  text-align: center;
  color: var(--navy);
  font-weight: 600;
  margin: 4px 0 0;
}

/* --------------------------- FOOTER --------------------------- */
.site-footer {
  background: var(--navy-900);
  color: #cfd4ec;
  padding: 50px 0 30px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  align-items: center;
}
.footer-brand img {
  height: 42px;
  background: #fff;
  padding: 8px 14px;
  border-radius: 10px;
  margin-bottom: 12px;
}
.footer-brand p { color: #bfc5e0; margin: 0; font-size: 0.92rem; }
.site-footer nav ul {
  display: flex;
  gap: 20px;
  list-style: none;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
  justify-content: center;
}
.site-footer nav a { color: #cfd4ec; font-size: 0.92rem; }
.site-footer nav a:hover { color: #fff; }
.footer-legal {
  text-align: right;
  font-size: 0.85rem;
  color: #a9b0d1;
}

/* --------------------------- REVEAL ANIMATION --------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 700ms ease, transform 700ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --------------------------- RESPONSIVE --------------------------- */
@media (max-width: 960px) {
  .hero-inner,
  .about-grid,
  .device-grid,
  .device-grid.reverse,
  .contact-wrap,
  .footer-inner {
    grid-template-columns: 1fr;
    gap: 40px;
  }
  .device-grid.reverse .device-visual { order: 0; }
  .footer-inner { text-align: center; }
  .footer-legal { text-align: center; }
  .site-footer nav ul { justify-content: center; }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .section { padding: 70px 0; }
  .hero { padding: 50px 0 60px; }

  .primary-nav,
  .nav-cta { display: none; }
  .nav-toggle { display: inline-flex; margin-left: auto; }

  .site-header.nav-open .primary-nav {
    display: block;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 14px 24px 22px;
    box-shadow: var(--shadow-md);
  }
  .site-header.nav-open .primary-nav ul {
    flex-direction: column;
    gap: 14px;
  }
  .site-header.nav-open .nav-cta {
    display: inline-flex;
    margin: 6px 24px 18px;
  }
  .site-header.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .site-header.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

@media (max-width: 560px) {
  .form-row,
  .spec-grid,
  .why-grid {
    grid-template-columns: 1fr;
  }
  .hero-stats { gap: 24px; }
  .device-card { min-height: 360px; padding: 30px 24px; }
  .brand-logo { height: 38px; }
  .contact-info li { grid-template-columns: 1fr; gap: 2px; }
}
