/* ==========================================================================
   Café In Box Piri — identidade visual
   Paleta: espresso, caramelo, creme e dourado suave
   ========================================================================== */

:root {
  --espresso: #241610;
  --coffee: #3a241a;
  --roast: #57392a;
  --caramel: #a9713f;
  --gold: #c39a63;
  --gold-soft: #e6d2b3;
  --cream: #fbf7f1;
  --paper: #f5ece1;
  --sand: #efe3d5;
  --line: #e5d6c5;
  --muted: #7d695c;
  --ok: #2f6b4f;
  --danger: #a3341f;
  --shadow-sm: 0 2px 10px rgba(58, 36, 26, .06);
  --shadow-md: 0 18px 40px -18px rgba(58, 36, 26, .35);
  --shadow-lg: 0 40px 80px -40px rgba(36, 22, 16, .55);
  --serif: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  --sans: 'Jost', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 6px;
  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 92px;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--sans);
  font-weight: 300;
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
h1, h2, h3, p, dl, dd, ol, ul, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }

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

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  z-index: 200;
  background: var(--espresso);
  color: var(--cream);
  padding: 12px 18px;
}
.skip:focus { left: 12px; top: 12px; }

.wrap {
  width: min(1180px, 100% - 40px);
  margin-inline: auto;
}

/* ---------- tipografia ---------- */

h1, h2, h3, .serif {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -.01em;
}

h1 {
  font-size: clamp(2.6rem, 8.5vw, 4.6rem);
  line-height: .98;
  letter-spacing: -.02em;
}

h2 {
  font-size: clamp(2rem, 5.4vw, 3.2rem);
  line-height: 1.05;
}

h3 { font-size: 1.25rem; line-height: 1.25; }

em {
  font-style: italic;
  color: var(--caramel);
}

.eyebrow {
  font-family: var(--sans);
  font-size: .68rem;
  font-weight: 500;
  letter-spacing: .28em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-bottom: 18px;
}

.eyebrow span { margin-right: 8px; }
.eyebrow.light { color: var(--gold-soft); }

.lead {
  font-size: 1.06rem;
  color: var(--muted);
  max-width: 46ch;
}

.muted { color: var(--muted); }

/* ---------- botões ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 50px;
  padding: 0 26px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .2s var(--ease);
}

.btn:active { transform: translateY(1px); }
.btn-block { width: 100%; }
.btn-sm { min-height: 44px; padding: 0 18px; font-size: .72rem; }

.btn-solid {
  background: var(--espresso);
  color: #f7e9d6;
  box-shadow: var(--shadow-sm);
}
.btn-solid:hover { background: var(--roast); }

.btn-ghost {
  color: var(--espresso);
  border-color: var(--line);
  background: rgba(255, 255, 255, .55);
}
.btn-ghost:hover { border-color: var(--caramel); background: #fff; }

.btn-line {
  border-color: var(--gold-soft);
  color: var(--espresso);
  letter-spacing: .12em;
}
.btn-line:hover { background: var(--espresso); color: var(--cream); border-color: var(--espresso); }

.btn-line-light {
  border-color: rgba(230, 210, 179, .5);
  color: var(--gold-soft);
  letter-spacing: .12em;
}
.btn-line-light:hover { background: var(--gold-soft); color: var(--espresso); }

/* ---------- topo ---------- */

.announce {
  background: var(--espresso);
  color: #efdfc8;
  font-size: .66rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  text-align: center;
  padding: 11px 16px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px 14px;
}
.announce i { color: var(--gold); font-style: normal; }

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(251, 247, 241, .88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(229, 214, 197, .7);
}

.header-inner {
  min-height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding-block: 10px;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand img {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--gold-soft);
}

.brand-text strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 500;
  line-height: 1;
}

.brand-text small {
  display: block;
  font-size: .58rem;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--caramel);
  margin-top: 6px;
}

.nav { display: none; gap: 30px; }
.nav a {
  font-size: .74rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--coffee);
  position: relative;
  padding-block: 6px;
}
.nav a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 1px;
  background: var(--caramel);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav a:hover::after { transform: scaleX(1); }

.header-cta { display: none; }

@media (min-width: 860px) {
  .nav { display: flex; }
  .header-cta { display: inline-flex; }
}

/* ---------- hero ---------- */

.hero { padding: clamp(38px, 7vw, 84px) 0 clamp(50px, 7vw, 96px); }

.hero-grid {
  display: grid;
  gap: clamp(34px, 6vw, 72px);
  align-items: center;
}

.hero h1 { margin-bottom: 22px; }

.hero .lead { margin-bottom: 30px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 34px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 18px;
  font-size: .7rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.chips li { display: flex; align-items: center; gap: 8px; }
.chips li::before {
  content: "✳";
  color: var(--gold);
  font-size: .8rem;
}

.hero-visual {
  position: relative;
  margin: 0;
  padding: 10px;
  border: 1px solid var(--gold-soft);
  border-radius: 160px 160px var(--radius) var(--radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(239, 227, 213, .35));
}

.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: 150px 150px 3px 3px;
}

.hero-tag {
  position: absolute;
  left: 50%;
  bottom: -18px;
  transform: translateX(-50%);
  width: min(280px, 86%);
  background: var(--cream);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-md);
  padding: 14px 18px;
  text-align: center;
}
.hero-tag span {
  display: block;
  font-size: .58rem;
  letter-spacing: .26em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}
.hero-tag em { font-size: 1.05rem; }

@media (min-width: 900px) {
  .hero-grid { grid-template-columns: 1.02fr .98fr; }
  .hero-visual { margin-right: 8px; }
}

/* ---------- história ---------- */

.story {
  background: var(--paper);
  border-block: 1px solid var(--line);
  padding: clamp(50px, 8vw, 96px) 0;
}

.story-inner {
  max-width: 780px;
  text-align: center;
  margin-inline: auto;
}
.story h2 { margin-bottom: 22px; }
.story p { color: var(--muted); font-size: 1.02rem; }

/* ---------- seções ---------- */

.section { padding: clamp(56px, 9vw, 112px) 0; }

.section-head {
  max-width: 640px;
  margin-bottom: clamp(32px, 5vw, 56px);
}
.section-head h2 { margin-bottom: 14px; }
.section-sub { color: var(--muted); font-size: .98rem; }
.section-sub a { color: var(--caramel); border-bottom: 1px solid var(--gold-soft); }

.fineprint {
  margin-top: 28px;
  font-size: .74rem;
  color: var(--muted);
  max-width: 70ch;
}

/* ---------- produtos ---------- */

.products {
  display: grid;
  gap: 26px;
}

@media (min-width: 820px) {
  .products { grid-template-columns: repeat(2, 1fr); gap: 34px; }
}

.product {
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .35s var(--ease), transform .35s var(--ease);
}
.product:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.product-media { position: relative; overflow: hidden; }
.product-media img {
  width: 100%;
  aspect-ratio: 5 / 4;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.product:hover .product-media img { transform: scale(1.04); }

.product-badge {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(251, 247, 241, .95);
  color: var(--coffee);
  font-size: .6rem;
  letter-spacing: .2em;
  text-transform: uppercase;
  padding: 7px 12px;
  border-radius: 999px;
  border: 1px solid var(--gold-soft);
}

.product-body {
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  flex: 1;
}

.product-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.product-head h3 { font-size: 1.6rem; }

.price {
  font-family: var(--serif);
  font-size: 1.5rem;
  color: var(--coffee);
  white-space: nowrap;
}

.product-desc { color: var(--muted); font-size: .94rem; }

.product-items {
  display: grid;
  gap: 7px;
  font-size: .88rem;
  color: var(--coffee);
}
.product-items li { display: flex; gap: 10px; align-items: flex-start; }
.product-items li::before {
  content: "";
  flex: 0 0 auto;
  width: 6px; height: 6px;
  margin-top: 9px;
  border-radius: 50%;
  background: var(--gold);
}

.product-foot {
  margin-top: auto;
  padding-top: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border-top: 1px solid var(--line);
}

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  background: #fff;
}

.qty button {
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
  color: var(--coffee);
  transition: background .2s var(--ease);
}
.qty button:hover { background: var(--paper); }
.qty output {
  min-width: 34px;
  text-align: center;
  font-size: .95rem;
  font-weight: 500;
}

.product-add {
  flex: 1;
  min-height: 44px;
  border-radius: 999px;
  border: 1px solid var(--espresso);
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.product-add:hover { background: var(--espresso); color: var(--cream); }

/* ---------- editorial ---------- */

.editorial {
  background: var(--espresso);
  color: var(--cream);
  padding: clamp(56px, 9vw, 110px) 0;
}

.editorial-grid {
  display: grid;
  gap: 32px;
  align-items: center;
}

.editorial-media img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  border-radius: var(--radius);
}

.editorial-copy h2 { margin-bottom: 20px; }
.editorial-copy p { color: rgba(251, 247, 241, .72); margin-bottom: 28px; max-width: 44ch; }

@media (min-width: 860px) {
  .editorial-grid { grid-template-columns: .9fr 1.1fr; gap: 70px; }
}

/* ---------- passos ---------- */

.steps-grid {
  display: grid;
  gap: 26px;
  counter-reset: passo;
}

.steps-grid li {
  border-top: 1px solid var(--line);
  padding-top: 22px;
}

.step-no {
  display: block;
  font-family: var(--serif);
  font-size: 1.9rem;
  color: var(--gold);
  margin-bottom: 10px;
}

.steps-grid h3 { margin-bottom: 8px; font-size: 1.35rem; }
.steps-grid p { color: var(--muted); font-size: .94rem; }

@media (min-width: 820px) {
  .steps-grid { grid-template-columns: repeat(3, 1fr); gap: 40px; }
}

/* ---------- galeria ---------- */

.gallery { background: var(--paper); }

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.gallery-grid img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 4px;
  transition: transform .6s var(--ease), filter .6s var(--ease);
}
.gallery-grid img:hover { transform: scale(1.02); filter: saturate(1.05); }

@media (min-width: 760px) {
  .gallery-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}
@media (min-width: 1080px) {
  .gallery-grid { grid-template-columns: repeat(6, 1fr); }
  .gallery-grid img:nth-child(1) { grid-column: span 2; grid-row: span 2; aspect-ratio: 1; }
  .gallery-grid img:nth-child(4) { grid-column: span 2; }
}

/* ---------- pedido ---------- */

.order { background: var(--cream); }

.order-grid { display: grid; gap: 24px; align-items: start; }

@media (min-width: 960px) {
  .order-grid { grid-template-columns: 1.35fr .8fr; gap: 34px; }
}

.panel {
  background: #fffdfa;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 34px);
  box-shadow: var(--shadow-sm);
}

.panel-title {
  font-family: var(--serif);
  font-size: 1.45rem;
  margin-bottom: 22px;
}

.form-grid { display: grid; gap: 18px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: 1fr 1fr; } .field.full { grid-column: 1 / -1; } }

.field { display: flex; flex-direction: column; gap: 7px; }

.field label {
  font-size: .68rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--coffee);
}

.field b { color: var(--caramel); font-weight: 400; }

input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  font-size: .95rem;
  transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}

textarea { min-height: 88px; resize: vertical; }

input::placeholder, textarea::placeholder { color: #b7a698; }

input:focus, select:focus, textarea:focus {
  outline: 0;
  border-color: var(--caramel);
  box-shadow: 0 0 0 3px rgba(169, 113, 63, .12);
}

input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--danger);
}

.err {
  color: var(--danger);
  font-size: .76rem;
  min-height: 0;
}

.gps {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 0 18px;
  border: 1px dashed var(--gold);
  border-radius: 999px;
  color: var(--roast);
  font-size: .72rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(230, 210, 179, .16);
  transition: background .2s var(--ease);
  align-self: flex-start;
}
.gps:hover:not(:disabled) { background: rgba(230, 210, 179, .4); }
.gps:disabled { opacity: .6; cursor: progress; }

.hint { font-size: .76rem; color: var(--muted); }

.privacy {
  margin-top: 22px;
  font-size: .76rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 16px;
}
.privacy a { color: var(--caramel); border-bottom: 1px solid var(--gold-soft); }

/* resumo */

.summary {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: clamp(22px, 4vw, 30px);
}

@media (min-width: 960px) {
  .summary { position: sticky; top: 100px; }
}

.summary-items { display: grid; gap: 14px; margin-bottom: 20px; }

.summary-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  font-size: .92rem;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.summary-row:last-child { border-bottom: 0; padding-bottom: 0; }
.summary-row small { display: block; color: var(--muted); font-size: .76rem; }

.summary-empty { color: var(--muted); font-size: .9rem; padding: 12px 0; }

.summary-totals { display: grid; gap: 10px; margin: 18px 0 22px; }
.summary-totals div { display: flex; justify-content: space-between; font-size: .9rem; }
.summary-totals dt { color: var(--muted); }
.summary-totals dd { margin: 0; }
.summary-totals .grand {
  border-top: 1px solid var(--line);
  padding-top: 12px;
  font-size: 1.05rem;
}
.summary-totals .grand dt { color: var(--espresso); }
.summary-totals .grand dd { font-family: var(--serif); font-size: 1.5rem; }

.summary .btn + .btn { margin-top: 10px; }

.summary-note {
  margin-top: 16px;
  font-size: .74rem;
  color: var(--muted);
  text-align: center;
}

/* ---------- faq ---------- */

.faq { background: var(--cream); }

.faq-list { display: grid; gap: 0; border-top: 1px solid var(--line); }

.faq-list > div {
  padding: 22px 0;
  border-bottom: 1px solid var(--line);
}

.faq-list dt {
  font-family: var(--serif);
  font-size: 1.2rem;
  margin-bottom: 8px;
}

.faq-list dd { color: var(--muted); font-size: .94rem; max-width: 72ch; margin: 0; }

@media (min-width: 900px) {
  .faq-wrap { display: grid; grid-template-columns: .7fr 1.3fr; gap: 60px; align-items: start; }
  .faq-wrap .section-head { margin-bottom: 0; position: sticky; top: 110px; }
}

/* ---------- final ---------- */

.final {
  background:
    radial-gradient(120% 120% at 15% 0%, rgba(169, 113, 63, .35), transparent 55%),
    var(--espresso);
  color: var(--cream);
  padding: clamp(60px, 10vw, 120px) 0;
  text-align: center;
}

.final-inner h2 { margin-bottom: 30px; }
.final-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

/* ---------- rodapé ---------- */

.footer {
  background: #1b100b;
  color: rgba(251, 247, 241, .7);
  padding: 34px 0 calc(34px + env(safe-area-inset-bottom));
  font-size: .84rem;
}

.footer-inner {
  display: grid;
  gap: 22px;
  justify-items: center;
  text-align: center;
}

.footer-brand { display: flex; align-items: center; gap: 14px; text-align: left; }
.footer-brand img { border-radius: 50%; border: 1px solid rgba(230, 210, 179, .35); }
.footer-brand strong { display: block; font-family: var(--serif); font-size: 1.2rem; color: var(--cream); font-weight: 500; }
.footer-brand p { font-size: .8rem; }

.footer-nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 24px; }
.footer-nav a {
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: rgba(251, 247, 241, .8);
  border-bottom: 1px solid transparent;
}
.footer-nav a:hover { border-bottom-color: var(--gold); color: var(--cream); }

.footer-legal { font-size: .72rem; color: rgba(251, 247, 241, .45); }

@media (min-width: 760px) {
  .footer-inner { grid-template-columns: 1fr auto; justify-items: start; text-align: left; }
  .footer-legal { grid-column: 1 / -1; }
}

/* ---------- barra fixa ---------- */

.bar {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 70;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: rgba(251, 247, 241, .96);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -10px 30px -20px rgba(36, 22, 16, .5);
}

.bar[hidden] { display: none; }

.bar-info { display: flex; flex-direction: column; line-height: 1.2; }
.bar-info small { font-size: .68rem; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.bar-info strong { font-family: var(--serif); font-size: 1.25rem; color: var(--espresso); }

@media (min-width: 781px) {
  .bar { display: none; }
}

body.has-bar { padding-bottom: 84px; }
@media (min-width: 781px) { body.has-bar { padding-bottom: 0; } }

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(96px + env(safe-area-inset-bottom));
  transform: translate(-50%, 20px);
  z-index: 90;
  max-width: min(420px, calc(100% - 32px));
  padding: 13px 20px;
  border-radius: 999px;
  background: var(--espresso);
  color: var(--cream);
  font-size: .84rem;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* ---------- página legal ---------- */

.legal {
  padding: clamp(48px, 8vw, 92px) 0;
  max-width: 760px;
  margin-inline: auto;
}
.legal h1 { font-size: clamp(2rem, 5vw, 2.9rem); margin-bottom: 10px; }
.legal h2 { font-size: 1.45rem; margin: 34px 0 10px; }
.legal p, .legal li { color: var(--muted); font-size: .95rem; }
.legal ul { list-style: disc; padding-left: 22px; display: grid; gap: 8px; margin: 10px 0; }
.legal a { color: var(--caramel); border-bottom: 1px solid var(--gold-soft); }
.legal .back { margin-top: 36px; display: inline-flex; }

/* ---------- animações ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
[data-reveal].is-visible { opacity: 1; transform: none; }

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