/* ========================================================
  Sweet Southern Bell Treats — CSS Template
  Purpose: Clean, modern, and flexible foundation for a
  confection storefront with quick theming via CSS variables.
  -------------------------------------------------------- */

/* ===== 1) Design Tokens (Theme Variables) ===== */
:root {
  --brand-hue: 335;                /* rosy-magenta base */
  --brand: hsl(var(--brand-hue) 75% 52%);
  --brand-600: hsl(var(--brand-hue) 70% 45%);
  --brand-700: hsl(var(--brand-hue) 65% 38%);
  --accent: hsl(45 90% 55%);       /* honey gold accent */
  --bg: hsl(0 0% 100%);
  --bg-soft: hsl(330 80% 98%);     /* tinted background */
  --text: hsl(248 22% 15%);
  --muted: hsl(248 12% 45%);
  --card: hsl(0 0% 100%);
  --shadow: 0 10px 30px hsl(248 30% 20% / 0.08);

  --radius: 1.25rem;
  --radius-sm: 0.875rem;

  /* Type scale */
  --font-sans: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  --fz-xs: clamp(.78rem, .7rem + .2vw, .85rem);
  --fz-sm: clamp(.9rem, .85rem + .2vw, 1rem);
  --fz-base: clamp(1rem, .95rem + .2vw, 1.1rem);
  --fz-lg: clamp(1.15rem, 1.05rem + .4vw, 1.35rem);
  --fz-xl: clamp(1.6rem, 1.2rem + 1vw, 2rem);
  --fz-2xl: clamp(2rem, 1.5rem + 2vw, 3rem);
  --line: 1.5;

  /* Spacing scale */
  --sp-1: .375rem;
  --sp-2: .75rem;
  --sp-3: 1rem;
  --sp-4: 1.25rem;
  --sp-5: 1.75rem;
  --sp-6: 2.25rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
}

/* ===== 2) Base & Resets ===== */
*,
*::before,
*::after { box-sizing: border-box; }

html, body {
  padding: 0;
  margin: 0;
}

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

img, picture, video, canvas, svg { display:block; max-width:100%; height:auto; }
a { color: var(--brand-700); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; }

/* ===== 3) Layout Utilities ===== */
.container {
  width: min(1100px, 92vw);
  margin-inline: auto;
}

.section-pad {
  padding-block: var(--sp-7);
}

.grid {
  display: grid;
  gap: var(--sp-5);
}

.cards-3 {
  grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 900px) {
  .cards-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .cards-3 { grid-template-columns: 1fr; }
}

/* ===== 4) Typography Helpers ===== */
.headline { font-size: var(--fz-2xl); line-height: 1.15; letter-spacing: -0.01em; }
.lead { font-size: var(--fz-lg); color: var(--muted); }
.section-title { font-size: var(--fz-xl); margin-bottom: var(--sp-4); letter-spacing: -0.01em; }
.muted { color: var(--muted); }

/* ===== 5) Header & Nav ===== */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: linear-gradient(180deg, var(--bg), hsl(0 0% 100% / 0.75));
  backdrop-filter: blur(6px);
  border-bottom: 1px solid hsl(248 20% 90%);
}

.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  padding-block: var(--sp-3);
}

.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.05rem; }
.brand-mark { font-size: 1.4rem; }
.brand-text strong { color: var(--brand-700); }

.nav { display: flex; gap: var(--sp-4); }
.nav a {
  padding: .35rem .6rem;
  border-radius: var(--radius-sm);
}
.nav a:hover { background: hsl(248 20% 96%); text-decoration: none; }

/* ===== 6) Hero / Storefront ===== */
.hero {
  background: radial-gradient(1200px 600px at 20% -10%, hsl(330 100% 97%), transparent),
              radial-gradient(900px 600px at 100% 0%, hsl(45 100% 96%), transparent);
}

.hero-inner {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: 1.1fr .9fr;
  align-items: center;
}

@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; }
}

.cta-row { display: flex; gap: var(--sp-3); margin-block: var(--sp-4); flex-wrap: wrap; }
.badges { display: flex; gap: var(--sp-3); padding: 0; margin: 0; list-style: none; color: var(--muted); }

.hero-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.hero-card figcaption {
  padding: .6rem .9rem;
  font-size: var(--fz-sm);
  background: hsl(0 0% 100% / .9);
  color: var(--muted);
  border-top: 1px solid hsl(248 20% 90%);
}

/* ===== 7) Cards / Components ===== */
.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: clip;
  box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-2px); box-shadow: 0 12px 36px hsl(248 30% 20% / 0.12); }
.card-body { padding: var(--sp-4); }
.card h3 { margin: 0 0 .25rem 0; font-size: 1.2rem; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  padding: .75rem 1.1rem;
  border-radius: 999px;
  font-weight: 700;
  border: 2px solid transparent;
  transition: background .2s ease, border-color .2s ease, transform .06s ease;
  cursor: pointer;
}
.btn:active { transform: translateY(1px); }

.btn-solid {
  background: var(--brand);
  color: white;
  border-color: var(--brand-600);
}
.btn-solid:hover { background: var(--brand-600); text-decoration: none; }

.btn-ghost {
  background: transparent;
  border-color: var(--brand-600);
  color: var(--brand-700);
}
.btn-ghost:hover { background: hsl(330 100% 96%); text-decoration: none; }

/* ===== 8) Featured Section ===== */
.featured { background: var(--bg-soft); }

/* ===== 9) Gallery ===== */
.gallery-grid {
  grid-template-columns: repeat(3, 1fr);
}
.gallery-item {
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}
@media (max-width: 900px) {
  .gallery-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .gallery-grid { grid-template-columns: 1fr; }
}

/* ===== 10) Contact ===== */
.contact-grid {
  grid-template-columns: 1.1fr .9fr;
  align-items: start;
}
@media (max-width: 900px) {
  .contact-grid { grid-template-columns: 1fr; }
}

.contact-card {
  background: linear-gradient(180deg, hsl(330 100% 99%), white);
  border: 1px solid hsl(330 30% 92%);
  border-radius: var(--radius);
  padding: var(--sp-5);
  box-shadow: var(--shadow);
}

.contact-list { padding-left: 1rem; }
.contact-list li { margin-bottom: .4rem; }

.contact-form {
  display: grid;
  gap: .85rem;
  background: var(--card);
  border-radius: var(--radius);
  padding: var(--sp-5);
  box-shadow: var(--shadow);
  border: 1px solid hsl(248 20% 92%);
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: .7rem .9rem;
  border-radius: .8rem;
  border: 1px solid hsl(248 18% 85%);
  outline: none;
}
.contact-form input:focus,
.contact-form textarea:focus {
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px hsl(var(--brand-hue) 90% 82% / .6);
}

.form-note { font-size: var(--fz-xs); }

/* ===== 11) Footer ===== */
.site-footer {
  border-top: 1px solid hsl(248 20% 90%);
  background: hsl(0 0% 100%);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--sp-3);
  padding-block: var(--sp-4);
}
.to-top { font-size: var(--fz-sm); }

/* ===== 12) Easy Theme Tweaks (examples) ===== */
/* Light rose */
.theme-rose { --brand-hue: 340; }
/* Peach */
.theme-peach { --brand-hue: 18; }
/* Lavender */
.theme-lavender { --brand-hue: 265; }
