/*
Theme Name: Nurture Better Futures
Theme URI: https://nbfutures.com.au
Author: Nurture Better Futures
Description: An accessible, Gutenberg-editable WordPress theme for Nurture Better Futures, the Rural Brain Health Roadshow and younger onset dementia awareness.
Version: 2.0.0
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Text Domain: nurture-better-futures
*/

:root {
  --nbf-purple: #6e3fa9;
  --nbf-light-purple: #a77dd8;
  --nbf-deep-purple: #4b2a73;
  --nbf-soft-purple: #f1e9f8;
  --nbf-cream: #f8f5ef;
  --nbf-white: #ffffff;
  --nbf-charcoal: #3a3a3a;
  --nbf-muted: #6f6673;
  --nbf-pink: #f6bfd7;
  --nbf-border: #dfd3e8;
  --nbf-success: #2d6a4f;
  --nbf-error: #9f2436;
  --nbf-shadow: 0 18px 48px rgba(75, 42, 115, .12);
  --nbf-radius: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  overflow-wrap: break-word;
  color: var(--nbf-charcoal);
  background: var(--nbf-cream);
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 17px;
  line-height: 1.67;
}
body.admin-bar .site-header { top: 32px; }
img { max-width: 100%; height: auto; }
a { color: var(--nbf-purple); text-underline-offset: .16em; }
a:hover { color: var(--nbf-deep-purple); }
p { margin-top: 0; }
h1, h2, h3, h4, h5, h6 {
  margin-top: 0;
  color: var(--nbf-deep-purple);
  font-family: "Rancho", "Trebuchet MS", cursive;
  font-weight: 700;
  line-height: 1.1;
  text-wrap: balance;
}
h1 { font-size: clamp(3rem, 7vw, 5.7rem); }
h2 { font-size: clamp(2.35rem, 4.7vw, 3.8rem); }
h3 { font-size: clamp(1.65rem, 3vw, 2.25rem); }
h4 { font-size: 1.45rem; }
button, input, select, textarea { font: inherit; }
button, .button, .wp-element-button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--nbf-light-purple); outline-offset: 3px; }

.container { width: min(1160px, calc(100% - 40px)); margin-inline: auto; }
.alignwide { width: min(1160px, calc(100% - 40px)); max-width: none; margin-inline: auto; }
.alignfull { width: 100%; max-width: none; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  top: 8px; left: 8px; z-index: 100000; width: auto; height: auto; padding: 12px 16px;
  clip: auto; background: var(--nbf-white); color: var(--nbf-deep-purple); font-weight: 700;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(248, 245, 239, .97);
  border-bottom: 1px solid var(--nbf-border);
  box-shadow: 0 5px 20px rgba(75, 42, 115, .05);
  backdrop-filter: blur(10px);
}
.header-inner {
  min-height: 94px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-branding { display: flex; align-items: center; flex: 0 0 auto; }
.site-logo { display: block; width: 152px; height: 80px; object-fit: contain; object-position: left center; }
.custom-logo-link { display: flex; align-items: center; }
.custom-logo { width: auto; max-width: 190px; max-height: 78px; }
.site-nav { margin-left: auto; }
.menu {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px 15px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu li { margin: 0; padding: 0; }
.menu a {
  display: block;
  padding: 10px 1px;
  color: var(--nbf-charcoal);
  font-size: .83rem;
  font-weight: 700;
  text-decoration: none;
}
.menu a:hover, .menu .current-menu-item > a, .menu .current_page_item > a { color: var(--nbf-purple); }
.menu .menu-item-contact a {
  padding: 9px 15px;
  border-radius: 999px;
  background: var(--nbf-purple);
  color: var(--nbf-white);
}
.mobile-toggle {
  display: none;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 2px solid var(--nbf-purple);
  border-radius: 12px;
  background: var(--nbf-white);
  color: var(--nbf-deep-purple);
  font-size: 1.55rem;
  line-height: 1;
}

.entry-content > *:not(.alignwide):not(.alignfull),
.news-intro > *:not(.alignwide):not(.alignfull) {
  width: min(790px, calc(100% - 40px));
  margin-right: auto;
  margin-left: auto;
}
.entry-content > .wp-block-group.alignfull { margin-top: 0; margin-bottom: 0; }
.entry-content .wp-block-group__inner-container > :last-child { margin-bottom: 0; }
.nbf-section { padding: clamp(70px, 9vw, 110px) 0; }
.nbf-section--white { background: var(--nbf-white); }
.nbf-section--soft { background: var(--nbf-soft-purple); }
.nbf-section--deep { background: var(--nbf-deep-purple); color: var(--nbf-white); }
.nbf-section--deep h2, .nbf-section--deep h3, .nbf-section--deep a { color: var(--nbf-white); }
.nbf-kicker {
  margin-bottom: 12px;
  color: var(--nbf-purple);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.nbf-section--deep .nbf-kicker { color: #dec9f1; }
.nbf-lead { max-width: 840px; font-size: clamp(1.08rem, 2vw, 1.25rem); }

.nbf-hero {
  position: relative;
  overflow: hidden;
  padding: clamp(72px, 10vw, 125px) 0 clamp(65px, 9vw, 100px);
  background:
    radial-gradient(circle at 88% 18%, rgba(167, 125, 216, .30), transparent 27%),
    radial-gradient(circle at 5% 88%, rgba(246, 191, 215, .35), transparent 26%),
    linear-gradient(135deg, #fffdf8 0%, #f4eafa 100%);
}
.nbf-hero::after {
  content: "";
  position: absolute;
  right: -90px;
  bottom: -150px;
  width: 360px;
  height: 360px;
  border: 34px solid rgba(110, 63, 169, .08);
  border-radius: 50%;
}
.nbf-hero__grid { position: relative; z-index: 1; align-items: center !important; gap: clamp(30px, 5vw, 72px); }
.nbf-hero h1 { margin-bottom: 24px; }
.nbf-hero .nbf-lead { max-width: 720px; }
.nbf-hero__mascot { margin: 0 !important; text-align: center; }
.nbf-hero__mascot img {
  max-height: 570px;
  width: auto;
  filter: drop-shadow(0 22px 23px rgba(75, 42, 115, .18));
}
.wp-block-buttons { gap: 12px; }
.wp-block-button__link, .button, button.button, input[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 20px;
  border: 2px solid var(--nbf-purple);
  border-radius: 999px;
  background: var(--nbf-purple);
  color: var(--nbf-white);
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  transition: transform .2s ease, background-color .2s ease, color .2s ease;
}
.wp-block-button__link:hover, .button:hover, input[type="submit"]:hover {
  transform: translateY(-2px);
  background: var(--nbf-deep-purple);
  border-color: var(--nbf-deep-purple);
  color: var(--nbf-white);
}
.is-style-outline > .wp-block-button__link, .button.secondary {
  background: transparent;
  color: var(--nbf-purple);
}
.is-style-outline > .wp-block-button__link:hover, .button.secondary:hover {
  background: var(--nbf-purple);
  color: var(--nbf-white);
}

.nbf-card-grid { gap: 22px; margin-top: 34px; }
.nbf-card {
  height: 100%;
  padding: clamp(24px, 3vw, 34px);
  border: 1px solid var(--nbf-border);
  border-radius: var(--nbf-radius);
  background: var(--nbf-white);
  box-shadow: 0 12px 35px rgba(75, 42, 115, .08);
}
.nbf-section--white .nbf-card { background: var(--nbf-cream); }
.nbf-card h3 { margin-bottom: 10px; }
.nbf-aaa .nbf-card { border-top: 7px solid var(--nbf-purple); }
.nbf-aaa__letter {
  display: inline-grid;
  width: 52px;
  height: 52px;
  margin-bottom: 16px;
  place-items: center;
  border-radius: 50%;
  background: var(--nbf-purple);
  color: var(--nbf-white);
  font-family: Tahoma, Verdana, sans-serif;
  font-size: 1.35rem;
  font-weight: 800;
}
.nbf-change-line { margin-top: 34px; text-align: center; font-size: 1.12rem; font-weight: 800; color: var(--nbf-deep-purple); }

.nbf-brain-list { list-style: none !important; padding-left: 0 !important; }
.nbf-brain-list > li {
  position: relative;
  margin: 0 0 13px;
  padding-left: 40px;
}
.nbf-brain-list > li::before {
  content: "";
  position: absolute;
  top: .1em;
  left: 0;
  width: 28px;
  height: 28px;
  background: url("assets/images/brain-bullet.png") center / contain no-repeat;
}
.nbf-feature { align-items: center !important; gap: clamp(34px, 6vw, 80px); }
.nbf-feature__image { margin: 0 !important; text-align: center; }
.nbf-feature__image img { width: auto; max-height: 580px; filter: drop-shadow(0 18px 25px rgba(75, 42, 115, .13)); }
.nbf-photo-card { overflow: hidden; padding: 14px; border: 1px solid var(--nbf-border); border-radius: 24px; background: var(--nbf-white); box-shadow: var(--nbf-shadow); }
.nbf-photo-card figure { margin: 0 0 16px !important; }
.nbf-photo-card img { display: block; width: 100%; aspect-ratio: 4 / 4.5; border-radius: 15px; object-fit: cover; }
.nbf-photo-card h3, .nbf-photo-card p { padding-inline: 10px; }
.nbf-photo-card p { font-size: .92rem; color: var(--nbf-muted); }
.nbf-callout {
  margin-block: 28px;
  padding: 24px 28px;
  border-left: 7px solid var(--nbf-purple);
  border-radius: 8px 20px 20px 8px;
  background: var(--nbf-soft-purple);
}
.nbf-emergency { border-left-color: var(--nbf-error); background: #fff0f2; }
.nbf-support-box { border-left-color: var(--nbf-success); background: #edf7f1; }
.nbf-stat { font-family: "Rancho", cursive; color: var(--nbf-purple); font-size: clamp(2.6rem, 5vw, 4.5rem); line-height: 1; }
.nbf-link-card a { font-weight: 800; }
.nbf-nextgen {
  padding: 34px;
  border-radius: var(--nbf-radius);
  background: linear-gradient(135deg, var(--nbf-deep-purple), var(--nbf-purple));
  color: var(--nbf-white);
}
.nbf-nextgen h2, .nbf-nextgen h3, .nbf-nextgen a { color: var(--nbf-white); }

.page-hero {
  padding: clamp(58px, 8vw, 92px) 0 clamp(42px, 6vw, 64px);
  background:
    radial-gradient(circle at 88% 22%, rgba(167, 125, 216, .23), transparent 28%),
    linear-gradient(135deg, #fffdf8, var(--nbf-soft-purple));
}
.page-hero h1 { margin-bottom: 0; font-size: clamp(3rem, 7vw, 5.2rem); }
.content-wrap { padding: clamp(55px, 8vw, 90px) 0; }
.entry-content > h2 { margin-top: 54px; }
.entry-content > h3 { margin-top: 38px; }
.entry-content .wp-block-columns { gap: 24px; }

.nbf-contact-layout { align-items: flex-start !important; gap: 36px; }
.nbf-form-box {
  padding: clamp(24px, 4vw, 40px);
  border: 1px solid var(--nbf-border);
  border-radius: var(--nbf-radius);
  background: var(--nbf-white);
  box-shadow: var(--nbf-shadow);
}
.nbf-form-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.nbf-field { margin-bottom: 18px; }
.nbf-field label { display: block; margin-bottom: 6px; color: var(--nbf-deep-purple); font-weight: 800; }
.nbf-field input, .nbf-field select, .nbf-field textarea {
  width: 100%;
  padding: 12px 14px;
  border: 2px solid #cfc3d8;
  border-radius: 10px;
  background: var(--nbf-white);
  color: var(--nbf-charcoal);
}
.nbf-field input:focus, .nbf-field select:focus, .nbf-field textarea:focus { border-color: var(--nbf-purple); outline: 2px solid rgba(110, 63, 169, .16); }
.nbf-checkbox { display: flex; align-items: flex-start; gap: 10px; }
.nbf-checkbox input { width: auto; margin-top: 6px; }
.nbf-form-note, .small { color: var(--nbf-muted); font-size: .86rem; }
.nbf-form-message { margin-bottom: 22px; padding: 14px 17px; border-radius: 10px; font-weight: 700; }
.nbf-form-message--success { background: #e8f6ed; color: var(--nbf-success); }
.nbf-form-message--error { background: #fff0f2; color: var(--nbf-error); }
.nbf-trap { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

.nbf-merch-placeholder {
  padding: 38px;
  border: 2px dashed var(--nbf-light-purple);
  border-radius: var(--nbf-radius);
  background: var(--nbf-soft-purple);
  text-align: center;
}
.woocommerce ul.products li.product, .woocommerce-page ul.products li.product {
  padding: 16px;
  border: 1px solid var(--nbf-border);
  border-radius: 18px;
  background: var(--nbf-white);
  box-shadow: 0 9px 24px rgba(75, 42, 115, .07);
}
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button { border-radius: 999px; background: var(--nbf-purple); color: var(--nbf-white); }

.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 38px; }
.post-card { overflow: hidden; border: 1px solid var(--nbf-border); border-radius: 20px; background: var(--nbf-white); box-shadow: 0 10px 28px rgba(75, 42, 115, .08); }
.post-card__image img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.post-card__body { padding: 24px; }
.post-card__body h2 { font-size: 2rem; }
.post-card__body h2 a { color: var(--nbf-deep-purple); text-decoration: none; }
.post-meta { color: var(--nbf-muted); font-size: .84rem; }
.pagination { margin-top: 45px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 8px; }
.page-numbers { padding: 8px 13px; border-radius: 8px; background: var(--nbf-white); text-decoration: none; }
.page-numbers.current { background: var(--nbf-purple); color: var(--nbf-white); }
.empty-state { padding: 34px; border-radius: 20px; background: var(--nbf-white); text-align: center; }

.tagline-strip { padding: 42px 0; background: var(--nbf-purple); color: var(--nbf-white); text-align: center; }
.tagline-strip h2 { margin-bottom: 5px; color: var(--nbf-white); }
.tagline-strip p { margin-bottom: 0; }
.site-footer { padding: 58px 0 28px; background: #25192d; color: #eee8f2; }
.footer-grid { display: grid; grid-template-columns: 1.25fr .8fr .9fr; gap: 36px; }
.site-footer h2, .site-footer h3 { color: var(--nbf-white); }
.site-footer h3 { font-size: 1.7rem; }
.site-footer a { color: #eee8f2; }
.footer-logo { width: 165px; margin-bottom: 16px; }
.footer-links { margin: 0; padding: 0; list-style: none; }
.footer-links li { margin-bottom: 7px; }
.footer-bottom { margin-top: 35px; padding-top: 22px; border-top: 1px solid rgba(255, 255, 255, .16); font-size: .8rem; }

@media (max-width: 1040px) {
  .mobile-toggle { display: inline-grid; place-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    top: 94px;
    right: 0;
    left: 0;
    margin: 0;
    padding: 18px 20px 26px;
    border-bottom: 1px solid var(--nbf-border);
    background: var(--nbf-cream);
    box-shadow: 0 18px 26px rgba(75, 42, 115, .12);
  }
  .site-nav.is-open { display: block; }
  .menu { flex-direction: column; align-items: stretch; gap: 0; }
  .menu a { padding: 10px 4px; font-size: .95rem; }
  .menu .menu-item-contact a { display: inline-flex; margin-top: 8px; padding: 10px 18px; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 782px) {
  body.admin-bar .site-header { top: 46px; }
  .nbf-hero__grid { flex-direction: column; }
  .nbf-hero__mascot img { max-height: 430px; }
  .nbf-form-row, .footer-grid, .news-grid { grid-template-columns: 1fr; }
  .wp-block-columns:not(.is-not-stacked-on-mobile) { gap: 22px; }
  .nbf-photo-card { max-width: 520px; margin-inline: auto; }
}

@media (max-width: 480px) {
  body { font-size: 16px; }
  .container, .alignwide { width: min(100% - 28px, 1160px); }
  .site-logo { width: 125px; }
  .header-inner { min-height: 82px; }
  .site-nav { top: 82px; }
  .nbf-hero { padding-top: 58px; }
  .nbf-form-box, .nbf-card { padding: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
