/* =========================================================
   P2P Latam — Case Study Deck
   Aesthetic: Bruno Dinamarco Portfolio — Dark Tech
   Plus Jakarta Sans · Inter · #08080f · Blue #4a5cff · Violet #7b61ff
   ========================================================= */

:root {
  /* Surfaces */
  --ink:       #08080f;
  --ink-2:     #0f0f1a;
  --panel:     #0f0f1a;
  --panel-2:   #16162a;
  --line:      rgba(61,61,96,.45);
  --line-soft: rgba(61,61,96,.22);

  /* Text */
  --text:      #f0f0f5;
  --text-dim:  #9999af;
  --muted:     #6b6b80;
  --faint:     #3d3d60;

  /* Accents */
  --blue:      #4a5cff;
  --blue-soft: #9aabff;
  --blue-mid:  #6b7bff;
  --violet:    #7b61ff;
  --jade:      #74cfa3;   /* positive / success */

  /* Gradients */
  --grad-hero:
    linear-gradient(0deg, rgba(8,8,15,.75) 0%, rgba(8,8,15,.75) 100%),
    linear-gradient(45deg, #4a5cff 14.64%, rgba(123,97,255,.6) 50%, #08080f 85.36%);
  --grad-progress: linear-gradient(90deg, var(--blue), var(--violet));

  /* Type */
  --display: "Plus Jakarta Sans", system-ui, sans-serif;
  --sans:    "Inter", system-ui, sans-serif;

  /* Layout */
  --stage-max: 1200px;
  --pad:       clamp(30px, 5.2vw, 96px);
  --radius:    12px;
  --radius-lg: 20px;

  --ease:     cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
[hidden] { display: none !important; }

html, body { height: 100%; }

body {
  background: var(--grad-hero); background-attachment: fixed;
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: -.005em;
  overflow: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.i18n-pt { display: none; }
body.lang-pt .i18n-en { display: none; }
body.lang-pt .i18n-pt { display: revert; }

::selection { background: rgba(74,92,255,.3); color: #fff; }

/* =========================================================
   Ambient — blue/violet glows + grain + rounded frame
   ========================================================= */
.ambient { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ambient__glow { position: absolute; border-radius: 50%; filter: blur(120px); }
.ambient__glow--1 {
  width: 62vw; height: 62vw; top: -24vw; left: -10vw; opacity: .18;
  background: radial-gradient(circle, rgba(74,92,255,.55), transparent 64%);
}
.ambient__glow--2 {
  width: 50vw; height: 50vw; bottom: -20vw; right: -8vw; opacity: .12;
  background: radial-gradient(circle, rgba(123,97,255,.45), transparent 62%);
}
.ambient__grain {
  position: absolute; inset: 0; opacity: .035; mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 180px 180px;
}
/* Rounded page frame — matches portfolio card border */
.ambient::after {
  content: ""; position: absolute; inset: 20px;
  border: 1px solid #3d3d60;
  border-radius: 32px; pointer-events: none;
}

/* =========================================================
   Progress bar — pinned to top of viewport
   (element lives inside .navbar but breaks out via position:fixed)
   ========================================================= */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 2px;
  background: transparent; z-index: 100; pointer-events: none;
}
.progress__bar {
  position: absolute; top: 0; left: 0; height: 2px;
  background: var(--grad-progress);
  box-shadow: 0 0 10px rgba(74,92,255,.55);
  transition: width .5s var(--ease-out);
}

/* =========================================================
   Topbar
   ========================================================= */
.topbar {
  position: fixed; top: 44px; left: 72px; right: 72px; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.topbar__brand, .topbar__site {
  font-family: var(--display); font-size: clamp(15px, 1.25vw, 18px); font-weight: 500;
  letter-spacing: -.01em; color: var(--text-dim);
}
.topbar__slash { color: var(--faint); }

.btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  height: 34px; min-width: 34px; padding: 0 12px;
  background: rgba(15,15,26,.5);
  border: 1px solid var(--faint);
  border-radius: 999px;
  color: var(--text-dim);
  font-family: var(--sans); font-size: 13px; font-weight: 400;
  cursor: pointer;
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  transition: all .2s var(--ease);
}
.btn-ghost:hover {
  background: rgba(74,92,255,.14);
  color: var(--blue-soft);
  border-color: rgba(74,92,255,.5);
}
.btn-ghost--sm { height: 28px; min-width: 28px; padding: 0 8px; }

/* =========================================================
   Stage & slides
   ========================================================= */
.stage { position: fixed; inset: 20px; z-index: 10; border-radius: 32px; overflow: hidden; }

.dot-reveal {
  position: fixed; inset: 0; pointer-events: none; z-index: 15;
  background-image: radial-gradient(circle, rgba(255,255,255,0.22) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0; transition: opacity 0.4s ease;
  -webkit-mask-image: radial-gradient(circle 180px at var(--mx, 50%) var(--my, 50%), black 0%, transparent 100%);
  mask-image: radial-gradient(circle 180px at var(--mx, 50%) var(--my, 50%), black 0%, transparent 100%);
}
.dot-reveal.is-active { opacity: 1; }


.slide {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: safe center;
  padding: 104px var(--pad) 120px;
  opacity: 0; visibility: hidden;
  transform: translateY(14px);
  transition: opacity .5s var(--ease-out), transform .6s var(--ease-out), visibility 0s linear .6s;
  overflow-y: auto;
  scrollbar-width: none;
}
.slide::-webkit-scrollbar {
  display: none;
}
.slide.is-active {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity .55s var(--ease-out), transform .65s var(--ease-out);
}
.slide__inner {
  width: 100%; max-width: var(--stage-max);
  margin: 0 auto; position: relative; z-index: 1;
}

/* Giant editorial folio number */
.slide__folio {
  position: absolute; z-index: 0; pointer-events: none;
  top: 50%; right: clamp(8px,3vw,56px); transform: translateY(-50%);
  font-family: var(--display); font-size: clamp(11rem,30vw,26rem); line-height: .8;
  font-weight: 800;
  color: transparent; -webkit-text-stroke: 1px rgba(61,61,96,.2);
  user-select: none;
}

/* Staggered reveal */
.slide.is-active [data-reveal] {
  animation: reveal .7s var(--ease-out) both;
  animation-delay: calc(var(--i,0) * 70ms + 100ms);
}
@keyframes reveal {
  from { opacity: 0; transform: translateY(18px); }
  to   { opacity: 1; transform: none; }
}

/* All slides — hero gradient background (fixed) */
.slide { background: transparent; }

/* =========================================================
   Typography
   ========================================================= */
.kicker {
  display: inline-flex; align-items: center; gap: 11px;
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim);
  margin-bottom: 24px;
}
.kicker::before {
  content: ""; width: 28px; height: 1px;
  background: var(--text-dim); opacity: .45;
}

.display {
  font-family: var(--display); font-weight: 400;
  line-height: 1.05; letter-spacing: -0.03em;
  color: var(--text);
}
h1.display { font-size: clamp(2.8rem, 7.5vw, 6rem); }
h2.display { font-size: clamp(2rem, 4.8vw, 3.8rem); }
.display em { font-style: normal; color: var(--text-dim); }

.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.35rem); line-height: 1.55;
  color: var(--text-dim); font-weight: 400; max-width: 50ch;
}
.body-text {
  color: var(--text-dim); font-size: 1rem; line-height: 1.65; max-width: 56ch;
}

.accent-ink  { color: var(--blue-soft); }
.positive-ink { color: var(--jade); }

/* Chips */
.meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 32px; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 18px; border-radius: 999px;
  border: 1px solid var(--faint);
  font-family: var(--sans); font-size: 13px; color: var(--text);
}

.rule { height: 1px; background: var(--line); margin: 30px 0; }

/* =========================================================
   COVER
   ========================================================= */
.l-cover .slide__inner { max-width: 900px; }
.l-cover h1.display   { margin-bottom: 10px; letter-spacing: -.035em; }
.cover-sub {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.3rem, 2.8vw, 2.2rem);
  color: var(--text-dim); letter-spacing: -.025em;
  margin: 4px 0 24px;
}
.cover-foot {
  margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line);
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 20px; flex-wrap: wrap;
}
.cover-author { display: flex; flex-direction: column; gap: 4px; }
.cover-author strong { font-size: 15px; font-weight: 600; letter-spacing: -.02em; }
.cover-author span   { font-family: var(--sans); font-size: 13px; color: var(--muted); }

/* =========================================================
   STATEMENT
   ========================================================= */
.l-statement .slide__inner { max-width: 960px; }
.l-statement .statement {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(2rem, 5vw, 3.8rem);
  line-height: 1.1; letter-spacing: -.03em;
  color: var(--text);
}
.l-statement .statement em { font-style: normal; color: var(--text-dim); }
.l-statement .body-text { margin-top: 34px; }

/* =========================================================
   SPLIT
   ========================================================= */
.l-split .split {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: clamp(30px, 5vw, 76px); align-items: center;
}
.l-split .split__media              { order: 2; }
.l-split.media-left .split__media   { order: 0; }
/* Cap split media height so portrait phones fit the stage;
   height-driven sizing lets aspect-ratio compute the width. */
.l-split .split__media .media-frame:not(.media-frame--bare) {
  height: min(72vh, 600px); width: auto; max-width: 100%; margin-inline: auto;
}
/* remedy-buy video: wide landscape composition, width-driven to fill column */
#slide-remedy-buy .split__media .media-frame {
  height: auto; width: 100%; max-height: 72vh;
}

/* =========================================================
   Bullets
   ========================================================= */
.bullets { list-style: none; display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.bullets li {
  display: flex; gap: 16px; align-items: flex-start;
  color: var(--text-dim); font-size: 1.02rem; line-height: 1.55;
}
.bullets li::before {
  content: ""; flex: none; width: 6px; height: 6px; margin-top: 10px;
  border-radius: 50%; background: var(--blue);
  box-shadow: 0 0 8px rgba(74,92,255,.5);
}
.bullets strong { color: var(--text); font-weight: 600; }
.bullets code {
  font-family: var(--sans); font-size: .85em;
  color: var(--blue-soft); background: rgba(74,92,255,.1);
  padding: 1px 6px; border-radius: 4px;
}

/* Step list */
.steplist { list-style: none; margin-top: 26px; }
.steplist li {
  display: flex; gap: 24px; align-items: baseline;
  padding: 20px 0; border-top: 1px solid var(--line-soft);
}
.steplist li:last-child { border-bottom: 1px solid var(--line-soft); }
.steplist .n {
  font-family: var(--display); font-size: 12px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--blue); min-width: 36px;
}
.steplist .t {
  font-family: var(--display); font-size: 1.5rem; font-weight: 400;
  letter-spacing: -.025em; color: var(--text); line-height: 1;
}
.steplist .d {
  color: var(--muted); font-size: .95rem;
  margin-left: auto; text-align: right; max-width: 42ch;
}

/* =========================================================
   Cards
   ========================================================= */
.cards {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 16px; margin-top: 36px;
}
.card { position: relative; }
.card__emoji  { font-size: 26px; display: block; margin-bottom: 16px; }
.card__title  { font-family: var(--display); font-weight: 600; font-size: 1.4rem; line-height: 1.1; letter-spacing: -.025em; margin-bottom: 12px; }
.card__from   { font-size: .85rem; color: var(--muted); margin-bottom: 14px; line-height: 1.45; }
.card__arrow  { color: var(--blue); font-size: 11px; margin-bottom: 12px; letter-spacing: .1em; font-family: var(--display); font-weight: 600; }
.card__to     { font-size: .96rem; color: var(--text-dim); line-height: 1.5; }
.cards__foot  { margin-top: 24px; max-width: 90ch; }

/* =========================================================
   Box — the STANDARD box style across the deck (Figma 402:11370)
   1px #6b6b80 border, 16px radius, 24px padding. Reuse via .box.
   ========================================================= */
.box {
  padding: 24px; border-radius: 16px;
  border: 1px solid var(--muted);
}

/* =========================================================
   Feature cards (Context / Meli Dólar)
   Icon cards + floating coins with a meet-in animation
   ========================================================= */
.featurecards { position: relative; }
.featurecards__head { max-width: 62%; }

.fcards {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 23px; margin-top: 40px;
}
.fcard { display: flex; flex-direction: column; gap: 12px; }
.fcard__icon { width: 32px; height: 32px; color: #c5ccff; display: block; }
.fcard__icon svg { width: 100%; height: 100%; display: block; }
.fcard__body { display: flex; flex-direction: column; gap: 4px; }
.fcard__title {
  font-family: var(--display); font-weight: 600; font-size: 1.5rem;
  line-height: 1.33; letter-spacing: -.0125em; color: var(--text);
}
.fcard__desc { font-size: 1.125rem; line-height: 1.56; color: var(--text-dim); }

/* Stat boxes — highlight key numbers, using the standard .box shell */
.statboxes {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px; margin: 22px 0 4px;
}
.statbox { display: flex; flex-direction: column; gap: 6px; }
.statbox__val {
  font-family: var(--display); font-weight: 700;
  font-size: clamp(2rem, 3.4vw, 2.8rem); line-height: 1;
  letter-spacing: -.03em; color: var(--blue-soft);
}
.statbox__label { font-size: 1rem; line-height: 1.5; color: var(--text-dim); }

/* Discovery (slide 8) — wider lead so stats + bullets don't overflow */
#slide-discovery .lead { max-width: 82ch; }

/* Bullets layout with side stat boxes — text left, values stacked right */
.bullets-stats {
  display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(240px, 0.8fr);
  gap: clamp(32px, 5vw, 72px); align-items: center;
}
.bullets-stats__aside .statboxes {
  grid-template-columns: 1fr; gap: 16px; margin: 0;
}
@media (max-width: 860px) {
  .bullets-stats { grid-template-columns: 1fr; gap: 28px; }
}

/* Floating Meli Dólar coins — top-right, matching Figma disposition */
.meli-coins {
  position: absolute; top: -28px; right: 4px;
  width: 320px; height: 300px; pointer-events: none; z-index: 2;
}
.meli-coin {
  position: absolute; width: 196px; height: 196px;
  object-fit: contain; opacity: 0;
  filter: drop-shadow(0 24px 40px rgba(8,8,15,.45));
}
.meli-coin--left  { top: 0;    right: 92px; }
.meli-coin--right { top: 78px; right: 0;    }

/* Microinteraction — the two coins move toward each other on activation */
.slide.is-active .meli-coin--left  { animation: coinMeetLeft  .8s var(--ease-out) .25s both; }
.slide.is-active .meli-coin--right { animation: coinMeetRight .8s var(--ease-out) .36s both; }
@keyframes coinMeetLeft {
  0%   { opacity: 0; transform: translateX(-40px); }
  100% { opacity: 1; transform: translateX(0); }
}
@keyframes coinMeetRight {
  0%   { opacity: 0; transform: translateX(40px); }
  100% { opacity: 1; transform: translateX(0); }
}
@media (prefers-reduced-motion: reduce) {
  .slide.is-active .meli-coin--left,
  .slide.is-active .meli-coin--right { animation: coinFade .4s ease both; }
  @keyframes coinFade { to { opacity: 1; } }
}

/* =========================================================
   Projects (Best Projects) — white image cards, name + year
   ========================================================= */
.projects {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 24px; margin-top: 40px;
}
.project-card {
  position: relative; border-radius: var(--radius-lg); overflow: hidden;
  background: #c6caef url("img/card-bg.png") center / cover no-repeat;
  padding: 12px 12px 22px; display: flex; flex-direction: column;
}
.project-card__media {
  aspect-ratio: 353 / 252; border-radius: 14px; overflow: hidden;
  margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center; color: var(--muted);
}
.project-card__media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.project-card__title {
  font-family: var(--display); font-weight: 500; font-size: 1.125rem;
  line-height: 1.45; letter-spacing: -.006em; color: var(--ink); padding: 0 12px;
}
.project-card__year {
  font-size: 1rem; line-height: 1.5; color: var(--muted); padding: 2px 12px 0;
}

/* =========================================================
   Metrics
   ========================================================= */
.metrics {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(184px, 1fr));
  gap: 12px; margin-top: 36px;
}
.metric {
  padding: 24px 20px; border-radius: var(--radius-lg);
  background: var(--panel); border: 1px solid var(--line); min-width: 0;
}
.metric__val {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(1.8rem, 2.8vw, 2.5rem);
  line-height: .95; letter-spacing: -.03em; white-space: nowrap;
}
.metric__val .unit {
  font-size: .4em; color: var(--muted);
  margin-left: 5px; letter-spacing: 0; font-weight: 400;
}
.metric__label { margin-top: 14px; font-size: .92rem; font-weight: 600; color: var(--text); letter-spacing: -.01em; }
.metric__sub   { margin-top: 5px; font-size: .8rem; color: var(--muted); line-height: 1.45; }
.metric--hero  { grid-column: span 2; }
.metric--hero .metric__val   { font-size: clamp(2.4rem, 4vw, 3.4rem); color: var(--blue-soft); }
.metric--positive .metric__val { color: var(--jade); }
@media (max-width: 640px) { .metric--hero { grid-column: span 1; } }

/* Big single stat — centered hero number */
.bigstat {
  text-align: center; max-width: 60ch; margin: 0 auto;
  display: flex; flex-direction: column; align-items: center;
}
.bigstat__val {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(5rem, 16vw, 13rem);
  line-height: .9; letter-spacing: -.04em; color: var(--blue-soft);
}
.bigstat__val.is-positive { color: var(--jade); }
.bigstat__cap {
  margin-top: 20px; font-family: var(--display); font-weight: 500;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem); letter-spacing: -.02em; color: var(--text);
}
.bigstat__sub { margin-top: 16px; color: var(--muted); max-width: 52ch; }

/* =========================================================
   Media placeholders
   ========================================================= */
.media-frame {
  position: relative; width: 100%;
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--panel); border: 1px dashed rgba(61,61,96,.45);
  display: flex; align-items: center; justify-content: center; color: var(--faint);
}
.media-frame--bare { background: transparent; border: 0; border-radius: 0; overflow: visible; }

/* Media grid — 2×2 phone screenshots (architecture slide, Figma 413:10980) */
.media-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px;
  max-width: 384px; margin: 0 auto; width: 100%;
}
.media-grid__cell {
  border-radius: 8px; overflow: hidden; aspect-ratio: 448 / 680;
}
.media-grid__cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.media-frame[data-ratio="16/9"] { aspect-ratio: 16/9; }
.media-frame[data-ratio="4/3"]  { aspect-ratio: 4/3; }
.media-frame[data-ratio="1/1"]  { aspect-ratio: 1/1; }
.media-frame[data-ratio="9/16"] { aspect-ratio: 9/16; }
.media-frame[data-ratio="3/2"]  { aspect-ratio: 3/2; }
.media-ph {
  display: flex; flex-direction: column; align-items: center;
  gap: 10px; text-align: center; padding: 24px;
}
.media-ph__icon  { width: 32px; height: 32px; opacity: .35; }
.media-ph__label {
  font-family: var(--display); font-size: 12px; font-weight: 500;
  letter-spacing: .06em; text-transform: uppercase; color: var(--muted);
}
.media-ph__hint { font-size: 11px; color: var(--faint); font-family: var(--sans); }

/* Flow strip of phone screens */
.screen-strip {
  display: flex; gap: 16px; margin-top: 40px;
  overflow-x: auto; padding-bottom: 12px; scrollbar-width: thin;
}
.screen-strip::-webkit-scrollbar { height: 4px; }
.screen-strip::-webkit-scrollbar-thumb { background: rgba(61,61,96,.4); border-radius: 99px; }
.screen-step { flex: none; width: 168px; }
.screen-step .media-frame { aspect-ratio: 9/19.5; border-radius: 22px; }
.screen-step__cap { margin-top: 14px; }
.screen-step__n {
  font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--blue);
}
.screen-step__t {
  font-family: var(--display); font-size: 1.1rem; font-weight: 400;
  letter-spacing: -.025em; color: var(--text-dim); margin-top: 4px; line-height: 1.1;
}
.screen-arrow { flex: none; align-self: center; color: var(--faint); margin-top: -22px; }

/* =========================================================
   Phone mockup (prototype)
   ========================================================= */
.l-prototype .slide__inner { max-width: var(--stage-max); }
.proto-wrap {
  display: grid; grid-template-columns: 1.05fr .95fr;
  gap: clamp(30px, 5vw, 72px); align-items: center;
}
.phone {
  position: relative; width: 300px; max-width: 78vw;
  margin: 0 auto; aspect-ratio: 9/19.5;
  border-radius: 44px; background: #06060d;
  border: 1px solid rgba(61,61,96,.6);
  box-shadow:
    0 44px 100px -34px rgba(0,0,0,.95),
    0 0 0 9px #08080f,
    0 0 0 10px rgba(61,61,96,.3);
  padding: 12px;
}
.phone::before {
  content: ""; position: absolute; top: 16px; left: 50%;
  transform: translateX(-50%); width: 96px; height: 26px;
  border-radius: 99px; background: #06060d; z-index: 3;
}
.phone__screen {
  position: relative; width: 100%; height: 100%;
  border-radius: 34px; overflow: hidden; background: var(--panel);
  display: flex; align-items: center; justify-content: center;
}
.phone__screen iframe { width: 100%; height: 100%; border: 0; }
/* Prototype iframe: render at the prototype's native 360×800 frame and
   scale it down to fit the deck phone screen exactly (no crop). */
#slide-prototype .phone__screen iframe {
  flex: none; width: 360px; height: 800px;
  transform: scale(0.7667); transform-origin: center center;
}
/* Match the phone height to the scaled prototype so there are no empty
   bands at top/bottom of the screen (screen ratio = 360/800). */
#slide-prototype .phone { aspect-ratio: 9 / 19.12; }
.proto-side .bullets { margin-top: 24px; }

/* =========================================================
   Team / role
   ========================================================= */
.team {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px; margin-top: 32px;
}
.team__col { border-top: 1px solid var(--line); padding-top: 16px; }
.team__col h4 {
  font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase;
  color: var(--blue); margin-bottom: 14px;
}
.team__col ul  { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.team__col li  { font-size: .92rem; color: var(--text-dim); }
.team__col li.me { color: var(--text); font-weight: 600; }
.team__col li.me::after {
  content: " — me"; color: var(--blue); font-weight: 500;
  font-family: var(--display); font-size: .78em; letter-spacing: .04em;
}

/* =========================================================
   Footer nav — floating pill
   ========================================================= */
.navbar {
  position: fixed; bottom: 40px; left: 50%; z-index: 40;
  transform: translateX(-50%);
  display: flex; align-items: center; gap: 24px;
  padding: 14px 24px;
  background: rgba(15,15,26,.4);
  backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
  border: 0.5px solid var(--faint);
  border-radius: 99px;
  white-space: nowrap;
}
.navbar__group { display: flex; align-items: center; gap: 16px; }
.navbar__group--tight { gap: 12px; }
.navbar__div { width: 1px; height: 18px; background: var(--faint); flex: none; }

.nav-icon {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  background: transparent; border: 0; color: var(--text-dim);
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-icon:hover    { color: var(--text); background: rgba(74,92,255,.12); }
.nav-icon:disabled { opacity: .25; cursor: default; background: transparent; }

.counter {
  font-family: var(--sans); font-size: 16px;
  color: var(--text-dim); white-space: nowrap; letter-spacing: 0;
  min-width: 56px; text-align: center;
}
.counter__sep { margin: 0 5px; color: var(--faint); }
#counterNow { color: var(--text); }

/* Language toggle box (matches Figma) */
.lang-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 4px 8px; border-radius: 8px;
  border: .5px solid var(--faint); background: transparent;
  font-family: var(--sans); font-size: 14px; cursor: pointer;
  transition: border-color .2s var(--ease);
}
.lang-toggle:hover { border-color: var(--blue); }
.lang-toggle__on  { color: var(--text); }
.lang-toggle__off { color: var(--text-dim); }
body.lang-pt .lang-toggle__on  { color: var(--text-dim); }
body.lang-pt .lang-toggle__off { color: var(--text); }


/* =========================================================
   Speaker notes
   ========================================================= */
/* Speaker notes hidden — code preserved, UI disabled */
#notesDrawer { display: none !important; }

.notes {
  position: fixed; right: 18px; bottom: 110px; z-index: 45;
  width: min(384px, 86vw); max-height: 44vh; overflow: hidden;
  background: rgba(15,15,26,.94); backdrop-filter: blur(20px);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px -20px rgba(0,0,0,.85);
  display: flex; flex-direction: column; animation: notesIn .35s var(--ease-out);
}
@keyframes notesIn {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}
.notes__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 16px; border-bottom: 1px solid var(--line-soft);
  font-family: var(--display); font-size: 11px; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.notes__body { padding: 16px; overflow-y: auto; font-size: .92rem; line-height: 1.65; color: var(--text-dim); }

/* =========================================================
   Overlays
   ========================================================= */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(8,8,15,.92); backdrop-filter: blur(20px);
  animation: fadeIn .3s var(--ease-out); overflow-y: auto;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.overlay__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 30px var(--pad) 20px; position: sticky; top: 0;
}
.overlay__head h2 {
  font-family: var(--display); font-weight: 400;
  font-size: 2rem; letter-spacing: -.03em;
}

.grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 12px; padding: 0 var(--pad) 60px;
}
.thumb {
  position: relative; aspect-ratio: 16/10; border-radius: var(--radius-lg);
  cursor: pointer; background: var(--panel-2);
  border: 1px solid var(--line); overflow: hidden;
  padding: 18px; display: flex; flex-direction: column; justify-content: space-between;
  transition: all .2s var(--ease); text-align: left;
}
.thumb:hover { border-color: var(--blue); transform: translateY(-3px); }
.thumb.is-current {
  border-color: var(--blue);
  box-shadow: 0 0 0 1px var(--blue), 0 14px 40px -16px rgba(74,92,255,.35);
}
.thumb__n      { font-family: var(--display); font-size: 11px; font-weight: 600; color: var(--blue); }
.thumb__title  { font-family: var(--display); font-weight: 400; font-size: 1.3rem; line-height: 1.1; letter-spacing: -.025em; color: var(--text); }
.thumb__kicker { font-family: var(--display); font-size: 10px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }

.overlay--help { display: flex; align-items: center; justify-content: center; padding: var(--pad); }
.help-card {
  width: min(440px, 92vw); background: var(--panel);
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
}
.help-card .overlay__head { position: static; padding: 24px 28px; border-bottom: 1px solid var(--line-soft); }
.shortcuts { list-style: none; padding: 14px 28px 28px; display: flex; flex-direction: column; gap: 4px; }
.shortcuts li { display: flex; align-items: center; gap: 10px; padding: 9px 0; font-size: .92rem; color: var(--text-dim); }
.shortcuts li span { margin-left: auto; color: var(--muted); }
kbd {
  font-family: var(--sans); font-size: 11px; min-width: 26px; height: 24px; padding: 0 7px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(61,61,96,.25); border: 1px solid var(--line);
  border-radius: 5px; color: var(--text);
}

/* =========================================================
   Responsive
   ========================================================= */
@media (max-width: 860px) {
  .l-split .split, .proto-wrap { grid-template-columns: 1fr; }
  .l-split .split__media, .l-split.media-left .split__media { order: 2; }
  .proto-wrap { gap: 36px; }
  .phone { order: -1; }
  .steplist .d { display: none; }
  .projects { grid-template-columns: 1fr; gap: 16px; }
  .fcards { grid-template-columns: 1fr; gap: 14px; }
  .featurecards__head { max-width: 100%; }
  .meli-coins { position: relative; top: 0; right: 0; width: 100%; height: 150px; margin: 8px 0 4px; }
  .meli-coin { width: 132px; height: 132px; }
  .meli-coin--left  { right: auto; left: calc(50% - 130px); top: 0; }
  .meli-coin--right { right: auto; left: 50%; top: 22px; }
  .metric--hero { grid-column: span 1; }
  .slide__folio { opacity: .6; }
  .ambient::after { inset: 12px; border-radius: 14px; }
}
@media (max-width: 640px) {
  .navbar { bottom: 20px; gap: 16px; padding: 10px 16px; }
  .navbar__group { gap: 10px; }
}
@media (max-width: 560px) {
  .slide { padding: 92px 22px 116px; }
  .topbar { padding: 40px 22px 0; }
  .topbar__site { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    transition-duration: .12s !important;
  }
}
