/* Cache Consulting, shared styles */

@import url('https://fonts.googleapis.com/css2?family=Spectral:ital,wght@0,300;0,400;0,500;0,600;0,700;1,400&family=Inter+Tight:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --paper: #F4EFE6;
  --paper-2: #ECE5D8;
  --ink: #14110E;
  --ink-2: #3A332B;
  --ink-3: #6E665B;
  --rule: #D9D0BF;
  --accent: #B5482E;
  --accent-deep: #8E3520;
  --accent-soft: #E8C7B8;
  --ok: #2F6B4A;

  --serif: 'Spectral', 'Iowan Old Style', 'Apple Garamond', Georgia, serif;
  --sans: 'Inter Tight', 'Helvetica Neue', system-ui, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, monospace;

  --container: 1240px;
  --gutter: 32px;
  --radius: 4px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

/* Subtle paper grain */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.4;
  mix-blend-mode: multiply;
  background-image:
    radial-gradient(rgba(20,17,14,0.025) 1px, transparent 1px),
    radial-gradient(rgba(20,17,14,0.018) 1px, transparent 1px);
  background-size: 3px 3px, 7px 7px;
  background-position: 0 0, 1px 2px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gutter);
  position: relative;
  z-index: 2;
}

/* ───────── TYPOGRAPHY ───────── */
.eyebrow {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 1px;
  background: var(--ink-3);
}
.eyebrow.no-rule::before { display: none; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: clamp(48px, 6.4vw, 92px); line-height: 0.98; letter-spacing: -0.025em; }
h2 { font-size: clamp(34px, 3.8vw, 54px); line-height: 1.05; letter-spacing: -0.02em; }
h3 { font-size: clamp(22px, 2vw, 28px); line-height: 1.2; }
h4 { font-size: 18px; line-height: 1.3; font-weight: 500; }

.italic { font-style: italic; }
.accent-text { color: var(--accent); }

p { margin: 0 0 1em; color: var(--ink-2); text-wrap: pretty; }
p.lede { font-size: 21px; line-height: 1.5; color: var(--ink-2); max-width: 60ch; }

/* ───────── NAV ───────── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(10px);
  background: rgba(244, 239, 230, 0.82);
  border-bottom: 1px solid var(--rule);
}
.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}
.brand {
  font-family: var(--serif);
  font-size: 22px;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
}
.brand-mark {
  width: 28px;
  height: 28px;
  display: inline-block;
  flex-shrink: 0;
}
.brand small {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-left: 2px;
}
.nav-links {
  display: flex;
  gap: 28px;
  align-items: center;
  font-size: 14px;
  font-weight: 500;
}
.nav-links a {
  color: var(--ink-2);
  position: relative;
  padding: 6px 0;
  transition: color .2s ease;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active { color: var(--ink); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 1px;
  background: var(--accent);
}
.nav-cta {
  background: var(--ink);
  color: var(--paper);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  transition: background .2s ease, transform .15s ease;
}
.nav-cta:hover { background: var(--accent); transform: translateY(-1px); }

/* ───────── BUTTONS ───────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--sans);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .2s ease;
  text-decoration: none;
  white-space: nowrap;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--accent);
  transform: translateY(-1px);
}
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover {
  background: var(--ink);
  color: var(--paper);
}
.btn-link {
  background: transparent;
  color: var(--ink);
  padding: 0;
  border-radius: 0;
  border-bottom: 1px solid var(--ink);
  padding-bottom: 2px;
}
.btn-link:hover { color: var(--accent); border-color: var(--accent); }
.btn .arrow {
  width: 14px; height: 14px;
  transition: transform .2s ease;
}
.btn:hover .arrow { transform: translateX(3px); }

/* ───────── SECTION ───────── */
section {
  padding: 96px 0;
  position: relative;
  z-index: 2;
}
section.tight { padding: 64px 0; }
.section-head {
  display: grid;
  grid-template-columns: 1fr 2fr;
  gap: 64px;
  align-items: end;
  margin-bottom: 56px;
  border-top: 1px solid var(--rule);
  padding-top: 32px;
}
.section-num {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
  letter-spacing: 0.05em;
}

/* ───────── FOOTER ───────── */
footer {
  background: var(--ink);
  color: var(--paper-2);
  padding: 72px 0 40px;
  position: relative;
  z-index: 2;
}
footer .container {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px;
}
footer h4 {
  color: var(--paper);
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
footer ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
footer li a { color: var(--paper-2); opacity: 0.75; font-size: 14px; transition: opacity .2s; }
footer li a:hover { opacity: 1; color: var(--accent-soft); }
footer .brand-block { max-width: 320px; }
footer .brand-block .brand { color: var(--paper); margin-bottom: 16px; }
footer .brand-block p { color: var(--paper-2); opacity: 0.7; font-size: 14px; }
.foot-bottom {
  max-width: var(--container);
  margin: 56px auto 0;
  padding: 24px var(--gutter) 0;
  border-top: 1px solid rgba(255,255,255,0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--paper-2);
  opacity: 0.6;
  font-family: var(--mono);
}

/* ───────── FORMS ───────── */
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 24px;
}
.field label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.field input, .field textarea, .field select {
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--rule);
  padding: 10px 0;
  font-family: var(--sans);
  font-size: 16px;
  color: var(--ink);
  border-radius: 0;
  transition: border-color .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-bottom-color: var(--accent);
}
.field textarea { resize: vertical; min-height: 100px; }

/* ───────── UTILITY ───────── */
.divider {
  height: 1px;
  background: var(--rule);
  margin: 0;
  border: 0;
}
.muted { color: var(--ink-3); }
.serif { font-family: var(--serif); }
.mono { font-family: var(--mono); font-size: 0.85em; }

/* Reveal animation */
.reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .8s cubic-bezier(.2,.7,.2,1), transform .8s cubic-bezier(.2,.7,.2,1);
}
.reveal.in {
  opacity: 1;
  transform: translateY(0);
}

@media (max-width: 880px) {
  .nav-links { display: none; }
  .nav-links.cta-only { display: flex; }
  .section-head { grid-template-columns: 1fr; gap: 24px; }
  footer .container { grid-template-columns: 1fr 1fr; }
  footer .brand-block { grid-column: 1 / -1; }
}
