/*
  Landing da Una Sistemas: base, aparelhos, telas fictícias, formulário de contato e rodapé.
  Este arquivo já monta a página completa sem animação (celular, ou pedido de menos movimento).
  A coreografia do scroll fica em scenes.css, ligada pela classe .motion no <html> (motion.js).
*/

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

html {
  --mx: 0;
  --my: 0;
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--una-graphite);
  color: var(--una-cream);
  font-family: var(--una-font-text);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: var(--una-font-title);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.05;
  margin: 0;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--una-lime);
  outline-offset: 3px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Topo ---------- */

.top {
  position: absolute;
  inset: 0 0 auto;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px clamp(20px, 4vw, 48px);
}

.top__logo img {
  width: 104px;
  height: auto;
}

.top__link {
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--una-cream);
  text-decoration: none;
  padding: 10px 16px;
  border: 1px solid rgb(242 238 229 / 0.24);
  border-radius: 999px;
  transition: background-color 0.2s, border-color 0.2s;
}

.top__link:hover {
  background: rgb(242 238 229 / 0.08);
  border-color: rgb(242 238 229 / 0.5);
}

/* ---------- Cena 1: órbita ---------- */

.scene {
  position: relative;
}

.scene--orbit .stage {
  position: relative;
  min-height: 100svh;
  display: grid;
  align-items: end;
  overflow: hidden;
  padding: 120px clamp(20px, 5vw, 72px) clamp(40px, 8vh, 88px);
}

.orbit {
  position: absolute;
  /* Centro da órbita no alto, à direita: o título ocupa o canto de baixo, à esquerda. */
  inset: 0 0 42% 26%;
  perspective: 1400px;
  pointer-events: none;
}

.orbit__plane {
  --r: min(30vw, 400px);
  position: absolute;
  top: 50%;
  left: 50%;
  width: calc(var(--r) * 2);
  height: calc(var(--r) * 2);
  margin: calc(var(--r) * -1) 0 0 calc(var(--r) * -1);
  transform-style: preserve-3d;
  transform: rotateX(calc(68deg + var(--my) * 8deg)) rotateZ(calc(var(--mx) * 8deg));
}

.orbit__track {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid rgb(242 238 229 / 0.14);
}

.orbit__spin {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  animation: orbit-spin 40s linear infinite;
}

.planet {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 56px;
  height: 56px;
  margin: -28px 0 0 -28px;
  transform-style: preserve-3d;
  transform: rotate(var(--a)) translateX(var(--r)) rotate(calc(var(--a) * -1));
}

.planet img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgb(0 0 0 / 0.45);
  animation: orbit-face 40s linear infinite;
}

@keyframes orbit-spin {
  to {
    transform: rotateZ(360deg);
  }
}

/* Contragiro: os ícones ficam de frente e em pé enquanto a órbita gira inclinada. */
@keyframes orbit-face {
  from {
    transform: rotateZ(0deg) rotateX(-68deg);
  }
  to {
    transform: rotateZ(-360deg) rotateX(-68deg);
  }
}

.orbit__core {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22px;
  height: 22px;
  margin: -11px 0 0 -11px;
  border-radius: 50%;
  background: var(--una-lime);
  box-shadow: 0 0 40px rgb(184 230 46 / 0.55);
}

.hero-copy {
  position: relative;
  z-index: 2;
}

.hero-copy h1 {
  font-size: clamp(2.5rem, 6.4vw, 5.75rem);
  letter-spacing: -0.045em;
}

.hero-copy h1 span {
  display: block;
}

.hero-copy p {
  margin: 20px 0 0;
  max-width: 34ch;
  color: rgb(242 238 229 / 0.72);
  font-size: clamp(1rem, 1.4vw, 1.1875rem);
}

.hero-next {
  display: inline-block;
  margin-top: 28px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--una-lime);
  color: var(--una-graphite);
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s;
}

.hero-next:hover {
  transform: translateY(-2px);
}

/* ---------- Cena 2: vitrine ---------- */

.slide {
  position: relative;
  display: grid;
  gap: 40px;
  align-items: center;
  padding: 72px clamp(20px, 5vw, 64px);
  background: var(--c);
  color: var(--una-cream);
}

.pitch {
  max-width: 30rem;
}

.pitch__icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 24px;
}

.pitch h2 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
}

.pitch p {
  margin: 16px 0 28px;
  font-size: clamp(1.125rem, 2vw, 1.5rem);
  line-height: 1.35;
  color: rgb(242 238 229 / 0.86);
  max-width: 22ch;
}

.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--una-cream);
  color: var(--una-graphite);
  font-weight: 500;
  text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s;
}

.cta:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(0 0 0 / 0.25);
}

.cta:focus-visible {
  outline-color: var(--glow);
}

.progress {
  display: none;
}

/* Aparelhos */

.devices {
  position: relative;
  width: 100%;
  max-width: 760px;
  justify-self: center;
  padding: 0 0 6% 0;
}

.laptop__screen {
  aspect-ratio: 16 / 10;
  border: 10px solid #0d0d0d;
  border-bottom-width: 14px;
  border-radius: 16px 16px 4px 4px;
  background: #fbfaf7;
  overflow: hidden;
  box-shadow: 0 30px 60px rgb(0 0 0 / 0.35);
}

.laptop__base {
  height: 14px;
  margin: 0 -7%;
  border-radius: 0 0 14px 14px;
  background: linear-gradient(#d6d3cc, #a9a59c);
}

.phone {
  position: absolute;
  right: -2%;
  bottom: 0;
  width: 26%;
  aspect-ratio: 9 / 19;
  border: 7px solid #0d0d0d;
  border-radius: 26px;
  background: #fbfaf7;
  box-shadow: 0 24px 48px rgb(0 0 0 / 0.4);
  overflow: hidden;
}

.phone__screen {
  height: 100%;
  color: var(--una-graphite);
  background: #fbfaf7;
}

/* Tela de app no celular. Tudo em cqi (largura do celular): o mesmo desenho serve no desktop (pequeno) e no
   celular (grande, legível). */
.phone {
  container-type: inline-size;
}

.pa {
  display: flex;
  flex-direction: column;
  gap: 4cqi;
  padding: 0 6cqi;
  font-size: 5.2cqi;
  line-height: 1.3;
}

.pa__status {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4cqi 2cqi 0;
  font-size: 0.85em;
  font-weight: 600;
}

.pa__status i {
  width: 14%;
  height: 3.2cqi;
  border-radius: 999px;
  background: #1f1f1f;
  opacity: 0.8;
}

.pa__head {
  display: flex;
  flex-direction: column;
  margin-top: 2cqi;
}

.pa__head b {
  font-family: var(--una-font-title);
  font-size: 1.55em;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.pa__head span,
.pa__list span {
  color: #6b675e;
  font-size: 0.86em;
}

.pa__hero {
  display: flex;
  flex-direction: column;
  gap: 1cqi;
  padding: 5cqi;
  border-radius: 5cqi;
  background: var(--c);
  color: #fff;
}

.pa__hero span,
.pa__hero small {
  font-size: 0.86em;
  opacity: 0.85;
}

.pa__hero b {
  font-family: var(--una-font-title);
  font-size: 1.9em;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.pa__hero .pa__hero-text {
  font-size: 1.45em;
}

.pa__bar {
  height: 2cqi;
  margin: 1.5cqi 0 0.5cqi;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--glow) calc(var(--v) * 100%), rgb(255 255 255 / 0.25) 0);
}

.pa__title {
  margin: 1cqi 0 0;
  font-weight: 600;
}

.pa__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.pa__list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 3cqi;
  padding: 3cqi 0;
  border-top: 1px solid #ece8df;
}

.pa__list p {
  display: flex;
  flex-direction: column;
  min-width: 0;
  margin: 0;
}

.pa__list b {
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pa__list em {
  flex: none;
  font-style: normal;
  font-weight: 600;
  font-size: 0.92em;
  color: #3f3b34;
}

.pa__list em.in {
  color: #2e7d4f;
}

.pa__list em.ok {
  padding: 0.6cqi 2.4cqi;
  border-radius: 999px;
  background: #e4efc4;
  color: #344606;
  font-size: 0.8em;
}

/* Telas fictícias (dados de exemplo) */

.app {
  height: 100%;
  display: flex;
  flex-direction: column;
  color: #1f1f1f;
  font-size: clamp(0.4375rem, 0.95vw, 0.8125rem);
  line-height: 1.3;
}

.app__bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 3% 4% 2.4%;
  border-bottom: 1px solid #ece8df;
}

.app__bar b {
  font-family: var(--una-font-title);
  font-size: 1.5em;
  letter-spacing: -0.02em;
}

.app__bar span {
  color: #6b675e;
}

.week {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.6%;
  padding: 3% 4%;
}

.day {
  display: flex;
  flex-direction: column;
  gap: 5%;
}

.day span {
  color: #6b675e;
  margin-bottom: 4%;
}

.day i {
  flex: var(--h) 1 0;
  font-style: normal;
  padding: 6% 8%;
  border-radius: 6px;
  background: #d8ecea;
  color: #034b4b;
  border-left: 3px solid #006a6a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.day i.free {
  background: transparent;
  border: 1px dashed #cfcac0;
  color: #6b675e;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 2% 4%;
}

.rows li {
  display: grid;
  grid-template-columns: 1.6fr 1fr auto;
  align-items: center;
  gap: 4%;
  padding: 3.2% 0;
  border-bottom: 1px solid #ece8df;
}

.rows span {
  color: #6b675e;
}

.rows em {
  font-style: normal;
  padding: 0.2em 0.8em;
  border-radius: 999px;
  background: #efebe2;
  color: #6b675e;
}

.rows em.ok {
  background: #f3e7bd;
  color: #6b5410;
}

.calc {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 5%;
  padding: 4% 30% 4% 4%;
  align-items: center;
}

.calc dl {
  margin: 0;
  display: grid;
  gap: 0.6em;
}

.calc dl div {
  display: flex;
  justify-content: space-between;
  padding: 0.7em 0.9em;
  border-radius: 8px;
  background: #f1efe9;
}

.calc dt {
  color: #6b675e;
}

.calc dd {
  margin: 0;
  font-weight: 500;
}

.calc__result {
  order: -1;
  display: flex;
  flex-direction: column;
  gap: 0.3em;
  padding: 10% 9%;
  border-radius: 12px;
  background: #142c46;
  color: #f5f3ed;
}

.calc__result b {
  font-family: var(--una-font-title);
  font-size: 2.6em;
  letter-spacing: -0.03em;
  color: #7fd3ad;
}

.calc__roi {
  color: #c6a15b;
}

.budget {
  list-style: none;
  margin: 0;
  padding: 3% 4%;
  display: grid;
  gap: 4%;
  flex: 1;
  align-content: start;
}

.budget li {
  display: grid;
  grid-template-columns: 7em 1fr 5.5em;
  align-items: center;
  gap: 3%;
}

.budget i {
  height: 0.8em;
  border-radius: 999px;
  background: linear-gradient(90deg, #2f6f69 calc(var(--v) * 100%), #e6e2d8 0);
}

.budget b {
  font-weight: 500;
  text-align: right;
}

/* ---------- Crie com a gente (formulário de contato) ---------- */

.build {
  display: grid;
  gap: 40px clamp(40px, 6vw, 96px);
  max-width: 1120px;
  margin: 0 auto;
  padding: clamp(72px, 10vw, 128px) clamp(20px, 5vw, 64px);
  box-sizing: content-box;
}

.build__intro h2 {
  font-size: clamp(2rem, 4.2vw, 3.25rem);
  max-width: 14ch;
}

.build__intro p {
  margin: 20px 0 0;
  max-width: 34ch;
  color: rgb(242 238 229 / 0.72);
  font-size: 1.125rem;
}

.build__form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px 20px;
}

.field {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.field label {
  font-size: 0.9375rem;
  font-weight: 500;
}

.field__optional {
  color: var(--una-stone);
  font-weight: 400;
}

.field input,
.field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgb(242 238 229 / 0.22);
  border-radius: var(--una-radius);
  background: rgb(242 238 229 / 0.05);
  color: var(--una-cream);
  font: inherit;
  transition: border-color 0.2s, background-color 0.2s;
}

.field textarea {
  resize: vertical;
  min-height: 140px;
}

.field input::placeholder,
.field textarea::placeholder {
  color: rgb(242 238 229 / 0.5);
}

.field input:hover,
.field textarea:hover {
  border-color: rgb(242 238 229 / 0.4);
}

.field input:focus,
.field textarea:focus {
  outline: none;
  border-color: var(--una-lime);
  background: rgb(242 238 229 / 0.08);
}

.field [aria-invalid] {
  border-color: #ff8a7a;
}

.field__error {
  min-height: 1.25em;
  margin: 0 0 8px;
  color: #ff9b8d;
  font-size: 0.875rem;
}

.build [hidden] {
  display: none;
}

.build__trap {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.build__actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
}

.build__submit {
  padding: 14px 28px;
  border: 0;
  border-radius: 999px;
  background: var(--una-lime);
  color: var(--una-graphite);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, opacity 0.2s;
}

.build__submit:hover:not(:disabled) {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgb(184 230 46 / 0.25);
}

.build__submit:disabled {
  opacity: 0.6;
  cursor: progress;
}

.build__status {
  margin: 0;
  color: #ff9b8d;
  font-size: 0.9375rem;
}

.build__done {
  align-self: center;
  padding: 32px;
  border: 1px solid rgb(184 230 46 / 0.4);
  border-radius: 20px;
  background: rgb(184 230 46 / 0.06);
}

.build__done h3 {
  font-size: 1.75rem;
  color: var(--una-lime);
}

.build__done p {
  margin: 12px 0 0;
  color: rgb(242 238 229 / 0.8);
}

.build__done strong {
  color: var(--una-cream);
  font-weight: 500;
  overflow-wrap: anywhere;
}

@media (min-width: 900px) {
  .build {
    grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
    align-items: start;
  }

  .field:not(.field--wide) {
    grid-column: auto;
  }

  .field:first-child {
    grid-column: 1 / -1;
  }
}

/* ---------- Rodapé ---------- */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 20px 32px;
  padding: 40px clamp(20px, 5vw, 64px);
  border-top: 1px solid rgb(242 238 229 / 0.1);
  background: var(--una-graphite);
  color: var(--una-stone);
  font-size: 0.875rem;
}

.foot p {
  margin: 0;
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}

.foot a {
  color: var(--una-cream);
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Entradas ao aparecer (só fora do modo .motion) ---------- */

.reveals:not(.motion) .slide .pitch,
.reveals:not(.motion) .slide .devices {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveals:not(.motion) .slide .devices {
  transition-delay: 0.1s;
}

.reveals .in {
  opacity: 1 !important;
  transform: none !important;
}

/* ---------- Responsivo ---------- */

@media (min-width: 761px) {
  .slide {
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.3fr);
    min-height: 90svh;
  }
}

@media (max-width: 760px) {
  .orbit {
    inset: 0 0 auto;
    height: 62svh;
  }

  .orbit__plane {
    --r: 40vw;
  }

  .planet,
  .planet img {
    width: 44px;
    height: 44px;
  }

  .planet {
    margin: -22px 0 0 -22px;
  }

  /* No celular a órbita gira mais devagar. */
  .orbit__spin,
  .planet img {
    animation-duration: 70s;
  }

  /* No celular, um celular: o notebook some e a tela do app aparece grande. */
  .laptop {
    display: none;
  }

  .devices {
    padding: 0;
  }

  /* Texto da tela do celular nunca abaixo de 12px, mesmo em telefones estreitos. */
  .pa {
    font-size: max(13px, 5.2cqi);
  }

  .pa__head span,
  .pa__list span,
  .pa__hero span,
  .pa__hero small,
  .pa__list em.ok {
    font-size: max(12px, 0.86em);
  }

  .phone {
    position: relative;
    right: auto;
    width: min(72vw, 280px);
    margin: 0 auto;
    border-width: 8px;
    border-radius: 36px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .orbit__spin,
  .planet img {
    animation: none;
  }

  .planet img {
    transform: rotateX(-68deg);
  }
}
