/* ==========================================================================
   Cookie in Box — stylesheet único do site (mobile-first)
   ========================================================================== */

:root {
  /* Brand: blue / black / white (from the Cookie in Box logo) */
  --pink: #e3f3fc;
  --pink-dark: #cfe9fa;
  --pink-text: #0b3a57;
  --brown: #12141a;
  --brown-soft: #45484d;
  --caramel: #159ee3;
  --caramel-dark: #0e7fb8;
  --cream: #ffffff;
  --cream-alt: #eef4f8;
  --black: #0d0e10;
  --white: #ffffff;
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 10px rgba(13, 14, 16, 0.08);
  --shadow-md: 0 8px 24px rgba(13, 14, 16, 0.16);
  --max-width: 1120px;
  --header-h: 64px;
  --font-display: "Fredoka", "Baloo 2", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--brown);
  line-height: 1.5;
  overflow-x: hidden;
}

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

a {
  color: inherit;
  text-decoration: none;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  line-height: 1.15;
  margin: 0 0 0.5em;
  color: var(--black);
}

p {
  margin: 0 0 1em;
}

ul {
  margin: 0;
  padding: 0;
}

button {
  font-family: inherit;
}

.container {
  width: 100%;
  max-width: var(--max-width);
  margin-inline: auto;
  padding-inline: 20px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--black);
  color: var(--white);
  padding: 10px 16px;
  z-index: 200;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  left: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  padding: 13px 24px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, background-color 0.15s ease, color 0.15s ease;
  white-space: nowrap;
}
.btn:active {
  transform: scale(0.97);
}
.btn-primary {
  background: var(--black);
  color: var(--white);
}
.btn-primary:hover {
  background: var(--brown-soft);
}
.btn-outline {
  background: transparent;
  border-color: var(--black);
  color: var(--black);
}
.btn-outline:hover {
  background: var(--black);
  color: var(--white);
}
.btn-block {
  width: 100%;
}
.btn-sm {
  padding: 10px 18px;
  font-size: 0.85rem;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: var(--pink);
  border-bottom: 1px solid rgba(0,0,0,0.05);
}
.site-header .container {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  width: 100%;
}
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: none;
  border: none;
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--black);
  padding: 8px 0;
  justify-self: start;
  cursor: pointer;
  flex-shrink: 0;
}
.menu-toggle .bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}
.menu-toggle .bars span {
  width: 22px;
  height: 3px;
  background: var(--black);
  border-radius: 2px;
}
.brand {
  justify-self: center;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  overflow: hidden;
}
.brand img {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  flex-shrink: 0;
}
.brand span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--black);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.header-cta {
  justify-self: end;
  flex-shrink: 0;
}
.header-cta .btn {
  padding: 10px 16px;
  font-size: 0.82rem;
}
@media (max-width: 420px) {
  .site-header .container {
    gap: 4px;
  }
  .menu-toggle .menu-label {
    display: none;
  }
  .brand span {
    font-size: 1rem;
  }
  .header-cta .btn {
    padding: 9px 12px;
    font-size: 0.78rem;
  }
}

/* ---------- Sidebar (off-canvas) ---------- */
.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(23, 17, 13, 0.5);
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease;
}
.sidebar-overlay.is-open {
  opacity: 1;
  visibility: visible;
}
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: min(86vw, 360px);
  background: var(--cream);
  z-index: 160;
  transform: translateX(-100%);
  transition: transform 0.28s ease;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-md);
}
.sidebar.is-open {
  transform: translateX(0);
}
.sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--pink);
}
.sidebar-head .brand span {
  font-size: 1.1rem;
}
.sidebar-close {
  background: none;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  color: var(--black);
  padding: 4px 8px;
}
.sidebar-nav {
  padding: 12px 8px;
  overflow-y: auto;
  flex: 1;
}
.sidebar-nav a {
  display: block;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 1.02rem;
  color: var(--brown);
}
.sidebar-nav a:hover,
.sidebar-nav a[aria-current="page"] {
  background: var(--pink);
  color: var(--pink-text);
}
.sidebar-nav .sub {
  padding-left: 12px;
}
.sidebar-nav .sub a {
  font-size: 0.92rem;
  font-weight: 500;
  padding: 10px 16px;
}
.sidebar-section-label {
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  color: var(--caramel-dark);
  font-weight: 700;
  padding: 16px 16px 4px;
}
.sidebar-foot {
  padding: 18px 20px 26px;
  border-top: 1px solid rgba(0,0,0,0.06);
}
.sidebar-social {
  display: flex;
  gap: 14px;
  margin-top: 12px;
}
.sidebar-social a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}

body.nav-open {
  overflow: hidden;
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: var(--pink);
  padding: 32px 0 40px;
  overflow: hidden;
}
.hero .container {
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.eyebrow {
  display: inline-block;
  background: var(--white);
  color: var(--pink-text);
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 14px;
  border-radius: 999px;
  width: fit-content;
}
.hero h1 {
  font-size: clamp(2rem, 8vw, 3.4rem);
  max-width: 20ch;
}
.hero p.lead {
  font-size: 1.05rem;
  color: var(--brown-soft);
  max-width: 46ch;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero-visual {
  display: flex;
  justify-content: center;
}
.cookie-photo {
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #6cc6f0, var(--caramel) 60%, var(--caramel-dark) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 5.5rem;
  box-shadow: var(--shadow-md);
}
@media (min-width: 860px) {
  .hero .container {
    flex-direction: row;
    align-items: center;
    padding-block: 30px;
  }
  .hero-copy {
    flex: 1;
  }
  .hero-visual {
    flex: 1;
  }
}

/* ---------- Sections ---------- */
.section {
  padding: 48px 0;
}
.section-alt {
  background: var(--cream-alt);
}
.section-dark {
  background: var(--brown);
  color: var(--cream);
}
.section-dark h2,
.section-dark h3 {
  color: var(--white);
}
.section-head {
  margin-bottom: 28px;
  max-width: 60ch;
}
.section-head p {
  color: var(--brown-soft);
}
.section-dark .section-head p {
  color: #b9d4e3;
}
.tag {
  display: inline-block;
  background: var(--pink);
  color: var(--pink-text);
  font-weight: 700;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 5px 12px;
  border-radius: 999px;
  margin-bottom: 10px;
}

/* ---------- Grids & Cards ---------- */
.grid {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 620px) {
  .grid-2 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 900px) {
  .grid-3 { grid-template-columns: repeat(3, 1fr); }
  .grid-4 { grid-template-columns: repeat(4, 1fr); }
}

.card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
}
.card-photo {
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--cream-alt), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.2rem;
}
.card-body {
  padding: 18px 18px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.card-body h3 {
  font-size: 1.15rem;
  margin-bottom: 0;
}
.card-body p {
  font-size: 0.92rem;
  color: var(--brown-soft);
  margin-bottom: 0;
  flex: 1;
}
.card-badge {
  align-self: flex-start;
  background: var(--black);
  color: var(--white);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 4px 10px;
  border-radius: 999px;
}

/* ---------- Featured flavor banner ---------- */
.feature-banner {
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #6cc6f0, var(--caramel));
  color: var(--black);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.feature-banner .card-photo {
  border-radius: var(--radius-md);
  background: rgba(255,255,255,0.35);
}
@media (min-width: 860px) {
  .feature-banner {
    flex-direction: row;
    align-items: center;
    padding: 0;
  }
  .feature-banner .feature-media {
    flex: 1;
  }
  .feature-banner .feature-media .card-photo {
    aspect-ratio: 1;
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    font-size: 5rem;
  }
  .feature-banner .feature-copy {
    flex: 1;
    padding: 32px;
  }
}

/* ---------- Order channels ---------- */
.order-channels {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 560px) {
  .order-channels { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 860px) {
  .order-channels { grid-template-columns: repeat(5, 1fr); }
}
.order-channel {
  background: var(--white);
  border: 2px solid var(--cream-alt);
  border-radius: var(--radius-sm);
  padding: 16px 10px;
  text-align: center;
  font-weight: 700;
  font-size: 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.order-channel:hover {
  border-color: var(--caramel);
  transform: translateY(-2px);
}
.order-channel .icon {
  font-size: 1.6rem;
}

/* ---------- Steps / how it works ---------- */
.steps {
  display: grid;
  gap: 20px;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
}
.step {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.step .num {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--pink);
  color: var(--pink-text);
  font-family: var(--font-display);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* ---------- Unit / location card ---------- */
.unit-card {
  background: var(--white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.unit-card h3 {
  margin-bottom: 2px;
}
.unit-card .unit-meta {
  font-size: 0.88rem;
  color: var(--brown-soft);
  display: flex;
  gap: 6px;
  align-items: flex-start;
}
.unit-card .unit-actions {
  margin-top: auto;
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

/* ---------- Location page ---------- */
.location-hero {
  background: var(--pink);
  padding: 28px 0 34px;
}
.breadcrumbs {
  font-size: 0.82rem;
  color: var(--brown-soft);
  margin-bottom: 14px;
}
.breadcrumbs a {
  color: var(--pink-text);
  font-weight: 600;
}
.location-info-grid {
  display: grid;
  gap: 22px;
  grid-template-columns: 1fr;
}
@media (min-width: 860px) {
  .location-info-grid { grid-template-columns: 1.1fr 0.9fr; }
}
.info-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.info-list li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: 0.95rem;
}
.info-list .ico {
  font-size: 1.2rem;
  line-height: 1.4;
}
.map-embed {
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  aspect-ratio: 4/3;
}
.map-embed iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* ---------- FAQ ---------- */
.faq-item {
  border-bottom: 1px solid rgba(0,0,0,0.08);
}
.faq-item summary {
  padding: 16px 4px;
  font-weight: 700;
  cursor: pointer;
  font-size: 1.02rem;
}
.faq-item p {
  padding: 0 4px 16px;
  color: var(--brown-soft);
}

/* ---------- Franchise lead form ---------- */
.lead-form {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 26px 22px;
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field label {
  font-weight: 700;
  font-size: 0.88rem;
}
.field input,
.field select,
.field textarea {
  border: 2px solid var(--cream-alt);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 0.95rem;
  font-family: inherit;
  background: var(--cream);
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: 2px solid var(--caramel);
  border-color: var(--caramel);
}

/* ---------- Stats ---------- */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
  text-align: center;
}
@media (min-width: 720px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
}
.stat strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  color: var(--black);
}
.stat span {
  font-size: 0.85rem;
  color: var(--brown-soft);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--white);
  border-top: 1px solid rgba(0,0,0,0.06);
}
.footer-nav {
  display: grid;
  gap: 24px;
  padding: 32px 0;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .footer-nav { grid-template-columns: repeat(3, 1fr); }
}
.footer-col h4 {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--caramel-dark);
  margin-bottom: 12px;
}
.footer-col ul {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-col a {
  font-size: 0.92rem;
  color: var(--brown-soft);
}
.footer-col a:hover {
  color: var(--black);
}
.footer-social {
  display: flex;
  gap: 12px;
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--black);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
}
.footer-bottom {
  background: var(--pink);
  text-align: center;
  padding: 26px 0 30px;
}
.footer-bottom .brand-lg {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 10px;
}
.footer-bottom small {
  display: block;
  font-size: 0.78rem;
  color: var(--pink-text);
  margin-top: 6px;
}
.footer-legal {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  font-size: 0.78rem;
  color: var(--pink-text);
  margin-top: 4px;
}

/* ---------- Sticky mobile order bar ---------- */
.sticky-order-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 90;
  background: var(--white);
  border-top: 1px solid rgba(0,0,0,0.08);
  padding: 10px 16px;
  padding-bottom: max(10px, env(safe-area-inset-bottom));
  box-shadow: 0 -4px 16px rgba(0,0,0,0.08);
}
@media (min-width: 860px) {
  .sticky-order-bar { display: none; }
}
.sticky-order-bar .btn {
  width: 100%;
}

/* Utility spacing for content that sits above sticky bar on mobile */
.has-sticky-bar {
  padding-bottom: 78px;
}
@media (min-width: 860px) {
  .has-sticky-bar { padding-bottom: 0; }
}

/* ==========================================================================
   Entrance & scroll animations
   Progressive enhancement: everything is fully visible without JS/CSS.
   html.js-anim (set by main.js) is what actually arms the hidden state,
   so crawlers, no-JS visitors and prefers-reduced-motion always see
   the final layout immediately.
   ========================================================================== */
html.js-anim .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, transform;
}
html.js-anim .reveal.is-visible {
  opacity: 1;
  transform: none;
}
html.js-anim .reveal-scale {
  transform: translateY(20px) scale(0.95);
}
html.js-anim .reveal-scale.is-visible {
  transform: none;
}

.delay-1 { --reveal-delay: 120ms; }
.delay-2 { --reveal-delay: 220ms; }
.delay-3 { --reveal-delay: 320ms; }

/* stagger: gives direct children an increasing --reveal-delay so a row
   of cards that enters the viewport together cascades in instead of
   popping at once. Elements stacked vertically already stagger for
   free from natural scroll timing — this only matters for grid rows. */
.stagger > *:nth-child(1) { --reveal-delay: 0ms; }
.stagger > *:nth-child(2) { --reveal-delay: 90ms; }
.stagger > *:nth-child(3) { --reveal-delay: 180ms; }
.stagger > *:nth-child(4) { --reveal-delay: 270ms; }
.stagger > *:nth-child(5) { --reveal-delay: 360ms; }
.stagger > *:nth-child(6) { --reveal-delay: 450ms; }

@media (prefers-reduced-motion: reduce) {
  html.js-anim .reveal,
  html.js-anim .reveal-scale {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* header gains a shadow once the page scrolls, like a lot of product
   marketing sites use to separate the nav from content */
.site-header {
  transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 2px 14px rgba(58, 36, 27, 0.15);
}

/* idle float on the hero cookie visual */
@media (prefers-reduced-motion: no-preference) {
  .cookie-photo {
    animation: float-cookie 5s ease-in-out infinite;
  }
}
@keyframes float-cookie {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* card hover lift */
.card,
.unit-card {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.card:hover,
.unit-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-md);
}
.order-channel {
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

/* sidebar links cascade in as the drawer opens */
.sidebar-nav li {
  opacity: 0;
  transform: translateX(-14px);
  transition: opacity 0.35s ease, transform 0.35s ease;
}
.sidebar.is-open .sidebar-nav li {
  opacity: 1;
  transform: none;
}
.sidebar-nav li:nth-child(1) { transition-delay: 0.03s; }
.sidebar-nav li:nth-child(2) { transition-delay: 0.06s; }
.sidebar-nav li:nth-child(3) { transition-delay: 0.09s; }
.sidebar-nav li:nth-child(4) { transition-delay: 0.12s; }
.sidebar-nav li:nth-child(5) { transition-delay: 0.15s; }
.sidebar-nav li:nth-child(6) { transition-delay: 0.18s; }
.sidebar-nav li:nth-child(7) { transition-delay: 0.21s; }
.sidebar-nav li:nth-child(8) { transition-delay: 0.24s; }
.sidebar-nav li:nth-child(9) { transition-delay: 0.27s; }
.sidebar-nav li:nth-child(10) { transition-delay: 0.30s; }
.sidebar-nav li:nth-child(11) { transition-delay: 0.33s; }
.sidebar-nav li:nth-child(12) { transition-delay: 0.36s; }

@media (prefers-reduced-motion: reduce) {
  .sidebar-nav li {
    opacity: 1;
    transform: none;
    transition: none;
  }
}
