@font-face {
  font-family: 'Cera';
  src: url('../fonts/Cera-Regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Cera';
  src: url('../fonts/Cera-Bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --green: #165b24;
  --pink: #ec619f;
  --salmon: #d88875;
  --yellow: #f8ac53;
  --purple: #988ac1;
  --grid: rgba(216, 136, 117, .13);

  --font: 'Cera', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  /* DESIGN SYSTEM — não criar outros tamanhos sem decisão explícita */
  --type-big: 37px;
  --type-small: 20px;
  --type-field: 16px;
  --type-button: var(--type-small);

  --line-big: 1.12;
  --line-small: 1.14;

  --pad-x: 96px;
  --page-max: 1280px;
  --content-mobile: 360px;
  --section-gap-mobile: 94px;
  --header-h: 96px;

  --radius-pill: 999px;
  --button-h: 48px;
  --button-pad-x: 28px;
  --input-h: 54px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--green); }
body {
  margin: 0;
  background: var(--green);
  color: var(--salmon);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
button, input { font: inherit; }
button { cursor: pointer; }
img { display: block; max-width: 100%; height: auto; }
h1, h2, p, figure { margin: 0; }

.skip-link,
.sr-only,
.hp-field {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}
.skip-link:focus {
  width: auto; height: auto; clip: auto;
  margin: 12px; padding: 10px 14px;
  background: var(--yellow); color: var(--green);
  border-radius: 14px; z-index: 100;
}

/* Tipografia: apenas dois estilos principais + campo */
.t-big,
.text-title,
.text-section-title,
.text-subtitle,
.text-callout {
  font-size: var(--type-big);
  line-height: var(--line-big);
  font-weight: 700;
  letter-spacing: .005em;
}
.t-small,
.text-body {
  font-size: var(--type-small);
  line-height: var(--line-small);
  font-weight: 400;
  letter-spacing: .005em;
}
.text-pink { color: var(--pink); }
.text-salmon { color: var(--salmon); }
.text-yellow { color: var(--yellow); }
.text-purple { color: var(--purple); }
small { font-size: 1em; }

/* Header com faixa de proteção */
.site-header {
  position: fixed;
  z-index: 50;
  inset: 0 0 auto 0;
  height: var(--header-h);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  padding: 27px var(--pad-x) 0;
  background: linear-gradient(to bottom, var(--green) 0%, var(--green) 82%, rgba(22,91,36,0) 100%);
  pointer-events: none;
}
.brand, .menu {
  border: 0;
  background: transparent;
  padding: 0;
  pointer-events: auto;
}
.brand img { width: 78px; }
.brand-text { color: var(--pink); font-size: var(--type-big); font-weight: 700; }
.menu img { width: 24px; }
.menu-fallback::before { content: '☰'; color: var(--salmon); font-size: 26px; line-height: 1; }

.section { background: var(--green); }
.section-inner {
  width: min(100%, var(--page-max));
  margin-inline: auto;
  padding-inline: var(--pad-x);
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--button-h);
  padding: 0 var(--button-pad-x);
  border: 0;
  border-radius: var(--radius-pill);
  color: var(--green);
  font-size: var(--type-button);
  line-height: 1;
  font-weight: 700;
  letter-spacing: .005em;
  text-align: center;
  white-space: nowrap;
  transition: transform .14s ease, filter .14s ease;
}
.button:hover { transform: translateY(-1px); filter: brightness(1.03); }
.button:active { transform: translateY(0); }
.button-primary { background: var(--pink); }
.button-secondary { background: var(--yellow); }

.input {
  display: block;
  width: 100%;
  min-height: var(--input-h);
  padding: 0 20px;
  border: 0;
  border-radius: 12px;
  background: var(--yellow);
  color: var(--green);
  font-size: var(--type-field);
  line-height: 1;
  font-weight: 700;
  outline: 2px solid transparent;
}
.input:focus { outline-color: var(--pink); }
.input::placeholder { color: rgba(22,91,36,.88); opacity: 1; }

.grid-panel {
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 28px 28px;
  background-position: center;
}

/* HERO */
.section-hero { padding-top: var(--header-h); }
.hero-layout {
  min-height: calc(100vh - var(--header-h));
  display: grid;
  align-content: stretch;
  justify-items: start;
  max-width: var(--content-mobile);
  margin-inline: auto;
  padding-top: 0;
  padding-bottom: 28px;
}
.hero-copy {
  width: 100%;
  min-height: calc(100vh - var(--header-h) - 28px);
  display: grid;
  align-content: space-around;
}
.hero-title { margin-top: 0; color: var(--salmon); }
.hero-art-mobile {
  display: block;
  width: 226px;
  margin: 18px auto 0;
  justify-self: center;
}
.hero-art-desktop { display: none; }
.hero-copy .button {
  width: 100%;
  margin-top: 21px;
}
.hero-caption { margin-top: 12px; padding-left: 26px; color: var(--salmon); }

/* DOBRA 2 — diagrama rígido, texto sempre small */
.section-salt { padding-bottom: var(--section-gap-mobile); }
.salt-layout {
  max-width: var(--content-mobile);
  margin-inline: auto;
  display: grid;
}
.salt-copy { width: 100%; }
.salt-copy .text-section-title { color: var(--pink); margin-bottom: 29px; }
.salt-diagram {
  position: relative;
  width: 100%;
  min-height: 170px;
}
.salt-text { color: var(--salmon); }
.salt-origin {
  position: absolute;
  top: 0;
  left: 4px;
  width: 160px;
}
.salt-button {
  position: absolute;
  top: 26px;
  right: 0;
  min-width: 121px;
}
.diagram-arrow { position: absolute; display: block; color: var(--salmon); }
.diagram-arrow-right {
  top: 42px;
  left: 122px;
  width: 70px;
  border-top: 2px solid currentColor;
}
.diagram-arrow-right::after {
  content: '';
  position: absolute;
  right: -1px;
  top: -9px;
  width: 16px;
  height: 16px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
.diagram-arrow-down {
  top: 78px;
  left: 4px;
  height: 78px;
  border-left: 2px solid currentColor;
}
.diagram-arrow-down::after {
  content: '';
  position: absolute;
  left: -9px;
  bottom: 0;
  width: 16px;
  height: 16px;
  border-bottom: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}
.salt-result {
  position: absolute;
  top: 121px;
  left: 4px;
  width: 292px;
}
.ice-art {
  width: 226px;
  justify-self: center;
  margin-top: 42px;
  margin-inline: auto;
}

/* DOBRA 3 */
.section-statement { padding-bottom: 92px; }
.statement-layout {
  max-width: var(--content-mobile);
  margin-inline: auto;
  display: grid;
  gap: 42px;
}
.statement-card {
  width: 250px;
  min-height: 248px;
  justify-self: start;
  padding-top: 11px;
  display: grid;
  align-content: start;
  gap: 21px;
  background-position: center;
}
.statement-card .text-callout { color: var(--pink); }
.promise-copy { width: 290px; justify-self: start; }
.promise-copy .text-subtitle { color: var(--salmon); }

/* DOBRA 4 */
.section-relationship { padding: 52px 0 74px; background-color: var(--green); }
.relationship-inner {
  width: min(100%, 420px);
  margin-inline: auto;
  padding-inline: 0;
}
.relationship-title {
  color: var(--pink);
  width: 320px;
  margin-inline: auto;
  margin-bottom: 28px;
}
.relationship-diagram { width: 100%; overflow: visible; padding-inline: var(--pad-x); }
.relationship-diagram img { width: 100%; max-width: none; }

/* DOBRA 5 */
.section-works { padding: 118px 0 124px; }
.works-layout {
  max-width: var(--content-mobile);
  margin-inline: auto;
  display: grid;
}
.works-layout .text-subtitle { color: var(--salmon); margin-bottom: 30px; }
.mini-form {
  display: grid;
  gap: 26px;
  justify-items: start;
}
.mini-form label { color: var(--salmon); }
.input-project { width: 100%; background: var(--salmon); color: var(--green); }
.input-project::placeholder { color: rgba(22,91,36,.88); }
.mini-form .button { justify-self: end; margin-top: -5px; }

/* ONBOARDING PROGRESSIVO */
.onboarding { padding: 48px 0 90px; background: var(--green); }
.waitlist-form {
  width: min(100% - (var(--pad-x) * 2), var(--content-mobile));
  margin-inline: auto;
  display: grid;
  gap: 72px;
}
.step { display: none; }
.step.is-open { display: block; animation: reveal .28s ease both; }
@keyframes reveal { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: translateY(0); } }
.step-inner { display: grid; gap: 26px; }
.step-inner .text-subtitle { color: var(--salmon); }
.step-inner .text-body { color: var(--salmon); }
.field-row,
.chips-inputs,
.signup-fields {
  display: grid;
  gap: 14px;
}
.field-row { grid-template-columns: 1fr; align-items: center; }
.chips-inputs { grid-template-columns: 1fr; }
.icon-button {
  min-height: var(--button-h);
  border: 0;
  border-radius: var(--radius-pill);
  background: var(--pink);
  color: var(--green);
  font-size: var(--type-button);
  font-weight: 700;
  line-height: 1;
  padding: 0 var(--button-pad-x);
  justify-self: end;
}
.hint,
.inline-link {
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--purple);
  text-align: left;
  font-size: var(--type-field);
  line-height: 1.12;
  font-weight: 400;
}
.checkline {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--salmon);
  font-size: var(--type-field);
  line-height: 1.25;
}
.checkline input { margin-top: 1px; accent-color: var(--pink); }
.form-message { color: var(--pink); }

.modal {
  width: min(92vw, 560px);
  border: 0;
  border-radius: 24px;
  padding: 30px;
  background: var(--yellow);
  color: var(--green);
  font-family: var(--font);
}
.modal::backdrop { background: rgba(0,0,0,.45); }
.modal h2 { font-size: var(--type-big); line-height: var(--line-big); margin: 0 0 18px; }
.modal p { font-size: var(--type-small); line-height: var(--line-small); margin: 0 0 14px; }
.modal-close {
  float: right;
  border: 0;
  background: transparent;
  color: var(--green);
  font-size: 28px;
  line-height: 1;
}

/* DESKTOP: deriva do mobile sem criar nova escala tipográfica */
@media (min-width: 760px) {
  :root {
    --type-big: clamp(38px, 3.6vw, 66px);
    --type-small: clamp(18px, 1.4vw, 24px);
    --type-field: 14px;
    --button-h: 56px;
    --input-h: 52px;
    --header-h: 102px;
  }
  .site-header { padding-top: 34px; }
  .brand img { width: clamp(110px, 12vw, 180px); }
  .menu img { width: clamp(28px, 2.1vw, 38px); }

  .hero-layout {
    max-width: var(--page-max);
    min-height: calc(100vh - var(--header-h));
    grid-template-columns: minmax(320px, 0.86fr) minmax(340px, 1fr);
    align-items: center;
    justify-items: stretch;
    gap: clamp(64px, 7vw, 116px);
    padding-bottom: 90px;
  }
  .hero-copy { width: min(100%, 540px); min-height: auto; display: block; justify-self: start; }
  .hero-art-mobile { display: none; }
  .hero-art-desktop { display: block; width: min(34vw, 390px); justify-self: center; }
  .hero-copy .button { width: min(100%, 300px); margin-top: 42px; }
  .hero-caption { margin-top: 12px; padding-left: 34px; }

  .salt-layout {
    max-width: var(--page-max);
    min-height: 74vh;
    grid-template-columns: minmax(620px, 1fr) minmax(320px, .72fr);
    align-items: center;
    gap: clamp(48px, 6vw, 90px);
  }
  .salt-copy { justify-self: start; width: min(100%, 720px); }
  .salt-diagram { width: min(100%, 720px); min-height: 250px; }
  .salt-origin { left: 0; width: 260px; }
  .diagram-arrow-right { top: 56px; left: 230px; width: 168px; }
  .salt-button { top: 28px; left: 396px; right: auto; min-width: 220px; }
  .diagram-arrow-down { top: 90px; height: 100px; }
  .salt-result { top: 160px; width: 620px; }
  .ice-art { width: min(34vw, 430px); justify-self: center; margin-top: 110px; }

  .statement-layout {
    max-width: var(--page-max);
    grid-template-columns: minmax(300px, .82fr) minmax(260px, .78fr) minmax(360px, 1fr);
    align-items: center;
    gap: clamp(44px, 5vw, 76px);
    padding-top: 52px;
    padding-bottom: 88px;
  }
  .statement-card {
    width: 100%;
    min-height: 360px;
    justify-self: stretch;
    background-image: none;
    padding-top: 0;
    align-content: center;
  }
  .statement-layout::before {
    content: '';
    display: block;
    width: 100%;
    min-height: 360px;
    background-image:
      linear-gradient(var(--grid) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid) 1px, transparent 1px);
    background-size: 32px 32px;
    background-position: center;
    order: 2;
  }
  .statement-card { order: 1; }
  .promise-copy { width: 100%; justify-self: stretch; order: 3; }

  .section-relationship { padding: 70px 0 90px; }
  .relationship-inner { width: min(100%, var(--page-max)); padding-inline: var(--pad-x); }
  .relationship-title { width: 100%; max-width: 700px; margin-left: 0; margin-bottom: 36px; }
  .relationship-diagram { width: 100%; padding-inline: 0; }

  .works-layout,
  .waitlist-form { max-width: var(--page-max); }
  .mini-form {
    grid-template-columns: minmax(260px, 0.34fr) minmax(320px, 0.46fr) auto;
    align-items: center;
    gap: 28px;
    max-width: 900px;
  }
  .mini-form .button { margin-top: 0; justify-self: start; }
  .step-inner { max-width: 900px; }
  .field-row { grid-template-columns: minmax(380px, 640px) auto; }
  .chips-inputs { grid-template-columns: repeat(3, minmax(170px, 1fr)) auto; max-width: 900px; }
  .signup-fields { grid-template-columns: 1fr; max-width: 420px; margin-left: 0; }
}

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


/* Ajustes finais consolidados
   Mantém o ritmo de tela cheia no desktop, simplifica a dobra 2
   e remove seletores antigos que não existiam mais no HTML. */
@media (min-width: 760px) {
  .section-inner {
    width: min(100%, var(--page-max));
    margin-inline: auto;
    padding-inline: var(--pad-x);
  }

  .section-hero,
  .section-salt,
  .section-statement,
  .section-works,
  .section-relationship,
  .onboarding .step {
    min-height: 100vh;
  }

  .section-hero { padding-top: 0; }

  .hero-layout {
    min-height: 100vh;
    padding-top: var(--header-h);
    padding-bottom: 0;
    align-content: center;
  }

  .hero-copy {
    min-height: auto;
    display: block;
    width: min(100%, 560px);
  }

  .hero-title {
    max-width: 560px;
  }

  .hero-copy .button {
    width: auto;
    min-width: 258px;
    margin-top: 42px;
  }

  .hero-caption {
    margin-top: 10px;
    padding-left: 28px;
  }

  .section-salt,
  .section-statement,
  .section-relationship,
  .section-works {
    display: grid;
    align-items: center;
    padding: var(--header-h) 0 0;
  }

  .salt-layout,
  .statement-layout,
  .works-layout {
    min-height: calc(100vh - var(--header-h));
    padding-top: 0;
    padding-bottom: 0;
    align-content: center;
  }

  .salt-layout {
    grid-template-columns: minmax(420px, .9fr) minmax(360px, .7fr);
  }

  .salt-copy { width: min(100%, 560px); }
  .salt-diagram {
    width: min(100%, 560px);
    gap: 34px;
  }
  .salt-result { max-width: 560px; }
  .ice-art {
    width: min(31vw, 430px);
    justify-self: center;
    align-self: center;
    margin: 0;
  }

  .relationship-inner { align-self: center; }
  .works-layout .text-subtitle { margin-bottom: 48px; }

  .mini-form {
    width: min(100%, 980px);
    max-width: none;
  }

  .onboarding { padding: 0; }
  .waitlist-form {
    width: min(100%, var(--page-max));
    max-width: var(--page-max);
    margin-inline: auto;
    padding-inline: var(--pad-x);
    gap: 0;
  }

  .step.is-open {
    display: grid;
    align-items: center;
  }

  .step-inner {
    width: min(100%, 980px);
    max-width: none;
    justify-self: start;
  }

  .field-row {
    grid-template-columns: minmax(440px, 720px) auto;
    max-width: 820px;
  }

  .chips-inputs {
    grid-template-columns: repeat(3, minmax(170px, 1fr)) auto;
    max-width: 900px;
  }

  .signup-fields { max-width: 460px; }
}

.section-salt .salt-diagram {
  position: static;
  min-height: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 30px;
  width: 100%;
}

.section-salt .salt-origin,
.section-salt .salt-button,
.section-salt .salt-result {
  position: static;
  inset: auto;
  width: auto;
  max-width: 100%;
}

.section-salt .salt-button { min-width: 205px; }
.section-salt .diagram-arrow { display: none; }
.step-inner small {
  display: block;
  margin-top: 6px;
  font-size: var(--type-field);
  line-height: 1.3;
  opacity: .92;
}

.field-row input,
.chips-inputs input {
  background: var(--salmon);
  color: var(--green);
}

.field-row input::placeholder,
.chips-inputs input::placeholder {
  color: rgba(22,91,36,.72);
}

.field-row { gap: 16px; }
.field-row .icon-button,
.chips-inputs .icon-button {
  background: var(--yellow);
  color: var(--green);
}

.signup-fields input { background: var(--yellow); }
.create-account-title {
  color: var(--pink);
  font-weight: 700;
}

.step-anchor-top { scroll-margin-top: 120px; }
.section-hero figure img,
.ice-art img,
.relationship-diagram img { cursor: pointer; }

@media (max-width: 759px) {
  .section + .section {
    margin-top: 54px;
  }

  .section-salt .salt-layout { max-width: var(--content-mobile); }
  .section-salt .salt-diagram { gap: 26px; }
  .section-salt .salt-result { max-width: 305px; }

  .ice-art {
    width: min(320px, 90vw);
  }
}

/* FASE 2 — termos, rodapé, cookies e confirmação de lista de espera */
.section-waitlist-success {
  padding: 112px 0 118px;
  background: var(--green);
}
.success-layout {
  width: min(100% - (var(--pad-x) * 2), var(--content-mobile));
  max-width: var(--content-mobile);
  margin-inline: auto;
  display: grid;
  gap: 26px;
}
.success-layout .text-body { color: var(--salmon); }
.success-layout a,
.site-footer a {
  color: var(--pink);
  text-decoration: none;
}
.success-layout a:hover,
.site-footer a:hover { text-decoration: underline; }

.site-footer {
  padding: 34px var(--pad-x) 42px;
  background: var(--green);
  color: var(--salmon);
  font-size: var(--type-field);
  line-height: 1.35;
}
.site-footer p {
  width: min(100%, var(--page-max));
  margin-inline: auto;
}

.cookie-banner {
  position: fixed;
  z-index: 80;
  left: var(--pad-x);
  right: var(--pad-x);
  bottom: 18px;
  width: min(calc(100vw - (var(--pad-x) * 2)), 720px);
  margin-inline: auto;
  display: grid;
  gap: 16px;
  padding: 18px;
  border-radius: 24px;
  background: var(--yellow);
  color: var(--green);
  box-shadow: 0 18px 50px rgba(0,0,0,.22);
}
.cookie-banner[hidden] { display: none; }
.cookie-banner p {
  font-size: var(--type-field);
  line-height: 1.25;
}
.cookie-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}
.cookie-actions .button {
  min-height: 42px;
  font-size: var(--type-field);
}

@media (min-width: 760px) {
  .section-waitlist-success {
    min-height: 100vh;
    display: grid;
    align-items: center;
    padding: var(--header-h) 0 0;
  }
  .success-layout {
    width: min(100%, var(--page-max));
    max-width: var(--page-max);
    padding-inline: var(--pad-x);
    gap: 30px;
  }
  .success-layout .text-body { max-width: 780px; }
  .site-footer { padding-top: 44px; padding-bottom: 50px; }
  .cookie-banner {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}

/* Correção: a confirmação da lista de espera deve nascer escondida
   e aparecer apenas após envio bem-sucedido do formulário. */
.section-waitlist-success[hidden] {
  display: none !important;
}


/* Safari-safe responsive fallbacks */
@media (max-width: 1024px) {
  :root {
    --type-big: 34px;
    --type-small: 19px;
    --pad-x: 48px;
  }
}

@media (max-width: 768px) {
  :root {
    --type-big: 31px;
    --type-small: 18px;
    --pad-x: 28px;
  }
}

/* Flex gap fallbacks */
.hero-actions > * { margin-right: 14px; }
.hero-actions > *:last-child { margin-right: 0; }

.form-row > * { margin-bottom: 12px; }
.form-row > *:last-child { margin-bottom: 0; }

/* Safari antigo: <dialog> sem suporte nativo aparece como bloco comum.
   Por isso, todos os modais ficam ocultos por padrão e só aparecem quando abertos. */
dialog.modal,
.modal:not([open]):not(.is-open) {
  display: none !important;
}

dialog.modal[open],
dialog.modal.is-open {
  display: block !important;
  position: fixed;
  z-index: 100;
  left: 50%;
  top: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%);
  max-height: 82vh;
  overflow: auto;
  box-sizing: border-box;
}

.modal-fallback-backdrop {
  display: none;
  position: fixed;
  z-index: 90;
  inset: 0;
  background: rgba(0,0,0,.45);
}

.modal-fallback-backdrop.is-open {
  display: block;
}
