:root {
  --bg: #F6F4EE;
  --panel: #EDEAE2;
  --ink: #17152E;
  --indigo: #322C7E;
  --indigo-dark: #282369;
  --indigo-light: #3A3492;
  --lavender: #B9B3F0;
  --terracotta: #A63A2A;
  --terracotta-dark: #8A3325;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  font-family: 'Instrument Sans', system-ui, sans-serif;
  color: var(--ink);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

a { color: var(--indigo); text-decoration: none; }
a:hover { color: var(--ink); }

em { font-style: italic; color: var(--indigo); }

.section-inner { max-width: 1200px; margin: 0 auto; }

.mono-label {
  font: 500 10px ui-monospace, Menlo, monospace;
  letter-spacing: .14em;
  color: rgba(23, 21, 46, .5);
}
.mono-label--indigo { color: var(--indigo); }
.mono-label--faint { color: rgba(246, 244, 238, .55); }

.eyebrow {
  font: 500 11px ui-monospace, Menlo, monospace;
  letter-spacing: .18em;
  color: var(--indigo);
  margin-bottom: 18px;
}

.display-1 { font: 400 clamp(38px, 5vw, 64px)/1.08 'Instrument Serif', serif; margin: 0; }
.display-2 { font: 400 clamp(34px, 4.5vw, 56px)/1.1 'Instrument Serif', serif; margin: 0; }
.display-3 { font: 400 clamp(30px, 3.8vw, 44px)/1.1 'Instrument Serif', serif; margin: 10px 0 0; }

.lede {
  margin-top: 18px;
  font: 400 16px/1.55 'Instrument Sans', sans-serif;
  color: rgba(23, 21, 46, .6);
  max-width: 480px;
}

.body-text { font: 400 15px/1.6 'Instrument Sans', sans-serif; color: rgba(23, 21, 46, .6); }
.body-text--wide { max-width: 560px; margin-top: 20px; }
.body-text--center { text-align: center; max-width: 460px; }

.btn {
  display: inline-block;
  font: 500 12px 'Instrument Sans', sans-serif;
  letter-spacing: .1em;
  padding: 12px 24px;
  border-radius: 99px;
}
.btn--indigo { background: var(--indigo); color: var(--bg); }
.btn--indigo:hover { background: var(--ink); color: var(--bg); }
.btn--light { margin-top: 28px; padding: 13px 26px; background: var(--bg); color: var(--ink); }
.btn--light:hover { background: var(--lavender); color: var(--ink); }

.tag, .pill {
  font: 500 10px 'Instrument Sans', sans-serif;
  letter-spacing: .06em;
  padding: 6px 12px;
  border: 1px solid rgba(23, 21, 46, .15);
  border-radius: 99px;
}
.pill { font-size: 11px; letter-spacing: .05em; padding: 8px 16px; border-color: rgba(23, 21, 46, .18); }

/* ============ NAV ============ */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(246, 244, 238, .88);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(23, 21, 46, .08);
}
.nav__inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 32px;
}
.nav__brand img { height: 42px; width: auto; display: block; }
.nav__links {
  display: flex;
  align-items: center;
  gap: 28px;
  font: 500 12px 'Instrument Sans', sans-serif;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav__cta {
  padding: 9px 18px;
  border-radius: 99px;
  background: var(--indigo);
  color: var(--bg) !important;
}
.nav__cta:hover { background: var(--ink); }

/* ============ SCROLL STORY (shared) ============ */
.story { position: relative; }
.story--hero { height: 340vh; }
.story--zoom { height: 280vh; }
.story__stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh; /* stable height on mobile browsers with collapsing URL bars */
  overflow: hidden;
  background: var(--bg);
}
.story__stage--zoom { background: var(--panel); }

.scroll-hint {
  position: absolute;
  bottom: 22px;
  left: 0;
  right: 0;
  text-align: center;
  font: 500 10px ui-monospace, Menlo, monospace;
  letter-spacing: .16em;
  color: rgba(23, 21, 46, .4);
}

.rail {
  position: absolute;
  left: 36px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
  z-index: 5;
  font: 500 10px ui-monospace, Menlo, monospace;
  letter-spacing: .12em;
  color: var(--ink);
}

/* HERO layers */
.hero-layer { position: absolute; inset: 0; will-change: transform, opacity; }
.hero-layer--surface {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 38px;
  padding: 0 24px;
}
.hero-layer__copy { text-align: center; }
.hero-layer__copy .display-1 { max-width: 820px; }

.application-cards { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.application-card {
  width: 220px;
  height: 150px;
  border-radius: 8px;
  position: relative;
}
.application-card span {
  position: absolute;
  bottom: 10px;
  left: 12px;
  font: 500 9px ui-monospace, Menlo, monospace;
  letter-spacing: .1em;
}
.application-card--paint {
  background: linear-gradient(160deg, #8A3325, #A63A2A 45%, #7C2E21);
  box-shadow: 0 24px 50px -22px rgba(122, 46, 33, .5);
}
.application-card--paint span { color: rgba(255, 255, 255, .75); }
.application-card--ceramic {
  background: linear-gradient(160deg, #D8D2C2, #EDE8DD 55%, #CFC8B6);
  box-shadow: 0 24px 50px -22px rgba(23, 21, 46, .2);
}
.application-card--ceramic span { color: rgba(23, 21, 46, .55); }
.application-card--plastic {
  background: linear-gradient(160deg, #282369, #322C7E 50%, #3A3492);
  box-shadow: 0 24px 50px -22px rgba(40, 35, 105, .5);
}
.application-card--plastic span { color: rgba(255, 255, 255, .75); }

.hero-layer--powder { }
.powder-dots { position: absolute; inset: 0; }
.powder-dots span {
  position: absolute;
  left: 50%;
  top: 44%;
  border-radius: 50%;
  will-change: transform;
}
.powder-caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 16vh;
  text-align: center;
}

.hero-layer--mineral {
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.mineral-card {
  width: min(440px, 88vw);
  background: #fff;
  border: 1px solid rgba(23, 21, 46, .1);
  border-radius: 12px;
  padding: 30px 32px;
  box-shadow: 0 40px 80px -35px rgba(23, 21, 46, .3);
}
.mineral-card__swatch { width: 100%; height: 160px; border-radius: 8px; }
.mineral-card__head { margin-top: 20px; display: flex; align-items: baseline; justify-content: space-between; }
.mineral-card__name { font: 400 34px/1 'Instrument Serif', serif; color: var(--ink); }
.mineral-card__desc { margin-top: 8px; font: 400 14px 'Instrument Sans', sans-serif; color: rgba(23, 21, 46, .6); }
.mineral-card__tags { margin-top: 18px; display: flex; gap: 8px; }

/* ZOOM layers */
.zoom-readout {
  position: absolute;
  right: 40px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 6;
  text-align: right;
  font: 500 10px ui-monospace, Menlo, monospace;
  letter-spacing: .1em;
  color: rgba(23, 21, 46, .55);
}
.zoom-readout__value { font-size: 26px; color: var(--ink); margin-bottom: 5px; }

.zoom-layer { position: absolute; inset: 0; will-change: transform, opacity; }
.zoom-layer--wall {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 30px;
  padding: 0 24px;
}
.wall-swatch {
  width: min(340px, 80vw);
  height: 220px;
  border-radius: 8px;
  background: linear-gradient(155deg, #3A3492, #322C7E 55%, #282369);
  box-shadow: 0 30px 70px -28px rgba(40, 35, 105, .55);
}
.zoom-copy { text-align: center; }
.zoom-copy .lede { max-width: 420px; margin-left: auto; margin-right: auto; }

.particle-field {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(50, 44, 126, .5) 1.6px, transparent 2.2px),
    radial-gradient(circle, rgba(23, 21, 46, .18) 1.2px, transparent 1.8px);
  background-size: 52px 52px, 31px 31px;
  background-position: 0 0, 16px 10px;
}
.particle-copy {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
}
.particle-sphere {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #8F87DE, #5A51B8 55%, #322C7E);
  box-shadow: 0 0 110px rgba(90, 81, 184, .45);
}

.zoom-layer--origin {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 26px;
}

/* ============ STRATA ============ */
.strata__panel {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 9vh 8vw;
}
.strata__panel--company {
  background: var(--indigo);
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .3);
}
.strata__panel--company .display-1 { color: var(--bg); max-width: 760px; }
.strata__panel--craft {
  background: linear-gradient(160deg, var(--terracotta), var(--terracotta-dark));
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .35);
}
.strata__panel--craft .display-1 { color: var(--bg); max-width: 720px; }
.strata__panel--craft .mono-label--faint { color: rgba(246, 244, 238, .65); }
.strata__panel .body-text--wide { color: rgba(246, 244, 238, .65); }
.strata__panel--craft .body-text--wide { color: rgba(246, 244, 238, .75); }

.stat-row {
  display: flex;
  gap: 38px;
  flex-wrap: wrap;
  font: 500 10px ui-monospace, Menlo, monospace;
  letter-spacing: .1em;
  color: rgba(246, 244, 238, .6);
}
.stat__value { font: 400 38px 'Instrument Serif', serif; color: var(--bg); }

/* ============ CATALOGUE ============ */
.catalogue { background: var(--bg); padding: 110px 8vw 90px; scroll-margin-top: 70px; }
.catalogue__head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.catalogue__grid {
  margin-top: 44px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 14px;
}
.mineral-tile {
  background: #fff;
  border: 1px solid rgba(23, 21, 46, .09);
  border-radius: 10px;
  padding: 14px;
  transition: transform .25s, box-shadow .25s;
}
.mineral-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 36px -20px rgba(23, 21, 46, .3);
}
.mineral-tile__swatch { width: 100%; height: 86px; border-radius: 6px; }
.mineral-tile__name { margin-top: 12px; font: 600 14.5px 'Instrument Sans', sans-serif; color: var(--ink); }
.mineral-tile__base { margin-top: 2px; font: 400 12px 'Instrument Sans', sans-serif; color: rgba(23, 21, 46, .55); }

/* ============ RECIPE ============ */
.recipe { background: var(--panel); padding: 110px 8vw; scroll-margin-top: 70px; }
.recipe__inner { max-width: 900px; margin: 0 auto; text-align: center; }
.recipe__quote {
  margin: 22px 0 0;
  font: 400 clamp(28px, 3.6vw, 42px)/1.25 'Instrument Serif', serif;
  color: var(--ink);
}
.pill-row { margin-top: 34px; display: flex; justify-content: center; gap: 10px; flex-wrap: wrap; }

/* ============ CONTACT ============ */
.contact { background: var(--ink); color: var(--bg); padding: 100px 8vw 40px; scroll-margin-top: 70px; }
.contact__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 60px;
  align-items: start;
}
.contact .display-1 { color: var(--bg); }
.contact .body-text--wide { color: rgba(246, 244, 238, .6); max-width: 420px; }
.contact a:not(.btn) { color: var(--bg); }
.contact__details {
  display: flex;
  flex-direction: column;
  gap: 22px;
  font: 400 14px/1.6 'Instrument Sans', sans-serif;
  color: rgba(246, 244, 238, .75);
}
.contact__details .mono-label--faint { color: rgba(246, 244, 238, .45); margin-bottom: 6px; }
.contact__bottom {
  margin-top: 80px;
  padding-top: 22px;
  border-top: 1px solid rgba(246, 244, 238, .12);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  font: 400 11.5px 'Instrument Sans', sans-serif;
  color: rgba(246, 244, 238, .45);
}

/* ============ MINERAL DETAIL PAGES ============ */
/* sticky footer: page fills the viewport, CTA + footer pushed to the bottom */
.page-detail {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
}
.page-detail .detail {
  flex: 1;
  display: flex;
  flex-direction: column;
}
.page-detail .detail > .section-inner { flex: 1; }
.detail { background: var(--bg); }
.detail .section-inner { padding: 72px 8vw 96px; width: 100%; box-sizing: border-box; }
.detail__back {
  display: inline-block;
  font: 500 11px ui-monospace, Menlo, monospace;
  letter-spacing: .12em;
  margin-bottom: 44px;
}
.detail__hero {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 72px;
  align-items: center;
}
.detail__swatch {
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 14px;
  box-shadow: 0 40px 80px -35px rgba(23, 21, 46, .35);
}
.detail__base {
  margin-top: 12px;
  font: 400 17px 'Instrument Sans', sans-serif;
  color: rgba(23, 21, 46, .6);
}
.detail__info .body-text { margin-top: 22px; max-width: 480px; line-height: 1.7; }
.detail__specs {
  margin-top: 34px;
  padding: 22px 0;
  border-top: 1px solid rgba(23, 21, 46, .1);
  border-bottom: 1px solid rgba(23, 21, 46, .1);
  display: flex;
  gap: 20px 44px;
  flex-wrap: wrap;
  font: 400 14px 'Instrument Sans', sans-serif;
  color: var(--ink);
}
.detail__specs .mono-label { margin-bottom: 6px; }
.pill-row--left { justify-content: flex-start; margin-top: 30px; }
.detail__nav {
  margin-top: 88px;
  padding-top: 26px;
  border-top: 1px solid rgba(23, 21, 46, .1);
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font: 500 13px 'Instrument Sans', sans-serif;
  letter-spacing: .04em;
}
.detail__cta { background: var(--ink); }
.detail__cta-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  flex-wrap: wrap;
  padding: 72px 8vw;
}
.detail__cta .body-text { color: rgba(246, 244, 238, .6); margin-top: 12px; }
.detail__cta .display-2 { color: var(--bg); }
.detail__cta .btn--light { margin-top: 0; }
.detail__footer {
  background: var(--ink);
  color: rgba(246, 244, 238, .45);
  font: 400 11.5px 'Instrument Sans', sans-serif;
  text-align: center;
  padding: 26px 8vw 30px;
  border-top: 1px solid rgba(246, 244, 238, .12);
}

a.mineral-tile { display: block; color: inherit; }

/* ============ RESPONSIVE ============ */
@media (max-width: 760px) {
  .rail { display: none; }

  /* nav */
  .nav__inner { padding: 10px 18px; }
  .nav__brand img { height: 34px; }
  .nav__links { gap: 14px; font-size: 11px; letter-spacing: .06em; }
  .nav__cta { padding: 8px 14px; }

  /* type scale */
  .display-1 { font-size: clamp(30px, 8.6vw, 44px); }
  .display-2 { font-size: clamp(26px, 7.6vw, 38px); }
  .display-3 { font-size: clamp(23px, 6.6vw, 32px); }
  .lede { font-size: 14.5px; margin-top: 14px; padding: 0 6px; }
  .eyebrow { font-size: 10px; letter-spacing: .14em; margin-bottom: 14px; }

  /* hero story */
  .story--hero { height: 300vh; }
  .story--zoom { height: 250vh; }
  .hero-layer--surface { gap: 26px; padding: 76px 20px 40px; }
  .application-cards { gap: 10px; width: 100%; max-width: 420px; }
  .application-card { width: calc(33.33% - 7px); min-width: 0; height: 92px; border-radius: 6px; }
  .application-card span { bottom: 8px; left: 9px; font-size: 8px; letter-spacing: .06em; }
  .powder-caption { bottom: 12vh; padding: 0 20px; }
  .powder-caption .mono-label { font-size: 9px; letter-spacing: .1em; }
  .mineral-card { padding: 22px 20px; }
  .mineral-card__swatch { height: 130px; }
  .mineral-card__name { font-size: 27px; }
  .mineral-card__desc { font-size: 13px; }
  .scroll-hint { bottom: 16px; }

  /* zoom story */
  .zoom-readout { top: auto; bottom: 22px; right: 20px; transform: none; }
  .zoom-readout__value { font-size: 20px; margin-bottom: 3px; }
  .zoom-layer--wall { gap: 22px; padding: 0 20px; }
  .wall-swatch { height: 170px; }
  .particle-sphere { width: 110px; height: 110px; }
  .particle-copy { padding: 0 20px; }
  .zoom-layer--origin { gap: 20px; padding: 0 20px; }

  /* strata */
  .strata__panel { padding: max(28px, 5vh) 22px; }
  .strata__panel .body-text--wide { margin-top: 14px; font-size: 14px; }
  .stat-row { gap: 18px 26px; }
  .stat__value { font-size: 29px; }

  /* catalogue */
  .catalogue { padding: 70px 20px 60px; }
  .catalogue__grid { margin-top: 30px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .mineral-tile { padding: 12px; }
  .mineral-tile__swatch { height: 74px; }

  /* recipe */
  .recipe { padding: 78px 22px; }
  .recipe__quote { font-size: clamp(21px, 6vw, 30px); margin-top: 18px; }
  .pill-row { margin-top: 26px; gap: 8px; }
  .pill { font-size: 10px; padding: 7px 13px; }

  /* mineral detail pages */
  .detail .section-inner { padding: 38px 22px 70px; }
  .detail__back { margin-bottom: 28px; }
  .detail__hero { grid-template-columns: 1fr; gap: 34px; }
  .detail__specs { gap: 16px 30px; margin-top: 26px; padding: 18px 0; }
  .detail__nav { margin-top: 56px; }
  .detail__cta-inner { padding: 56px 22px; }
  .detail__footer { padding: 22px 22px 26px; }

  /* contact */
  .contact { padding: 70px 22px 28px; }
  .contact__grid { grid-template-columns: 1fr; gap: 40px; }
  .contact .body-text--wide { margin-top: 14px; }
  .btn--light { margin-top: 22px; }
  .contact__bottom { margin-top: 52px; flex-direction: column; gap: 6px; }
}

@media (max-width: 400px) {
  .nav__inner { padding: 10px 14px; }
  .nav__brand img { height: 30px; }
  .nav__links { gap: 10px; font-size: 10px; }
  .nav__cta { padding: 7px 12px; }
  .application-card { height: 82px; }
}
