/* Cleiton Ivanhoski, desenvolvedor Android
   Tema claro e escuro: segue o sistema; o botão do topo grava a escolha (data-theme no <html>). */

@font-face {
  font-family: "Bricolage";
  src: url("../fonts/bricolage_title_extrabold.ttf") format("truetype");
  font-weight: 800;
  font-display: swap;
}

:root {
  --bg: #EEEDF7;
  --surface: #FFFFFF;
  --ink: #1C1B26;
  --muted: #5F5D70;
  --line: #DCDAEA;
  --line-strong: #C6C2DD;
  --primary: #4B44D9;
  --primary-hover: #3D36C2;
  --on-primary: #FFFFFF;
  --tonal: #E2DFFB;
  --on-tonal: #2A2580;
  --ok-bg: #DCF2E7;
  --ok-ink: #145B3D;
  --ok-dot: #1B7A56;
  --focus: #4B44D9;

  --phone-frame: #1C1B26;
  --wall: #D9D6F4;
  --wall-2: #CAC5F0;
  --widget: #FFFFFF;
  --slot: #9E99CF;
  --shadow-phone: 0 50px 90px -40px rgba(40, 33, 120, .55), 0 18px 36px -18px rgba(40, 33, 120, .35);

  /* Provento (cores do app, BentoColors.kt) */
  --pv-bg: #ECEEF4;
  --pv-surface: #FFFFFF;
  --pv-ink: #10111A;
  --pv-muted: #555A6B;
  --pv-indigo: #3A34D2;
  --pv-on-indigo-muted: #DCDAFF;
  --pv-lime: #D4F56A;
  --pv-coral: #FF8C69;
  --pv-pos: #1B7A56;
  --pv-nav: #10111A;
  --pv-nav-sel: #2A2C3D;
  --pv-peach: #FFE1D3;
  --pv-sky: #BFD7FF;
  --pv-mint: #CFF3E4;
  --pv-rose: #FFD6E4;
  --pv-notif: #FFFFFF;
  --pv-flash: rgba(212, 245, 106, .75);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #16151E;
    --surface: #201F2B;
    --ink: #ECEBF5;
    --muted: #A5A3B7;
    --line: #2F2D3F;
    --line-strong: #423F58;
    --primary: #8F8AFF;
    --primary-hover: #A7A3FF;
    --on-primary: #16151E;
    --tonal: #2D2B47;
    --on-tonal: #DAD7FF;
    --ok-bg: #173A2C;
    --ok-ink: #9BE6C2;
    --ok-dot: #5FD3A0;
    --focus: #8F8AFF;

    --phone-frame: #34324A;
    --wall: #24223A;
    --wall-2: #2F2C4B;
    --widget: #32304A;
    --slot: #58557C;
    --shadow-phone: 0 50px 90px -40px rgba(0, 0, 0, .8), 0 18px 36px -18px rgba(0, 0, 0, .6);

    --pv-bg: #000000;
    --pv-surface: #191A24;
    --pv-ink: #F3F4F8;
    --pv-muted: #A6AABB;
    --pv-indigo: #5B55E8;
    --pv-on-indigo-muted: #D9D7FF;
    --pv-pos: #5FD3A0;
    --pv-nav: #242634;
    --pv-nav-sel: #363949;
    --pv-peach: #4A2A20;
    --pv-sky: #1E3150;
    --pv-mint: #16423A;
    --pv-rose: #4A2033;
    --pv-notif: #242634;
    --pv-flash: rgba(212, 245, 106, .2);
  }
}

:root[data-theme="dark"] {
  --bg: #16151E;
  --surface: #201F2B;
  --ink: #ECEBF5;
  --muted: #A5A3B7;
  --line: #2F2D3F;
  --line-strong: #423F58;
  --primary: #8F8AFF;
  --primary-hover: #A7A3FF;
  --on-primary: #16151E;
  --tonal: #2D2B47;
  --on-tonal: #DAD7FF;
  --ok-bg: #173A2C;
  --ok-ink: #9BE6C2;
  --ok-dot: #5FD3A0;
  --focus: #8F8AFF;

  --phone-frame: #34324A;
  --wall: #24223A;
  --wall-2: #2F2C4B;
  --widget: #32304A;
  --slot: #58557C;
  --shadow-phone: 0 50px 90px -40px rgba(0, 0, 0, .8), 0 18px 36px -18px rgba(0, 0, 0, .6);

  --pv-bg: #000000;
  --pv-surface: #191A24;
  --pv-ink: #F3F4F8;
  --pv-muted: #A6AABB;
  --pv-indigo: #5B55E8;
  --pv-on-indigo-muted: #D9D7FF;
  --pv-pos: #5FD3A0;
  --pv-nav: #242634;
  --pv-nav-sel: #363949;
  --pv-peach: #4A2A20;
  --pv-sky: #1E3150;
  --pv-mint: #16423A;
  --pv-rose: #4A2033;
  --pv-notif: #242634;
  --pv-flash: rgba(212, 245, 106, .2);
}

:root { color-scheme: light; }
:root[data-theme="dark"] { color-scheme: dark; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) { color-scheme: dark; }
}

/* Base */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; }
a { color: inherit; }
h1, h2, h3, h4 { text-wrap: balance; }
p { text-wrap: pretty; }

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-radius: 8px;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip {
  position: absolute; left: 16px; top: -64px; z-index: 100;
  background: var(--primary); color: var(--on-primary);
  padding: 10px 16px; border-radius: 99px; font-weight: 600; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: 1180px;
  margin-inline: auto;
  padding-inline: 16px;
}
@media (min-width: 640px) { .wrap { padding-inline: 28px; } }
@media (min-width: 1024px) { .wrap { padding-inline: 40px; } }

/* Cabeçalho */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 84%, transparent);
  -webkit-backdrop-filter: blur(14px) saturate(1.4);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .25s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); }

.header-row { display: flex; align-items: center; gap: 16px; height: 64px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  text-decoration: none; font-weight: 700; letter-spacing: -.01em;
}
.brand img { display: block; border-radius: 9px; }

.nav { margin-left: auto; display: flex; gap: 2px; }
.nav a {
  padding: 8px 12px; border-radius: 99px;
  color: var(--muted); text-decoration: none; font-weight: 500; font-size: .98rem;
  transition: background-color .2s ease, color .2s ease;
}
.nav a:hover { background: var(--tonal); color: var(--on-tonal); }

.theme-toggle {
  flex: none; width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); cursor: pointer;
  transition: background-color .2s ease, transform .15s ease;
}
.theme-toggle:hover { background: var(--tonal); }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle svg { width: 20px; height: 20px; grid-area: 1 / 1; }
.theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

@media (max-width: 600px) {
  .brand-name { display: none; }
  .nav a { padding: 8px 10px; font-size: .95rem; }
}

/* Botões */

.actions { display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 24px; border-radius: 99px;
  font: inherit; font-weight: 600; font-size: 1rem; line-height: 1;
  text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent;
  transition: background-color .2s ease, border-color .2s ease, transform .15s ease;
}
.btn:active { transform: scale(.98); }
.btn svg { width: 19px; height: 19px; flex: none; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-ghost:hover { background: var(--tonal); border-color: var(--tonal); color: var(--on-tonal); }
.btn-sm { min-height: 46px; padding: 0 18px; }

/* Abertura */

.hero { padding-block: clamp(24px, 4vw, 56px) clamp(72px, 9vw, 128px); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr);
  gap: clamp(40px, 5vw, 80px);
  align-items: center;
}

.hero-role { margin: 0 0 20px; color: var(--primary); font-weight: 600; font-size: 1.05rem; }

.hero h1 {
  margin: 0;
  font-size: clamp(2.65rem, 1.3rem + 4.7vw, 5.1rem);
  line-height: .98;
  letter-spacing: -.045em;
  font-weight: 800;
  max-width: 11ch;
}

.hero-lede {
  margin: 28px 0 36px;
  max-width: 36em;
  color: var(--muted);
  font-size: clamp(1.06rem, 1rem + .35vw, 1.24rem);
  line-height: 1.6;
}

.hero-device { display: flex; flex-direction: column; align-items: center; gap: 22px; }

.device-caption {
  margin: 0; max-width: 32ch; text-align: center;
  color: var(--muted); font-size: .95rem; line-height: 1.5;
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { max-width: 13ch; }
}

/* Celular */

.phone {
  --pw: clamp(264px, min(27vw, calc((100svh - 150px) / 2.16)), 336px);
  position: relative;
  width: var(--pw);
  aspect-ratio: 9 / 19.4;
  padding: calc(var(--pw) * .032);
  border-radius: calc(var(--pw) * .15);
  background: var(--phone-frame);
  box-shadow: var(--shadow-phone), inset 0 0 0 1.5px rgba(255, 255, 255, .08);
  animation: phone-in .9s cubic-bezier(.2, .8, .2, 1) both;
  /* As medidas de dentro (cqw) são proporcionais à largura do celular. */
  container-type: inline-size;
}
@media (max-width: 880px) {
  .phone { --pw: clamp(260px, 78vw, 330px); }
}

/* O celular e os ícones só entram quando aparecem na tela (no celular ficam abaixo do texto). */
.js .hero-device:not(.in-view) .phone,
.js .hero-device:not(.in-view) .apps li,
.js .hero-device:not(.in-view) .app::after { animation-play-state: paused; }

.phone::before, .phone::after {
  content: ""; position: absolute; right: -3px; width: 3px;
  background: var(--phone-frame); border-radius: 0 3px 3px 0;
}
.phone::before { top: 22%; height: 9%; }
.phone::after { top: 34%; height: 15%; }

.phone-screen {
  position: relative; width: 100%; height: 100%;
  border-radius: calc(var(--pw) * .12);
  overflow: hidden;
  font-size: 4cqw;
  line-height: 1.3;
  background: var(--wall);
  isolation: isolate;
}

.statusbar {
  position: absolute; top: 0; left: 0; right: 0; z-index: 8;
  height: 11cqw; padding: 0 8cqw;
  display: flex; align-items: center; justify-content: space-between;
  font-size: .95em; font-weight: 600; color: var(--ink);
  font-variant-numeric: tabular-nums;
  transition: color .3s ease;
}
.sb-punch {
  position: absolute; left: 50%; top: 3.4cqw; width: 4cqw; height: 4cqw;
  margin-left: -2cqw; border-radius: 50%; background: #0A0A0F;
}
.sb-icons { display: inline-flex; align-items: center; gap: 1.6cqw; }
.sb-icons svg { height: 3.2cqw; width: auto; fill: currentColor; }
.phone-screen.is-app .statusbar { color: var(--pv-ink); }

/* Tela inicial do Android */

.launcher { position: absolute; inset: 0; display: flex; flex-direction: column; padding: 15cqw 6.5cqw 28cqw; }

.wallpaper { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.shape { position: absolute; background: var(--wall-2); }
.shape-a { width: 92cqw; height: 92cqw; border-radius: 50%; right: -38cqw; top: -18cqw; }
.shape-b { width: 70cqw; height: 70cqw; border-radius: 30%; left: -26cqw; bottom: 18cqw; transform: rotate(18deg); }

.widget { display: grid; gap: .6cqw; margin-top: 8cqw; }
.widget-date { color: var(--muted); font-size: .95em; font-weight: 500; }
.widget-big { font-size: 2.6em; font-weight: 750; letter-spacing: -.03em; line-height: 1.05; }
.widget-small { color: var(--muted); font-size: .88em; }

.apps {
  list-style: none; margin: auto 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6cqw 4.5cqw;
}
.apps li { display: grid; justify-items: center; gap: 1.6cqw; animation: pop .55s cubic-bezier(.3, 1.45, .5, 1) both; }
.apps li:nth-child(1) { animation-delay: .45s; }
.apps li:nth-child(2) { animation-delay: .5s; }
.apps li:nth-child(3) { animation-delay: .55s; }
.apps li:nth-child(4) { animation-delay: .6s; }
.apps li:nth-child(5) { animation-delay: .65s; }
.apps li:nth-child(6) { animation-delay: .7s; }
.apps li:nth-child(7) { animation-delay: .75s; }
.apps li:nth-child(8) { animation-delay: .8s; }

.app {
  position: relative; width: 100%; padding: 0; margin: 0;
  background: none; border: 0; color: inherit; font: inherit; cursor: pointer;
  display: grid; justify-items: center; gap: 1.6cqw;
  border-radius: 4cqw;
}
.app img {
  display: block; width: 100%; height: auto; border-radius: 22.2%;
  box-shadow: 0 1.2cqw 3cqw -1cqw rgba(16, 17, 26, .35);
  transition: transform .2s ease;
}
.app:hover img { transform: scale(1.06); }
.app:active img { transform: scale(.94); }
.app::after {
  content: ""; position: absolute; left: 0; right: 0; top: 0; aspect-ratio: 1;
  border-radius: 22.2%; pointer-events: none;
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 55%, transparent);
  animation: halo 2.4s ease-out 1.4s 3;
}
.phone-screen.was-opened .app::after { animation: none; }
.app:focus-visible { outline-offset: 2cqw; }

.app-label {
  font-size: .78em; font-weight: 500; line-height: 1.2; min-height: 1.2em;
  white-space: nowrap; color: var(--ink);
}
.slot { color: var(--muted); }
.slot .app-label { color: var(--muted); }
.slot-icon {
  display: block; width: 100%; aspect-ratio: 1; border-radius: 22.2%;
  border: max(1.5px, .45cqw) dashed var(--slot);
}

.launcher-hint {
  position: absolute; left: 6.5cqw; right: 6.5cqw; bottom: 9cqw; margin: 0;
  padding: 3.6cqw 5cqw; border-radius: 99px;
  background: var(--widget); color: var(--muted);
  font-size: .86em; font-weight: 500; text-align: center;
}

/* App aberto dentro do celular */

.appwin {
  position: absolute; inset: 0; z-index: 6;
  background: var(--pv-bg); color: var(--pv-ink);
  overflow: hidden;
}
.appwin[hidden] { display: none; }

.pv { position: absolute; inset: 0; }

.pv-splash {
  position: absolute; inset: 0; display: grid; place-items: center;
  transition: opacity .3s ease;
}
.pv-splash img { width: 24cqw; height: auto; border-radius: 22.2%; }
.appwin.is-ready .pv-splash { opacity: 0; }

.pv-home {
  position: absolute; inset: 0; padding: 12.5cqw 4.5cqw 0;
  opacity: 0; transform: scale(.96);
  transition: opacity .35s ease, transform .45s cubic-bezier(.2, .8, .2, 1);
}
.appwin.is-ready .pv-home { opacity: 1; transform: none; }

.pv svg { width: 1em; height: 1em; display: block; }

.pv-top { display: flex; gap: 2.4cqw; align-items: center; }
.pv-month {
  flex: 1; display: flex; align-items: center; justify-content: space-between;
  height: 10.5cqw; padding: 0 3.4cqw; border-radius: 99px;
  background: var(--pv-surface); font-weight: 600; font-size: .9em;
}
.pv-round {
  width: 10.5cqw; height: 10.5cqw; border-radius: 50%; flex: none;
  display: grid; place-items: center; background: var(--pv-surface); font-size: 1.05em;
}

.pv-balance {
  margin-top: 3.4cqw; padding: 4.6cqw 5cqw 4.4cqw; border-radius: 6.5cqw;
  background: var(--pv-indigo); color: #FFFFFF;
}
.pv-balance-head { display: flex; align-items: center; justify-content: space-between; gap: 2cqw; font-size: .8em; }
.pv-chip {
  background: var(--pv-lime); color: #10111A; border-radius: 99px;
  padding: .3em .7em; font-size: .82em; font-weight: 600; white-space: nowrap;
}
.pv-amount {
  margin: 2.2cqw 0 3cqw;
  font-family: "Bricolage", "Onest", sans-serif; font-weight: 800;
  font-size: 2.35em; letter-spacing: -.035em; line-height: 1;
  font-variant-numeric: tabular-nums;
}
.pv-bar { display: flex; gap: 1cqw; height: 1.5cqw; }
.pv-bar span { border-radius: 99px; }
.pv-bar span:first-child { flex: 58; background: var(--pv-lime); }
.pv-bar span:last-child { flex: 42; background: var(--pv-coral); }
.pv-forecast { margin-top: 3cqw; font-size: .74em; color: var(--pv-on-indigo-muted); }
.pv-forecast strong { color: #FFFFFF; }

.pv-tiles { display: grid; grid-template-columns: 1fr 1fr; gap: 2.8cqw; margin-top: 2.8cqw; }
.pv-tile { border-radius: 6cqw; padding: 3.8cqw 4cqw 3.6cqw; color: #10111A; display: grid; }
.pv-in { background: var(--pv-lime); }
.pv-out { background: var(--pv-coral); }
.pv-tile-ic {
  width: 8.6cqw; height: 8.6cqw; border-radius: 2.6cqw; background: #10111A;
  display: grid; place-items: center; font-size: 1em;
}
.pv-in .pv-tile-ic { color: var(--pv-lime); }
.pv-out .pv-tile-ic { color: var(--pv-coral); }
.pv-tile-label { margin-top: 3.6cqw; font-size: .78em; font-weight: 500; }
.pv-tile-value { font-family: "Bricolage", "Onest", sans-serif; font-weight: 800; font-size: 1.12em; letter-spacing: -.02em; }

.pv-recent { margin-top: 2.8cqw; padding: 4.2cqw 4.4cqw 26cqw; border-radius: 6.5cqw; background: var(--pv-surface); }
.pv-recent-head { display: flex; justify-content: space-between; align-items: baseline; font-weight: 700; }
.pv-link { font-size: .78em; font-weight: 600; }
.pv-rows { list-style: none; margin: 1.6cqw 0 0; padding: 0; }
.pv-row {
  display: grid; grid-template-columns: 10cqw minmax(0, 1fr) auto; gap: 3cqw; align-items: center;
  padding: 2.2cqw 0;
}
.pv-ic {
  width: 10cqw; height: 10cqw; border-radius: 3.2cqw; display: grid; place-items: center;
  color: var(--pv-ink); font-size: 1.15em;
}
.pv-peach { background: var(--pv-peach); }
.pv-sky { background: var(--pv-sky); }
.pv-mint { background: var(--pv-mint); }
.pv-rose { background: var(--pv-rose); }
.pv-row-text { display: grid; min-width: 0; }
.pv-row-title { font-weight: 600; font-size: .9em; }
.pv-row-sub { font-size: .7em; color: var(--pv-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-row-value { font-size: .82em; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pv-pos { color: var(--pv-pos); }

.pv-new {
  max-height: 0; padding-block: 0; opacity: 0; overflow: hidden;
  margin-inline: -2cqw; padding-inline: 2cqw; border-radius: 3.6cqw;
  transition: max-height .45s cubic-bezier(.2, .8, .2, 1), padding .45s cubic-bezier(.2, .8, .2, 1), opacity .3s ease .15s;
}
.pv-new.is-in { max-height: 20cqw; padding-block: 2.2cqw; opacity: 1; animation: imported 2.2s ease-out .3s both; }

.pv-nav {
  position: absolute; left: 4.5cqw; right: 4.5cqw; bottom: 8cqw;
  height: 15.5cqw; border-radius: 99px; background: var(--pv-nav); color: #A3A7B8;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center; justify-items: center; padding: 0 2cqw;
  font-size: 1.35em;
}
.pv-nav-home, .pv-nav-add { display: grid; place-items: center; border-radius: 50%; }
.pv-nav-home { width: 11.5cqw; height: 11.5cqw; background: var(--pv-nav-sel); color: #FFFFFF; }
.pv-nav-add { width: 13cqw; height: 13cqw; background: var(--pv-lime); color: #10111A; }

.notif {
  position: absolute; left: 3.5cqw; right: 3.5cqw; top: 11cqw; z-index: 7;
  display: grid; gap: .8cqw;
  padding: 3.4cqw 4.2cqw 3.6cqw; border-radius: 5.5cqw;
  background: var(--pv-notif); color: var(--pv-ink);
  box-shadow: 0 3cqw 8cqw -2cqw rgba(0, 0, 0, .35);
  transform: translateY(-160%); opacity: 0;
  transition: transform .5s cubic-bezier(.2, .9, .25, 1.1), opacity .25s ease;
}
.notif.is-in { transform: none; opacity: 1; }
.notif-app { display: flex; align-items: center; gap: 1.6cqw; font-size: .72em; color: var(--pv-muted); font-weight: 500; }
.notif-dot { width: 2.4cqw; height: 2.4cqw; border-radius: 50%; background: var(--pv-muted); }
.notif-text { font-size: .84em; font-weight: 600; line-height: 1.3; }

.homebar {
  position: absolute; left: 50%; bottom: 1.4cqw; z-index: 9;
  width: 40cqw; height: 6cqw; margin-left: -20cqw; padding: 0;
  background: none; border: 0; cursor: pointer;
  display: grid; place-items: center; border-radius: 99px;
}
.homebar span { width: 100%; height: 1.3cqw; border-radius: 99px; background: var(--pv-ink); opacity: .55; transition: opacity .2s ease; }
.homebar:hover span { opacity: .9; }

/* Seções */

.section { padding-block: clamp(72px, 10vw, 136px); }

.section-head { display: grid; gap: 12px; margin-bottom: clamp(32px, 5vw, 56px); }
.section-head p { margin: 0; color: var(--muted); font-size: 1.12rem; max-width: 52ch; }

h2 {
  margin: 0;
  font-size: clamp(2.2rem, 1.5rem + 2.6vw, 3.6rem);
  line-height: 1.02; letter-spacing: -.04em; font-weight: 800;
}

/* Projeto */

.project {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: clamp(24px, 3vw, 36px);
  padding: clamp(20px, 4vw, 52px);
}

.project-head {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 8px 22px; align-items: center;
}
.project-icon {
  display: block; width: clamp(64px, 7vw, 88px); height: auto; border-radius: 22.2%;
  box-shadow: 0 0 0 1px var(--line), 0 10px 24px -14px rgba(16, 17, 26, .45);
}
.project-title h3 {
  margin: 0; font-size: clamp(1.6rem, 1.15rem + 1.5vw, 2.3rem);
  line-height: 1.05; letter-spacing: -.035em; font-weight: 800;
}
.project-title p { margin: 6px 0 0; color: var(--muted); }

.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 99px;
  background: var(--ok-bg); color: var(--ok-ink);
  font-size: .92rem; font-weight: 600; white-space: nowrap;
}
.status-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok-dot); }

@media (max-width: 640px) {
  .project-head { grid-template-columns: auto minmax(0, 1fr); }
  .status { grid-column: 1 / -1; justify-self: start; margin-top: 10px; }
}

.project-body {
  display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr);
  gap: clamp(28px, 4vw, 64px); margin-top: clamp(28px, 4vw, 44px); align-items: start;
}
.project-intro p { margin: 0 0 28px; font-size: clamp(1.06rem, 1rem + .3vw, 1.18rem); max-width: 58ch; }

.facts { margin: 0; border-top: 1px solid var(--line); }
.facts div {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 14px 0; border-bottom: 1px solid var(--line);
}
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; text-align: right; }

@media (max-width: 820px) {
  .project-body { grid-template-columns: minmax(0, 1fr); }
}

.gallery { margin-top: clamp(44px, 5vw, 68px); }
.gallery-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 18px; }

h4 { margin: 0; font-size: 1.2rem; letter-spacing: -.015em; font-weight: 700; }

.gallery-nav { display: flex; gap: 8px; }
.round-btn {
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: var(--surface); color: var(--ink); border: 1px solid var(--line-strong);
  transition: background-color .2s ease, transform .15s ease;
}
.round-btn:hover { background: var(--tonal); color: var(--on-tonal); }
.round-btn:active { transform: scale(.94); }
.round-btn svg { width: 20px; height: 20px; }

.gallery-track {
  list-style: none; margin: 0; padding: 4px 4px 14px;
  display: grid; grid-auto-flow: column;
  grid-auto-columns: clamp(196px, 21vw, 248px);
  gap: 16px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x mandatory; scroll-padding-inline: 4px;
  scrollbar-width: thin; scrollbar-color: var(--line-strong) transparent;
}
.gallery-track li { scroll-snap-align: start; }
.gallery-track figure { margin: 0; }
.gallery-track img {
  display: block; width: 100%; height: auto; aspect-ratio: 600 / 1067;
  border-radius: 20px; background: var(--bg); object-fit: cover;
}
.gallery-track figcaption { margin-top: 10px; color: var(--muted); font-size: .94rem; }

.project-split {
  display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  margin-top: clamp(44px, 5vw, 64px); padding-top: clamp(36px, 4vw, 52px);
  border-top: 1px solid var(--line);
}
@media (max-width: 900px) { .project-split { grid-template-columns: minmax(0, 1fr); } }

.solved-list {
  list-style: none; margin: 18px 0 0; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px;
}
.solved-list li { display: grid; gap: 6px; align-content: start; padding: 18px 0 20px; border-top: 1px solid var(--line); }
.solved-list strong { font-weight: 700; font-size: 1.05rem; letter-spacing: -.01em; }
.solved-list span { color: var(--muted); font-size: .99rem; line-height: 1.55; }
@media (max-width: 640px) { .solved-list { grid-template-columns: minmax(0, 1fr); } }

.stack p { margin: 12px 0 18px; color: var(--muted); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  padding: 7px 14px; border-radius: 99px;
  background: var(--tonal); color: var(--on-tonal);
  font-size: .93rem; font-weight: 500;
}

/* Sobre */

.section-about { border-top: 1px solid var(--line); }
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 24px clamp(32px, 5vw, 80px); }
.about-text p { margin: 0 0 18px; color: var(--muted); max-width: 62ch; }
.about-text .about-lead {
  color: var(--ink); font-size: clamp(1.35rem, 1.1rem + .9vw, 1.8rem);
  line-height: 1.32; font-weight: 600; letter-spacing: -.02em; max-width: 34ch; margin-bottom: 24px;
}
@media (max-width: 820px) { .about-grid { grid-template-columns: minmax(0, 1fr); } }

/* Contato */

.section-contact { border-top: 1px solid var(--line); }
.contact-title {
  font-size: clamp(2.4rem, 1.3rem + 4.2vw, 4.8rem);
  line-height: 1; letter-spacing: -.045em; max-width: 13ch; margin-bottom: 40px;
}
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 14px; }
.contact-mail {
  display: inline-flex; align-items: center; gap: 12px; margin-right: 10px;
  color: var(--primary); font-weight: 600;
  font-size: clamp(1.15rem, 1rem + .8vw, 1.55rem);
  text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px;
  overflow-wrap: anywhere;
}
.contact-mail svg { width: 1.15em; height: 1.15em; flex: none; }
.contact-mail:hover { text-decoration-thickness: 3px; }

/* Rodapé */

.site-footer { border-top: 1px solid var(--line); padding: 28px 0 calc(28px + env(safe-area-inset-bottom)); color: var(--muted); font-size: .94rem; }
.footer-row { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
.footer-row a { color: var(--muted); }
.footer-row a:hover { color: var(--ink); }

/* Movimento */

@keyframes phone-in {
  from { opacity: 0; transform: translateY(28px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes pop {
  from { opacity: 0; transform: scale(.55); }
  to { opacity: 1; transform: none; }
}
@keyframes halo {
  0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--primary) 55%, transparent); }
  100% { box-shadow: 0 0 0 5cqw color-mix(in srgb, var(--primary) 0%, transparent); }
}
@keyframes imported {
  0% { background: var(--pv-flash); }
  100% { background: transparent; }
}

::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }

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