/* ============================================================
   BIGGER HEARTS — Design System
   Brand colours, typography, spacing, accessibility primitives
   ============================================================ */

:root {
  /* Brand colours — derived from the existing Bigger Hearts heart-cluster logo.
     Variable names retain "pink/blush" for backwards compatibility through the
     CSS, but values are now the red/coral palette of the actual logo. */
  --pink: #C8283C;          /* primary brand red — buttons, links, accents */
  --pink-dark: #A82030;     /* hover states, button-active */
  --pink-darker: #8A1828;   /* strong-contrast text on light backgrounds */
  --plum: #3D1418;          /* deep maroon — headings, dark prose */
  --plum-light: #5C2228;
  --blush: #FDE9E4;         /* soft coral wash — panel backgrounds */
  --blush-deep: #F9D4CB;    /* slightly deeper coral border tone */
  --cream: #FFF8F2;
  --cream-warm: #FAEFE3;
  --rose: #E85A3C;          /* coral accent — matches the brighter logo hearts */
  --sage: #9CB8A6;
  --sage-light: #C5D6CC;
  --charcoal: #2F2F2F;
  --charcoal-soft: #4A4A4A;
  --charcoal-muted: #6B6B6B;
  --white: #FFFFFF;
  --border: #E8DDD3;

  /* Typography scale */
  --font-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Spacing scale (rem-based, 8pt grid) */
  --space-1: 0.5rem;    /* 8px */
  --space-2: 1rem;      /* 16px */
  --space-3: 1.5rem;    /* 24px */
  --space-4: 2rem;      /* 32px */
  --space-5: 3rem;      /* 48px */
  --space-6: 4rem;      /* 64px */
  --space-7: 6rem;      /* 96px */
  --space-8: 8rem;      /* 128px */

  /* Layout */
  --max-width: 1200px;
  --max-text: 720px;
  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 20px;
  --radius-xl: 32px;

  /* Shadows */
  --shadow-sm: 0 1px 2px rgba(61, 20, 24, 0.06);
  --shadow-md: 0 4px 12px rgba(61, 20, 24, 0.08);
  --shadow-lg: 0 12px 32px rgba(61, 20, 24, 0.10);
  --shadow-card: 0 2px 8px rgba(61, 20, 24, 0.06), 0 12px 40px rgba(61, 20, 24, 0.06);

  /* Transitions */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
}

/* ============================================================
   RESET & BASE
   ============================================================ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 1.125rem;        /* 18px base — accessible for older readers */
  line-height: 1.6;
  color: var(--charcoal);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img, picture, svg {
  max-width: 100%;
  display: block;
}

button {
  font: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

a {
  color: var(--plum);
  text-decoration: underline;
  text-underline-offset: 0.2em;
  text-decoration-thickness: 1px;
  transition: color 0.2s var(--ease);
}

a:hover {
  color: var(--pink);
}

a:focus-visible,
button:focus-visible {
  outline: 3px solid var(--pink);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Skip link for screen readers */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-2);
  background: var(--plum);
  color: var(--white);
  padding: var(--space-2) var(--space-3);
  text-decoration: none;
  border-radius: var(--radius-sm);
  z-index: 100;
  font-weight: 500;
}

.skip-link:focus {
  top: var(--space-2);
}

/* ============================================================
   TYPOGRAPHY
   ============================================================ */

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--plum);
}

h1 {
  font-size: clamp(2.5rem, 5vw + 1rem, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
}

h2 {
  font-size: clamp(2rem, 3vw + 1rem, 3rem);
  font-weight: 400;
}

h3 {
  font-size: clamp(1.4rem, 1.5vw + 1rem, 1.75rem);
  font-weight: 500;
}

h4 {
  font-size: 1.25rem;
  font-weight: 600;
}

p {
  max-width: var(--max-text);
}

.lead {
  font-size: clamp(1.2rem, 1vw + 1rem, 1.4rem);
  line-height: 1.5;
  color: var(--charcoal-soft);
  font-weight: 300;
}

.eyebrow {
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--pink-dark);
  margin-bottom: var(--space-2);
  display: block;
}

/* ============================================================
   LAYOUT PRIMITIVES
   ============================================================ */

.container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

@media (min-width: 768px) {
  .container {
    padding: 0 var(--space-4);
  }
}

.section {
  padding: var(--space-6) 0;
}

@media (min-width: 768px) {
  .section {
    padding: var(--space-7) 0;
  }
}

.section-tight {
  padding: var(--space-5) 0;
}

main {
  flex: 1;
}

/* ============================================================
   HEADER & NAVIGATION
   ============================================================ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 248, 242, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-3);
  max-width: var(--max-width);
  margin: 0 auto;
}

@media (min-width: 768px) {
  .header-inner {
    padding: var(--space-2) var(--space-4);
  }
}

@media (min-width: 1180px) {
  .header-inner {
    padding: var(--space-3) var(--space-4);
  }
}

.logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 1;
}

.logo-image {
  /* The real Bigger Hearts logo — wordmark + heart cluster.
     Sized as the dominant brand element, matching the prominence
     on biggerhearts.com.au where the logo carries the masthead. */
  height: 80px;
  width: auto;
  display: block;
}

@media (min-width: 600px) {
  .logo-image {
    height: 100px;
  }
}

@media (min-width: 1024px) {
  .logo-image {
    height: 120px;
  }
}

@media (min-width: 1180px) {
  .logo-image {
    height: 130px;
  }
}

/* On very small screens, scale a touch — protect the brand visibility. */
@media (max-width: 380px) {
  .logo-image {
    height: 64px;
  }
}

.logo:hover {
  opacity: 0.85;
  transition: opacity 0.2s var(--ease);
}

.nav-desktop {
  display: none;
  align-items: center;
  gap: var(--space-3);
}

@media (min-width: 1240px) {
  .nav-desktop {
    display: flex;
  }
}

@media (min-width: 1400px) {
  .nav-desktop {
    gap: var(--space-4);
  }
}

.nav-link {
  text-decoration: none;
  color: var(--charcoal);
  font-size: 1rem;
  font-weight: 500;
  padding: var(--space-1) 0;
  position: relative;
  white-space: nowrap;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--pink);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s var(--ease);
}

.nav-link:hover::after,
.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: var(--space-1);
}

@media (min-width: 768px) {
  .nav-actions {
    gap: var(--space-2);
  }
}

.mobile-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--plum);
}

@media (min-width: 1180px) {
  .mobile-menu-button {
    display: none;
  }
}

.mobile-menu-button:hover {
  background: var(--blush);
}

/* Mobile menu panel */
.mobile-menu {
  display: none;
  border-top: 1px solid var(--border);
  background: var(--cream);
}

.mobile-menu.open {
  display: block;
}

.mobile-menu-list {
  list-style: none;
  padding: var(--space-2);
  max-width: var(--max-width);
  margin: 0 auto;
}

.mobile-menu-list li {
  border-bottom: 1px solid var(--border);
}

.mobile-menu-list li:last-child {
  border-bottom: none;
}

.mobile-menu-list a {
  display: block;
  padding: var(--space-3) var(--space-2);
  font-size: 1.125rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--plum);
}

.mobile-menu-list a:hover {
  background: var(--blush);
}

/* ============================================================
   BUTTONS
   ============================================================ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-1);
  padding: 0.85rem 1.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: var(--font-body);
  text-decoration: none;
  border-radius: 999px;
  transition: all 0.2s var(--ease);
  min-height: 44px;
  text-align: center;
  white-space: nowrap;
  line-height: 1;
}

.btn-primary {
  background: var(--pink);
  color: var(--white);
  box-shadow: 0 4px 16px rgba(200, 40, 60, 0.25);
}

.btn-primary:hover {
  background: var(--pink-dark);
  color: var(--white);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(200, 40, 60, 0.32);
}

.btn-primary:active {
  transform: translateY(0);
}

.btn-secondary {
  background: var(--plum);
  color: var(--white);
}

.btn-secondary:hover {
  background: var(--plum-light);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-outline {
  background: transparent;
  color: var(--plum);
  border: 2px solid var(--plum);
  padding: calc(0.85rem - 2px) calc(1.5rem - 2px);
}

.btn-outline:hover {
  background: var(--plum);
  color: var(--white);
  transform: translateY(-1px);
}

.btn-large {
  padding: 1.1rem 2rem;
  font-size: 1.0625rem;
  min-height: 52px;
}

.btn-small {
  padding: 0.625rem 1.125rem;
  font-size: 0.9375rem;
  min-height: 40px;
}

/* Hide some buttons on tiny screens.
   With three nav action buttons (Get Support, Shop, Donate), we need
   more horizontal space before showing them. Donate is always visible;
   Get Support and Shop appear when the screen is wider. */
.btn-hide-mobile {
  display: none;
}

@media (min-width: 720px) {
  .btn-hide-mobile {
    display: inline-flex;
  }
}

/* ============================================================
   CARDS
   ============================================================ */

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  box-shadow: var(--shadow-card);
  border: 1px solid var(--border);
}

@media (min-width: 768px) {
  .card {
    padding: var(--space-5);
  }
}

.card-soft {
  background: var(--blush);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  border: 1px solid var(--blush-deep);
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--plum);
  color: var(--blush);
  padding: var(--space-6) 0 var(--space-3);
  margin-top: var(--space-7);
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-3);
}

@media (min-width: 768px) {
  .footer-inner {
    padding: 0 var(--space-4);
  }
}

.footer-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-5);
  margin-bottom: var(--space-5);
}

@media (min-width: 768px) {
  .footer-grid {
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: var(--space-4);
  }
}

.footer-brand h3 {
  color: var(--white);
  font-size: 1.5rem;
  margin-bottom: var(--space-2);
}

.footer-logo-image {
  /* Real Bigger Hearts logo in the footer too — keeps brand identity
     visible at the bottom of every page. Uses the opaque (white-background)
     version which reads cleanly against the dark plum footer. */
  height: 90px;
  width: auto;
  display: block;
  margin-bottom: var(--space-3);
  border-radius: var(--radius-md);
}

@media (min-width: 768px) {
  .footer-logo-image {
    height: 100px;
  }
}

.footer-brand p {
  color: var(--blush);
  opacity: 0.85;
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: var(--space-2);
}

.footer-col h4 {
  color: var(--white);
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: var(--space-2);
}

.footer-col ul {
  list-style: none;
}

.footer-col li {
  margin-bottom: var(--space-1);
}

.footer-col a {
  color: var(--blush);
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0.85;
  transition: opacity 0.2s var(--ease);
}

.footer-col a:hover {
  opacity: 1;
  color: var(--white);
}

.footer-socials {
  display: flex;
  gap: var(--space-2);
  margin-top: var(--space-2);
}

.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: var(--blush);
  transition: all 0.2s var(--ease);
  text-decoration: none;
}

.footer-social-link:hover {
  background: var(--pink);
  color: var(--white);
  opacity: 1;
}

.acknowledgement {
  border-top: 1px solid rgba(253, 232, 241, 0.15);
  padding-top: var(--space-3);
  margin-top: var(--space-2);
  font-size: 0.85rem;
  line-height: 1.6;
  color: var(--blush);
  opacity: 0.75;
  max-width: 720px;
}

.footer-legal {
  border-top: 1px solid rgba(253, 232, 241, 0.15);
  padding-top: var(--space-3);
  margin-top: var(--space-3);
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  font-size: 0.85rem;
  color: var(--blush);
  opacity: 0.7;
}

@media (min-width: 768px) {
  .footer-legal {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

/* ============================================================
   UTILITIES
   ============================================================ */

.sr-only,
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mb-1 { margin-bottom: var(--space-1); }
.mb-2 { margin-bottom: var(--space-2); }
.mb-3 { margin-bottom: var(--space-3); }
.mb-4 { margin-bottom: var(--space-4); }
.mb-5 { margin-bottom: var(--space-5); }

/* Reduced motion respect */
@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;
  }
}
