/* =========================================================================
   Ravi Cozinha — artesanal contemporâneo, acolhedor, afetivo e apetitoso
   ========================================================================= */

/* ---------- Fontes (auto-hospedadas, licença SIL OFL) ---------- */
@font-face { font-family: "Fraunces"; src: url("assets/fonts/fraunces-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("assets/fonts/fraunces-latin-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Fraunces"; src: url("assets/fonts/fraunces-latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("assets/fonts/dm-sans-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("assets/fonts/dm-sans-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "DM Sans"; src: url("assets/fonts/dm-sans-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Identidade ---------- */
:root {
  --green: #134B42;
  --green-ink: #0D3A33;     /* verde mais escuro para texto sobre mostarda */
  --green-deep: #0E3B34;
  --cream: #F2E3CC;
  --cream-light: #F8EEDD;
  --mustard: #E49B31;
  --mustard-soft: #F0C47F;
  --terracota: #B95020;
  --terracota-text: #9A3E17; /* terracota mais escura para textos pequenos (contraste AA) */
  --line: rgba(19, 75, 66, .16);

  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "DM Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --wrap: 1180px;
  --radius: 28px;
  --header-h: 76px;
  --ease: cubic-bezier(.2, .75, .25, 1);
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--cream); color: var(--green); font-family: var(--sans); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.04; letter-spacing: -0.015em; }
em { font-style: italic; }
::selection { background: var(--mustard); color: var(--green-ink); }
:focus-visible { outline: 3px solid var(--terracota); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 200; padding: 10px 16px; border-radius: 10px; background: var(--green); color: var(--cream); font-weight: 700; text-decoration: none; }
.skip:focus { top: 12px; }
.ico { width: 1.25em; height: 1.25em; flex-shrink: 0; }

.eyebrow { font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--terracota-text); }
.eyebrow--light { color: var(--mustard-soft); }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; cursor: pointer;
  font-family: var(--sans); font-size: 16px; font-weight: 700; text-decoration: none;
  transition: transform .3s var(--ease), box-shadow .3s var(--ease), background-color .25s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--lg { min-height: 58px; padding: 0 30px; font-size: 17px; }
.btn--green { background: var(--green); color: var(--cream); box-shadow: 0 10px 0 -4px rgba(19,75,66,.25); }
.btn--green:hover { background: var(--green-deep); box-shadow: 0 14px 24px -10px rgba(19,75,66,.55); }
.btn--terracota { background: var(--terracota); color: #FFF6EA; box-shadow: 0 10px 0 -4px rgba(185,80,32,.25); }
.btn--terracota:hover { background: #A3461C; box-shadow: 0 14px 24px -10px rgba(185,80,32,.55); }
.btn--cream { background: var(--cream); color: var(--green); }

.link-arrow { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--mustard); padding-bottom: 2px; line-height: 1.2; transition: gap .25s var(--ease), border-color .25s; }
.link-arrow::after { content: "→"; transition: transform .25s var(--ease); }
.link-arrow:hover { border-color: var(--terracota); }
.link-arrow:hover::after { transform: translateX(4px); }

/* ---------- Cabeçalho ---------- */
.header { position: sticky; top: 0; z-index: 100; height: var(--header-h); background: rgba(242,227,204,.86); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: box-shadow .3s; }
.header.is-scrolled { box-shadow: 0 1px 0 var(--line), 0 10px 30px -20px rgba(19,75,66,.35); }
.header__inner { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { width: 46px; height: auto; }
.brand__name { font-family: var(--serif); font-weight: 600; font-size: 22px; letter-spacing: -0.01em; }
.brand__name span { font-style: italic; font-weight: 400; color: var(--terracota-text); }
.brand--light .brand__name span { color: var(--mustard-soft); }

.nav { display: flex; align-items: center; gap: 28px; font-weight: 500; font-size: 15.5px; }
.nav a:not(.btn) { text-decoration: none; position: relative; padding: 6px 0; }
.nav a:not(.btn)::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px; background: var(--mustard); transform: scaleX(0); transform-origin: left; transition: transform .3s var(--ease); }
.nav a:not(.btn):hover::after { transform: scaleX(1); }
.nav__cta { min-height: 44px; padding: 0 20px; font-size: 15px; }

.menu-btn { display: none; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--green); cursor: pointer; place-items: center; }
.menu-btn__bars, .menu-btn__bars::before, .menu-btn__bars::after { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--cream); transition: transform .3s var(--ease), opacity .2s; }
.menu-btn__bars { position: relative; }
.menu-btn__bars::before, .menu-btn__bars::after { content: ""; position: absolute; left: 0; }
.menu-btn__bars::before { top: -6px; }
.menu-btn__bars::after { top: 6px; }
.menu-btn[aria-expanded="true"] .menu-btn__bars { background: transparent; }
.menu-btn[aria-expanded="true"] .menu-btn__bars::before { transform: translateY(6px) rotate(45deg); }
.menu-btn[aria-expanded="true"] .menu-btn__bars::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero { position: relative; padding: 40px 0 80px; overflow: hidden; }
.hero__grid { display: grid; gap: 48px; align-items: center; }
.hero__title { margin-top: 16px; font-size: clamp(44px, 9.5vw, 86px); }
.hero__title em { display: block; color: var(--terracota); }
.hero__lead { margin-top: 22px; max-width: 520px; font-size: 18.5px; color: #2C5A52; }
.hero__ctas { margin-top: 32px; display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }

.hero__visual { position: relative; width: min(100%, 520px); margin: 0 auto; aspect-ratio: 1 / 1.08; }
.blob { position: absolute; border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%; }
.blob--mustard { inset: 4% 0 0 6%; background: var(--mustard); animation: morph 14s ease-in-out infinite alternate; }
@keyframes morph {
  0% { border-radius: 58% 42% 55% 45% / 48% 58% 42% 52%; }
  100% { border-radius: 44% 56% 46% 54% / 56% 44% 56% 44%; }
}
.photo { position: relative; overflow: hidden; background: var(--cream-light); }
.photo > picture { display: contents; }
.photo > img, .photo > picture > img { width: 100%; height: 100%; object-fit: cover; }
.photo__fallback { display: none; position: absolute; inset: 0; place-items: center; background: var(--cream-light); }
.photo__fallback img { width: 46%; max-width: 220px; opacity: .9; }
.photo__fallback--terracota { background: #EFC9A9; }
.photo__fallback--green { background: var(--green); }
.photo__fallback--logo img { width: 38%; opacity: .95; }
.photo.is-empty .photo__fallback { display: grid; }
.photo--hero { position: absolute; inset: 0 8% 10% 0; border-radius: 46% 54% 42% 58% / 44% 40% 60% 56%; border: 6px solid var(--cream); box-shadow: 0 30px 60px -30px rgba(19,75,66,.55); }
.mascot { pointer-events: none; user-select: none; }
.mascot--hero { position: absolute; left: -4%; bottom: -4%; width: 38%; filter: drop-shadow(0 12px 16px rgba(19,75,66,.25)); animation: bob 4.5s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }
.stamp { position: absolute; right: 2%; bottom: 4%; width: 118px; height: 118px; border-radius: 50%; background: var(--terracota); color: #FFF4E6; display: grid; place-items: center; text-align: center; transform: rotate(-10deg); box-shadow: 0 14px 28px -14px rgba(185,80,32,.7); }
.stamp span { font-family: var(--serif); font-style: italic; font-weight: 600; font-size: 19px; line-height: 1.05; padding: 0 14px; }
.stamp::before { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 1.5px dashed rgba(255,244,230,.6); }

/* ---------- Faixa ---------- */
.ribbon-wrap { overflow: hidden; padding: 14px 0; }
.ribbon { background: var(--green); color: var(--cream); overflow: hidden; padding: 16px 0; transform: rotate(-1.2deg); margin: 0 -24px; }
.ribbon__track { display: flex; width: max-content; gap: 28px; align-items: center; animation: marquee 32s linear infinite; }
.ribbon span { font-family: var(--serif); font-style: italic; font-size: 24px; white-space: nowrap; }
.ribbon i { font-style: normal; color: var(--mustard); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ---------- Seções ---------- */
.sec-head { max-width: 640px; margin-bottom: 44px; }
.sec-head h2 { margin-top: 12px; font-size: clamp(36px, 6.6vw, 60px); }
.sec-head--light h2 { color: var(--cream); }

/* Especialidades */
.specialties { padding: 104px 0 72px; }
.spec { display: grid; gap: 28px; align-items: center; margin-bottom: 64px; }
.spec:last-child { margin-bottom: 0; }
.photo--spec { aspect-ratio: 9 / 7; border-radius: var(--radius); box-shadow: 14px 14px 0 var(--mustard); }
.spec--reverse .photo--spec { box-shadow: -14px 14px 0 var(--terracota); }
.spec__copy { max-width: 470px; }
.spec__num { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--terracota-text); }
.spec h3 { margin-top: 6px; font-size: clamp(34px, 5.6vw, 50px); }
.spec p { margin: 14px 0 20px; font-size: 18px; color: #2C5A52; }

/* Galeria */
.gallery { padding: 96px 0; background: var(--green); color: var(--cream); border-radius: 48px 48px 0 0; }
.gallery .eyebrow { color: var(--mustard-soft); }
.gallery__hint { margin-top: 10px; color: rgba(242,227,204,.75); font-size: 15px; }
.gallery__grid { display: flex; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 22px 18px; margin: 0 -22px; scrollbar-width: thin; scrollbar-color: var(--mustard) transparent; }
.gallery__grid li { flex: 0 0 78%; scroll-snap-align: center; }
.gallery__item { display: block; width: 100%; padding: 0; border: 0; border-radius: 22px; overflow: hidden; cursor: zoom-in; background: var(--green-deep); aspect-ratio: 4 / 5; }
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--ease); }
.gallery__item:hover img { transform: scale(1.04); }
.gallery__item:focus-visible { outline-color: var(--mustard); }
.gallery__insta { margin-top: 28px; }
.gallery__insta a { color: var(--cream); font-weight: 700; text-decoration-color: var(--mustard); text-underline-offset: 4px; }
.gallery__empty { display: none; text-align: center; justify-items: center; gap: 18px; padding: 24px 0 8px; }
.gallery__empty img { width: 150px; }
.gallery__empty p { font-family: var(--serif); font-style: italic; font-size: 24px; }
.gallery.is-empty .gallery__grid, .gallery.is-empty .gallery__insta, .gallery.is-empty .gallery__hint { display: none; }
.gallery.is-empty .gallery__empty { display: grid; }

/* Como encomendar */
.order { padding: 104px 0; }
.order__grid { display: grid; gap: 40px; }
.order__intro h2 { margin-top: 12px; font-size: clamp(36px, 6.6vw, 58px); }
.order__intro p { margin-top: 14px; font-size: 18px; color: #2C5A52; }
.mascot--order { width: 130px; margin-top: 28px; transform: rotate(-6deg); }
.steps { display: grid; gap: 16px; counter-reset: s; }
.steps li { display: flex; gap: 18px; align-items: flex-start; padding: 24px; border-radius: 24px; background: var(--cream-light); border: 1.5px solid var(--line); transition: transform .3s var(--ease), border-color .3s; }
.steps li:hover { transform: translateX(4px); border-color: var(--mustard); }
.steps__n { flex-shrink: 0; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; background: var(--mustard); color: var(--green-ink); font-family: var(--serif); font-weight: 600; font-size: 24px; }
.steps h3 { font-size: 25px; }
.steps p { margin-top: 4px; color: #2C5A52; }

/* Sobre */
.about { padding: 104px 0; background: var(--green); color: var(--cream); }
.about__grid { display: grid; gap: 40px; align-items: center; }
.about__art { position: relative; width: min(100%, 380px); aspect-ratio: 1; margin: 0 auto; display: grid; place-items: center; }
.blob--terracota { inset: 0; background: var(--terracota); animation: morph 16s ease-in-out infinite alternate-reverse; }
.about__art img { position: relative; width: 62%; filter: drop-shadow(0 16px 20px rgba(0,0,0,.25)); }
.about__copy h2 { margin-top: 12px; font-size: clamp(36px, 6.4vw, 56px); }
.about__copy h2 em { color: var(--mustard-soft); }
.about__copy p { margin-top: 18px; font-size: 18.5px; color: rgba(242,227,204,.88); max-width: 520px; }

/* Chamada final */
.final { padding: 96px 0; }
.final__box { position: relative; display: grid; gap: 22px; justify-items: center; text-align: center; padding: 140px 26px 48px; border-radius: 40px; background: var(--mustard); color: var(--green-ink); overflow: visible; }
.mascot--final { position: absolute; top: -70px; left: 50%; width: 170px; transform: translateX(-50%) rotate(-4deg); filter: drop-shadow(0 14px 16px rgba(13,58,51,.25)); }
.final h2 { font-size: clamp(36px, 7vw, 64px); max-width: 720px; }
.final h2 em { display: block; color: var(--green); }
.final__copy { display: grid; gap: 14px; justify-items: inherit; }
.final p { font-size: 18px; font-weight: 500; }
.final .btn { margin-top: 6px; }

/* Rodapé */
.footer { padding: 48px 0 40px; background: var(--green-deep); color: var(--cream); }
.footer__inner { display: grid; gap: 24px; }
.footer__links { display: grid; gap: 10px; }
.footer__links a, .footer__links span { display: inline-flex; align-items: center; gap: 10px; min-height: 40px; text-decoration: none; color: rgba(242,227,204,.9); }
.footer__links a:hover { color: var(--mustard-soft); }
.footer__copy { font-size: 14px; color: rgba(242,227,204,.7); }

/* WhatsApp flutuante */
.wa-float {
  position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 90;
  display: inline-flex; align-items: center; gap: 8px; min-height: 54px; padding: 0 20px 0 16px; border-radius: 999px;
  background: var(--green); color: var(--cream); font-weight: 700; text-decoration: none;
  box-shadow: 0 16px 30px -12px rgba(13,58,51,.7);
  transform: translateY(140%); opacity: 0; transition: transform .4s var(--ease), opacity .3s;
}
.wa-float .ico { width: 24px; height: 24px; color: var(--mustard); }
.wa-float.is-visible { transform: none; opacity: 1; }

/* Lightbox */
.lightbox { width: min(94vw, 980px); max-height: 92vh; padding: 0; border: 0; border-radius: 20px; background: transparent; overflow: visible; }
.lightbox::backdrop { background: rgba(10, 34, 30, .9); }
.lightbox img { width: 100%; max-height: 86vh; object-fit: contain; border-radius: 20px; background: var(--green-deep); }
.lightbox__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; border: 0; border-radius: 50%; background: var(--cream); color: var(--green); font-size: 28px; line-height: 1; cursor: pointer; }
.lightbox__close { top: -16px; right: -10px; }
.lightbox__prev { left: 10px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 10px; top: 50%; transform: translateY(-50%); }
.lightbox.is-single .lightbox__prev, .lightbox.is-single .lightbox__next { display: none; }

/* Entradas suaves */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }

/* =========================================================================
   Responsivo
   ========================================================================= */
@media (max-width: 899px) {
  :root { --header-h: 68px; }
  .menu-btn { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 0; padding: 12px 22px 26px;
    background: var(--cream); border-bottom: 1px solid var(--line); box-shadow: 0 30px 40px -30px rgba(19,75,66,.5);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: transform .3s var(--ease), opacity .25s, visibility 0s linear .3s;
  }
  .nav.is-open { transform: none; opacity: 1; visibility: visible; transition: transform .3s var(--ease), opacity .25s; }
  .nav a:not(.btn) { padding: 14px 0; font-family: var(--serif); font-size: 24px; border-bottom: 1px solid var(--line); }
  .nav a:not(.btn)::after { display: none; }
  .nav__cta { margin-top: 18px; min-height: 54px; font-size: 16px; }
  .brand__name { font-size: 20px; }
  .brand img { width: 40px; }
}

@media (min-width: 640px) {
  .gallery__grid li { flex-basis: 46%; }
  .footer__links { grid-auto-flow: column; justify-content: start; gap: 28px; }
}

@media (min-width: 900px) {
  .hero { padding: 56px 0 104px; }
  .hero__grid { grid-template-columns: 1.08fr .92fr; gap: 56px; }
  .hero__visual { width: 100%; }
  .spec { grid-template-columns: 1.1fr .9fr; gap: 72px; margin-bottom: 96px; }
  .spec--reverse .photo--spec { order: 2; }
  .order__grid { grid-template-columns: .9fr 1.1fr; gap: 72px; align-items: start; }
  .order__cta { grid-column: 2; }
  .about__grid { grid-template-columns: .85fr 1.15fr; gap: 80px; }
  .gallery__grid { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; gap: 18px; overflow: visible; padding: 0; margin: 0; }
  .gallery__grid li { flex: none; }
  .gallery__grid li:nth-child(1), .gallery__grid li:nth-child(5) { grid-row: span 2; }
  .gallery__item { height: 100%; aspect-ratio: auto; }
  .final__box { padding: 72px 64px 72px 300px; justify-items: start; text-align: left; }
  .mascot--final { top: auto; bottom: -24px; left: 48px; width: 220px; transform: rotate(-4deg); }
  .footer__inner { grid-template-columns: auto 1fr auto; align-items: center; gap: 40px; }
  .footer__links { justify-content: center; }
  .wa-float { right: 24px; bottom: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
