/* =====================================================================
   Colheita da Terra — Linktree
   Paleta extraída do mockup/logo: creme #fff6e4 · cacau #290b00 ·
   morango #ff1e08 · folha #3e9b3b. Fonte do PSD: Poppins (300/700).
   ===================================================================== */

:root {
  --cream: #fff6e4;
  --cocoa: #290b00;
  --straw: #ff1e08;
  --leaf: #3e9b3b;
  --leaf-deep: #2f7a2d;

  /* proporções tiradas do mockup (1080px de largura) */
  --gutter: clamp(22px, 7.4vw, 32px);
  --col-max: 560px;
  --logo: clamp(150px, 40vw, 230px);
  --btn-h: clamp(118px, 34vw, 148px);
  --gap: clamp(14px, 4.3vw, 20px);
  --radius: clamp(16px, 3.8vw, 22px);

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  background: var(--cream);
  color: var(--cocoa);
  font-family: 'Poppins', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 300;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
strong { font-weight: 700; }

/* ---------- Fundo decorativo ---------- */
.bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.blob {
  position: absolute;
  border-radius: 50%;
  will-change: transform;
}
.blob--red {
  width: 64vmax; height: 64vmax;
  left: -30vmax; top: -30vmax;
  background: radial-gradient(circle, rgba(255, 30, 8, .26) 0%, rgba(255, 30, 8, .09) 42%, transparent 68%);
  animation: drift-a 26s ease-in-out infinite alternate;
}
.blob--green {
  width: 62vmax; height: 62vmax;
  right: -30vmax; bottom: -32vmax;
  background: radial-gradient(circle, rgba(62, 155, 59, .26) 0%, rgba(62, 155, 59, .09) 42%, transparent 68%);
  animation: drift-b 30s ease-in-out infinite alternate;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: .06;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .16 0 0 0 0 .04 0 0 0 0 0 0 0 0 .55 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

/* ---------- Coluna principal ---------- */
.page {
  position: relative;
  z-index: 1;
  width: min(100%, var(--col-max));
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: clamp(44px, 14vw, 80px) var(--gutter) clamp(28px, 8vw, 48px);
}

.hero {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Logo com halo, anel e leve flutuação */
.logo-wrap {
  position: relative;
  width: var(--logo);
  aspect-ratio: 1;
  margin-bottom: clamp(28px, 10vw, 44px);
  animation: float 6s ease-in-out 1.3s infinite;
}
.logo-halo {
  position: absolute;
  inset: -20%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 30, 8, .34) 0%, rgba(255, 30, 8, .12) 42%, transparent 68%);
  filter: blur(12px);
  animation: halo 4.8s ease-in-out infinite;
}
.logo-ring {
  position: absolute;
  inset: -9%;
  border-radius: 50%;
  border: 1.5px dashed rgba(41, 11, 0, .30);
  animation: spin 80s linear infinite;
}
.logo-tilt {
  position: relative;
  width: 100%;
  height: 100%;
  transform: perspective(700px) rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s ease-out;
  will-change: transform;
}
.logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  box-shadow:
    0 24px 48px -22px rgba(41, 11, 0, .6),
    0 0 0 4px var(--cream),
    0 0 0 5.5px rgba(41, 11, 0, .14);
  animation: pop .9s var(--spring) .1s both;
}

/* Textos */
.greet, .intro {
  margin: 0;
  font-size: clamp(16px, 4.4vw, 21px);
  max-width: 32ch;
}
.greet { animation: rise .7s var(--ease-out) .45s both; }
.intro {
  margin-top: clamp(20px, 7vw, 34px);
  margin-bottom: clamp(30px, 10vw, 48px);
  animation: rise .7s var(--ease-out) .6s both;
}

/* marca-texto que "desenha" embaixo do nome */
.brand {
  position: relative;
  white-space: nowrap;
  isolation: isolate;
}
.brand::after {
  content: "";
  position: absolute;
  left: -.12em; right: -.12em; bottom: .04em;
  height: .36em;
  border-radius: .2em;
  background: linear-gradient(90deg, rgba(255, 30, 8, .34), rgba(255, 30, 8, .12));
  z-index: -1;
  transform: scaleX(0);
  transform-origin: left center;
  animation: draw .8s var(--ease-out) 1.25s forwards;
}

/* ---------- Botões ---------- */
.links { width: 100%; }
.links__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}
.links__list li { animation: rise .7s var(--ease-out) both; }
.links__list li:nth-child(1) { animation-delay: .75s; }
.links__list li:nth-child(2) { animation-delay: .87s; }
.links__list li:nth-child(3) { animation-delay: .99s; }
.links__list li:nth-child(4) { animation-delay: 1.11s; }

.btn {
  container-type: inline-size;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0 8.5%;
  width: 100%;
  min-height: var(--btn-h);
  padding: 0 6% 0 14.5%;
  border: 0;
  border-radius: var(--radius);
  background: var(--cocoa);
  color: var(--cream);
  font: inherit;
  font-weight: 700;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  box-shadow:
    0 16px 36px -18px rgba(41, 11, 0, .6),
    inset 0 1px 0 rgba(255, 246, 228, .08);
  transition: transform .35s var(--spring), box-shadow .35s ease;
}
/* brilho de hover */
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(255, 246, 228, .10), rgba(255, 30, 8, .12));
  opacity: 0;
  transition: opacity .35s ease;
}
/* reflexo que varre o botão de tempos em tempos */
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(105deg,
    transparent 35%,
    rgba(255, 246, 228, .09) 45%,
    rgba(255, 246, 228, .22) 50%,
    rgba(255, 246, 228, .09) 55%,
    transparent 65%);
  transform: translateX(-130%);
  animation: shine 7s ease-in-out infinite;
}
.links__list li:nth-child(1) .btn::after { animation-delay: 1.9s; }
.links__list li:nth-child(2) .btn::after { animation-delay: 2.5s; }
.links__list li:nth-child(3) .btn::after { animation-delay: 3.1s; }
.links__list li:nth-child(4) .btn::after { animation-delay: 3.7s; }

.btn__icon {
  position: relative;
  z-index: 2;
  width: 24cqw;
  min-width: 60px;
  max-width: 92px;
  aspect-ratio: 1;
}
.btn__icon img {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 14px rgba(0, 0, 0, .38));
  transition: transform .45s var(--spring);
}
.btn__label {
  position: relative;
  z-index: 2;
  font-size: clamp(24px, 10.3cqw, 38px);
  line-height: 1.1;
  letter-spacing: .01em;
  transition: transform .35s var(--spring);
}
.btn__arrow {
  position: relative;
  z-index: 2;
  font-size: clamp(26px, 9cqw, 38px);
  font-weight: 300;
  line-height: 1;
  opacity: 0;
  transform: translateX(-10px);
  transition: opacity .35s ease, transform .35s var(--ease-out);
}

.btn:active {
  transform: translateY(1px) scale(.985);
  transition-duration: .1s;
}
.btn:focus-visible {
  outline: 3px solid var(--straw);
  outline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover {
    transform: translateY(-4px) scale(1.012);
    box-shadow:
      0 24px 48px -20px rgba(41, 11, 0, .7),
      0 12px 40px -14px rgba(255, 30, 8, .35),
      0 0 0 1px rgba(255, 30, 8, .22),
      inset 0 1px 0 rgba(255, 246, 228, .1);
  }
  .btn:hover::before { opacity: 1; }
  .btn:hover .btn__icon img { transform: rotate(-8deg) scale(1.1); }
  .btn:hover .btn__label { transform: translateX(4px); }
  .btn:hover .btn__arrow { opacity: .85; transform: none; }
}

/* onda ao tocar (criada pelo JS) */
.ripple {
  position: absolute;
  z-index: 1;
  border-radius: 50%;
  background: rgba(255, 246, 228, .26);
  transform: scale(0);
  pointer-events: none;
  animation: ripple .7s ease-out forwards;
}

/* ---------- Rodapé ---------- */
.foot {
  margin-top: auto;
  padding-top: clamp(30px, 9vw, 44px);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  opacity: .55;
  animation: rise .7s var(--ease-out) 1.35s both;
}
.foot p { margin: 0; }

/* ---------- Pop-up do catálogo ---------- */
.modal {
  width: 100%;
  max-width: min(92vw, 440px);
  margin: auto;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
  color: inherit;
}
.modal::backdrop {
  background: rgba(41, 11, 0, .55);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.modal[open] { animation: modal-in .5s var(--spring) both; }
.modal[open]::backdrop { animation: fade-in .3s ease both; }
.modal.is-closing { animation: modal-out .22s ease-in both; }
.modal.is-closing::backdrop { animation: fade-out .22s ease-in both; }

.modal__card {
  position: relative;
  background: var(--cream);
  color: var(--cocoa);
  border-radius: 28px;
  padding: clamp(30px, 8vw, 44px) clamp(22px, 6vw, 36px) clamp(24px, 6vw, 32px);
  text-align: center;
  box-shadow:
    0 34px 80px -24px rgba(41, 11, 0, .65),
    0 0 0 1px rgba(41, 11, 0, .08);
}
.modal__close {
  position: absolute;
  top: 12px; right: 12px;
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: rgba(41, 11, 0, .06);
  color: var(--cocoa);
  font: inherit;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, transform .35s var(--spring);
}
.modal__close:hover { background: rgba(41, 11, 0, .12); transform: rotate(90deg); }
.modal__close:focus-visible { outline: 3px solid var(--straw); outline-offset: 2px; }

.modal__icon {
  width: clamp(84px, 22vw, 104px);
  margin: 0 auto 18px;
  animation: bob 2.4s ease-in-out infinite alternate;
}
.modal__icon img {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 14px 22px rgba(41, 11, 0, .28));
}
.modal__title {
  margin: 0 0 10px;
  font-size: clamp(20px, 5.6vw, 24px);
  font-weight: 700;
  line-height: 1.2;
}
.modal__text {
  margin: 0 auto 24px;
  max-width: 30ch;
  font-size: clamp(15px, 4.2vw, 17px);
  line-height: 1.5;
}
.modal__actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.modal__btn {
  display: block;
  padding: 14px 20px;
  border: 0;
  border-radius: 14px;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: transform .3s var(--spring), box-shadow .3s ease, background .2s ease;
}
.modal__btn--primary {
  background: var(--cocoa);
  color: var(--cream);
  box-shadow: 0 14px 26px -12px rgba(41, 11, 0, .65);
}
.modal__btn--primary:hover { transform: translateY(-2px); box-shadow: 0 18px 30px -12px rgba(41, 11, 0, .7); }
.modal__btn--ghost {
  background: transparent;
  color: var(--cocoa);
  box-shadow: inset 0 0 0 1.5px rgba(41, 11, 0, .25);
}
.modal__btn--ghost:hover { background: rgba(41, 11, 0, .06); }
.modal__btn:focus-visible { outline: 3px solid var(--straw); outline-offset: 3px; }

body:has(dialog[open]) { overflow: hidden; }

/* ---------- Tablet e desktop ---------- */
@media (min-width: 768px) {
  .page { padding-top: clamp(56px, 8vh, 96px); }
}

/* ---------- Keyframes ---------- */
@keyframes pop {
  from { opacity: 0; transform: scale(.55); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-8px); }
}
@keyframes halo {
  0%, 100% { transform: scale(.94); opacity: .75; }
  50%      { transform: scale(1.08); opacity: 1; }
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes draw { to { transform: scaleX(1); } }
@keyframes drift-a {
  from { transform: translate(0, 0); }
  to   { transform: translate(7vw, 5vh); }
}
@keyframes drift-b {
  from { transform: translate(0, 0); }
  to   { transform: translate(-6vw, -5vh); }
}
@keyframes bob {
  from { transform: translateY(0) rotate(var(--r, 0deg)); }
  to   { transform: translateY(-16px) rotate(calc(var(--r, 0deg) + 7deg)); }
}
@keyframes shine {
  0%   { transform: translateX(-130%); }
  18%  { transform: translateX(130%); }
  100% { transform: translateX(130%); }
}
@keyframes ripple {
  to { transform: scale(1); opacity: 0; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(26px) scale(.94); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes modal-out {
  from { opacity: 1; transform: translateY(0) scale(1); }
  to   { opacity: 0; transform: translateY(16px) scale(.96); }
}
@keyframes fade-in  { from { opacity: 0; } to { opacity: 1; } }
@keyframes fade-out { from { opacity: 1; } to { opacity: 0; } }

/* ---------- Acessibilidade: menos movimento ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    animation-delay: 0s !important;
    transition-duration: .01ms !important;
  }
  .brand::after { transform: scaleX(1); }
  .logo-tilt { transform: none !important; }
}
