/* Bico Doce Donuts — BIO PRIME
   Cores tiradas do logo (turquesa e rosa) e dos pratos azuis das fotos. */

:root {
  --turq: #4ff0f8;
  --pink: #ff006a;
  --pink-cta: #d6005a;
  --ink: #231a3d;
  --plate: #3d5e8c;
  --white: #ffffff;

  --display: 'Bricolage Grotesque', 'Arial Narrow', system-ui, sans-serif;
  --text: 'Nunito Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --motion-instant: 90ms;
  --motion-fast: 150ms;
  --motion-standard: 240ms;
  --motion-emphasis: 360ms;
  --motion-signature: 720ms;

  --ease-enter: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-exit: cubic-bezier(0.7, 0, 0.84, 0);
  --ease-standard: cubic-bezier(0.65, 0, 0.35, 1);
  --ease-emphasis: cubic-bezier(0.22, 1, 0.36, 1);

  --shift: 8px;
  --settle-scale: 0.92;
  --press-scale: 0.96;
  --press-drop: 3px;

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --gutter: 20px;
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --shift: 0px;
    --settle-scale: 1;
    --press-scale: 1;
    --press-drop: 0px;
    --motion-emphasis: 200ms;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  background: var(--ink);
}

body {
  margin: 0;
  background: var(--white);
  color: var(--ink);
  font-family: var(--text);
  font-size: 16px;
  line-height: 1.5;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, p, figure { margin: 0; }

h1, h2 {
  font-family: var(--display);
  font-weight: 800;
  font-stretch: 82%;
  font-variation-settings: 'wdth' 82;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h2 { font-size: clamp(30px, 8.4vw, 36px); }

.wrap {
  width: 100%;
  max-width: 560px;
  margin-inline: auto;
  padding-inline: var(--gutter);
}

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

.skip {
  position: fixed;
  z-index: 100;
  top: calc(-80px - var(--safe-top));
  left: 16px;
  padding: 12px 18px;
  border-radius: 12px;
  background: var(--ink);
  color: var(--white);
  font-weight: 700;
  text-decoration: none;
}
.skip:focus { top: calc(12px + var(--safe-top)); }

:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

/* ---------- Botões ---------- */

.btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 52px;
  padding: 10px 22px;
  border-radius: 999px;
  font-family: var(--text);
  text-align: left;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform var(--motion-instant) var(--ease-standard),
    box-shadow var(--motion-instant) var(--ease-standard),
    background-color var(--motion-fast) var(--ease-standard);
}

.btn i { width: 22px; font-size: 20px; text-align: center; flex: none; }
.btn__text { display: flex; flex-direction: column; min-width: 0; }
.btn__text strong { font-size: 17px; font-weight: 700; line-height: 1.2; }
.btn__text small { font-size: 13px; font-weight: 600; line-height: 1.3; opacity: 0.9; }

/* Pedido: rosa da ação com sombra dura em tinta, como um adesivo.
   O toque "afunda" o botão sobre a própria sombra. */
.btn--order {
  min-height: 64px;
  background: var(--pink-cta);
  color: var(--white);
  box-shadow: 0 4px 0 var(--ink);
}
.btn--order:active {
  transform: translateY(var(--press-drop));
  box-shadow: 0 1px 0 var(--ink);
  background: #bf0050;
}

.btn--line {
  border: 2px solid var(--ink);
  background: transparent;
  color: var(--ink);
}
.btn--line:active {
  transform: scale(var(--press-scale));
  background: rgba(35, 26, 61, 0.1);
}

.btn--ink {
  background: var(--ink);
  color: var(--white);
  box-shadow: 0 4px 0 var(--pink);
}
.btn--ink:active {
  transform: translateY(var(--press-drop));
  box-shadow: 0 1px 0 var(--pink);
}

@media (hover: hover) and (pointer: fine) {
  .btn--order:hover { background: #c20052; }
  .btn--line:hover { background: rgba(35, 26, 61, 0.08); }
  .btn--ink:hover { background: #30244f; }
}

/* ---------- Cena 1: Hero ---------- */

.hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--turq);
  padding-top: calc(28px + var(--safe-top));
  padding-bottom: 64px;
  text-align: center;
}

.hero__field { display: none; }

.hero__logo {
  width: 200px;
  height: 200px;
  margin-inline: auto;
  border-radius: 50%;
}

.hero__handle {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding-inline: 12px;
  margin-top: 2px;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}

.hero__title {
  margin-top: 10px;
  font-size: clamp(34px, 10vw, 40px);
}

.hero__lead {
  max-width: 34ch;
  margin: 12px auto 0;
  font-size: 17px;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--white);
  font-size: 15px;
  font-weight: 700;
}
.status[data-state="closed"] i { color: var(--pink-cta); }

.actions {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.hero__edge {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 36px;
  fill: var(--plate);
}

/* Assinatura: o círculo do avatar do Instagram cresce e vira o fundo da página.
   Só com JS (para limpar a camada no fim) e sem preferência por menos movimento. */
@media (prefers-reduced-motion: no-preference) {
  .js .hero:not(.is-open) { background: var(--white); }

  .js .hero:not(.is-open) .hero__field {
    display: block;
    position: absolute;
    z-index: -1;
    left: 50%;
    top: calc(28px + var(--safe-top) + 100px);
    width: 400px;
    height: 400px;
    margin: -200px 0 0 -200px;
    border-radius: 50%;
    background: var(--turq);
    transform: scale(0.5);
    animation: field-open var(--motion-signature) var(--ease-emphasis) 120ms forwards;
  }
}

@keyframes field-open {
  to { transform: scale(5); }
}

/* ---------- Cena 2: Vitrine ---------- */

.vitrine {
  background: var(--plate);
  color: var(--white);
  padding-block: 28px 56px;
}

.section-lead {
  max-width: 40ch;
  margin-top: 10px;
  font-size: 17px;
}

.vitrine .section-lead { color: rgba(255, 255, 255, 0.92); }
.vitrine :focus-visible { outline-color: var(--turq); }

.flavors {
  list-style: none;
  margin: 24px 0 32px;
  padding: 0;
  display: grid;
  gap: 6px;
}

.flavor {
  display: grid;
  grid-template-columns: 104px 1fr;
  align-items: center;
  gap: 18px;
  padding: 10px 8px 10px 4px;
  border-radius: 20px;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color var(--motion-fast) var(--ease-standard);
}

.flavor img {
  width: 104px;
  height: 104px;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 4px var(--turq);
  transition: transform var(--motion-fast) var(--ease-standard);
}

.flavor__text { display: flex; flex-direction: column; gap: 2px; }

.flavor__text strong {
  font-family: var(--display);
  font-weight: 800;
  font-size: 24px;
  font-stretch: 85%;
  font-variation-settings: 'wdth' 85;
  line-height: 1.05;
}

.flavor__text span { font-size: 16px; line-height: 1.4; }

.flavor:active { background: rgba(255, 255, 255, 0.1); }
.flavor:active img { transform: scale(var(--press-scale)); }

@media (hover: hover) and (pointer: fine) {
  .flavor:hover { background: rgba(255, 255, 255, 0.08); }
}

.btn--on-plate { box-shadow: 0 4px 0 var(--ink); }

/* Revelação única: a foto "assenta no prato" e o texto chega junto. */
.js [data-reveal] .flavor img {
  opacity: 0;
  transform: scale(var(--settle-scale));
  transition:
    opacity var(--motion-emphasis) var(--ease-enter),
    transform var(--motion-emphasis) var(--ease-enter);
  transition-delay: calc(var(--i, 0) * 40ms);
}
.js [data-reveal] .flavor__text {
  opacity: 0;
  transform: translateY(var(--shift));
  transition:
    opacity var(--motion-emphasis) var(--ease-enter),
    transform var(--motion-emphasis) var(--ease-enter);
  transition-delay: calc(var(--i, 0) * 40ms + 60ms);
}
.js [data-reveal].is-in .flavor img,
.js [data-reveal].is-in .flavor__text {
  opacity: 1;
  transform: none;
}
/* depois de revelado, o toque volta a usar a transição curta */
.js [data-reveal].is-done .flavor img,
.js [data-reveal].is-done .flavor__text { transition-delay: 0ms; }
.js [data-reveal].is-done .flavor:active img { transform: scale(var(--press-scale)); }

/* ---------- Cena 3: Cafeteria ---------- */

.cafe { background: var(--white); }

.cafe__wall img {
  width: 100%;
  aspect-ratio: 800 / 300;
  object-fit: cover;
}

.cafe__body { padding-bottom: 56px; }

.cafe__cup {
  width: 112px;
  height: 112px;
  margin-top: -56px;
  position: relative;
  border-radius: 50%;
  object-fit: cover;
  box-shadow: 0 0 0 6px var(--white);
}

.cafe h2 { margin-top: 18px; }
.cafe p { max-width: 40ch; margin: 10px 0 24px; font-size: 17px; }

/* ---------- Cena 4: Visita ---------- */

.visita {
  background: var(--turq);
  padding-block: 48px 56px;
}

/* Mapa: moldura com a mesma sombra dura dos botões.
   A capa turquesa segura o lugar enquanto o iframe carrega e sai em crossfade. */
.map { margin: 24px 0 0; }

.map__frame {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  height: 320px;
  border: 3px solid var(--ink);
  border-radius: 24px;
  background: var(--turq);
  box-shadow: 0 5px 0 var(--ink);
  -webkit-mask-image: -webkit-radial-gradient(white, black); /* Safari: recorta o iframe no raio */
}

.map__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.map__cover { display: none; }

.js .map__iframe {
  opacity: 0;
  transform: scale(1.04);
  transition:
    opacity var(--motion-emphasis) var(--ease-standard),
    transform var(--motion-signature) var(--ease-enter);
}

.js .map__cover {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  background: var(--turq);
  pointer-events: none;
  transition: opacity var(--motion-emphasis) var(--ease-standard);
}

.js .map.is-loaded .map__iframe { opacity: 1; transform: none; }
.js .map.is-loaded .map__cover { opacity: 0; }

.map__spot {
  position: relative;
  display: grid;
  place-items: center;
  width: 72px;
  height: 72px;
}

.map__pin {
  position: relative;
  font-size: 44px;
  color: var(--pink-cta);
  filter: drop-shadow(0 3px 0 var(--ink));
}

.map__ring {
  position: absolute;
  left: 50%;
  bottom: 4px;
  width: 36px;
  height: 12px;
  margin-left: -18px;
  border: 2px solid var(--ink);
  border-radius: 50%;
  opacity: 0;
}

.map__cover-text { font-weight: 700; font-size: 16px; }

/* O pino cai quando o mapa começa a carregar; o anel pulsa só enquanto espera. */
@media (prefers-reduced-motion: no-preference) {
  .map.is-loading .map__pin { animation: pin-drop var(--motion-emphasis) var(--ease-emphasis) both; }
  .map.is-loading .map__ring { animation: ring-wait 1.2s var(--ease-enter) var(--motion-emphasis) infinite; }
  .map.is-loaded .map__ring { animation: none; }
}

@media (prefers-reduced-motion: reduce) {
  .map__ring { display: none; }
  .js .map__iframe { transform: none; }
}

@keyframes pin-drop {
  from { transform: translateY(-28px); opacity: 0; }
  to { transform: none; opacity: 1; }
}

@keyframes ring-wait {
  from { transform: scale(0.6); opacity: 0.9; }
  to { transform: scale(2.2); opacity: 0; }
}

.map__hint {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  font-size: 15px;
  font-weight: 600;
}

.hours {
  width: 100%;
  margin: 24px 0 28px;
  border-collapse: collapse;
  font-size: 17px;
}

.hours th,
.hours td { height: 46px; padding: 0 12px; }
.hours th { text-align: left; font-weight: 700; }
.hours td { text-align: right; }
.hours tr { border-top: 1px solid rgba(35, 26, 61, 0.18); }
.hours tr:last-child { border-bottom: 1px solid rgba(35, 26, 61, 0.18); }
.hours .is-closed td { color: var(--pink-cta); font-weight: 700; }

/* hoje: vira a linha "acesa" da tabela */
.hours .is-today { background: var(--ink); color: var(--white); border-color: var(--ink); }
.hours .is-today th::after {
  content: 'hoje';
  margin-left: 8px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--turq);
  color: var(--ink);
  font-size: 13px;
}
.hours .is-today.is-closed td { color: var(--white); }
.hours .is-today th { border-radius: 12px 0 0 12px; }
.hours .is-today td { border-radius: 0 12px 12px 0; }

.visit-actions { display: grid; gap: 12px; }

/* ---------- Rodapé ---------- */

.footer {
  background: var(--ink);
  color: rgba(255, 255, 255, 0.86);
  padding-block: 32px 40px;
  text-align: center;
  font-size: 14px;
}
.footer :focus-visible { outline-color: var(--turq); }

.footer__insta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding-inline: 16px;
  margin-bottom: 12px;
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
}
.footer__insta i { font-size: 20px; color: var(--turq); }

.footer__credit { margin-top: 6px; font-size: 13px; }
.footer__credit a {
  display: inline-block;
  min-height: 48px;
  padding: 14px 4px;
  color: var(--turq);
  font-weight: 700;
}

/* ---------- Barra de pedido ---------- */

.order-bar { display: none; }

.js .order-bar {
  display: block;
  position: fixed;
  z-index: 50;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 16px calc(14px + var(--safe-bottom));
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  transform: translateY(calc(100% + 8px));
  transition:
    transform var(--motion-emphasis) var(--ease-exit),
    opacity var(--motion-standard) var(--ease-standard),
    visibility 0s linear var(--motion-emphasis);
}

.js .order-bar.is-on {
  pointer-events: auto;
  visibility: visible;
  opacity: 1;
  transform: none;
  transition:
    transform var(--motion-emphasis) var(--ease-enter),
    opacity var(--motion-standard) var(--ease-standard),
    visibility 0s;
}

.order-bar .btn {
  max-width: 528px;
  min-height: 58px;
  margin-inline: auto;
  justify-content: center;
}

.js body { padding-bottom: 0; }
.js .footer { padding-bottom: calc(110px + var(--safe-bottom)); }

@media (prefers-reduced-motion: reduce) {
  .js .order-bar,
  .js .order-bar.is-on { transform: none; }
}

/* ---------- Telas maiores ---------- */

@media (min-width: 720px) {
  :root { --gutter: 28px; }
  .hero { padding-top: calc(56px + var(--safe-top)); padding-bottom: 80px; }
  .hero__logo { width: 220px; height: 220px; }
  .js .hero:not(.is-open) .hero__field { top: calc(56px + var(--safe-top) + 110px); width: 440px; height: 440px; margin: -220px 0 0 -220px; }
  .cafe__wall { max-width: 560px; margin-inline: auto; padding-top: 48px; }
  .cafe__wall img { border-radius: 24px; }
}
