/* Sitioterapia | pagina provisoria
   Cores tiradas do logotipo e das fotos: mata, barro vermelho de Minas, palha, broto.
   Tudo cabe numa tela so: as fotos fazem um arco (como o sol) sobre o titulo
   e nascem/se poem atras do horizonte de terra. */
@font-face {
  font-family: "Young Serif";
  src: url("/fonts/young-serif/young-serif-latin-400-normal.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Shantell Sans";
  src: url("/fonts/shantell-sans/shantell-sans-latin-wght-normal.woff2") format("woff2-variations");
  font-weight: 300 800; font-style: normal; font-display: swap;
}

:root {
  --mata: #1F3A27;
  --barro: #7E3320;
  --palha: #F2ECD9;
  --palha-suave: #D6D9C3;
  --broto: #93C24A;
  --papel: #FBF8F1;
  --sombra: 34 16 8;
  --horizonte: 68%;       /* altura da linha da terra dentro da tela */
  --aw: 150px;            /* largura da foto em destaque (o JS recalcula) */
}

*, *::before, *::after { box-sizing: border-box; }
html, body { height: 100%; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  overflow: hidden;
  overscroll-behavior: none;
  background: var(--mata);
  color: var(--palha);
  font: 400 1rem/1.5 "Shantell Sans", "Comic Neue", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.palco {
  position: relative;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background: var(--mata);
}

/* ---------- ceu: as fotos em arco ---------- */
.ceu { position: absolute; inset: 0; z-index: 2; }
.fotos {
  position: absolute;
  left: 50%; top: 2vh;
  width: var(--aw);
  overflow: visible !important;
  touch-action: pan-y;
}
.fotos:not(.swiper-initialized) { visibility: hidden; }
.fotos .swiper-wrapper { align-items: flex-start; }
.fotos .swiper-slide {
  width: var(--aw);
  margin: 0;
  padding: clamp(4px, calc(var(--aw) * .035), 8px);
  background: var(--papel);
  box-shadow:
    0 1px 2px rgb(var(--sombra) / .35),
    0 18px 30px -14px rgb(var(--sombra) / .75);
  transform-origin: 50% 50%;
  transition-property: transform, opacity, filter;
  transition-timing-function: cubic-bezier(.45, .05, .2, 1);
  will-change: transform, opacity, filter;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}
.fotos .swiper-slide-active { cursor: default; }
.fotos img {
  display: block;
  width: 100%; height: auto;
  aspect-ratio: 245 / 355;
  object-fit: cover;
  background: #8a6a4e;
  pointer-events: none;
}

/* ---------- centro: titulo, nome e o logotipo plantado no horizonte ---------- */
.centro {
  position: absolute;
  z-index: 4;
  left: 50%;
  bottom: calc(100% - var(--horizonte));
  transform: translateX(-50%);
  width: min(92vw, 44rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  pointer-events: none;
}
h1 {
  margin: 0;
  font: 400 clamp(1.85rem, min(9.2vw, 6.4svh), 4.4rem)/1.02 "Young Serif", Georgia, serif;
  letter-spacing: -0.015em;
  text-wrap: balance;
  max-width: 11ch;
  text-shadow: 0 2px 18px rgb(23 48 31 / .95), 0 0 4px rgb(23 48 31 / .6);
}
@media (min-width: 700px) { h1 { max-width: none; } }
.nome {
  margin: .5em 0 0;
  color: var(--palha-suave);
  font-size: clamp(.95rem, 2.4svh, 1.15rem);
  font-weight: 500;
  text-shadow: 0 1px 10px rgb(23 48 31 / .95);
}
.adesivo {
  display: block;
  width: clamp(64px, 12.5svh, 132px); height: auto;
  margin: clamp(.4rem, 1.8svh, 1.1rem) 0 calc(clamp(64px, 12.5svh, 132px) * -.14);
  transform: rotate(-5deg);
  filter: drop-shadow(0 5px 6px rgb(0 0 0 / .32));
}

/* ---------- terra: barro vermelho com borda ondulada ---------- */
.terra {
  position: absolute;
  z-index: 3;
  left: 0; right: 0; bottom: 0;
  top: var(--horizonte);
  background: var(--barro);
  padding: clamp(1.4rem, 5svh, 2.8rem) 1.25rem max(.75rem, env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.terra::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: calc(100% - 1px);
  height: clamp(14px, 3.2svh, 30px);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1000 40' preserveAspectRatio='none'%3E%3Cpath d='M0 22 C 90 6 170 2 250 8 C 330 14 390 30 480 26 C 570 22 610 2 700 3 C 790 4 850 26 920 23 C 960 21 985 16 1000 14 L1000 40 L0 40 Z' fill='%237E3320'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.terra p {
  margin: 0 0 .25rem;
  max-width: 30ch;
  font-size: clamp(.92rem, 2.3svh, 1.1rem);
}
@media (min-width: 700px) { .terra p { max-width: none; } }
.insta {
  color: var(--palha);
  font-weight: 650;
  font-size: clamp(1rem, min(4.4vw, 2.8svh), 1.3rem);
  text-decoration: underline wavy var(--broto);
  text-decoration-thickness: 2px;
  text-underline-offset: .32em;
  overflow-wrap: anywhere;
  padding: .25rem .2rem;
}
.insta:hover { text-decoration-color: var(--palha); }
.pausa {
  margin-top: auto;
  padding: .3rem .85rem;
  font: inherit;
  font-size: .85rem;
  color: var(--palha-suave);
  background: none;
  border: 1.5px dashed rgb(242 236 217 / .45);
  border-radius: 999px;
  cursor: pointer;
}
.pausa[hidden] { display: none; }
.pausa:hover { color: var(--palha); border-color: var(--palha); }

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

/* um unico momento de entrada: o adesivo sendo colado */
@media (prefers-reduced-motion: no-preference) {
  .adesivo { animation: colar .7s cubic-bezier(.2, 1.4, .4, 1) .2s both; }
  @keyframes colar {
    from { transform: rotate(-16deg) scale(1.2); }
    to   { transform: rotate(-5deg) scale(1); }
  }
}

@media (min-width: 700px) and (min-height: 600px) {
  :root { --horizonte: 73%; }
}

/* telas baixas (celular deitado): terra mais baixa, sem botao extra */
@media (max-height: 480px) {
  :root { --horizonte: 72%; }
  .terra { padding-top: .9rem; }
  .terra p { display: none; }
}
