/* =========================================================================
   Oficinas — listagem de atividades de contraturno
   Builds on styles.css (shared design system)
   ========================================================================= */

/* ──────────────────────────────────────────────────────────────
   Area accent palette — variants of the brand greens + white.
   ────────────────────────────────────────────────────────────── */
:root {
  --area-esporte: var(--green-deep);
  --area-danca: #04c564;
  --area-arte: var(--green-teal);
  --area-musica: color-mix(in oklab, #04c564 70%, white);
  --area-raciocinio: color-mix(in oklab, #0e544f 40%, white);
  --area-idioma: color-mix(in oklab, #097274 35%, white);
}

/* ──────────────────────────────────────────────────────────────
   HERO — editorial text + tilted scrolling photo marquee
   ────────────────────────────────────────────────────────────── */
.ohero {
  position: relative;
  overflow: hidden;
  padding-top: clamp(140px, 16vh, 200px);
  padding-bottom: clamp(56px, 7vw, 96px);
  background: linear-gradient(180deg, #f7fbf9 0%, #ecf3f0 45%, #e4ede9 100%);
}
.ohero-bg-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  pointer-events: none;
  z-index: 0;
}
.ohero-bg-orb--a {
  width: 560px; height: 560px;
  top: -140px; right: -80px;
  background: radial-gradient(circle, rgba(5, 196, 100, 0.4) 0%, transparent 70%);
}
.ohero-bg-orb--b {
  width: 500px; height: 500px;
  bottom: -180px; left: -120px;
  background: radial-gradient(circle, rgba(9, 114, 116, 0.32) 0%, transparent 70%);
}
.ohero-bg-grid {
  position: absolute;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(14, 84, 79, 0.04) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(14, 84, 79, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 70% 60% at 72% 45%, black 0%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 70% 60% at 72% 45%, black 0%, transparent 78%);
  pointer-events: none;
}

.ohero .container { position: relative; z-index: 1; }

.ohero-inner {
  display: grid;
  grid-template-columns: 1.04fr 1fr;
  gap: clamp(36px, 5vw, 80px);
  align-items: center;
}
@media (max-width: 980px) { .ohero-inner { grid-template-columns: 1fr; gap: 48px; } }

.ohero-text { display: flex; flex-direction: column; gap: 26px; }

.ohero-title {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(44px, 6vw, 88px);
  line-height: 0.97;
  letter-spacing: -0.026em;
  color: var(--fg);
  margin: 4px 0 0;
  text-wrap: balance;
}
body[data-typo="serif"] .ohero-title { font-weight: 400; letter-spacing: -0.02em; }
.ohero-title em {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-weight: 300;
  color: var(--green-teal);
}

.ohero-body {
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.62;
  color: var(--fg-2);
  max-width: 52ch;
}

.ohero-stats {
  display: flex;
  gap: clamp(22px, 3vw, 44px);
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 24px;
  margin-top: 4px;
}
.ohero-stat { display: flex; flex-direction: column; gap: 4px; }
.ohero-stat .num {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(30px, 3vw, 42px);
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--green-deep);
}
body[data-typo="serif"] .ohero-stat .num { font-weight: 400; font-family: "Newsreader", serif; }
.ohero-stat .lbl {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

/* Tilted marquee */
.ohero-marquee {
  position: relative;
  height: clamp(440px, 56vw, 600px);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  transform: translateY(var(--parallax-y, 0)) perspective(1600px) rotateY(-7deg) rotateX(3deg) rotate(1deg);
  transform-origin: center;
  will-change: transform;
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 88%, transparent 100%);
  mask-image: linear-gradient(180deg, transparent 0%, black 12%, black 88%, transparent 100%);
}
@media (max-width: 600px) {
  .ohero-marquee { grid-template-columns: repeat(2, 1fr); height: 460px; }
  .ohero-marquee .ohero-col:nth-child(3) { display: none; }
}

.ohero-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: mq-up 34s linear infinite;
}
.ohero-col--down { animation-name: mq-down; animation-duration: 40s; }
.ohero-col--slow { animation-duration: 46s; }
.ohero-marquee:hover .ohero-col { animation-play-state: paused; }

@keyframes mq-up {
  from { transform: translateY(0); }
  to   { transform: translateY(-50%); }
}
@keyframes mq-down {
  from { transform: translateY(-50%); }
  to   { transform: translateY(0); }
}

.otile {
  position: relative;
  flex: 0 0 auto;
  border-radius: 14px;
  overflow: hidden;
  background: var(--green-paler);
  box-shadow: 0 16px 34px -18px rgba(14, 84, 79, 0.4);
  isolation: isolate;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.otile .ph { border-radius: 0; }
.otile img, .otile .ph {
  transition: filter 0.5s var(--ease), transform 0.6s var(--ease);
}
.otile img { filter: grayscale(0.5) contrast(1.02); }
.otile:hover {
  transform: scale(1.04);
  box-shadow: 0 26px 50px -18px rgba(14, 84, 79, 0.5);
  z-index: 5;
}
.otile:hover img { filter: grayscale(0) contrast(1); }
.otile::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 42%, rgba(8, 38, 34, 0.78) 100%);
  z-index: 2;
}
.otile-cap {
  position: absolute;
  left: 14px; right: 14px; bottom: 12px;
  z-index: 3;
  color: var(--cream);
}
.otile-cap .nm {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.01em;
  line-height: 1.1;
}
.otile-cap .ar {
  font-family: var(--font-mono);
  font-size: 9.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(243, 239, 228, 0.72);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
}
.otile-cap .ar::before {
  content: "";
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--area-c, var(--green-bright));
}

@media (prefers-reduced-motion: reduce) {
  .ohero-col { animation: none; }
  .ohero-marquee {
    -webkit-mask-image: none; mask-image: none;
    height: auto; overflow: hidden;
    transform: none;
  }
  .ohero-col { gap: 16px; }
}

/* ──────────────────────────────────────────────────────────────
   INTRO — editorial band + áreas overview
   ────────────────────────────────────────────────────────────── */
.ointro { padding: clamp(64px, 8vw, 120px) 0 clamp(40px, 5vw, 72px); }

.ointro-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
@media (max-width: 900px) { .ointro-grid { grid-template-columns: 1fr; gap: 32px; } }

.ointro-meta {
  position: sticky;
  top: 124px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
@media (max-width: 900px) { .ointro-meta { position: static; } }

.ointro-title { line-height: 43px; }
@media (max-width: 900px) { .ointro-title { line-height: 34px; } }

.ointro-body p {
  font-size: clamp(16.5px, 1.25vw, 19px);
  line-height: 1.64;
  color: var(--fg-2);
  margin-bottom: 1.1em;
  max-width: 60ch;
}
.ointro-body p strong { color: var(--green-deep); font-weight: 600; }

.wpp-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: clamp(16px, 1.8vw, 22px);
  margin-top: 38px;
  padding: clamp(18px, 2vw, 24px) clamp(20px, 2.2vw, 26px);
  border-radius: 20px;
  background:
    radial-gradient(120% 160% at 100% 0%, rgba(5, 196, 100, 0.16) 0%, transparent 55%),
    var(--green-deep);
  color: #eef4f1;
  position: relative;
  isolation: isolate;
  overflow: hidden;
  box-shadow: 0 20px 44px -26px rgba(14, 84, 79, 0.65);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease);
}
.wpp-cta::after {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 180px; height: 180px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.08);
  z-index: -1;
}
.wpp-cta:hover {
  transform: translateY(-3px);
  box-shadow: 0 30px 64px -28px rgba(14, 84, 79, 0.8);
}

.wpp-cta__icon {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 16px;
  background: var(--green-bright);
  color: var(--text-inverse);
  display: grid;
  place-items: center;
  flex-shrink: 0;
  box-shadow: 0 8px 20px -8px rgba(5, 196, 100, 0.55);
}
.wpp-cta__pulse {
  position: absolute;
  top: -3px; right: -3px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--green-bright);
  border: 2.5px solid var(--green-deep);
}
.wpp-cta__pulse::before {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  background: rgba(5, 196, 100, 0.55);
  z-index: -1;
  animation: wppPulse 2.2s ease-out infinite;
}
@keyframes wppPulse {
  0% { transform: scale(0.7); opacity: 0.8; }
  100% { transform: scale(2.2); opacity: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .wpp-cta__pulse::before { animation: none; }
}

.wpp-cta__body { flex: 1 1 230px; min-width: 0; }
.wpp-cta__label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green-bright);
}
.wpp-cta__desc {
  display: block;
  margin-top: 6px;
  font-size: 15px;
  line-height: 1.5;
  color: #cdddd6;
  max-width: 46ch;
  text-wrap: pretty;
}

.wpp-cta__action {
  display: flex;
  align-items: center;
  gap: clamp(14px, 1.6vw, 20px);
  flex: 0 0 auto;
  padding-left: clamp(14px, 1.6vw, 22px);
  border-left: 1px solid rgba(255, 255, 255, 0.14);
}
.wpp-cta__num {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.wpp-cta__num-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #8fb3aa;
}
.wpp-cta__num-val {
  font-size: clamp(18px, 1.5vw, 21px);
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #ffffff;
  white-space: nowrap;
}

.wpp-cta__arrow {
  width: 40px; height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #eef4f1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}
.wpp-cta:hover .wpp-cta__arrow {
  background: var(--green-bright);
  color: var(--text-inverse);
  transform: translateX(3px);
}

@media (max-width: 620px) {
  .wpp-cta__action {
    flex: 1 1 100%;
    justify-content: space-between;
    padding-left: 0;
    padding-top: 16px;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
}

/* ──────────────────────────────────────────────────────────────
   FILTER bar — sticky, by área
   ────────────────────────────────────────────────────────────── */
.ofilter {
  position: sticky;
  top: 85px;
  z-index: 45;
  padding: 18px 0;
  background: rgba(250, 250, 247, 0.9);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.ofilter-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.ofilter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

/* Mobile: mesmo formato de aprbar/aprchips (aprovados.html) —
   sem sticky, chips passam para o lado em vez de quebrar linha. */
@media (max-width: 640px) {
  .ofilter { position: static; top: auto; }
  .ofilter-inner { flex-direction: column; align-items: stretch; gap: 10px; }
  .ofilter-chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; width: 100%; }
  .ofilter-chips::-webkit-scrollbar { display: none; }
}
.area-chip {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 500;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--line-strong);
  background: var(--bg);
  color: var(--fg-2);
  cursor: pointer;
  transition: all 0.22s var(--ease);
  white-space: nowrap;
}
.area-chip .swatch {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--area-c, var(--green-teal));
  transition: transform 0.22s var(--ease);
}
.area-chip:hover { border-color: var(--green-deep); color: var(--green-deep); transform: translateY(-1px); }
.area-chip:hover .swatch { transform: scale(1.3); }
.area-chip.is-active {
  background: var(--green-deep);
  border-color: var(--green-deep);
  color: var(--cream);
}
.area-chip.is-active .swatch { box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.18); }
.area-chip-count {
  font-family: var(--font-mono);
  font-size: 10px;
  background: var(--green-paler);
  color: var(--green-deep);
  padding: 2px 7px;
  border-radius: 999px;
}
.area-chip.is-active .area-chip-count { background: rgba(255, 255, 255, 0.18); color: var(--cream); }

.ofilter-meta {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.ofilter-meta strong { color: var(--green-deep); font-weight: 600; }

/* ──────────────────────────────────────────────────────────────
   GRID — oficina cards
   ────────────────────────────────────────────────────────────── */
.ogrid-section { padding: clamp(44px, 5vw, 76px) 0 clamp(80px, 9vw, 128px); }

.ogrid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(22px, 2.6vw, 40px) clamp(20px, 2.4vw, 34px);
}
@media (max-width: 1000px) { .ogrid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px)  { .ogrid { grid-template-columns: 1fr; } }

.ocard {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.ocard-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius-lg);
  overflow: hidden;
  isolation: isolate;
  background: var(--green-paler);
}
.ocard-photo .ph {
  position: absolute;
  inset: 0;
  border-radius: 0;
}
.ocard-photo .ph,
.ocard-photo img {
  transition: transform 0.8s var(--ease), filter 0.6s var(--ease);
}
.ocard-photo img { filter: grayscale(1) contrast(1.03); }
.ocard:hover .ocard-photo .ph,
.ocard:hover .ocard-photo img { transform: scale(1.07); }
.ocard:hover .ocard-photo img { filter: grayscale(0) contrast(1); }

/* area-tinted glow that blooms on hover */
.ocard-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: radial-gradient(ellipse 80% 60% at 50% 120%, var(--area-c, var(--green-bright)), transparent 70%);
  opacity: 0;
  mix-blend-mode: soft-light;
  transition: opacity 0.5s var(--ease);
  pointer-events: none;
}
.ocard:hover .ocard-photo::before { opacity: 0.85; }

.ocard-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  background: linear-gradient(180deg, transparent 48%, rgba(8, 38, 34, 0.55) 100%);
  opacity: 0;
  transition: opacity 0.45s var(--ease);
  pointer-events: none;
}
.ocard:hover .ocard-photo::after { opacity: 1; }

.ocard-tag {
  position: absolute;
  top: 16px; left: 16px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--green-deep);
  backdrop-filter: blur(8px);
  box-shadow: 0 4px 14px -6px rgba(14, 84, 79, 0.3);
}
.ocard-tag .swatch {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--area-c, var(--green-bright));
}

.ocard-index {
  position: absolute;
  top: 16px; right: 18px;
  z-index: 3;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.06em;
  color: var(--cream);
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.4s var(--ease);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}
.ocard:hover .ocard-index { opacity: 0.85; transform: translateY(0); }

/* turmas chips revealed over photo bottom */
.ocard-turmas-over {
  position: absolute;
  left: 16px; right: 16px; bottom: 16px;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  opacity: 0;
  transform: translateY(10px);
  transition: all 0.45s var(--ease);
  pointer-events: none;
}
.ocard:hover .ocard-turmas-over { opacity: 1; transform: translateY(0); }
.turma-chip {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.05em;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(243, 239, 228, 0.16);
  border: 1px solid rgba(243, 239, 228, 0.34);
  color: var(--cream);
  backdrop-filter: blur(6px);
}

.ocard-body { display: flex; flex-direction: column; gap: 9px; padding: 0 2px; }

.ocard-area {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--green-teal);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ocard-area .dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--area-c, var(--green-bright));
}

.ocard-title {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 1.8vw, 27px);
  line-height: 1.08;
  letter-spacing: -0.018em;
  color: var(--fg);
  transition: color 0.3s;
}
body[data-typo="serif"] .ocard-title { font-weight: 500; letter-spacing: -0.012em; }
.ocard:hover .ocard-title { color: var(--green-deep); }

.ocard-turmas {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.ocard-turmas .t {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  color: var(--green-deep);
  background: var(--green-paler);
  padding: 4px 9px;
  border-radius: 6px;
}

.ocard-desc {
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--fg-2);
  max-width: 42ch;
}

/* empty state */
.ogrid-empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--muted);
}
.ogrid-empty h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 24px;
  color: var(--fg);
  margin-bottom: 8px;
}

/* ──────────────────────────────────────────────────────────────
   CLOSING — green band
   ────────────────────────────────────────────────────────────── */
.oclosing {
  position: relative;
  overflow: hidden;
  background: var(--green-deep);
  color: var(--cream);
  padding: clamp(76px, 9vw, 130px) 0;
  text-align: center;
}
.oclosing::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 55% at 50% 40%, rgba(5, 196, 100, 0.18), transparent 62%),
    repeating-linear-gradient(135deg, transparent 0 28px, rgba(255, 255, 255, 0.025) 28px 29px);
  pointer-events: none;
}
.oclosing-orb {
  position: absolute;
  width: 520px; height: 520px;
  border-radius: 50%;
  filter: blur(90px);
  background: radial-gradient(circle, rgba(5, 196, 100, 0.3), transparent 65%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%) translateY(var(--parallax-y, 0));
  pointer-events: none;
}
.oclosing-inner {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 var(--container-px);
}
.oclosing h2 {
  color: var(--cream);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.022em;
  margin: 18px 0 22px;
}
body[data-typo="serif"] .oclosing h2 { font-weight: 400; letter-spacing: -0.016em; }
.oclosing h2 em {
  font-family: "Newsreader", serif;
  font-style: italic;
  font-weight: 300;
  color: var(--green-bright);
}
.oclosing p {
  color: rgba(243, 239, 228, 0.85);
  font-size: clamp(15px, 1.2vw, 17.5px);
  line-height: 1.65;
  max-width: 56ch;
  margin: 0 auto 16px;
}
.oclosing .cta-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 32px;
}
