@font-face {
  font-family: "Degular";
  src: local("Degular"), local("Degular Regular");
  font-style: normal;
  font-weight: 300 700;
  font-display: swap;
}

@font-face {
  font-family: "Roxborough CF";
  src: local("Roxborough CF"), local("RoxboroughCF-Regular");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root {
  --paper: #f3efe6;
  --ink: #3e4637;
  --leaf: #4e5944;
  --sage: #abcc8e;
  --sage-dark: #556c41;
  --white: #fff;
  --muted: #888;
  color-scheme: light;
  font-family: "Degular", system-ui, sans-serif;
  font-synthesis: none;
}

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

html,
body {
  width: 100%;
  min-width: 280px;
  min-height: 100%;
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
}

button,
input {
  font: inherit;
}

.hero {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  color: var(--ink);
  background-color: var(--paper);
  background-image: url("assets/hero-desktop.jpg");
  background-repeat: no-repeat;
  background-position: 43.16% 52.18%;
  background-size: 141.44% 101.86%;
}

.hero__wash {
  position: absolute;
  z-index: -1;
  left: 116.73%;
  top: -70.26%;
  width: 100.22%;
  height: 263.21%;
  background: radial-gradient(ellipse 58.78% 58.77% at 48.77% 41.24%, transparent 43.01%, rgba(250, 248, 242, .4) 48.56%, #faf8f2 77.88%);
  transform: rotate(77.67deg);
  transform-origin: 0 0;
  pointer-events: none;
}

.hero__ornament {
  position: absolute;
  z-index: -1;
  left: -13.05%;
  top: -144.01%;
  width: 212.09%;
  height: 345.65%;
  pointer-events: none;
}

.hero__ornament img {
  display: block;
  width: 100%;
  height: 100%;
}

.announcement {
  position: absolute;
  z-index: 5;
  top: clamp(14px, 2.1vh, 21px);
  left: 50%;
  width: min(50.6vw, 972px);
  min-width: 660px;
  height: clamp(58px, 7.7vh, 75px);
  padding: 0 32px;
  border-radius: clamp(18px, 2.5vh, 24px);
  color: var(--white);
  background: var(--leaf);
  transform: translateX(-50%);
  animation: reveal-down .8s cubic-bezier(.2, .7, .2, 1) both;
}

.announcement p {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  font-size: clamp(18px, 1.36vw, 26px);
  line-height: 1;
  letter-spacing: -.02em;
  text-align: center;
}

.announcement__curve {
  position: absolute;
  z-index: -1;
  top: 100%;
  left: calc(50% + 10px);
  width: 413.34px;
  height: 75.44px;
  transform: translateX(-50%);
}

.announcement__curve img {
  display: block;
  width: 100%;
  height: 100%;
}

.brand {
  position: absolute;
  z-index: 1;
  top: calc(100% + 3.97px);
  left: calc(50% + 10px);
  display: block;
  width: 127.17px;
  height: 54.25px;
  transform: translateX(-50%);
}

.lead {
  position: absolute;
  z-index: 2;
  top: 31.2%;
  left: clamp(48px, 10.95vw, 212px);
  width: min(34vw, 653px);
}

.lead h1 {
  width: min(29vw, 545px);
  margin: 0 0 clamp(42px, 5.6vh, 55px);
  font-size: clamp(26px, 1.87vw, 36px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -.02em;
  text-wrap: pretty;
  animation: reveal-up .85s .14s cubic-bezier(.2, .7, .2, 1) both;
}

.capture-form {
  display: flex;
  flex-direction: column;
  gap: clamp(16px, 2.55vh, 25px);
  width: 100%;
  margin-left: calc((min(29vw, 545px) - 100%) / 2);
  animation: reveal-up .9s .25s cubic-bezier(.2, .7, .2, 1) both;
}

.capture-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.field {
  position: relative;
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  height: clamp(64px, 8.7vh, 85px);
  border: 2px solid var(--leaf);
  border-radius: 16px;
}

.field legend {
  margin-left: 17px;
  padding: 0 6px;
  color: var(--leaf);
  font-size: clamp(15px, 1.08vw, 21px);
  font-weight: 500;
  line-height: 1;
}

.field input {
  position: absolute;
  z-index: 0;
  top: -3px;
  right: 0;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 48px;
  padding: 0 clamp(16px, 1.25vw, 24px);
  border: 0;
  outline: 0;
  color: var(--leaf);
  background: transparent;
  font-size: clamp(17px, 1.15vw, 22px);
  line-height: 48px;
}

.field input::placeholder {
  color: var(--leaf);
  opacity: 1;
}

.field:focus-within {
  border-color: var(--sage-dark);
  box-shadow: 0 0 0 3px rgba(85, 108, 65, .13);
}

.capture-form button {
  min-height: clamp(64px, 8.4vh, 82px);
  padding: 16px 22px;
  border: 0;
  border-bottom: 2px solid var(--sage-dark);
  border-radius: 14px;
  color: var(--leaf);
  background: var(--sage);
  font-size: clamp(20px, 1.38vw, 27px);
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: -.01em;
  cursor: pointer;
  transition: transform .25s ease, filter .25s ease, box-shadow .25s ease;
}

.capture-form button:hover {
  filter: saturate(1.08) brightness(1.03);
  transform: translateY(-3px);
  box-shadow: 0 12px 30px rgba(51, 65, 48, .18);
}

.capture-form button:active {
  transform: translateY(0);
}

.form-legal,
.form-status {
  margin: -13px 0 0;
  color: var(--leaf);
  font-size: 12px;
  line-height: 1.25;
  text-align: center;
}

.form-legal a,
.footer__terms {
  color: inherit;
  text-underline-offset: 2px;
}

.form-status:empty {
  display: none;
}

.form-status[data-error="true"] {
  color: #812f2f;
}

.capture-form button[disabled] {
  cursor: wait;
  opacity: .72;
}

.button__mobile {
  display: none;
}

.protocol {
  position: absolute;
  z-index: 3;
  top: 17.53%;
  left: 50.29%;
  width: min(31.6vw, 607px);
  height: min(84.3vh, 820px);
  background-image: url("assets/protocolo-mockup.jpg");
  background-repeat: no-repeat;
  background-position: 50.85% 72.03%;
  background-size: 197.03% 117.27%;
  filter: drop-shadow(0 20px 20px rgba(36, 39, 32, .18));
  animation: reveal-up .95s .35s cubic-bezier(.2, .7, .2, 1) both, float 6s 1.3s ease-in-out infinite;
}

.footer {
  position: absolute;
  z-index: 5;
  right: clamp(34px, 4.45vw, 86px);
  bottom: max(18px, env(safe-area-inset-bottom));
  left: clamp(34px, 4.45vw, 86px);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: end;
  color: var(--white);
  font-size: 12px;
  line-height: 16px;
}

.footer p {
  grid-column: 2;
  margin: 0;
  text-align: center;
}

.footer > a {
  grid-column: 3;
  justify-self: end;
  display: grid;
  grid-template-columns: auto 18px;
  color: var(--muted);
  text-decoration: none;
}

.footer > a span,
.footer > a strong {
  grid-column: 1;
  text-align: center;
}

.footer > a span {
  font-weight: 300;
}

.footer > a strong {
  font-size: 8px;
  line-height: 10px;
}

.footer > a img {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-self: center;
  width: 17.73px;
  height: 16px;
}

@keyframes reveal-down {
  from { opacity: 0; transform: translate(-50%, -22px); }
  to { opacity: 1; transform: translate(-50%, 0); }
}

@keyframes reveal-up {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -10px; }
}

/* Notebooks baixos: preserva os 100vh sem cortar formulário ou rodapé. */
@media (min-width: 1024px) {
  .hero {
    height: 100vh;
    height: 100svh;
    min-height: 620px;
  }
}

@media (min-width: 1024px) and (max-height: 760px) {
  .lead {
    top: 28%;
    width: min(35vw, 610px);
  }

  .lead h1 {
    margin-bottom: 34px;
    font-size: clamp(24px, 1.7vw, 31px);
  }

  .capture-form {
    gap: 14px;
  }

  .field,
  .capture-form button {
    min-height: 58px;
    height: 58px;
  }

  .field input {
    top: -6px;
    height: 36px;
    line-height: 36px;
  }

  .form-legal,
  .form-status {
    margin-top: -7px;
    font-size: 11px;
  }

  .protocol {
    top: 12%;
    height: 78vh;
  }
}

/* Tablet: a mesma narrativa, recombinada em duas colunas fluidas. */
@media (min-width: 601px) and (max-width: 1023px) {
  .hero {
    min-height: max(100svh, 820px);
    background-position: 53% center;
  }

  .hero__wash {
    background: linear-gradient(90deg, rgba(243, 239, 230, .92) 0 45%, rgba(243, 239, 230, .25) 78%, transparent 100%);
  }

  .announcement {
    width: min(84vw, 760px);
    min-width: 0;
  }

  .announcement p {
    font-size: clamp(16px, 2.25vw, 22px);
  }

  .lead {
    top: 25%;
    left: 6vw;
    width: 46vw;
  }

  .lead h1 {
    width: 100%;
    margin-bottom: 44px;
    font-size: clamp(25px, 3.6vw, 34px);
  }

  .capture-form__row {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .capture-form {
    gap: 20px;
    margin-left: 0;
  }

  .field,
  .capture-form button {
    height: 64px;
    min-height: 64px;
  }

  .field span {
    font-size: 15px;
  }

  .field input {
    top: -3px;
    height: 40px;
    font-size: 17px;
    line-height: 40px;
  }

  .capture-form button {
    font-size: 20px;
  }

  .protocol {
    top: 20%;
    left: 54%;
    width: 46vw;
    height: min(68vh, 660px);
  }

  .footer {
    right: 28px;
    left: 28px;
  }
}

/* Mobile: segue as posições e proporções do artboard 400 × 1005. */
@media (max-width: 600px) {
  .hero {
    min-height: max(100svh, 1120px);
    background-image: linear-gradient(336deg, rgba(171, 204, 142, .55) -6%, transparent 67%), url("assets/hero-mobile.jpg");
    background-position: center, center top;
    background-size: cover, 100% 103.78%;
  }

  .hero__wash {
    display: none;
  }

  .hero__ornament {
    left: -8.25%;
    top: 0;
    width: 230.57%;
    height: 95.23%;
  }

  .announcement {
    top: 0;
    width: 100%;
    min-width: 0;
    height: 67px;
    padding: 0 max(28px, env(safe-area-inset-left));
    border-radius: 0 0 16px 16px;
  }

  .announcement p {
    width: min(278px, 78vw);
    margin-inline: auto;
    font-size: 16px;
    line-height: 1;
  }

  .brand {
    top: calc(100% + 3px);
    left: 50%;
    width: 88px;
    height: auto;
  }

  .announcement__curve {
    top: calc(100% - 1px);
    left: 50%;
    width: min(242px, 61vw);
    height: 44.17px;
  }

  .lead {
    position: relative;
    top: auto;
    left: auto;
    width: calc(100% - 48px);
    max-width: 335px;
    margin: 0 auto;
    padding-top: 142px;
  }

  .lead h1 {
    width: 100%;
    min-height: 96px;
    margin: 0 0 31px;
    font-size: clamp(20px, 6vw, 24px);
    line-height: 1;
    text-align: center;
  }

  .capture-form,
  .capture-form__row {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    min-width: 0;
    margin-inline: auto;
  }

  .capture-form__row {
    gap: 12px;
  }

  .field,
  .capture-form button {
    width: 100%;
    max-width: 100%;
    height: 64px;
    min-height: 64px;
    border-radius: 12px;
  }

  .button__desktop {
    display: none;
  }

  .button__mobile {
    display: inline;
  }

  .field {
    border-width: 2px;
  }

  .field legend {
    margin-left: 8px;
    padding: 0 6px;
    font-size: 15px;
  }

  .field input {
    top: -4px;
    height: 42px;
    padding: 0 16px;
    font-size: 17px;
    line-height: 42px;
  }

  .capture-form button {
    margin-top: 0;
    padding: 12px 16px;
    font-size: 18px;
  }

  .protocol {
    top: 625px;
    left: 10%;
    width: min(307px, 82vw);
    height: min(416px, 111vw);
    transform: none;
  }

  .footer {
    right: max(11.33%, env(safe-area-inset-right));
    bottom: max(35px, env(safe-area-inset-bottom));
    left: max(8.25%, env(safe-area-inset-left));
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    font-size: 9px;
    line-height: 12px;
  }

  .footer p {
    max-width: 230px;
    text-align: left;
  }

  .footer a {
    color: var(--white);
    flex: 0 0 auto;
  }
}

@media (max-width: 360px) {
  .lead {
    width: calc(100% - 48px);
  }

  .lead h1 {
    font-size: 20px;
  }

  .protocol {
    top: 500px;
  }

  .footer p {
    max-width: 190px;
  }
}

/* Ultrawide: expande a fotografia e mantém o conteúdo no mesmo ritmo visual. */
@media (min-width: 2100px) {
  .lead {
    left: max(11vw, calc((100vw - 2100px) / 2 + 170px));
  }

  .protocol {
    left: 47%;
  }

  .hero {
    background-position: center;
  }
}

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