/*
 * Hagens Family Orchard — theme.css
 * Custom styles that complement theme.json design tokens.
 * Keep this lean — prefer theme.json for tokens, this file for layout & motion.
 */

/* ----------------------------------------------------------------------
   1. Root + page foundations
   ---------------------------------------------------------------------- */

html { scroll-behavior: smooth; }

body {
  background-color: var(--wp--preset--color--pie-crust);
  color: var(--wp--preset--color--bark-brown);
  font-family: var(--wp--preset--font-family--body);
  font-feature-settings: "kern", "liga", "calt";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Subtle paper texture on body — lifts the cream off being sterile */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: -1;
  background-image:
    radial-gradient(circle at 25% 15%, rgba(168, 51, 43, 0.025) 0%, transparent 35%),
    radial-gradient(circle at 80% 80%, rgba(63, 95, 58, 0.025) 0%, transparent 40%),
    radial-gradient(circle at 50% 50%, rgba(232, 128, 75, 0.012) 0%, transparent 60%);
}

/* ----------------------------------------------------------------------
   2. Logo / wordmark
   ---------------------------------------------------------------------- */

.hfo-logo-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  text-decoration: none !important;
  color: var(--wp--preset--color--barn-red);
  transition: color 200ms ease;
}
.hfo-logo-link:hover { color: var(--wp--preset--color--peach-sunset); }

.hfo-logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  color: var(--wp--preset--color--barn-red);
}
.hfo-logo-mark svg { width: 100%; height: 100%; }

.hfo-logo-text {
  display: inline-flex;
  flex-direction: column;
  line-height: 1;
}
.hfo-logo-line1 {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--wp--preset--color--deep-bark);
  letter-spacing: -0.01em;
}
.hfo-logo-line2 {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 600;
  font-size: 0.78rem;
  color: var(--wp--preset--color--bark-brown);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* ----------------------------------------------------------------------
   3. Header / navigation
   ---------------------------------------------------------------------- */

.hfo-site-header { position: sticky; top: 0; z-index: 50; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); background-color: rgba(251, 246, 236, 0.92) !important; }

.hfo-primary-nav .wp-block-navigation-item__content {
  color: var(--wp--preset--color--bark-brown);
  font-family: var(--wp--preset--font-family--body);
  text-decoration: none;
  position: relative;
  padding-bottom: 4px;
}
.hfo-primary-nav .wp-block-navigation-item__content::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background-color: var(--wp--preset--color--peach-sunset);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 220ms ease;
}
.hfo-primary-nav .wp-block-navigation-item__content:hover::after { transform: scaleX(1); }

/* ----------------------------------------------------------------------
   4. Hero — textured backdrop + hand-drawn illustration container
   ---------------------------------------------------------------------- */

.hfo-hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.hfo-hero::before {
  /* Layered warm wash — peach + cream gradient blend, NOT a flat gradient */
  content: "";
  position: absolute; inset: 0; z-index: -2;
  background:
    radial-gradient(ellipse 70% 80% at 80% 30%, rgba(232, 128, 75, 0.18) 0%, transparent 65%),
    radial-gradient(ellipse 60% 70% at 15% 70%, rgba(168, 51, 43, 0.10) 0%, transparent 60%),
    var(--wp--preset--color--pie-crust);
}
.hfo-hero::after {
  /* Subtle hand-drawn line accents — diagonal scratchy texture */
  content: "";
  position: absolute; inset: 0; z-index: -1; opacity: 0.06; pointer-events: none;
  background-image: repeating-linear-gradient(
    132deg,
    var(--wp--preset--color--bark-brown) 0,
    var(--wp--preset--color--bark-brown) 1px,
    transparent 1px, transparent 14px
  );
}

.hfo-hero-illustration {
  width: 100%;
  max-width: 420px;
  height: auto;
  display: block;
  margin: 0 auto;
}
.hfo-hero-illustration svg { width: 100%; height: auto; }

@media (min-width: 1024px) {
  .hfo-hero-illustration { max-width: 520px; }
}

/* ----------------------------------------------------------------------
   5. Eyebrow / Caveat hand-lettered accent
   ---------------------------------------------------------------------- */

.hfo-eyebrow {
  font-family: var(--wp--preset--font-family--accent);
  font-weight: 700;
  font-size: clamp(1.4rem, 1rem + 1vw, 2rem);
  color: var(--wp--preset--color--barn-red);
  display: inline-block;
  transform: rotate(-2deg);
  line-height: 1;
}

/* ----------------------------------------------------------------------
   6. Trust row badges
   ---------------------------------------------------------------------- */

.hfo-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  align-items: center;
  font-size: 0.95rem;
  color: var(--wp--preset--color--bark-brown);
}
.hfo-trust-row > span {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.hfo-trust-row > span::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background-color: var(--wp--preset--color--orchard-green);
  flex-shrink: 0;
}

/* ----------------------------------------------------------------------
   7. Pain points (Section 2 — Problem)
   ---------------------------------------------------------------------- */

.hfo-pain-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}
.hfo-pain-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.85rem;
  padding: 1rem 1.25rem;
  background: var(--wp--preset--color--stone-mill);
  border-radius: 8px;
  border-left: 4px solid var(--wp--preset--color--peach-sunset);
  font-size: 1.05rem;
  line-height: 1.5;
}
.hfo-pain-list li::before {
  content: "→";
  color: var(--wp--preset--color--barn-red);
  font-weight: 700;
  flex-shrink: 0;
  font-size: 1.1rem;
  line-height: 1.4;
}

/* ----------------------------------------------------------------------
   8. The Hagens Way — numbered steps (Section 4 — Solution)
   ---------------------------------------------------------------------- */

.hfo-way-step {
  position: relative;
  padding: 1.75rem 1.5rem 1.5rem 1.5rem;
  background: var(--wp--preset--color--pie-crust);
  border: 1px solid var(--wp--preset--color--stone-mill);
  border-radius: 12px;
  transition: transform 240ms ease, box-shadow 240ms ease, border-color 240ms ease;
}
.hfo-way-step:hover {
  transform: translateY(-4px);
  border-color: var(--wp--preset--color--peach-sunset);
  box-shadow: 0 12px 28px -16px rgba(58, 45, 34, 0.25);
}
.hfo-way-step__number {
  position: absolute;
  top: -18px; left: 1.25rem;
  width: 44px; height: 44px;
  border-radius: 999px;
  background: var(--wp--preset--color--barn-red);
  color: var(--wp--preset--color--pie-crust);
  font-family: var(--wp--preset--font-family--display);
  font-weight: 700;
  font-size: 1.35rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px -4px rgba(168, 51, 43, 0.4);
}
.hfo-way-step__title {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 700;
  font-size: 1.4rem;
  color: var(--wp--preset--color--deep-bark);
  margin: 0.5rem 0 0.5rem 0;
  line-height: 1.2;
}
.hfo-way-step__body {
  margin: 0;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--wp--preset--color--bark-brown);
}

/* ----------------------------------------------------------------------
   9. In-Season chalkboard board (Section 5 — Evidence)
   ---------------------------------------------------------------------- */

.hfo-chalkboard {
  background:
    radial-gradient(ellipse at center, rgba(255,255,255,0.05) 0%, transparent 60%),
    var(--wp--preset--color--orchard-green);
  border: 14px solid #6B4A2B;
  border-radius: 6px;
  padding: 2.5rem 2rem;
  color: var(--wp--preset--color--pie-crust);
  box-shadow: inset 0 0 30px rgba(0,0,0,0.25), 0 18px 40px -20px rgba(0,0,0,0.3);
  position: relative;
}
.hfo-chalkboard__title {
  font-family: var(--wp--preset--font-family--accent);
  font-weight: 700;
  font-size: clamp(2rem, 1.5rem + 2vw, 3.25rem);
  text-align: center;
  margin: 0 0 0.5rem 0;
  color: #FBF6EC;
  text-shadow: 0 0 8px rgba(255,255,255,0.05);
  line-height: 1;
}
.hfo-chalkboard__subtitle {
  text-align: center;
  font-family: var(--wp--preset--font-family--body);
  font-size: 1rem;
  color: rgba(251, 246, 236, 0.75);
  margin: 0 0 2rem 0;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.hfo-chalkboard__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem 1.5rem;
}
@media (min-width: 720px) {
  .hfo-chalkboard__list { grid-template-columns: 1fr 1fr; }
}
.hfo-chalkboard__list li {
  font-family: var(--wp--preset--font-family--accent);
  font-size: 1.4rem;
  display: flex;
  align-items: baseline;
  gap: 0.65rem;
}
.hfo-chalkboard__list li::before {
  content: "✻";
  color: var(--wp--preset--color--peach-sunset);
  font-size: 1rem;
}
.hfo-chalkboard__note {
  text-align: center;
  font-family: var(--wp--preset--font-family--body);
  font-size: 0.85rem;
  color: rgba(251, 246, 236, 0.6);
  margin: 1.75rem 0 0 0;
  letter-spacing: 0.05em;
}

/* ----------------------------------------------------------------------
   10. Visit / Action card (Section 6 — Action)
   ---------------------------------------------------------------------- */

.hfo-visit-card {
  background: var(--wp--preset--color--stone-mill);
  border: 2px solid var(--wp--preset--color--barn-red);
  border-radius: 16px;
  padding: 2rem 1.75rem;
  display: grid;
  gap: 0.65rem;
}
.hfo-visit-card__label {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  color: var(--wp--preset--color--barn-red);
}
.hfo-visit-card__value {
  font-family: var(--wp--preset--font-family--display);
  font-weight: 600;
  font-size: 1.5rem;
  line-height: 1.25;
  color: var(--wp--preset--color--deep-bark);
  margin: 0;
}
.hfo-visit-card__detail {
  font-size: 1rem;
  color: var(--wp--preset--color--bark-brown);
  margin: 0;
  line-height: 1.55;
}

/* ----------------------------------------------------------------------
   11. Sticky mobile CTA (Sonic Boom mobile pattern)
   ---------------------------------------------------------------------- */

.hfo-sticky-cta {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  background: var(--wp--preset--color--pie-crust);
  border-top: 1px solid var(--wp--preset--color--stone-mill);
  display: flex;
  padding: 0.5rem;
  gap: 0.5rem;
  box-shadow: 0 -4px 12px -6px rgba(58, 45, 34, 0.18);
}
.hfo-sticky-cta a {
  flex: 1;
  text-align: center;
  padding: 0.85rem 0.5rem;
  border-radius: 999px;
  text-decoration: none;
  font-family: var(--wp--preset--font-family--body);
  font-weight: 600;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: background-color 200ms ease;
}
.hfo-sticky-cta a.is-primary {
  background: var(--wp--preset--color--barn-red);
  color: var(--wp--preset--color--pie-crust);
}
.hfo-sticky-cta a.is-primary:hover { background: var(--wp--preset--color--peach-sunset); color: var(--wp--preset--color--deep-bark); }
.hfo-sticky-cta a.is-secondary {
  background: var(--wp--preset--color--stone-mill);
  color: var(--wp--preset--color--deep-bark);
  border: 1px solid var(--wp--preset--color--worn-stone);
}
.hfo-sticky-cta a.is-secondary:hover { background: var(--wp--preset--color--pie-crust); }

/* Hide sticky bar on desktop */
@media (min-width: 768px) { .hfo-sticky-cta { display: none; } }

/* And give mobile body extra bottom padding so the bar doesn't cover the footer */
@media (max-width: 767.98px) { body { padding-bottom: 84px; } }

/* ----------------------------------------------------------------------
   12. Reveal-on-scroll (intersection-observer driven, JS in front-page)
   ---------------------------------------------------------------------- */

.hfo-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 600ms ease, transform 600ms cubic-bezier(.22,.36,.21,1.01);
  will-change: opacity, transform;
}
.hfo-reveal.is-revealed { opacity: 1; transform: none; }

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

/* ----------------------------------------------------------------------
   13. Footer list polish
   ---------------------------------------------------------------------- */

.hfo-footer-list { list-style: none !important; padding: 0 !important; margin: 0; }
.hfo-footer-list li { margin: 0 0 0.45rem 0; }
.hfo-footer-list a {
  color: var(--wp--preset--color--bark-brown);
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: border-color 180ms ease, color 180ms ease;
}
.hfo-footer-list a:hover {
  color: var(--wp--preset--color--barn-red);
  border-bottom-color: var(--wp--preset--color--peach-sunset);
}

/* ----------------------------------------------------------------------
   14. Generic page headings polish (not theme.json-coverable)
   ---------------------------------------------------------------------- */

.hfo-section-eyebrow {
  font-family: var(--wp--preset--font-family--body);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.85rem;
  color: var(--wp--preset--color--barn-red);
  display: inline-block;
  margin-bottom: 0.5rem;
}

/* Remove default WP button border ring on focus, replace with on-brand */
.wp-element-button:focus-visible,
.wp-block-button__link:focus-visible {
  outline: 3px solid var(--wp--preset--color--peach-sunset);
  outline-offset: 3px;
}
