/* =========================================================
   KLAV BAKES — STYLES
   Portfolio demo website. Plain CSS, no frameworks.

   Contents:
   1. Fonts
   2. Design tokens (colors, fonts, spacing)
   3. Base / reset
   4. Accessibility helpers
   5. Layout helpers
   6. Buttons
   7. Demo notice bar
   8. Header and navigation
   9. Hero (the big welcome area)
   10. Sections
   11. Product cards (Best Sellers)
   12. Why Klav Bakes (benefits)
   13. Full menu
   14. Custom orders
   15. How to order (steps)
   16. Sample reviews
   17. Special offer (email sign-up)
   18. Forms
   19. FAQ
   20. Contact & order form
   21. Order item picker & summary
   22. Promo pop-up
   23. Policies page
   24. Gentle scroll animations
   25. Footer
   26. Reduced motion
   ========================================================= */


/* ---------- 1. FONTS ----------
   Both fonts are free under the SIL Open Font License 1.1.
   The files are stored on our own site (no Google Fonts request).
   License files: assets/fonts/Fraunces-OFL.txt and Inter-OFL.txt
   Until the font files are added, the browser uses the
   backup fonts listed in section 2 (Georgia and system fonts). */

@font-face {
  font-family: "Fraunces";
  src: url("assets/fonts/Fraunces-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap; /* show fallback text right away, swap when loaded */
}

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter-Variable.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}


/* ---------- 2. DESIGN TOKENS ----------
   Change a brand color or font HERE and it updates everywhere.
   60-30-10 rule:
   60% cream background / 30% cocoa brown / 10% terracotta accent.
   All text/background pairs below were checked for contrast
   (at least 4.5:1 for normal text). */

:root {
  /* 60% — main */
  --color-cream: #FBF6EE;
  --color-cream-deep: #F3EADF;   /* slightly darker cream for alternate sections */

  /* 30% — secondary */
  --color-cocoa: #3B2A22;        /* text, header, footer, dark sections */
  --color-cocoa-soft: #6B5A50;   /* secondary text (6.1:1 on cream) */

  /* 10% — accent */
  --color-accent: #B5523B;       /* buttons, highlights (white text: 4.96:1) */
  --color-accent-dark: #9E4531;  /* button hover */
  --color-accent-light: #E8A58C; /* accent on dark backgrounds (6.6:1 on cocoa) */

  --color-white: #FFFFFF;
  --color-border: #E4D8CB;

  /* Fonts (with safe fallbacks if the font files fail to load) */
  --font-heading: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /* Spacing scale */
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 1.5rem;
  --space-lg: 2.5rem;
  --space-xl: 4rem;
  --space-section: clamp(4rem, 9vw, 7rem);

  /* Shapes */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-pill: 999px;

  --container-width: 1160px;
  --header-height: 72px;
  --shadow-soft: 0 10px 30px rgba(59, 42, 34, 0.08);
  --transition: 0.2s ease;
}


/* ---------- 3. BASE / RESET ---------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  /* Stops the sticky header from covering headings after a menu link jump */
  scroll-padding-top: calc(var(--header-height) + 1rem);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--color-cream);
  color: var(--color-cocoa);
  font-family: var(--font-body);
  font-size: 1.0625rem;           /* about 17px */
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-sm);
  font-variation-settings: "SOFT" 50; /* Fraunces' softer letter shapes */
}

/* Font sizes grow smoothly with the screen: clamp(min, preferred, max) */
h1 { font-size: clamp(2.4rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p {
  margin: 0 0 var(--space-sm);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--color-accent-dark);
  text-underline-offset: 0.2em;
}

a:hover {
  color: var(--color-cocoa);
}

ul {
  margin: 0;
  padding: 0;
}


/* ---------- 4. ACCESSIBILITY HELPERS ---------- */

/* Visible outline when someone navigates with the keyboard (Tab key) */
:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* Hidden until a keyboard user presses Tab on page load */
.skip-link {
  position: absolute;
  left: var(--space-sm);
  top: -100px;
  z-index: 1000;
  padding: 0.75rem 1.25rem;
  background: var(--color-cocoa);
  color: var(--color-cream);
  font-weight: 600;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.skip-link:focus {
  top: var(--space-sm);
  color: var(--color-cream);
}

/* Hides text visually but keeps it readable by screen readers */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ---------- 5. LAYOUT HELPERS ---------- */

.container {
  width: 100%;
  max-width: var(--container-width);
  margin-inline: auto;
  padding-inline: clamp(1rem, 4vw, 2rem);
}

.eyebrow {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
  margin-bottom: var(--space-xs);
}

.lead {
  font-size: clamp(1.1rem, 2vw, 1.25rem);
  color: var(--color-cocoa-soft);
  max-width: 60ch;
}


/* ---------- 6. BUTTONS ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 48px;               /* comfortable tap size on phones */
  padding: 0.75rem 1.6rem;
  border: 2px solid transparent;
  border-radius: var(--radius-pill);
  font-family: var(--font-body);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition), transform var(--transition);
}

.btn:hover {
  transform: translateY(-1px);
}

/* Main call-to-action (the 10% accent) */
.btn-primary {
  background-color: var(--color-accent);
  color: var(--color-white);
}

.btn-primary:hover {
  background-color: var(--color-accent-dark);
  color: var(--color-white);
}

/* Secondary action (outline) */
.btn-secondary {
  background-color: transparent;
  border-color: var(--color-cocoa);
  color: var(--color-cocoa);
}

.btn-secondary:hover {
  background-color: var(--color-cocoa);
  color: var(--color-cream);
}


/* ---------- 7. DEMO NOTICE BAR ---------- */

.demo-bar {
  background-color: var(--color-cocoa);
  color: var(--color-cream);
  font-size: 0.85rem;
  text-align: center;
  padding: 0.55rem 1rem;
}

.demo-bar p {
  margin: 0;
}


/* ---------- 8. HEADER AND NAVIGATION ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background-color: rgba(251, 246, 238, 0.95);
  border-bottom: 1px solid var(--color-border);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: var(--header-height);
}

/* Text logo (original wordmark, no image needed) */
.logo {
  font-family: var(--font-heading);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--color-cocoa);
  text-decoration: none;
  letter-spacing: -0.02em;
  font-variation-settings: "SOFT" 100;
}

.logo span {
  color: var(--color-accent);
  font-style: normal;
  font-weight: 500;
}

.logo:hover {
  color: var(--color-cocoa);
}

/* Navigation links */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.5rem;
  list-style: none;
}

.site-nav ul a {
  display: inline-block;
  padding: 0.5rem 0;
  color: var(--color-cocoa);
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  border-bottom: 2px solid transparent;
  transition: border-color var(--transition), color var(--transition);
}

.site-nav ul a:hover {
  border-bottom-color: var(--color-accent);
}

/* Mobile menu button: hidden on large screens */
.menu-toggle {
  display: none;
  align-items: center;
  gap: 0.6rem;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  background: transparent;
  border: 2px solid var(--color-cocoa);
  border-radius: var(--radius-pill);
  color: var(--color-cocoa);
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
}

/* Three-line "hamburger" icon drawn with CSS */
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 18px;
  height: 2px;
  background-color: currentColor;
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}

.menu-toggle-bars {
  position: relative;
}

.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}

.menu-toggle-bars::before { top: -6px; }
.menu-toggle-bars::after  { top: 6px; }

/* Bars turn into an X when the menu is open */
.menu-toggle[aria-expanded="true"] .menu-toggle-bars {
  background-color: transparent;
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::before {
  transform: translateY(6px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] .menu-toggle-bars::after {
  transform: translateY(-6px) rotate(-45deg);
}

/* ----- Tablet and phone: below 960px ----- */
@media (max-width: 960px) {

  /* Without JavaScript: links simply stack below the logo */
  .header-inner {
    flex-wrap: wrap;
  }

  .site-nav {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    padding-bottom: var(--space-sm);
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav ul a {
    display: block;
    padding: 0.85rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--color-border);
  }

  .site-nav ul a:hover {
    border-bottom-color: var(--color-border);
    color: var(--color-accent-dark);
  }

  .nav-cta {
    margin-top: var(--space-sm);
  }

  /* With JavaScript: show the Menu button and hide links until tapped */
  .js .menu-toggle {
    display: inline-flex;
  }

  .js .site-nav {
    display: none;
  }

  .js .site-nav.is-open {
    display: flex;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
  }
}


/* ---------- 9. HERO (the big welcome area) ---------- */

.hero {
  padding-block: clamp(3rem, 7vw, 6rem);
  overflow: hidden;
}

/* Two columns on desktop: text on the left, photo on the right */
.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}

.hero h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  margin-bottom: var(--space-md);
}

.hero .lead {
  margin-bottom: var(--space-lg);
}

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
  margin-bottom: var(--space-lg);
}

/* Small facts row with terracotta dots */
.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  list-style: none;
  font-size: 0.95rem;
  color: var(--color-cocoa-soft);
}

.hero-facts li {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.hero-facts li::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background-color: var(--color-accent);
  flex-shrink: 0;
}

/* The photo */
.hero-image {
  position: relative;
}

.hero-image img {
  width: 100%;
  aspect-ratio: 1 / 1;          /* square frame on desktop */
  object-fit: cover;            /* fills the frame without stretching */
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  background-color: var(--color-cream-deep); /* shows while the photo loads */
}

/* Small label that overlaps the bottom-left corner of the photo */
.hero-badge {
  position: absolute;
  left: -1.25rem;
  bottom: 2rem;
  margin: 0;
  padding: 0.9rem 1.2rem;
  background-color: var(--color-cream);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-soft);
  font-family: var(--font-heading);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.3;
}

.hero-badge span {
  display: block;
  color: var(--color-accent-dark);
}

/* Tablet and phone: stack the text above the photo */
@media (max-width: 860px) {
  .hero-inner {
    grid-template-columns: 1fr;
  }

  .hero-image img {
    aspect-ratio: 3 / 2;        /* wider, shorter frame on small screens */
  }

  .hero-badge {
    left: 1rem;
    bottom: 1rem;
    font-size: 0.95rem;
  }
}

/* Small phones: buttons fill the width, easier to tap */
@media (max-width: 480px) {
  .hero-buttons .btn {
    flex: 1 1 100%;
  }
}


/* ---------- 10. SECTIONS ---------- */

.section {
  padding-block: var(--space-section);
}

/* Alternate background to separate sections */
.section-alt {
  background-color: var(--color-cream-deep);
}

/* Dark section (part of the 30% cocoa) */
.section-dark {
  background-color: var(--color-cocoa);
  color: var(--color-cream);
}

.section-dark .eyebrow {
  color: var(--color-accent-light);
}

/* Plain text links on dark backgrounds (not buttons) */
.section-dark a:not(.btn) {
  color: var(--color-accent-light);
}

/* Heading block at the top of each section */
.section-header {
  max-width: 680px;
  margin-bottom: var(--space-xl);
}

.section-header .lead {
  margin-bottom: 0;
}

/* Small label that marks demo/sample content */
.demo-note {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.85rem;
  font-style: italic;
  color: var(--color-cocoa-soft);
}

/* "See the full menu" style link under a section */
.section-more {
  margin: var(--space-lg) 0 0;
  text-align: center;
  font-weight: 600;
}

/* Clear notice box for demo content (used on the reviews) */
.demo-banner {
  display: inline-block;
  margin: var(--space-md) 0 0;
  padding: 0.6rem 1rem;
  background-color: var(--color-white);
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
}

/* Tiny "demo" / "sample" label next to fictional details */
.demo-tag {
  display: inline-block;
  margin-left: 0.35rem;
  padding: 0.05rem 0.45rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-cocoa-soft);
  vertical-align: middle;
}


/* ---------- 11. PRODUCT CARDS (Best Sellers) ---------- */

/* Grid: 3 cards per row on desktop, 2 on tablet, 1 on phone */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.product-card {
  display: flex;
  flex-direction: column;
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;              /* keeps the photo inside the rounded corners */
  transition: transform var(--transition), box-shadow var(--transition);
}

.product-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-soft);
}

.product-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  background-color: var(--color-cream-deep);
}

.product-body {
  display: flex;
  flex-direction: column;
  flex-grow: 1;                  /* makes all cards in a row the same height */
  padding: var(--space-md);
}

.product-body h3 {
  margin-bottom: var(--space-xs);
}

.product-body p {
  color: var(--color-cocoa-soft);
  font-size: 0.975rem;
}

/* Price and button row, pushed to the bottom of the card */
.product-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
}

.product-body .price {
  margin: 0;
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--color-cocoa);
}

.price span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-cocoa-soft);
}

/* Smaller outlined button used inside cards */
.btn-small {
  min-height: 44px;
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
  border-color: var(--color-accent);
  color: var(--color-accent-dark);
  background-color: transparent;
}

.btn-small:hover {
  background-color: var(--color-accent);
  color: var(--color-white);
}

@media (max-width: 960px) {
  .product-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .product-grid {
    grid-template-columns: 1fr;
  }
}


/* ---------- 12. WHY KLAV BAKES (benefits) ---------- */

/* 4 across on desktop, 2 on tablet, 1 on phone */
.benefit-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

.benefit {
  padding: var(--space-md);
  background-color: var(--color-cream);
  border-radius: var(--radius-md);
  border-top: 3px solid var(--color-accent);
}

.benefit-number {
  display: block;
  margin-bottom: var(--space-sm);
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1;
  color: var(--color-accent);
}

.benefit h3 {
  font-size: 1.25rem;
}

.benefit p {
  margin: 0;
  color: var(--color-cocoa-soft);
  font-size: 0.975rem;
}

@media (max-width: 960px) {
  .benefit-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px) {
  .benefit-grid {
    grid-template-columns: 1fr;
  }
}


/* ---------- 13. FULL MENU ---------- */

/* Category quick links (pill buttons that wrap on small screens) */
.menu-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: var(--space-lg);
}

.menu-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  background-color: var(--color-white);
  color: var(--color-cocoa);
  font-size: 0.95rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color var(--transition), color var(--transition),
              border-color var(--transition);
}

.menu-tabs a:hover {
  background-color: var(--color-cocoa);
  border-color: var(--color-cocoa);
  color: var(--color-cream);
}

/* Categories: 2 columns on desktop, 1 on phone */
.menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
}

.menu-category {
  padding: var(--space-md) var(--space-lg);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

/* The last category (Dessert Boxes) stretches across both columns */
.menu-category-wide {
  grid-column: 1 / -1;
}

.menu-category h3 {
  padding-bottom: var(--space-sm);
  border-bottom: 2px solid var(--color-accent);
}

.menu-list {
  list-style: none;
}

.menu-item {
  padding-block: var(--space-sm);
  border-bottom: 1px dashed var(--color-border);
}

.menu-item:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

/* Name on the left, price on the right */
.menu-item-top {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-sm);
}

.menu-item-name {
  font-weight: 600;
}

.menu-item-price {
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-accent-dark);
}

.menu-item p {
  margin: 0.2rem 0 0;
  font-size: 0.925rem;
  color: var(--color-cocoa-soft);
}

/* Allergen and calorie notes: side by side on desktop, stacked on phones */
.menu-notes {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin-top: var(--space-lg);
}

.menu-note {
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-cream-deep);
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

/* Calorie estimates on cards and menu items */
.kcal {
  font-size: 0.85rem;
  color: var(--color-cocoa-soft);
}

.product-body .kcal {
  margin-top: -0.5rem;
  font-size: 0.85rem;
}

.menu-item .kcal {
  display: block;
  margin-top: 0.15rem;
  font-size: 0.8rem;
}

/* Small disclaimer text under a section */
.fine-print {
  margin: var(--space-md) 0 0;
  font-size: 0.85rem;
  color: var(--color-cocoa-soft);
}

.fine-print .demo-note {
  margin-top: 0;
}

@media (max-width: 760px) {
  .menu-grid,
  .menu-notes {
    grid-template-columns: 1fr;
  }

  .menu-category {
    padding: var(--space-md);
  }
}


/* ---------- 14. CUSTOM ORDERS ---------- */

/* Two columns on desktop: text on the left, checklist card on the right */
.custom-inner {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: start;
}

.section-dark .lead {
  color: rgba(251, 246, 238, 0.85);
}

/* The 4 custom order types, 2 x 2 */
.custom-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-md);
  margin: var(--space-lg) 0;
  list-style: none;
}

.custom-list li {
  padding-left: var(--space-sm);
  border-left: 2px solid var(--color-accent-light);
}

.custom-list h3 {
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
  color: var(--color-cream);
}

.custom-list p {
  margin: 0;
  font-size: 0.95rem;
  color: rgba(251, 246, 238, 0.8);
}

/* Light card on the dark background */
.custom-card {
  padding: var(--space-lg);
  background-color: var(--color-cream);
  color: var(--color-cocoa);
  border-radius: var(--radius-md);
}

.custom-card h3 {
  font-size: 1.3rem;
}

/* List with small terracotta check marks drawn in CSS */
.check-list {
  list-style: none;
  margin-bottom: var(--space-md);
}

.check-list li {
  position: relative;
  padding: 0.45rem 0 0.45rem 1.9rem;
  border-bottom: 1px solid var(--color-border);
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.8rem;
  width: 0.45rem;
  height: 0.8rem;
  border: solid var(--color-accent);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.custom-card-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-cocoa-soft);
}

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

@media (max-width: 520px) {
  .custom-list {
    grid-template-columns: 1fr;
  }

  .custom-card {
    padding: var(--space-md);
  }
}


/* ---------- 15. HOW TO ORDER (steps) ---------- */

/* 4 steps in a row on desktop, 2 on tablet, 1 on phone */
.steps {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-md);
  margin: 0;
  padding: 0;
  list-style: none;
}

/* Thin line connecting the step circles (desktop only) */
.steps::before {
  content: "";
  position: absolute;
  top: 1.6rem;
  left: 12%;
  right: 12%;
  height: 2px;
  background-color: var(--color-border);
}

.step {
  position: relative;            /* sits on top of the connecting line */
  text-align: center;
  padding-inline: var(--space-xs);
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3.2rem;
  height: 3.2rem;
  margin-bottom: var(--space-sm);
  border-radius: 50%;
  background-color: var(--color-accent);
  color: var(--color-white);
  font-family: var(--font-heading);
  font-size: 1.35rem;
  font-weight: 700;
  box-shadow: 0 0 0 6px var(--color-cream); /* gap around the circle over the line */
}

.step h3 {
  font-size: 1.2rem;
}

.step p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-cocoa-soft);
}

@media (max-width: 960px) {
  .steps {
    grid-template-columns: repeat(2, 1fr);
    row-gap: var(--space-lg);
  }

  .steps::before {
    display: none;
  }
}

/* Phone: number on the left, text on the right */
@media (max-width: 560px) {
  .steps {
    grid-template-columns: 1fr;
  }

  .step {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: var(--space-sm);
    text-align: left;
    padding-inline: 0;
  }

  .step-number {
    grid-row: span 2;
    width: 2.6rem;
    height: 2.6rem;
    font-size: 1.1rem;
  }

  .step h3 {
    margin-bottom: 0.25rem;
  }
}


/* ---------- 16. SAMPLE REVIEWS ---------- */

.review-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-md);
}

.review-card {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: var(--space-lg) var(--space-md) var(--space-md);
  background-color: var(--color-cream);
  border-radius: var(--radius-md);
  position: relative;
}

/* Label on every card so a review is never mistaken for a real one */
.review-tag {
  position: absolute;
  top: var(--space-sm);
  right: var(--space-sm);
  padding: 0.1rem 0.55rem;
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}

.review-card blockquote {
  margin: var(--space-sm) 0 var(--space-md);
  font-family: var(--font-heading);
  font-size: 1.15rem;
  line-height: 1.5;
}

.review-card blockquote p {
  margin: 0;
}

.review-card figcaption {
  margin-top: auto;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-border);
  font-size: 0.9rem;
}

.review-name {
  display: block;
  font-weight: 600;
}

.review-detail {
  color: var(--color-cocoa-soft);
}

@media (max-width: 960px) {
  .review-grid {
    grid-template-columns: 1fr;
    max-width: 640px;
  }
}


/* ---------- 17. SPECIAL OFFER (email sign-up) ---------- */

.offer-box {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
  padding: clamp(2rem, 5vw, 3.5rem);
  background-color: var(--color-cream-deep);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
}

.offer-text .lead {
  margin: 0;
}

.offer-text strong {
  color: var(--color-accent-dark);
}

.offer-form > label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.offer-row {
  display: flex;
  gap: var(--space-xs);
  margin-bottom: var(--space-sm);
}

.offer-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.offer-row .btn {
  flex-shrink: 0;
  white-space: nowrap;           /* keeps "Get My 15% Off" on one line */
}

@media (max-width: 860px) {
  .offer-box {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .offer-row {
    flex-direction: column;
  }
}


/* ---------- 18. FORMS (shared by sign-up and order form) ---------- */

input[type="text"],
input[type="email"],
input[type="date"],
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.7rem 0.9rem;
  background-color: var(--color-white);
  border: 1px solid #958578;       /* 3.6:1 contrast so the box edge is easy to see */
  border-radius: var(--radius-sm);
  color: var(--color-cocoa);
  font-family: var(--font-body);
  font-size: 1rem;                 /* 16px or more stops iPhones from zooming in */
}

textarea {
  resize: vertical;
}

input:focus-visible,
textarea:focus-visible {
  border-color: var(--color-accent);
}

::placeholder {
  color: #75655B;                  /* 5.6:1 contrast */
}

/* Red outline only after the visitor tries to submit */
.was-submitted input:invalid,
.was-submitted textarea:invalid {
  border-color: #B42318;
  border-width: 2px;
}

.form-field {
  margin: 0 0 var(--space-md);
  padding: 0;
  border: 0;
}

.form-field label,
.form-field legend {
  display: block;
  margin-bottom: 0.4rem;
  padding: 0;
  font-weight: 600;
}

.radio-row,
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
}

.radio-row input,
.checkbox-row input {
  flex-shrink: 0;
  width: 1.2rem;
  height: 1.2rem;
  margin-top: 0.2rem;
  accent-color: var(--color-accent);
}

.radio-row label,
.checkbox-row label {
  margin: 0;
  font-weight: 400;
}

.checkbox-row label {
  font-size: 0.92rem;
}

.form-help {
  margin: 0.4rem 0 0;
  font-size: 0.875rem;
  color: var(--color-cocoa-soft);
}

.form-demo-note {
  font-style: italic;
}

/* Message area: empty until the form is submitted */
.form-status {
  margin: var(--space-sm) 0 0;
  font-weight: 600;
}

.form-status:empty {
  display: none;
}

.form-status.is-success {
  padding: 0.75rem 1rem;
  background-color: #E7F2E8;
  border-left: 3px solid #2F6B3A;
  border-radius: var(--radius-sm);
  color: #1F4D28;
}

.form-status.is-error {
  padding: 0.75rem 1rem;
  background-color: #FBEAE8;
  border-left: 3px solid #B42318;
  border-radius: var(--radius-sm);
  color: #8A1C13;
}


/* ---------- 19. FAQ ---------- */

.faq-inner {
  display: grid;
  grid-template-columns: 1fr 1.6fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.faq-item {
  background-color: var(--color-cream);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}

.faq-item summary {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-sm);
  min-height: 56px;
  padding: 0.9rem 1.2rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;               /* hides the default triangle */
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

/* Plus sign that turns into a minus when open (drawn with CSS) */
.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  font-family: var(--font-heading);
  font-size: 1.5rem;
  line-height: 1;
  color: var(--color-accent);
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item[open] summary {
  border-bottom: 1px solid var(--color-border);
}

.faq-answer {
  padding: 0.9rem 1.2rem 1.1rem;
}

.faq-answer p {
  margin: 0;
  color: var(--color-cocoa-soft);
}

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

  .faq-inner .section-header {
    margin-bottom: var(--space-md);
  }
}


/* ---------- 20. CONTACT & ORDER FORM ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.3fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.contact-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.contact-demo-status {
  font-weight: 500;
  font-size: 0.92rem;
}

.contact-list {
  margin: var(--space-lg) 0 0;
}

.contact-list div {
  padding-block: var(--space-sm);
  border-bottom: 1px solid var(--color-border);
}

.contact-list dt {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}

.contact-list dd {
  margin: 0.2rem 0 0;
}

.order-form {
  padding: clamp(1.5rem, 4vw, 2.5rem);
  background-color: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.order-form h3 {
  margin-bottom: 0.25rem;
}

.order-form > .form-help:first-of-type {
  margin-bottom: var(--space-md);
}

.order-form .btn {
  width: 100%;
  margin-top: var(--space-sm);
}

@media (max-width: 860px) {
  .contact-grid {
    grid-template-columns: 1fr;
  }
}


/* ---------- 21. ORDER ITEM PICKER & SUMMARY ---------- */

/* Quantity dropdowns (same look as the other form fields) */
select {
  min-height: 44px;
  padding: 0.4rem 2rem 0.4rem 0.7rem;
  background-color: var(--color-white);
  border: 1px solid #958578;
  border-radius: var(--radius-sm);
  color: var(--color-cocoa);
  font-family: var(--font-body);
  font-size: 1rem;
  cursor: pointer;
}

select:disabled {
  background-color: var(--color-cream-deep);
  color: #8A7B70;
  cursor: not-allowed;
}

select:focus-visible {
  border-color: var(--color-accent);
}

.item-picker-help {
  margin: 0 0 var(--space-sm);
}

/* One row per product: checkbox, name, price, quantity */
.item-row {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  align-items: center;
  gap: 0.4rem 0.8rem;
  padding: 0.7rem 0.8rem;
  margin-bottom: 0.5rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  background-color: var(--color-white);
  transition: border-color var(--transition), background-color var(--transition);
}

.item-row.is-selected {
  border-color: var(--color-accent);
  background-color: #FDF4EF;
}

.item-check {
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
  accent-color: var(--color-accent);
  cursor: pointer;
}

.form-field .item-label {
  margin: 0;
  font-weight: 400;
  cursor: pointer;
}

.item-name {
  display: block;
  font-weight: 600;
}

.item-unit {
  display: block;
  font-size: 0.82rem;
  color: var(--color-cocoa-soft);
}

.item-price {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--color-accent-dark);
  white-space: nowrap;
}

.item-qty {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

.form-field .item-qty label {
  margin: 0;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--color-cocoa-soft);
}

/* Error message when no item is selected */
.field-error {
  color: #B42318;
  font-weight: 600;
}

.item-picker.has-error .item-row {
  border-color: #B42318;
}

/* Live order summary */
.order-summary {
  margin-bottom: var(--space-md);
  padding: var(--space-sm) var(--space-md);
  background-color: var(--color-cream);
  border: 1px dashed var(--color-accent);
  border-radius: var(--radius-sm);
}

.order-summary h4 {
  margin: 0 0 0.5rem;
  font-family: var(--font-heading);
  font-size: 1.1rem;
}

.summary-empty {
  margin: 0;
  font-size: 0.92rem;
  color: var(--color-cocoa-soft);
}

.summary-list {
  list-style: none;
}

.summary-list li {
  display: grid;
  grid-template-columns: 1fr auto auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.45rem 0;
  border-bottom: 1px solid var(--color-border);
  font-size: 0.95rem;
}

.summary-price {
  font-weight: 600;
  white-space: nowrap;
}

/* "Remove" looks like a small text link, but is a real button */
.summary-remove {
  min-height: 32px;
  padding: 0.2rem 0.5rem;
  background: none;
  border: 0;
  border-radius: 4px;
  color: var(--color-accent-dark);
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.summary-remove:hover {
  color: var(--color-cocoa);
}

.summary-total {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-top: 0.6rem;
  font-weight: 600;
}

.summary-total strong {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--color-cocoa);
}

/* Phones: quantity moves under the product name */
@media (max-width: 520px) {
  .item-row {
    grid-template-columns: auto 1fr auto;
  }

  .item-qty {
    grid-column: 2 / -1;
  }

  .summary-list li {
    grid-template-columns: 1fr auto;
  }

  .summary-remove {
    grid-column: 1 / -1;
    justify-self: start;
    padding-left: 0;
  }
}


/* ---------- 22. PROMO POP-UP ---------- */

.promo-popup {
  width: min(460px, calc(100% - 2rem));
  max-height: calc(100% - 2rem);
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  background-color: var(--color-cream);
  color: var(--color-cocoa);
  box-shadow: 0 24px 60px rgba(30, 20, 15, 0.35);
  overflow: auto;
}

/* The dark see-through background behind the pop-up */
.promo-popup::backdrop {
  background-color: rgba(30, 20, 15, 0.55);
}

/* Gentle fade and rise when it opens */
.promo-popup[open] {
  animation: popup-in 0.3s ease-out;
}

@keyframes popup-in {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.promo-inner {
  position: relative;
  padding: clamp(1.75rem, 5vw, 2.5rem);
  border-top: 5px solid var(--color-accent);
  text-align: center;
}

.promo-inner h2 {
  font-size: clamp(1.6rem, 5vw, 2rem);
  margin-bottom: 0.6rem;
}

.promo-inner > div > p {
  color: var(--color-cocoa-soft);
}

.promo-close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: none;
  border: 0;
  border-radius: 50%;
  color: var(--color-cocoa);
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
}

.promo-close:hover {
  background-color: var(--color-cream-deep);
}

.promo-form {
  margin-top: var(--space-md);
  text-align: left;
}

.promo-form > label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}

.promo-form .checkbox-row {
  margin-top: var(--space-sm);
}

.promo-form .btn {
  width: 100%;
  margin-top: var(--space-sm);
}

.promo-no-thanks {
  margin-top: var(--space-sm);
  min-height: 44px;
  padding: 0.4rem 0.8rem;
  background: none;
  border: 0;
  color: var(--color-cocoa-soft);
  font-family: var(--font-body);
  font-size: 0.92rem;
  text-decoration: underline;
  text-underline-offset: 0.2em;
  cursor: pointer;
}

.promo-no-thanks:hover {
  color: var(--color-cocoa);
}

.promo-demo {
  margin: var(--space-xs) 0 0;
  font-size: 0.8rem;
  font-style: italic;
}

.promo-success .btn {
  margin-top: var(--space-sm);
}

.promo-success h2:focus {
  outline: none;
}

/* Stop the page behind from scrolling while the pop-up is open */
body.popup-open {
  overflow: hidden;
}


/* ---------- 23. POLICIES PAGE ---------- */

.policy-page {
  padding-block: clamp(3rem, 7vw, 5rem);
}

.policy-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* Side list of policies (stays in view on desktop) */
.policy-nav {
  position: sticky;
  top: calc(var(--header-height) + 1.5rem);
  padding: var(--space-md);
  background-color: var(--color-cream-deep);
  border-radius: var(--radius-md);
}

.policy-nav h2 {
  font-family: var(--font-body);
  font-size: 0.8rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-dark);
}

.policy-nav ul {
  list-style: none;
}

.policy-nav a {
  display: block;
  padding: 0.45rem 0;
  color: var(--color-cocoa);
  text-decoration: none;
}

.policy-nav a:hover {
  color: var(--color-accent-dark);
  text-decoration: underline;
}

.policy-notice {
  margin-bottom: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background-color: #FFF4E5;
  border-left: 3px solid var(--color-accent);
  border-radius: var(--radius-sm);
}

.policy-notice p {
  margin: 0;
}

.policy-section {
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-lg);
  border-bottom: 1px solid var(--color-border);
}

.policy-section:last-child {
  border-bottom: none;
}

.policy-section h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

.policy-section ul {
  padding-left: 1.25rem;
  margin-bottom: var(--space-sm);
}

.policy-section li {
  margin-bottom: 0.35rem;
}

.policy-flag {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--color-cocoa-soft);
}

@media (max-width: 860px) {
  .policy-layout {
    grid-template-columns: 1fr;
  }

  .policy-nav {
    position: static;
  }
}


/* ---------- 24. GENTLE SCROLL ANIMATIONS ----------
   Sections fade up slightly as they come into view.
   script.js adds "reveal-ready" to the page only when the visitor
   has NOT asked for reduced motion, so nothing is ever hidden
   if JavaScript is off. */

.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal-ready .reveal.is-visible {
  opacity: 1;
  transform: none;
}


/* ---------- 25. FOOTER ---------- */

.site-footer {
  background-color: var(--color-cocoa);
  color: var(--color-cream);
  padding-top: var(--space-xl);
  font-size: 0.95rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: var(--space-lg);
  padding-bottom: var(--space-lg);
}

.logo-light {
  color: var(--color-cream);
}

.logo-light:hover {
  color: var(--color-cream);
}

.logo-light span {
  color: var(--color-accent-light);
}

.footer-brand p {
  margin-top: var(--space-sm);
  max-width: 32ch;
}

.footer-demo {
  font-size: 0.85rem;
  opacity: 0.8;
}

.footer-heading {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--color-accent-light);
  margin-bottom: var(--space-sm);
}

.footer-col ul {
  list-style: none;
}

.footer-col li + li {
  margin-top: 0.35rem;
}

.site-footer a {
  color: var(--color-cream);
  text-decoration: none;
}

.footer-col a {
  display: inline-block;
  padding-block: 0.2rem;
}

.site-footer a:hover {
  color: var(--color-accent-light);
  text-decoration: underline;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-xs) var(--space-md);
  padding-block: var(--space-md);
  border-top: 1px solid rgba(251, 246, 238, 0.15);
  font-size: 0.85rem;
}

.footer-bottom p {
  margin: 0;
  opacity: 0.85;
}

/* Tablet: two columns */
@media (max-width: 860px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr;
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

/* Phone: one column */
@media (max-width: 520px) {
  .footer-grid {
    grid-template-columns: 1fr;
  }
}


/* ---------- 26. REDUCED MOTION ----------
   Respects visitors who turn off animations in their device settings */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Fixes, 6 Nov 2026: no sideways scrolling and easier tapping on phones ---------- */
html, body { overflow-x: clip; }
footer a:not([class]) { display: inline-block; padding-block: 4px; }
