/* GRMH GROUP — global system: reset, type, grid law, survey-line motif,
   grain, chapters, nav, debug grid. All visible copy arrives from
   content/copy.json via js/copy.js — no strings live in CSS. */

/* Neulis Sans (client direction round 9): a commercial family — these
   faces load from the visitor's system or from licensed files the
   client drops into assets/fonts/ (TODO: purchase + add
   neulis-sans-light/regular/medium.woff2); until then the stack falls
   through to Plus Jakarta Sans from Google Fonts, the closest
   freely-licensed match. */
@font-face {
  font-family: "Neulis Sans";
  font-weight: 300;
  font-display: swap;
  src: local("Neulis Sans Light"), local("NeulisSans-Light"),
       url("../assets/fonts/neulis-sans-light.woff2") format("woff2");
}
@font-face {
  font-family: "Neulis Sans";
  font-weight: 400;
  font-display: swap;
  src: local("Neulis Sans"), local("NeulisSans-Regular"),
       url("../assets/fonts/neulis-sans-regular.woff2") format("woff2");
}
@font-face {
  font-family: "Neulis Sans";
  font-weight: 500;
  font-display: swap;
  src: local("Neulis Sans Medium"), local("NeulisSans-Medium"),
       url("../assets/fonts/neulis-sans-medium.woff2") format("woff2");
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: auto; /* Lenis owns smoothing */
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--ink);
  color: var(--bone);
  font-family: var(--font-body);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

img, canvas, video, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
ul, ol { list-style: none; }
[hidden] { display: none !important; }

::selection { background: var(--gold); color: var(--ink); }

/* ---------- grid law ---------- */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--pad);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gutter);
}

/* ---------- type system ---------- */

.eyebrow {
  font-family: var(--font-body);
  font-weight: 300;
  font-size: .72rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  color: var(--gold);
}

.display {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 340;
  line-height: 1.08;
  letter-spacing: -.01em;
  text-wrap: balance; /* grid law: no one-word last lines */
}

.body-copy {
  max-width: 62ch;
  font-weight: 300;
  color: color-mix(in srgb, var(--bone) 82%, transparent);
}

/* vertical rhythm (8px system) */
.eyebrow + .display { margin-top: var(--rhythm-eyebrow); }
.display + .body-copy, .display + p { margin-top: var(--rhythm-headline); }

/* masked per-line rises (motion law) */
.line { display: block; overflow: hidden; }
.line > .line-inner { display: block; will-change: transform; }

/* ---------- survey-line motif ---------- */

.rule {
  height: 1px;
  width: 100%;
  background: var(--gold);
  opacity: .55;
  transform-origin: left center;
}
.scene--bone .rule { background: var(--earth); }

.seal {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  font-size: .68rem;
  letter-spacing: .34em;
  text-transform: uppercase;
  font-weight: 300;
  color: var(--gold);
  white-space: nowrap;
}
.seal::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: .7;
  flex: none;
}

/* status pill (compliance law: exact strings from copy.json) */
.pill {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--hair);
  border-radius: 999px;
  font-size: .62rem;
  font-weight: 300;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--gold);
  white-space: nowrap;
}

/* hairline CTA */
.cta {
  display: inline-block;
  padding: 15px 26px;
  border: 1px solid var(--hair);
  font-size: .74rem;
  font-weight: 300;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--bone);
  position: relative;
  transition: border-color .25s var(--ease), background-color .25s var(--ease), color .25s var(--ease);
}
.cta:hover {
  border-color: var(--gold);
  background: rgba(189, 154, 95, .07);
}
.cta--primary { border-color: var(--gold); color: var(--gold); }
.cta--primary:hover { background: var(--gold); color: var(--ink); }

/* ---------- chapters ---------- */

.scene--ink { background: var(--ink); color: var(--bone); }

.scene--bone {
  background: var(--bone);
  color: var(--ink);
  position: relative;
}
/* 2.5% survey-contour texture so whitespace reads as surface, not absence */
.scene--bone::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: .025;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='560' height='560' viewBox='0 0 560 560'%3E%3Cg fill='none' stroke='%239C5533' stroke-width='1'%3E%3Cpath d='M-20 90 C 120 40, 220 150, 380 100 S 560 60, 600 110'/%3E%3Cpath d='M-20 180 C 100 140, 260 240, 400 190 S 560 150, 600 200'/%3E%3Cpath d='M-20 290 C 140 230, 240 340, 390 280 S 560 250, 600 300'/%3E%3Cpath d='M-20 400 C 110 350, 250 450, 410 390 S 560 360, 600 410'/%3E%3Cpath d='M-20 500 C 130 450, 230 550, 400 490 S 560 460, 600 510'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 560px 560px;
}
.scene--bone > * { position: relative; }
.scene--bone .body-copy { color: color-mix(in srgb, var(--ink) 78%, transparent); }
.scene--bone .cta { color: var(--ink); border-color: rgba(156, 85, 51, .28); }
.scene--bone .cta:hover { border-color: var(--earth); background: rgba(156, 85, 51, .07); }
.scene--bone .cta--primary { border-color: var(--earth); color: var(--earth); }
.scene--bone .cta--primary:hover { background: var(--earth); color: var(--bone); }
.scene--bone .seal { color: var(--earth); }
.scene--bone .seal::before { background: var(--earth); }

/* client-supplied transparent lockup (direction 2026-08-03): the logo
   sits directly on the page, no card, no recolor */
.logo-card {
  display: inline-flex;
  align-items: center;
}
.logo-card img {
  height: 44px;
  width: auto;
}

/* ---------- film grain (4% sitewide) ---------- */

.grain {
  position: fixed;
  inset: -60px;
  z-index: 2000;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 240px 240px;
  animation: grain-shift 1.6s steps(8) infinite;
}
@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  25% { transform: translate(-18px, 12px); }
  50% { transform: translate(14px, -20px); }
  75% { transform: translate(-10px, -14px); }
  100% { transform: translate(0, 0); }
}

/* ---------- navigation ---------- */

/* the menu bar (client direction round 8): a solid bone bar with a
   hairline earth rule — defined, readable over every chapter */
.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding-block: 14px;
  background: color-mix(in srgb, var(--bone) 94%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(156, 85, 51, .16);
}

.site-nav__row {
  display: flex;
  align-items: center;
  gap: 34px;
}
.site-nav__row .logo-card { margin-right: auto; }
.site-nav__row nav { order: 3; }

.site-nav__links {
  display: flex;
  align-items: center;
  gap: clamp(20px, 2.4vw, 36px);
}
.site-nav__links a,
.site-nav__links button {
  white-space: nowrap;
  font-size: .6rem;
  font-weight: 340;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 62%, transparent);
  padding-block: 6px;
  transition: color .3s var(--ease);
}
.site-nav__links a:hover,
.site-nav__links button:hover,
.site-nav__links a.is-active,
.site-nav__links button.is-active { color: var(--ink); }

/* the survey tick returns under the active section (signature motif) */
.site-nav__links a,
.site-nav__links button { position: relative; }
.site-nav__links a::after,
.site-nav__links button::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 18px;
  height: 1px;
  background: var(--earth);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .5s var(--ease);
}
.site-nav__links a.is-active::after,
.site-nav__links a:hover::after,
.site-nav__links button:hover::after { transform: scaleX(1); }

/* designer pass: visible keyboard focus, sitewide */
:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}
.scene--bone :focus-visible,
.site-nav :focus-visible { outline-color: var(--earth); }


/* the Menu affordance: desktop shows the full row; the burger serves
   compact viewports, opening the reveal panel */
.nav-burger {
  display: none;
  align-items: center;
  gap: 12px;
  padding: 8px 2px;
  order: 2;
}
.nav-burger__lines {
  position: relative;
  display: block;
  width: 26px;
  height: 11px;
}
.nav-burger__lines span {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: var(--ink);
  transition: transform .4s var(--ease);
}
.nav-burger__lines span:nth-child(1) { top: 0; }
.nav-burger__lines span:nth-child(2) { bottom: 0; }
.nav-burger:hover .nav-burger__lines span:nth-child(1) { transform: translateY(2px); }
.nav-burger:hover .nav-burger__lines span:nth-child(2) { transform: translateY(-2px); }
.nav-burger__label {
  font-size: .64rem;
  font-weight: 340;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--ink) 80%, transparent);
}

/* ventures reveal panel (not a dropdown) */
.ventures-panel {
  position: fixed;
  inset: 0;
  z-index: 1500;
  background: color-mix(in srgb, var(--ink-2) 96%, transparent);
  visibility: hidden;
  opacity: 0;
  display: flex;
  align-items: center;
}
.ventures-panel__inner { width: 100%; }
.ventures-panel__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 56px;
}
.ventures-panel__list li {
  border-top: 1px solid var(--hair);
}
.ventures-panel__list li:last-child { border-bottom: 1px solid var(--hair); }
.ventures-panel__list a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0;
  transition: padding-left .35s var(--ease);
}
.ventures-panel__list a:hover { padding-left: 16px; }
.ventures-panel__list .v-name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 340;
  font-size: clamp(1.5rem, 3.2vw, 2.4rem);
  line-height: 1.15;
}
.ventures-panel__close {
  width: 44px;
  height: 44px;
  position: relative;
}
.ventures-panel__close::before,
.ventures-panel__close::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 10px;
  right: 10px;
  height: 1px;
  background: var(--gold);
}
.ventures-panel__close::before { transform: rotate(45deg); }
.ventures-panel__close::after { transform: rotate(-45deg); }

/* the panel is the site menu (round 5): primary sections in display
   type left, ventures with statuses right */
.ventures-panel__body {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr);
  column-gap: calc(var(--gutter) * 3);
  align-items: start;
}
.ventures-panel__primary a {
  display: block;
  padding: 13px 0;
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 330;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  line-height: 1.2;
  color: color-mix(in srgb, var(--bone) 62%, transparent);
  transition: color .3s var(--ease), padding-left .35s var(--ease);
}
.ventures-panel__primary a:hover,
.ventures-panel__primary a.is-active {
  color: var(--bone);
  padding-left: 14px;
}

@media (max-width: 1099px) {
  .site-nav__links { display: none; }
  .nav-burger { display: inline-flex; }
  .logo-card img { height: 38px; }
  .ventures-panel__primary { display: block; }
  .ventures-panel { align-items: flex-start; overflow-y: auto; }
  .ventures-panel__inner { padding-block: 96px 64px; }
}

@media (max-width: 620px) {
  .ventures-panel__list a {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }
  /* long status strings wrap instead of widening the document */
  .pill { white-space: normal; line-height: 1.6; }
  .site-footer__col a { flex-wrap: wrap; }
  .site-footer__col .pill { white-space: nowrap; }
}

/* ---------- pending-asset media slots ---------- */

.media-slot {
  position: relative;
  overflow: hidden;
  background:
    repeating-linear-gradient(90deg, var(--hair) 0 1px, transparent 1px 120px),
    repeating-linear-gradient(0deg, var(--hair) 0 1px, transparent 1px 120px),
    var(--ink-2);
}
.scene--bone .media-slot { background-color: var(--bone-2); }
.media-slot > video,
.media-slot > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- survey-line sweep at ink/bone boundaries ---------- */

.sweep {
  position: relative;
  height: 1px;
  overflow: visible;
}
.sweep__line {
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 1px;
  background: var(--grad);
  transform: scaleX(0);
  transform-origin: left center;
}

/* ---------- enquiry form ---------- */

.form-field { display: block; margin-bottom: 22px; }
.form-field > .eyebrow { display: block; margin-bottom: 8px; font-size: .62rem; }
.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--hair);
  color: inherit;
  font: 300 .95rem var(--font-body);
  padding: 10px 2px;
  border-radius: 0;
  transition: border-color .25s var(--ease);
}
.form-field select { appearance: none; -webkit-appearance: none; cursor: pointer; }
.form-field select option { color: var(--ink); background: var(--bone); }
.form-field textarea { min-height: 110px; resize: vertical; }
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--gold);
}
.form-field .is-invalid,
.form-field input.is-invalid,
.form-field textarea.is-invalid { border-bottom-color: var(--clay); }
.form-status { min-height: 24px; font-size: .8rem; letter-spacing: .04em; }
.form-status[data-kind="success"] { color: var(--gold); }
.form-status[data-kind="error"], .form-status[data-kind="invalid"] { color: var(--clay); }
.scene--bone .form-field input,
.scene--bone .form-field select,
.scene--bone .form-field textarea { border-bottom-color: rgba(156, 85, 51, .30); }
.scene--bone .form-field input:focus,
.scene--bone .form-field select:focus,
.scene--bone .form-field textarea:focus { border-bottom-color: var(--earth); }
.scene--bone .form-status[data-kind="success"] { color: var(--earth); }
.form-honey { position: absolute; left: -9999px; opacity: 0; pointer-events: none; }
form.is-sending { opacity: .55; pointer-events: none; }

/* ---------- debug grid overlay (QA law, toggle with "g") ---------- */

.grid-debug {
  position: fixed;
  inset: 0;
  z-index: 3000;
  pointer-events: none;
  display: none;
}
body.debug-grid .grid-debug { display: block; }
.grid-debug .container, .grid-debug .grid { height: 100%; }
.grid-debug .grid > div {
  background: rgba(189, 154, 95, .07);
  border-inline: 1px solid rgba(189, 154, 95, .18);
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .grain { animation: none; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}

/* ---------- ember chapter (round 12: Associations on a dark orange gradient) ---------- */

.scene--ember {
  position: relative;
  color: var(--bone);
  background: linear-gradient(160deg, #5E2C16 0%, #8A4A2C 42%, #B4643C 100%);
}
.scene--ember .eyebrow { color: var(--gold); }
.scene--ember .display { color: var(--bone); }
.scene--ember .rule { background: var(--bone); opacity: .38; }
.scene--ember .body-copy { color: color-mix(in srgb, var(--bone) 80%, transparent); }
