/* Safra web — visual "V3": foto de fundo, vidro, pílulas, Outfit, texto creme, chiado. */
@font-face { font-family: Outfit; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/fonts/outfit-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Outfit; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url(/fonts/outfit-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #120B08; --ink: #F7F2EA; --dim: rgba(247,242,234,.72); --faint: rgba(247,242,234,.5);
  --glass: rgba(255,255,255,.10); --glass2: rgba(255,255,255,.16); --edge: rgba(255,255,255,.20);
  --dark: #141110; --danger: #F2A99B; --r: 22px; --ease: cubic-bezier(.2,.8,.2,1);
  --top: env(safe-area-inset-top, 0px); --bot: env(safe-area-inset-bottom, 0px);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--ink); }
body { font: 400 15px/1.4 Outfit, system-ui, -apple-system, sans-serif; overscroll-behavior: none; -webkit-font-smoothing: antialiased; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
img { display: block; }
[hidden] { display: none !important; }
.nojs { position: relative; z-index: 9; padding: 40px; color: var(--ink); }
.banner span { display: block; color: var(--dim); }

/* ---------- fundo ---------- */
#bg { position: fixed; inset: 0; z-index: 0; background: var(--bg) url(/img/bg_adega.webp) center/cover no-repeat; transition: opacity .6s var(--ease), transform 1.1s var(--ease); }
#bg.swap { opacity: .5; transform: scale(1.05); }
#scrim { position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: linear-gradient(180deg, rgba(18,11,8,.30), rgba(18,11,8,.58) 50%, rgba(18,11,8,.93)); }
/* chiado sem mix-blend-mode (que obriga o iPhone a recompor a tela inteira a cada quadro): ruído claro com pouca opacidade */
#grain { position: fixed; inset: 0; z-index: 50; pointer-events: none; opacity: .5; transform: translateZ(0); background: url(/img/grain.png) repeat; background-size: 96px; }

#app { position: relative; z-index: 2; min-height: 100%; }
.screen { min-height: 100dvh; padding: calc(var(--top) + 12px) 24px calc(var(--bot) + 120px); }
.screen.anim { animation: scr .35s ease-out both; }
@keyframes scr { from { opacity: 0; } to { opacity: 1; } }

/* ---------- texto ---------- */
.label { font: 500 11.5px/1.3 Outfit; letter-spacing: .14em; text-transform: uppercase; color: var(--dim); }
.brand { font: 800 60px/1 Outfit; letter-spacing: -.03em; margin: 6px 0 0; }
.h1 { font: 800 32px/1.03 Outfit; letter-spacing: -.028em; margin: 0; }
.h2 { font: 700 20px/1.2 Outfit; letter-spacing: -.015em; margin: 0; }
.small { font-size: 12.5px; color: var(--dim); }
.dim { color: var(--dim); }
p { margin: 0; }

/* ---------- vidro, blocos, pílulas ---------- */
.glass { background: var(--glass); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border: 1px solid var(--edge); border-radius: var(--r); box-shadow: 0 18px 40px -14px rgba(0,0,0,.55); }
/* sobre fotos dos cards: escuro translúcido, sem blur (um blur por card a menos) */
.frost { background: rgba(18,11,8,.74); border: 1px solid var(--edge); }
.block { padding: 18px; margin-bottom: 14px; }
.rise { animation: rise .5s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }

.pill { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 40px; padding: 0 15px; border-radius: 99px;
  font: 500 13.5px Outfit; border: 1px solid var(--edge); background: rgba(255,255,255,.08); white-space: nowrap; transition: transform .2s var(--ease); }
.pill:active { transform: scale(.96); }
.pill.on { background: var(--ink); color: var(--dark); border-color: var(--ink); font-weight: 600; }
.pill.lock { background: none; border-style: dashed; border-color: var(--faint); color: var(--faint); }
.row { display: flex; gap: 8px; flex-wrap: wrap; }
.scrollx { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -24px; padding: 2px 24px; }
.scrollx::-webkit-scrollbar { display: none; }

.btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 56px; border-radius: 99px; background: var(--ink); color: var(--dark);
  font: 700 16px Outfit; box-shadow: 0 18px 36px -12px rgba(0,0,0,.6); transition: transform .2s var(--ease); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .45; }
.ghost { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 99px; font: 600 14px Outfit; }
.ghost.danger { color: var(--danger); }
.round { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; flex: none; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 22px; }
.topbar .label { flex: 1; text-align: center; }
.spacer44 { width: 44px; flex: none; }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- barra de baixo ---------- */
#nav { position: fixed; z-index: 20; left: 20px; right: 20px; bottom: calc(var(--bot) + 14px); height: 68px; border-radius: 99px;
  display: flex; justify-content: space-around; align-items: center; padding: 0 8px;
  background: rgba(22,16,9,.62); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
  border: 1px solid var(--edge); box-shadow: 0 20px 40px -12px rgba(0,0,0,.7); }
#nav button { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 52px; font: 500 11px Outfit; color: var(--dim); padding: 6px; border-radius: 99px; }
#nav button.on { color: var(--ink); font-weight: 700; }
#nav .cam { width: 52px; height: 52px; min-width: 0; border-radius: 50%; background: var(--ink); color: var(--dark); justify-content: center; }
#nav .cam .icon { width: 24px; height: 24px; }

/* ---------- adega ---------- */
.hero { padding-top: 56px; margin-bottom: 22px; }
.search { display: flex; align-items: center; gap: 10px; min-height: 50px; padding: 0 18px; border-radius: 99px; margin-bottom: 14px; }
.search input { flex: 1; background: none; border: 0; outline: 0; font-size: 16px; color: var(--ink); min-width: 0; }
.search input::placeholder { color: var(--dim); }
.tip { padding: 14px 18px; margin-bottom: 14px; display: block; width: 100%; text-align: left; }
.tip p { margin-top: 5px; font-size: 14.5px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 14px; }
.card { position: relative; aspect-ratio: 3/4.3; border-radius: var(--r); overflow: hidden; background: #2a1c16 linear-gradient(135deg,#3A2621,#1A120E);
  box-shadow: 0 16px 34px -14px rgba(0,0,0,.65); transition: transform .26s var(--ease); text-align: left; width: 100%; }
.card:active { transform: scale(.97); }
.card img { width: 100%; height: 100%; object-fit: cover; }
.card .score { position: absolute; top: 10px; right: 10px; }
.card .cap { position: absolute; left: 8px; right: 8px; bottom: 8px; padding: 10px 12px; border-radius: 16px; }
.card .cap b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font: 700 15px/1.18 Outfit; letter-spacing: -.01em; }
.card .cap span { display: block; margin-top: 3px; font-size: 12px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.score { display: inline-flex; align-items: center; height: 30px; padding: 0 11px; border-radius: 99px; font: 700 13.5px Outfit; }
.empty { padding: 22px; margin-top: 24px; }

/* ---------- avaliar ---------- */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.shot { display: flex; flex-direction: column; gap: 6px; align-items: center; font: 600 12.5px Outfit; }
.shot .ph { width: 100%; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.08); border: 1px solid var(--edge); display: grid; place-items: center; color: var(--dim); }
.shot .ph img { width: 100%; height: 100%; object-fit: cover; }
.step { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 12px; }
.step .num { font: 800 36px/1 Outfit; letter-spacing: -.04em; }
.field { display: block; margin-top: 10px; }
.field span { display: block; font-size: 12px; color: var(--dim); margin: 0 0 5px 4px; }
.field input, .field textarea { width: 100%; min-height: 48px; padding: 12px 16px; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid var(--edge);
  outline: 0; font-size: 16px; color: var(--ink); }
.field textarea { min-height: 96px; resize: vertical; line-height: 1.4; }
.field input:focus, .field textarea:focus { border-color: rgba(247,242,234,.7); background: rgba(255,255,255,.11); }
.grid3 { display: grid; grid-template-columns: .8fr .8fr 1.4fr; gap: 8px; }
.grid3 input { padding-left: 12px; padding-right: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sugs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.dots { display: flex; justify-content: space-between; gap: 4px; margin: 4px 0 6px; }
.dot { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 52px; font-size: 12px; color: var(--dim); }
.dot i { width: 44px; height: 44px; border-radius: 50%; box-shadow: inset -4px -6px 8px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.1); transition: transform .2s var(--ease); }
.dot.on { color: var(--ink); }
.dot.on i { outline: 2px solid var(--ink); outline-offset: 3px; }
.attr { margin-top: 14px; }
.attr .r { display: flex; justify-content: space-between; gap: 10px; font-weight: 600; }
.attr .r span { font-weight: 400; font-size: 12.5px; color: var(--dim); }
.attr .q { font-size: 12.5px; color: var(--faint); margin-top: 1px; }
.slider { position: relative; height: 44px; touch-action: pan-y; cursor: pointer; }
.slider::before { content: ""; position: absolute; left: 0; right: 0; top: 20px; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); }
.slider b { position: absolute; left: 0; top: 20px; height: 3px; border-radius: 3px; background: var(--ink); transition: width .15s; }
.slider u { position: absolute; top: 19.5px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: rgba(255,255,255,.35); }
.slider i { position: absolute; top: 11px; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--ink); box-shadow: 0 4px 12px rgba(0,0,0,.5); transition: left .15s; }
.ends { display: flex; justify-content: space-between; font-size: 12px; color: var(--faint); }
.aromas h4 { font: 400 12.5px Outfit; color: var(--faint); margin: 12px 0 6px; }
.stars { display: flex; gap: 6px; justify-content: center; }
.star { width: 42px; height: 42px; position: relative; }
.star svg { width: 100%; height: 100%; }
.buy { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; }
.buy .pill { min-height: 48px; }
.fixedbtn { position: fixed; z-index: 15; left: 24px; right: 24px; bottom: calc(var(--bot) + 16px); }

/* ---------- vinho ---------- */
.cover { position: fixed; z-index: 1; left: 0; right: 0; top: 0; height: 560px; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(18,11,8,.25), rgba(18,11,8,.5) 50%, var(--bg)); }
.facts { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 20px; }
.facts > * { padding: 12px; border-radius: 18px; text-align: left; }
.facts small { display: block; font: 500 10.5px Outfit; letter-spacing: .12em; color: var(--dim); text-transform: uppercase; margin-bottom: 3px; }
.facts b { font: 700 16px Outfit; }
.thumbs { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 14px; }
.thumbs button { position: relative; aspect-ratio: 3/4; border-radius: 16px; overflow: hidden; background: rgba(255,255,255,.08); border: 1px solid var(--edge); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.thumbs span { position: absolute; left: 6px; bottom: 6px; padding: 3px 9px; border-radius: 99px; font: 600 11.5px Outfit; }
.bar { display: flex; align-items: center; gap: 10px; margin: 9px 0; font-size: 13.5px; }
.bar span { width: 104px; color: var(--dim); }
.bar em { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.18); position: relative; }
.bar em b { position: absolute; left: 0; top: 0; height: 3px; border-radius: 3px; background: var(--ink); }
.bar strong { width: 14px; text-align: right; }
.radar { width: 100%; height: auto; }
#zoom { position: fixed; inset: 0; z-index: 60; background: #000; display: grid; place-items: center; }
#zoom img { max-width: 100%; max-height: 100%; object-fit: contain; }

/* ---------- técnicas ---------- */
.tech { margin-bottom: 12px; overflow: hidden; }
.tech > button { display: flex; align-items: center; gap: 12px; padding: 10px; width: 100%; text-align: left; }
.tech .im { width: 62px; height: 62px; border-radius: 15px; background: center/cover; flex: none; }
.tech b { display: block; font: 700 15.5px/1.25 Outfit; }
.tech small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12.5px; color: var(--dim); margin-top: 2px; }
.tech .ar { margin-left: auto; font-size: 22px; transition: transform .35s var(--ease); padding-right: 6px; }
.tech.open .ar { transform: rotate(90deg); }
.tech .more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .45s var(--ease); }
.tech.open .more { grid-template-rows: 1fr; }
.tech .more > div { overflow: hidden; }
.tech .more .in { padding: 0 16px 16px; }
.passo { display: flex; gap: 12px; margin: 8px 0; }
.passo b { font: 700 13px Outfit; min-width: 22px; }
.passo p { font-size: 14px; line-height: 1.45; color: var(--dim); }
.page .passo p { font-size: 15px; color: var(--ink); }
.dica { padding: 14px 16px; margin-bottom: 10px; font-size: 14.5px; line-height: 1.45; }
.src { display: block; padding: 10px 2px; border-bottom: 1px solid rgba(255,255,255,.1); text-decoration: none; color: inherit; }
.src b { font: 600 13px Outfit; }
.src q { display: block; font-size: 12.5px; color: var(--dim); margin-top: 3px; font-style: italic; }
.src small { display: block; font-size: 11.5px; color: var(--faint); margin-top: 3px; }

/* ---------- ajuda ---------- */
.faq { margin-bottom: 10px; overflow: hidden; }
.faq > button { display: flex; width: 100%; text-align: left; align-items: center; gap: 10px; padding: 16px 18px; font-weight: 600; }
.faq > button span { margin-left: auto; font-size: 20px; }
.faq .more { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s var(--ease); }
.faq.open .more { grid-template-rows: 1fr; }
.faq .more > div { overflow: hidden; }
.faq .more p { padding: 0 18px 16px; font-size: 14px; color: var(--dim); line-height: 1.45; }
.howto { display: flex; gap: 14px; margin: 10px 0; }
.howto b { font: 700 20px Outfit; min-width: 34px; }

/* ---------- diálogos e avisos ---------- */
#dialog { position: fixed; inset: 0; z-index: 70; display: grid; place-items: end center; padding: 16px 16px calc(var(--bot) + 16px); background: rgba(0,0,0,.55); animation: fade .25s both; }
#dialog .box { width: 100%; max-width: 480px; padding: 22px 20px 16px; border-radius: 28px; background: rgba(30,21,17,.9); animation: rise .4s var(--ease) both; }
#dialog .box p { margin: 10px 0 16px; color: var(--dim); line-height: 1.45; }
#dialog .acts { display: flex; justify-content: flex-end; gap: 6px; flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
#toast { position: fixed; z-index: 80; left: 50%; bottom: calc(var(--bot) + 100px); transform: translateX(-50%); padding: 12px 18px; border-radius: 99px; font-size: 14px; animation: rise .4s var(--ease) both; max-width: calc(100% - 40px); text-align: center; }
.banner { padding: 14px 18px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.45; }
.banner b { display: block; margin-bottom: 3px; }

/* ---------- câmera ---------- */
#camera { position: fixed; inset: 0; z-index: 40; background: #000; display: flex; flex-direction: column; }
#camera video { flex: 1; width: 100%; object-fit: cover; min-height: 0; }
#camera .guide { position: absolute; left: 12%; right: 12%; top: 18%; bottom: 30%; border: 2px solid rgba(255,255,255,.7); border-radius: 22px; box-shadow: 0 0 0 100vmax rgba(0,0,0,.35); pointer-events: none; }
#camera .guide.selfie { left: 18%; right: 18%; top: 14%; bottom: 34%; border-radius: 50%; }
#camera .head { position: absolute; top: calc(var(--top) + 12px); left: 16px; right: 16px; display: flex; align-items: center; gap: 12px; }
#camera .head div { flex: 1; text-align: center; }
#camera .foot { position: absolute; left: 0; right: 0; bottom: calc(var(--bot) + 24px); display: flex; align-items: center; justify-content: space-around; }
#camera .shutter { width: 76px; height: 76px; border-radius: 50%; border: 4px solid #fff; display: grid; place-items: center; }
#camera .shutter i { width: 60px; height: 60px; border-radius: 50%; background: #fff; transition: transform .1s; }
#camera .shutter:active i { transform: scale(.9); }
#camera .side { width: 88px; text-align: center; }

@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .glass { background: rgba(30,21,17,.82); } .frost { background: rgba(18,11,8,.82); } #nav { background: rgba(22,16,9,.95); }
}
@media (min-width: 640px) { .screen { max-width: 560px; margin: 0 auto; } #nav { max-width: 520px; margin: 0 auto; } .fixedbtn { max-width: 512px; margin: 0 auto; } }
