/* Pontoni Financial — Uma vida em rolagem
   Paleta tirada do logo: preto, azul royal do monograma, marfim do wordmark */
:root {
  --black: #000000;
  --royal: #3556d8;
  --royal-deep: #1d2f80;
  --ivory: #eef0f6;
  --mist: #9097ad;
  --rule: #1f2541;
  --error: #ff8a8a;

  --display: "Marcellus", "Times New Roman", serif;
  --body: "Hanken Grotesk", system-ui, sans-serif;

  --header-h: 96px;
  --gutter: clamp(16px, 4vw, 56px);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--black);
  color: var(--ivory);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--royal); outline-offset: 3px; border-radius: 4px; }

.skip {
  position: absolute; left: -9999px; top: 8px; z-index: 100;
  background: var(--ivory); color: var(--black); padding: 8px 14px; border-radius: 6px;
}
.skip:focus { left: 8px; }

/* ---------- Topo ---------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--header-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--gutter);
  background: linear-gradient(to bottom, rgba(0,0,0,.92), rgba(0,0,0,0));
}
.wordmark {
  display: inline-flex; flex-direction: column; align-items: stretch;
  width: 220px; text-decoration: none; color: var(--ivory);
}
.wordmark img { display: block; width: 100%; height: auto; }
.wordmark__sub {
  display: flex; justify-content: space-between;
  margin-top: 9px; padding: 0 3%;
  font: 500 13px/1 var(--body); letter-spacing: 0;
}
.topbar__actions { display: flex; align-items: center; gap: 20px; }
.topbar__phone { text-decoration: none; font-size: .9375rem; color: var(--mist); }
.topbar__phone:hover { color: var(--ivory); }
.lang { display: flex; border: 1px solid var(--rule); border-radius: 999px; padding: 3px; }
.lang button {
  font: 500 .75rem/1 var(--body); letter-spacing: .08em;
  background: none; color: var(--mist); border: 0; border-radius: 999px;
  padding: 7px 11px; cursor: pointer;
}
.lang button[aria-pressed="true"] { background: var(--ivory); color: var(--black); }

/* ---------- A vida: painel fixo + capítulos ---------- */
.life {
  display: grid;
  grid-template-columns: minmax(0, 44fr) minmax(0, 56fr);
}

.clock {
  position: sticky; top: 0;
  height: 100vh; height: 100svh;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
/* horizonte azul que sobe conforme a idade avança */
.clock::before {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: calc(var(--progress, 0) * 100%);
  background: linear-gradient(to top, rgba(53,86,216,.22), rgba(53,86,216,0));
  transition: height .25s linear;
  pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, #000 55%, transparent);
          mask-image: linear-gradient(to right, #000 55%, transparent);
}
.clock__inner { position: relative; text-align: center; }
.clock__age {
  font-family: var(--display);
  font-size: clamp(9rem, 22vw, 22rem);
  line-height: .82;
  letter-spacing: -.02em;
  font-variant-numeric: lining-nums tabular-nums;
  color: var(--ivory);
}
.clock__label {
  margin-top: .9rem;
  font-size: 1rem; letter-spacing: .3em; padding-left: .3em;
  color: var(--royal);
}

.lifeline {
  position: absolute; left: var(--gutter); top: 22%; bottom: 22%;
  margin: 0; padding: 0 0 0 18px; list-style: none;
  display: flex; flex-direction: column; justify-content: space-between;
  border-left: 1px solid var(--rule);
  font-size: .8125rem; color: var(--mist);
}
.lifeline li { position: relative; line-height: 1; transition: color .3s; }
.lifeline li::before {
  content: ""; position: absolute; left: -22px; top: 50%;
  width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: var(--black); border: 1px solid var(--mist);
  transition: background .3s, border-color .3s;
}
.lifeline li.is-past { color: var(--ivory); }
.lifeline li.is-past::before { background: var(--royal); border-color: var(--royal); }
.lifeline li.is-active { color: var(--ivory); font-weight: 600; }
.lifeline__fill {
  position: absolute; left: -1px; top: 0; width: 1px;
  height: calc(var(--progress, 0) * 100%);
  background: var(--royal);
}

/* ---------- Capítulos ---------- */
.chapters { padding: 0 var(--gutter) 0 clamp(16px, 3vw, 40px); }
.chapter {
  min-height: 100vh; min-height: 100svh;
  max-width: 34rem;
  display: flex; flex-direction: column; justify-content: center;
  padding: calc(var(--header-h) + 24px) 0 48px;
}
.chapter h1, .chapter h2 {
  font-family: var(--display); font-weight: 400;
  margin: 0 0 1.25rem; line-height: 1.08; letter-spacing: -.005em;
}
.chapter h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); }
.chapter h2 { font-size: clamp(2.2rem, 4.2vw, 3.6rem); }
.chapter p { margin: 0; max-width: 32rem; color: #c9cdda; font-size: 1.1875rem; line-height: 1.65; }
.chapter .lede { font-size: 1.25rem; color: #c9cdda; }

.chapter__age {
  display: none; /* aparece só no celular, onde o painel é menor */
  color: var(--royal) !important; font-size: .9375rem !important; letter-spacing: .2em; margin-bottom: 1rem !important;
}

.monogram { display: block; width: 64px; height: auto; margin-bottom: 2.5rem; }

.cue { margin-top: 3rem !important; font-size: .9375rem !important; color: var(--mist) !important; display: flex; align-items: center; gap: 12px; }
.cue::after {
  content: ""; width: 1px; height: 40px; background: linear-gradient(var(--royal), transparent);
  animation: drip 2.2s ease-in-out infinite;
}
@keyframes drip { 0% { transform: scaleY(0); transform-origin: top; } 50% { transform: scaleY(1); transform-origin: top; } 51% { transform-origin: bottom; } 100% { transform: scaleY(0); transform-origin: bottom; } }

.chapter--legacy h2 { font-size: clamp(3rem, 6vw, 5.4rem); }

/* ---------- Contato ---------- */
.chapter--contact { justify-content: flex-start; padding-top: calc(var(--header-h) + 8vh); }
#contato { scroll-margin-top: 0; }
.direct { display: flex; flex-wrap: wrap; gap: 12px; margin: 2rem 0 2.5rem; }
.direct__link {
  flex: 1 1 200px;
  display: flex; flex-direction: column; gap: 2px;
  padding: 16px 20px; border: 1px solid var(--rule); border-radius: 14px;
  text-decoration: none; transition: border-color .2s;
}
.direct__link span { font-size: .875rem; color: var(--mist); }
.direct__link strong { font-weight: 500; font-size: 1.0625rem; }
.direct__link:hover { border-color: var(--royal); }

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 6px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field label, .field legend { font-size: .9375rem; color: var(--mist); padding: 0; }
.field legend { margin-bottom: 10px; }
.field input, .field textarea {
  width: 100%;
  font: 400 1.0625rem/1.4 var(--body); color: var(--ivory);
  background: transparent; border: 0; border-bottom: 1px solid var(--rule);
  padding: 10px 0; border-radius: 0;
  transition: border-color .2s;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input::placeholder { color: #4a5068; }
.field input:-webkit-autofill,
.field input:-webkit-autofill:hover,
.field input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--ivory);
  -webkit-box-shadow: 0 0 0 1000px var(--black) inset;
  caret-color: var(--ivory);
  transition: background-color 9999s ease-out 0s;
}
.field input:focus, .field textarea:focus { outline: none; border-bottom-color: var(--royal); }
.field input[aria-invalid="true"] { border-bottom-color: var(--error); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span {
  display: inline-block; padding: 9px 15px; border: 1px solid var(--rule); border-radius: 999px;
  font-size: .9375rem; color: #c9cdda; transition: background .2s, border-color .2s, color .2s;
}
.chip input:checked + span { background: var(--royal); border-color: var(--royal); color: #fff; }
.chip input:focus-visible + span { outline: 2px solid var(--ivory); outline-offset: 2px; }

.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: .875rem; color: var(--mist); line-height: 1.5; cursor: pointer; }
.consent input { margin-top: 3px; accent-color: var(--royal); width: 18px; height: 18px; flex: none; }

.submit {
  justify-self: start;
  font: 600 1rem/1 var(--body); color: var(--black);
  background: var(--ivory); border: 0; border-radius: 999px;
  padding: 18px 32px; cursor: pointer; transition: background .2s, transform .2s;
}
.submit:hover { background: #fff; }
.submit:active { transform: scale(.98); }
.submit[disabled] { opacity: .6; cursor: progress; }

.status { min-height: 1.6em; font-size: .9375rem !important; }
.status.is-ok { color: var(--ivory) !important; }
.status.is-error { color: var(--error) !important; }

/* ---------- Rodapé ---------- */
.footer {
  border-top: 1px solid var(--rule);
  padding: 48px var(--gutter) 40px;
  display: grid; gap: 14px; justify-items: start;
  font-size: .875rem; color: var(--mist);
}
.wordmark--footer { width: 190px; }
.footer__contact a { text-decoration: none; color: var(--ivory); }
.footer p { margin: 0; max-width: 46rem; }

/* ---------- Celular e tablet ---------- */
@media (max-width: 860px) {
  :root { --header-h: 72px; }
  .wordmark { width: 150px; }
  .wordmark__sub { font-size: 10.5px; margin-top: 6px; }
  .topbar__phone { display: none; }
  .topbar { background: var(--black); }
  #contato { scroll-margin-top: calc(var(--header-h) + 76px); }
  .life { display: block; }
  .clock {
    position: sticky; top: var(--header-h); z-index: 10;
    height: auto; padding: 4px var(--gutter) 14px;
    justify-content: flex-start;
    background: var(--black);
    border-bottom: 1px solid var(--rule);
  }
  .clock::before { display: none; }
  .clock__inner { display: flex; align-items: baseline; gap: 12px; text-align: left; }
  .clock__age { font-size: 3.5rem; line-height: 1; }
  .clock__label { margin: 0; font-size: .8125rem; }
  .lifeline {
    position: absolute; left: auto; right: var(--gutter); top: 50%; bottom: auto;
    transform: translateY(-50%);
    flex-direction: row; gap: 14px; padding: 0; border: 0;
    font-size: .75rem;
  }
  .lifeline li::before { display: none; }
  .lifeline__fill { display: none; }
  .chapters { padding: 0 var(--gutter); }
  .chapter { min-height: 78vh; padding: 64px 0; }
  .chapter--hero { min-height: calc(100svh - 160px); padding-top: 48px; }
  .chapter--contact { padding-top: 56px; }
  .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 420px) {
  .lifeline li:not(.is-active) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
