/* Arca Studio — coming soon
   Paleta tirada da própria peça: porcelana quente, berinjela profunda (tinta),
   esmalte laranja, pêssego e lilás. Nada das cores da Beforge. */

:root {
  --bg: #EFE9E0;
  --bg-2: #E6DED2;
  --ink: #1F1A2E;
  --ink-2: #5E586A;
  --ink-3: #3A3150;
  --clay: #D2561F;
  --clay-ink: #B4451A;
  --peach: #EDC39C;
  --lilac: #D9CFE3;
  --line: rgba(31, 26, 46, .14);

  --serif: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;

  --ease: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --gutter: 20px;
}

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

html { -webkit-text-size-adjust: 100%; background: var(--bg); }

body {
  margin: 0;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  overflow-x: clip;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* grão de papel por cima de tudo */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  z-index: 50;
  pointer-events: none;
  opacity: .08;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0; }

.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;
}

/* ---------- fundo: manchas de luz que derivam devagar ---------- */

.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.blob {
  position: absolute;
  width: 70vmax;
  aspect-ratio: 1;
  border-radius: 50%;
  animation: drift 22s ease-in-out infinite alternate;
}
.blob--a { top: -30vmax; right: -24vmax; background: radial-gradient(closest-side, rgba(237, 195, 156, .7), transparent); }
.blob--b { bottom: -36vmax; left: -28vmax; background: radial-gradient(closest-side, rgba(217, 207, 227, .85), transparent); animation-duration: 26s; animation-direction: alternate-reverse; }
.blob--c { top: 30%; left: 35%; width: 40vmax; background: radial-gradient(closest-side, rgba(255, 255, 255, .55), transparent); animation-duration: 18s; }

@keyframes drift {
  to { transform: translate3d(-6vmax, 5vmax, 0) scale(1.12); }
}

/* ---------- topo ---------- */

.top {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px var(--gutter);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  letter-spacing: -.035em;
  line-height: 1;
}
.logo svg { width: 28px; height: 28px; }

.top__status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px 8px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 500;
  background: rgba(255, 255, 255, .35);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.top__status time { font-variant-numeric: tabular-nums; }

.pulse { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--clay); }
.pulse::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: var(--clay);
  animation: ping 2.2s var(--ease) infinite;
}
@keyframes ping { 75%, 100% { transform: scale(3); opacity: 0; } }

/* ---------- hero ---------- */

.hero {
  flex: 1;
  display: grid;
  gap: 28px;
  padding: 18px var(--gutter) 40px;
}

.eyebrow {
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-2);
}

.title {
  margin: 0;
  font-family: var(--serif);
  font-size: clamp(46px, 13.4vw, 80px);
  font-weight: 340;
  font-variation-settings: 'opsz' 144;
  line-height: .95;
  letter-spacing: -.04em;
}
.title .line {
  display: block;
  overflow: hidden;
  /* espaço para descendentes e para o itálico não ser cortado */
  padding: 0 .08em .1em 0;
  margin-bottom: -.1em;
}
.title .line > span { display: inline-block; }
.title em {
  font-style: italic;
  font-weight: 300;
  color: var(--clay-ink);
  letter-spacing: -.035em;
}

/* ---------- peça ---------- */

.hero__art { display: grid; place-items: center; }

.art {
  position: relative;
  width: min(84vw, 460px);
  aspect-ratio: 1352 / 1500;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* janela em arco atrás da peça: a bola escapa por cima dela */
.art__disc {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 9%;
  bottom: 4.5%;
  border-radius: 999px 999px 0 0;
  background:
    radial-gradient(110% 60% at 50% 92%, var(--ink-3) 0%, rgba(58, 49, 80, 0) 70%),
    var(--ink);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06);
}
.art__disc::after {
  /* aro fino de luz na borda do arco */
  content: '';
  position: absolute;
  inset: 14px 14px 0;
  border-radius: inherit;
  border: 1px solid rgba(237, 195, 156, .22);
  border-bottom: 0;
}

.art__shadow {
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: -2.5%;
  height: 8%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(31, 26, 46, .38), rgba(31, 26, 46, 0));
}

.art__layer { position: absolute; inset: 0; pointer-events: none; }
.art__base, .art__ball { display: block; width: 100%; height: 100%; }
.art__base img, .art__ball img { width: 100%; height: 100%; }
.art__ball img { transform-origin: 64.8% 19.3%; }

/* selo giratório */
.badge {
  position: absolute;
  top: 1%;
  left: -3%;
  width: 27%;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--bg);
  box-shadow: 0 10px 30px -12px rgba(31, 26, 46, .35), inset 0 0 0 1px var(--line);
  color: var(--ink);
}
.badge__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  animation: spin 16s linear infinite;
}
.badge__ring text {
  font-family: var(--sans);
  font-size: 10.4px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  fill: currentColor;
}
.badge__core { width: 30%; color: var(--clay); }
.badge__core svg { display: block; width: 100%; animation: spin 9s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- texto, formulário, contagem ---------- */

.hero__body { display: grid; gap: 26px; align-content: start; }

.lede {
  max-width: 36ch;
  font-size: 17px;
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}
.lede strong { font-weight: 600; color: var(--ink); }

.notify { max-width: 460px; }

.notify__field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  transition: border-color .3s, box-shadow .3s;
}
.notify__field:focus-within {
  border-color: rgba(31, 26, 46, .5);
  box-shadow: 0 0 0 4px rgba(210, 86, 31, .16);
}
.notify.is-error .notify__field { border-color: var(--clay); animation: shake .5s var(--ease); }
@keyframes shake {
  20% { transform: translateX(-7px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(2px); }
}

.notify input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 4px 0 16px;
  border: 0;
  outline: 0;
  background: transparent;
  font: inherit;
  font-size: 16px;
  color: var(--ink);
}
.notify input::placeholder { color: #8C8697; }
.notify input:disabled { color: var(--ink-2); }

.btn {
  position: relative;
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 50px;
  padding: 0 20px 0 22px;
  border: 0;
  border-radius: 999px;
  overflow: hidden;
  isolation: isolate;
  background: var(--ink);
  color: var(--bg);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: translate .5s var(--ease), background-color .4s;
}
.btn:focus-visible { outline: 2px solid var(--clay); outline-offset: 3px; }

/* preenchimento que nasce do ponto onde o cursor entrou */
.btn__fill {
  position: absolute;
  z-index: -1;
  left: var(--x, 50%);
  top: var(--y, 50%);
  width: 260%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--clay);
  transform: translate(-50%, -50%) scale(0);
  transition: transform .6s var(--ease);
}
.btn:hover .btn__fill, .btn.is-done .btn__fill { transform: translate(-50%, -50%) scale(1); }

/* texto que rola na passagem do mouse */
.btn__text { position: relative; display: block; height: 1.3em; overflow: hidden; line-height: 1.3; }
.btn__label, .btn__done { display: block; transition: transform .55s var(--ease); }
.btn__label { text-shadow: 0 1.3em 0 currentColor; }
.btn:hover .btn__label { transform: translateY(-1.3em); }
.btn__done { position: absolute; inset: 0; transform: translateY(1.3em); white-space: nowrap; }
.btn.is-done .btn__label { transform: translateY(-2.6em); }
.btn.is-done .btn__done { transform: none; }

.btn__icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.btn__arrow { transition: transform .5s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(3px); }
.btn__check { stroke-dasharray: 22; stroke-dashoffset: 22; transition: stroke-dashoffset .5s .15s var(--ease); }
.btn.is-done .btn__arrow { opacity: 0; }
.btn.is-done .btn__check { stroke-dashoffset: 0; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .btn__arrow { animation: nudge .6s var(--ease) infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }

.notify__msg {
  min-height: 1.5em;
  margin-top: 10px;
  padding-left: 18px;
  font-size: 14px;
  color: var(--ink-2);
}
.notify.is-error .notify__msg { color: var(--clay-ink); }

.count {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  max-width: 460px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.count li { padding-top: 12px; border-top: 1px solid var(--line); }
.count__num {
  display: flex;
  font-family: var(--serif);
  font-size: clamp(34px, 9vw, 46px);
  font-weight: 340;
  font-variation-settings: 'opsz' 144;
  line-height: 1;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums lining-nums;
}
.count__label {
  display: block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-2);
}

/* cada algarismo rola sozinho quando muda */
.slot { position: relative; display: inline-block; overflow: hidden; padding-bottom: .06em; }
.slot__ghost { visibility: hidden; }
.slot__d { position: absolute; left: 0; right: 0; top: 0; text-align: center; }
.slot__d.is-in { animation: digit-in .7s var(--ease) both; }
.slot__d.is-out { animation: digit-out .7s var(--ease) both; }
@keyframes digit-in { from { transform: translateY(100%); filter: blur(4px); opacity: 0; } }
@keyframes digit-out { to { transform: translateY(-100%); filter: blur(4px); opacity: 0; } }

/* ---------- faixa e rodapé ---------- */

.marquee {
  overflow: hidden;
  border-top: 1px solid var(--line);
  padding: 16px 0 14px;
}
.marquee__track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: marquee var(--dur, 34s) linear infinite;
  font-family: var(--serif);
  font-size: 24px;
  font-style: italic;
  font-weight: 300;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.marquee__group { display: flex; flex: none; align-items: center; }
.marquee__track i { margin: 0 26px; font-style: normal; font-size: .6em; color: var(--clay); }
/* anda exatamente a largura de um grupo: o seguinte (idêntico) ocupa o lugar e o laço não tem emenda.
   Sem JS, com só dois grupos, -50% dá no mesmo. */
@keyframes marquee { to { transform: translateX(var(--shift, -50%)); } }

.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px var(--gutter) max(18px, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 13px;
  color: var(--ink-2);
}
.foot nav { display: flex; gap: 20px; }
.foot a {
  display: inline-block;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size .5s var(--ease), color .3s, translate .5s var(--ease);
}
.foot a:hover { color: var(--ink); background-size: 100% 1px; }

/* ---------- desktop ---------- */

@media (min-width: 1024px) {
  :root { --gutter: 48px; }

  .top { padding-top: 26px; padding-bottom: 0; }

  .hero {
    grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr);
    grid-template-rows: 1fr auto;
    grid-template-areas: 'head art' 'body art';
    column-gap: clamp(32px, 5vw, 96px);
    row-gap: 30px;
    align-items: center;
    padding-top: 12px;
    padding-bottom: 40px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
  }
  .hero__head { grid-area: head; align-self: end; }
  .hero__body { grid-area: body; align-self: start; }
  .hero__art { grid-area: art; }

  .title { font-size: clamp(64px, 6.1vw, 112px); }

  .art { width: min(40vw, 620px, calc((100svh - 200px) * .9)); }
  .badge { left: -9%; top: 3%; width: 25%; }

  .lede { font-size: 18px; }
  .count__num { font-size: 46px; }

  .marquee__track { font-size: 28px; }
}

@media (min-width: 1024px) and (max-height: 820px) {
  .title { font-size: clamp(56px, 5.2vw, 96px); }
  .hero__body { gap: 20px; }
  .eyebrow { margin-bottom: 12px; }
}

/* ---------- entrada (só com JS e com movimento liberado) ---------- */

@media (prefers-reduced-motion: no-preference) {
  .js .eyebrow, .js .lede, .js .notify, .js .count {
    animation: up 1s var(--ease) var(--d, 0s) both;
  }
  .js .title .line > span {
    animation: rise 1.15s var(--ease) var(--d, 0s) both;
  }
  .js .top { animation: fade 1s var(--ease) .1s both; }
  .js .marquee, .js .foot { animation: fade 1.2s var(--ease) 1s both; }

  .js .art__disc { animation: window 1.3s var(--ease) .2s both; }
  .js .art__shadow { animation: fade 1s var(--ease) .8s both; }
  .js .art__base img { animation: lift 1.4s var(--ease) .45s both; }
  .js .art__ball img { animation: drop 1.25s linear 1.2s both; }
  .js .art.is-replay .art__ball img { animation: drop 1.25s linear both; }
  .js .badge { animation: pop 1s var(--spring) 1.7s both; }
}

/* começa em 0.01 e não em 0: o navegador conta a pintura logo no primeiro quadro (LCP) */
@keyframes up { from { opacity: .01; transform: translateY(26px); filter: blur(6px); } }
@keyframes fade { from { opacity: .01; } }
@keyframes rise { from { opacity: .01; transform: translateY(105%) rotate(4deg); filter: blur(8px); } }
@keyframes window { from { clip-path: inset(100% 0 0 0 round 999px 999px 0 0); } to { clip-path: inset(0 0 0 0 round 0); } }
@keyframes lift { from { opacity: .01; transform: translateY(12%) scale(.92); filter: blur(10px); } }
@keyframes pop { from { opacity: 0; transform: scale(0) rotate(-120deg); } }

/* a bola cai, amassa no impacto e quica até assentar */
@keyframes drop {
  0%   { transform: translateY(-115%); opacity: 0; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  8%   { opacity: 1; }
  42%  { transform: translateY(0) scale(1.1, .86); animation-timing-function: cubic-bezier(0, .55, .45, 1); }
  60%  { transform: translateY(-9%) scale(.97, 1.04); animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  76%  { transform: translateY(0) scale(1.05, .94); animation-timing-function: cubic-bezier(0, .55, .45, 1); }
  86%  { transform: translateY(-2.4%) scale(1); animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
  94%  { transform: translateY(0) scale(1.015, .985); }
  100% { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .blob, .badge__ring, .badge__core svg, .marquee__track, .pulse::after { animation: none; }
}
