/* ==========================================================================
   HIPO — Himalayan Indigenous Producers Organisation
   hipohimalaya.com
   Design system: editorial, earthy. Palette sampled from the HIPO logo.
   ========================================================================== */

/* --- Tokens ------------------------------------------------------------- */
:root {
  /* Brand — sampled directly from the logo artwork */
  --green:        #234927;
  --green-deep:   #17301A;
  --teal:         #014F50;
  --teal-deep:    #013537;
  --terracotta:   #E0461A;
  --gold:         #D48A01;
  --navy:         #0F1433;

  /* Surfaces */
  --paper:        #FBF7EF;
  --paper-warm:   #F4EDE0;
  --paper-deep:   #EBE1CE;
  --ink:          #1B1A16;
  --ink-soft:     #4A4740;
  --ink-faint:    #7A756A;
  --rule:         #DBD2BF;
  --rule-strong:  #C4B79C;

  /* Type */
  --serif: "Fraunces", "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* Rhythm */
  --measure: 68ch;
  --shell: 1200px;
  --shell-narrow: 860px;
  --gutter: clamp(1.25rem, 5vw, 4rem);
  --section-y: clamp(4.5rem, 9vw, 8.5rem);

  --radius: 2px;
  --shadow-soft: 0 1px 2px rgba(27, 26, 22, .04), 0 12px 32px -18px rgba(27, 26, 22, .35);
}

/* --- Reset -------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  font-feature-settings: "kern" 1;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: inherit; }

/* --- Typography --------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 .6em;
  font-variation-settings: "SOFT" 0, "WONK" 0;
  text-wrap: balance;
}
h1 { font-size: clamp(2.6rem, 6.2vw, 4.6rem); }
h2 { font-size: clamp(1.95rem, 3.9vw, 3rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.55rem); line-height: 1.2; }
h4 { font-size: 1.0625rem; font-family: var(--sans); font-weight: 600; letter-spacing: 0; }
p  { margin: 0 0 1.15em; max-width: var(--measure); }
p:last-child { margin-bottom: 0; }

.kicker {
  font-family: var(--sans);
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--terracotta);
  margin: 0 0 1.4rem;
  display: flex;
  align-items: center;
  gap: .75rem;
}
.kicker::before {
  content: "";
  width: 28px; height: 1px;
  background: currentColor;
  flex: none;
}
.lede { font-size: clamp(1.15rem, 1.7vw, 1.35rem); line-height: 1.55; color: var(--ink-soft); }
.small { font-size: .9375rem; color: var(--ink-soft); }
.tnum { font-variant-numeric: tabular-nums; }

/* --- Layout ------------------------------------------------------------- */
.shell { width: 100%; max-width: var(--shell); margin-inline: auto; padding-inline: var(--gutter); }
.shell--narrow { max-width: var(--shell-narrow); }
.section { padding-block: var(--section-y); position: relative; }
.section--tight { padding-block: clamp(3rem, 6vw, 5rem); }

.grid { display: grid; gap: clamp(1.5rem, 3vw, 2.75rem); }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--split { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: clamp(2rem, 5vw, 5rem); }
@media (max-width: 860px) {
  .grid--2, .grid--3, .grid--split { grid-template-columns: minmax(0, 1fr); }
}

.stack > * + * { margin-top: 1.15em; }
.section-head { max-width: 46rem; margin-bottom: clamp(2.5rem, 5vw, 4rem); }

/* --- Tone blocks -------------------------------------------------------- */
.tone-warm  { background: var(--paper-warm); }
.tone-deep  { background: var(--teal-deep); color: #EFE9DC; }
.tone-green { background: var(--green-deep); color: #EDE8DA; }
.tone-deep .kicker, .tone-green .kicker { color: var(--gold); }
.tone-deep .lede, .tone-green .lede,
.tone-deep .small, .tone-green .small { color: rgba(239, 233, 220, .78); }

/* --- Header ------------------------------------------------------------- */
.masthead {
  position: sticky; top: 0; z-index: 60;
  background: rgba(251, 247, 239, .88);
  backdrop-filter: saturate(150%) blur(12px);
  -webkit-backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease, background .25s ease;
}
.masthead.is-stuck { border-bottom-color: var(--rule); }
.masthead__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; min-height: 76px;
}
.brand { display: flex; align-items: center; gap: .7rem; text-decoration: none; flex: none; }
.brand img { width: 46px; height: auto; }
.brand__name {
  font-family: var(--serif); font-size: 1.5rem; line-height: 1;
  letter-spacing: .01em; color: var(--teal); font-weight: 600;
}
.brand__sub {
  display: block; font-family: var(--sans); font-size: .58rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
  margin-top: .28rem;
}
@media (max-width: 520px) { .brand__sub { display: none; } .brand img { width: 40px; } }

.nav { display: flex; align-items: center; gap: clamp(1rem, 2.4vw, 2.1rem); }
.nav a {
  text-decoration: none; font-size: .9375rem; font-weight: 500; color: var(--ink-soft);
  padding-block: .35rem; position: relative; white-space: nowrap;
}
.nav a::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 1px;
  background: var(--terracotta); transform: scaleX(0); transform-origin: left;
  transition: transform .28s cubic-bezier(.2,.7,.3,1);
}
.nav a:hover { color: var(--ink); }
.nav a:hover::after, .nav a[aria-current="page"]::after { transform: scaleX(1); }
.nav a[aria-current="page"] { color: var(--teal); font-weight: 600; }
.nav a.btn { color: #FBF7EF; }
.nav a.btn:hover { color: #FBF7EF; }
.nav a.btn::after { display: none; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--rule-strong);
  border-radius: var(--radius); padding: .55rem .7rem; cursor: pointer; color: var(--ink);
}
.nav-toggle svg { width: 18px; height: 14px; }
@media (max-width: 900px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .nav {
    position: fixed; inset: 76px 0 auto; background: var(--paper);
    border-bottom: 1px solid var(--rule);
    flex-direction: column; align-items: stretch; gap: 0;
    padding: .5rem var(--gutter) 1.5rem;
    transform: translateY(-12px); opacity: 0; pointer-events: none;
    transition: opacity .22s ease, transform .22s ease;
    box-shadow: var(--shadow-soft);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav a { padding: .95rem 0; border-bottom: 1px solid var(--rule); font-size: 1.05rem; }
  .nav a::after { display: none; }
  .nav .btn { margin-top: 1.1rem; justify-content: center; border-bottom: 0; }
}

/* --- Buttons ------------------------------------------------------------ */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--sans); font-size: .9375rem; font-weight: 600; letter-spacing: .01em;
  text-decoration: none; cursor: pointer;
  padding: .85rem 1.5rem; border-radius: var(--radius);
  border: 1px solid transparent; background: var(--teal); color: #FBF7EF;
  transition: background .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}
.btn:hover { background: var(--teal-deep); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--rule-strong); }
.btn--ghost:hover { background: transparent; border-color: var(--teal); color: var(--teal); }
.btn--light { background: var(--gold); color: #1B1A16; }
.btn--light:hover { background: #E9A526; }
.btn--onlight { background: transparent; color: #EFE9DC; border-color: rgba(239,233,220,.35); }
.btn--onlight:hover { background: rgba(239,233,220,.08); border-color: rgba(239,233,220,.6); }
.btn .arrow { transition: transform .22s ease; }
.btn:hover .arrow { transform: translateX(3px); }
.btn-row { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 2rem; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-weight: 600; font-size: .9375rem; text-decoration: none; color: var(--teal);
  border-bottom: 1px solid transparent; padding-bottom: 2px;
  transition: border-color .2s ease, gap .2s ease;
}
.link-arrow:hover { border-bottom-color: var(--teal); gap: .75rem; }
.tone-deep .link-arrow, .tone-green .link-arrow { color: var(--gold); }
.tone-deep .link-arrow:hover, .tone-green .link-arrow:hover { border-bottom-color: var(--gold); }

/* --- Hero --------------------------------------------------------------- */
.hero {
  position: relative;
  padding-block: clamp(3.5rem, 9vw, 7rem) clamp(9rem, 16vw, 15rem);
  overflow: hidden;
}
.hero__inner { position: relative; z-index: 2; }
.hero h1 { max-width: 15ch; }
.hero .lede { max-width: 46ch; margin-top: 1.6rem; }
.hero__ridge {
  position: absolute; z-index: 1; left: 0; right: 0; bottom: -1px;
  width: 100%; height: clamp(130px, 17vw, 250px);
  pointer-events: none; user-select: none;
}

.hero__meta {
  margin-top: clamp(3rem, 6vw, 4.5rem);
  display: flex; flex-wrap: wrap; gap: 0;
  border-top: 1px solid var(--rule);
  position: relative; z-index: 2;
}
.hero__meta div {
  padding: 1.5rem clamp(1rem, 2.5vw, 2rem) 0 0;
  margin-right: clamp(1rem, 2.5vw, 2rem);
  border-right: 1px solid var(--rule);
  flex: 1 1 200px;
}
.hero__meta div:last-child { border-right: 0; margin-right: 0; }
@media (max-width: 760px) {
  .hero__meta div { border-right: 0; margin-right: 0; padding-right: 0; padding-top: 1.25rem; flex: 1 1 100%; }
  .hero__meta div + div { border-top: 1px solid var(--rule); }
}

/* Interior page intro, closed with a ridge hairline */
.page-intro { position: relative; }
.page-intro::after {
  content: ""; position: absolute; left: var(--gutter); right: var(--gutter); bottom: 0;
  height: 26px;
  background: url("../img/ridge-rule.svg") center / 100% 100% no-repeat;
  opacity: .8;
}
.hero__meta dt {
  font-size: .7rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
  color: var(--terracotta); margin-bottom: .55rem;
}
.hero__meta dd { margin: 0; font-size: .95rem; color: var(--ink-soft); line-height: 1.5; }

/* --- Cards -------------------------------------------------------------- */
.card {
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: clamp(1.6rem, 2.6vw, 2.25rem);
  display: flex; flex-direction: column;
  transition: border-color .25s ease, transform .25s ease, box-shadow .25s ease;
}
a.card { text-decoration: none; }
a.card:hover { border-color: var(--rule-strong); transform: translateY(-3px); box-shadow: var(--shadow-soft); }
.card h3 { margin-bottom: .55rem; }
.card p { font-size: .975rem; color: var(--ink-soft); }
.card__index {
  font-family: var(--serif); font-size: .95rem; color: var(--terracotta);
  letter-spacing: .04em; margin-bottom: 1.2rem; display: block;
}
.card__foot { margin-top: auto; padding-top: 1.4rem; }
.tone-deep .card, .tone-green .card {
  background: rgba(255,255,255,.04); border-color: rgba(239,233,220,.16); color: inherit;
}
.tone-deep .card p, .tone-green .card p { color: rgba(239,233,220,.75); }
.tone-deep .card__index, .tone-green .card__index { color: var(--gold); }

/* Peak-topped feature card */
.peak-card { position: relative; padding-top: 2.9rem; }
.peak-card::before {
  content: ""; position: absolute; top: 1.6rem; left: clamp(1.6rem, 2.6vw, 2.25rem);
  width: 26px; height: 20px; background: var(--peak, var(--green));
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}

/* --- Numbered / stepped list -------------------------------------------- */
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  position: relative; padding-left: 4rem; padding-bottom: 2.25rem;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  position: absolute; left: 0; top: -.15rem;
  font-family: var(--serif); font-size: 1.35rem; color: var(--terracotta);
}
.steps li::after {
  content: ""; position: absolute; left: 1.05rem; top: 2rem; bottom: .35rem; width: 1px;
  background: var(--rule);
}
.steps li:last-child { padding-bottom: 0; }
.steps li:last-child::after { display: none; }
.steps h3 { font-family: var(--sans); font-size: 1.0625rem; font-weight: 600; letter-spacing: 0; margin-bottom: .35rem; }
.steps p { font-size: .975rem; color: var(--ink-soft); }
.tone-deep .steps li::after, .tone-green .steps li::after { background: rgba(239,233,220,.2); }
.tone-deep .steps li::before, .tone-green .steps li::before { color: var(--gold); }
.tone-deep .steps p, .tone-green .steps p { color: rgba(239,233,220,.75); }

/* --- Pull quote / statement --------------------------------------------- */
.statement {
  font-family: var(--serif); font-size: clamp(1.5rem, 3.2vw, 2.35rem);
  line-height: 1.25; letter-spacing: -.015em; max-width: 24ch; margin: 0;
}
.statement em { font-style: italic; color: var(--gold); }

blockquote.pull {
  margin: 0; padding-left: clamp(1.25rem, 3vw, 2rem);
  border-left: 2px solid var(--terracotta);
}
blockquote.pull p {
  font-family: var(--serif); font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  line-height: 1.35; color: var(--ink);
}
blockquote.pull cite {
  display: block; margin-top: 1rem; font-style: normal;
  font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint);
}

/* --- Definition rows ---------------------------------------------------- */
.rows { border-top: 1px solid var(--rule); }
.rows > div {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(1rem, 4vw, 3rem);
  padding-block: clamp(1.5rem, 3vw, 2.25rem);
  border-bottom: 1px solid var(--rule);
}
@media (max-width: 720px) { .rows > div { grid-template-columns: 1fr; gap: .5rem; } }
.rows h3 { margin-bottom: 0; font-size: clamp(1.15rem, 1.9vw, 1.4rem); }
.rows p { font-size: .9875rem; color: var(--ink-soft); }
.tone-deep .rows, .tone-deep .rows > div,
.tone-green .rows, .tone-green .rows > div { border-color: rgba(239,233,220,.18); }
.tone-deep .rows p, .tone-green .rows p { color: rgba(239,233,220,.75); }

/* --- Checklist ---------------------------------------------------------- */
.ticks { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; }
.ticks li { position: relative; padding-left: 1.9rem; font-size: .9875rem; color: var(--ink-soft); }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: 11px; height: 9px; background: var(--terracotta);
  clip-path: polygon(50% 0, 100% 100%, 0 100%);
}
.tone-deep .ticks li, .tone-green .ticks li { color: rgba(239,233,220,.8); }
.tone-deep .ticks li::before, .tone-green .ticks li::before { background: var(--gold); }

/* --- The label / mark showcase ------------------------------------------ */
.label-demo {
  background: var(--paper);
  border: 1px solid var(--rule-strong);
  border-radius: var(--radius);
  padding: clamp(1.75rem, 3vw, 2.5rem);
  box-shadow: var(--shadow-soft);
  max-width: 380px;
}
.label-demo__mark { width: 88px; margin-bottom: 1.1rem; }
.label-demo__title {
  font-family: var(--serif); font-size: 1.3rem; line-height: 1.15; margin: 0 0 .3rem; color: var(--teal);
}
.label-demo__sub {
  font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); margin: 0;
}
.label-demo__divider { height: 1px; background: var(--rule); margin: 1.4rem 0; }
.label-demo__qr { display: flex; align-items: center; gap: 1rem; }
.label-demo__qr svg { width: 62px; height: 62px; flex: none; }
.label-demo__qr p { font-size: .8rem; line-height: 1.45; color: var(--ink-soft); margin: 0; }
.label-demo__code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: .74rem; letter-spacing: .06em; color: var(--ink); display: block; margin-top: .3rem;
}

/* --- Ridge divider ------------------------------------------------------ */
.ridge-rule { display: block; width: 100%; height: auto; }
.ridge-rule--flip { transform: scaleY(-1); }

/* --- Forms -------------------------------------------------------------- */
.form { display: grid; gap: 1.25rem; max-width: 34rem; }
.field { display: grid; gap: .45rem; }
.field label { font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  font: inherit; font-size: 1rem; color: var(--ink);
  background: var(--paper); border: 1px solid var(--rule-strong); border-radius: var(--radius);
  padding: .8rem .9rem; width: 100%;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.field textarea { min-height: 8rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(1, 79, 80, .12);
}
.form__note { font-size: .85rem; color: var(--ink-faint); max-width: 34rem; }

/* --- Contact channels --------------------------------------------------- */
.channels { display: grid; gap: 0; border-top: 1px solid var(--rule); }
.channels > div { padding-block: 1.5rem; border-bottom: 1px solid var(--rule); }
.channels h4 { margin-bottom: .3rem; }
.channels a { color: var(--teal); text-decoration: none; border-bottom: 1px solid rgba(1,79,80,.3); }
.channels a:hover { border-bottom-color: var(--teal); }

/* --- CTA band ----------------------------------------------------------- */
.cta-band { position: relative; overflow: hidden; }
.cta-band__inner { position: relative; z-index: 2; display: grid; gap: 2rem; align-items: end; }
@media (min-width: 861px) { .cta-band__inner { grid-template-columns: minmax(0, 1fr) auto; } }

/* --- Footer ------------------------------------------------------------- */
.footer { background: var(--green-deep); color: rgba(237, 232, 218, .8); padding-block: clamp(3.5rem, 6vw, 5rem) 2.5rem; }
.footer a { color: rgba(237, 232, 218, .8); text-decoration: none; }
.footer a:hover { color: #fff; }
.footer__grid { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: minmax(0, 1.6fr) repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .footer__grid { grid-template-columns: 1fr; } }
.footer__brand img { width: 120px; margin-bottom: 1.25rem; }
.footer__brand p { font-size: .925rem; max-width: 32ch; color: rgba(237, 232, 218, .62); }
.footer h4 {
  font-size: .7rem; letter-spacing: .16em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 1.1rem;
}
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .7rem; font-size: .9375rem; }
.footer__base {
  margin-top: clamp(2.5rem, 5vw, 4rem); padding-top: 1.75rem;
  border-top: 1px solid rgba(237, 232, 218, .16);
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between;
  font-size: .8125rem; color: rgba(237, 232, 218, .55);
}

/* --- Utility ------------------------------------------------------------ */
.skip {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--teal); color: #fff; padding: .75rem 1.25rem; text-decoration: none;
}
.skip:focus { left: .5rem; top: .5rem; }
:focus-visible { outline: 2px solid var(--terracotta); outline-offset: 3px; border-radius: 1px; }
.center { text-align: center; margin-inline: auto; }
.center p { margin-inline: auto; }
.mt-0 { margin-top: 0; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s cubic-bezier(.2,.7,.3,1), transform .7s cubic-bezier(.2,.7,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }

@media print {
  .masthead, .nav-toggle, .hero__ridge, .cta-band { display: none !important; }
  body { background: #fff; }
}
