/* ===========================================================================
   Somepharm — clinical editorial
   Paper + deep green ink, Fraunces display, Geist body, Geist Mono specs
   =========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght@0,9..144,300..700;1,9..144,300..600&family=Geist:wght@300..700&family=Geist+Mono:wght@400;500&display=swap');

:root {
  --paper:      #f4f1e9;
  --paper-2:    #efeae0;
  --ink:        #0e1f17;
  --ink-soft:   #3c4a42;
  --ink-faint:  #6b7770;
  --green:      #0f5132;
  --green-2:    #157347;
  --mint:       #d7e9dd;
  --accent:     #c8643b; /* terracotta — clinical warmth, not slop */
  --line:       #ddd6c8;
  --line-2:     #cfc7b6;
  --white:      #fbf9f4;

  --shadow:     0 22px 60px -28px rgba(14, 31, 23, .35);
  --shadow-sm:  0 6px 22px -14px rgba(14, 31, 23, .4);

  --display: "Fraunces", Georgia, serif;
  --sans:    "Geist", -apple-system, sans-serif;
  --mono:    "Geist Mono", ui-monospace, monospace;

  --pad: clamp(20px, 6vw, 92px);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.6;
  /* subtle paper grain */
  background-image:
    radial-gradient(circle at 1px 1px, rgba(14,31,23,.025) 1px, transparent 0);
  background-size: 22px 22px;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }

/* ---- shared type --------------------------------------------------------- */
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--green-2);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.kicker::before {
  content: "";
  width: 26px;
  height: 1px;
  background: var(--green-2);
}

h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.04; }

/* ---- buttons ------------------------------------------------------------- */
.btn {
  --bg: var(--green);
  --fg: var(--white);
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--bg);
  color: var(--fg);
  padding: 14px 22px;
  border-radius: 2px;
  border: 1px solid var(--bg);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .04em;
  font-weight: 500;
  cursor: pointer;
  transition: transform .25s cubic-bezier(.2,.8,.2,1), background .25s, color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.btn .arrow { transition: transform .25s; }
.btn:hover .arrow { transform: translateX(4px); }
.btn.ghost { --bg: transparent; --fg: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { --bg: var(--ink); --fg: var(--white); border-color: var(--ink); }
.btn.small { padding: 10px 14px; font-size: 12px; }

/* ===========================================================================
   HEADER
   =========================================================================== */
header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 16px var(--pad);
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: blur(12px) saturate(1.1);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 13px; }
.brand img { width: 46px; height: 46px; object-fit: contain; }
.brand b { font-family: var(--display); font-size: 22px; letter-spacing: -.01em; display: block; line-height: 1; }
.brand small {
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--green-2);
}
nav { display: flex; gap: 30px; }
nav a {
  font-size: 14.5px;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
nav a::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 0; height: 1.5px; background: var(--green);
  transition: width .3s cubic-bezier(.2,.8,.2,1);
}
nav a:hover { color: var(--ink); }
nav a:hover::after { width: 100%; }
.nav-cta { display: flex; align-items: center; gap: 14px; }

.burger { display: none; background: none; border: 0; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 24px; height: 2px; background: var(--ink); margin: 5px 0; transition: .3s; }

/* ===========================================================================
   HERO
   =========================================================================== */
.hero {
  display: grid;
  grid-template-columns: 1.05fr .95fr;
  gap: clamp(30px, 5vw, 70px);
  align-items: center;
  padding: clamp(54px, 8vw, 104px) var(--pad) clamp(40px, 6vw, 80px);
  position: relative;
}
.hero h1 {
  font-size: clamp(44px, 7vw, 86px);
  letter-spacing: -.025em;
  margin: 22px 0 26px;
}
.hero h1 em { font-style: italic; color: var(--green-2); }
.hero .lead { font-size: clamp(17px, 1.5vw, 20px); color: var(--ink-soft); max-width: 46ch; }
.hero .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.hero-media { position: relative; }
.hero-media .frame {
  border-radius: 3px;
  overflow: hidden;
  border: 1px solid var(--line-2);
  box-shadow: var(--shadow);
  aspect-ratio: 4 / 5;
  background: var(--paper-2);
}
.hero-media .frame img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.96) contrast(1.02); }
.hero-media .badge {
  position: absolute;
  bottom: -22px; left: -22px;
  background: var(--ink);
  color: var(--white);
  padding: 18px 22px;
  border-radius: 3px;
  box-shadow: var(--shadow);
}
.hero-media .badge b { font-family: var(--display); font-size: 34px; display: block; line-height: 1; }
.hero-media .badge span { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); }

/* ===========================================================================
   MARQUEE / segments band
   =========================================================================== */
.band {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  background: var(--white);
}
.marquee { display: flex; gap: 0; white-space: nowrap; animation: slide 32s linear infinite; }
.marquee:hover { animation-play-state: paused; }
.marquee span {
  font-family: var(--display);
  font-style: italic;
  font-size: 30px;
  padding: 20px 42px;
  color: var(--ink-soft);
  display: inline-flex;
  align-items: center;
  gap: 42px;
}
.marquee span::after { content: "✦"; color: var(--green-2); font-style: normal; font-size: 16px; }
@keyframes slide { to { transform: translateX(-50%); } }

/* ===========================================================================
   STATS
   =========================================================================== */
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: clamp(40px,6vw,72px) var(--pad);
}
.stats .stat { padding: 6px 28px; border-left: 1px solid var(--line-2); }
.stats .stat:first-child { padding-left: 0; border-left: 0; }
.stats .stat b { font-family: var(--display); font-size: clamp(40px,5vw,58px); display: block; line-height: 1; letter-spacing: -.02em; }
.stats .stat span { font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-faint); margin-top: 12px; display: block; }

/* ===========================================================================
   SECTION scaffold
   =========================================================================== */
section { padding: clamp(46px,7vw,96px) var(--pad); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 48px; flex-wrap: wrap; }
.section-head h2 { font-size: clamp(34px,4.5vw,56px); letter-spacing: -.025em; max-width: 16ch; }
.section-head p { color: var(--ink-soft); max-width: 38ch; }

/* ---- categories ---------------------------------------------------------- */
.cats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; border-top: 1px solid var(--line-2); }
.cat {
  border-left: 1px solid var(--line);
  padding: 26px 22px 30px;
  cursor: pointer;
  position: relative;
  transition: background .3s;
  overflow: hidden;
}
.cat:first-child { border-left: 0; }
.cat:hover { background: var(--white); }
.cat .idx { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); }
.cat h3 { font-size: 24px; margin: 56px 0 10px; letter-spacing: -.01em; }
.cat .count { font-family: var(--mono); font-size: 12.5px; color: var(--green-2); letter-spacing: .04em; }
.cat .go { margin-top: 18px; font-size: 13px; color: var(--ink-faint); display: inline-flex; gap: 7px; transition: gap .25s, color .25s; }
.cat:hover .go { gap: 13px; color: var(--ink); }

/* ===========================================================================
   PRODUCTS
   =========================================================================== */
#produits { background: var(--paper-2); }
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 34px;
}
.filters { display: flex; gap: 8px; flex-wrap: wrap; }
.filters button {
  border: 1px solid var(--line-2);
  background: transparent;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 9px 16px;
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: .03em;
  cursor: pointer;
  transition: all .22s;
}
.filters button:hover { border-color: var(--green-2); color: var(--ink); }
.filters button.active { background: var(--green); border-color: var(--green); color: var(--white); }

.search { position: relative; }
.search input {
  font-family: var(--sans);
  font-size: 14px;
  padding: 11px 16px 11px 40px;
  width: 250px;
  max-width: 60vw;
  border: 1px solid var(--line-2);
  border-radius: 999px;
  background: var(--white);
  color: var(--ink);
  outline: none;
  transition: border-color .22s, box-shadow .22s;
}
.search input:focus { border-color: var(--green-2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green-2) 14%, transparent); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-faint); }

.count-line { font-family: var(--mono); font-size: 12px; color: var(--ink-faint); letter-spacing: .06em; margin-bottom: 22px; }

.products { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }

.product {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .3s cubic-bezier(.2,.8,.2,1), box-shadow .3s, border-color .3s;
}
.product:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--line-2); }
.product .ph { position: relative; aspect-ratio: 16 / 11; overflow: hidden; background: var(--paper-2); }
.product .ph img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2,.8,.2,1); }
.product:hover .ph img { transform: scale(1.05); }
.product .tag {
  position: absolute; top: 12px; left: 12px;
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  background: color-mix(in srgb, var(--ink) 88%, transparent); color: var(--white);
  padding: 5px 10px; border-radius: 2px; backdrop-filter: blur(4px);
}
.product .body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.product h3 { font-size: 20px; letter-spacing: -.01em; margin: 0 0 9px; }
.product .desc { color: var(--ink-soft); font-size: 14.5px; line-height: 1.55; }
.product .spec {
  font-family: var(--mono);
  font-size: 11.5px;
  color: var(--ink-faint);
  line-height: 1.5;
  margin: 16px 0 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}
.product .req { margin-top: auto; }
.product .req a { font-family: var(--mono); font-size: 12.5px; color: var(--green-2); display: inline-flex; gap: 8px; align-items: center; }
.product .req a:hover { color: var(--green); }
.product .req .arrow { transition: transform .25s; }
.product .req a:hover .arrow { transform: translateX(4px); }

.empty { grid-column: 1/-1; text-align: center; padding: 60px 0; color: var(--ink-faint); font-family: var(--mono); font-size: 14px; }

/* ===========================================================================
   CATALOGUE CTA
   =========================================================================== */
.catalogue {
  background: var(--ink);
  color: var(--paper);
  border-radius: 4px;
  padding: clamp(40px,6vw,72px);
  display: grid;
  grid-template-columns: 1.2fr .8fr;
  gap: 40px;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.catalogue::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(60% 120% at 90% 10%, rgba(21,115,71,.4), transparent 60%);
  pointer-events: none;
}
.catalogue h2 { font-size: clamp(32px,4vw,50px); letter-spacing: -.02em; margin: 18px 0 16px; position: relative; }
.catalogue p { color: var(--mint); max-width: 44ch; position: relative; }
.catalogue .kicker { color: var(--mint); }
.catalogue .kicker::before { background: var(--mint); }
.catalogue .cta-side { text-align: right; position: relative; }
.catalogue .btn { --bg: var(--paper); --fg: var(--ink); border-color: var(--paper); }
.catalogue .btn:hover { --bg: var(--white); }

/* ===========================================================================
   ABOUT / timeline
   =========================================================================== */
#apropos { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(40px,6vw,80px); align-items: start; }
#apropos .lead-text p { font-size: clamp(18px,1.8vw,22px); line-height: 1.55; color: var(--ink); margin: 0 0 22px; font-family: var(--display); font-weight: 300; }
#apropos .lead-text .sub { font-family: var(--sans); font-size: 16px; color: var(--ink-soft); }
.values { display: grid; gap: 2px; border-top: 1px solid var(--line-2); }
.value { padding: 22px 4px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 40px 1fr; gap: 18px; }
.value .n { font-family: var(--mono); font-size: 12px; color: var(--green-2); padding-top: 4px; }
.value h4 { margin: 0 0 6px; font-family: var(--display); font-size: 21px; font-weight: 400; }
.value p { margin: 0; color: var(--ink-soft); font-size: 15px; }

/* ===========================================================================
   FOOTER
   =========================================================================== */
footer {
  background: var(--ink);
  color: var(--paper);
  padding: clamp(54px,7vw,90px) var(--pad) 40px;
}
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; }
.foot-brand b { font-family: var(--display); font-size: 30px; display: block; }
.foot-brand small { font-family: var(--mono); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--mint); }
.foot-brand p { color: color-mix(in srgb, var(--mint) 75%, var(--paper)); max-width: 34ch; margin-top: 16px; font-size: 15px; }
footer h5 { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--mint); margin: 0 0 16px; font-weight: 500; }
footer .col a, footer .col p { display: block; color: color-mix(in srgb, var(--paper) 85%, transparent); margin: 0 0 10px; font-size: 15px; }
footer .col a:hover { color: var(--white); }
.foot-bottom {
  margin-top: clamp(40px,6vw,72px);
  padding-top: 26px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .04em;
  color: color-mix(in srgb, var(--mint) 60%, var(--paper));
}

/* ===========================================================================
   reveal-on-scroll
   =========================================================================== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }

/* ===========================================================================
   RESPONSIVE
   =========================================================================== */
@media (max-width: 1040px) {
  .cats { grid-template-columns: repeat(2, 1fr); }
  .cat:nth-child(3) { border-left: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 30px 0; }
  .stats .stat:nth-child(3) { border-left: 0; padding-left: 0; }
}
@media (max-width: 860px) {
  nav, .nav-cta .btn { display: none; }
  .burger { display: block; }
  .hero { grid-template-columns: 1fr; }
  .hero-media { order: -1; max-width: 420px; }
  .products { grid-template-columns: repeat(2, 1fr); }
  .catalogue { grid-template-columns: 1fr; }
  .catalogue .cta-side { text-align: left; }
  #apropos { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }

  /* mobile drawer */
  nav.open {
    display: flex; flex-direction: column; gap: 0;
    position: fixed; inset: 64px 0 auto 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 24px; z-index: 49;
  }
  nav.open a { padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 18px; }
}
@media (max-width: 540px) {
  .products { grid-template-columns: 1fr; }
  .cats { grid-template-columns: 1fr; }
  .cat { border-left: 0; }
  .stats { grid-template-columns: 1fr 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .hero-media .badge { left: 0; }
}
