/* ===================================================================
   The Shelton Group — shared visual system
   Tokens, base, nav, buttons, links, footer, motion.
   Page-specific styles live inline in each page.
=================================================================== */

:root {
  --bg-primary: #F4F0E8;
  --bg-alt: #ECE7DD;
  --surface-dark: #0F0E0C;
  --text-primary: #0F0E0C;
  --text-secondary: #4A4641;
  --text-muted: #8A847B;
  --text-on-dark: #F4F0E8;
  --border-subtle: #D8D2C5;
  --accent-ink: #5C1F1F;

  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Inter", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;

  --page-max: 1280px;
  --content-max: 1080px;
  --pad-x: 48px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  animation: pageEntry 400ms ease-out both;
}

@keyframes pageEntry { from { opacity: 0; } to { opacity: 1; } }

::selection { background: var(--accent-ink); color: var(--text-on-dark); }

a { color: inherit; }

/* ---------- Shared structure ---------- */
.page { max-width: var(--page-max); margin: 0 auto; padding: 0 var(--pad-x); }

.eyebrow {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0;
}

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rule { height: 1px; background: var(--border-subtle); border: 0; margin: 0; }

section { padding: 108px 0; }

.section-heading {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(40px, 4.4vw, 56px);
  line-height: 1.1;
  letter-spacing: -0.01em;
  margin: 20px 0 0;
  text-wrap: balance;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 2px;
  cursor: pointer;
  transition: background 200ms ease-out, color 200ms ease-out, border-color 200ms ease-out;
}
.btn-primary {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding: 14px 28px;
  border: 1px solid var(--surface-dark);
}
.btn-primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn-primary .arrow { transition: transform 200ms ease-out; }
.btn-primary:hover .arrow { transform: translateX(3px); }

.btn-ghost {
  background: transparent;
  color: var(--surface-dark);
  border: 1px solid var(--surface-dark);
  padding: 14px 28px;
}
.btn-ghost:hover { background: var(--surface-dark); color: var(--text-on-dark); }

/* ---------- Text link ---------- */
.textlink {
  color: var(--text-primary);
  text-decoration: none;
  font-weight: 500;
  background-image: linear-gradient(var(--accent-ink), var(--accent-ink));
  background-repeat: no-repeat;
  background-position: 0 calc(100% + 2px);
  background-size: 100% 1px;
  padding-bottom: 2px;
  transition: background-size 200ms ease-out;
}
.textlink:hover { background-size: 100% 2px; }

/* ---------- Navigation ---------- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  z-index: 50;
  display: flex;
  align-items: center;
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 200ms ease-out, border-color 200ms ease-out;
}
.nav.scrolled {
  background: var(--bg-primary);
  border-bottom: 1px solid var(--border-subtle);
}
.nav .page { display: flex; align-items: center; justify-content: space-between; width: 100%; }
.wordmark {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: 22px;
  letter-spacing: -0.01em;
  color: var(--text-primary);
  text-decoration: none;
  white-space: nowrap;
}
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-links a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--text-primary);
  text-decoration: none;
  transition: color 200ms ease-out;
}
.nav-links a.plain:hover { color: var(--accent-ink); }
.nav-links a.active { color: var(--accent-ink); }
.nav-links .btn-primary { padding: 10px 20px; color: var(--text-on-dark); }

/* ---------- Footer ---------- */
.footer {
  background: var(--surface-dark);
  color: var(--text-on-dark);
  padding: 96px 0;
}
.footer .page { max-width: var(--page-max); }
.footer-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 48px;
  flex-wrap: wrap;
}
.footer-wordmark { color: var(--text-on-dark); font-size: 26px; }
.footer-links { display: flex; gap: 32px; flex-wrap: wrap; }
.footer-links a {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 14px;
  color: var(--text-on-dark);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 200ms ease-out;
}
.footer-links a:hover { opacity: 1; }
.footer-rule { height: 1px; background: rgba(244,240,232,0.15); border: 0; margin: 56px 0 28px; }
.footer-bottom {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.footer-email {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-on-dark);
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 200ms ease-out;
}
.footer-email:hover { opacity: 1; }
.footer-copy {
  font-family: var(--font-body);
  font-size: 13px;
  color: var(--text-on-dark);
  opacity: 0.5;
}

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(12px); transition: opacity 600ms ease-out, transform 600ms ease-out; }
.reveal.in { opacity: 1; transform: none; }

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

/* ---------- Shared responsive ---------- */
@media (max-width: 900px) {
  :root { --pad-x: 24px; }
  section { padding: 80px 0; }
  .nav-links { gap: 20px; }
  .nav-links a.plain { display: none; }
  .footer { padding: 72px 0; }
}
