/* =====================================================================
   CATÁLOGO — recodificado pra conversar com as outras páginas.
   Herda tokens + base do tema (nada de redeclarar body/:root). Mesma
   atmosfera navy + grão, eyebrow com ponto, cards e pílulas do padrão,
   laranja racionado, clímax no fecho.
   ===================================================================== */

.yep-catalogo { position: relative; isolation: isolate; background: var(--bg-1); }

/* grão de risografia sutil sobre a página inteira (continuidade de regime) */
.yep-catalogo::before {
  content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  opacity: .045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.yep-catalogo > * { position: relative; z-index: 1; }

/* ---------------- HERO ---------------- */
.yep-catalogo .hero {
  position: relative; overflow: hidden;
  padding: clamp(6.5rem,14vh,9rem) 0 clamp(3rem,6vh,4.5rem);
  background: radial-gradient(120% 85% at 50% -8%, #1d1d33 0%, #1A1A2E 42%, #121221 100%);
}
.yep-catalogo .hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(54% 40% at 50% 118%, rgba(221,57,21,.16) 0%, rgba(221,57,21,.05) 38%, transparent 66%),
    radial-gradient(40% 32% at 12% 4%, rgba(92,93,163,.16) 0%, transparent 60%);
}
.yep-catalogo .hero .wrap { position: relative; }
.yep-catalogo .hero-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: clamp(2rem,5vw,4rem); align-items: end; }
.eyebrow .ic { width: 15px; height: 15px; color: var(--laranja); display: inline-block; }
.eyebrow .ic svg { width: 100%; height: 100%; display: block; }
.yep-catalogo .hero h1 {
  font-size: clamp(2.7rem,6.4vw,5.4rem); font-weight: 800; line-height: .98;
  letter-spacing: -.04em; margin: clamp(1.4rem,3vw,2.2rem) 0 0; color: var(--off);
}
.yep-catalogo .hero h1 .ac { color: var(--laranja); }
.yep-catalogo .hero-right { padding-bottom: .5rem; }
.yep-catalogo .hero-right p { font-size: clamp(1rem,1.3vw,1.16rem); color: var(--txt-dim); line-height: 1.7; font-weight: 450; }
.yep-catalogo .hero-stats { display: flex; gap: clamp(2rem,5vw,3.5rem); margin-top: clamp(2.6rem,5vh,4rem); flex-wrap: wrap; }
.hs .n { font-size: clamp(2.8rem,5vw,3.8rem); font-weight: 800; letter-spacing: -.04em; line-height: .9; color: var(--off); font-variant-numeric: tabular-nums; }
.hs .n.o { color: var(--laranja); }
.hs .n.p { color: var(--roxo); }
.hs .l { font-size: .82rem; color: var(--txt-dimmer); margin-top: 10px; letter-spacing: .01em; max-width: 22ch; }

/* ---------------- INTRO ---------------- */
.intro { padding: clamp(3.5rem,8vh,6rem) 0 clamp(1rem,2vh,1.5rem); }
.intro-inner { max-width: 760px; }
.intro h2 { font-size: clamp(1.7rem,3.4vw,2.6rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.1; margin-bottom: 24px; color: var(--off); }
.intro p { font-size: 1.06rem; color: var(--txt-dim); line-height: 1.8; margin-bottom: 18px; }
.intro p strong { color: var(--off); font-weight: 600; }

/* ---------------- ÁREAS + NAVEGAÇÃO LATERAL FIXA (rail com scrollspy) ---------------- */
.areas { padding: clamp(2.5rem,5vh,4rem) 0 2rem; }
.areas-grid { display: grid; grid-template-columns: 250px minmax(0,1fr); gap: clamp(2rem,4vw,3.6rem); align-items: start; }
.cat-content { min-width: 0; }

/* rail: gruda abaixo do header fixo e rastreia a área visível */
.cat-rail { position: sticky; top: 88px; align-self: start; z-index: 30; }
.cat-rail__inner { display: flex; flex-direction: column; gap: 14px; max-height: calc(100svh - 110px); }

.search { position: relative; flex: none; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 15px; height: 15px; color: var(--txt-dimmer); pointer-events: none; }
.search input { width: 100%; background: var(--card); border: 1px solid var(--line-2); color: var(--txt); border-radius: 12px; padding: 11px 14px 11px 38px; font-size: 14px; font-family: inherit; outline: none; transition: border-color var(--dur-fast); }
.search input:focus { border-color: var(--roxo); }
.search input::placeholder { color: var(--txt-dimmer); }

.cat-nav { display: flex; flex-direction: column; gap: 1px; overflow-y: auto; min-height: 0; padding-right: 4px; scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
.cat-nav::-webkit-scrollbar { width: 5px; }
.cat-nav::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; }
.cat-link {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; position: relative;
  padding: 9px 12px; border-radius: 10px; border: none; background: transparent; cursor: pointer;
  color: var(--txt-dim); font-family: inherit; font-size: .9rem; font-weight: 500; text-align: left; line-height: 1.3;
  transition: background var(--dur-fast), color var(--dur-fast);
}
.cat-link:hover { background: rgba(244,244,242,.05); color: var(--off); }
.cat-link.active { background: rgba(232,85,46,.1); color: var(--off); font-weight: 600; }
.cat-link.active::before { content: ""; position: absolute; left: 0; top: 50%; transform: translateY(-50%); width: 3px; height: 18px; border-radius: 99px; background: var(--laranja); }
.cat-link__count { flex: none; font-size: .76rem; color: var(--txt-dimmer); font-variant-numeric: tabular-nums; }
.cat-link.active .cat-link__count { color: var(--laranja); }

.area { margin-bottom: clamp(3rem,6vh,4.5rem); scroll-margin-top: 96px; }
.area-head { display: flex; align-items: flex-start; gap: 18px; margin-bottom: 32px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.area-head .ic {
  width: 42px; height: 42px; border-radius: 13px; flex-shrink: 0; color: var(--laranja);
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(150deg, rgba(232,85,46,.18), rgba(92,93,163,.12)); border: 1px solid var(--line-2);
}
.area-head .ic svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.area-head .kicker { font-size: 11px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--roxo); margin-bottom: 8px; }
.area-head h3 { font-size: clamp(1.5rem,2.6vw,2.1rem); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; color: var(--off); }
.area-head .sub { font-size: .96rem; color: var(--txt-dim); margin-top: 9px; max-width: 60ch; line-height: 1.6; }
.area-head .count { margin-left: auto; font-size: .8rem; color: var(--txt-dimmer); background: var(--card); border: 1px solid var(--line-2); border-radius: 99px; padding: 7px 15px; flex-shrink: 0; white-space: nowrap; font-variant-numeric: tabular-nums; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px,1fr)); gap: 18px; }
.fcard {
  background: linear-gradient(165deg, var(--card), var(--card-2)); border: 1px solid var(--line);
  border-radius: 18px; padding: 26px 26px 22px; display: flex; flex-direction: column; position: relative; overflow: hidden;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.fcard::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: linear-gradient(90deg, var(--laranja), transparent); opacity: 0; transition: opacity .2s; }
.fcard:hover { transform: translateY(-3px); border-color: var(--line-2); box-shadow: 0 18px 50px rgba(0,0,0,.45); }
.fcard:hover::before { opacity: 1; }
.fcard h4 { font-size: 1.12rem; font-weight: 700; letter-spacing: -.02em; line-height: 1.25; margin-bottom: 13px; color: var(--off); }
.fcard .what { font-size: .95rem; color: var(--txt-dim); line-height: 1.62; margin-bottom: 18px; }
.fcard .value { font-size: .92rem; color: var(--txt); background: rgba(232,85,46,.07); border: 1px solid rgba(232,85,46,.16); border-radius: 12px; padding: 13px 15px; line-height: 1.55; margin-bottom: 16px; }
.fcard .value .lab { display: block; font-size: 9.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--laranja); margin-bottom: 6px; }
.fcard .ex { font-size: .86rem; color: var(--txt-dimmer); line-height: 1.6; display: flex; gap: 9px; margin-top: auto; }
.fcard .ex .q { color: var(--roxo); flex-shrink: 0; font-weight: 700; font-size: 1.1rem; line-height: 1.2; }

/* reveal suave das áreas no scroll (o catalogo.js adiciona .cat-reveal e .in) */
.area.cat-reveal { opacity: 0; transform: translateY(18px); transition: opacity .55s var(--ease), transform .55s var(--ease); }
.area.cat-reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .area.cat-reveal { opacity: 1; transform: none; transition: none; } }

.noresults { text-align: center; padding: 90px 20px; color: var(--txt-dimmer); }
.noresults strong { display: block; color: var(--txt-dim); font-size: 1.2rem; margin-bottom: 8px; font-weight: 600; letter-spacing: -.02em; }

/* ---------------- TECH BEHIND ---------------- */
.tech { padding: 1.5rem 0 clamp(3rem,6vh,4.5rem); }
.tech-inner { background: linear-gradient(155deg, #1a1830, #0e0e1a); border: 1px solid var(--line); border-radius: 26px; padding: clamp(2.4rem,4vw,3.5rem) clamp(1.8rem,3.5vw,3.2rem); }
.tech-inner .eyebrow { margin-bottom: 18px; }
.tech-inner h3 { font-size: clamp(1.5rem,2.6vw,2rem); font-weight: 800; letter-spacing: -.035em; margin-bottom: 16px; line-height: 1.1; color: var(--off); }
.tech-inner p { color: var(--txt-dim); max-width: 64ch; font-size: 1.02rem; line-height: 1.75; margin-bottom: 32px; }
.tech-grid { display: flex; flex-wrap: wrap; gap: 11px; }
.tech-grid .t { background: rgba(12,12,22,.55); border: 1px solid var(--line-2); border-radius: 99px; padding: 10px 18px; font-size: 13.5px; color: var(--txt-dim); display: inline-flex; align-items: center; gap: 9px; }
.tech-grid .t svg { width: 13px; height: 13px; color: var(--verde); flex-shrink: 0; }

/* ---------------- CLÍMAX (fecho quente, como nas outras páginas) ---------------- */
.cta {
  position: relative; overflow: hidden; text-align: center;
  padding: clamp(5rem,11vh,8rem) 0;
  background: radial-gradient(125% 130% at 50% 40%, #FF6A3D 0%, #E8552E 22%, #C5380F 50%, #7E1E0A 78%, #2A1410 100%);
  color: #F8EFEA;
}
.cta::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(40% 36% at 50% 44%, rgba(255,180,120,.5) 0%, rgba(255,140,80,.18) 34%, transparent 64%); }
.cta-inner { position: relative; max-width: 720px; margin: 0 auto; }
.cta h3 { font-size: clamp(1.9rem,4vw,3.2rem); font-weight: 800; letter-spacing: -.04em; line-height: 1.06; margin-bottom: 18px; color: #fff; }
.cta p { color: rgba(248,239,234,.9); font-size: 1.12rem; line-height: 1.6; margin-bottom: 34px; }
.cta .btn { background: #16162A; color: #F8EFEA; box-shadow: 0 0 0 1.5px rgba(255,255,255,.22), 0 18px 50px -12px rgba(0,0,0,.6); }
.cta .btn:hover { background: #1F1F38; transform: translateY(-2px); box-shadow: 0 0 0 1.5px rgba(255,255,255,.3), 0 22px 60px -12px rgba(0,0,0,.7); }
.cta .cta-note { margin: 1rem 0 0; font-size: .9rem; font-weight: 500; color: rgba(248,239,234,.66); }

/* ---------------- responsivo ---------------- */
/* .wrap fluido no catálogo (a base usa 32px fixo, que sufoca no celular) */
.yep-catalogo .wrap { padding: 0 clamp(18px, 5vw, 32px); }

@media (max-width: 980px) {
  /* hero empilha */
  .yep-catalogo .hero-grid { grid-template-columns: 1fr; gap: 1.5rem; align-items: start; }
  .yep-catalogo .hero-right { padding-bottom: 0; }

  /* a nav vira uma barra compacta, sticky ABAIXO do header fixo (não em cima dele).
     display:block (em vez de grid) pra o sticky colar ao longo de TODA a seção —
     num item de grid empilhado o sticky só vale dentro da linha curta dele. */
  .areas-grid { display: block; }
  .cat-rail { position: sticky; top: 72px; z-index: 40; margin: 0 calc(-1 * clamp(18px,5vw,32px)) 1.3rem; }
  .cat-rail__inner {
    flex-direction: row; align-items: center; gap: 10px; max-height: none;
    padding: 11px clamp(18px,5vw,32px); background: rgba(17,17,32,.92);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
  }
  .search { flex: 0 1 200px; min-width: 130px; }
  .cat-nav { flex: 1 1 auto; flex-direction: row; overflow-x: auto; overflow-y: hidden; gap: 6px; padding-right: 0; }
  .cat-nav::-webkit-scrollbar { display: none; }
  .cat-link { flex: none; white-space: nowrap; padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 99px; font-size: .84rem; }
  .cat-link:hover { background: transparent; color: var(--txt-dim); }
  .cat-link.active { border-color: var(--laranja); background: rgba(232,85,46,.14); color: #FF6A3D; }
  .cat-link.active::before { display: none; }
  .cat-link__count { display: none; }
}

@media (max-width: 720px) {
  .cards { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .yep-catalogo .hero { padding-top: clamp(5.5rem, 17vh, 7rem); }
  .yep-catalogo .hero h1 { font-size: clamp(2.1rem, 8.6vw, 2.9rem); }
  .yep-catalogo .hero-stats { gap: 1.3rem 1.8rem; }
  .hs .n { font-size: clamp(2.2rem, 11vw, 2.8rem); }
  .hs .l { font-size: .78rem; }
  .intro h2 { font-size: clamp(1.5rem, 6.4vw, 2rem); }
  .area-head { gap: 13px; }
  .area-head .ic { width: 36px; height: 36px; border-radius: 11px; }
  .area-head .ic svg { width: 18px; height: 18px; }
  .area-head .count { display: none; }
  .fcard { padding: 22px 20px 20px; }
  .tech-inner { padding: 28px 20px; }
}
