/* ============================================================
   Stake shared stylesheet
   Light, institutional identity for stakehq.xyz
   ============================================================ */

:root {
  /* Surfaces */
  --paper: #FBFAF7;
  --paper-2: #F4F2EC;
  --card: #FFFFFF;

  /* Ink */
  --ink: #14192B;
  --ink-2: #1E2440;
  --text: #2A3040;
  --muted: #5C6472;
  --muted-dim: #8A909C;

  /* Lines */
  --line: rgba(20, 25, 43, 0.10);
  --line-soft: rgba(20, 25, 43, 0.06);
  --line-strong: rgba(20, 25, 43, 0.18);

  /* Accents */
  --navy: #1B2545;
  --brass: #9A7A34;
  --brass-bright: #B8933F;
  --brass-soft: rgba(154, 122, 52, 0.14);

  /* Type */
  --serif: "Spectral", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --maxw: 1160px;
  --pad: clamp(24px, 5vw, 72px);
}

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

html {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
}

body {
  background: var(--paper);
  color: var(--text);
  font-family: var(--sans);
  font-weight: 400;
  line-height: 1.6;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
}

/* Faint ledger grid + top glow for depth */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(120% 60% at 50% -10%, rgba(27, 37, 69, 0.05), transparent 60%);
  pointer-events: none;
  z-index: 0;
}

.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--pad);
  position: relative;
  z-index: 1;
}

a { color: inherit; }

/* ---------- Header / Nav ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(251, 250, 247, 0.82);
  backdrop-filter: saturate(140%) blur(10px);
  position: sticky;
  top: 0;
  z-index: 50;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 20px;
}

.brand {
  font-family: var(--sans);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand .mark {
  width: 13px;
  height: 13px;
  border: 1.5px solid var(--brass);
  transform: rotate(45deg);
  position: relative;
}
.brand .mark::after {
  content: "";
  position: absolute;
  inset: 3px;
  background: var(--brass);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(18px, 3vw, 40px);
  list-style: none;
}

.nav-links a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--muted);
  text-decoration: none;
  padding-block: 6px;
  position: relative;
  transition: color 0.25s ease;
}
.nav-links a:hover { color: var(--ink); }

.nav-links a[aria-current="page"] {
  color: var(--ink);
}
.nav-links a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--brass);
}

.nav-cta {
  font-family: var(--sans);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--paper) !important;
  background: var(--ink);
  padding: 10px 18px;
  border-radius: 2px;
  text-decoration: none;
  transition: background 0.25s ease, transform 0.25s ease;
}
.nav-cta:hover { background: var(--navy); transform: translateY(-1px); }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  width: 40px;
  height: 38px;
  cursor: pointer;
  color: var(--ink);
  align-items: center;
  justify-content: center;
}
.nav-toggle svg { width: 20px; height: 20px; }

@media (max-width: 780px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed;
    inset: 73px 0 auto 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 8px var(--pad) 20px;
    box-shadow: 0 24px 40px -28px rgba(20, 25, 43, 0.4);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  .nav-links.open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .nav-links li { border-bottom: 1px solid var(--line-soft); }
  .nav-links li:last-child { border-bottom: none; padding-top: 12px; }
  .nav-links a { display: block; padding-block: 14px; font-size: 16px; }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-cta { display: inline-block; text-align: center; }
}

/* ---------- Shared type ---------- */
.eyebrow {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 20px;
}

.display {
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.06;
  letter-spacing: -0.01em;
  color: var(--ink);
}

h1.display { font-size: clamp(40px, 6.2vw, 78px); }
h2.display { font-size: clamp(28px, 3.6vw, 44px); }
h3.display { font-size: clamp(21px, 2.2vw, 27px); }

.lede {
  font-size: clamp(17px, 1.55vw, 20px);
  font-weight: 300;
  color: var(--muted);
  line-height: 1.7;
  max-width: 56ch;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 13px 22px;
  border-radius: 2px;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.btn .arrow { transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.btn:hover .arrow { transform: translateX(4px); }

.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--navy); transform: translateY(-1px); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line-strong);
}
.btn-ghost:hover { border-color: var(--ink); background: var(--card); }

/* ---------- Sections ---------- */
main { flex: 1 0 auto; position: relative; z-index: 1; }

.section { padding-block: clamp(64px, 10vh, 128px); }
.section-tight { padding-block: clamp(48px, 7vh, 88px); }

.section-head { max-width: 62ch; margin-bottom: clamp(40px, 6vh, 64px); }
.section-head .lede { margin-top: 22px; }

.divider {
  height: 1px;
  background: var(--line);
  border: none;
}

/* Hero */
.hero { padding-block: clamp(72px, 13vh, 168px); }
.hero .lede { margin-top: 30px; }
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 42px;
}

.hairline {
  height: 1px;
  background: linear-gradient(to right, var(--brass), var(--line));
  margin-block: clamp(44px, 7vh, 72px);
  transform-origin: left center;
  transform: scaleX(0);
  animation: draw 1.1s cubic-bezier(0.22, 1, 0.36, 1) 0.3s forwards;
}
@keyframes draw { to { transform: scaleX(1); } }

/* Card grids */
.grid {
  display: grid;
  gap: clamp(20px, 2.4vw, 30px);
}
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

@media (max-width: 860px) {
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: clamp(26px, 3vw, 36px);
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease, box-shadow 0.3s ease;
}
.card:hover {
  border-color: var(--line-strong);
  transform: translateY(-3px);
  box-shadow: 0 30px 50px -40px rgba(20, 25, 43, 0.45);
}

.card .idx {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--brass);
  margin-bottom: 20px;
}
.card h3 {
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 12px;
  letter-spacing: -0.01em;
}
.card p { font-size: 15.5px; color: var(--muted); line-height: 1.68; }

/* Stat / principle rows */
.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(20px, 3vw, 40px);
}
@media (max-width: 720px) { .stat-row { grid-template-columns: 1fr; gap: 32px; } }

.stat .num {
  font-family: var(--serif);
  font-size: clamp(34px, 4.4vw, 52px);
  font-weight: 500;
  color: var(--ink);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat .cap {
  margin-top: 14px;
  font-size: 14.5px;
  color: var(--muted);
  max-width: 32ch;
}

/* Feature split */
.split {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(32px, 6vw, 80px);
  align-items: center;
}
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 32px; } }

.panel {
  background: var(--ink);
  border-radius: 4px;
  padding: clamp(32px, 4vw, 52px);
  color: var(--paper);
  position: relative;
  overflow: hidden;
}
.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 40%, rgba(184, 147, 63, 0.10)),
    repeating-linear-gradient(0deg, rgba(255,255,255,0.04) 0 1px, transparent 1px 40px);
  pointer-events: none;
}
.panel .eyebrow { color: var(--brass-bright); }
.panel h2, .panel h3 { color: #F5F3EE; }
.panel p { color: rgba(232, 236, 243, 0.72); }

/* Definition list rows */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid;
  grid-template-columns: 0.4fr 1fr;
  gap: clamp(16px, 3vw, 48px);
  padding-block: clamp(24px, 3vw, 34px);
  border-bottom: 1px solid var(--line);
}
@media (max-width: 720px) { .row { grid-template-columns: 1fr; gap: 10px; } }
.row .k {
  font-family: var(--mono);
  font-size: 12.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--brass);
  padding-top: 5px;
}
.row .v h3 {
  font-family: var(--serif);
  font-size: clamp(20px, 2.1vw, 25px);
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}
.row .v p { font-size: 16px; color: var(--muted); }

/* CTA band */
.cta-band {
  background: var(--ink);
  border-radius: 4px;
  padding: clamp(40px, 6vw, 72px);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-band::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(80% 120% at 50% -20%, rgba(184, 147, 63, 0.16), transparent 60%);
  pointer-events: none;
}
.cta-band h2 { color: #F5F3EE; position: relative; }
.cta-band p {
  color: rgba(232, 236, 243, 0.72);
  max-width: 48ch;
  margin: 18px auto 0;
  position: relative;
}
.cta-band .hero-actions { justify-content: center; position: relative; }
.cta-band .btn-ghost { color: #F5F3EE; border-color: rgba(255,255,255,0.24); }
.cta-band .btn-ghost:hover { border-color: rgba(255,255,255,0.6); background: rgba(255,255,255,0.04); }

/* ---------- Careers ---------- */
.role {
  display: grid;
  grid-template-columns: 1.4fr 0.9fr 0.7fr auto;
  gap: 20px;
  align-items: center;
  padding-block: 28px;
  border-bottom: 1px solid var(--line);
  transition: background 0.25s ease;
}
.role:first-child { border-top: 1px solid var(--line); }
.role .title {
  font-family: var(--serif);
  font-size: clamp(19px, 2vw, 23px);
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -0.01em;
}
.role .meta { font-size: 14px; color: var(--muted); }
.role .apply {
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.role .apply .arrow { transition: transform 0.3s cubic-bezier(0.22,1,0.36,1); color: var(--brass); }
.role .apply:hover .arrow { transform: translateX(4px); }
@media (max-width: 780px) {
  .role { grid-template-columns: 1fr; gap: 6px; padding-block: 24px; align-items: start; }
  .role .apply { margin-top: 6px; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 860px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-link {
  display: inline-block;
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 38px);
  font-weight: 500;
  color: var(--ink);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
  letter-spacing: -0.01em;
}
.contact-link::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1.5px;
  background: var(--line-strong);
  transform-origin: right center;
  transition: transform 0.4s cubic-bezier(0.22,1,0.36,1), background 0.4s ease;
}
.contact-link:hover::after { background: var(--brass); }

.info-block { margin-bottom: 30px; }
.info-block .k {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 8px;
}
.info-block .v { font-size: 16px; color: var(--text); }

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  flex-shrink: 0;
  margin-top: auto;
}
.footer-top {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(28px, 4vw, 56px);
  padding-block: clamp(48px, 7vh, 72px);
}
@media (max-width: 720px) { .footer-top { grid-template-columns: 1fr; gap: 32px; } }

.footer-top .brand { margin-bottom: 16px; }
.footer-blurb { font-size: 14.5px; color: var(--muted); max-width: 34ch; }

.footer-col h4 {
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted-dim);
  margin-bottom: 16px;
  font-weight: 500;
}
.footer-col ul { list-style: none; }
.footer-col li { margin-bottom: 11px; }
.footer-col a {
  font-size: 14.5px;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--ink); }

.footer-bottom {
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-block: 22px;
  font-family: var(--mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  color: var(--muted-dim);
}
@media (max-width: 560px) {
  .footer-bottom { flex-direction: column; align-items: flex-start; gap: 8px; }
}

/* ---------- Entrance animation ---------- */
.fade {
  opacity: 0;
  transform: translateY(16px);
  animation: rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.d1 { animation-delay: 0.04s; }
.d2 { animation-delay: 0.12s; }
.d3 { animation-delay: 0.20s; }
.d4 { animation-delay: 0.30s; }
.d5 { animation-delay: 0.42s; }
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.7s cubic-bezier(0.22,1,0.36,1), transform 0.7s cubic-bezier(0.22,1,0.36,1); }
.reveal.in { opacity: 1; transform: translateY(0); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .hairline { transform: scaleX(1); }
  .fade, .reveal { opacity: 1; transform: none; }
}
