/* ==========================================================================
   Medella Biotech — Design Tokens
   Teal theme v3 — modernized: richer depth, smoother motion, refined type
   ========================================================================== */
:root {
  --navy: #17565E;
  --navy-dark: #0E3B42;
  --teal: #2E8C96;
  --teal-light: #4BAFB8;
  --coral: #2E9E77;
  --coral-dark: #227A5B;
  --gold: #C9A85C;
  --green: #5FB86E;
  --bg: #F7FAFA;
  --bg-alt: #EAF3F3;
  --ink: #1B2628;
  --ink-soft: #566669;
  --white: #FFFFFF;
  --border: #DFE9E9;

  --font-display: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-body: 'IBM Plex Sans', -apple-system, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --radius: 14px;
  --radius-sm: 9px;
  --radius-lg: 22px;

  --shadow-xs: 0 1px 2px rgba(14,59,66,0.05);
  --shadow-sm: 0 2px 8px rgba(14,59,66,0.07);
  --shadow-md: 0 12px 32px rgba(14,59,66,0.12);
  --shadow-lg: 0 26px 60px rgba(14,59,66,0.18);
  --shadow-glow: 0 0 0 1px rgba(46,140,150,0.08), 0 8px 24px rgba(46,140,150,0.14);

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(ellipse 900px 500px at 8% -5%, rgba(46,140,150,0.08), transparent 60%),
    radial-gradient(ellipse 700px 500px at 95% 15%, rgba(201,168,92,0.08), transparent 55%),
    radial-gradient(ellipse 800px 600px at 50% 100%, rgba(46,158,119,0.05), transparent 60%),
    var(--bg);
  background-attachment: fixed;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
h1,h2,h3,h4 { font-family: var(--font-display); font-weight: 700; margin: 0 0 16px; color: var(--navy-dark); letter-spacing: -0.015em; }
h1 { letter-spacing: -0.025em; }
p { margin: 0 0 16px; color: var(--ink-soft); }
.mono { font-family: var(--font-mono); }
::selection { background: var(--teal); color: var(--white); }

/* Subtle scroll-reveal — elements fade/rise in as they enter view */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 14px 28px; border-radius: 10px; font-weight: 600; font-size: 15px;
  border: 2px solid transparent; cursor: pointer; transition: all 0.28s var(--ease);
  font-family: var(--font-body); position: relative; overflow: hidden;
}
.btn-primary { background: var(--coral); color: var(--white); box-shadow: 0 4px 14px rgba(46,158,119,0.28); }
.btn-primary:hover { background: var(--coral-dark); transform: translateY(-2px); box-shadow: 0 10px 26px rgba(46,158,119,0.36); }
.btn-primary:active { transform: translateY(0); }
.btn-outline { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.65); color: var(--white); backdrop-filter: blur(4px); }
.btn-outline:hover { background: var(--white); color: var(--navy); border-color: var(--white); transform: translateY(-2px); }
.btn-outline-navy { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline-navy:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn-block { width: 100%; }

/* ==========================================================================
   Topbar + Header
   ========================================================================== */
.topbar { background: var(--navy-dark); color: rgba(255,255,255,0.85); font-size: 13px; }
.topbar-inner { display: flex; justify-content: space-between; align-items: center; padding: 9px 24px; flex-wrap: wrap; gap: 6px; }
.topbar-contact a { color: rgba(255,255,255,0.85); transition: color 0.2s; }
.topbar-contact a:hover { color: var(--gold); }
.topbar .dot { margin: 0 10px; opacity: 0.4; }

.site-header { background: rgba(255,255,255,0.92); backdrop-filter: blur(10px); box-shadow: var(--shadow-xs); position: sticky; top: 0; z-index: 100; transition: box-shadow 0.3s; }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; gap: 24px; }
.brand-logo { height: 48px; width: auto; transition: transform 0.3s var(--ease); }
.brand:hover .brand-logo { transform: scale(1.03); }
.main-nav { display: flex; gap: 30px; margin-left: auto; }
.main-nav a { font-weight: 600; font-size: 15px; color: var(--navy-dark); padding: 6px 2px; border-bottom: 2px solid transparent; transition: border-color 0.25s var(--ease), color 0.25s; }
.main-nav a:hover { color: var(--teal); border-color: var(--teal); }
.nav-cta { margin-left: 12px; white-space: nowrap; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: var(--navy-dark); border-radius: 2px; transition: transform 0.25s, opacity 0.25s; }

/* ==========================================================================
   Hero — brand pills artwork with teal overlay
   ========================================================================== */
.hero {
  position: relative; overflow: hidden;
  color: var(--white); padding: 108px 0 128px;
  background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 55%, var(--teal) 130%);
}
.hero-slideshow { position: absolute; inset: 0; z-index: 0; }
.hero-slide {
  position: absolute; inset: 0; background-position: center; background-size: cover; background-repeat: no-repeat;
  opacity: 0; transition: opacity 1.6s ease-in-out;
}
.hero-slide.active { opacity: 1; }
.hero-slideshow::after {
  content: ''; position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(135deg, rgba(9,38,43,0.92) 0%, rgba(18,72,80,0.85) 48%, rgba(46,140,150,0.78) 100%);
}
.hero-bg-molecule { position: absolute; inset: 0; opacity: 0.10; pointer-events: none; z-index: 2; }
.hero-inner { position: relative; z-index: 3; display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: center; }
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px;
  letter-spacing: 0.09em; text-transform: uppercase; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.14);
  padding: 8px 15px; border-radius: 100px; margin-bottom: 24px; color: var(--gold);
}
.hero h1 { color: var(--white); font-size: clamp(33px, 4.3vw, 54px); line-height: 1.1; margin-bottom: 20px; }
.hero h1 em { font-style: normal; color: var(--gold); }
.hero p.lead { color: rgba(255,255,255,0.85); font-size: 18.5px; max-width: 520px; margin-bottom: 34px; }
.hero-cta-row { display: flex; gap: 16px; flex-wrap: wrap; }
.hero-stats { display: flex; gap: 0; margin-top: 58px; border-top: 1px solid rgba(255,255,255,0.16); padding-top: 30px; }
.hero-stat { flex: 1; padding-right: 24px; }
.hero-stat .num { font-family: var(--font-mono); font-size: 32px; font-weight: 600; color: var(--gold); display: block; }
.hero-stat .label { font-size: 13px; color: rgba(255,255,255,0.7); margin-top: 3px; }

.hero-visual { position: relative; z-index: 2; }
.hero-card {
  background: rgba(255,255,255,0.07); border: 1px solid rgba(255,255,255,0.24);
  border-radius: 18px; padding: 30px; backdrop-filter: blur(14px); box-shadow: var(--shadow-lg);
  transition: transform 0.4s var(--ease);
}
.hero-card:hover { transform: translateY(-4px); }
.hero-card-title { font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--gold); margin-bottom: 18px; }
.hero-card-row { display: flex; justify-content: space-between; padding: 13px 0; border-bottom: 1px solid rgba(255,255,255,0.1); font-size: 14px; }
.hero-card-row:last-child { border-bottom: none; }
.hero-card-row span:first-child { color: rgba(255,255,255,0.65); }
.hero-card-row span:last-child { font-family: var(--font-mono); color: var(--white); font-weight: 600; }

/* ==========================================================================
   Sections general
   ========================================================================== */
section { padding: 96px 0; position: relative; }
.section-alt { background: linear-gradient(180deg, var(--white) 0%, #FCFEFE 100%); position: relative; overflow: hidden; }
.section-alt::before {
  content: ''; position: absolute; top: -180px; right: -120px; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(46,140,150,0.06), transparent 70%); pointer-events: none;
}
.section-alt::after {
  content: ''; position: absolute; bottom: -160px; left: -100px; width: 360px; height: 360px; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,92,0.07), transparent 70%); pointer-events: none;
}
.section-alt > * { position: relative; z-index: 1; }
.eyebrow {
  font-family: var(--font-mono); font-size: 12px; text-transform: uppercase; letter-spacing: 0.09em;
  color: var(--teal); font-weight: 600; margin-bottom: 13px; display: flex; align-items: center; gap: 8px;
}
.eyebrow::before { content: ''; width: 18px; height: 2px; background: var(--coral); border-radius: 2px; display: inline-block; }
.section-head { max-width: 640px; margin-bottom: 52px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.section-head.center .eyebrow { justify-content: center; }
.section-head h2 { font-size: clamp(27px, 3.1vw, 38px); }

/* ==========================================================================
   Value / Mission cards
   ========================================================================== */
.value-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.value-card {
  background: linear-gradient(160deg, var(--white) 0%, #FBFDFD 100%); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 34px 30px; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  position: relative; overflow: hidden;
}
.value-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.value-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform 0.4s var(--ease); }
.value-card:hover::before { transform: scaleX(1); }
.value-card:nth-child(2)::before { background: var(--coral); }
.value-card:nth-child(3)::before { background: var(--gold); }
.value-icon {
  width: 54px; height: 54px; border-radius: 14px; background: var(--bg-alt);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
  transition: transform 0.35s var(--ease), background 0.35s;
}
.value-card:hover .value-icon { transform: scale(1.08) rotate(-4deg); background: var(--white); box-shadow: var(--shadow-sm); }
.value-icon svg { width: 26px; height: 26px; }
.value-card h3 { font-size: 19px; margin-bottom: 10px; }
.value-card p { font-size: 15px; margin-bottom: 0; }

/* ==========================================================================
   Product grid
   ========================================================================== */
.product-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 26px; }
.product-card {
  background: linear-gradient(160deg, var(--white) 0%, #FBFDFD 100%); border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s; display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: transparent; }
.product-media {
  aspect-ratio: 4/3; background: linear-gradient(135deg, var(--bg-alt), var(--white));
  display: flex; align-items: center; justify-content: center; position: relative; padding: 20px; overflow: hidden;
}
.product-media img { max-height: 100%; object-fit: contain; transition: transform 0.5s var(--ease); }
.product-card:hover .product-media img { transform: scale(1.06); }
.rx-badge {
  position: absolute; top: 12px; left: 12px; background: var(--navy-dark); color: var(--white);
  font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 4px 9px; border-radius: 6px; z-index: 2;
}
.product-body { padding: 20px 22px 24px; flex: 1; display: flex; flex-direction: column; }
.product-cat { font-family: var(--font-mono); font-size: 11px; color: var(--teal); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 7px; }
.product-body h3 { font-size: 17.5px; margin-bottom: 7px; }
.product-body .composition { font-size: 13.5px; color: var(--ink-soft); margin-bottom: 16px; flex: 1; }
.product-strength { font-family: var(--font-mono); font-size: 12px; background: var(--bg-alt); color: var(--navy); padding: 4px 10px; border-radius: 7px; display: inline-block; margin-bottom: 14px; width: fit-content; margin-right: 6px; }
.product-link { font-size: 14px; font-weight: 600; color: var(--coral-dark); display: inline-flex; align-items: center; gap: 6px; transition: gap 0.25s; }
.product-card:hover .product-link { gap: 10px; }

.products-toolbar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 34px; flex-wrap: wrap; gap: 16px; }
.filter-pills { display: flex; gap: 10px; flex-wrap: wrap; }
.filter-pill {
  padding: 9px 17px; border-radius: 100px; border: 1px solid var(--border); font-size: 13.5px; font-weight: 600;
  color: var(--ink-soft); background: var(--white); transition: all 0.25s var(--ease); cursor: pointer;
}
.filter-pill.active, .filter-pill:hover { background: var(--navy); color: var(--white); border-color: var(--navy); transform: translateY(-1px); }

.contact-grid { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
.about-intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.product-detail-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }

/* ==========================================================================
   Stats band
   ========================================================================== */
.stats-band { background: linear-gradient(135deg, var(--navy-dark), #0A2E33); color: var(--white); padding: 64px 0; position: relative; overflow: hidden; }
.stats-band::before { content: ''; position: absolute; inset: 0; background: radial-gradient(circle at 20% 30%, rgba(46,140,150,0.18), transparent 55%); pointer-events: none; }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; text-align: center; position: relative; z-index: 1; }
.stats-grid .num { font-family: var(--font-mono); font-size: 42px; font-weight: 600; color: var(--gold); }
.stats-grid .label { font-size: 14px; color: rgba(255,255,255,0.72); margin-top: 6px; }

/* ==========================================================================
   Quality / Certifications
   ========================================================================== */
.cert-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.cert-item {
  background: linear-gradient(160deg, var(--bg-alt) 0%, #E3F0F0 100%); border-radius: var(--radius); padding: 28px 22px; text-align: center;
  border: 1px solid var(--border); transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.3s;
}
.cert-item:hover { transform: translateY(-4px); background: var(--white); box-shadow: var(--shadow-sm); }
.cert-item .cert-mark { font-family: var(--font-mono); font-weight: 700; font-size: 20px; color: var(--navy); margin-bottom: 9px; }
.cert-item p { font-size: 13.5px; margin-bottom: 0; }

/* ==========================================================================
   CTA banner
   ========================================================================== */
.cta-banner {
  background: linear-gradient(120deg, var(--teal) 0%, var(--coral-dark) 100%);
  color: var(--white); border-radius: var(--radius-lg); padding: 60px 52px;
  display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap;
  position: relative; overflow: hidden; box-shadow: var(--shadow-md);
}
.cta-banner::after { content: ''; position: absolute; top: -40%; right: -8%; width: 320px; height: 320px; border-radius: 50%; background: rgba(255,255,255,0.08); pointer-events: none; }
.cta-banner h2 { color: var(--white); margin-bottom: 8px; font-size: 27px; }
.cta-banner p { color: rgba(255,255,255,0.85); margin-bottom: 0; }

/* ==========================================================================
   Forms (Inquiry)
   ========================================================================== */
.inquiry-panel { background: linear-gradient(160deg, var(--white) 0%, #FBFDFD 100%); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 42px; box-shadow: var(--shadow-sm); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form-field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-size: 13.5px; font-weight: 600; color: var(--navy-dark); }
.form-field input, .form-field select, .form-field textarea {
  padding: 12.5px 15px; border: 1.5px solid var(--border); border-radius: var(--radius-sm); font-family: var(--font-body);
  font-size: 14.5px; color: var(--ink); background: var(--bg); transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
}
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--teal); background: var(--white); box-shadow: 0 0 0 4px rgba(46,140,150,0.12);
}
.form-field textarea { resize: vertical; min-height: 100px; }
.form-note { font-size: 13px; color: var(--ink-soft); margin-top: -6px; }

.alert { padding: 15px 19px; border-radius: var(--radius-sm); font-size: 14.5px; margin-bottom: 20px; }
.alert-success { background: #E8F6EA; color: #1E7A32; border: 1px solid #B9E3C0; }
.alert-error { background: #FBEAE7; color: #B23A24; border: 1px solid #F1C3B8; }

/* ==========================================================================
   Footer
   ========================================================================== */
.molecule-divider { background: var(--navy-dark); line-height: 0; }
.molecule-divider svg { width: 100%; height: 40px; }
.bond { stroke: rgba(255,255,255,0.15); stroke-width: 2; }
.atom { opacity: 0.85; }
.atom-red { fill: #E2543A; }
.atom-navy { fill: #4A6FA0; }
.atom-green { fill: var(--green); }
.atom-gold { fill: var(--gold); }
.atom-teal { fill: var(--teal-light); }

.site-footer { background: linear-gradient(180deg, var(--navy-dark) 0%, #0A2E33 100%); color: rgba(255,255,255,0.75); position: relative; overflow: hidden; }
.site-footer::before {
  content: ''; position: absolute; top: -20%; left: 10%; width: 300px; height: 300px; border-radius: 50%;
  background: radial-gradient(circle, rgba(46,140,150,0.08), transparent 70%); pointer-events: none;
}
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 40px; padding: 60px 24px 44px; }
.footer-logo { height: 40px; margin-bottom: 16px; opacity: 0.95; }
.footer-brand p { color: rgba(255,255,255,0.6); font-size: 14px; }
.footer-col h4 { color: var(--white); font-size: 14px; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 18px; }
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 12px; font-size: 14.5px; }
.footer-col a { transition: color 0.2s, padding-left 0.2s; }
.footer-col a:hover { color: var(--gold); padding-left: 3px; }
.footer-contact li { color: rgba(255,255,255,0.65); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1); padding: 24px 24px; display: flex;
  justify-content: space-between; font-size: 13px; color: rgba(255,255,255,0.5); flex-wrap: wrap; gap: 10px;
}
.footer-note { max-width: 480px; text-align: right; }

.scroll-top {
  position: fixed; bottom: 28px; right: 28px; width: 46px; height: 46px; border-radius: 50%;
  background: var(--coral); color: var(--white); border: none; font-size: 18px; cursor: pointer;
  box-shadow: var(--shadow-md); opacity: 0; pointer-events: none; transition: opacity 0.3s, transform 0.3s var(--ease);
  z-index: 200;
}
.scroll-top.visible { opacity: 1; pointer-events: auto; }
.scroll-top:hover { transform: translateY(-4px) scale(1.05); }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-inner { grid-template-columns: 1fr; }
  .value-grid, .cert-row { grid-template-columns: repeat(2, 1fr); }
  .product-grid { grid-template-columns: repeat(2, 1fr); }
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .contact-grid, .about-intro-grid, .product-detail-grid { grid-template-columns: 1fr !important; }
}
@media (max-width: 720px) {
  .main-nav { position: fixed; top: 0; right: 0; height: 100vh; width: 260px; background: var(--white);
    flex-direction: column; padding: 90px 28px; gap: 22px; transform: translateX(100%); transition: transform 0.35s var(--ease); box-shadow: var(--shadow-lg); }
  .main-nav.open { transform: translateX(0); }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .product-grid { grid-template-columns: 1fr; }
  .value-grid, .cert-row { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-note { text-align: left; }
  .cta-banner { padding: 38px 28px; }
}
