/* =========================================================================
   MEDIPOLYMER SURGICALS — STYLES
   Design tokens are CSS custom properties; script.js overwrites the color
   values at runtime from js/config.js (SITE_CONFIG.theme), so editing
   config.js re-skins the whole site without touching this file.
   ========================================================================= */

:root{
  --navy: #142B42;
  --navy-deep: #0D1F32;
  --teal: #0E6E76;
  --teal-light: #E4F1F1;
  --rose: #C42D5D;
  --rose-light: #FBE6ED;
  --paper: #FBFAF7;
  --card: #FFFFFF;
  --ink: #23303B;
  --muted: #63707A;
  --line: #E1E7E7;

  --font-display: 'Poppins', 'Segoe UI', sans-serif;
  --font-body: 'Lora', Georgia, serif;
  --font-mono: 'IBM Plex Mono', 'Courier New', monospace;

  --header-h: 76px;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(13,31,50,0.06), 0 1px 1px rgba(13,31,50,0.04);
  --shadow-md: 0 12px 28px rgba(13,31,50,0.10), 0 2px 8px rgba(13,31,50,0.06);
  --shadow-lg: 0 24px 60px rgba(13,31,50,0.18);
  --ease: cubic-bezier(.22,.68,0,1);
}

*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); }
body{
  margin:0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img{ max-width:100%; display:block; }
a{ color:inherit; text-decoration:none; }
ul{ list-style:none; margin:0; padding:0; }
h1,h2,h3,h4{ font-family: var(--font-display); color: var(--navy); line-height:1.15; margin:0; }
p{ margin:0; }
button{ font-family:inherit; cursor:pointer; }
input, textarea, select{ font-family: var(--font-body); }

.wrap{
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow{
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.22em;
  color: var(--teal);
  text-transform: uppercase;
  margin-bottom: 14px;
  font-weight: 500;
}
.eyebrow-light{ color: #8FD7CF; }

/* ---------------------------------------------------------------------
   BUTTONS
   --------------------------------------------------------------------- */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  padding: 13px 26px;
  border-radius: 999px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14.5px;
  border: 1.5px solid transparent;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease), background .25s var(--ease), border-color .25s var(--ease), color .25s var(--ease);
  white-space: nowrap;
}
.btn:hover{ transform: translateY(-2px); }
.btn-primary{ background: var(--rose); color:#fff; box-shadow: 0 8px 20px rgba(196,45,93,0.28); }
.btn-primary:hover{ background:#AD264F; box-shadow: 0 12px 26px rgba(196,45,93,0.34); }
.btn-accent{ background: var(--rose); color:#fff; box-shadow: 0 10px 24px rgba(196,45,93,0.35); }
.btn-accent:hover{ background:#AD264F; }
.btn-ghost{ background: transparent; color:#fff; border-color: rgba(255,255,255,0.4); }
.btn-ghost:hover{ background: rgba(255,255,255,0.1); border-color: #fff; }
.btn-sm{ padding: 10px 20px; font-size: 13.5px; }
.btn-block{ width:100%; }

/* ---------------------------------------------------------------------
   HEADER / NAV
   --------------------------------------------------------------------- */
.site-header{
  position: sticky; top:0; z-index: 210;
  height: var(--header-h);
  display:flex; align-items:center;
  background: rgba(251,250,247,0.82);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled{
  border-bottom-color: var(--line);
  box-shadow: var(--shadow-sm);
}
.header-inner{
  display:flex; align-items:center; justify-content:space-between;
  width:100%;
}
.brand-mark{ display:flex; align-items:center; gap:10px; }
.brand-dot{
  width:14px; height:14px; border-radius:50%;
  background: var(--rose);
  flex-shrink:0;
  box-shadow: 0 0 0 4px var(--rose-light);
}
.brand-text{ display:flex; flex-direction:column; line-height:1.2; }
.brand-name{ font-family: var(--font-display); font-weight:700; font-size:14.5px; color: var(--navy); letter-spacing:0.01em; }
.brand-sub{ font-family: var(--font-mono); font-size:9.5px; letter-spacing:0.18em; color: var(--teal); }

.main-nav ul{ display:flex; gap:34px; }
.main-nav a{
  font-family: var(--font-display); font-size:14px; font-weight:500;
  color: var(--ink); position:relative; padding: 6px 0;
  transition: color .2s;
}
.main-nav a::after{
  content:''; position:absolute; left:0; bottom:0; width:0; height:2px;
  background: var(--rose); transition: width .25s var(--ease);
}
.main-nav a:hover{ color: var(--rose); }
.main-nav a:hover::after{ width:100%; }
.main-nav a.active{ color: var(--rose); }
.main-nav a.active::after{ width:100%; }

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

.nav-toggle{
  display:none; flex-direction:column; justify-content:center; gap:5px;
  width:38px; height:38px; background:none; border:none; padding:0;
}
.nav-toggle span{ width:100%; height:2px; background: var(--navy); border-radius:2px; transition: transform .25s var(--ease), opacity .25s var(--ease); }
.nav-toggle.open span:nth-child(1){ transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2){ opacity:0; }
.nav-toggle.open span:nth-child(3){ transform: translateY(-7px) rotate(-45deg); }

.mobile-nav{
  position: fixed; top:0; right:0; height:100vh; width: min(320px, 84vw);
  background: var(--navy-deep); z-index:200;
  padding: 100px 28px 32px;
  transform: translateX(100%);
  transition: transform .35s var(--ease);
  display:flex; flex-direction:column; gap:28px;
}
.mobile-nav.open{ transform: translateX(0); }
.mobile-nav ul{ display:flex; flex-direction:column; gap:22px; }
.mobile-nav a{ font-family: var(--font-display); font-size:19px; font-weight:600; color:#fff; }
.mobile-nav-backdrop{
  position:fixed; inset:0; background: rgba(13,31,50,0.55); z-index:190;
  opacity:0; pointer-events:none; transition: opacity .3s var(--ease);
}
.mobile-nav-backdrop.open{ opacity:1; pointer-events:auto; }

/* ---------------------------------------------------------------------
   HERO
   --------------------------------------------------------------------- */
.hero{
  position:relative;
  overflow:hidden;
  color:#fff;
}
.hero-bg{
  position:absolute; inset:0;
  background:
    radial-gradient(1100px 620px at 82% -10%, rgba(14,110,118,0.55), transparent 60%),
    linear-gradient(155deg, var(--navy-deep) 0%, var(--navy) 55%, var(--teal) 145%);
  z-index:0;
}
.hero-inner{
  position:relative; z-index:1;
  display:grid; grid-template-columns: 1.15fr 0.85fr; gap:40px;
  align-items:center;
  padding-top: 84px; padding-bottom: 74px;
}
.hero-copy h1{
  font-size: clamp(32px, 4.6vw, 52px);
  font-weight:700; color:#fff; margin: 6px 0 22px;
  letter-spacing: -0.01em;
}
.hero-copy h1 .accent{ color: var(--rose); }
.hero-sub{
  font-family: var(--font-body); font-size: 16.5px; color:#D9E7E5;
  max-width: 520px; margin-bottom: 34px; line-height:1.7;
}
.hero-ctas{ display:flex; gap:16px; flex-wrap:wrap; }

.hero-art{
  position:relative; height: 420px;
}
.hero-tile{
  position:absolute;
  background:#fff;
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 14px;
  display:flex; align-items:center; justify-content:center;
  transition: transform .4s var(--ease);
}
.hero-tile img{ width:100%; height:100%; object-fit:contain; border-radius:8px; }
.hero-tile:hover{ transform: translateY(-8px) scale(1.03); }
.hero-tile.t1{ width:190px; height:190px; top:0; left:6%; }
.hero-tile.t2{ width:150px; height:150px; top:8%; right:0; }
.hero-tile.t3{ width:150px; height:150px; bottom:6%; left:0; }
.hero-tile.t4{ width:190px; height:190px; bottom:0; right:8%; }

.trust-strip{
  position:relative; z-index:1;
  border-top: 1px solid rgba(255,255,255,0.14);
  background: rgba(13,31,50,0.35);
}
.trust-strip-inner{
  display:grid; grid-template-columns: repeat(4, 1fr);
  gap: 20px;
  padding: 22px 24px;
}
.trust-chip{ display:flex; flex-direction:column; gap:2px; }
.trust-chip .t{ font-family: var(--font-display); font-weight:600; font-size:13.5px; color:#fff; }
.trust-chip .d{ font-family: var(--font-mono); font-size:10.5px; color:#9FC6C1; letter-spacing:0.01em; }

/* ---------------------------------------------------------------------
   REVEAL ANIMATION
   --------------------------------------------------------------------- */
.reveal{ opacity:0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in-view{ opacity:1; transform: translateY(0); }

/* ---------------------------------------------------------------------
   ABOUT
   --------------------------------------------------------------------- */
.about{ padding: 100px 0; }
.about-inner{ display:grid; grid-template-columns: 0.9fr 1.1fr; gap:64px; align-items:start; }
.about-copy h2{ font-size: clamp(26px, 3vw, 34px); margin-bottom:18px; }
.about-copy p{ color: var(--muted); font-size:15.5px; line-height:1.75; max-width: 440px; }

.about-points{ display:grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.about-point{
  background: var(--card); border:1px solid var(--line); border-radius: var(--radius);
  padding: 24px 22px;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.about-point:hover{ transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: transparent; }
.about-point .num{
  font-family: var(--font-mono); font-size:11px; color: var(--rose);
  letter-spacing:0.1em; margin-bottom:10px; display:block;
}
.about-point h3{ font-size:16px; margin-bottom:8px; }
.about-point p{ font-size:13.8px; color: var(--muted); line-height:1.6; }

/* ---------------------------------------------------------------------
   PRODUCTS
   --------------------------------------------------------------------- */
.products{ padding: 20px 0 100px; }
.section-head{ max-width: 640px; margin-bottom: 40px; }
.section-head h2{ font-size: clamp(26px, 3vw, 34px); }
.section-head.light h2{ color:#fff; }

.filter-tabs{
  display:flex; gap:10px; flex-wrap:wrap;
  margin-bottom: 40px;
}
.filter-tab{
  font-family: var(--font-display); font-weight:600; font-size:13.5px;
  padding: 10px 20px; border-radius:999px;
  background: var(--card); border:1.5px solid var(--line); color: var(--muted);
  transition: all .25s var(--ease);
}
.filter-tab:hover{ border-color: var(--teal); color: var(--teal); }
.filter-tab.active{ background: var(--navy); border-color: var(--navy); color:#fff; }

.product-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap: 26px;
}
.product-card{
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow:hidden;
  display:flex; flex-direction:column;
  opacity:0; transform: translateY(18px) scale(.99);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease), opacity .4s var(--ease);
}
.product-card.shown{ opacity:1; transform: translateY(0) scale(1); }
.product-card.hidden-card{ display:none; }
.product-card:hover{ box-shadow: var(--shadow-md); transform: translateY(-6px); border-color: transparent; }

.product-media{
  position:relative;
  height: 220px;
  background: var(--teal-light);
  display:flex; align-items:center; justify-content:center;
  padding: 18px;
  overflow:hidden;
}
.product-media img{ max-width:100%; max-height:100%; object-fit:contain; transition: transform .5s var(--ease); }
.product-card:hover .product-media img{ transform: scale(1.06); }
.product-tag{
  position:absolute; top:12px; left:12px;
  background: var(--navy); color:#fff;
  font-family: var(--font-mono); font-size:9.5px; letter-spacing:0.1em;
  padding: 4px 9px; border-radius:5px;
}

.product-body{ padding: 22px; display:flex; flex-direction:column; flex:1; }
.product-body h3{ font-size:17px; margin-bottom:8px; }
.product-tagline{ font-family: var(--font-body); font-style:italic; color: var(--rose); font-size:13.5px; line-height:1.5; margin-bottom:14px; }
.product-bullets{ display:flex; flex-direction:column; gap:6px; margin-bottom:16px; }
.product-bullets li{ font-size:13px; color: var(--ink); padding-left:16px; position:relative; line-height:1.5; }
.product-bullets li::before{ content:''; position:absolute; left:0; top:6px; width:5px; height:5px; border-radius:50%; background: var(--teal); }

.product-specs{
  font-family: var(--font-mono); font-size:11px; color: var(--muted);
  background: var(--paper); border:1px solid var(--line); border-radius:8px;
  padding: 10px 12px; line-height:1.9; margin-top:auto; margin-bottom:16px;
}
.product-specs b{ color: var(--navy); }

.product-cta{
  align-self:flex-start;
  font-family: var(--font-display); font-weight:600; font-size:13px;
  color: var(--rose); display:inline-flex; align-items:center; gap:6px;
}
.product-cta svg{ width:14px; height:14px; transition: transform .2s var(--ease); }
.product-cta:hover svg{ transform: translateX(3px); }

/* ---------------------------------------------------------------------
   CERTIFICATIONS
   --------------------------------------------------------------------- */
.certifications{
  background: var(--navy-deep); color:#fff;
  padding: 90px 0;
}
.cert-grid{ display:grid; grid-template-columns: repeat(4, 1fr); gap:20px; }
.cert-card{
  border:1px solid rgba(255,255,255,0.16); border-radius: var(--radius);
  padding: 24px 20px;
  transition: border-color .3s, background .3s;
}
.cert-card:hover{ border-color: rgba(255,255,255,0.4); background: rgba(255,255,255,0.03); }
.cert-card .t{ font-family: var(--font-display); font-weight:700; font-size:15px; color:#8FD7CF; margin-bottom:8px; }
.cert-card .d{ font-size:13.5px; color:#C9DAD8; line-height:1.55; }

/* ---------------------------------------------------------------------
   TESTIMONIALS
   --------------------------------------------------------------------- */
.testimonials{ padding: 90px 0; }
.testimonial-grid{ display:grid; grid-template-columns: repeat(2, 1fr); gap:24px; }
.testimonial-card{
  background: var(--rose-light); border-radius: var(--radius); padding: 28px 26px;
}
.testimonial-card p.quote{ font-family: var(--font-body); font-style:italic; font-size:16px; color: var(--navy); line-height:1.6; margin-bottom:14px; }
.testimonial-card p.author{ font-family: var(--font-mono); font-size:11px; color: var(--rose); letter-spacing:0.05em; }

/* ---------------------------------------------------------------------
   CONTACT
   --------------------------------------------------------------------- */
.contact{ background: var(--navy-deep); color:#fff; padding: 100px 0; }
.contact-inner{ display:grid; grid-template-columns: 1fr 1fr; gap: 60px; }
.contact-copy h2{ color:#fff; font-size: clamp(26px, 3vw, 34px); margin-bottom:16px; }
.contact-copy p{ color:#C9DAD8; font-size:15.5px; max-width:440px; line-height:1.7; margin-bottom:30px; }

.contact-details{ display:flex; flex-direction:column; gap:20px; margin-bottom:28px; }
.contact-detail-row{ display:flex; gap:14px; }
.contact-detail-row .ic{
  width:38px; height:38px; border-radius:50%;
  background: rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.16);
  display:flex; align-items:center; justify-content:center; flex-shrink:0;
}
.contact-detail-row .ic svg{ width:17px; height:17px; stroke: #8FD7CF; }
.contact-detail-row .label{ font-family: var(--font-mono); font-size:10px; letter-spacing:0.14em; color:#8FD7CF; margin-bottom:4px; text-transform:uppercase; }
.contact-detail-row .val{ font-size:14.5px; color:#EAF1F0; line-height:1.6; }
.contact-detail-row a.val:hover{ color: var(--rose); }

.map-embed{ border-radius: var(--radius); overflow:hidden; border:1px solid rgba(255,255,255,0.16); height:220px; }
.map-embed iframe{ width:100%; height:100%; border:0; filter: grayscale(0.15) contrast(1.05); }

.contact-form{
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--radius);
  padding: 32px;
  display:flex; flex-direction:column; gap:18px;
  align-self:start;
  min-height: 480px;
  justify-content:center;
}
.form-row{ display:flex; flex-direction:column; gap:7px; }
.form-row-split{ display:grid; grid-template-columns:1fr 1fr; gap:14px; }
.form-row-split > div{ display:flex; flex-direction:column; gap:7px; }
.contact-form label{ font-family: var(--font-mono); font-size:10.5px; letter-spacing:0.1em; color:#9FC6C1; text-transform:uppercase; }
.contact-form input, .contact-form select, .contact-form textarea{
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 8px;
  padding: 11px 13px;
  color:#fff;
  font-size:14px;
  outline:none;
  transition: border-color .2s;
  resize: vertical;
}
.contact-form input::placeholder, .contact-form textarea::placeholder{ color: rgba(255,255,255,0.35); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus{ border-color: var(--rose); }
.contact-form select option{ color:#000; }
.form-note{ font-size:11.5px; color:#8AA3A0; text-align:center; }

.honeypot{
  position:absolute !important;
  left:-9999px !important;
  width:1px; height:1px;
  opacity:0;
  pointer-events:none;
}

.form-success{
  display:flex; flex-direction:column; align-items:center; text-align:center;
  padding: 20px 6px 6px;
}
.form-success-icon{
  width:56px; height:56px; border-radius:50%;
  background: rgba(37,211,102,0.15); border:1.5px solid #25D366;
  display:flex; align-items:center; justify-content:center;
  color:#25D366; margin-bottom:18px;
}
.form-success-icon svg{ width:26px; height:26px; }
.form-success h3{ color:#fff; font-size:19px; margin-bottom:10px; }
.form-success p{ color:#C9DAD8; font-size:14px; line-height:1.6; max-width:340px; margin-bottom:22px; }

.btn-ghost-dark{
  background: rgba(255,255,255,0.08); color:#fff; border:1.5px solid rgba(255,255,255,0.25);
}
.btn-ghost-dark:hover{ background: rgba(255,255,255,0.15); border-color: rgba(255,255,255,0.4); }

/* ---------------------------------------------------------------------
   FOOTER
   --------------------------------------------------------------------- */
.site-footer{ background: var(--navy-deep); color:#C9DAD8; padding-top: 60px; }
.footer-inner{
  display:grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding-bottom: 46px; border-bottom: 1px solid rgba(255,255,255,0.12);
}
.footer-brand{ display:flex; gap:12px; align-items:flex-start; }
.footer-brand-name{ font-family: var(--font-display); font-weight:700; color:#fff; font-size:15px; margin-bottom:6px; }
.footer-brand-sub{ font-size:13.5px; color:#9FB6B2; max-width:260px; line-height:1.6; }
.footer-col h4{ font-family: var(--font-mono); font-size:11px; letter-spacing:0.14em; color:#8FD7CF; text-transform:uppercase; margin-bottom:16px; }
.footer-col ul{ display:flex; flex-direction:column; gap:11px; }
.footer-col a, .footer-col li{ font-size:13.8px; color:#C9DAD8; }
.footer-col a:hover{ color: var(--rose); }
.footer-bottom{
  display:flex; justify-content:space-between; align-items:center;
  padding: 22px 24px; font-family: var(--font-mono); font-size:11px; color:#7C9491; letter-spacing:0.04em;
}

/* ---------------------------------------------------------------------
   FLOATING BUTTONS
   --------------------------------------------------------------------- */
.fab-stack{
  position: fixed; right: 22px; bottom: 22px; z-index:150;
  display:flex; flex-direction:column; gap:12px;
}
.fab{
  width:52px; height:52px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  box-shadow: var(--shadow-md);
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.fab:hover{ transform: translateY(-3px) scale(1.05); box-shadow: var(--shadow-lg); }
.fab-whatsapp{ background:#25D366; color:#fff; }
.fab-call{ background: var(--navy); color:#fff; }

.back-to-top{
  position: fixed; left: 22px; bottom: 22px; z-index:150;
  width:44px; height:44px; border-radius:50%;
  background: var(--card); border:1px solid var(--line); color: var(--navy);
  font-size:17px; box-shadow: var(--shadow-sm);
  opacity:0; pointer-events:none; transform: translateY(8px);
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.back-to-top.visible{ opacity:1; pointer-events:auto; transform: translateY(0); }
.back-to-top:hover{ color: var(--rose); }

/* ---------------------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------------------- */
@media (max-width: 980px){
  .hero-inner{ grid-template-columns: 1fr; padding-top:56px; }
  .hero-art{ height: 300px; order:-1; }
  .hero-tile.t1{ width:130px; height:130px; }
  .hero-tile.t2{ width:110px; height:110px; }
  .hero-tile.t3{ width:110px; height:110px; }
  .hero-tile.t4{ width:130px; height:130px; }
  .trust-strip-inner{ grid-template-columns: repeat(2,1fr); }

  .about-inner{ grid-template-columns:1fr; gap:36px; }
  .about-points{ grid-template-columns:1fr 1fr; }

  .product-grid{ grid-template-columns: repeat(2, 1fr); }
  .cert-grid{ grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid{ grid-template-columns: 1fr; }

  .contact-inner{ grid-template-columns:1fr; gap:40px; }
  .footer-inner{ grid-template-columns: 1fr 1fr; }
  .footer-brand{ grid-column: 1 / -1; }
}

@media (max-width: 720px){
  .main-nav{ display:none; }
  .nav-toggle{ display:flex; }
  .header-actions .btn{ display:none; }

  .about-points{ grid-template-columns:1fr; }
  .product-grid{ grid-template-columns: 1fr; }
  .cert-grid{ grid-template-columns: 1fr 1fr; }
  .form-row-split{ grid-template-columns:1fr; }
  .footer-inner{ grid-template-columns: 1fr; }
  .footer-bottom{ flex-direction:column; gap:8px; text-align:center; }
}

@media (max-width: 480px){
  .wrap{ padding: 0 18px; }
  .hero-ctas{ flex-direction:column; align-items:stretch; }
  .hero-ctas .btn{ width:100%; }
  .cert-grid{ grid-template-columns: 1fr; }
}
