/* ===================================================================
   Produtos Caicó — institutional site
   Tokens derived from the brand's real packaging: mustard label yellow,
   near-black ink, parchment paper, wine ribbon accent. Display serif +
   script pair mirrors the wordmark ("PRODUTOS CAICÓ" + "Saborosa Tradição").
   Signature motif: the arch from the bridge logomark, used as a frieze
   between sections and as a frame for portraits/media.
   =================================================================== */

:root {
  --cream: #fbf1de;
  --cream-2: #f2e0b8;
  --ink: #2a1710;
  --ink-soft: #46281a;
  --ink-2: #3a2116;
  --gold: #e3a423;
  --gold-deep: #a9700f;
  --gold-pale: #f6d78a;
  --wine: #6e1f2e;
  --paper-line: rgba(42, 23, 16, 0.14);
  --cream-line: rgba(251, 241, 222, 0.22);

  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-script: "Beau Rivage", "Segoe Script", cursive;
  --font-body: "Work Sans", "Helvetica Neue", Arial, sans-serif;

  --wrap: 1180px;
  --space-1: clamp(0.5rem, 0.4rem + 0.4vw, 0.75rem);
  --space-2: clamp(1rem, 0.8rem + 0.8vw, 1.5rem);
  --space-3: clamp(1.75rem, 1.3rem + 1.8vw, 2.75rem);
  --space-4: clamp(3rem, 2.2rem + 3.2vw, 5rem);
  --space-5: clamp(4.5rem, 3.2rem + 5.2vw, 7.5rem);

  --radius: 6px;
  --ease: cubic-bezier(0.22, 0.61, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--cream);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img {
  max-width: 100%;
  display: block;
}

video {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

h1,
h2,
h3,
h4,
p,
figure {
  margin: 0;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--space-2);
}

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

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

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  padding: 0.9em 1.7em;
  border-radius: 999px;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), border-color .25s var(--ease);
}

.btn:hover {
  transform: translateY(-2px);
}

.btn--gold {
  background: var(--gold);
  color: var(--ink);
}
.btn--gold:hover {
  background: var(--gold-pale);
}

.btn--outline-cream {
  border-color: var(--cream-line);
  color: var(--cream);
}
.btn--outline-cream:hover {
  border-color: var(--cream);
  background: rgba(251, 241, 222, 0.08);
}

.btn--outline-ink {
  border-color: var(--paper-line);
  color: var(--ink);
}
.btn--outline-ink:hover {
  border-color: var(--ink);
  background: rgba(42, 23, 16, 0.05);
}

.btn--wine {
  background: var(--wine);
  color: var(--cream);
}
.btn--wine:hover {
  background: #85263a;
}

.btn--ink {
  background: var(--ink);
  color: var(--cream);
}
.btn--ink:hover {
  background: var(--ink-soft);
}

/* ---------- Eyebrow / labels ---------- */

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-script);
  font-size: clamp(1.4rem, 1.1rem + 1vw, 1.9rem);
  font-weight: 400;
  color: var(--gold);
}

.section--cream .eyebrow,
.cta-final .eyebrow {
  color: var(--wine);
}

.eyebrow::before {
  content: "";
  width: 34px;
  height: 17px;
  background: currentColor;
  border-radius: 17px 17px 0 0;
  opacity: 0.85;
}

.kicker {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ---------- Nav ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: var(--space-2) 0;
  transition: padding 0.35s var(--ease);
}

/* Background/blur live on a pseudo-element rather than directly on .nav:
   backdrop-filter on .nav itself would make it a containing block for its
   own position:fixed descendant (.nav__links, the mobile menu panel),
   collapsing that panel to the header's height instead of the viewport. */
.nav::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: transparent;
  box-shadow: none;
  transition: background 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.nav.is-scrolled {
  padding: 0.7rem 0;
}

.nav.is-scrolled::before {
  background: rgba(42, 23, 16, 0.94);
  backdrop-filter: blur(6px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.nav__brand img {
  height: 58px;
  width: auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
}

.nav__brand span {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  letter-spacing: 0.03em;
  color: var(--cream);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav__links a {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--cream);
  opacity: 0.85;
  position: relative;
  padding-bottom: 3px;
}

.nav__links a:hover {
  opacity: 1;
}

.nav__links a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1.5px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.nav__links a:hover::after {
  transform: scaleX(1);
}

.nav__cta {
  display: none;
}

.nav__toggle {
  display: none;
  background: none;
  border: none;
  color: var(--cream);
  cursor: pointer;
  padding: 0.4rem;
}

.nav__toggle svg {
  width: 26px;
  height: 26px;
}

@media (min-width: 900px) {
  .nav__cta {
    display: inline-flex;
  }
}

@media (max-width: 899px) {
  .nav__links {
    position: fixed;
    inset: 0;
    background: var(--ink);
    flex-direction: column;
    justify-content: center;
    gap: var(--space-3);
    transform: translateY(-100%);
    transition: transform 0.4s var(--ease);
  }
  .nav__links.is-open {
    transform: translateY(0);
  }
  .nav__links a {
    font-family: var(--font-display);
    font-size: 1.6rem;
  }
  .nav__toggle {
    display: block;
    z-index: 101;
  }
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
  overflow: hidden;
  background: var(--ink);
}

.hero__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 25%;
}

.hero__scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(185deg, rgba(18, 10, 6, 0.65) 0%, rgba(18, 10, 6, 0.4) 28%, rgba(18, 10, 6, 0.98) 100%),
    linear-gradient(102deg, rgba(18, 10, 6, 0.96) 0%, rgba(18, 10, 6, 0.72) 42%, rgba(18, 10, 6, 0.18) 78%);
}

.hero__content {
  position: relative;
  z-index: 1;
  padding-block: calc(var(--space-5) + 3rem) var(--space-4);
  max-width: 760px;
}

.hero__eyebrow {
  font-family: var(--font-script);
  font-size: clamp(1.6rem, 1.2rem + 1.6vw, 2.4rem);
  color: var(--gold-pale);
  display: block;
  margin-bottom: 0.4rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.8rem, 2.1rem + 3.4vw, 5.2rem);
  line-height: 0.98;
  letter-spacing: -0.01em;
}

.hero p.lede {
  margin-top: var(--space-2);
  font-size: clamp(1.05rem, 1rem + 0.4vw, 1.25rem);
  max-width: 46ch;
  color: var(--gold-pale);
  opacity: 0.95;
}

.hero__actions {
  margin-top: var(--space-3);
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

/* ---------- Arch frieze (signature motif) ----------
   Solid strip with scalloped top edge, mimicking a row of the bridge
   arches from the logomark. Placed at section seams; --arch-color is
   the color of the section that follows. */

.arch-frieze {
  --tile: 48px;
  height: calc(var(--tile) / 2);
  width: 100%;
  background-color: var(--arch-prev, var(--cream));
  background-image: radial-gradient(
    circle at calc(var(--tile) / 2) calc(var(--tile) / 2),
    var(--arch-next, var(--ink-2)) calc(var(--tile) / 2 - 0.5px),
    transparent calc(var(--tile) / 2)
  );
  background-size: var(--tile) calc(var(--tile) / 2);
  background-repeat: repeat-x;
  background-position: top center;
  position: relative;
  z-index: 2;
}

.arch-frieze--onto-ink {
  --arch-prev: var(--cream);
  --arch-next: var(--ink-2);
}
.arch-frieze--onto-cream {
  --arch-prev: var(--ink-2);
  --arch-next: var(--cream);
}
.arch-frieze--onto-gold {
  --arch-prev: var(--ink-2);
  --arch-next: var(--gold);
}
.arch-frieze--hero {
  /* Matches the hero's actual rendered bottom edge (photo fully darkened by
     .hero__scrim's gradients), not the flat --ink token used elsewhere,
     so the arch "valleys" don't show a seam against the real pixel color. */
  --arch-prev: #120a06;
  --arch-next: var(--ink-2);
}

/* ---------- Trust strip ---------- */

.trust {
  background: var(--ink-2);
  color: var(--cream);
  padding-block: var(--space-2);
}

.trust__row {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  justify-content: center;
  text-align: center;
}

.trust__item {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.trust__item strong {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--gold-pale);
}

.trust__item span {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.65;
}

/* ---------- Sections ---------- */

.section {
  padding-block: var(--space-5);
  position: relative;
}

.section--dark {
  background: var(--ink-2);
  color: var(--cream);
}

.section--cream {
  background: var(--cream);
  color: var(--ink);
}

.section__head {
  max-width: 640px;
  margin-bottom: var(--space-4);
}

.section__head h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(2.1rem, 1.7rem + 1.6vw, 3.1rem);
  line-height: 1.05;
  margin-top: 0.3rem;
}

.section__head p {
  margin-top: var(--space-2);
  font-size: 1.08rem;
  max-width: 56ch;
  opacity: 0.9;
}

/* reveal-on-scroll */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-stagger > * {
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ---------- História ---------- */

.historia__grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: var(--space-4);
  align-items: center;
}

.historia__copy p + p {
  margin-top: 1rem;
}

.historia__copy p {
  opacity: 0.92;
  max-width: 52ch;
}

.arch-frame {
  position: relative;
  border-radius: 260px 260px 14px 14px;
  overflow: hidden;
  aspect-ratio: 3 / 4;
  border: 6px solid var(--gold);
  box-shadow: 0 26px 50px rgba(0, 0, 0, 0.35);
}

.arch-frame img,
.arch-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.arch-frame--video {
  aspect-ratio: 4 / 5;
}

.arch-frame__play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 11, 6, 0.28);
  color: var(--cream);
  cursor: pointer;
  transition: background 0.3s var(--ease);
  border: none;
  padding: 0;
}

.arch-frame__play:hover {
  background: rgba(20, 11, 6, 0.15);
}

.arch-frame__play svg {
  width: 78px;
  height: 78px;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.4));
}

.arch-frame__play[hidden] {
  display: none;
}

.community-strip {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: var(--space-2);
  align-items: center;
  padding: var(--space-2);
  background: rgba(251, 241, 222, 0.05);
  border: 1px solid var(--cream-line);
  border-radius: var(--radius);
  max-width: 640px;
}

.community-strip img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 120px 120px 8px 8px;
}

.community-strip p {
  font-size: 0.95rem;
  opacity: 0.88;
}

/* ---------- Dona Darquinha ---------- */

.founder {
  display: grid;
  grid-template-columns: 0.85fr 1.15fr;
  gap: var(--space-4);
  align-items: center;
}

.founder__portrait {
  position: relative;
}

.founder__portrait .arch-frame {
  border-color: var(--wine);
}

.founder__badge {
  position: absolute;
  bottom: -18px;
  right: -18px;
  background: var(--gold);
  color: var(--ink);
  font-family: var(--font-display);
  font-weight: 700;
  text-align: center;
  border-radius: 50%;
  width: 108px;
  height: 108px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  line-height: 1.1;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
  transform: rotate(-8deg);
}

.founder__badge small {
  font-family: var(--font-body);
  font-weight: 700;
  font-size: 0.6rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.founder__badge strong {
  font-size: 1.5rem;
}

.founder__lead {
  font-family: var(--font-script);
  font-size: clamp(1.5rem, 1.3rem + 1vw, 2rem);
  color: var(--wine);
  line-height: 1.35;
  margin: 0 0 var(--space-2);
}

.founder__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.3rem;
}

.founder__role {
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 0.2rem;
  display: block;
}

.founder__bio {
  margin-top: var(--space-2);
  max-width: 54ch;
  opacity: 0.88;
}

/* ---------- Produtos ---------- */

.products__intro {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-3);
  flex-wrap: wrap;
}

.gallery {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 130px;
  gap: var(--space-1);
}

.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  grid-column: span 2;
  grid-row: span 2;
}

.gallery__item--wide {
  grid-column: span 4;
}

.gallery__item--tall {
  grid-row: span 3;
}

.gallery__item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}

.gallery__item:hover img {
  transform: scale(1.06);
}

.gallery__tag {
  position: absolute;
  left: 0.8rem;
  bottom: 0.8rem;
  background: rgba(42, 23, 16, 0.82);
  color: var(--cream);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.4em 0.8em;
  border-radius: 999px;
}

.families {
  margin-top: var(--space-4);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-2);
}

.family-card {
  border: 1px solid var(--cream-line);
  border-radius: var(--radius);
  padding: var(--space-2);
}

.family-card h3 {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--gold-pale);
}

.family-card p {
  margin-top: 0.5rem;
  font-size: 0.92rem;
  opacity: 0.85;
}

/* ---------- Cestas & Kits ---------- */

.kits {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

.kit-card {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 4 / 5;
}

.kit-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kit-card__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: var(--space-3) var(--space-2) var(--space-2);
  background: linear-gradient(180deg, transparent, rgba(24, 13, 8, 0.92));
  color: var(--cream);
}

.kit-card__overlay h3 {
  font-family: var(--font-display);
  font-size: 1.5rem;
}

.kit-card__overlay p {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  opacity: 0.85;
  max-width: 34ch;
}

/* ---------- Onde encontrar ---------- */

.find {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
  align-items: center;
}

.find__media {
  display: grid;
  gap: var(--space-2);
}

.find__media img:first-child {
  border-radius: var(--radius);
  aspect-ratio: 4/5;
  object-fit: cover;
}

.find__banner {
  border-radius: var(--radius);
  overflow: hidden;
}

.find__banner img {
  aspect-ratio: 4/5;
  object-fit: cover;
  object-position: top;
}

.find__list {
  list-style: none;
  margin: var(--space-2) 0 0;
  padding: 0;
  display: grid;
  gap: var(--space-2);
}

.find__list li {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
}

.find__list svg {
  width: 22px;
  height: 22px;
  flex-shrink: 0;
  color: var(--gold);
  margin-top: 0.2rem;
}

.find__list h4 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 600;
}

.find__list p {
  font-size: 0.92rem;
  opacity: 0.85;
  margin-top: 0.15rem;
}

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

.cta-final {
  background: var(--gold);
  color: var(--ink);
  text-align: center;
  padding-block: var(--space-5);
}

.cta-final h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(2.2rem, 1.8rem + 2vw, 3.4rem);
  max-width: 18ch;
  margin: 0.3rem auto 0;
  line-height: 1.05;
}

.cta-final p {
  margin: var(--space-2) auto 0;
  max-width: 50ch;
  font-size: 1.08rem;
  opacity: 0.85;
}

.cta-final__actions {
  margin-top: var(--space-3);
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.cta-final__note {
  margin-top: var(--space-2);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  opacity: 0.65;
}

/* ---------- Footer ---------- */

.footer {
  background: var(--ink);
  color: var(--cream);
  padding-block: var(--space-4) var(--space-3);
}

.footer__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: var(--space-3);
}

.footer__brand {
  display: flex;
  align-items: center;
  gap: 0.8rem;
}

.footer__brand img {
  height: 46px;
}

.footer__brand span {
  font-family: var(--font-display);
  font-size: 1.1rem;
}

.footer__tagline {
  margin-top: var(--space-2);
  font-family: var(--font-script);
  font-size: 1.3rem;
  color: var(--gold-pale);
}

.footer h5 {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-bottom: 0.9rem;
}

.footer ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.6rem;
  font-size: 0.92rem;
  opacity: 0.9;
}

.footer__bottom {
  margin-top: var(--space-4);
  padding-top: var(--space-2);
  border-top: 1px solid var(--cream-line);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.8rem;
  font-size: 0.78rem;
  opacity: 0.6;
}

/* ---------- WhatsApp floating button ---------- */

.whatsapp-fab {
  position: fixed;
  right: var(--space-2);
  bottom: var(--space-2);
  z-index: 90;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: #1e8a5c;
  color: #fff;
  padding: 0.85em 1.2em;
  border-radius: 999px;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.3);
  font-size: 0.88rem;
  font-weight: 600;
  transition: transform 0.25s var(--ease);
}

.whatsapp-fab:hover {
  transform: translateY(-3px);
}

.whatsapp-fab svg {
  width: 22px;
  height: 22px;
}

/* ---------- Responsive ---------- */

@media (max-width: 980px) {
  .historia__grid,
  .founder,
  .find {
    grid-template-columns: 1fr;
  }
  .founder__portrait {
    max-width: 360px;
    margin-inline: auto;
  }
  .founder__badge {
    right: 50%;
    transform: translateX(120px) rotate(-8deg);
  }
  .families {
    grid-template-columns: 1fr;
  }
  .kits {
    grid-template-columns: 1fr;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .gallery {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 150px;
  }
  .gallery__item,
  .gallery__item--wide {
    grid-column: span 2;
  }
  .trust__row {
    gap: var(--space-2) var(--space-3);
  }
  .footer__grid {
    grid-template-columns: 1fr;
  }
  .whatsapp-fab span {
    display: none;
  }
  .whatsapp-fab {
    padding: 0.85em;
  }
}
