/* ============================================================
   KEMETRIX GLOBAL — SHARED COMP STYLES
   Every comp page loads tokens.css then this file.
   ============================================================ */

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

html { scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--t-dark-1);
  font-family: var(--f-text);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }
button { font: inherit; background: none; border: none; cursor: pointer; color: inherit; }

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

/* ------------------------------------------------------------
   LAYOUT PRIMITIVES
   ------------------------------------------------------------ */

.shell { padding-inline: var(--margin); }

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

.section { padding-block: var(--sp-section); position: relative; }
.section--tight { padding-block: var(--sp-section-sm); }

/* Surface variants — sections alternate ink / basalt / papyrus */
.on-light { background: var(--papyrus); color: var(--t-light-1); }
.on-basalt { background: var(--basalt); }

/* ------------------------------------------------------------
   TYPOGRAPHY
   ------------------------------------------------------------ */

.display, .title, .heading {
  font-family: var(--f-display);
  font-variation-settings: var(--display-settings);
  font-weight: 340;
  letter-spacing: var(--track-display);
}

.display { font-size: var(--fs-display); line-height: var(--lh-display); }
.colossal { font-size: var(--fs-colossal); line-height: 0.98; }
.title { font-size: var(--fs-title); line-height: var(--lh-title); }
.heading { font-size: var(--fs-heading); line-height: 1.25; }

.display em, .title em {
  font-style: italic;
  font-weight: 320;
  color: var(--gold);
}
.on-light .display em, .on-light .title em { color: var(--gold-deep); }

.lead {
  font-size: var(--fs-lead);
  line-height: 1.62;
  color: var(--t-dark-2);
  max-width: var(--measure);
}
.on-light .lead { color: var(--t-light-2); }

.body-copy { max-width: var(--measure); color: var(--t-dark-2); }
.on-light .body-copy { color: var(--t-light-2); }

/* Eyebrow — the primary gold gesture. Hairline dash + tracked caps. */
.eyebrow {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--sp-element);
}
.eyebrow::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--gold);
  flex: none;
}
.on-light .eyebrow { color: var(--gold-deep); }
.on-light .eyebrow::before { background: var(--gold-deep); }

/* Chapter numeral — sections are chapters in a story */
.chapter {
  font-family: var(--f-display);
  font-variation-settings: var(--display-settings);
  font-size: var(--fs-small);
  font-weight: 400;
  letter-spacing: 0.12em;
  color: var(--t-dark-3);
}
.chapter b { font-weight: 400; color: var(--gold); }
.on-light .chapter { color: var(--t-light-3); }
.on-light .chapter b { color: var(--gold-deep); }

/* ------------------------------------------------------------
   HAIRLINES
   ------------------------------------------------------------ */

.rule { border: 0; height: 1px; background: var(--line-dark); }
.on-light .rule { background: var(--line-light); }

/* ------------------------------------------------------------
   BUTTONS & LINKS
   ------------------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
  padding: 19px 38px;
  border: 1px solid var(--gold-faint);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--t-dark-1);
  transition: background var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.btn:hover { background: var(--gold); border-color: var(--gold); color: var(--ink); }

.btn--solid { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn--solid:hover { background: var(--t-dark-1); border-color: var(--t-dark-1); }

.on-light .btn { border-color: var(--line-light-strong); color: var(--t-light-1); }
.on-light .btn:hover { background: var(--t-light-1); border-color: var(--t-light-1); color: var(--papyrus); }

.btn .arrow { width: 22px; height: 8px; flex: none; }
.btn .arrow line, .btn .arrow path { stroke: currentColor; stroke-width: 1.2; fill: none; }

/* Text link — hairline underline that draws on hover */
.tlink {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: var(--track-caps);
  text-transform: uppercase;
  color: var(--t-dark-1);
  padding-bottom: 8px;
  position: relative;
}
.tlink::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0.28);
  transform-origin: left;
  transition: transform var(--dur-base) var(--ease-out);
}
.tlink:hover::after { transform: scaleX(1); }
.on-light .tlink { color: var(--t-light-1); }
.on-light .tlink::after { background: var(--gold-deep); }

/* ------------------------------------------------------------
   PHOTOGRAPHY
   Every image sits on a duotone ground so a slow network still
   reads as design, and dark grade unifies mixed sources.
   ------------------------------------------------------------ */

.photo {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(160deg, var(--basalt-2) 0%, var(--ink) 100%);
}
.photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: saturate(0.82) contrast(1.04) brightness(0.92);
}
/* Grade veil — pulls every photo into the ink/gold world */
.photo::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg,
    rgba(10,14,12,0.0) 40%,
    rgba(10,14,12,0.55) 100%);
  pointer-events: none;
}
.photo--flat::after { background: rgba(10,14,12,0.18); }

/* ------------------------------------------------------------
   NAVIGATION
   ------------------------------------------------------------ */

.nav {
  position: absolute;
  top: 0; left: 0; right: 0;
  z-index: 10;
  padding: 26px var(--margin);
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: clamp(24px, 3vw, 52px);
}
.nav--onpage { position: relative; background: var(--ink); border-bottom: 1px solid var(--line-dark); }

.nav__brand { display: flex; align-items: center; gap: 15px; flex: none; }
.nav__brand svg { width: 42px; height: 42px; }
.nav__brand img { width: 42px; height: auto; }
.nav__wordmark {
  font-family: var(--f-text);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.26em;
  color: var(--t-dark-1);
  white-space: nowrap;
}
.nav__wordmark small {
  display: block;
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.52em;
  color: var(--gold);
  margin-top: 3px;
}

.nav__links { display: flex; flex: 1 1 auto; justify-content: center; gap: clamp(16px, 1.9vw, 34px); flex-wrap: nowrap; }
.nav__links a {
  font-size: 12px;
  font-weight: 550;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--t-dark-2);
  padding-bottom: 6px;
  position: relative;
  white-space: nowrap;
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__links a:hover, .nav__links a[aria-current] { color: var(--t-dark-1); }
.nav__links a[aria-current]::after {
  content: "";
  position: absolute; left: 0; bottom: 0;
  width: 20px; height: 1px;
  background: var(--gold);
}

.nav .btn { padding: 14px 26px; flex: none; }

/* ------------------------------------------------------------
   FOOTER — the colophon
   ------------------------------------------------------------ */

.footer {
  background: var(--ink);
  border-top: 1px solid var(--line-dark);
  padding: var(--sp-section-sm) var(--margin) 48px;
}
.footer__mark {
  font-family: var(--f-display);
  font-variation-settings: var(--display-settings);
  font-weight: 320;
  font-size: clamp(44px, 7vw, 110px);
  letter-spacing: 0.04em;
  color: var(--t-dark-1);
  line-height: 1;
}
.footer__mark span { color: var(--gold); font-style: italic; }

.footer__cols {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: var(--gutter);
  margin-top: var(--sp-block);
  padding-top: var(--sp-block);
  border-top: 1px solid var(--line-dark);
}
.footer__col h4 {
  font-size: var(--fs-micro);
  font-weight: 600;
  letter-spacing: var(--track-eyebrow);
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 22px;
}
.footer__col a, .footer__col p {
  display: block;
  font-size: 14.5px;
  color: var(--t-dark-2);
  margin-bottom: 12px;
  max-width: 34ch;
  transition: color var(--dur-fast) var(--ease-out);
}
.footer__col a:hover { color: var(--t-dark-1); }

.footer__legal {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  margin-top: var(--sp-block);
  padding-top: 28px;
  border-top: 1px solid var(--line-dark);
  font-size: 12.5px;
  color: var(--t-dark-3);
  letter-spacing: 0.06em;
}
.footer__legal nav { display: flex; gap: 28px; }
.footer__legal a:hover { color: var(--t-dark-1); }

/* ------------------------------------------------------------
   MOTIF — engraved guilloché watermark
   ------------------------------------------------------------ */

.watermark {
  position: absolute;
  pointer-events: none;
  opacity: 0.05;
}

/* ------------------------------------------------------------
   REVEAL MOTION (demo of production behavior)
   ------------------------------------------------------------ */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity var(--dur-slow) var(--ease-out),
              transform var(--dur-slow) var(--ease-out);
}
.reveal.is-in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: 0.12s; }
.reveal[data-delay="2"] { transition-delay: 0.24s; }
.reveal[data-delay="3"] { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ------------------------------------------------------------
   BREAKPOINTS — designed desktop-first
   ------------------------------------------------------------ */

@media (max-width: 1024px) {
  .nav__links { display: none; }
  .footer__cols { grid-template-columns: repeat(2, 1fr); row-gap: var(--sp-block); }
}

@media (max-width: 640px) {
  .footer__cols { grid-template-columns: 1fr; }
  .footer__legal { flex-direction: column; align-items: flex-start; }
  .btn { padding: 17px 30px; }
}
