/* ============================================================
   LANDING PAGE — CANDIDATO

   Para duplicar para outro candidato:
   1. troque --accent
   2. troque foto.webp
   3. troque o link do Instagram no index.html
   4. troque nome/partido nos metadados e footer
   ============================================================ */

:root {
  --accent: #138834;
  --accent-dark: #094c1c;

  --paper: #f6f4ef;
  --paper-2: #fffdf9;
  --ink: #1a1c22;
  --muted: #686b72;
  --line: #e3ddd2;

  --font-body: "Public Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --page-width: 760px;
  --image-width: 590px;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-body);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(
      90% 46% at 50% -4%,
      color-mix(in srgb, var(--accent) 10%, transparent) 0%,
      transparent 68%
    );
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.topbar {
  flex: 0 0 auto;
  width: 100%;
  height: 7px;
  background: var(--accent);
}

/* =========================
   CONTEÚDO PRINCIPAL
   ========================= */

.wrap {
  flex: 1;
  width: min(100%, var(--page-width));
  margin: 0 auto;
  padding: clamp(38px, 5vw, 68px) 24px 46px;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
}

/* =========================
   IMAGEM
   ========================= */

.visual {
  position: relative;
  width: min(100%, var(--image-width));
  isolation: isolate;
}

/* sombra/halo discreto atrás da arte */
.visual::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 7% 8% -2%;
  border-radius: 32px;
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  filter: blur(34px);
  opacity: .62;
}

.photo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 22px;
  object-fit: cover;
  background: var(--paper-2);
  border: 1px solid rgba(26, 28, 34, .09);
  box-shadow:
    0 30px 70px -36px rgba(26, 28, 34, .42),
    0 8px 24px -16px rgba(26, 28, 34, .18);
}

.name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 560;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-top: 34px;
  text-align: center;
}

.role {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-top: 16px;
  text-align: center;
}

.rule {
  width: 46px;
  height: 2px;
  background: var(--accent);
  margin: 30px auto;
  border: 0;
  opacity: .8;
}

/* =========================
   BOTÃO INSTAGRAM
   ========================= */

.btn {
  width: min(100%, 430px);
  min-height: 62px;
  padding: 0 22px;

  display: grid;
  grid-template-columns: 24px 1fr 22px;
  align-items: center;
  gap: 13px;

  color: #fff;
  background: var(--accent);
  border-radius: 999px;
  text-decoration: none;

  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  text-align: center;

  box-shadow: 0 16px 30px -18px color-mix(in srgb, var(--accent) 90%, transparent);
  transition:
    transform .22s ease,
    background-color .22s ease,
    box-shadow .22s ease;
}

.btn svg {
  width: 22px;
  height: 22px;
}

.btn .arrow {
  width: 20px;
  height: 20px;
  justify-self: end;
  transition: transform .22s ease;
}

@media (hover: hover) {
  .btn:hover {
    background: var(--accent-dark);
    transform: translateY(-2px);
    box-shadow: 0 20px 34px -18px color-mix(in srgb, var(--accent) 95%, transparent);
  }

  .btn:hover .arrow {
    transform: translateX(3px);
  }
}

.btn:active {
  transform: translateY(0);
}

.btn:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--accent) 30%, transparent);
  outline-offset: 5px;
}

/* =========================
   FOOTER
   ========================= */

.foot {
  flex: 0 0 auto;
  width: 100%;
  border-top: 1px solid var(--line);
  padding: 26px 24px 34px;
  color: var(--muted);
  font-size: .8rem;
  text-align: center;
}

.foot-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}

.foot a {
  color: var(--accent);
  text-decoration: none;
}

.foot a:hover {
  text-decoration: underline;
}

.foot .sep {
  margin: 0 .65em;
  opacity: .5;
}

.foot .legal {
  display: block;
  margin-top: 10px;
  opacity: .84;
}

/* =========================
   POLÍTICA DE PRIVACIDADE
   ========================= */

.doc {
  flex: 1;
  width: 100%;
  max-width: 680px;
  margin: 0 auto;
  padding: clamp(40px, 7vw, 72px) 24px 48px;
}

.doc a.back {
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent);
  text-decoration: none;
}

.doc a.back:hover {
  text-decoration: underline;
}

.doc h1 {
  font-family: Georgia, serif;
  font-weight: 600;
  font-size: clamp(2rem, 6vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -.015em;
  margin: 22px 0 6px;
}

.doc .updated {
  color: var(--muted);
  font-size: .9rem;
  margin-bottom: 34px;
}

.doc h2 {
  font-family: Georgia, serif;
  font-weight: 600;
  font-size: 1.3rem;
  margin: 34px 0 10px;
}

.doc p,
.doc li {
  color: #33363d;
  line-height: 1.7;
  margin-bottom: 12px;
}

.doc ul {
  padding-left: 22px;
}

.doc a {
  color: var(--accent);
}

/* =========================
   MOBILE
   ========================= */

@media (max-width: 640px) {
  .topbar {
    height: 5px;
  }

  .wrap {
    justify-content: flex-start;
    width: 100%;
    padding: 24px 14px 30px;
    gap: 18px;
  }

  .visual {
    width: 100%;
  }

  .visual::before {
    inset: 8% 6% 0;
    filter: blur(26px);
  }

  .photo {
    border-radius: 18px;
  }

  .btn {
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    grid-template-columns: 22px 1fr 20px;
    gap: 10px;
    font-size: .96rem;
  }

  .btn svg {
    width: 21px;
    height: 21px;
  }

  .foot {
    padding: 22px 18px max(28px, env(safe-area-inset-bottom));
    font-size: .76rem;
  }
}

/* =========================
   DESKTOP GRANDE
   ========================= */

@media (min-width: 1200px) and (min-height: 850px) {
  :root {
    --image-width: 640px;
  }
}

/* Em notebooks baixos, reduz só o suficiente para não ficar exagerado */
@media (min-width: 641px) and (max-height: 820px) {
  :root {
    --image-width: 470px;
  }

  .wrap {
    padding-top: 30px;
    padding-bottom: 30px;
    gap: 20px;
  }
}

/* =========================
   ANIMAÇÃO
   ========================= */

@media (prefers-reduced-motion: no-preference) {
  .reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: rise .68s cubic-bezier(.2, .7, .2, 1) forwards;
  }

  .d1 { animation-delay: .04s; }
  .d2 { animation-delay: .15s; }
  .d3 { animation-delay: .26s; }

  @keyframes rise {
    to {
      opacity: 1;
      transform: none;
    }
  }
}
