/* ==========================================================
   Aquele Bolo — design system base
   ========================================================== */
@import url('fonts.css');

:root {
  --lav: #9284bc;
  --lav-2: #a99ed3;
  --lav-3: #d8d1f0;
  --lav-4: #eeeaf9;
  --lav-deep: #5b4e8c;
  --ink: #2e2552;
  --ink-2: #4a4170;
  --but: #fbd36c;
  --but-2: #fde3a1;
  --but-3: #fff1c9;
  --but-deep: #f2b53d;
  --cream: #fff8e9;
  --cream-2: #fff1d4;
  --paper: #fffdf7;
  --kraft: #c9a27c;
  --pink: #f2a3b3;
  --choc: #4e2c1e;
  --ok: #3e9b6a;
  --warn: #d98b1f;
  --err: #c8434f;

  --f-display: 'Gluten', 'Nunito', ui-rounded, system-ui, sans-serif;
  --f-body: 'Nunito', ui-rounded, system-ui, -apple-system, 'Segoe UI', sans-serif;

  --r-sm: 12px;
  --r: 20px;
  --r-lg: 32px;
  --r-xl: 48px;
  --pill: 999px;

  --shadow-sticker: 0 2px 0 rgba(46, 37, 82, 0.08), 0 14px 30px -12px rgba(46, 37, 82, 0.35);
  --shadow-soft: 0 20px 50px -24px rgba(46, 37, 82, 0.35);
  --stroke: 3px solid var(--ink);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-back: cubic-bezier(0.34, 1.56, 0.64, 1);
  --gutter: clamp(16px, 4vw, 56px);
  --maxw: 1320px;
  --header-h: 76px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img,
svg,
video,
canvas {
  display: block;
  max-width: 100%;
}
img {
  height: auto;
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
::selection {
  background: var(--but);
  color: var(--ink);
}
:focus-visible {
  outline: 3px solid var(--lav-deep);
  outline-offset: 3px;
  border-radius: 6px;
}
h1,
h2,
h3,
h4 {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 1;
  margin: 0;
  letter-spacing: -0.01em;
}
p {
  margin: 0 0 1em;
}
.sr-only {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--f-body);
  font-weight: 900;
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--lav-deep);
}
.eyebrow::before {
  content: '';
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--but);
  box-shadow: 0 0 0 3px var(--lav-deep);
}
.display {
  font-family: var(--f-display);
  font-weight: 800;
  line-height: 0.92;
}
.muted {
  color: var(--ink-2);
  opacity: 0.85;
}
.grain {
  position: relative;
}
.grain::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
  opacity: 0.18;
}
.stripes {
  background: repeating-linear-gradient(90deg, var(--lav) 0 var(--sw, 56px), var(--but) var(--sw, 56px) calc(var(--sw, 56px) * 2));
}
.stripes-texture {
  background: url('../img/stripes.webp') center / cover;
}

/* ---------- Botões ---------- */
.btn {
  --bg: var(--but);
  --fg: var(--ink);
  --sh: var(--ink);
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 54px;
  padding: 0.8em 1.6em;
  border: var(--stroke);
  border-radius: var(--pill);
  background: var(--bg);
  color: var(--fg);
  font-family: var(--f-display);
  font-weight: 700;
  font-size: 1.08rem;
  line-height: 1;
  text-decoration: none;
  box-shadow: 0 5px 0 var(--sh);
  transform: translateY(0);
  transition: transform 0.18s var(--ease-out), box-shadow 0.18s var(--ease-out), background 0.2s;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  white-space: nowrap;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 7px 0 var(--sh);
}
.btn:active {
  transform: translateY(4px);
  box-shadow: 0 1px 0 var(--sh);
}
.btn[disabled],
.btn.is-loading {
  opacity: 0.6;
  pointer-events: none;
}
.btn.is-loading::after {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 3px solid currentColor;
  border-right-color: transparent;
  animation: spin 0.7s linear infinite;
}
.btn--lav {
  --bg: var(--lav);
  --fg: #fff;
}
.btn--ink {
  --bg: var(--ink);
  --fg: var(--but);
  --sh: var(--lav-deep);
}
.btn--paper {
  --bg: var(--paper);
}
.btn--ghost {
  --bg: transparent;
  box-shadow: none;
  border-color: currentColor;
}
.btn--ghost:hover,
.btn--ghost:active {
  box-shadow: none;
  background: rgba(255, 255, 255, 0.4);
}
.btn--sm {
  min-height: 42px;
  padding: 0.55em 1.1em;
  font-size: 0.95rem;
}
.btn--lg {
  min-height: 64px;
  padding: 1em 2em;
  font-size: 1.25rem;
}
.btn .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-back);
}
.btn:hover .arrow {
  transform: translateX(4px) rotate(-8deg);
}
.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  border: var(--stroke);
  background: var(--paper);
  box-shadow: 0 3px 0 var(--ink);
  transition: transform 0.15s;
}
.icon-btn:active {
  transform: translateY(3px);
  box-shadow: 0 0 0 var(--ink);
}
.link {
  font-weight: 800;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 4px;
  text-decoration-color: var(--but);
}
.link:hover {
  text-decoration-color: var(--lav);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 60;
  height: var(--header-h);
  display: flex;
  align-items: center;
  transition: background 0.35s, box-shadow 0.35s, transform 0.45s var(--ease-out);
}
.site-header.is-solid {
  background: rgba(255, 248, 233, 0.86);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 1px 0 rgba(46, 37, 82, 0.08);
}
.site-header.is-hidden {
  transform: translateY(-110%);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.brand img {
  height: 52px;
  width: auto;
  filter: drop-shadow(0 4px 8px rgba(46, 37, 82, 0.18));
  transition: transform 0.4s var(--ease-back);
}
.brand:hover img {
  transform: rotate(-6deg) scale(1.06);
}
.nav {
  display: flex;
  gap: 4px;
  align-items: center;
  background: rgba(255, 253, 247, 0.7);
  border: 2px solid rgba(46, 37, 82, 0.1);
  padding: 5px;
  border-radius: var(--pill);
}
.nav a {
  position: relative;
  padding: 8px 16px;
  border-radius: var(--pill);
  font-weight: 800;
  font-size: 0.95rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s;
}
.nav a:hover,
.nav a.is-active {
  background: var(--but);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.cart-btn {
  position: relative;
}
.cart-btn .count {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 22px;
  height: 22px;
  padding: 0 6px;
  border-radius: 11px;
  background: var(--lav);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 900;
  display: grid;
  place-items: center;
  border: 2px solid var(--ink);
  transform: scale(0);
  transition: transform 0.35s var(--ease-back);
}
.cart-btn .count.has {
  transform: scale(1);
}
.burger {
  display: none;
}
@media (max-width: 960px) {
  .nav {
    display: none;
  }
  .burger {
    display: inline-grid;
  }
  .header-actions .btn-order {
    display: none;
  }
  .brand img {
    height: 44px;
  }
  :root {
    --header-h: 68px;
  }
}

/* menu mobile */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 18px var(--gutter) 28px;
  background: var(--lav);
  color: var(--paper);
  clip-path: circle(0% at calc(100% - 40px) 34px);
  visibility: hidden;
}
.mobile-menu.is-open {
  visibility: visible;
}
.mobile-menu__top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.mobile-menu nav {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.mobile-menu nav a {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: clamp(2.4rem, 11vw, 4rem);
  line-height: 1.05;
  text-decoration: none;
  color: var(--but);
}
.mobile-menu nav a:nth-child(even) {
  color: var(--paper);
}
.mobile-menu .stripes-deco {
  position: absolute;
  inset: auto 0 0 0;
  height: 18px;
  --sw: 24px;
  opacity: 0.9;
}

/* ---------- Cortina de transição ---------- */
.curtain {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  pointer-events: none;
}
.curtain span {
  flex: 1;
  height: 100%;
  background: var(--lav);
  transform-origin: top;
}
.curtain span:nth-child(even) {
  background: var(--but);
}
.curtain.is-cover span {
  transform: scaleY(1);
}
.curtain.is-idle span {
  transform: scaleY(0);
}
.curtain .curtain-logo {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(220px, 46vw);
  transform: translate(-50%, -50%);
  filter: drop-shadow(0 16px 24px rgba(46, 37, 82, 0.35));
}
.no-js .curtain,
.curtain.is-gone {
  display: none;
}
/* rede de segurança: se o JS falhar, a cortina some sozinha */
.curtain.boot {
  animation: failsafe 0.4s 6s forwards;
}
@keyframes failsafe {
  to {
    opacity: 0;
    visibility: hidden;
  }
}

/* ---------- Cursor ---------- */
.cursor {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 300;
  pointer-events: none;
  display: none;
  opacity: 0;
}
.has-cursor .cursor {
  display: block;
}
.cursor__dot {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--ink);
}
.cursor__ring {
  position: absolute;
  width: 44px;
  height: 44px;
  margin: -22px 0 0 -22px;
  border-radius: 50%;
  border: 2px solid var(--ink);
  display: grid;
  place-items: center;
  transition: width 0.35s var(--ease-out), height 0.35s var(--ease-out), margin 0.35s var(--ease-out), background 0.3s, border-color 0.3s;
}
.cursor__label {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 0.9rem;
  color: var(--ink);
  opacity: 0;
  transform: scale(0.5);
  transition: opacity 0.25s, transform 0.35s var(--ease-back);
  white-space: nowrap;
}
.cursor.is-hover .cursor__ring {
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  background: rgba(251, 211, 108, 0.45);
}
.cursor.has-label .cursor__ring {
  width: 92px;
  height: 92px;
  margin: -46px 0 0 -46px;
  background: var(--but);
  border-color: var(--ink);
}
.cursor.has-label .cursor__label {
  opacity: 1;
  transform: scale(1);
}
.cursor.has-label .cursor__dot {
  opacity: 0;
}
.has-cursor,
.has-cursor a,
.has-cursor button {
  cursor: none;
}
.has-cursor input,
.has-cursor textarea,
.has-cursor select {
  cursor: auto;
}

/* ---------- Formulários ---------- */
.field {
  display: grid;
  gap: 6px;
}
.field > span,
.field > label {
  font-weight: 800;
  font-size: 0.92rem;
}
.field small {
  color: var(--ink-2);
  opacity: 0.8;
}
.input,
.select,
.textarea {
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  border: 2.5px solid var(--ink);
  border-radius: 16px;
  background: var(--paper);
  font-size: 1rem;
  transition: box-shadow 0.2s, border-color 0.2s;
  box-shadow: 0 3px 0 rgba(46, 37, 82, 0.15);
}
.textarea {
  min-height: 110px;
  resize: vertical;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  box-shadow: 0 0 0 4px var(--but);
}
.input.is-invalid {
  border-color: var(--err);
  box-shadow: 0 0 0 4px rgba(200, 67, 79, 0.2);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9'%3E%3Cpath d='M1.5 1.5 7 7l5.5-5.5' fill='none' stroke='%232e2552' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  padding-right: 44px;
}
.stepper {
  display: inline-flex;
  align-items: center;
  border: 2.5px solid var(--ink);
  border-radius: var(--pill);
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 3px 0 var(--ink);
}
.stepper button {
  width: 42px;
  height: 42px;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  font-weight: 900;
  line-height: 1;
  display: grid;
  place-items: center;
  transition: background 0.15s;
}
.stepper button:hover {
  background: var(--but-3);
}
.stepper button:disabled {
  opacity: 0.3;
  pointer-events: none;
}
.stepper output {
  min-width: 34px;
  text-align: center;
  font-weight: 900;
  font-variant-numeric: tabular-nums;
}
.switch {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  font-weight: 700;
}
.switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}
.switch i {
  position: relative;
  width: 54px;
  height: 32px;
  border-radius: 16px;
  border: 2.5px solid var(--ink);
  background: var(--lav-4);
  transition: background 0.25s;
  flex: none;
}
.switch i::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: var(--paper);
  border: 2.5px solid var(--ink);
  transition: transform 0.3s var(--ease-back);
}
.switch input:checked + i {
  background: var(--but);
}
.switch input:checked + i::after {
  transform: translateX(22px);
}
.switch input:focus-visible + i {
  box-shadow: 0 0 0 4px var(--lav-3);
}

/* ---------- Toast ---------- */
.toasts {
  position: fixed;
  z-index: 400;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  display: grid;
  gap: 10px;
  width: min(440px, calc(100vw - 32px));
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 18px;
  border-radius: 18px;
  border: var(--stroke);
  background: var(--paper);
  box-shadow: 0 6px 0 var(--ink);
  font-weight: 700;
  animation: toast-in 0.5s var(--ease-back);
}
.toast.is-error {
  background: #ffe3e5;
}
.toast.is-ok {
  background: var(--but-3);
}
.toast.is-out {
  animation: toast-out 0.35s var(--ease-out) forwards;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(30px) scale(0.9);
  }
}
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
}

/* ---------- Confete ---------- */
.confetti-canvas {
  position: fixed;
  inset: 0;
  z-index: 250;
  pointer-events: none;
}

/* ---------- Ticker de aviso ---------- */
.notice-bar {
  position: relative;
  z-index: 61;
  background: var(--ink);
  color: var(--but);
  text-align: center;
  font-weight: 800;
  font-size: 0.9rem;
  padding: 8px 16px;
}

/* ---------- Rodapé simples (páginas internas) ---------- */
.mini-footer {
  padding: 40px var(--gutter);
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-2);
}
.mini-footer a {
  font-weight: 800;
}

/* ---------- Movimento reduzido ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .curtain {
    display: none;
  }
}
