/* concursos.merianlabs.com: the rua de cima composition (scene beside the
   headline, mats holding fading cards, icon tiles, split FAQ, footer columns)
   adapted to a WhatsApp product. Shared tokens come from merian.css. */

:root {
  /* WhatsApp's own surfaces, so the phone reads as the real app. */
  --wa-chat: light-dark(#efeae2, #0b141a);
  --wa-dot: light-dark(rgb(0 0 0 / 4%), rgb(255 255 255 / 3%));
  --wa-bar: light-dark(#f6f5f3, #1f2c34);
  --wa-in: light-dark(#ffffff, #202c33);
  --wa-out: light-dark(#d9fdd3, #005c4b);
  --wa-ink: light-dark(#111b21, #e9edef);
  --wa-meta: light-dark(#667781, #8696a0);
  --wa-read: light-dark(#53bdeb, #53bdeb);
  --wa-link: light-dark(#027eb5, #53bdeb);
  --wa-accent: light-dark(#008069, #00a884);
  --phone-frame: light-dark(#1b1c1e, #3a3b3e);
  --shadow-overlay: 0 0 0 1px var(--ring), 0 1px 3px var(--shade-soft), 0 12px 28px -14px var(--shade-cast);
  --shadow-phone: 0 0 0 1px var(--ring), 0 2px 6px var(--shade-soft), 0 30px 60px -30px var(--shade-cast);
}

/* rua de cima's buttons are pills. */
.button { border-radius: 999px; }

.icon { width: 1.125rem; height: 1.125rem; flex: none; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.icon.small { width: 0.875rem; height: 0.875rem; }

/* Bar: mark and wordmark, a quiet link and the pill call to action. */
.brand { display: inline-flex; align-items: baseline; gap: 0.3rem; font-size: 0.9375rem; text-decoration: none; color: var(--ink); font-weight: 480; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand .brand-name { color: var(--brand); }
.bar .page { height: 3rem; }
.bar .button.small { height: 2rem; padding: 0 0.75rem; font-size: 0.8125rem; }
.bar-links { display: flex; align-items: center; gap: 1.5rem; }
.bar-links a:not(.button) { color: var(--ink-2); text-decoration: none; font-size: 0.875rem; }
.bar-links a:not(.button):hover { color: var(--ink); }
@media (max-width: 43.75rem) { .bar-links a:not(.button) { display: none; } }
.brand, .bar .button { white-space: nowrap; }
@media (max-width: 26rem) { .bar .brand-name { display: none; } .hero-form > .icon { display: none; } .hero-form { padding-left: 1.125rem; } }

/* Hero: the pill field takes the WhatsApp number in one step. */
.hero { padding-top: 3rem; }
@media (min-width: 60rem) { .hero { padding-top: 4.5rem; grid-template-columns: 1fr 1.3fr; gap: 3.5rem; } }
.hero-form { display: flex; align-items: center; gap: 0.5rem; max-width: 28rem; padding: 0.3125rem 0.3125rem 0.3125rem 1rem; border-radius: 999px; background: var(--surface-muted); }
.hero-form .icon { color: var(--ink-3); }
.hero-form input { flex: 1; min-width: 0; height: 2.5rem; border: 0; background: transparent; color: var(--ink); font: inherit; outline: none; }
.hero-form input::placeholder { color: var(--ink-3); }
.hero-form:focus-within { box-shadow: 0 0 0 2px var(--brand); }
.hero-form .button { height: 2.5rem; }
.hero-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem; }
.hero-links a { display: inline-flex; align-items: center; gap: 0.375rem; text-decoration: none; font-size: 0.875rem; }
.trust { display: flex; flex-wrap: wrap; gap: 0.25rem 0.5rem; color: var(--ink-3); font-size: 0.8125rem; }
.trust span + span::before { content: '·'; margin-right: 0.5rem; }
.hero-done { display: none; max-width: 28rem; padding: 0.875rem 1.125rem; border-radius: var(--radius-xl); background: var(--brand-wash); color: var(--brand-ink); }
.hero-done a { color: var(--brand-ink); font-weight: 480; }
.hero-failed { display: none; color: var(--alert); font-size: 0.875rem; }

/* The scene: a phone on a soft stage, with a report card floating over it. */
.scene { position: relative; display: grid; place-items: center; padding: 2.5rem 1rem; border-radius: var(--radius-2xl); overflow: hidden;
  background:
    radial-gradient(60% 55% at 70% 20%, var(--brand-wash), transparent 70%),
    radial-gradient(50% 50% at 15% 90%, color-mix(in oklab, var(--brand-wash) 70%, transparent), transparent 70%),
    var(--surface-muted); }
.scene-card { display: grid; gap: 0.75rem; width: min(17.5rem, 100%); padding: 1rem 1.125rem; border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-overlay); }
.scene-card-head { display: flex; justify-content: space-between; align-items: baseline; gap: 0.75rem; }
.scene-figures { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.scene-figures .t-figure span { font-size: 0.62em; color: var(--ink-3); letter-spacing: 0; }
.tag { padding: 0.0625rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); color: var(--ink-3); font-size: 0.6875rem; white-space: nowrap; }
@media (min-width: 60rem) {
  .scene { min-height: 44rem; justify-items: end; padding: 2.5rem 3rem; }
  .scene-card { position: absolute; left: 1.5rem; bottom: 2.5rem; z-index: 2; width: 14.5rem; }
}
@media (max-width: 59.99rem) { .scene { gap: 1.25rem; } }

/* Phone and WhatsApp chat. */
.phone { width: min(18.75rem, 100%); padding: 0.5rem; border-radius: 2.75rem; background: var(--phone-frame); box-shadow: var(--shadow-phone); }
.wa { display: flex; flex-direction: column; height: 38rem; border-radius: 2.25rem; overflow: hidden; color: var(--wa-ink); font-size: 0.78rem; line-height: 1.35; letter-spacing: 0;
  background-color: var(--wa-chat);
  background-image: radial-gradient(var(--wa-dot) 1px, transparent 1.2px);
  background-size: 14px 14px; }
.wa-status { display: flex; justify-content: space-between; align-items: center; padding: 0.625rem 1.5rem 0.25rem; background: var(--wa-bar); font-size: 0.75rem; font-weight: 600; }
.wa-status i { width: 5.5rem; height: 1.375rem; border-radius: 999px; background: var(--phone-frame); }
.wa-status b { display: inline-flex; gap: 0.25rem; align-items: center; font-weight: 600; }
.wa-status b::after { content: ''; width: 1.25rem; height: 0.625rem; border-radius: 3px; border: 1.5px solid currentColor; box-shadow: inset 0.75rem 0 0 currentColor; }
.wa-head { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 0.75rem 0.625rem 0.5rem; background: var(--wa-bar); border-bottom: 1px solid color-mix(in oklab, var(--wa-meta) 18%, transparent); }
.wa-head .icon { color: var(--wa-link); }
.wa-avatar { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--brand); color: var(--brand-contrast); }
.wa-avatar .icon { color: inherit; width: 1rem; height: 1rem; stroke-width: 2.25; }
.wa-who { display: grid; line-height: 1.2; }
.wa-who strong { display: inline-flex; align-items: center; gap: 0.25rem; font-weight: 600; font-size: 0.8125rem; }
.wa-who strong .icon { color: var(--wa-accent); width: 0.8125rem; height: 0.8125rem; }
.wa-who span { color: var(--wa-meta); font-size: 0.6875rem; }
.wa-body { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; gap: 0.3125rem; padding: 0.625rem 0.625rem 0.5rem; overflow: hidden; }
.wa-day { align-self: center; padding: 0.1875rem 0.5rem; border-radius: 0.5rem; background: var(--wa-in); color: var(--wa-meta); font-size: 0.6875rem; box-shadow: 0 1px 0.5px rgb(0 0 0 / 10%); }
.bubble { max-width: 88%; padding: 0.375rem 0.5rem 0.3125rem 0.5625rem; border-radius: 0.5rem; background: var(--wa-in); box-shadow: 0 1px 0.5px rgb(0 0 0 / 13%); }
.bubble.out { align-self: flex-end; background: var(--wa-out); }
.bubble p + p { margin-top: 0.375rem; }
.bubble b { font-weight: 600; }
.bubble .meta { color: var(--wa-meta); }
.bubble time { float: right; display: inline-flex; align-items: center; gap: 0.1875rem; margin: 0.3125rem 0 -0.125rem 0.625rem; color: var(--wa-meta); font-size: 0.625rem; }
.bubble time .icon { color: var(--wa-read); width: 0.875rem; height: 0.875rem; stroke-width: 2; }
.voice { display: flex; align-items: center; gap: 0.5rem; width: 12rem; }
.voice .icon { color: var(--wa-meta); fill: currentColor; stroke: none; }
.wave { flex: 1; height: 1.25rem; background: repeating-linear-gradient(90deg, var(--wa-meta) 0 2px, transparent 2px 4px); mask: radial-gradient(60% 45% at 50% 50%, black 40%, transparent 100%), linear-gradient(black, black); mask-size: 100% 100%; opacity: 0.55; border-radius: 2px; }
.wa-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 0.25rem; max-width: 88%; width: 88%; margin-top: -0.125rem; }
.wa-actions span { padding: 0.4375rem; border-radius: 0.5rem; background: var(--wa-in); color: var(--wa-link); text-align: center; font-weight: 500; box-shadow: 0 1px 0.5px rgb(0 0 0 / 13%); }
.wa-input { display: flex; align-items: center; gap: 0.5rem; padding: 0.375rem 0.625rem 1rem; background: var(--wa-bar); }
.wa-input span { flex: 1; padding: 0.4375rem 0.75rem; border-radius: 999px; background: var(--wa-in); color: var(--wa-meta); }
.wa-input i { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--wa-accent); color: #fff; }
.wa-input i .icon { width: 0.9375rem; height: 0.9375rem; }

/* The conversation plays out once, like rua de cima's markers. */
@media (prefers-reduced-motion: no-preference) {
  .scene .phone { animation: rise 600ms var(--ease) both; }
  .scene [data-step] { animation: pop 450ms var(--ease) both; }
  .scene [data-step='1'] { animation-delay: 500ms; }
  .scene [data-step='2'] { animation-delay: 1700ms; }
  .scene [data-step='3'] { animation-delay: 2600ms; }
  .scene [data-step='4'] { animation-delay: 3200ms; }
  .scene-card { animation: rise 600ms var(--ease) 900ms both; }
}
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(0.98); } }

/* Mats: a grey panel with a label and a figure, holding a white card that fades out. */
.bento { display: grid; gap: 1.25rem; }
@media (min-width: 60rem) {
  .bento { grid-template-columns: 1.35fr 1fr; }
  .bento > :nth-child(3) { grid-column: 1; }
  .bento.flip { grid-template-columns: 1fr 1.35fr; }
}
.mat { display: grid; grid-template-rows: auto 1fr; gap: 1.25rem; padding: 1.5rem 1.5rem 0; border-radius: var(--radius-2xl); background: var(--surface-muted); overflow: hidden; }
.mat-head { display: grid; gap: 0.125rem; }
.mat-head .t-figure span { font-size: 0.62em; color: var(--ink-3); letter-spacing: 0; }
.mat-card { display: grid; gap: 0.75rem; align-content: start; max-height: 17.5rem; padding: 1.125rem 1.25rem; border-radius: var(--radius-xl) var(--radius-xl) 0 0; background: var(--surface); box-shadow: var(--shadow-raised); overflow: hidden;
  mask-image: linear-gradient(to bottom, black 72%, transparent); }
.mat-card.chat { display: flex; flex-direction: column; align-items: flex-start; background: var(--wa-chat); color: var(--wa-ink); font-size: 0.8125rem; line-height: 1.35; letter-spacing: 0; gap: 0.375rem; mask-image: none; }
.mat-card.chat .bubble { max-width: 92%; }
.mat-card.chat .bubble.out { align-self: flex-end; }
.rows { display: grid; }
.row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5625rem 0; border-bottom: 1px solid var(--line); font-size: 0.875rem; }
.row:last-child { border-bottom: 0; }
.row span:first-child { color: var(--ink-2); }
.row span:last-child { font-variant-numeric: tabular-nums; text-align: right; }
.row small { color: var(--ink-3); font-size: 0.75rem; }

/* Funnel: from every notice of the day to the ones that fit. */
.funnel { display: grid; gap: 0.75rem; }
.funnel-row { display: grid; grid-template-columns: 9.5rem 1fr 2rem; align-items: center; gap: 0.75rem; font-size: 0.875rem; }
.funnel-row span:first-child { color: var(--ink-2); }
.funnel-row b { font-weight: 400; text-align: right; font-variant-numeric: tabular-nums; }
.bar-track { display: block; height: 0.5rem; border-radius: 999px; background: var(--surface-muted); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: inherit; background: var(--line-strong); }
.bar-fill[data-share='all'] { width: 100%; }
.bar-fill[data-share='trade'] { width: 38%; }
.bar-fill[data-share='area'] { width: 20%; }
.bar-fill[data-share='fit'] { width: 11%; background: var(--brand); }
.funnel-row.fit { color: var(--brand-ink); }
.funnel-row.fit span:first-child { color: var(--brand-ink); font-weight: 480; }
@media (max-width: 43.75rem) { .funnel-row { grid-template-columns: 7.5rem 1fr 1.75rem; } }

/* Icon tiles for the three steps. */
.tiles { display: grid; gap: 1.25rem; }
@media (min-width: 44rem) { .tiles { grid-template-columns: repeat(3, 1fr); } }
.tile { display: grid; gap: 0.375rem; align-content: start; padding: 1.5rem; border-radius: var(--radius-2xl); background: var(--surface-muted); }
.tile-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 2.5rem; }
.tile-icon { display: grid; place-items: center; width: 2.25rem; height: 2.25rem; border-radius: var(--radius); background: var(--surface); color: var(--brand); box-shadow: var(--shadow-raised); }
.tile-step { color: var(--ink-3); font-size: 0.875rem; font-variant-numeric: tabular-nums; }

/* Plans sit on mats like the report. */
.plans { gap: 1.25rem; }
.plan { border-radius: var(--radius-2xl); }

/* Questions: heading on the left, answers on the right. */
.faq summary::after { content: ''; width: 0.5rem; height: 0.5rem; margin-top: 0.375rem; border-right: 1.5px solid var(--ink-3); border-bottom: 1.5px solid var(--ink-3); transform: rotate(45deg); }
.faq details[open] summary::after { transform: rotate(-135deg); }

/* Footer columns over the clipped wordmark. */
.footer .footer-row { display: flex; align-items: baseline; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem 2rem; padding-block: 1.5rem; font-size: 0.8125rem; color: var(--ink-3); }
.footer-row a { color: var(--ink-2); text-decoration: none; }
.footer-row a:hover { color: var(--ink); }
.footer-row p { margin: 0; }
