/* Stedia: site público. Valores do Figma "10 · Website" (quadro 1440x794). */

@font-face {
  font-family: "Inter";
  src: url("assets/fonts/Inter.ttf") format("truetype");
  font-weight: 100 900;
  font-display: swap;
}

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

:root {
  --charcoal-950: #171717;
  --charcoal-900: #242424;
  --charcoal-800: #303030;
  --olive-400: #cccbb8;
  --coral: #ff7247;
  --coral-deep: #d75f3a;
  --coral-hover: #ae4b2d; /* Button/Primary - Hover (Figma 02 · Componentes) */
  --line: #cccbb8;
  --white: #ffffff;

  /* escala da cena (cover do quadro 1440x794); hero.js atualiza */
  --s: 1;

  /* cores do logo; o scroll troca no quadro 5 */
  --logo-mark: var(--coral);
  --logo-word: var(--white);

  --gutter: clamp(24px, 6.95vw, 140px); /* 100px em 1440 */

  /* moldura nas bordas (Figma "Rectangle 11": 1422x774 em 9,10, raio 26) */
  --frame-x: 9px;
  --frame-y: 10px;
  --frame-r: 26px;
  --frame-b: 10px;     /* borda de baixo antes do quadro 6 */
  --foot-gain: 0px;    /* era 47 (faixa do rodapé no quadro 6); o rodapé agora fica no fim da landing */

  /* 6b (formulário aberto), desktop: a cena encolhe para 1041 de largura
     (sobra 390 à direita), a foto anda -288 e o Dial +323 (unidades da cena) */
  --panel: 390px;
  --photo-dx: -288px;
  --dial-dx: 323;
  --t-form: .8s;
  --ease-form: cubic-bezier(.65, 0, .35, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--charcoal-950);
  color: var(--white);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---- hero: trilho alto + palco fixo -------------------------------- */

.hero {
  position: relative;
  height: 520vh; /* trilho do scroll que conduz os 6 quadros */
}

.stage {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--charcoal-950);
}

/* tudo da cena fica dentro do retângulo arredondado; a borda é o fundo do .stage
   (#171717 nos quadros 1-5, #242424 no 6) */
/* --fx-r (borda direita) é registrada para poder animar só ela ao abrir o
   formulário; --fk (0→1) é conduzida pelo scroll e abre a faixa do rodapé */
@property --fx-r { syntax: "<length>"; inherits: false; initial-value: 9px; }
.frame {
  --fx-r: var(--frame-x);
  --fk: 0;
  position: absolute;
  z-index: 2; /* a imagem fica por cima do rodapé e do painel (z 1); eles só aparecem na faixa que ela libera */
  inset: 0;
  overflow: hidden;
  clip-path: inset(var(--frame-y) var(--fx-r) calc(var(--frame-b) + var(--foot-gain) * var(--fk)) var(--frame-x) round var(--frame-r));
  background: var(--charcoal-950);
  transition: --fx-r var(--t-form) var(--ease-form);
}
.stage.is-form .frame { --fx-r: var(--panel); }

/* em SVG, px num transform CSS = unidades da cena */
#photoShift { transition: transform var(--t-form) var(--ease-form); }
.stage.is-form #photoShift { transform: translateX(var(--photo-dx)); }

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.grain {
  position: absolute;
  inset: 0;
  background: url("assets/grain.png") repeat;
  background-size: 128px 128px;
  opacity: 0;
  pointer-events: none;
}

/* ---- Dial (quadro 6) ------------------------------------------------ */

/* centro e tamanho vêm do hero.js (--dial-x/-y/-size), ancorados no espaço da
   cena conforme o quadro 6 de cada breakpoint */
.dial {
  --size: var(--dial-size, 1130px);
  position: absolute;
  left: var(--dial-x, 50%);
  top: var(--dial-y, 50%);
  width: var(--size);
  height: var(--size);
  margin: calc(var(--size) / -2) 0 0 calc(var(--size) / -2);
  opacity: 0;
  pointer-events: none;
  transition: translate var(--t-form) var(--ease-form);
}
/* --k (px por unidade da cena) vem do hero.js */
.stage.is-form .dial { translate: calc(var(--dial-dx) * var(--k, 1) * 1px) 0; }

.dial__arc {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  fill: none;
  will-change: transform;
  animation: orbit 60s linear infinite;
  animation-play-state: paused;
}

.dial__arc--thick circle { stroke: var(--coral-deep); stroke-width: 41.5; stroke-linecap: round; }
.dial__arc--thin circle { stroke: #ae4b2d; stroke-width: 2.46; stroke-linecap: round; }
.dial__arc--salmon circle { stroke: #ff9a7a; stroke-width: 9.04; stroke-linecap: round; }
/* direções e velocidades diferentes: grosso horário, fino e salmão anti-horário */
.dial__arc--thin { animation-name: orbit-reverse; animation-duration: 90s; }
.dial__arc--salmon { animation-name: orbit-reverse; animation-duration: 48s; }

.dial.is-orbiting .dial__arc { animation-play-state: running; }

@keyframes orbit { to { transform: rotate(360deg); } }
@keyframes orbit-reverse { to { transform: rotate(-360deg); } }

/* ---- logo ------------------------------------------------------------ */

/* parado no mesmo lugar em todos os quadros: x 50, y 61.8 (centro alinhado ao
   Contact us do quadro 6) */
.brand {
  position: absolute;
  left: clamp(24px, 3.47vw, 64px);
  top: clamp(24px, 7.78vh, 76px);
  z-index: 3;
  opacity: 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 7.126px;
  height: 21.378px;
  text-decoration: none;
}

.logo__mark { width: 42.755px; height: 21.378px; fill: var(--logo-mark); }
.logo__word { width: 100.119px; height: 21.378px; fill: var(--logo-word); }

/* ---- copy (quadro 6): card olive-stone ------------------------------- */
/* Figma 1370:65932: 443 de largura em (40, 456), raio 3xl 26, padding 30,
   altura pelo conteúdo, 33 acima da faixa do rodapé (57). */

.copy {
  position: absolute;
  z-index: 2;
  left: clamp(24px, 2.78vw, 56px);             /* x 40 */
  bottom: calc(var(--frame-b) + clamp(20px, 4.2vh, 36px)); /* 36 acima da moldura (Figma landing) */
  width: 443px;
  padding: 30px;
  display: flex;
  flex-direction: column;
  background: var(--olive-400);
  border-radius: 26px;
  color: var(--charcoal-900);
  opacity: 0;
  visibility: hidden;
}

.copy__title {
  margin: 0;
  font-size: 54px;
  font-weight: 400;
  line-height: 0.96;
  letter-spacing: -0.26px;
}

.copy__lede {
  margin: 18px 0 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  letter-spacing: -0.16px;
}

.copy__lede strong { font-weight: 700; white-space: nowrap; }
/* quebra de parágrafo do Figma: depois de "easy" no desktop, depois de "fit your" em retrato */
.br-p { display: none; }

/* ---- Contact us (quadro 6) --------------------------------------------- */
/* Componente "Button": Secondary Dark - Normal (contorno #222) e - Hover
   (fundo charcoal 900, texto branco). Abre o formulário; aberto vira um X de
   84 de largura que volta ao 6a. */

.contact {
  position: absolute;
  z-index: 5;
  top: clamp(24px, 6.3vh, 64px);               /* y 50 */
  right: clamp(24px, 3.47vw, 64px);            /* 1440 - 1390 = 50 */
  width: 135px;
  height: 45px;
  padding: 0;
  display: grid;
  place-items: center;
  border: 1.5px solid #222;
  border-radius: 999px;
  background: transparent;
  color: #222;
  font: 600 14px/1.2 "Manrope", system-ui, sans-serif;
  white-space: nowrap;
  cursor: pointer;
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
}
/* rótulo e ícones empilhados na mesma célula, trocando por opacidade */
.contact > * { grid-area: 1 / 1; transition: opacity .25s ease; }
/* hover só onde existe mouse: no toque ele "gruda" depois do toque */
@media (hover: hover) {
  .contact:hover {
    background: var(--charcoal-900);
    border-color: var(--charcoal-900);
    color: var(--white);
  }
}
.contact:focus-visible {
  background: var(--charcoal-900);
  border-color: var(--charcoal-900);
  color: var(--white);
}
.contact:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.contact__icon { width: 24px; height: 24px; fill: currentColor; opacity: 0; }

.stage.is-form .contact { right: calc(var(--panel) + 32px); width: 84px; }
.stage.is-form .contact__label { opacity: 0; }
.stage.is-form .contact__icon--close { opacity: 1; }

@media (prefers-reduced-motion: no-preference) {
  .contact {
    transition: background-color .2s ease, border-color .2s ease, color .2s ease,
      right var(--t-form) var(--ease-form), width var(--t-form) var(--ease-form);
  }
}

/* ---- formulário (6b/6c) ---------------------------------------------------- */
/* Desktop: coluna de 300 à direita (right 50, top 59, bottom 50); símbolo no
   topo, título e campos embaixo, Send coral. Campos = componente "Form fields". */

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

.contact-panel {
  position: absolute;
  z-index: 1;
  top: 59px;
  right: 50px;
  bottom: 86px;                                /* termina em y 708, acima do rodapé */
  width: 300px;
  display: flex;
  flex-direction: column;
  color: var(--white);
  opacity: 0;
  transform: translateX(24px);
  pointer-events: none;
  transition: opacity .35s ease, transform .5s var(--ease-form);
}
.stage.is-form .contact-panel {
  opacity: 1;
  transform: none;
  pointer-events: auto;
  transition: opacity .5s ease .35s, transform .7s var(--ease-form) .3s;
}
.contact-panel__mark { flex: none; width: 43px; height: 21.5px; fill: var(--coral); }

.contact-form { margin-top: auto; display: flex; flex-direction: column; }
.contact-form__title {
  margin: 0 0 30px;
  font: 400 32px/36.4px "Manrope", system-ui, sans-serif;
  letter-spacing: -0.26px;
}
.contact-form__fields { display: flex; flex-direction: column; gap: 26px; }

.field { display: flex; flex-direction: column; gap: 14px; }
.field__label {
  font: 600 11px/1.2 "Inter", system-ui, sans-serif;
  text-transform: uppercase;
  color: var(--white);
}
.field__input {
  width: 100%;
  margin: 0;
  padding: 0 0 6px;
  border: 0;
  border-bottom: 1px solid #3a3c44;
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: 700 16px/26px "Manrope", system-ui, sans-serif;
  letter-spacing: -0.16px;
  caret-color: var(--coral);
  outline: none;
  transition: border-color .2s ease;
}
.field__input::placeholder { color: #52545b; opacity: 1; }
.field__input:focus,
.field__input:not(:placeholder-shown) { border-bottom-color: #8a8a82; }
.contact-form.was-validated .field__input:invalid { border-bottom-color: #ff9a7a; }
.field__input--area { display: block; resize: none; overflow: hidden; min-height: 32px; max-height: 160px; }

.contact-form__consent {
  margin: 30px 0 0;
  font: 500 12px/1.5 "Manrope", system-ui, sans-serif;
  color: #a8a8a0;
}
.contact-form__consent a { color: var(--white); text-decoration: underline; text-underline-offset: 2px; }
.contact-form__consent a:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.contact-form__actions {
  margin-top: 30px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 16px;
}

/* Button/Primary coral (Send →) e o estado "Message sent!" (6c) */
.send {
  height: 45px;
  padding: 0 7px 0 24px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1.5px solid var(--coral);
  border-radius: 999px;
  background: var(--coral);
  color: var(--white);
  font: 600 14px/1.2 "Manrope", system-ui, sans-serif;
  cursor: pointer;
  transition: background-color .3s ease, border-color .3s ease, color .3s ease;
}
@media (hover: hover) {
  .send:hover:not(:disabled) { background: var(--coral-hover); border-color: var(--coral-hover); }
  .send:hover:not(:disabled) .send__icon circle { fill: var(--coral-hover); }
}
.send:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; }
.send__icon { width: 40px; height: 40px; }
.send__icon circle { fill: var(--coral); transition: fill .3s ease; }
.send__icon path { fill: var(--white); }
.send:disabled { cursor: default; }
.send.is-sending { opacity: .7; }
.send.is-sent {
  padding: 0 30px;
  background: transparent;
  border-color: #9d9c86;
  color: #9d9c86;
}
.send.is-sent .send__icon { display: none; }

.contact-form__status { margin: 0; font: 600 13px/1.4 "Manrope", system-ui, sans-serif; color: #ff9a7a; }
.contact-form__status:empty { display: none; }

/* ---- rodapé (Figma "7 · Footer", 57 de altura) ------------------------------- */
/* Parte do quadro 6: ocupa a faixa de baixo do palco e aparece com o card. Com o
   formulário aberto acompanha a largura da cena (1050 no desktop, 480 no iPad). */

.site-footer {
  display: none !important;  /* 2026-11-13: o rodapé legal agora é o .foot no fim da landing (sections.css) */
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: 57px;
  padding: 0 var(--foot-x, 50px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  font: 500 12px/16.8px "Manrope", system-ui, sans-serif;
  color: #a8a8a0;
  white-space: nowrap;
  background: var(--charcoal-900);             /* cobre a foto no celular (moldura vai até 6 de baixo) */
  opacity: 0;
  visibility: hidden;
  transition: right var(--t-form) var(--ease-form);
}
.stage.is-form .site-footer { right: var(--panel); }
.site-footer__copy { margin: 0; }
.site-footer__links { display: flex; gap: 24px; }
.site-footer a { color: inherit; text-decoration: none; }
@media (hover: hover) { .site-footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 2px; } }
.site-footer a:focus-visible { outline: 2px solid var(--white); outline-offset: 2px; color: var(--white); }

/* ---- indicador de scroll ----------------------------------------------- */

.scroll-cue {
  position: fixed;
  z-index: 40;
  right: var(--gutter);
  bottom: clamp(20px, 4.7vh, 37px);
  width: 39px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 15px;
  opacity: 0;
  pointer-events: none;
}

.scroll-cue__track {
  position: relative;
  width: 1px;
  height: clamp(64px, 14vh, 111px);
  overflow: hidden;
  background: rgba(204, 203, 184, 0.28);
}

/* a "gota" que escorre pelo trilho, convidando a rolar */
.scroll-cue__drop {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 30px;
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), var(--white));
  transform: translateY(-30px);
  animation: drip 2.2s cubic-bezier(0.65, 0, 0.35, 1) infinite;
}

@keyframes drip {
  0%   { transform: translateY(-30px); opacity: 0; }
  12%  { opacity: 1; }
  78%  { transform: translateY(var(--track, 111px)); opacity: 1; }
  100% { transform: translateY(var(--track, 111px)); opacity: 0; }
}

.scroll-cue__label {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--white);
}

/* desktop: o indicador fica na tela até a foto do Download. O hero.js apaga os filhos no
   quadro 6 (autoAlpha inline); aqui o !important mantém eles, e a visibilidade passa a ser
   controlada por --cue-o (classe .is-gone, posta pelo motion.js, ou formulário aberto) */
@media (min-width: 1100px) {
  .scroll-cue > * { opacity: var(--cue-o, 1) !important; visibility: visible !important; transition: opacity .4s ease; }
  .scroll-cue.is-gone, body:has(.stage.is-form) .scroll-cue { --cue-o: 0; }
  .scroll-cue__track, .scroll-cue__label { transition: opacity .4s ease, background-color .3s ease, color .3s ease; }
  /* sobre fundo claro (painel do How it works) */
  .scroll-cue.is-light .scroll-cue__track { background: rgba(23, 23, 23, .2); }
  .scroll-cue.is-light .scroll-cue__drop { background: linear-gradient(to bottom, rgba(23, 23, 23, 0), #171717); }
  .scroll-cue.is-light .scroll-cue__label { color: #171717; }
}

/* ---- tablet e celular (retrato): quadros "6-Ipad" e "6-Phone" -------------- */

@media (orientation: portrait) and (max-width: 1100px) {
  .hero { height: 420vh; }
  /* o logo já nasce no canto do quadro 6 e fica branco sobre a foto */
  .brand { left: 40px; top: 57.8px; }
  .logo__word { fill: var(--white); }
  .contact { top: 46px; right: 39px; }
  /* 6b-Ipad: cena com 471 de largura (sobra 354), foto -166.7 e Dial -100.9 unidades,
     coluna do formulário de 291 (right 31, top 46, bottom 43, pt 20) */
  :root { --panel: 354px; --photo-dx: -166.7px; --dial-dx: -100.9; }
  .stage.is-form .contact { right: calc(var(--panel) + 30px); }
  .contact-panel { top: 46px; right: 31px; bottom: 83px; width: 291px; padding-top: 20px; }
  .site-footer { --foot-x: 58px; }
  /* card 399 de largura em (40, 869) de 834x1194, título 46, 36 acima do rodapé */
  .copy { left: 40px; bottom: 46px; width: 399px; }
  .copy__title { font-size: 46px; }
  .br-d { display: none; }
  .br-p { display: inline; }
  .scroll-cue { right: 32px; }
}

/* 6-Phone (402x874): moldura 8/10/8/6 (o rodapé de 57 cobre a borda de baixo),
   logo em (30, 50), card 360 de largura a 20/22 das bordas, título de 40 */
@media (orientation: portrait) and (max-width: 599px) {
  :root { --frame-x: 8px; --frame-b: 6px; --foot-gain: 0px; }
  /* no celular o rodapé cobre a borda da foto e a folha do formulário sobe por cima dela */
  .site-footer { z-index: 3; }
  .contact-panel { z-index: 4; }
  .stage.is-form .frame { --fx-r: var(--frame-x); }
  .site-footer { --foot-x: 24px; }
  .stage.is-form .site-footer { right: 0; }
  .brand { left: 30px; top: 50.8px; }
  /* Contact us vira só o ícone de e-mail (84x45); aberto, o X fica no mesmo lugar */
  .contact { top: 39px; right: 36px; width: 84px; }
  .contact__label { display: none; }
  .contact__icon--mail { opacity: 1; }
  .stage.is-form .contact { right: 36px; width: 84px; }
  .stage.is-form .contact__icon--mail { opacity: 0; }

  /* 6b-Phone: a cena fica parada e o formulário sobe numa folha de 630 */
  .stage.is-form #photoShift { transform: none; }
  .stage.is-form .dial { translate: none; }
  .contact-panel,
  .stage.is-form .contact-panel {
    top: auto;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto;
    height: min(630px, calc(100% - 110px));
    padding: 50px 40px 40px;
    overflow-y: auto;
    background: var(--charcoal-900);
    border-radius: 26px 26px 0 0;
    opacity: 1;
  }
  .contact-panel { transform: translateY(100%); transition: transform .45s var(--ease-form); }
  .stage.is-form .contact-panel { transform: none; transition: transform .6s var(--ease-form); }
  .copy {
    left: 20px;
    right: 22px;
    bottom: 18px;                              /* 12 acima da moldura (Figma landing) */
    width: auto;
    max-width: 440px;
    padding: 30px;
  }
  .copy__title { font-size: 40px; }
  .copy__title br { display: none; }
  .scroll-cue { right: 24px; }
}

@media (orientation: portrait) and (max-width: 599px) and (max-height: 700px) {
  .copy { padding: 22px 18px; }
  .copy__title { font-size: 36px; }
  .copy__lede { font-size: 15px; margin-top: 12px; }
}

/* ---- movimento reduzido: só o estado final, parado -------------------- */

@media (prefers-reduced-motion: reduce) {
  .hero { height: auto; }
  .scroll-cue { display: none; }
  .dial__arc, .scroll-cue__drop { animation: none !important; }
  .frame, #photoShift, .dial, .contact, .contact-panel, .site-footer, .contact > * { transition: none !important; }
}
