:root {
  --hww-bg: #FAF8F3;
  --hww-ink: #24312F;
  --hww-teal: #3D6B66;
  --hww-teal-dark: #2C4D49;
  --hww-copper: #A85C32;
  --hww-copper-dark: #8A4A28;
  --hww-stone: #DAD3C4;
  --hww-stone-light: #EFEAE0;
  --font-display: 'Fraunces', Georgia, serif;
  --font-body: 'Public Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

body {
  background-color: var(--hww-bg);
  color: var(--hww-ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
}

h1, h2, h3, h4, h5, h6,
.entry-title, .page-title {
  font-family: var(--font-display);
  color: var(--hww-ink);
  font-weight: 600;
  letter-spacing: -0.01em;
}

h1, .entry-title { font-weight: 700; }

a {
  color: var(--hww-teal);
  text-decoration-thickness: 1.5px;
  text-underline-offset: 2px;
}
a:hover { color: var(--hww-teal-dark); }

/* Content measure for readability: cap text elements only, not the container */
.entry-content > p,
.entry-content > ul,
.entry-content > ol {
  max-width: 68ch;
}

/* Header / nav */
.main-header-bar,
.ast-above-header {
  background-color: var(--hww-bg);
  border-bottom: 1px solid var(--hww-stone);
}
.main-header-bar .site-title a,
.main-header-bar .site-title {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--hww-teal-dark) !important;
}
.main-navigation ul li > a {
  font-family: var(--font-body);
  font-weight: 600;
  color: var(--hww-ink);
}
.main-navigation ul li > a:hover { color: var(--hww-teal); }

/* Buttons - copper accent, used sparingly */
.ast-button, button, input[type="submit"], .wp-block-button__link {
  background-color: var(--hww-copper) !important;
  border-color: var(--hww-copper) !important;
  color: #fff !important;
  font-family: var(--font-body);
  font-weight: 600;
  border-radius: 4px;
}
.ast-button:hover, .wp-block-button__link:hover {
  background-color: var(--hww-copper-dark) !important;
}

/* Footer */
.ast-small-footer, footer.site-footer {
  background-color: var(--hww-teal-dark);
  color: var(--hww-stone-light);
}
.ast-small-footer a { color: #fff; }

/* Signature element: Bottom Line verdict callout */
.hww-verdict {
  border: 2px solid var(--hww-copper);
  background-color: var(--hww-stone-light);
  border-radius: 6px;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0 2rem;
}
.hww-verdict-label {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--hww-copper-dark);
  text-transform: uppercase;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  display: block;
  margin-bottom: 0.4rem;
}

/* Pillar hub card grid */
.hww-card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}
.hww-card {
  background: #fff;
  border-top: 3px solid var(--hww-teal);
  border-radius: 6px;
  padding: 1.25rem;
  box-shadow: 0 1px 3px rgba(36,49,47,0.08);
}
.hww-card a {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.1rem;
}
/* Card titles: clean headline links, no underline (underline reserved for inline body copy) */
.hww-card a {
  text-decoration: none;
  color: var(--hww-teal-dark);
}
.hww-card a:hover {
  color: var(--hww-copper);
  text-decoration: underline;
}
.hww-card p {
  color: var(--hww-ink);
  opacity: 0.85;
  margin-top: 0.4rem;
  margin-bottom: 0;
}
/* Wordmark: droplet mark + styled site title text (no image file) */
.site-logo-img, .ast-site-identity {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.site-title { position: relative; padding-left: 34px; }
.site-title::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 26px;
  height: 26px;
  background-image: url('data:image/svg+xml,<svg%20xmlns="http://www.w3.org/2000/svg"%20viewBox="0%200%2040%2040"><path%20d="M20%204%20C20%204%208%2018%208%2026%20C8%2033%2013.5%2037%2020%2037%20C26.5%2037%2032%2033%2032%2026%20C32%2018%2020%204%2020%204%20Z"%20fill="%233D6B66"/><ellipse%20cx="20"%20cy="29"%20rx="7"%20ry="3.2"%20fill="%23A85C32"%20opacity="0.55"/></svg>');
  background-size: contain;
  background-repeat: no-repeat;
}
/* Hero section: real photo behind teal gradient overlay */
.hww-hero {
  background:
    linear-gradient(135deg, rgba(44,77,73,0.88) 0%, rgba(36,49,47,0.82) 60%, rgba(36,49,47,0.75) 100%),
    var(--hww-hero-bg, linear-gradient(135deg, #3D6B66 0%, #2C4D49 65%, #24312F 100%));
  background-size: cover;
  background-position: center 40%;
  color: #FAF8F3;
  padding: 5rem 2.5rem 4.5rem;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.hww-hero::after {
  content: "";
  position: absolute;
  right: -60px;
  bottom: -80px;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: rgba(168,92,50,0.14);
  pointer-events: none;
}
.hww-hero h1 {
  color: #FAF8F3;
  font-size: 2.6rem;
  max-width: 20ch;
  margin-bottom: 0.75rem;
  position: relative;
  z-index: 1;
}
.hww-hero p {
  color: #E8E4D8;
  font-size: 1.15rem;
  max-width: 52ch;
  margin-bottom: 1.75rem;
  position: relative;
  z-index: 1;
}
.hww-hero .wp-block-button__link {
  background-color: #A85C32 !important;
  border-color: #A85C32 !important;
  font-size: 1.05rem;
  padding: 0.85rem 1.75rem !important;
  position: relative;
  z-index: 1;
}
/* Footer trust columns */
.hww-footer-columns {
  background-color: var(--hww-teal-dark);
  color: var(--hww-stone-light);
  padding: 3rem 2.5rem 2rem;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 2rem;
  max-width: 1240px;
  margin: 0 auto;
}
.hww-footer-columns h3 {
  color: #fff;
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin-bottom: 0.85rem;
}
.hww-footer-columns p {
  color: var(--hww-stone-light);
  font-size: 0.95rem;
  line-height: 1.6;
}
.hww-footer-columns ul {
  list-style: none;
  margin: 0;
  padding: 0;
}
.hww-footer-columns li {
  margin-bottom: 0.5rem;
}
.hww-footer-columns a {
  color: var(--hww-stone-light);
  text-decoration: none;
  font-size: 0.95rem;
}
.hww-footer-columns a:hover {
  color: #fff;
  text-decoration: underline;
}
@media (max-width: 767px) {
  .hww-footer-columns { grid-template-columns: 1fr; }
}
/* ===== Motion & Interaction Layer ===== */
/* Principles translated from Motion/Framer Motion: transform-based (hardware accelerated),
   150-300ms timing, spring-like easing, meaningful (not decorative) motion, reduced-motion support */

:root {
  --hww-ease: cubic-bezier(0.22, 1, 0.36, 1); /* spring-like ease-out, mirrors Motion's default spring feel */
  --hww-duration-fast: 150ms;
  --hww-duration-base: 250ms;
}

/* Scroll-reveal: elements start hidden, JS adds .hww-in-view to trigger */
.hww-reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity var(--hww-duration-base) var(--hww-ease),
              transform var(--hww-duration-base) var(--hww-ease);
}
.hww-reveal.hww-in-view {
  opacity: 1;
  transform: translateY(0);
}
/* Staggered children via transition-delay set inline by JS */

/* Card hover: lift + shadow, transform-only (no layout thrash) */
.hww-card, .hww-step-card {
  transition: transform var(--hww-duration-fast) var(--hww-ease),
              box-shadow var(--hww-duration-fast) var(--hww-ease);
  will-change: transform;
}
.hww-card:hover, .hww-step-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 20px rgba(36, 49, 47, 0.14);
}
.hww-card:active {
  transform: translateY(-1px) scale(0.99);
  transition-duration: 80ms;
}

/* Buttons: press feedback */
.wp-block-button__link, .ast-button, button, input[type="submit"] {
  transition: transform var(--hww-duration-fast) var(--hww-ease),
              filter var(--hww-duration-fast) var(--hww-ease),
              box-shadow var(--hww-duration-fast) var(--hww-ease) !important;
}
.wp-block-button__link:hover, .ast-button:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}
.wp-block-button__link:active, .ast-button:active {
  transform: translateY(0) scale(0.97);
  filter: brightness(0.96);
}

/* Full-card clickable pattern: whole card is a tap target, not just the title link */
.hww-card { position: relative; }
.hww-card > a:first-of-type::after,
.hww-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
}

/* Focus states: visible, brand-consistent, never removed */
:focus-visible {
  outline: 3px solid var(--hww-copper);
  outline-offset: 2px;
  border-radius: 2px;
}
.hww-card:focus-within {
  box-shadow: 0 0 0 3px var(--hww-copper);
}

/* Touch target minimum sizing for links acting as buttons */
.hww-card h3 a, .wp-block-button__link {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
  .hww-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .hww-card, .hww-step-card, .wp-block-button__link, .ast-button {
    transition: none !important;
  }
  .hww-card:hover, .hww-step-card:hover, .wp-block-button__link:hover {
    transform: none;
  }
}
/* Category hub pages */
.hww-hub-header {
  max-width: 68ch;
  margin-bottom: 2rem;
}
.hww-hub-header h1 { margin-bottom: 0.5rem; }
.hww-hub-intro {
  font-size: 1.1rem;
  color: var(--hww-ink);
  opacity: 0.85;
}
.hww-hub-grid { margin-top: 1.5rem; }
.hww-hub-card { padding: 0; overflow: hidden; }
.hww-hub-card-link { display: block; text-decoration: none; }
.hww-hub-card-thumb { aspect-ratio: 16/9; overflow: hidden; }
.hww-hub-card-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hww-hub-card h3 {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--hww-teal-dark);
  margin: 1rem 1rem 0.5rem;
}
.hww-hub-card p {
  margin: 0 1rem 1rem;
  font-size: 0.92rem;
  color: var(--hww-ink);
  opacity: 0.8;
}
.hww-hub-empty {
  background: var(--hww-stone-light);
  border-radius: 6px;
  padding: 2rem;
  text-align: center;
  color: var(--hww-ink);
}
/* How This Works step strip */
.hww-step-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin: 2rem 0 3rem;
}
.hww-step-card {
  background: #fff;
  border-radius: 6px;
  padding: 1.5rem;
  box-shadow: 0 1px 3px rgba(36,49,47,0.08);
  position: relative;
}
.hww-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--hww-copper);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  margin-bottom: 0.75rem;
}
.hww-step-card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.4rem;
}
.hww-step-card p { font-size: 0.95rem; opacity: 0.85; margin: 0; }
@media (max-width: 767px) {
  .hww-step-grid { grid-template-columns: 1fr; }
}
/* ===== Category Archive Hero ===== */
.hww-cat-hero {
  background-color: var(--hww-teal-dark);
  background-size: cover;
  background-position: center 35%;
  color: #FAF8F3;
  padding: 4rem 2.5rem 3.5rem;
  border-radius: 8px;
  margin-bottom: 2.5rem;
  position: relative;
  overflow: hidden;
}
.hww-cat-hero h1 {
  color: #FAF8F3;
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 4px rgba(0,0,0,0.35);
}
.hww-cat-intro {
  color: #E8E4D8;
  font-size: 1.1rem;
  max-width: 60ch;
  line-height: 1.65;
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 3px rgba(0,0,0,0.3);
  margin: 0;
}
@media (max-width: 767px) {
  .hww-cat-hero { padding: 3rem 1.5rem 2.5rem; }
  .hww-cat-hero h1 { font-size: 1.75rem; }
}

/* Post card thumbnail fallback — show a teal placeholder if no image */
.hww-hub-card-thumb {
  background-color: var(--hww-teal);
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.hww-hub-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
}
.hww-hub-card:hover .hww-hub-card-thumb img {
  transform: scale(1.04);
}
