/* Shared site-wide chrome: design tokens, header/nav, skip-link, and the
   feedback-animation utilities (reveal, shimmer, accent-rule draw-in).
   Linked from every page rather than duplicated, so the identity and the
   motion language can only drift if this one file does. Page-specific
   <style> blocks may read these tokens but shouldn't redefine them. */

:root{
  --page-bg: #f6f1e6;
  --panel: #fcf9f2;
  --ink: #1c1a17;
  --cream: #f6f1e6;
  --muted: rgba(28,26,23,0.62);
  --faint: rgba(28,26,23,0.42);
  --hairline: #e4dac5;
  --orange: #e8a317;
  --orange-deep: #b8800f;
  --orange-wash: #faecd1;
  --green: #3d5a3f;
  --green-deep: #2a3f2b;
  --green-wash: #e1e9dd;
  --accent: var(--orange);

  --font-display: 'Anton', 'Archivo Black', sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
}

*{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce){ html{ scroll-behavior: auto !important; } }

body{
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-body);
}
::selection{ background: var(--orange); color: var(--ink); }
:focus-visible{ outline: 3px solid var(--orange); outline-offset: 2px; }

.visually-hidden{
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---- skip link ---- */
.skip-link{
  position: absolute; left: -999px; top: 0; width: 1px; height: 1px; overflow: hidden;
  background: var(--ink); color: var(--cream); padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.6rem 0; font-weight: 600; font-family: var(--font-body);
  z-index: 100; text-decoration: none;
}
.skip-link:focus{ left: 0; width: auto; height: auto; overflow: visible; }

/* ---- site header / nav ---- */
.site-header{
  position: sticky; top: 0; z-index: 30;
  height: 5rem;
  background: var(--panel);
  border-bottom: 3px solid var(--ink);
  transition: height 200ms ease;
}
.site-header.shrink{ height: 3.75rem; }
.site-header-inner{
  max-width: 1080px; height: 100%; margin: 0 auto; padding: 0 1.5rem;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
}
.wordmark{
  font-family: var(--font-display); font-weight: 400; color: var(--ink);
  font-size: 1.25rem; letter-spacing: 0.02em; text-transform: uppercase;
  text-decoration: none; white-space: nowrap; position: relative; padding-bottom: 0.5rem;
  transition: font-size 200ms ease;
}
.wordmark::after{
  content: ""; position: absolute; left: 0; bottom: 0.1rem;
  width: 2.25rem; height: 4px; background: var(--orange); border-radius: 2px;
}
.site-header.shrink .wordmark{ font-size: 1.05rem; }
@media (min-width: 640px){ .wordmark{ font-size: 1.5rem; } }

.site-nav{ display: flex; flex-wrap: wrap; gap: 0.25rem 0.4rem; justify-content: flex-end; }
.site-nav a{
  display: inline-flex; align-items: center; min-height: 44px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.85rem;
  color: var(--muted); text-decoration: none; padding: 0.4rem 0.6rem;
  border-bottom: 3px solid transparent; transition: color 150ms ease, border-color 150ms ease;
}
.site-nav a:hover{ color: var(--ink); }
.site-nav a[aria-current="page"]{ color: var(--ink); border-bottom-color: var(--orange); }

@media (max-width: 640px){
  .site-header{ height: auto; padding: 0.75rem 0; }
  .site-header.shrink{ height: auto; }
  .site-header-inner{ flex-direction: column; align-items: flex-start; gap: 0.5rem; }
  .site-nav{ justify-content: flex-start; width: 100%; }
}

/* ---- scroll-reveal ---- */
.reveal{
  opacity: 0; transform: translateY(16px);
  transition: opacity 550ms cubic-bezier(.22,1,.36,1), transform 550ms cubic-bezier(.22,1,.36,1);
}
.reveal.is-visible{ opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce){
  .reveal{ opacity: 1; transform: none; transition: none; }
}

/* ---- accent rule (hand-drawn underline mark) ---- */
.accent-rule{ display: block; margin: 0 0 1rem; overflow: visible; }
.accent-rule .draw{ stroke-dasharray: 44; stroke-dashoffset: 44; }
@media (prefers-reduced-motion: no-preference){
  .accent-rule .draw{ animation: draw-line 650ms cubic-bezier(.22,1,.36,1) both; animation-delay: 150ms; }
}
@keyframes draw-line{ to{ stroke-dashoffset: 0; } }

/* ---- skeleton loading shimmer ---- */
.skeleton{
  background: linear-gradient(90deg, var(--hairline) 25%, var(--panel) 50%, var(--hairline) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 999px;
  color: transparent !important;
}
@keyframes shimmer{ 0%{ background-position: 200% 0; } 100%{ background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce){ .skeleton{ animation: none; } }

/* ---- shared elevated card ---- */
.card{
  background: var(--panel); border: 1px solid var(--hairline); border-radius: 1.25rem;
}
@media (prefers-reduced-motion: no-preference){
  .tilt:hover{ box-shadow: 0 10px 24px rgba(28,26,23,0.12); }
}

/* ---- shared primary button (orange, ink text — amber fails contrast with white) ---- */
.btn-primary{
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px;
  padding-inline: 1.1rem; border-radius: 999px; border: 2px solid var(--orange);
  background: var(--orange); color: var(--ink); font-family: var(--font-body);
  font-weight: 600; text-decoration: none;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease, box-shadow 150ms ease;
}
.btn-primary:hover{ background: var(--orange-deep); border-color: var(--orange-deep); box-shadow: 0 4px 14px rgba(232,163,23,0.4); }
.btn-primary:active{ transform: scale(0.96); }

/* ---- press feedback, shared by any button/pill on the site ---- */
@media (prefers-reduced-motion: no-preference){
  .tilt{ transition: transform 150ms ease; will-change: transform; }
}
