/* ================================================================
   style.css — La Campesina | Página de Links
   ================================================================

   COMO EDITAR RAPIDAMENTE:
   ─────────────────────────────────────────────────────────────
   → CORES: altere as variáveis em :root (seção Paleta de Cores)
   → FONTES: altere --font-titulo e --font-corpo em :root
   → TAMANHO DO CONTAINER: altere --container-max
   → BORDAS ARREDONDADAS: altere --radius-card
   ─────────────────────────────────────────────────────────────
================================================================ */

/* ════════════════════════════════════════════
   1. VARIÁVEIS — Paleta, tipografia, espaços
════════════════════════════════════════════ */
:root {
  /* ── Paleta de Cores ── */
  /* Fundo: edite aqui a cor de fundo da página */
  --cor-fundo:          #ECE7DE;
  --cor-fundo-card:     #FDFAF4;
  --cor-bege:           #F3E7CC;

  /* Marrom — cor principal da marca */
  --cor-marrom-escuro:  #6A1F00;
  --cor-marrom-medio:   #A9551F;

  /* Verde — cor de destaque (botão principal) */
  --cor-verde:          #53AF36;
  --cor-verde-hover:    #429e28;
  --cor-verde-sombra:   rgba(83, 175, 54, 0.35);

  /* Textos */
  --cor-texto:          #121015;
  --cor-texto-suave:    #5a5360;

  /* Bordas e sombras */
  --cor-borda:          rgba(106, 31, 0, 0.13);
  --cor-sombra:         rgba(106, 31, 0, 0.09);
  --cor-sombra-hover:   rgba(106, 31, 0, 0.18);

  /* ── Tipografia ── */
  /* Título (nome da marca, destaque) */
  --font-titulo:  'Playfair Display', Georgia, serif;
  /* Corpo (tagline, botões, textos gerais) */
  --font-corpo:   'Nunito', system-ui, sans-serif;

  /* ── Espaçamentos ── */
  --espaco-xs:   0.375rem;
  --espaco-sm:   0.75rem;
  --espaco-md:   1rem;
  --espaco-lg:   1.5rem;
  --espaco-xl:   2rem;
  --espaco-2xl:  3rem;

  /* ── Layout ── */
  --container-max:  480px;
  --radius-card:    16px;
  --radius-logo:    50%;

  /* ── Transições ── */
  --transicao-rapida:  0.2s ease;
  --transicao-media:   0.28s ease;
}


/* ════════════════════════════════════════════
   2. RESET & BASE
════════════════════════════════════════════ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-corpo);
  background-color: var(--cor-fundo);
  background-image: url('Fundo.png');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  min-height: 100vh;
  color: var(--cor-texto);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

@media (max-width: 768px) {
  body {
    background-attachment: scroll;
  }
}

img {
  max-width: 100%;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

ul {
  list-style: none;
}


/* ════════════════════════════════════════════
   3. LAYOUT PRINCIPAL
════════════════════════════════════════════ */
.page-wrapper {
  min-height: 100vh;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: var(--espaco-xl) var(--espaco-md);
}

.container {
  width: 100%;
  max-width: var(--container-max);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--espaco-xl);
  padding-bottom: var(--espaco-lg);

  /* Animação de entrada da página */
  opacity: 0;
  animation: entrada-suave 0.65s ease forwards;
  animation-delay: 0.08s;
}


/* ════════════════════════════════════════════
   4. HEADER — Logo + Nome + Tagline
════════════════════════════════════════════ */
.profile-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--espaco-sm);
  text-align: center;
}

/* ── Moldura da logo ── */
.logo-wrapper {
  width: 118px;
  height: 118px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-logo);
  background-color: var(--cor-bege);
  border: 2.5px solid rgba(106, 31, 0, 0.18);
  box-shadow:
    0 4px 18px rgba(106, 31, 0, 0.13),
    0 1px 4px  rgba(106, 31, 0, 0.08);
  overflow: hidden;
  flex-shrink: 0;

  /* Animação flutuante discreta */
  animation: flutuar 5s ease-in-out infinite;
  animation-delay: 1s;
}

.brand-logo {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

/* ── Nome da marca ── */
.brand-name {
  font-family: var(--font-titulo);
  font-size: clamp(1.75rem, 5vw, 2.15rem);
  font-weight: 600;
  color: var(--cor-marrom-escuro);
  letter-spacing: 0.025em;
  line-height: 1.2;
  margin-top: var(--espaco-xs);
}

/* ── Frase de apoio ── */
.brand-tagline {
  font-family: var(--font-titulo);
  font-style: italic;
  font-size: clamp(0.875rem, 2.5vw, 0.95rem);
  color: var(--cor-texto-suave);
  max-width: 290px;
  line-height: 1.55;
  font-weight: 400;
}


/* ════════════════════════════════════════════
   5. NAVEGAÇÃO DE LINKS
════════════════════════════════════════════ */
.links-nav {
  width: 100%;
}

.links-list {
  display: flex;
  flex-direction: column;
  gap: 0.875rem;
  width: 100%;
}

/* ── Item da lista — animação escalonada ── */
.link-item {
  opacity: 0;
}

.link-item:nth-child(1) { animation: subir 0.5s ease forwards; animation-delay: 0.35s; }
.link-item:nth-child(2) { animation: subir 0.5s ease forwards; animation-delay: 0.5s;  }
.link-item:nth-child(3) { animation: subir 0.5s ease forwards; animation-delay: 0.65s; }
.link-item:nth-child(4) { animation: subir 0.5s ease forwards; animation-delay: 0.8s;  }


/* ════════════════════════════════════════════
   6. CARD DE LINK — Base
════════════════════════════════════════════ */
.link-card {
  display: flex;
  align-items: center;
  gap: var(--espaco-md);
  padding: 0.9rem 1.15rem;
  width: 100%;

  background-color: var(--cor-fundo-card);
  border: 1.5px solid var(--cor-borda);
  border-radius: var(--radius-card);
  box-shadow: 0 2px 14px var(--cor-sombra);

  cursor: pointer;
  position: relative;
  overflow: hidden;

  transition:
    transform          var(--transicao-media),
    box-shadow         var(--transicao-media),
    background-color   var(--transicao-media),
    border-color       var(--transicao-media);
}

/* Reflexo sutil no hover */
.link-card::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(130deg, rgba(255,255,255,0.45) 0%, transparent 55%);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transicao-media);
  border-radius: inherit;
}

.link-card:hover::after {
  opacity: 1;
}

.link-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px var(--cor-sombra-hover);
  background-color: var(--cor-bege);
  border-color: rgba(106, 31, 0, 0.28);
}

.link-card:active {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px var(--cor-sombra);
  transition-duration: 0.1s;
}

/* Foco visível para navegação por teclado — acessibilidade */
.link-card:focus-visible {
  outline: 3px solid var(--cor-verde);
  outline-offset: 3px;
  box-shadow: 0 0 0 5px rgba(83, 175, 54, 0.18);
}


/* ── Ícone do card ── */
.link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  min-width: 42px;
  background-color: rgba(106, 31, 0, 0.07);
  border-radius: 11px;
  color: var(--cor-marrom-escuro);
  transition:
    background-color var(--transicao-rapida),
    color            var(--transicao-rapida);
  flex-shrink: 0;
}

.link-icon svg {
  width: 20px;
  height: 20px;
}

.link-card:hover .link-icon {
  background-color: var(--cor-marrom-escuro);
  color: #fff;
}


/* ── Texto do card ── */
.link-text {
  flex: 1;
  font-size: clamp(0.95rem, 2.5vw, 1rem);
  font-weight: 700;
  color: var(--cor-texto);
  letter-spacing: 0.01em;
  transition: color var(--transicao-rapida);
}

.link-card:hover .link-text {
  color: var(--cor-marrom-escuro);
}


/* ── Seta do card ── */
.link-arrow {
  display: flex;
  align-items: center;
  color: var(--cor-marrom-medio);
  opacity: 0.35;
  transition:
    opacity   var(--transicao-rapida),
    transform var(--transicao-rapida);
  flex-shrink: 0;
}

.link-arrow svg {
  width: 17px;
  height: 17px;
}

.link-card:hover .link-arrow {
  opacity: 1;
  transform: translateX(5px);
}


/* ════════════════════════════════════════════
   7. CARD DESTAQUE — Peça sua marmita (verde)
   Para mudar a cor do destaque, altere
   --cor-verde e --cor-verde-hover em :root
════════════════════════════════════════════ */
.link-card--destaque {
  background: linear-gradient(135deg, var(--cor-verde) 0%, var(--cor-verde-hover) 100%);
  border-color: transparent;
  box-shadow: 0 4px 20px var(--cor-verde-sombra);
}

.link-card--destaque::after {
  background: linear-gradient(130deg, rgba(255,255,255,0.25) 0%, transparent 55%);
}

.link-card--destaque .link-icon {
  background-color: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.link-card--destaque .link-text {
  color: #fff;
}

.link-card--destaque .link-arrow {
  color: #fff;
  opacity: 0.6;
}

.link-card--destaque:hover {
  background: linear-gradient(135deg, #5ec53e 0%, #4aaa2d 100%);
  border-color: transparent;
  box-shadow: 0 10px 32px rgba(83, 175, 54, 0.45);
}

.link-card--destaque:hover .link-icon {
  background-color: rgba(255, 255, 255, 0.32);
  color: #fff;
}

.link-card--destaque:hover .link-text {
  color: #fff;
}

.link-card--destaque:hover .link-arrow {
  opacity: 1;
  color: #fff;
}

.link-card--destaque:focus-visible {
  outline-color: #fff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5);
}


/* ════════════════════════════════════════════
   8. EFEITO RIPPLE (criado via JS)
════════════════════════════════════════════ */
.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(106, 31, 0, 0.12);
  pointer-events: none;
  transform: scale(0);
  animation: ripple-expand 0.55s ease-out forwards;
}

.link-card--destaque .ripple {
  background: rgba(255, 255, 255, 0.22);
}

@keyframes ripple-expand {
  to {
    transform: scale(2.8);
    opacity: 0;
  }
}


/* ════════════════════════════════════════════
   9. RODAPÉ
════════════════════════════════════════════ */
.page-footer {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;

  opacity: 0;
  animation: subir 0.5s ease forwards;
  animation-delay: 1s;
}

/* Texto "Feito com carinho para..." */
.footer-texto {
  font-size: 0.875rem;
  color: var(--cor-texto-suave);
}

.footer-texto strong {
  color: var(--cor-marrom-escuro);
  font-weight: 700;
}

/* Copyright */
.footer-copy {
  font-size: 0.75rem;
  color: var(--cor-texto-suave);
  opacity: 0.5;
}


/* ════════════════════════════════════════════
   10. ANIMAÇÕES
════════════════════════════════════════════ */
@keyframes entrada-suave {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes subir {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes flutuar {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-5px); }
}


/* ════════════════════════════════════════════
   11. RESPONSIVO
════════════════════════════════════════════ */

/* Telas pequenas (base — mobile first) já tratadas acima */

/* Telas a partir de 420px */
@media (min-width: 420px) {
  .logo-wrapper {
    width: 130px;
    height: 130px;
  }

  .brand-logo {
    width: 98px;
    height: 98px;
  }

  .link-card {
    padding: 1rem 1.35rem;
  }
}

/* Telas a partir de 768px (tablets/desktop) */
@media (min-width: 768px) {
  .page-wrapper {
    align-items: center;
    padding: var(--espaco-2xl) var(--espaco-md);
  }

  .logo-wrapper {
    width: 140px;
    height: 140px;
  }

  .brand-logo {
    width: 105px;
    height: 105px;
  }

  .link-card {
    padding: 1.1rem 1.5rem;
  }

  .links-list {
    gap: 1rem;
  }
}


/* ════════════════════════════════════════════
   12. ACESSIBILIDADE — Reduzir animações
════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .container,
  .link-item,
  .page-footer {
    opacity: 1;
    transform: none;
  }
}
