/* Equilibria — shared site styles (brand tokens, reset, reusable components) */

:root {
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --display: "Cormorant Garamond", Georgia, serif;
  --body: "EB Garamond", Georgia, serif;

  --crimson: #AF1D1E;
  --crimson-deep: #8E1517;
  --cream: #F4EFE6;
  --cream-soft: #F7F3EB;
  --paper: #FBF8F2;
  --ink: #221E1C;
  --ink-soft: #52483F;
  --line: rgba(34, 30, 28, 0.16);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; overflow-x: hidden; }
dd { overflow-wrap: anywhere; }
body { background: #ECE7DC; font-family: var(--body); }
img { display: block; max-width: 100%; }
a { -webkit-tap-highlight-color: transparent; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── CTA buttons ─────────────────────────────────────────────────────── */
.eq-cta-btn {
  transition: transform .28s ease, background .28s ease, color .28s ease, box-shadow .28s ease;
  cursor: pointer;
}
.eq-cta-btn:hover { transform: translateY(-3px); }
.eq-cta-solid { box-shadow: 0 10px 30px rgba(20,18,16,0.22); }
.eq-cta-solid:hover { box-shadow: 0 16px 40px rgba(20,18,16,0.32); }
.eq-cta-ghost:hover { background: var(--crimson) !important; color: var(--cream) !important; }
.eq-arrow { transition: transform .28s ease; display: inline-block; }
.eq-cta-btn:hover .eq-arrow { transform: translateX(7px); }

/* ── Sticky header ───────────────────────────────────────────────────── */
.eq-site-header {
  position: sticky;
  top: 0;
  z-index: 200;
  transition: box-shadow 0.4s cubic-bezier(.22,.8,.32,1), backdrop-filter 0.4s ease;
}
.eq-site-header.scrolled {
  box-shadow: 0 1px 24px rgba(34,30,28,0.10);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* ── Nav hover underline ─────────────────────────────────────────────── */
.eq-header-nav a.eq-nav-link { position: relative; cursor: pointer; text-decoration: none; color: inherit; }
.eq-header-nav a.eq-nav-link::after {
  content: '';
  position: absolute;
  left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.32s cubic-bezier(.22,.8,.32,1);
}
.eq-header-nav a.eq-nav-link:hover::after { transform: scaleX(1); transform-origin: left; }

/* ── Image zoom on hover ─────────────────────────────────────────────── */
.eq-img-zoom { overflow: hidden; }
.eq-img-zoom > * { transition: transform 0.7s cubic-bezier(.22,.8,.32,1); }
.eq-img-zoom:hover > * { transform: scale(1.03); }

/* ── Scroll reveal engine ────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transform: translateY(var(--rv-y, 26px)) scale(var(--rv-scale, 1));
  transition-property: opacity, transform, filter;
  transition-duration: var(--rv-duration, 0.75s);
  transition-timing-function: cubic-bezier(.22,.8,.32,1);
  transition-delay: var(--rv-delay, 0s);
}
[data-reveal][data-blur] { filter: blur(8px); }
[data-reveal].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Horizontal line that draws itself left-to-right */
[data-reveal-line] {
  transform-origin: left center;
  transform: scaleX(0);
  transition: transform var(--rv-duration, 0.9s) cubic-bezier(.22,.8,.32,1);
  transition-delay: var(--rv-delay, 0s);
}
[data-reveal-line].is-visible { transform: scaleX(1); }

/* ── Form controls ───────────────────────────────────────────────────── */
.eq-input, .eq-textarea, .eq-select {
  width: 100%; box-sizing: border-box; font-family: var(--body);
  font-size: 18px; color: var(--ink); background: var(--paper);
  border: 1px solid var(--line); border-radius: 0; padding: 14px 16px;
  transition: border-color .25s ease, box-shadow .25s ease; outline: none;
}
.eq-input:focus, .eq-textarea:focus, .eq-select:focus {
  border-color: var(--crimson); box-shadow: 0 0 0 3px rgba(175,29,30,0.12);
}
.eq-textarea { resize: vertical; min-height: 130px; line-height: 1.55; }
.eq-select {
  appearance: none; -webkit-appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23AF1D1E' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 16px center; padding-right: 42px;
}
.eq-form-btn { transition: transform .28s ease, box-shadow .28s ease; cursor: pointer; border: none; }
.eq-form-btn:hover:not(:disabled) { transform: translateY(-3px); box-shadow: 0 16px 40px rgba(175,29,30,0.32); }
.eq-form-btn:hover:not(:disabled) .eq-arrow { transform: translateX(7px); }
.eq-form-btn:disabled { opacity: 0.55; cursor: default; }
.eq-form-error {
  font-family: var(--mono); font-size: 13.5px; color: var(--crimson);
  background: rgba(175,29,30,0.08); border: 1px solid rgba(175,29,30,0.3);
  padding: 12px 16px; margin: 0 0 22px;
}

/* ── Cookie consent banner ───────────────────────────────────────────── */
@keyframes eqCookieIn { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: none; } }
.eq-cookie {
  position: fixed; right: 28px; bottom: 28px; z-index: 1000; width: 380px; max-width: calc(100vw - 40px);
  background: var(--paper); border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(34,30,28,0.22);
  padding: 26px 26px 24px; font-family: var(--body); color: var(--ink);
  animation: eqCookieIn .6s cubic-bezier(.22,.8,.32,1) both;
}
.eq-cookie-btn { transition: transform .2s ease, background .25s ease, color .25s ease, box-shadow .25s ease; cursor: pointer; }
.eq-cookie-accept:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(175,29,30,0.3); }
.eq-cookie-reject:hover, .eq-cookie-settings:hover { transform: translateY(-2px); border-color: var(--ink); }
.eq-cookie-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); }
.eq-cookie-row:first-child { border-top: none; }
.eq-cookie-switch { position: relative; width: 40px; height: 22px; flex-shrink: 0; }
.eq-cookie-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.eq-cookie-switch .track {
  position: absolute; inset: 0; background: var(--line); border-radius: 999px; transition: background .2s ease;
}
.eq-cookie-switch .thumb {
  position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%;
  background: var(--paper); box-shadow: 0 1px 3px rgba(0,0,0,0.3); transition: transform .2s ease;
}
.eq-cookie-switch input:checked + .track { background: var(--crimson); }
.eq-cookie-switch input:checked + .track .thumb { transform: translateX(18px); }
.eq-cookie-switch input:disabled + .track { opacity: 0.5; cursor: default; }
@media (max-width: 560px) {
  .eq-cookie { left: 16px !important; right: 16px !important; bottom: 16px !important; width: auto !important; max-width: none !important; }
}
