/* ==========================================================================
   Jam Medical Inc. — Melita's Skin Care Products
   Shared stylesheet
   ========================================================================== */

:root {
  --green: #2e7d5b;
  --green-dark: #1f4d3a;
  --green-deep: #16352a;
  --teal: #3a9d8f;
  --mint: #eef5f1;
  --mint-2: #f6faf8;
  /* Accent pastels sampled from the Melita's product branding */
  --blue: #6aa6cf;
  --blue-soft: #d7e8f5;
  --blue-line: #a9cfe8;
  --pink: #dd93a6;
  --pink-deep: #cf6f88;
  --pink-soft: #f8dce6;
  --pink-line: #eec0ce;
  --green-soft: #d8ecdf;
  --green-line: #aed8c1;
  /* PRIMARY brand color — the exact Melita's logo blue */
  --brand-blue: #1285ad;
  --brand-blue-hover: #0f7195;
  --brand-blue-deep: #0a4a61;
  --ink: #26302c;
  --muted: #5f6b66;
  --line: #dfe8e3;
  --white: #ffffff;
  --radius: 12px;
  --shadow: 0 6px 24px rgba(31, 77, 58, 0.08);
  --shadow-lg: 0 14px 40px rgba(31, 77, 58, 0.14);
  --max: 1120px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  line-height: 1.65;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a { color: var(--brand-blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; color: #141414; font-weight: 700; }
h1 { font-size: clamp(2rem, 4vw, 3rem); margin: 0 0 .5rem; }
h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin: 0 0 1rem; }
h3 { font-size: 1.2rem; margin: 0 0 .4rem; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }

.eyebrow { display: none; }

/* -------------------------------------------------- Header / Nav */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: saturate(180%) blur(8px);
  border-bottom: 3px solid var(--green);
  border-image: linear-gradient(90deg, var(--blue), var(--teal), var(--pink)) 1;
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1.25rem;
  max-width: var(--max);
  margin: 0 auto;
}
.brand { display: flex; align-items: center; gap: .6rem; }
.brand a { text-decoration: none; color: var(--green-deep); }
.brand .logo {
  width: 40px; height: 40px; border-radius: 9px;
  background: linear-gradient(135deg, var(--green), var(--teal));
  color: #fff; font-weight: 800; font-size: 1.05rem;
  display: grid; place-items: center; letter-spacing: -.02em;
}
.brand .brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand .brand-name { font-weight: 800; font-size: 1.05rem; color: var(--green-deep); }
.brand .brand-sub { font-size: .72rem; color: var(--muted); letter-spacing: .02em; }

.menu-toggle {
  display: none;
  background: none; border: 1px solid var(--line);
  border-radius: 8px; padding: .5rem .6rem; cursor: pointer;
  font-size: 1.1rem; line-height: 1; color: var(--green-deep);
}

.menu { display: flex; align-items: center; gap: .25rem; list-style: none; margin: 0; padding: 0; }
.menu > li { position: relative; }
.menu > li > a {
  display: block; padding: .55rem .8rem; border-radius: 8px;
  color: var(--ink); font-weight: 600; font-size: .95rem;
}
.menu > li > a:hover,
.menu > li.current > a { background: var(--blue-soft); color: var(--brand-blue); text-decoration: none; }

/* Dropdown */
.has-dropdown > a::after { content: " ▾"; font-size: .7em; color: var(--muted); }
.dropdown {
  position: absolute; top: 100%; left: 0; min-width: 240px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-lg); padding: .4rem; list-style: none; margin: .4rem 0 0;
  opacity: 0; visibility: hidden; transform: translateY(6px);
  transition: all .16s ease;
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.has-dropdown.open .dropdown { opacity: 1; visibility: visible; transform: translateY(0); }
.dropdown a {
  display: block; padding: .55rem .7rem; border-radius: 8px;
  color: var(--ink); font-size: .92rem; font-weight: 500;
}
.dropdown a:hover { background: var(--blue-soft); color: var(--brand-blue); text-decoration: none; }

/* -------------------------------------------------- Buttons */
.btn {
  display: inline-block; padding: .8rem 1.4rem; border-radius: 999px;
  font-weight: 700; font-size: .95rem; cursor: pointer; border: 2px solid transparent;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--brand-blue); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-blue-hover); }
.btn-ghost { background: #fff; color: var(--brand-blue); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand-blue); }

/* -------------------------------------------------- Hero */
.hero {
  background:
    radial-gradient(900px 420px at 88% -12%, rgba(106,166,207,.22), transparent 60%),
    radial-gradient(760px 420px at 2% 8%, rgba(221,147,166,.18), transparent 60%),
    radial-gradient(1000px 460px at 55% -10%, rgba(58,157,143,.12), transparent 60%),
    linear-gradient(180deg, var(--mint-2), #fff);
  padding: clamp(3rem, 7vw, 6rem) 0 clamp(2.5rem, 5vw, 4rem);
}
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
.hero p.lead { font-size: 1.12rem; color: var(--muted); max-width: 46ch; }
.hero .cta-row { display: flex; gap: .8rem; flex-wrap: wrap; margin-top: 1.4rem; }
.hero-art {
  aspect-ratio: 4/3; border-radius: 18px;
  background:
    radial-gradient(300px 200px at 30% 20%, rgba(255,255,255,.6), transparent),
    linear-gradient(135deg, var(--green), var(--teal));
  box-shadow: var(--shadow-lg);
  display: grid; place-items: center; color: #fff; text-align: center; padding: 2rem;
}
.hero-art .est { font-size: 3.4rem; font-weight: 800; letter-spacing: -.02em; }
.hero-art .est-sub { opacity: .9; letter-spacing: .16em; text-transform: uppercase; font-size: .78rem; }

/* -------------------------------------------------- Sections */
section { padding: clamp(2.5rem, 5vw, 4rem) 0; }
.section-alt { background: var(--mint-2); }
.section-blue { background: var(--blue-soft); }
.section-pink { background: var(--pink-soft); }
.section-green { background: var(--green-soft); }
.section-head { max-width: 60ch; margin-bottom: 2rem; }
.page-hero {
  background:
    radial-gradient(700px 300px at 90% -30%, rgba(106,166,207,.20), transparent 65%),
    radial-gradient(600px 300px at 5% -20%, rgba(221,147,166,.16), transparent 65%),
    linear-gradient(180deg, var(--mint), #fff);
  padding: clamp(2.5rem, 5vw, 4rem) 0 clamp(1.5rem, 3vw, 2.5rem);
  border-bottom: 1px solid var(--line);
}
.breadcrumb { font-size: .85rem; color: var(--muted); margin-bottom: .6rem; }
.breadcrumb a { color: var(--muted); }

/* -------------------------------------------------- Feature grid */
.grid { display: grid; gap: 1.25rem; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px)  { .grid-4 { grid-template-columns: 1fr; } }

/* ---------- Feature tiles + partner callout (Who We Are) ---------- */
.feature {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 1.5rem; box-shadow: var(--shadow);
  transition: transform .14s ease, box-shadow .14s ease;
}
.feature:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.feature-ico {
  width: 52px; height: 52px; border-radius: 12px; margin-bottom: 1rem;
  background: var(--blue-soft); color: var(--brand-blue);
  display: grid; place-items: center; font-size: 1.5rem;
}
.feature h3 { margin: 0 0 .4rem; font-size: 1.08rem; }
.feature p { margin: 0; color: var(--muted); font-size: .95rem; line-height: 1.55; }

.partner-callout {
  display: flex; gap: 1.2rem; align-items: center; margin-top: 1.5rem;
  padding: 1.5rem 1.75rem; border-radius: 16px; border: 1px solid var(--line);
  background: linear-gradient(120deg, var(--blue-soft), var(--mint) 70%, var(--pink-soft));
}
.partner-ico {
  flex: none; width: 60px; height: 60px; border-radius: 14px; background: #fff;
  color: var(--brand-blue); display: grid; place-items: center; font-size: 1.8rem;
  box-shadow: var(--shadow);
}
.partner-callout h3 { margin: 0 0 .3rem; font-size: 1.12rem; }
.partner-callout p { margin: 0; color: var(--ink); }
@media (max-width: 560px) { .partner-callout { flex-direction: column; text-align: center; } }

.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; box-shadow: var(--shadow); transition: transform .14s ease, box-shadow .14s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.card .ico {
  width: 46px; height: 46px; border-radius: 10px; margin-bottom: .9rem;
  background: var(--mint); color: var(--green); display: grid; place-items: center;
  font-size: 1.4rem;
}
/* Rotate category icon colors through green / blue / pink */
.grid-3 .card:nth-child(3n+2) .ico { background: var(--blue-soft); color: var(--blue); }
.grid-3 .card:nth-child(3n)   .ico { background: var(--pink-soft); color: #c76d82; }
/* Tint the whole category card + colored top bar, icon sits on a white chip */
.grid-3 .card { border-top: 5px solid var(--green); }
.grid-3 .card .ico { background: #fff; }
.grid-3 .card:nth-child(3n+1) { background: var(--green-soft); border-top-color: var(--green); }
.grid-3 .card:nth-child(3n+2) { background: var(--blue-soft);  border-top-color: var(--blue); }
.grid-3 .card:nth-child(3n)   { background: var(--pink-soft);  border-top-color: var(--pink-deep); }

/* -------------------------------------------------- Product cards */
.products { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.5rem; }
.product {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow); display: flex; flex-direction: column;
  border-top: 5px solid var(--teal);
}
/* Rotate the product-card top accent through the palette */
.products .product:nth-child(4n+1) { border-top-color: var(--green); }
.products .product:nth-child(4n+2) { border-top-color: var(--blue); }
.products .product:nth-child(4n+3) { border-top-color: var(--pink-deep); }
.products .product:nth-child(4n+4) { border-top-color: var(--teal); }
.product .thumb {
  aspect-ratio: 9/8;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: grid; place-items: center; color: var(--green); position: relative;
}
.product .thumb .thumb-label {
  font-weight: 700; letter-spacing: .04em; opacity: .55; font-size: .85rem;
  text-transform: uppercase; padding: 1rem; text-align: center;
}
.product .body { padding: 1.4rem; display: flex; flex-direction: column; gap: .8rem; flex: 1; }
.product h3 { margin: 0; }
.product ul { margin: 0; padding-left: 1.1rem; color: var(--ink); }
.product ul li { margin: .25rem 0; }
.codes { margin-top: auto; border-top: 1px solid var(--line); padding-top: .9rem; }
.codes .codes-title {
  font-size: .72rem; text-transform: uppercase; letter-spacing: .1em;
  color: var(--muted); font-weight: 700; margin-bottom: .4rem;
}
.code {
  display: inline-block; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: .8rem; background: var(--accent, var(--mint)); color: var(--accent-text, var(--green-dark));
  border-radius: 6px; padding: .25rem .55rem; margin: .2rem .3rem .2rem 0;
}

/* -------------------------------------------------- Previous / Next pager */
.pager {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; gap: 1rem; margin-top: 1.25rem;
}
.pager-btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 700; font-size: 1rem; color: var(--brand-blue);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: .7rem 1.4rem; box-shadow: var(--shadow);
  transition: transform .14s ease, background .14s ease, border-color .14s ease;
}
.pager-btn:hover {
  background: var(--blue-soft); border-color: var(--blue-line);
  text-decoration: none; transform: translateY(-1px);
}
.pager-arrow { font-size: 1.15rem; line-height: 1; }

/* -------------------------------------------------- Badges / pills */
.pills { display: flex; flex-wrap: wrap; gap: .6rem; }
.pill {
  background: #fff; border: 1px solid var(--line); color: var(--green-dark);
  border-radius: 999px; padding: .5rem 1rem; font-weight: 600; font-size: .9rem;
}
.pills .pill:nth-child(4n+1) { border-color: #bcdff0; background: var(--blue-soft); }
.pills .pill:nth-child(4n+2) { border-color: #f2cdd7; background: var(--pink-soft); }
.pills .pill:nth-child(4n+3) { border-color: #bfe3d3; background: var(--mint); }

/* -------------------------------------------------- Contact band */
.contact-band { background: var(--brand-blue); color: #eaf6fb; }
.contact-band h2 { color: #fff; }
.contact-band .container { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.contact-list { list-style: none; margin: 0; padding: 0; }
.contact-list li { margin: .6rem 0; display: flex; gap: .7rem; align-items: center; font-size: 1.05rem; }
.contact-list a { color: #fff; }
.contact-list .ci {
  width: 34px; height: 34px; border-radius: 8px; background: rgba(255,255,255,.12);
  display: grid; place-items: center; flex: none;
}

/* -------------------------------------------------- Footer */
.site-footer { background: var(--brand-blue-deep); color: #bcd7e1; padding: 2.5rem 0 1.5rem; font-size: .92rem; }
.site-footer .container { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.site-footer h4 { color: #fff; margin: 0 0 .8rem; font-size: 1rem; }
.site-footer a { color: #bcd7e1; }
.site-footer a:hover { color: #fff; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer ul li { margin: .35rem 0; }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1); margin-top: 2rem; padding-top: 1.2rem;
  text-align: center; color: #8aa397; font-size: .85rem;
}

/* -------------------------------------------------- Real logo image */
.brand-logo { height: 46px; width: auto; display: block; }

/* -------------------------------------------------- Section media / photos */
.media { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); background: var(--mint); }
.media img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4/3; }

.hero-photo { padding: 0; background: none; box-shadow: none; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 18px; box-shadow: var(--shadow-lg); aspect-ratio: 4/3; }

.media-wide { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); margin-bottom: 2rem; }
.media-wide img { width: 100%; aspect-ratio: 8/5; object-fit: cover; display: block; }
.media-side { border-radius: 18px; overflow: hidden; box-shadow: var(--shadow-lg); }
.media-side img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 4/3; }
@media (max-width: 860px) { .media-wide img { aspect-ratio: 4/3; } }

/* Product photo (transparent cutout) shown whole, centered on white */
.product .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 10px; }
/* Hide the placeholder label whenever a real photo is present (only show it as a fallback) */
.product .thumb:has(img) .thumb-label { display: none; }

/* -------------------------------------------------- SDS / document links */
.doc-row { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .2rem; }
.sds-link {
  display: inline-flex; align-items: center; gap: .4rem;
  font-weight: 700; font-size: .82rem; color: var(--brand-blue);
  border: 1px solid var(--line); border-radius: 8px; padding: .4rem .7rem;
  background: #fff;
}
.sds-link:hover { background: var(--blue-soft); border-color: var(--blue-line); text-decoration: none; }
.sds-link .doc-ico { font-size: 1rem; }

/* -------------------------------------------------- Utilities */
.text-center { text-align: center; }
.mt-2 { margin-top: 2rem; }

/* -------------------------------------------------- Responsive */
@media (max-width: 860px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { order: -1; }
  .grid-3, .grid-2, .products { grid-template-columns: 1fr; }
  .contact-band .container, .site-footer .container { grid-template-columns: 1fr; }

  .menu-toggle { display: block; }
  .menu {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); padding: .5rem;
    box-shadow: var(--shadow);
  }
  .menu.open { display: flex; }
  .site-header { position: relative; }
  .dropdown {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: none; border-left: 2px solid var(--blue-soft);
    margin: 0 0 .4rem .8rem; padding: 0; display: none;
  }
  .has-dropdown.open .dropdown { display: block; }
  .has-dropdown > a::after { float: right; }
}
