/* Craft shared — parity systems for non-cinematic template families */

:root {
  --craft-text-body: #334155;
  --craft-text-muted: #64748b;
  --craft-text-label: #0f766e;
  --craft-header-h: 4rem;
  --craft-header-h-lg: 5rem;
}

.dark {
  --craft-page-bg: #020617;
  --craft-text-body: #cbd5e1;
  --craft-text-muted: #94a3b8;
  --craft-text-label: #5eead4;
}

.craft-text-body { color: var(--craft-text-body); }
.craft-text-muted { color: var(--craft-text-muted); }
.craft-text-label { color: var(--craft-text-label); }
.craft-scroll-mt { scroll-margin-top: calc(var(--craft-header-h) + 0.75rem); }
@media (min-width: 1024px) {
  .craft-scroll-mt { scroll-margin-top: calc(var(--craft-header-h-lg) + 0.75rem); }
}

/* Lenis (parity smooth scroll) */
html.lenis,
html.lenis body {
  height: auto;
}
html.lenis,
html.lenis.lenis-smooth {
  overflow-y: scroll !important;
  scroll-behavior: auto !important;
}
.lenis.lenis-smooth [data-lenis-prevent] {
  overscroll-behavior: contain;
}

/* Scroll reveals */
[data-animate] {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
[data-animate].in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* Focus / a11y */
.craft-focus-ring:focus-visible {
  outline: 2px solid var(--brand-500, #f97316);
  outline-offset: 2px;
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--brand-500, #f97316);
  outline-offset: 2px;
}

/* Mobile nav open lock */
body.craft-nav-open {
  overflow: hidden;
}
.craft-nav-scrim {
  position: fixed;
  inset: 0;
  background: rgb(2 6 23 / 0.55);
  z-index: 45;
}

/* Form fields */
.craft-field {
  width: 100%;
  border-radius: var(--craft-radius, 0.5rem);
  border: 1px solid rgb(203 213 225);
  background: #fff;
  padding: 0.75rem 1rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.craft-field:focus {
  outline: none;
  border-color: var(--brand-500, #f97316);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-500, #f97316) 35%, transparent);
}
.dark .craft-field {
  background: rgb(15 23 42);
  border-color: rgb(51 65 85);
  color: rgb(226 232 240);
}
.craft-form-card {
  border-radius: calc(var(--craft-radius, 0.5rem) + 0.25rem);
  background: color-mix(in srgb, #fff 92%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid rgb(226 232 240);
  box-shadow: 0 12px 40px -16px rgb(0 0 0 / 0.18);
}
.dark .craft-form-card {
  background: color-mix(in srgb, rgb(15 23 42) 88%, transparent);
  border-color: rgb(51 65 85);
}

/* Active nav non-color cue */
.craft-nav-link.is-active {
  box-shadow: inset 0 -2px 0 var(--brand-400, #fb923c);
  font-weight: 700;
}

/* Eyebrow */
.craft-section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-600, #ea580c);
}

/* Footer link focus */
.craft-footer-link:focus-visible {
  outline: 2px solid var(--brand-400, #fb923c);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Density helpers */
body[data-density="compact"] .craft-section-pad {
  padding-top: 3rem;
  padding-bottom: 3rem;
}
body[data-density="roomy"] .craft-section-pad {
  padding-top: 4rem;
  padding-bottom: 4rem;
}

/* Card styles */
body[data-card="bordered"] .craft-card {
  border: 1px solid rgb(226 232 240);
  border-radius: var(--craft-radius);
}
body[data-card="soft"] .craft-card {
  border: none;
  box-shadow: 0 4px 24px -6px rgb(0 0 0 / 0.1);
  border-radius: calc(var(--craft-radius) + 0.25rem);
}
body[data-card="glass"] .craft-card {
  background: color-mix(in srgb, #fff 8%, transparent);
  backdrop-filter: blur(12px);
  border: 1px solid rgb(255 255 255 / 0.12);
}

/* Hero recipe layout hooks */
.craft-hero-split {
  display: grid;
  gap: 2rem;
}
@media (min-width: 1024px) {
  .craft-hero-split {
    grid-template-columns: 1.1fr 0.9fr;
    align-items: center;
  }
}
