/* ============================================================================
   Saanjh — botanical skincare, Haldwani.
   Cool dusk palette (indigo + a single marigold), editorial serif display,
   monospace data, the specimen label as the signature element.
   One self-contained stylesheet. No shared tokens with the other two sites.
   ========================================================================== */

/* ---- 1. tokens ----------------------------------------------------------- */

:root {
  /* palette — verbatim from the spec ("cool dusk, not warm cream") */
  --night:    #1E1B31;  /* indigo-black — text, footer */
  --dusk:     #3B3560;  /* mid indigo — secondary surfaces */
  --haze:     #E8E4EE;  /* cool pale lilac-grey — PAGE BACKGROUND */
  --paper:    #F5F3F7;  /* lighter panel */
  --marigold: #E0A32E;  /* accent — sparingly */
  --sage:     #8A9A7B;  /* secondary accent — ingredient tags */
  --rule:     #C7C1D4;  /* hairlines */

  /* type */
  --font-display: 'Instrument Serif', Georgia, 'Times New Roman', serif;
  --font-body:    'Karla', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --font-mono:    'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-h1: clamp(2.75rem, 1.1rem + 5.4vw, 5.5rem);   /* 44 -> 88 */
  --fs-h2: clamp(2rem, 1.35rem + 2.1vw, 3rem);        /* ~32 -> 48 */
  --fs-h3: clamp(1.5rem, 1.2rem + 1vw, 2rem);
  --fs-body: 1.0625rem;    /* 17px */
  --fs-lead: 1.1875rem;    /* 19px */
  --fs-mono: 0.72rem;      /* ~11.5px */

  /* layout */
  --measure: 1080px;
  --gutter: max(1.25rem, (100vw - var(--measure)) / 2);

  /* chat widget skin (consumed by shared/chat-widget.css) */
  --chat-bg: #F5F3F7;
  --chat-fg: #1E1B31;
  --chat-accent: #3B3560;
  --chat-accent-fg: #E8E4EE;
  --chat-bubble-user: #E0A32E;
  --chat-bubble-bot: #FFFFFF;
  --chat-radius: 2px;
  --chat-font: 'Karla', sans-serif;
  --chat-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='9' y='1.5' width='6' height='6' rx='2.2'/%3E%3Crect x='10.25' y='7' width='3.5' height='8'/%3E%3Cpath d='M10.25 15 H13.75 L12 18.5 Z'/%3E%3Cpath d='M12 19.4c1.15 1.4 2 2.4 2 3.3a2 2 0 1 1-4 0c0-.9.85-1.9 2-3.3z'/%3E%3C/svg%3E");
}

/* ---- 2. base ------------------------------------------------------------- */

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: 1.65;
  color: var(--night);
  background: var(--haze);
  overflow-x: clip;   /* contains the hero bleed without breaking sticky */
}

/* all content photography graded to one cool, slightly-desaturated shoot */
.graded { filter: saturate(0.9) contrast(1.03); }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1;
}

h1 { font-size: var(--fs-h1); line-height: 0.98; }
h2 { font-size: var(--fs-h2); line-height: 1.02; }
h3 { font-size: var(--fs-h3); line-height: 1.05; }

a { color: inherit; }

::selection { background: var(--marigold); color: var(--night); }

:focus-visible {
  outline: 2px solid var(--dusk);
  outline-offset: 3px;
  border-radius: 1px;
}

/* mono utility for all data: batch numbers, sizes, percentages, prices */
.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dusk);
}

/* ---- 3. layout primitives ----------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: 1.25rem;
}

.section { padding-block: clamp(3.5rem, 8vw, 6.5rem); }

.section__head { max-width: 46ch; margin-bottom: clamp(2rem, 4vw, 3rem); }
.section__head p { margin-top: 1rem; color: var(--dusk); }

/* ---- 4. specimen label (the signature element) -------------------------- */

.specimen {
  border: 1px solid var(--rule);
  background: none;              /* no fill — printed onto the bottle */
  border-radius: 2px;
  padding: 0.9rem 1.1rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  line-height: 1.95;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--night);
}

.specimen__row {
  display: flex;
  align-items: baseline;
}

.specimen__row dt { order: 0; white-space: nowrap; }

.specimen__row dd {
  order: 2;
  margin: 0;
  text-align: right;
  white-space: nowrap;
}

/* the dotted leader: a flex item (::after) pulled between dt and dd via order */
.specimen__row::after {
  content: "";
  order: 1;
  flex: 1 1 auto;
  margin: 0 0.6ch;
  border-bottom: 1px dotted var(--rule);
  transform: translateY(-0.28em);   /* sit the dots on the text baseline */
}

/* ---- 5. masthead --------------------------------------------------------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: 100;
  background: transparent;
  transition: background 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
  border-bottom: 1px solid transparent;
}

.masthead.is-stuck {
  background: var(--haze);
  border-bottom-color: var(--rule);
}

.masthead__inner {
  max-width: var(--measure);
  margin-inline: auto;
  padding: 0.7rem 1.25rem;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1.5rem;
}

.brand { display: grid; gap: 0.1rem; }
.brand__mark {
  font-family: var(--font-display);
  font-size: 1.5rem;      /* 24px */
  line-height: 1;
  letter-spacing: -0.01em;
  text-decoration: none;
}
.brand__origin { color: var(--dusk); }

.nav {
  display: flex;
  gap: 1.4rem;
  justify-content: center;
}
.nav a {
  font-weight: 500;
  font-size: 0.875rem;    /* 14px */
  text-decoration: none;
  color: var(--night);
}
.nav a:hover { text-decoration: underline; text-underline-offset: 0.25em; }

.cart {
  font-weight: 500;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
}
.cart b { font-weight: 700; }

/* ---- 6. hero ------------------------------------------------------------- */

.hero {
  display: grid;
  grid-template-columns: var(--gutter) minmax(0, 626px) minmax(0, 1fr);
  align-items: center;
  column-gap: clamp(1.5rem, 4vw, 3.5rem);
  padding-block: clamp(2.5rem, 6vw, 5rem);
}

.hero__text {
  grid-column: 2;
  max-width: 34rem;
  padding-block: 1rem;
}

.hero__eyebrow { margin-bottom: 1.25rem; }

.hero__title { margin-bottom: 1.5rem; }

.hero__lead {
  font-size: var(--fs-lead);
  max-width: 40ch;
  margin-bottom: 1.75rem;
}

.hero .specimen { max-width: 24rem; margin-bottom: 1.75rem; }

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 1.5rem;
  margin-bottom: 1rem;
}

.hero__ask { margin-top: 0.25rem; }

.hero__media {
  grid-column: 3;
  align-self: stretch;
}
.hero__media img {
  width: 100%;
  height: 62vh;
  min-height: 380px;
  object-fit: cover;
  display: block;
}

/* buttons / links */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 0.85rem 1.3rem;
  border-radius: 2px;
  border: 1px solid transparent;
  transition: transform 140ms ease, background 140ms ease;
}
.btn--primary { background: var(--marigold); color: var(--night); }
.btn--primary:hover { transform: translateY(-2px); }

.link-under {
  text-decoration: underline;
  text-underline-offset: 0.25em;
  text-decoration-color: var(--rule);
  font-weight: 500;
}
.link-arrow {
  font-weight: 500;
  color: var(--dusk);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--marigold);
}
.link-arrow:hover { color: var(--night); }

/* ---- 7. claim strip ------------------------------------------------------ */

.claim {
  background: var(--dusk);
  color: var(--haze);
}
.claim__inner {
  max-width: var(--measure);
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 2.75rem) 1.25rem;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.claim__item {
  padding: 0.25rem clamp(1rem, 3vw, 2rem);
  border-left: 1px solid rgb(255 255 255 / 0.22);
}
.claim__item:first-child { border-left: 0; padding-left: 0; }
.claim__label {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--marigold);
  margin-bottom: 0.6rem;
}
.claim__text { font-size: 1.0625rem; line-height: 1.45; }

/* ---- 8. the range -------------------------------------------------------- */

.range__grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  grid-template-areas:
    "p1 p2"
    "p1 p3"
    "p4 p4";
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.product--1 { grid-area: p1; }
.product--2 { grid-area: p2; }
.product--3 { grid-area: p3; }
.product--4 { grid-area: p4; }

.product { display: flex; flex-direction: column; }
.product__media {
  overflow: hidden;
  border-radius: 2px;
  margin-bottom: 1rem;
  background: var(--paper);
}
.product__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.product--1 .product__media { aspect-ratio: 4 / 5; }
.product--2 .product__media,
.product--3 .product__media { aspect-ratio: 3 / 2; }
.product--4 .product__media { aspect-ratio: 21 / 9; }

.product__meta {
  display: flex;
  gap: 0.75rem;
  align-items: baseline;
  margin-bottom: 0.4rem;
}
.product__size { color: var(--dusk); }
.product__price {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--marigold);
  margin-left: auto;
}
.product__name {
  font-size: clamp(1.6rem, 1.3rem + 1.2vw, 2.2rem);
  margin-bottom: 0.5rem;
}
.product--1 .product__name { font-size: clamp(1.9rem, 1.4rem + 1.8vw, 2.7rem); }
.product__desc { margin-bottom: 0.6rem; max-width: 46ch; }
.product__for {
  color: var(--sage);
  font-weight: 500;
  font-size: 0.95rem;
}
.product__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dusk);
  margin-bottom: 0.75rem;
}
.product__tag::before {
  content: "";
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--marigold);   /* in-stock dot */
}

/* sold-out card */
.product--soldout .product__media img { opacity: 0.55; }
.product--soldout .product__price { color: var(--dusk); text-decoration: line-through; }
.product--soldout .product__tag { color: var(--night); }
.product--soldout .product__tag::before { background: var(--sage); }
.product--4 { grid-template-columns: none; }
.product--4 .product__body { max-width: 60ch; }

.notify {
  align-self: flex-start;
  margin-top: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.6rem 1rem;
  border: 1px solid var(--night);
  border-radius: 2px;
  color: var(--night);
  transition: background 140ms ease, color 140ms ease;
}
.notify:hover { background: var(--night); color: var(--haze); }

/* the full-width sold-out card lays out as image + text side by side on desktop */
@media (min-width: 720px) {
  .product--4 {
    display: grid;
    grid-template-columns: 0.42fr 0.58fr;
    gap: clamp(1.5rem, 3vw, 2.5rem);
    align-items: center;
  }
  .product--4 .product__media { margin-bottom: 0; aspect-ratio: 4 / 3; height: 100%; }
}

/* ---- 9. deep-dive -------------------------------------------------------- */

.formula__grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(1.75rem, 4vw, 3.5rem);
  align-items: start;
}
.formula__media { position: sticky; top: 5rem; }
.formula__media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  border-radius: 2px;
}

.formula__sub { margin-top: 0.75rem; color: var(--dusk); }

.formula__table { margin: 1.75rem 0; }
.formula__table caption { text-align: left; }
.formula__table th,
.formula__table td {
  text-align: left;
  padding: 0.7rem 0.5rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}
.formula__table thead th {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dusk);
}
.formula__table .pct {
  font-family: var(--font-mono);
  font-weight: 500;
  color: var(--marigold);
  white-space: nowrap;
  width: 4rem;
}
.formula__table .ingredient { font-weight: 500; }
.formula__table .ingredient i { font-weight: 400; color: var(--dusk); }
.formula__table .role { color: var(--sage); font-size: 0.95rem; }

.usage { margin-top: 2rem; display: grid; gap: 1.5rem; }
.usage h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dusk);
  margin-bottom: 0.4rem;
}
.usage p { max-width: 54ch; }
.usage [data-chat-prefill] {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--marigold);
}

.formula .specimen { margin-top: 2rem; max-width: 30rem; }

/* ---- 10. sourcing -------------------------------------------------------- */

.sourcing__band {
  display: grid;
  grid-template-columns: 3fr 2fr;   /* 60/40, fr so the gap doesn't overflow */
  gap: 0.5rem;
}
.sourcing__band img {
  width: 100%;
  height: clamp(260px, 42vw, 520px);
  object-fit: cover;
  display: block;
}

.sourcing__body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: clamp(2rem, 4vw, 3rem);
  align-items: start;
}
.sourcing__body h2 { grid-column: 1 / -1; margin-bottom: 0.5rem; }
.sourcing__body p { max-width: 42ch; }
.sourcing .specimen { grid-column: 1 / -1; max-width: 34rem; margin-top: 0.5rem; }

/* ---- 11. reviews --------------------------------------------------------- */

.reviews__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}
.review {
  border-top: 2px solid var(--night);
  padding-top: 1rem;
  margin: 0;
}
.review:nth-child(2) { margin-top: 2.5rem; }
.review:nth-child(3) { margin-top: 1.25rem; }
.review__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dusk);
  margin-bottom: 0.9rem;
  line-height: 1.6;
}
.review__meta b { color: var(--night); }
.review p { font-size: 1.05rem; line-height: 1.6; }
.review cite { font-style: normal; }

/* ---- 12. practical strip ------------------------------------------------- */

.practical {
  background: var(--night);
  color: var(--haze);
}
.practical__inner {
  max-width: var(--measure);
  margin-inline: auto;
  padding: clamp(2.5rem, 5vw, 4rem) 1.25rem;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
}
.practical dl { margin: 0; }
.practical dt {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--marigold);
  margin-bottom: 0.75rem;
}
.practical dd { margin: 0; color: var(--haze); font-size: 0.98rem; line-height: 1.55; }
.practical dd a { color: inherit; }
.practical [data-chat-prefill] {
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-color: var(--marigold);
}

/* ---- 13. footer ---------------------------------------------------------- */

.footer {
  background: var(--night);
  color: var(--haze);
  text-align: center;
  padding: clamp(2.5rem, 5vw, 3.5rem) 1.25rem;
  border-top: 1px solid rgb(255 255 255 / 0.12);
}
.footer__mark {
  font-family: var(--font-display);
  font-size: 2rem;
  line-height: 1;
  margin-bottom: 1rem;
  display: block;
}
.footer__line { font-size: 0.9rem; color: rgb(232 228 238 / 0.75); }
.footer__links {
  margin-top: 1rem;
  display: flex;
  gap: 1.25rem;
  justify-content: center;
  flex-wrap: wrap;
  font-size: 0.85rem;
}
.footer__links a { color: inherit; text-decoration: none; }
.footer__links a:hover { text-decoration: underline; text-underline-offset: 0.2em; }

/* ---- 14. scroll reveal --------------------------------------------------- */

/* gated on .js so the page is fully visible if JS never runs */
.js .reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 400ms ease, transform 400ms ease;
  transition-delay: var(--reveal-delay, 0ms);
}
.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---- 15. responsive ------------------------------------------------------ */

@media (max-width: 900px) {
  .formula__grid { grid-template-columns: 1fr; }
  .formula__media { position: static; max-width: 26rem; }
  .reviews__grid { grid-template-columns: 1fr 1fr; }
  .review:nth-child(n) { margin-top: 0; }
}

@media (max-width: 768px) {
  .masthead__inner { grid-template-columns: auto auto; gap: 0.75rem 1rem; }
  .nav { display: none; }

  .hero {
    grid-template-columns: 1fr;
    row-gap: 2rem;
  }
  .hero__text { grid-column: 1; max-width: none; }
  .hero__media { grid-column: 1; }
  .hero__media img { height: 46vh; min-height: 300px; }

  .claim__inner { grid-template-columns: 1fr; gap: 1.5rem; }
  .claim__item { border-left: 0; border-top: 1px solid rgb(255 255 255 / 0.22); padding: 1rem 0 0; }
  .claim__item:first-child { border-top: 0; padding-top: 0; }

  .range__grid {
    grid-template-columns: 1fr;
    grid-template-areas: "p1" "p2" "p3" "p4";
  }
  .product--4 { display: flex; }

  .sourcing__band { grid-template-columns: 1fr; }
  .sourcing__body { grid-template-columns: 1fr; }

  .reviews__grid { grid-template-columns: 1fr; }

  .practical__inner { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 460px) {
  .practical__inner { grid-template-columns: 1fr; }
  .product__meta { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .masthead { transition: none; }
  .btn, .notify, .product__media img { transition: none; }
}
