/* Página de estacionamento de domínio · Nossa Loja
   Cores e símbolo seguem o Manual de Marca (aplicação da capa, fundo verde-petróleo). */

/* Jost (SIL OFL 1.1, ver fonts/OFL.txt): geométrica da família Futura, a mais próxima do
   logotipo disponível para web. Hospedada aqui para não depender de terceiros (CSP font-src 'self'). */
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/jost-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Jost";
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: url("/assets/fonts/jost-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ---------- Tokens ---------- */
:root {
  --teal: #1C393D;          /* fundo da capa do manual */
  --teal-deep: #152D30;
  --teal-lift: #22464B;
  --red: #F12B3A;           /* símbolo sobre fundo escuro */
  --orange: #F87139;
  --yellow: #FFDE00;        /* logotipo sobre fundo escuro */
  --yellow-hover: #FFE83D;
  --ink: #EEF4F3;
  --ink-2: color-mix(in oklab, var(--ink) 74%, var(--teal));
  --ink-3: color-mix(in oklab, var(--ink) 52%, var(--teal));
  --line: color-mix(in oklab, var(--ink) 22%, var(--teal));

  /* Curvas (animação) */
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --gutter: clamp(20px, 5vw, 72px);
  /* H = altura do símbolo. O conjunto (símbolo + respiro + logotipo) mede 6,2 H */
  --H: clamp(48px, calc((100vw - 2 * var(--gutter)) / 6.25), 132px);

  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body {
  min-height: 100svh;
  background:
    radial-gradient(110% 85% at 22% 34%, var(--teal-lift) 0%, var(--teal) 52%, var(--teal-deep) 100%)
    var(--teal);
  color: var(--ink);
  font-family: "Jost", "Futura", "Century Gothic", "Avenir Next", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.stage {
  position: relative;
  min-height: 100svh;
  overflow: hidden;         /* as guias vazam da marca até a borda, sem rolagem lateral */
  overflow: clip;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: var(--gutter);
  gap: clamp(28px, 5vh, 56px);
}

/* ---------- Título de página no estilo do manual ("anatomia / LOGO") ---------- */
.page-title {
  justify-self: end;
  text-align: right;
  margin: 0;
  color: var(--ink-3);
  font-weight: 400;
  line-height: 1.05;
  position: relative;
  z-index: 1;
}
.page-title small {
  display: block;
  font-size: clamp(0.9rem, 0.75rem + 0.45vw, 1.3rem);
  letter-spacing: 0.24em;
  margin-right: -0.24em;
}
.page-title span {
  display: block;
  font-size: clamp(1.45rem, 0.9rem + 1.9vw, 2.8rem);
  letter-spacing: 0.14em;
  margin-right: -0.14em;
}

main {
  align-self: center;
  display: flex;
  flex-direction: column;
  gap: clamp(40px, 8vh, 96px);
  position: relative;
}

/* ---------- Assinatura horizontal: símbolo + logotipo ---------- */
.lockup {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--H) * 10.2 / 44);   /* respiro do manual: 10,2 unidades da grade de 44 */
  height: var(--H);
}

.mark-wrap {
  position: relative;
  width: var(--H);
  height: var(--H);
  flex: none;
}

/* Guias de construção do manual. Vazam além da caixa do símbolo. */
.guides {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
  color: var(--ink);
  opacity: 0.24;
}
.guides line, .guides circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 1;
  stroke-dasharray: 5 6;
  vector-effect: non-scaling-stroke;
}
.guides .short { opacity: 0.8; }

.mark-btn {
  all: unset;
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  cursor: pointer;
  border-radius: 4px;
  transition: transform 160ms var(--ease-out);
  -webkit-tap-highlight-color: transparent;
}
.mark-btn:active { transform: scale(0.97); }
.mark-btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 8px; }

.mark { display: block; width: 100%; height: 100%; overflow: visible; }
.piece-red { fill: var(--red); }
.piece-orange { fill: var(--orange); }
.brush {
  fill: none;
  stroke: #fff;
  stroke-width: 12;
  stroke-linejoin: round;
  stroke-linecap: butt;
  stroke-dasharray: 1 1;
  stroke-dashoffset: 0;
}
.outline {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1.25;
  vector-effect: non-scaling-stroke;
  stroke-dasharray: 1 1;
  opacity: 0;
}

.wordmark {
  position: relative;
  height: var(--H);
  aspect-ratio: 219 / 44;
  flex: none;
}
.wordmark svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.wm-name path { fill: var(--yellow); }
.wm-tag path { fill: var(--ink); }

/* ---------- Mensagem ---------- */
.info {
  max-width: 40rem;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
h1 {
  margin: 0;
  font-size: clamp(1.4rem, 0.95rem + 1.5vw, 2.2rem);
  font-weight: 500;
  line-height: 1.18;
  letter-spacing: -0.01em;
}
.host { display: block; color: var(--yellow); font-weight: 500; }
.info p {
  margin: 0;
  max-width: 34rem;
  color: var(--ink-2);
  font-size: clamp(1rem, 0.95rem + 0.2vw, 1.125rem);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---------- Canais oficiais ---------- */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 14px;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 4px;
  font: inherit;
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    transform 160ms var(--ease-out),
    background-color 200ms ease,
    border-color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn:focus-visible { outline: 2px solid var(--yellow); outline-offset: 3px; }
.btn svg { width: 18px; height: 18px; flex: none; }
/* Logos oficiais dos canais (Mercado Livre: favicon do próprio site; Instagram: glifo com o degradê da marca) */
.btn .brand-logo { height: 22px; width: auto; }
.btn .logo-ml { width: 31px; }
.btn .logo-ig { width: 22px; }

.btn-primary {
  background: var(--yellow);
  color: var(--teal-deep);
  border: 1px solid var(--yellow);
}
.btn .arrow { transition: transform 200ms ease; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}

/* ---------- Contato sobre o domínio (secundário) ---------- */
.domain-contact {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
  margin: 6px 0 0;
  color: var(--ink-3);
  font-size: 0.9375rem;
  line-height: 1.5;
}
.contact-mail { display: inline-flex; align-items: center; gap: 10px; white-space: nowrap; }
.domain-contact a {
  color: var(--ink-2);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color 200ms ease, color 200ms ease;
}
.domain-contact a:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; border-radius: 2px; }

.copy {
  all: unset;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 8px;
  margin-left: -4px;
  border-radius: 4px;
  color: var(--ink-3);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform 160ms var(--ease-out), color 200ms ease;
}
.copy:active { transform: scale(0.97); }
.copy:focus-visible { outline: 2px solid var(--yellow); outline-offset: 0; }

/* Troca de estado do copiar: as duas versões ocupam a mesma célula (sem pulo de largura) */
.swap { display: inline-grid; }
.swap > * {
  grid-area: 1 / 1;
  transition:
    opacity 200ms ease,
    filter 200ms ease,
    transform 200ms var(--ease-out);
}
.swap.icon > * { display: block; width: 16px; height: 16px; }
.copy[data-state="idle"] .is-done,
.copy[data-state="done"] .is-idle {
  opacity: 0;
  filter: blur(2px);
}
.copy[data-state="idle"] .icon .is-done,
.copy[data-state="done"] .icon .is-idle { transform: scale(0.9); }
.copy[data-state="done"] { color: var(--yellow); }

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover { background: var(--yellow-hover); border-color: var(--yellow-hover); }
  .btn:hover .arrow { transform: translateX(3px); }
  .btn-ghost:hover { border-color: color-mix(in oklab, var(--ink) 45%, var(--teal)); }
  .domain-contact a:hover { color: var(--ink); text-decoration-color: currentColor; }
  .copy:hover { color: var(--ink); }
  .guides { will-change: transform; } /* camada própria para a paralaxe */
}

footer {
  color: var(--ink-3);
  font-size: 0.8125rem;
  letter-spacing: 0.04em;
  position: relative;
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ================= Coreografia de entrada =================
   Só CSS: não depende de script (CSP script-src 'self'). Todas terminam no estado visível,
   então navegador sem animação mostra a página pronta. */

/* 1. Guias do manual se abrem a partir do símbolo */
.guides { animation: guides-in 1100ms var(--ease-in-out) both; }
@keyframes guides-in {
  from { clip-path: circle(0px at 50% 50%); }
  to   { clip-path: circle(150vmax at 50% 50%); }
}

/* 2. Contorno técnico do símbolo é traçado, 3. a tinta preenche, 4. o contorno sai */
.mark.is-playing .outline {
  animation:
    outline-draw 600ms var(--ease-in-out) both,
    outline-out 400ms var(--ease-out) 1150ms both;
}
.mark.is-playing .brush { animation: paint 900ms var(--ease-in-out) 300ms both; }
@keyframes outline-draw {
  from { stroke-dashoffset: 1; opacity: 1; }
  to   { stroke-dashoffset: 0; opacity: 1; }
}
@keyframes outline-out {
  from { opacity: 1; }
  to   { opacity: 0; }
}
@keyframes paint {
  from { stroke-dashoffset: 1; }
  to   { stroke-dashoffset: 0; }
}

/* 5. Logotipo passa como um rolo de pintura, da esquerda para a direita */
.wm-name { animation: roller 650ms var(--ease-in-out) 420ms both; }
@keyframes roller {
  from { clip-path: inset(-30% 100% -30% 0); }
  to   { clip-path: inset(-30% -6% -30% 0); }
}

/* 6. Tagline e mensagem sobem em cascata */
.wm-tag { animation: rise 600ms var(--ease-out) 700ms both; }
.rise { animation: rise 600ms var(--ease-out) both; }
/* Atrasos por classe (sem style inline, para a CSP não precisar de 'unsafe-inline') */
.rise.d0 { animation-delay: 380ms; }
.rise.d1 { animation-delay: 680ms; }
.rise.d2 { animation-delay: 740ms; }
.rise.d3 { animation-delay: 800ms; }
.rise.d4 { animation-delay: 860ms; }
.rise.d5 { animation-delay: 920ms; }
@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* Movimento reduzido: menos e mais suave, não zero. Fica só a opacidade. */
@media (prefers-reduced-motion: reduce) {
  .guides { animation: fade 400ms ease both; }
  .mark.is-playing .outline,
  .mark.is-playing .brush { animation: none; }
  .mark.is-playing .piece { animation: fade 300ms ease both; }
  .wm-name { animation: fade 400ms ease 100ms both; }
  .wm-tag { animation: fade 400ms ease 150ms both; }
  .rise { animation: fade 400ms ease both; }
  .rise.d0 { animation-delay: 150ms; }
  .rise.d1 { animation-delay: 190ms; }
  .rise.d2 { animation-delay: 230ms; }
  .rise.d3 { animation-delay: 270ms; }
  .rise.d4 { animation-delay: 310ms; }
  .rise.d5 { animation-delay: 350ms; }
  .mark-btn, .btn, .copy, .btn .arrow, .swap > * { transition-property: opacity, filter, background-color, border-color, color; }
  .mark-btn:active, .btn:active, .copy:active { transform: none; }
}

/* ---------- Celular ---------- */
@media (max-width: 640px) {
  .page-title { justify-self: start; text-align: left; }
  .page-title small, .page-title span { margin-right: 0; }
  .actions { flex-direction: column; align-items: stretch; }
  .btn { justify-content: center; }
}
