/* ==========================================================================
   Melted Bites: Design System
   ========================================================================== */

:root {
  --cream: #FDF6E9;
  --cream-dim: #F6EAD3;
  --maroon-dark: #4A1F1A;
  --maroon: #7A2E28;
  --caramel: #C8763C;
  --caramel-light: #E3A868;
  --ink: #2B1512;
  --ink-soft: #5A413C;
  --white: #FFFFFF;

  --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container: 1180px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 10px rgba(74, 31, 26, 0.08);
  --shadow-md: 0 10px 30px rgba(74, 31, 26, 0.14);
  --shadow-lg: 0 20px 50px rgba(74, 31, 26, 0.22);
  --transition: 0.25s ease;
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body, h1, h2, h3, h4, p, figure, blockquote, dl, dd, ul, ol { margin: 0; }
ul[class], ol[class] { padding: 0; list-style: none; }
img, picture, svg { max-width: 100%; display: block; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }

body {
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--maroon-dark);
  line-height: 1.15;
  font-weight: 700;
}

h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }

p.lede {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--ink-soft);
  max-width: 62ch;
}

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

section { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.section-tight { padding: clamp(2.5rem, 5vw, 4rem) 0; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(2.5rem, 5vw, 3.5rem);
}
.section-head p.lede { margin: 1rem auto 0; }

.eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: var(--caramel);
  margin-bottom: 0.75rem;
}

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.98rem;
  border: 2px solid transparent;
  transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-2px); }

.btn-primary {
  background: var(--caramel);
  color: var(--white);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--maroon); box-shadow: var(--shadow-md); }

.btn-outline {
  background: transparent;
  border-color: var(--maroon-dark);
  color: var(--maroon-dark);
}
.btn-outline:hover { background: var(--maroon-dark); color: var(--cream); }

.btn-light {
  background: var(--cream);
  color: var(--maroon-dark);
}
.btn-light:hover { background: var(--white); }

.btn-block { width: 100%; }

/* ---- Header / Nav ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(253, 246, 233, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(74, 31, 26, 0.08);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
}

.nav-logo { display: flex; align-items: center; gap: 0.55rem; }
.nav-logo img { height: 40px; width: 40px; object-fit: contain; border-radius: 50%; }
.nav-logo span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.35rem;
  color: var(--maroon-dark);
  white-space: nowrap;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2vw, 2.1rem);
}

.nav-links a {
  font-weight: 600;
  font-size: 0.96rem;
  color: var(--ink);
  position: relative;
  padding: 0.3rem 0.1rem;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 0; right: 100%;
  bottom: -2px;
  height: 2px;
  background: var(--caramel);
  transition: right var(--transition);
}
.nav-links a:hover::after,
.nav-links a.active::after { right: 0; }
.nav-links a.active { color: var(--maroon-dark); }

.nav-cta { margin-left: 0.5rem; }

.nav-toggle {
  display: none;
  background: none;
  border: none;
  width: 42px;
  height: 42px;
  position: relative;
}
.nav-toggle span,
.nav-toggle span::before,
.nav-toggle span::after {
  content: '';
  position: absolute;
  left: 9px; right: 9px;
  height: 2px;
  background: var(--maroon-dark);
  transition: transform var(--transition), opacity var(--transition), top var(--transition);
}
.nav-toggle span { top: 20px; }
.nav-toggle span::before { top: -9px; }
.nav-toggle span::after { top: 9px; }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); top: 0; }
.nav-toggle[aria-expanded="true"] span::after { transform: rotate(-45deg); top: 0; }

@media (max-width: 880px) {
  .nav-toggle { display: block; }
  .nav-links {
    position: fixed;
    inset: 68px 0 0 0;
    background: var(--cream);
    flex-direction: column;
    justify-content: flex-start;
    align-items: stretch;
    padding: 2rem 1.5rem;
    gap: 0;
    transform: translateX(100%);
    transition: transform var(--transition);
    overflow-y: auto;
  }
  .nav-links.open { transform: translateX(0); }
  .nav-links a {
    padding: 1rem 0;
    border-bottom: 1px solid rgba(74,31,26,0.08);
    font-size: 1.1rem;
  }
  .nav-cta { margin: 1.5rem 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ---- Hero ---- */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: clamp(2rem, 4vw, 4rem);
  padding: clamp(3rem, 7vw, 5.5rem) 0;
}
.hero-copy .eyebrow { color: var(--caramel); }
.hero-copy h1, .hero-copy h2 { margin-bottom: 1.1rem; }
.hero-copy p.lede { margin-bottom: 2rem; }
.hero-actions { display: flex; gap: 1rem; flex-wrap: wrap; }
.hero-media {
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

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

.hero-band {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  color: var(--cream);
}
.hero-band h1, .hero-band h2 { color: var(--cream); }
.hero-band .eyebrow { color: var(--caramel-light); }
.hero-band p.lede { color: rgba(253,246,233,0.85); }

.link-arrow { font-weight: 700; color: var(--maroon); display: inline-flex; align-items: center; gap: 0.4rem; }
.link-arrow span { transition: transform var(--transition); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---- Product grid ---- */
.product-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.75rem;
}

.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid rgba(74,31,26,0.06);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.product-card .thumb { aspect-ratio: 1 / 1; overflow: hidden; }
.product-card .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.product-card:hover .thumb img { transform: scale(1.05); }
.product-card .body { padding: 1.3rem 1.3rem 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.product-card h3 { margin-bottom: 0.4rem; }
.product-card .desc { color: var(--ink-soft); font-size: 0.95rem; margin-bottom: 1rem; flex-grow: 1; }

.spec-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.spec {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--cream-dim);
  color: var(--ink-soft);
  border-radius: 999px;
  padding: 0.32rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
}
.spec strong { color: var(--maroon-dark); font-weight: 700; }

.product-preview-cta { text-align: center; margin-top: 2.75rem; }

/* ---- Stats / trust strip ---- */
.stat-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1.5rem;
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 2.2rem;
  box-shadow: var(--shadow-sm);
}
.stat {
  text-align: center;
  padding: 0.5rem;
  border-left: 1px solid rgba(74,31,26,0.08);
}
.stat:first-child { border-left: none; }
@media (max-width: 700px) {
  .stat { border-left: none; border-top: 1px solid rgba(74,31,26,0.08); padding-top: 1.2rem; }
  .stat:first-child { border-top: none; }
}
.stat .num { font-family: var(--font-display); font-size: 2rem; color: var(--caramel); font-weight: 700; display: block; }
.stat .label { color: var(--ink-soft); font-size: 0.92rem; }

/* ---- CTA banner ---- */
.cta-banner {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.cta-banner h2 { color: var(--cream); }
.cta-banner p { color: rgba(253,246,233,0.85); max-width: 60ch; margin: 0.9rem auto 1.8rem; }
.cta-actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* ---- Steps (How it works) ---- */
.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.75rem;
}
.step {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.8rem;
  box-shadow: var(--shadow-sm);
  position: relative;
}
.step .step-num {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--caramel);
  color: var(--white);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 1rem;
}
.step h3 { margin-bottom: 0.5rem; font-size: 1.15rem; }
.step p { color: var(--ink-soft); font-size: 0.95rem; }

/* ---- Table ---- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); box-shadow: var(--shadow-sm); background: var(--white); }
table.spec-table { width: 100%; border-collapse: collapse; min-width: 640px; }
table.spec-table th, table.spec-table td {
  padding: 1rem 1.25rem;
  text-align: left;
  border-bottom: 1px solid rgba(74,31,26,0.08);
  font-size: 0.95rem;
}
table.spec-table th {
  background: var(--maroon-dark);
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 700;
  white-space: nowrap;
}
table.spec-table tr:last-child td { border-bottom: none; }
table.spec-table tr:hover td { background: var(--cream-dim); }

/* ---- Badges / delivery callout ---- */
.badge-row { display: flex; flex-wrap: wrap; gap: 0.9rem; justify-content: center; }
.state-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  border: 2px solid var(--caramel);
  color: var(--maroon-dark);
  font-weight: 700;
  border-radius: 999px;
  padding: 0.85rem 1.6rem;
  font-size: 1.05rem;
  box-shadow: var(--shadow-sm);
}
.state-badge .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--caramel); }

/* ---- Cards generic (about / info) ---- */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}
.info-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.75rem;
  box-shadow: var(--shadow-sm);
  border-top: 3px solid var(--caramel);
}
.info-card h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.info-card p { color: var(--ink-soft); font-size: 0.94rem; }

/* ---- Cart spec list ---- */
.cart-specs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.5rem;
}
.cart-spec {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1.6rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.cart-spec .icon { font-size: 1.8rem; margin-bottom: 0.6rem; }
.cart-spec h3 { font-size: 1.05rem; margin-bottom: 0.4rem; }
.cart-spec p { color: var(--ink-soft); font-size: 0.9rem; }

/* ---- Gallery ---- */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}
.gallery-grid .thumb { border-radius: var(--radius-md); overflow: hidden; box-shadow: var(--shadow-sm); aspect-ratio: 4/3; }
.gallery-grid img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery-grid .thumb:hover img { transform: scale(1.06); }

/* ---- Forms ---- */
.form-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: clamp(1.75rem, 4vw, 2.75rem);
  box-shadow: var(--shadow-md);
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}
@media (max-width: 700px) { .form-grid { grid-template-columns: 1fr; } }
.form-field { display: flex; flex-direction: column; gap: 0.45rem; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: 0.9rem; color: var(--maroon-dark); }
.form-field .req { color: var(--caramel); }
.form-field input,
.form-field select,
.form-field textarea {
  border: 1.5px solid rgba(74,31,26,0.18);
  border-radius: var(--radius-sm);
  padding: 0.8rem 1rem;
  background: var(--cream-dim);
  font-size: 0.98rem;
  transition: border-color var(--transition), background var(--transition);
}
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--caramel);
  background: var(--white);
}
.form-field textarea { resize: vertical; min-height: 110px; }
.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 0.6rem;
}
.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  background: var(--cream-dim);
  border-radius: var(--radius-sm);
  padding: 0.65rem 0.8rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.checkbox-item input { width: 16px; height: 16px; accent-color: var(--caramel); }
.form-actions { margin-top: 1.75rem; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.form-note { font-size: 0.85rem; color: var(--ink-soft); }
.form-status {
  margin-top: 1rem;
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.92rem;
  display: none;
}
.form-status.show { display: block; }
.form-status.success { background: #E8F3E4; color: #2C5C2A; }
.form-status.error { background: #FBE7E4; color: var(--maroon-dark); }

/* ---- FAQ ---- */
.faq-item {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  margin-bottom: 1rem;
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 1.2rem 1.5rem;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--maroon-dark);
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: '+'; font-size: 1.4rem; color: var(--caramel); }
.faq-item[open] summary::after { content: '\2212'; }
.faq-item .faq-body { padding: 0 1.5rem 1.4rem; color: var(--ink-soft); }

/* ---- Contact ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; } }
.contact-info {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  color: var(--cream);
  border-radius: var(--radius-lg);
  padding: 2.25rem;
}
.contact-info h3 { color: var(--cream); margin-bottom: 1.5rem; }
.contact-item { display: flex; gap: 0.9rem; margin-bottom: 1.4rem; align-items: flex-start; }
.contact-item .icon { font-size: 1.3rem; }
.contact-item a, .contact-item span { color: rgba(253,246,233,0.92); }
.contact-item strong { display: block; color: var(--cream); margin-bottom: 0.15rem; }

/* ---- Footer ---- */
.site-footer {
  background: var(--maroon-dark);
  color: rgba(253,246,233,0.85);
  padding: 3.5rem 0 1.75rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 2.5rem;
}
@media (max-width: 780px) { .footer-grid { grid-template-columns: 1fr; gap: 2rem; } }
.footer-logo { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 1rem; }
.footer-logo .badge {
  background: var(--cream);
  border-radius: 50%;
  padding: 4px;
  display: flex;
  flex-shrink: 0;
}
.footer-logo img { height: 34px; width: 34px; display: block; border-radius: 50%; }
.footer-logo span { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; color: var(--cream); }
.footer-brand p { max-width: 34ch; font-size: 0.92rem; }
.footer-social { display: flex; gap: 0.6rem; margin-top: 1.1rem; }
.footer-social a {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(253,246,233,0.12);
  color: var(--cream);
  display: flex; align-items: center; justify-content: center;
  transition: background var(--transition);
}
.footer-social a:hover { background: var(--caramel); }
.footer-col h4 { color: var(--cream); font-family: var(--font-body); font-size: 0.9rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 1rem; }
.footer-col ul li { margin-bottom: 0.7rem; }
.footer-col a { font-size: 0.94rem; }
.footer-col a:hover { color: var(--caramel-light); }
.footer-bottom {
  border-top: 1px solid rgba(253,246,233,0.14);
  padding-top: 1.5rem;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  font-size: 0.85rem;
  color: rgba(253,246,233,0.6);
}

/* ---- Reveal on scroll (progressive enhancement, hidden only once JS confirms it can reveal) ---- */
body.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.6s ease, transform 0.6s ease; }
body.js .reveal.in-view { opacity: 1; transform: translateY(0); }

/* ---- Breadcrumb / page header ---- */
.page-header {
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  color: var(--cream);
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}
.page-header h1 { color: var(--cream); margin-bottom: 0.75rem; }
.page-header p { color: rgba(253,246,233,0.85); max-width: 60ch; margin: 0 auto; }

/* ---- Skip link ---- */
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--maroon-dark);
  color: var(--cream);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 8px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* ---- Legend ---- */
.legend { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: center; font-size: 0.9rem; color: var(--ink-soft); }
.legend span strong { color: var(--maroon-dark); }
