/* =====================================================================
   Cheminpharma Products India Pvt. Ltd. — Showcase Website
   Shared stylesheet  |  Plain CSS3, no frameworks
   ---------------------------------------------------------------------
   Sections:
     1. Design tokens (colours, type, spacing)
     2. Base / reset
     3. Layout helpers
     4. Header + sticky navigation + mobile menu
     5. Hero (Home only) & compact page-title strip
     6. Buttons, cards, grids
     7. Page content blocks (science pages, products, careers, contact)
     8. Footer
     9. Responsive breakpoints
   Brand palette: Maroon #8A1538 · Gold #E0A82E · Charcoal #333 · Off-white #FAFAFA
   ===================================================================== */

/* ---------- 0. Web font: Assistant (self-hosted, offline-safe) ----------
   Variable font, weights 200–800. Files live in /fonts. No CDN dependency. */
@font-face {
  font-family: "Assistant";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/assistant-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC,
                 U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191,
                 U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Assistant";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("../fonts/assistant-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                 U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020,
                 U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- 1. Design tokens ---------- */
:root {
  --maroon:        #8A1538;
  --maroon-dark:   #5e0e26;
  --gold:          #E0A82E;
  --gold-light:    #f0c65a;
  --charcoal:      #333333;
  --grey:          #666a70;
  --off-white:     #FAFAFA;
  --white:         #ffffff;
  --line:          #e7dfe2;

  /* Assistant (self-hosted) for the whole site — clean sans-serif, headings and body.
     System sans-serif stack as fallback keeps the site readable if the font fails to load. */
  --font-sans:  "Assistant", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-serif: var(--font-sans);

  --maxw: 1180px;
  --radius: 12px;
  --shadow-sm: 0 2px 8px rgba(40, 5, 18, 0.06);
  --shadow-md: 0 10px 30px rgba(40, 5, 18, 0.10);
  --transition: 0.25s ease;
}

/* ---------- 2. Base / reset ---------- */
* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-sans);
  color: var(--charcoal);
  background: var(--off-white);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-serif);
  color: var(--maroon);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
}

h1 { font-size: clamp(1.9rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.25rem; }

p { margin: 0 0 1.1em; text-align: justify; -webkit-hyphens: auto; hyphens: auto; }
/* Keep deliberately-centered text centered (overrides the justify default) */
.text-center p, p.text-center { text-align: center; hyphens: manual; }

a { color: var(--maroon); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--gold); }

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

/* Visible keyboard focus for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

/* Skip link for screen-reader / keyboard users */
.skip-link {
  position: absolute; left: -999px; top: 0; z-index: 1000;
  background: var(--maroon); color: #fff; padding: 10px 16px; border-radius: 0 0 8px 0;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- 3. Layout helpers ---------- */
.container { width: 90%; max-width: var(--maxw); margin: 0 auto; }
.section { padding: 72px 0; }
.section--tight { padding: 48px 0; }
.text-center { text-align: center; }
.lead { font-size: 1.15rem; color: var(--grey); }
.accent-bar { width: 72px; height: 4px; background: var(--gold); border: 0; margin: 0 0 24px; border-radius: 4px; }
.text-center .accent-bar { margin-left: auto; margin-right: auto; }

/* ---------- 4. Header + navigation ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: saturate(180%) blur(6px);
  border-bottom: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 12px 0;
}
.nav__logo img { height: 52px; width: auto; }

.nav__links {
  list-style: none; display: flex; flex-wrap: wrap; gap: 4px;
  margin: 0; padding: 0; align-items: center;
}
.nav__links a {
  display: block; padding: 10px 12px; border-radius: 8px;
  color: var(--charcoal); font-size: 0.94rem; font-weight: 600;
  white-space: nowrap;
}
.nav__links a:hover { background: var(--off-white); color: var(--maroon); }
/* Active page marker */
.nav__links a[aria-current="page"] {
  color: var(--maroon);
  box-shadow: inset 0 -3px 0 var(--gold);
  border-radius: 8px 8px 0 0;
}

/* Science dropdown */
.has-dropdown { position: relative; }
.nav__dropbtn {
  font: inherit; font-weight: 600; font-size: 0.94rem; color: var(--charcoal);
  background: none; border: 0; cursor: pointer; padding: 10px 12px; border-radius: 8px;
  display: inline-flex; align-items: center; gap: 7px; white-space: nowrap;
}
.nav__dropbtn:hover { background: var(--off-white); color: var(--maroon); }
.caret {
  width: 0; height: 0; border-left: 4px solid transparent; border-right: 4px solid transparent;
  border-top: 5px solid currentColor; transition: transform var(--transition);
}
/* Active marker when a Science page is open */
.has-dropdown.is-active > .nav__dropbtn {
  color: var(--maroon); box-shadow: inset 0 -3px 0 var(--gold); border-radius: 8px 8px 0 0;
}
.dropdown {
  list-style: none; margin: 0; padding: 8px;
  position: absolute; top: 100%; left: 0; min-width: 290px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-md); z-index: 120;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: var(--transition);
}
/* Reveal on hover, keyboard focus, or JS toggle */
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown,
.dropdown.is-open {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.has-dropdown:hover .caret,
.has-dropdown:focus-within .caret { transform: rotate(180deg); }
.dropdown a {
  display: block; padding: 10px 12px; border-radius: 8px; color: var(--charcoal);
  font-weight: 600; font-size: 0.92rem; white-space: nowrap;
}
.dropdown a:hover { background: var(--off-white); color: var(--maroon); }
.dropdown a[aria-current="page"] { color: var(--maroon); box-shadow: inset 3px 0 0 var(--gold); }

/* Hamburger toggle — hidden on desktop */
.nav__toggle {
  display: none; background: none; border: 0; cursor: pointer;
  padding: 10px; border-radius: 8px;
}
.nav__toggle span {
  display: block; width: 26px; height: 3px; margin: 5px 0;
  background: var(--maroon); border-radius: 3px; transition: var(--transition);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ---------- 5a. Hero (HOME PAGE ONLY) ---------- */
/* Light, whitespace-rich hero. Maroon is reserved for the heading/accents only. */
.hero {
  position: relative; color: var(--charcoal); overflow: hidden;
  background: linear-gradient(120deg, #ffffff 0%, var(--off-white) 60%, #f6efe1 100%);
  border-bottom: 1px solid var(--line);
}
.hero__inner {
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 48px; align-items: center;
  padding: 84px 0;
}
.hero h1 { color: var(--maroon); margin-bottom: 0.35em; }
.hero .tagline {
  font-family: var(--font-sans); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold);
  margin-bottom: 22px;
}
.hero p { color: var(--grey); }
.hero__quote {
  border-left: 3px solid var(--gold); padding: 4px 0 4px 18px; margin: 26px 0 0;
  font-family: var(--font-serif); font-style: italic; font-size: 1.1rem; color: var(--charcoal);
}
.hero__quote cite { display: block; font-style: normal; font-size: 0.9rem; color: var(--maroon); margin-top: 6px; }
.hero__media img { border-radius: var(--radius); box-shadow: var(--shadow-md); width: 100%; }

/* ---------- 5b. Compact page-title strip (ALL OTHER PAGES) ---------- */
/* Light strip with a slim gold underline; maroon used only for the title text. */
.page-head {
  background: var(--off-white);
  color: var(--charcoal); padding: 42px 0 36px;
  border-bottom: 3px solid var(--gold);
}
.page-head h1 { color: var(--maroon); margin: 0; }

/* ---------- 6. Buttons, cards, grids ---------- */
.btn {
  display: inline-block; padding: 12px 22px; border-radius: 40px;
  font-weight: 600; transition: var(--transition); cursor: pointer; border: 2px solid transparent;
}
.btn--primary { background: var(--gold); color: var(--maroon-dark); }
.btn--primary:hover { background: var(--gold-light); color: var(--maroon-dark); }
.btn--outline { border-color: #fff; color: #fff; }
.btn--outline:hover { background: #fff; color: var(--maroon); }

/* Card grid used on Home for the science areas + Products */
.card-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex; flex-direction: column;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.card__media { aspect-ratio: 3 / 2; background: var(--off-white); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; }
.card__body { padding: 22px 22px 26px; flex: 1; display: flex; flex-direction: column; }
.card__body h3 { margin-bottom: 8px; }
.card__body p { color: var(--grey); font-size: 0.97rem; flex: 1; }
.card__link {
  margin-top: 12px; font-weight: 700; color: var(--maroon);
  display: inline-flex; align-items: center; gap: 6px;
}
.card__link::after { content: "\2192"; transition: transform var(--transition); }
.card:hover .card__link::after { transform: translateX(4px); }

/* ---------- 7. Content blocks ---------- */
/* Two-column: text + image, used on the four science pages */
.feature {
  display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 48px; align-items: start;
}
.feature__media img {
  border-radius: var(--radius); box-shadow: var(--shadow-md);
  width: 100%; position: sticky; top: 96px;
}
.prose p:first-of-type::first-letter {
  font-family: var(--font-serif); font-size: 3.1rem; line-height: 0.8;
  float: left; color: var(--maroon); padding: 6px 10px 0 0;
}
.prose h2 { margin-top: 1.4em; }

/* Products grid */
.product-grid {
  display: grid; gap: 26px;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
/* Product card = clickable button showing image + name only */
.product {
  font: inherit; text-align: center; cursor: pointer; color: var(--charcoal);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm); display: flex; flex-direction: column;
  padding: 0; transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); border-color: var(--gold); }
.product__media {
  aspect-ratio: 1 / 1; background: #fff;
  display: flex; align-items: center; justify-content: center; padding: 14px;
  border-bottom: 1px solid var(--line);
}
.product__media img { max-height: 100%; width: auto; object-fit: contain; }

/* Shared vial photo shown as a plain empty tube.
   The original "CheminPharma" print is hidden by a soft, feathered patch that
   blends into the translucent tube wall (no name, no logo). */
.vial {
  position: relative; width: 100%; max-width: 380px; margin: 0 auto;
  aspect-ratio: 1 / 1;
}
.vial > img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vial__cover {
  position: absolute; left: 38%; top: 25%; width: 17%; height: 45%;
  background: linear-gradient(90deg,
    rgba(224, 230, 235, 0.85) 0%,
    rgba(245, 248, 250, 0.97) 48%,
    rgba(229, 234, 238, 0.9) 100%);
  border-radius: 12px;
  /* feather the patch edges (top/bottom and left/right) so it melts into the tube */
  -webkit-mask:
    linear-gradient(180deg, transparent 0%, #000 15%, #000 85%, transparent 100%),
    linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask:
    linear-gradient(180deg, transparent 0%, #000 15%, #000 85%, transparent 100%),
    linear-gradient(90deg, transparent 0%, #000 22%, #000 78%, transparent 100%);
          mask-composite: intersect;
}
.product__name { display: block; font-weight: 700; color: var(--maroon); font-size: 1.12rem; margin: 18px 16px 20px; }
.product__desc { color: var(--grey); font-size: 1rem; margin-bottom: 18px; }

/* Product details page: image + info side by side */
.pd-media {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-sm); aspect-ratio: 1 / 1;
  display: flex; align-items: center; justify-content: center; padding: 26px;
  position: sticky; top: 96px;
}
.pd-media img { max-width: 100%; max-height: 100%; width: auto; object-fit: contain; }
.pd-info h2 { color: var(--maroon); margin: 6px 0 12px; }
.pd-back { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; margin-bottom: 18px; }
.pd-back::before { content: "\2190"; }
@media (max-width: 900px) { .pd-media { position: static; } }
/* Specification list */
.specs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.specs li {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 0.9rem;
}
.specs .k { color: var(--grey); font-weight: 600; }
.specs .v { color: var(--charcoal); text-align: right; }
.tag {
  display: inline-block; align-self: flex-start; margin-bottom: 12px;
  background: rgba(224, 168, 46, 0.16); color: var(--maroon-dark);
  font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
  padding: 4px 10px; border-radius: 30px;
}
.note {
  background: var(--white); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 20px 24px; box-shadow: var(--shadow-sm); margin-top: 32px;
}
.note p { margin: 0; color: var(--grey); }

/* Careers */
.callout {
  background: var(--maroon); color: #fff; border-radius: var(--radius);
  padding: 32px 34px; box-shadow: var(--shadow-md); margin-top: 28px;
}
.callout h3 { color: #fff; }
.callout p { color: rgba(255,255,255,0.9); }
.callout a { color: var(--gold-light); font-weight: 700; }
.callout a:hover { color: #fff; }

/* Contact form (static / layout only) */
.contact-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.form {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 30px 30px 34px; box-shadow: var(--shadow-sm);
}
.form-row { margin-bottom: 18px; }
.form-row.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 6px; color: var(--charcoal); }
.form input, .form textarea {
  width: 100%; padding: 12px 14px; font: inherit; color: var(--charcoal);
  border: 1px solid var(--line); border-radius: 8px; background: var(--off-white);
  transition: border-color var(--transition), background var(--transition);
}
.form input:focus, .form textarea:focus { border-color: var(--gold); background: #fff; }
.form textarea { resize: vertical; min-height: 130px; }
.form .btn--primary { border: 0; width: 100%; font-size: 1rem; margin-top: 4px; }

.info-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 26px 28px; box-shadow: var(--shadow-sm); margin-bottom: 22px;
}
.info-card h3 { margin-bottom: 6px; }
.info-card p { margin: 0; color: var(--grey); }

/* ---------- 8. Footer ---------- */
.site-footer {
  background: #262626; color: rgba(255,255,255,0.78);
  padding: 54px 0 26px; margin-top: 8px;
  border-top: 3px solid var(--gold);
}
.footer-grid {
  display: grid; gap: 36px; grid-template-columns: 1.4fr 1fr 1fr;
}
.site-footer h4 { color: #fff; font-family: var(--font-sans); font-size: 0.95rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 16px; }
.footer-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.footer-brand img { height: 56px; width: auto; }
.footer-brand strong { color: #fff; font-family: var(--font-serif); font-size: 1.1rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin-bottom: 10px; }
.site-footer a { color: rgba(255,255,255,0.82); font-size: 0.95rem; }
.site-footer a:hover { color: var(--gold-light); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.15); margin-top: 40px; padding-top: 20px;
  font-size: 0.85rem; color: rgba(255,255,255,0.6);
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px;
}

/* ---------- 9. Responsive ---------- */
@media (max-width: 900px) {
  .hero__inner { grid-template-columns: 1fr; gap: 32px; padding: 60px 0; }
  .hero__media { order: -1; }
  .feature { grid-template-columns: 1fr; gap: 28px; }
  .feature__media img { position: static; }
  .contact-layout { grid-template-columns: 1fr; gap: 30px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  /* Collapse nav into a mobile drawer */
  .nav__toggle { display: block; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    max-height: 0; overflow: hidden; transition: max-height var(--transition);
  }
  .nav { position: relative; }
  .nav__links.is-open { max-height: 960px; }
  .nav__links > li { border-top: 1px solid var(--line); }
  .nav__links a { padding: 14px 18px; font-size: 1rem; }
  .nav__links a[aria-current="page"] { box-shadow: inset 4px 0 0 var(--gold); border-radius: 0; }

  /* Science dropdown collapses inline within the mobile drawer */
  .nav__dropbtn {
    width: 100%; justify-content: space-between; padding: 14px 18px;
    font-size: 1rem; border-radius: 0; color: var(--charcoal);
  }
  .has-dropdown.is-active > .nav__dropbtn { box-shadow: inset 4px 0 0 var(--gold); border-radius: 0; }
  .dropdown {
    position: static; box-shadow: none; border: 0; border-radius: 0; padding: 0; min-width: 0;
    background: #fbf6f8; transform: none;
    max-height: 0; overflow: hidden; transition: max-height var(--transition);
  }
  /* Only the JS toggle (.is-open) expands it on mobile — not hover/focus */
  .has-dropdown:hover .dropdown,
  .has-dropdown:focus-within .dropdown { visibility: visible; opacity: 1; }
  .dropdown.is-open { max-height: 480px; }
  .dropdown a { padding: 12px 30px; font-size: 0.95rem; }
  .dropdown li { border-top: 1px solid var(--line); }
  .nav__dropbtn[aria-expanded="true"] .caret { transform: rotate(180deg); }
}

@media (max-width: 560px) {
  body { font-size: 16px; }
  .section { padding: 52px 0; }
  .form-row.two { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav__logo img { height: 44px; }
}

/* Respect users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
