/* MBF Fundraiser - base.css
   Custom properties, reset, typography, layout utilities
   ======================================================= */

/* -------------------------------------------------------
   Custom Properties
   ------------------------------------------------------- */
:root {
  /* Colors */
  --color-bg:           #FAFAF8;
  --color-surface:      #FFFFFF;
  --color-text:         #1A1A1A;
  --color-text-muted:   #6B6B6B;
  --color-accent:       #2C4A3E;
  --color-accent-hover: #1e3329;
  --color-sale:         #C0392B;
  --color-border:       #E8E4DF;
  --color-overlay:      rgba(26, 26, 26, 0.55);

  /* Typography */
  --font-serif: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-sans:  'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --font-size-base: 16px;
  --line-height-body: 1.65;
  --line-height-heading: 1.15;

  /* Spacing */
  --space-xs:  0.25rem;
  --space-sm:  0.5rem;
  --space-md:  1rem;
  --space-lg:  1.5rem;
  --space-xl:  2.5rem;
  --space-2xl: 4rem;
  --space-3xl: 6rem;

  /* Layout */
  --max-width:         1280px;
  --content-padding:   1.5rem;
  --header-height:     70px;
  --header-height-mob: 60px;
  --sidebar-width:     260px;
  --radius:            4px;
  --radius-sm:         2px;
  --radius-full:       9999px;

  /* Motion */
  --transition:      150ms ease;
  --transition-slow: 300ms ease;

  /* Shadows */
  --shadow-sm:  0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md:  0 4px 12px rgba(0,0,0,0.08);
  --shadow-header: 0 2px 12px rgba(0,0,0,0.07);
}

/* -------------------------------------------------------
   Reset
   ------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--font-size-base);
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-height);
  -webkit-text-size-adjust: 100%;
}

/* When admin bar is visible, anchor scroll offset accounts for it */
html:has(body.admin-bar) {
  scroll-padding-top: calc(32px + var(--header-height));
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: var(--line-height-body);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Add padding-top for sticky header */
body {
  padding-top: var(--header-height);
}

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

a {
  color: inherit;
  text-decoration: none;
}

ul, ol {
  list-style: none;
}

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
  color: inherit;
  padding: 0;
}

input, textarea, select {
  font-family: inherit;
  font-size: inherit;
}

/* -------------------------------------------------------
   Typography
   ------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 500;
  line-height: var(--line-height-heading);
  color: var(--color-text);
}

h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
  margin-bottom: var(--space-md);
}
p:last-child {
  margin-bottom: 0;
}

strong { font-weight: 600; }
em     { font-style: italic; }

.entry-content h2,
.entry-content h3,
.entry-content h4 {
  margin-top: var(--space-xl);
  margin-bottom: var(--space-md);
}

.entry-content ul,
.entry-content ol {
  list-style: disc;
  padding-left: 1.5rem;
  margin-bottom: var(--space-md);
}

.entry-content a {
  color: var(--color-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

/* -------------------------------------------------------
   Layout Utilities
   ------------------------------------------------------- */
.mbf-container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--content-padding);
  padding-right: var(--content-padding);
}

.mbf-main {
  min-height: 60vh;
}

.mbf-section {
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}

.mbf-section--light {
  background-color: var(--color-surface);
}

.mbf-section-title {
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 500;
  margin-bottom: var(--space-xl);
  color: var(--color-text);
}

.mbf-section-title--center {
  text-align: center;
}

/* -------------------------------------------------------
   Buttons
   ------------------------------------------------------- */
.mbf-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.75rem;
  border-radius: var(--radius);
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: background-color var(--transition), color var(--transition), border-color var(--transition);
  cursor: pointer;
  border: 1.5px solid transparent;
  text-decoration: none;
  white-space: nowrap;
}

.mbf-btn--primary {
  background-color: var(--color-accent);
  color: #fff;
  border-color: var(--color-accent);
}
.mbf-btn--primary:hover,
.mbf-btn--primary:focus-visible {
  background-color: var(--color-accent-hover);
  border-color: var(--color-accent-hover);
  color: #fff;
}

.mbf-btn--outline {
  background-color: transparent;
  color: var(--color-accent);
  border-color: var(--color-accent);
}
.mbf-btn--outline:hover,
.mbf-btn--outline:focus-visible {
  background-color: var(--color-accent);
  color: #fff;
}

.mbf-btn--ghost {
  background-color: transparent;
  color: var(--color-text);
  border-color: var(--color-border);
}
.mbf-btn--ghost:hover {
  border-color: var(--color-text);
}

/* -------------------------------------------------------
   Badges
   ------------------------------------------------------- */
.mbf-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: var(--radius-sm);
  font-family: var(--font-sans);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  line-height: 1;
}

.mbf-badge--sale {
  background-color: var(--color-sale);
  color: #fff;
}

/* -------------------------------------------------------
   Divider
   ------------------------------------------------------- */
.mbf-divider {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-xl) 0;
}

/* -------------------------------------------------------
   Page content (static pages, 404, etc.)
   ------------------------------------------------------- */
.mbf-page-content {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-3xl);
  max-width: 820px;
}

.mbf-page-title {
  font-family: var(--font-serif);
  font-size: clamp(1.75rem, 3vw, 2.5rem);
  font-weight: 500;
  margin-bottom: var(--space-xl);
}

/* -------------------------------------------------------
   404 page
   ------------------------------------------------------- */
.mbf-404 {
  text-align: center;
  padding-top: var(--space-3xl);
  padding-bottom: var(--space-3xl);
}
.mbf-404 h1 {
  margin-bottom: var(--space-md);
}
.mbf-404 p {
  color: var(--color-text-muted);
  margin-bottom: var(--space-xl);
}

/* -------------------------------------------------------
   Search results page
   ------------------------------------------------------- */
.mbf-search-page {
  padding-top: var(--space-2xl);
  padding-bottom: var(--space-3xl);
}
.mbf-search-page .mbf-page-title {
  margin-bottom: var(--space-xl);
}
.mbf-search-page .mbf-page-title span {
  font-style: italic;
}

/* -------------------------------------------------------
   No results / no products
   ------------------------------------------------------- */
.mbf-no-results,
.mbf-no-products {
  color: var(--color-text-muted);
  font-size: 1rem;
  padding: var(--space-xl) 0;
}

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

/* -------------------------------------------------------
   Focus styles
   ------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}
