@import url('https://fonts.googleapis.com/css2?family=Texturina:ital,opsz,wght@0,12..72,100..900;1,12..72,100..900&display=swap');
/* ========================================
   Hare & Toad Haus — Theme Stylesheet
   Dark mystic palette — Threshold Black, Lunar Parchment, Moss Green, Rosehip
   ======================================== */

:root {
  --primary: #4A9A82;
  --secondary: #C88A9E;
  --herb: #4A7A72;
  --bg: #120A1A;
  --card: #1A1228;
  --text: #F0E8EE;
  --muted: #9B8D9A;
  --display: "Texturina", serif;
  --label: "Uncial Antiqua", serif;
  --body: "Lora", serif;
  --border: rgba(74, 154, 130, 0.18);
  --border-light: rgba(74, 154, 130, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { background: var(--bg) !important; color: var(--text); font-family: var(--body); font-weight: 500; line-height: 1.6; overflow-x: hidden; margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(74,154,130,0.35); }

.container { max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }

.section-label { display: flex; align-items: center; justify-content: center; gap: 0.75rem; margin-bottom: 1rem; letter-spacing: 0.22em; text-transform: uppercase; font-family: var(--label); font-size: 0.7rem; color: var(--primary); }

.teal-rule { display: flex; align-items: center; gap: 0.75rem; width: 100%; }
.teal-rule::before, .teal-rule::after { content: ""; flex: 1; height: 1px; }
.teal-rule::before { background: linear-gradient(to right, transparent, rgba(74,154,130,0.35)); }
.teal-rule::after { background: linear-gradient(to left, transparent, rgba(74,154,130,0.35)); }

.btn-primary { display: inline-block; padding: 0.75rem 2rem; font-family: var(--label); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; background: var(--primary); color: var(--bg); transition: opacity 0.2s; border: none; cursor: pointer; text-decoration: none; }
.btn-primary:hover { opacity: 0.8; color: var(--bg); }

.btn-outline { display: inline-block; padding: 0.75rem 2rem; font-family: var(--label); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; border: 1px solid rgba(138,90,110,0.6); color: var(--secondary); transition: background 0.2s; cursor: pointer; text-decoration: none; }
.btn-outline:hover { background: rgba(255,255,255,0.05); color: var(--secondary); }

/* Site header */
.site-header { transition: background 0.5s, border-color 0.5s; background: transparent; border-bottom: 1px solid transparent; }
.site-header.is-scrolled { background: rgba(18,10,26,0.96) !important; border-bottom-color: rgba(74,154,130,0.2) !important; backdrop-filter: blur(14px); }

/* Unified primary navigation and WooCommerce utility rail. */
.site-header {
  min-height: 4.5rem;
  display: flex;
  align-items: center;
  padding-block: 0 !important;
}
.site-header__inner {
  width: min(100%, 80rem);
  min-height: 4.5rem;
  margin-inline: auto;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 1rem;
}
.site-header__nav { grid-column: 2; min-width: 0; }
.site-header__utilities {
  grid-column: 3;
  justify-self: end;
  display: inline-flex !important;
  align-items: center;
  gap: 0.25rem;
}
.site-header__utilities .wp-block-woocommerce-customer-account,
.site-header__utilities .wc-block-customer-account,
.site-header__utilities .wc-block-mini-cart { display: inline-flex; width: auto; margin: 0; }
.site-header__utilities .wc-block-customer-account__link,
.site-header__utilities .wc-block-mini-cart__button,
.site-header .wp-block-navigation__responsive-container-open,
.site-header .wp-block-navigation__responsive-container-close {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 2.75rem;
  block-size: 2.75rem;
  margin: 0;
  padding: 0.625rem;
  color: var(--text);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 0;
  transition: color 160ms ease, background-color 160ms ease, border-color 160ms ease;
}
.site-header__utilities .wc-block-customer-account__link:hover,
.site-header__utilities .wc-block-mini-cart__button:hover,
.site-header .wp-block-navigation__responsive-container-open:hover,
.site-header .wp-block-navigation__responsive-container-close:hover {
  color: var(--primary);
  background: rgba(74, 154, 130, 0.08);
  border-color: rgba(74, 154, 130, 0.35);
}
.site-header__utilities .wc-block-customer-account__link:focus-visible,
.site-header__utilities .wc-block-mini-cart__button:focus-visible,
.site-header .wp-block-navigation__responsive-container-open:focus-visible,
.site-header .wp-block-navigation__responsive-container-close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
.site-header__utilities svg,
.site-header .wp-block-navigation__responsive-container-open svg,
.site-header .wp-block-navigation__responsive-container-close svg {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  fill: currentColor;
}
@media (max-width: 781px) {
  .site-header { min-height: 4rem; padding-inline: 1rem !important; }
  .site-header__inner { min-height: 4rem; grid-template-columns: auto 1fr auto; column-gap: 0.5rem; }
  .site-header__nav { grid-column: 1; justify-self: start; }
  .site-header__nav .wp-block-navigation__responsive-container-open { display: inline-flex; }
  .site-header__utilities { grid-column: 3; gap: 0.125rem; }
  .site-header .wp-block-navigation__responsive-container { background: var(--bg); color: var(--text); }
  .site-header .wp-block-navigation__responsive-container-content { padding: 5.5rem 1.5rem 2rem; }
  .site-header .wp-block-navigation__responsive-container .wp-block-navigation-item__content {
    display: block;
    padding: 0.75rem 0;
    font-family: var(--label);
    font-size: 0.85rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
  }
}

/* Hero */
.hero-section { position: relative; min-height: 100vh; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.hero-content { position: relative; z-index: 10; max-width: 720px; padding: 0 1.5rem; text-align: center; }
.hero-eyebrow { font-family: var(--label); font-size: 0.7rem; letter-spacing: 0.3em; text-transform: uppercase; color: var(--primary); margin-bottom: 1.5rem; }
.hero-title { font-family: var(--display); font-weight: 900; font-size: clamp(2.4rem, 6vw, 5rem); line-height: 1.1; margin-bottom: 1.5rem; text-shadow: 0 0 60px rgba(74,154,130,0.27), 0 0 120px rgba(74,154,130,0.2);}
.hero-title .teal { color: var(--primary); }
.hero-subtitle { font-size: 1.1rem; line-height: 1.7; color: var(--muted); max-width: 540px; margin: 0 auto 2.5rem; }
.hero-buttons { display: flex; flex-direction: column; gap: 1rem; align-items: center; }

/* Marquee */
.marquee-section { overflow: hidden; padding: 0.75rem 0; background: var(--card); border-top: 1px solid rgba(74,154,130,0.2); border-bottom: 1px solid rgba(74,154,130,0.2); }
.marquee-track { display: flex; white-space: nowrap; animation: marquee 32s linear infinite; }
.marquee-track span { font-family: var(--label); font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--primary); padding-right: 3rem; }
@keyframes marquee { 0% { transform: translateX(0); } 100% { transform: translateX(-50%); } }

/* Products */
.product-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 1.5rem; padding: 2rem 0; max-width: 1280px; margin: 0 auto; }
.product-card { background: var(--card); border: 1px solid rgba(74,154,130,0.15); overflow: hidden; transition: border-color 0.3s; }
.product-card:hover { border-color: rgba(74,154,130,0.4); }
.product-card-img { position: relative; aspect-ratio: 3/4; overflow: hidden; }
.product-card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s; }
.product-card:hover .product-card-img img { transform: scale(1.05); }
.product-card-img::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(18,10,26,0.75) 0%, transparent 55%); }
.product-card-body { padding: 1rem; border-bottom: 1px solid rgba(74,154,130,0.2); }
.product-card-name { font-family: var(--label); font-size: 0.85rem; font-weight: 900; color: var(--text); margin-bottom: 0.25rem; }
.product-card-price { font-family: var(--label); font-size: 0.85rem; color: var(--primary); }

/* Tarot */
.tarot-section { padding: 6rem 0; background: var(--card); position: relative; }
/* A visible journal preview already provides its own closing rhythm. */
.journal-preview-section + .tarot-section { padding-top: 1rem; }
@media (max-width: 768px) {
  .journal-preview-section + .tarot-section { padding-top: 0.75rem; }
}
.tarot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 1.5rem; max-width: 1280px; margin: 0 auto; }
.tarot-card { background: var(--card); border: 1px solid rgba(74,154,130,0.16); padding: 2rem; text-align: center; transition: all 0.3s; }
.tarot-card:hover { border-color: rgba(74,154,130,0.53); }
.tarot-card-icon { margin-bottom: 1rem; color: var(--primary); font-size: 2rem; }
.tarot-card-name { font-family: var(--label); font-size: 0.85rem; font-weight: 900; margin: 0 0 0.5rem; }
.tarot-card-desc { font-size: 0.85rem; color: var(--muted); line-height: 1.6; margin: 0 0 1rem; }
.tarot-card-meta { font-family: var(--label); font-size: 0.75rem; color: var(--primary); }

/* Categories */
.categories-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 1rem; max-width: 1280px; margin: 0 auto; }
.cat-card { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; padding: 2rem 1rem; border: 1px solid rgba(74,154,130,0.2); text-align: center; transition: all 0.3s; cursor: pointer; }
.cat-card:hover { border-color: rgba(74,154,130,0.53); background: rgba(74,154,130,0.04); }
.cat-emoji { font-size: 2rem; }
.cat-name { font-family: var(--label); font-size: 0.8rem; font-weight: 900; }
.cat-count { font-family: var(--label); font-size: 0.7rem; color: var(--muted); }

/* About */
.about-section { padding: 6rem 0; position: relative; }
.about-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 4rem; align-items: center; max-width: 1280px; margin: 0 auto; padding: 0 1.5rem; }
.about-content h2 { font-family: var(--display); font-weight: 900; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.25; margin-bottom: 1.5rem;}
.about-content h2 .magenta { color: var(--secondary); }
.about-content p { color: var(--muted); font-size: 1.05rem; line-height: 1.7; margin-bottom: 1rem; }
.about-stats { display: flex; gap: 2.5rem; margin-top: 2rem; }
.stat-num { font-family: var(--display); font-size: 1.6rem; font-weight: 900; color: var(--primary);}
.stat-label { font-family: var(--label); font-size: 0.65rem; letter-spacing: 0.15em; text-transform: uppercase; color: var(--muted); margin-top: 0.1rem; }

/* Testimonials */
.testimonials-section { padding: 6rem 0; background: var(--card); }
.testimonial-card { max-width: 640px; margin: 0 auto; text-align: center; padding: 2.5rem; border: 1px solid rgba(74,154,130,0.27); background: var(--bg); position: relative; }
.testimonial-card::before { content: "\201c"; position: absolute; top: 1rem; left: 1.5rem; font-size: 5rem; color: rgba(138,90,110,0.15); line-height: 1; }
.testimonial-stars { margin-bottom: 1rem; color: var(--primary); }
.testimonial-quote { font-size: 1.15rem; font-style: italic; line-height: 1.65; margin-bottom: 1.5rem; }
.testimonial-name { font-family: var(--label); font-size: 0.8rem; color: var(--primary); }
.testimonial-location { font-family: var(--label); font-size: 0.7rem; color: var(--muted); margin-top: 0.15rem; }

/* Newsletter */
.newsletter-section { padding: 6rem 0; text-align: center; max-width: 720px; margin: 0 auto; }
.newsletter-section h2 { font-family: var(--display); font-weight: 900; font-size: clamp(1.4rem, 3vw, 2rem); margin: 1rem 0 0.75rem;}
.newsletter-section > p { color: var(--muted); font-size: 1.05rem; margin-bottom: 2rem; }
.newsletter-form { display: flex; }
.newsletter-form input[type="email"] { flex: 1; padding: 0.75rem 1rem; font-family: var(--body); background: #1A1228; border: 1px solid rgba(74,154,130,0.27); border-right: none; color: var(--text); outline: none; }
.newsletter-form button { padding: 0.75rem 1.5rem; font-family: var(--label); font-size: 0.7rem; letter-spacing: 0.15em; text-transform: uppercase; background: var(--primary); color: var(--bg); white-space: nowrap; border: none; cursor: pointer; }
.newsletter-form button:hover { opacity: 0.8; }

/* Blog archive */
.archive-header { text-align: center; padding: 1rem 1.5rem 3rem; }
.archive-title { font-family: var(--display); font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 0.5rem; }
.blog-query-wrapper { max-width: 1280px; margin: 0 auto; }
.wp-block-post-template { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 2rem; }
.blog-card { background: var(--card); border: 1px solid var(--border); overflow: hidden; transition: all 0.3s; }
.blog-card:hover { border-color: var(--primary); transform: translateY(-3px); }
.blog-card .wp-block-post-featured-image img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; }
.blog-card-body { padding: 1.5rem; }
.blog-card-meta { font-family: var(--label); font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-bottom: 0.5rem; }
.blog-card-title { font-family: var(--label); font-size: 1.25rem; margin: 0 0 0.75rem; }
.blog-card-title a { color: var(--text); text-decoration: none; }
.blog-card-title a:hover { color: var(--primary); }
.blog-card-excerpt { font-size: 0.9375rem; color: var(--muted); line-height: 1.7; margin: 0; }

/* Blog pagination */
.blog-pagination { display: flex; justify-content: center; gap: 0.5rem; padding: 3rem 0; flex-wrap: wrap; }
.blog-pagination .page-numbers { font-family: var(--label); padding: 0.5rem 1rem; border: 1px solid var(--border); color: var(--text); text-decoration: none; }
.blog-pagination .page-numbers:hover, .blog-pagination .page-numbers.current { border-color: var(--primary); color: var(--primary); }

/* Single post */
.post-content-area { padding-top: 7rem !important; }
.post-inner { max-width: 720px; margin: 0 auto; }
.post-title { font-family: var(--display); font-size: clamp(1.75rem, 4vw, 2.5rem); line-height: 1.25; margin-bottom: 0.5rem; }
.post-meta { font-family: var(--label); font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin-bottom: 2rem; gap: 1rem; }
.post-meta a { color: var(--primary); text-decoration: none; }
.post-body { font-size: 1.0625rem; line-height: 1.8; }
.post-body p { margin-bottom: 1.5rem; }
.post-body h2 { font-family: var(--display); font-size: 1.5rem; margin: 2.5rem 0 1rem; }
.post-body h3 { font-family: var(--label); font-size: 1rem; margin: 2rem 0 0.75rem; }
.post-body a { color: var(--primary); text-decoration: underline; }
.post-body blockquote { border-left: 2px solid var(--primary); padding-left: 1.5rem; font-style: italic; color: var(--muted); margin: 2rem 0; }
.post-body img { max-width: 100%; height: auto; margin: 2rem 0; border: 1px solid var(--border); }
.post-body pre, .post-body .wp-block-code { background: var(--card); border: 1px solid var(--border); padding: 1.25rem; overflow-x: auto; font-size: 0.875rem; }
.wp-block-post-comments { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }

/* Footer */
.site-footer a:hover { color: var(--primary) !important; }

/* WooCommerce */
.woocommerce .button { font-family: var(--label) !important; font-size: 0.7rem !important; letter-spacing: 0.15em !important; text-transform: uppercase !important; background: var(--primary) !important; color: var(--bg) !important; border-radius: 0 !important; padding: 0.75rem 1.5rem !important; }
.woocommerce .button:hover { opacity: 0.8 !important; background: var(--primary) !important; }
.woocommerce div.product .product_title { font-family: var(--display) !important; }
.woocommerce div.product .price { font-family: var(--label) !important; color: var(--primary) !important; }
.woocommerce .widget-area, .woocommerce aside, .woocommerce-page .widget-area { display: none; }



/* ========================================
   Accessibility & Readability
   ======================================== */

/* Focus visibility — keyboard users */
a:focus-visible,
button:focus-visible,
input:focus-visible,
.btn-primary:focus-visible,
.btn-outline:focus-visible,
.tarot-card a:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}
/* Ensure focus is never suppressed */
:focus:not(:focus-visible) { outline: none; }
.tarot-card:focus-within { border-color: var(--primary); box-shadow: 0 0 0 2px rgba(74,154,130,0.25); }

/* Improved contrast for body text */
body { color: #F0E8EE; }
/* Muted text meets 4.5:1 on #120A1A — #6B5E6E */
.muted, .tarot-card-desc, .testimonial-quote, .about-content p,
.newsletter-section > p, .blog-card-excerpt, .hero-subtitle {
  color: #9B8D9A !important;
}

/* Larger tap targets on mobile */
@media (pointer: coarse) {
  .btn-primary, .btn-outline, .tarot-card a, .hero-buttons a { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
  .hero-buttons a { min-height: 48px; }
}

/* Removes the forced animation for prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* Slightly bigger body text for readability */
body { font-size: 1.05rem; font-weight: 500; }
.tarot-card-desc { font-size: 0.95rem; line-height: 1.7; }
.tarot-card-meta { font-size: 0.85rem; }
.hero-subtitle { font-size: 1.15rem; line-height: 1.75; }
.testimonial-quote { font-size: 1.15rem; }

/* Skip-to-content link (hidden until focused) */
.skip-link {
  position: absolute;
  top: -100%;
  left: 0;
  background: var(--primary);
  color: var(--bg);
  padding: 0.75rem 1.5rem;
  z-index: 100;
  text-decoration: none;
}
.skip-link:focus {
  top: 0;
}
/* Responsive */
@media (max-width: 768px) {
  .about-grid { grid-template-columns: 1fr; gap: 2rem; }
  .product-grid { grid-template-columns: 1fr 1fr; }
  .hero-title { font-size: 2.25rem; }
  .about-stats { gap: 1.5rem; }
}
@media (max-width: 480px) {
  .product-grid { grid-template-columns: 1fr; }
}

/* --- WooCommerce Product Grid Override --- */
.woocommerce .product-grid ul.products,
.woocommerce-page .product-grid ul.products {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)) !important;
  gap: 1.5rem !important;
}

.woocommerce .product-grid ul.products li.product,
.woocommerce-page .product-grid ul.products li.product {
  width: auto !important;
  float: none !important;
  clear: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.woocommerce .product-grid ul.products li.product {
  background: var(--card);
  border: 1px solid rgba(74,154,130,0.15);
  overflow: hidden;
  transition: border-color 0.3s;
}
.woocommerce .product-grid ul.products li.product:hover {
  border-color: rgba(74,154,130,0.4);
}
.woocommerce .product-grid ul.products li.product a img {
  margin: 0;
}
.woocommerce .product-grid ul.products li.product .woocommerce-loop-product__title {
  font-family: var(--label);
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--text);
  padding: 1rem 1rem 0.25rem;
}
.woocommerce .product-grid ul.products li.product .price {
  font-family: var(--label);
  font-size: 0.85rem;
  color: var(--primary);
  padding: 0 1rem 1rem;
}
.woocommerce .product-grid ul.products li.product .button {
  margin: 0 1rem 1rem;
}

/* MailPoet form — Hare & Toad Haus theme */
.wp-block-mailpoet-form,
.mailpoet_form {
  font-family: var(--body);
  color: var(--text);
}
.mailpoet_text_label {
  display: none !important;
}
.mailpoet_paragraph {
  margin-bottom: 0;
  line-height: 0;
}
.mailpoet_text {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--body);
  font-size: 1rem;
  background: #1A1228;
  border: 1px solid rgba(74,154,130,0.27);
  border-right: none;
  border-radius: 0;
  color: var(--text);
  outline: none;
  line-height: normal;
  box-sizing: border-box;
}
.mailpoet_text:focus {
  border-color: var(--primary);
}
.mailpoet_submit {
  display: inline-block;
  width: auto;
  padding: 0.75rem 1.5rem;
  font-family: var(--label);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--primary);
  color: var(--bg);
  white-space: nowrap;
  border: none;
  border-radius: 0;
  cursor: pointer;
  line-height: normal;
  transition: opacity 0.2s;
}
.mailpoet_submit:hover {
  opacity: 0.8;
}
.mailpoet_form {
  display: flex;
  flex-direction: row;
  gap: 0;
  max-width: 440px;
  margin: 0 auto;
}
.mailpoet_paragraph {
  flex: 1;
}
.mailpoet_submit {
  flex: 0 0 auto;
}
.mailpoet_message {
  text-align: center;
  margin-top: 0.75rem;
  font-family: var(--label);
  font-size: 0.75rem;
  color: var(--primary);
}
.mailpoet_validate_success {
  color: var(--primary);
}
.mailpoet_validate_error {
  color: var(--secondary);
}
.mailpoet_form_loading {
  text-align: center;
  margin-top: 0.5rem;
}
.mailpoet_form_loading > span {
  background-color: var(--primary);
  width: 6px;
  height: 6px;
}
.mailpoet_hp_email_label {
  display: none !important;
}
.mailpoet_hp_email {
  position: absolute;
  left: -9999px;
  opacity: 0;
}
.newsletter-section .mailpoet_form {
  width: 100% !important;
  max-width: 100% !important;
}
.newsletter-section .mailpoet_form form.mailpoet_form {
  padding: 0 !important;
  max-width: 100% !important;
  width: 100% !important;
}
.newsletter-section .mailpoet_paragraph {
  flex: 1 1 auto !important;
}
