/* ─── Amberley Farmers Market — Shared CSS ──────────────────────────────────
 *
 * Linked on every page (root, admin).
 * Contains: CSS variables + generic utility classes.
 * Site-specific components belong in style.css or admin.css.
 */

@import url("https://fonts.googleapis.com/css2?family=Bebas+Neue:wght@400&family=Merriweather:wght@400;500;600&display=swap");

:root {
  /* ── Design system tokens ──────────────────────────────────────── */
  --light-primary:   #56964c;
  --dark-primary:    #385b43;
  --light-secondary: #fffef4;
  --dark-secondary:  #f6f4eb;
  --light-accent:    #dc3d61;
  --dark-accent:     #cd2b51;
  --light-text:      #f9f3e8;
  --dark-text:       #2a0b09;

  /* ── Backward-compat aliases ───────────────────────────────────── */
  --green:       var(--light-primary);
  --green-dark:  var(--dark-primary);
  --green-mid:   #5a8f34;
  --green-light: #daebd4;
  --green-pale:  #edf5e9;
  --cream:       var(--light-secondary);
  --warm-white:  #ffffff;
  --brown:       #6b4c2a;
  --brown-light: #a07850;
  --text:        var(--dark-text);
  --text-muted:  #666;
  --text-light:  #999;
  --border:      #e0ddd6;
  --danger:      #c0392b;
  --danger-bg:   #fdf2f0;

  /* Contact form compat */
  --sand: var(--dark-secondary);
  --navy: var(--dark-text);
  --teal: var(--light-accent);

  /* ── Typography ────────────────────────────────────────────────── */
  --font-display: "Bebas Neue", Georgia, serif;
  --font-body:    "Merriweather", system-ui, sans-serif;
  --font-sans:    var(--font-body);
  --font-serif:   var(--font-display);

  /* ── Shadows (soft shadow spec) ────────────────────────────────── */
  --shadow-btn:  0 1px 3px rgba(0, 0, 0, 0.10), 0 8px 20px rgba(0, 0, 0, 0.08);
  --shadow-card: 0 2px 4px rgba(0, 0, 0, 0.08), 0 16px 40px rgba(0, 0, 0, 0.07);
  --shadow-sm:   var(--shadow-btn);
  --shadow-md:   var(--shadow-card);
  --shadow-lg:   var(--shadow-card);

  /* ── Radius ────────────────────────────────────────────────────── */
  --radius:     12px;
  --radius-btn:  8px;
  --radius-lg:  12px;

  /* ── Misc ──────────────────────────────────────────────────────── */
  --transition: 0.2s ease;
  --max-width:  1200px;
}

/* ── Type scale ───────────────────────────────────────────────────────────── */
.d1 { font-family: var(--font-display); font-size: 61.04px; font-weight: 400; line-height: 1.15; letter-spacing: 0.01em; }
.d2 { font-family: var(--font-display); font-size: 48.83px; font-weight: 400; line-height: 1.15; letter-spacing: 0.01em; }
.d3 { font-family: var(--font-display); font-size: 39.06px; font-weight: 400; line-height: 1.15; letter-spacing: 0.01em; }
.h1 { font-family: var(--font-display); font-size: 31.25px; font-weight: 400; line-height: 1.15; letter-spacing: 0.01em; }
.h2 { font-family: var(--font-display); font-size: 25px;    font-weight: 400; line-height: 1.15; letter-spacing: 0.01em; }
.h3 { font-family: var(--font-display); font-size: 20px;    font-weight: 400; line-height: 1.15; letter-spacing: 0.01em; }

/* ── Utility ──────────────────────────────────────────────────────────────── */

/* Display */
.hidden        { display: none; }
.d-inline      { display: inline; }
.d-block       { display: block; }
.flex-shrink-0 { flex-shrink: 0; }
.flex-row      { display: flex; flex-wrap: wrap; gap: 1rem; }
.flex-row-sm   { display: flex; flex-wrap: wrap; gap: .75rem; }
.flex-center   { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: center; }
.items-center  { align-items: center; }
.gap-1         { gap: .25rem; }
.gap-2         { gap: .5rem; }
.mt-auto       { margin-top: auto; }
.w-fit         { width: fit-content; }
.w-full        { width: 100%; }

/* Typography */
.text-center { text-align: center; }
.text-left   { text-align: left; }
.text-muted  { color: var(--text-muted); }
.text-light  { color: var(--text-light); }
.text-danger { color: var(--danger); }
.text-sm     { font-size: .9rem; }
.text-xs     { font-size: .8rem; }
.text-meta   { font-size: .75rem; color: var(--text-light); }
.italic      { font-style: italic; }

/* Margin-top */
.mt-tiny { margin-top: .35rem; }
.mt-1    { margin-top: .5rem; }
.mt-sm   { margin-top: .75rem; }
.mt-2    { margin-top: 1rem; }
.mt-3    { margin-top: 1.5rem; }
.mt-xl   { margin-top: 2.5rem; }

/* Margin-bottom */
.mb-0  { margin-bottom: 0; }
.mb-1  { margin-bottom: .5rem; }
.mb-2  { margin-bottom: 1rem; }
.mb-3  { margin-bottom: 1.5rem; }

/* State */
.is-disabled   { opacity: .6; }

/* Misc */
.btn-full        { width: 100%; justify-content: center; }
.icon-md         { font-size: 1.4rem; }
.label-clickable { font-weight: 500; cursor: pointer; }

/* ── Native form controls ─────────────────────────────────────────────────── */
input[type="date"] { color-scheme: light; }
input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .5; transition: opacity .15s; }
input[type="date"]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
input[type="file"]::file-selector-button {
  background: var(--green-dark);
  color: white;
  border: none;
  padding: 0.4rem 0.9rem;
  border-radius: 6px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  margin-right: 0.75rem;
  transition: background 0.15s;
}
input[type="file"]:hover::file-selector-button { background: var(--green); }

/* ── Site credit (subtle designer attribution) ─────────────────────────────── */
.site-credit {
  text-align: center;
  font-size: .72rem;
  padding: .7rem 1rem;
  opacity: .5;
}
/* Scoped under `footer` so the inherited footer-text colour beats any site-wide
   `a:hover` rule — without this, hover could recolour the link to the background. */
footer .site-credit a { color: inherit; text-decoration: none; }
footer .site-credit a:hover,
footer .site-credit a:focus { color: inherit; text-decoration: underline; }
