/* ============================================================
   MUFFIN GOLF — Shared Stylesheet
   Mobile-first. Desktop breakpoints at 768px and 1024px.
   ============================================================ */

/* ---------- DESIGN TOKENS ---------- */
:root {
  /* Brand */
  --mg-cream: #f6f1e7;        /* page background */
  --mg-cream-2: #f0ead8;      /* section variant */
  --mg-paper: #fbf7ee;        /* card/panel */
  --mg-ink: #1a1a1a;          /* primary text */
  --mg-ink-soft: #4a4a4a;     /* secondary text */
  --mg-mute: #8a8a8a;         /* tertiary / meta */
  --mg-line: #e6dfcf;         /* dividers */
  --mg-line-2: #d8d0bc;
  --mg-orange: #d97842;       /* primary accent */
  --mg-orange-deep: #b85d2e;
  --mg-orange-soft: #fef3e9;
  --mg-green: #2d5b3f;        /* fairway */
  --mg-green-soft: #d5e3d6;
  --mg-blue: #1e3a5f;         /* deep navy */
  --mg-red: #c93838;          /* hearts/likes */
  --mg-gold: #c9a74a;
  --mg-shadow: 0 4px 20px rgba(26,26,26,.08);
  --mg-shadow-lg: 0 12px 36px rgba(26,26,26,.12);

  /* Type */
  --f-display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --f-script:  'Caveat', 'Brush Script MT', cursive;
  --f-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* Sizing */
  --container: 1240px;
  --container-narrow: 880px;
  --radius: 6px;
  --radius-lg: 14px;
  --radius-pill: 999px;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  color: var(--mg-ink);
  background: var(--mg-cream);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; cursor: pointer; }
input, textarea, select { font: inherit; }
h1, h2, h3, h4, h5, h6, p { margin: 0 0 .75em 0; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; line-height: 1.1; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.7rem, 4.5vw, 3rem); }
h3 { font-size: clamp(1.3rem, 3vw, 1.85rem); }
h4 { font-size: 1.15rem; }

/* ---------- LAYOUT HELPERS ---------- */
.container { max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.container-narrow { max-width: var(--container-narrow); margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; }
.section-lg { padding: 90px 0; }
.section-sm { padding: 36px 0; }
.center { text-align: center; }
.flex { display: flex; }
.grid { display: grid; gap: 24px; }
@media (min-width: 768px) {
  .container, .container-narrow { padding: 0 32px; }
  .section { padding: 90px 0; }
  .section-lg { padding: 130px 0; }
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 26px;
  border: 2px solid var(--mg-ink);
  background: var(--mg-ink);
  color: #fff;
  font-weight: 600;
  font-size: 15px;
  border-radius: var(--radius-pill);
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, background .15s, color .15s;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: #000; transform: translateY(-1px); box-shadow: var(--mg-shadow); text-decoration: none; }
.btn-primary { background: var(--mg-orange); border-color: var(--mg-orange); }
.btn-primary:hover { background: var(--mg-orange-deep); border-color: var(--mg-orange-deep); }
.btn-outline { background: transparent; color: var(--mg-ink); }
.btn-outline:hover { background: var(--mg-ink); color: #fff; }
.btn-ghost { background: transparent; color: var(--mg-ink); border-color: transparent; }
.btn-ghost:hover { background: var(--mg-cream-2); }
.btn-lg { padding: 18px 34px; font-size: 16px; }
.btn-sm { padding: 9px 16px; font-size: 13px; }
.btn-block { display: flex; width: 100%; }

/* ---------- TYPE UTILITIES ---------- */
.script { font-family: var(--f-script); font-weight: 400; }
.serif { font-family: var(--f-display); }
.eyebrow {
  font-family: var(--f-script);
  color: var(--mg-orange);
  font-size: 1.5rem;
  line-height: 1;
  display: inline-block;
  transform: rotate(-2deg);
}
.lead { font-size: 1.15rem; line-height: 1.6; color: var(--mg-ink-soft); }
.muted { color: var(--mg-mute); }
.small { font-size: .85rem; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px;
  background: var(--mg-cream-2);
  border: 1px solid var(--mg-line);
  border-radius: var(--radius-pill);
  font-size: .8rem;
  font-weight: 500;
}
.tag-orange { background: var(--mg-orange-soft); border-color: #f4cba6; color: var(--mg-orange-deep); }
.tag-green { background: var(--mg-green-soft); border-color: #b9d2bb; color: var(--mg-green); }

/* ---------- HEADER / NAV ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(246, 241, 231, .92);
  backdrop-filter: saturate(140%) blur(8px);
  -webkit-backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--mg-line);
}
.nav-bar {
  display: flex; align-items: center; justify-content: space-between;
  height: 70px;
  gap: 16px;
}
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none;
}
.brand img { height: 52px; width: auto; }
.brand-name {
  font-family: var(--f-display);
  font-weight: 600; font-size: 1.25rem;
  letter-spacing: -.01em;
}
.brand:hover { text-decoration: none; }

.nav-links {
  display: none;
  align-items: center; gap: 28px;
  list-style: none; margin: 0; padding: 0;
}
.nav-links a {
  font-size: .92rem; font-weight: 500;
  color: var(--mg-ink); position: relative;
  padding: 6px 0;
}
.nav-links a:hover { color: var(--mg-orange); text-decoration: none; }
.nav-links a.active { color: var(--mg-orange); }
.nav-links a.active::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: 0;
  height: 2px; background: var(--mg-orange); border-radius: 2px;
}

.nav-actions { display: flex; align-items: center; gap: 6px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px;
  background: transparent; border: none; border-radius: 50%;
  color: var(--mg-ink); position: relative;
  cursor: pointer;
}
.icon-btn:hover { background: var(--mg-cream-2); }
.icon-btn svg { width: 22px; height: 22px; }
.cart-count {
  position: absolute; top: 4px; right: 4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  background: var(--mg-orange); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px;
  border-radius: 9px; text-align: center;
  border: 2px solid var(--mg-cream);
}
.cart-count[data-count="0"] { display: none; }

.menu-toggle { display: inline-flex; }
@media (min-width: 1024px) {
  .nav-links { display: flex; }
  .menu-toggle { display: none; }
}

/* Mobile drawer */
.mobile-menu {
  position: fixed; top: 70px; left: 0; right: 0; bottom: 0;
  background: var(--mg-cream);
  z-index: 49;
  transform: translateX(100%);
  transition: transform .3s ease;
  overflow-y: auto;
  padding: 20px 24px 40px;
}
.mobile-menu.open { transform: translateX(0); }
.mobile-menu ul { list-style: none; padding: 0; margin: 0; }
.mobile-menu li { border-bottom: 1px solid var(--mg-line); }
.mobile-menu a {
  display: block; padding: 18px 0;
  font-family: var(--f-display);
  font-size: 1.5rem;
}
.mobile-menu .group-label {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--mg-mute); padding: 22px 0 6px;
  border: none;
}

/* Announcement bar */
.announce {
  background: var(--mg-ink); color: #fff;
  text-align: center;
  font-size: .82rem; padding: 8px 16px;
  letter-spacing: .02em;
}
.announce span { color: var(--mg-orange); }

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--mg-ink); color: #f0ead8;
  padding: 70px 0 28px;
  margin-top: 80px;
}
.footer-grid {
  display: grid; grid-template-columns: 1fr; gap: 40px;
  margin-bottom: 50px;
}
@media (min-width: 768px) {
  .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 50px; }
}
.footer-brand img { height: 56px; width: auto; }
.footer-brand h3 { font-size: 1.4rem; color: #fff; margin-top: 12px; }
.footer-brand p { color: #b8b0a0; font-size: .92rem; max-width: 320px; line-height: 1.6; }
.footer-col h4 {
  font-family: var(--f-body);
  font-size: .8rem; text-transform: uppercase; letter-spacing: .14em;
  color: #d4caaf; margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #b8b0a0; font-size: .92rem; }
.footer-col a:hover { color: var(--mg-orange); text-decoration: none; }
.footer-social { display: flex; gap: 10px; margin-top: 14px; }
.footer-social a {
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.08);
  display: inline-flex; align-items: center; justify-content: center;
}
.footer-social a:hover { background: var(--mg-orange); }
.footer-social svg { width: 16px; height: 16px; fill: #f0ead8; }
.footer-bottom {
  border-top: 1px solid #2c2c2c;
  padding-top: 24px;
  display: flex; flex-direction: column; gap: 10px;
  font-size: .82rem; color: #8a8273;
}
.footer-bottom .script { font-size: 1.4rem; color: var(--mg-orange); }
@media (min-width: 768px) {
  .footer-bottom { flex-direction: row; justify-content: space-between; align-items: center; }
}

/* Newsletter */
.newsletter-form {
  display: flex; gap: 8px; flex-wrap: wrap;
  margin-top: 14px;
}
.newsletter-form input {
  flex: 1; min-width: 180px;
  padding: 12px 16px;
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.18);
  color: #fff; border-radius: var(--radius-pill);
  font-size: .92rem;
}
.newsletter-form input::placeholder { color: #8a8273; }
.newsletter-form button {
  padding: 12px 22px;
  background: var(--mg-orange); color: #fff;
  border: none; border-radius: var(--radius-pill);
  font-weight: 600; font-size: .92rem;
}
.newsletter-form button:hover { background: var(--mg-orange-deep); }
.newsletter-status { margin-top: 10px; font-size: .85rem; min-height: 20px; }

/* ---------- HAND-DRAWN UTILITIES ---------- */
.squiggle {
  position: relative; display: inline-block;
}
.squiggle::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -8px;
  height: 8px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 8'><path d='M0 5 Q15 0 30 5 T60 5 T90 5 T120 5' stroke='%23d97842' stroke-width='2.5' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: repeat-x;
  background-size: 120px 8px;
}
.circle-mark {
  position: relative; display: inline-block; padding: 0 .15em;
}
.circle-mark::before {
  content: ''; position: absolute; inset: -8px -10px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 80'><ellipse cx='100' cy='40' rx='95' ry='34' fill='none' stroke='%23d97842' stroke-width='2.5' stroke-dasharray='3 4'/></svg>");
  background-size: 100% 100%;
  background-repeat: no-repeat;
  z-index: -1;
}
.hand-arrow {
  display: inline-block; width: 60px; height: 30px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 30'><path d='M2 18 Q15 5 30 12 T55 15 M48 8 L57 15 L48 22' stroke='%23d97842' stroke-width='2' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat; background-size: contain;
  vertical-align: middle;
}

/* ---------- CARDS / GENERICS ---------- */
.card {
  background: var(--mg-paper);
  border: 1px solid var(--mg-line);
  border-radius: var(--radius-lg);
  padding: 22px;
}
.divider { height: 1px; background: var(--mg-line); border: 0; margin: 30px 0; }

/* ---------- FORMS ---------- */
.form-row { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.form-row label { font-size: .85rem; font-weight: 600; }
.input, .textarea, .select {
  width: 100%;
  padding: 12px 14px;
  background: #fff;
  border: 1.5px solid var(--mg-line-2);
  border-radius: var(--radius);
  font-size: .95rem;
  font-family: inherit;
  color: var(--mg-ink);
  transition: border-color .15s, box-shadow .15s;
}
.input:focus, .textarea:focus, .select:focus {
  outline: none;
  border-color: var(--mg-orange);
  box-shadow: 0 0 0 3px rgba(217,120,66,.15);
}
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.form-grid-2 { display: grid; grid-template-columns: 1fr; gap: 0 14px; }
@media (min-width: 600px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- PAGE INTRO ---------- */
.page-hero {
  padding: 60px 0 40px;
  text-align: center;
  position: relative;
}
.page-hero h1 { margin-bottom: 14px; }
.page-hero p { max-width: 600px; margin: 0 auto; font-size: 1.05rem; color: var(--mg-ink-soft); }

/* ---------- SCROLL REVEAL (subtle) ---------- */
.reveal {
  opacity: 0; transform: translateY(20px);
  transition: opacity .7s ease, transform .7s ease;
}
.reveal.in { opacity: 1; transform: translateY(0); }

/* ---------- BREAKPOINT VISIBILITY ---------- */
.hide-mobile { display: none; }
@media (min-width: 768px) {
  .hide-mobile { display: initial; }
  .hide-desktop { display: none; }
}

/* ---------- IMAGE SLOTS / PLACEHOLDERS ---------- */
.img-slot {
  background: linear-gradient(135deg, var(--mg-cream-2), var(--mg-paper));
  border: 1px dashed var(--mg-line-2);
  border-radius: var(--radius-lg);
  display: flex; align-items: center; justify-content: center;
  color: var(--mg-mute);
  font-family: var(--f-script);
  font-size: 1.4rem;
  text-align: center;
  padding: 20px;
  aspect-ratio: 4/3;
  overflow: hidden;
  position: relative;
}
.img-slot img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; }

/* ---------- LINK STYLES IN PROSE ---------- */
.prose a { color: var(--mg-orange-deep); border-bottom: 1px solid var(--mg-orange-soft); }
.prose a:hover { background: var(--mg-orange-soft); text-decoration: none; }
.prose p { margin-bottom: 1.1em; line-height: 1.75; font-size: 1.05rem; color: var(--mg-ink-soft); }

/* ---------- OFFCANVAS LOCK ---------- */
body.no-scroll { overflow: hidden; }
