/* ============================================================
   FONTES CUSTOMIZADAS
   ============================================================ */
@font-face {
  font-family: 'DrusticDialy';
  src: url('../fonts/Drustic/DrusticDialy-Condensed.otf') format('opentype');
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

/* ============================================================
   RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --blue:      #0043c9;
  --blue-dark: #11258f;
  --yellow:    #F2C519;
  --cream:     #F2EDD5;
  --white:     #FFFFFF;
  --font:      'Work Sans', sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--font);
  background: var(--blue);
  color: var(--white);
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }
a   { text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: var(--font); }

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  background: var(--blue-dark);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding: 14px 48px;
  position: sticky;
  top: 0;
  z-index: 100;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  max-width: 1200px;
  margin: 0 auto;
}

.header-inner > a:first-child {
  grid-column: 2;
  justify-self: center;
}

.header-link {
  grid-column: 3;
  justify-self: end;
}

.header-logo { height: 34px; width: auto; }

.header-link {
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: opacity 0.2s;
}
.header-link:hover { opacity: 0.75; }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  background-color: var(--blue-dark);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 56px 48px 72px;
  position: relative;
  overflow: hidden;
}

.hero-main-img {
  width: min(600px, 85%);
  position: relative;
  z-index: 1;
  margin-bottom: 8px;
}

.hero-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  max-width: 1080px;
  width: 100%;
  margin-top: 56px;
  position: relative;
  z-index: 1;
  align-items: center;
}

/* ============================================================
   TICKER
   ============================================================ */
.ticker {
  background-color: var(--blue);
  background-image: url('../img/a base do brasil_.png');
  background-repeat: repeat-x;
  background-position: center left;
  background-size: auto 16px;
  height: 36px;
  width: 100%;
}

.ticker-track { display: none; }

/* ============================================================
   ABOUT
   ============================================================ */
.about {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 15%;
  text-align: center;
  background: var(--blue);
}

.about-text {
  font-size: 18px;
  line-height: 1.85;
  font-weight: 400;
  color: var(--white);
}

/* Video */
.petition-video {
  display: flex;
  justify-content: center;
}

.instagram-embed {
  width: 100%;
  aspect-ratio: 9 / 16;
  max-width: 320px;
  border-radius: 8px;
  border: none;
  background: #000;
}

/* Form */
.petition-form-wrap {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.form-headline {
  font-size: 16px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--white);
}

#petitionForm {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.field input {
  width: 100%;
  background: var(--blue);
  border: none;
  border-radius: 50px;
  padding: 15px 22px;
  font-size: 15px;
  font-family: var(--font);
  font-weight: 600;
  color: var(--white);
  text-align: center;
  outline: none;
  transition: box-shadow 0.2s;
}
.field input::placeholder { color: rgba(255,255,255,0.55); }
.field input:focus { box-shadow: 0 0 0 3px rgba(255,255,255,0.35); }
.field input.error { box-shadow: 0 0 0 3px rgba(255,80,80,0.5); }

/* Custom checkbox */
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}
.checkbox-row input[type="checkbox"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.checkmark {
  width: 22px;
  height: 22px;
  min-width: 22px;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s;
  border: 2px solid rgba(255,255,255,0.5);
}
.checkbox-row input:checked + .checkmark {
  background: var(--white);
}
.checkbox-row input:checked + .checkmark::after {
  content: '✓';
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
}
.terms-text {
  font-size: 11px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.07em;
}
.terms-link {
  color: var(--white);
  text-decoration: underline;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.07em;
}

.field-error {
  font-size: 12px;
  color: #ff8080;
  font-weight: 600;
  min-height: 16px;
}

.btn-assinar {
  background: none;
  border: none;
  padding: 0;
  align-self: center;
  transition: opacity 0.2s, transform 0.1s;
}
.btn-assinar img {
  display: block;
  height: 52px;
  width: auto;
}
.btn-assinar:hover  { opacity: 0.88; }
.btn-assinar:active { transform: scale(0.97); }

/* ============================================================
   COUNTER
   ============================================================ */
.counter-section {
  background: var(--cream);
  padding: 80px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 24px;
}

.counter-label {
  color: var(--blue);
  font-size: 18px;
  font-weight: 500;
  line-height: 1.65;
}

.counter-number {
  font-family: 'DrusticDialy', sans-serif;
  font-size: clamp(72px, 11vw, 128px);
  font-weight: normal;
  font-style: normal;
  color: var(--blue);
  line-height: 1;
  letter-spacing: -0.02em;
}

.counter-icon { height: 36px; width: auto; }

/* ============================================================
   CAROUSEL
   ============================================================ */
.carousel-section {
  background: var(--blue);
  padding: 40px 0;
}

.carousel {
  position: relative;
  display: flex;
  align-items: center;
}

.carousel-viewport {
  overflow: hidden;
  width: 100%;
}

.carousel-track {
  display: flex;
  gap: 8px;
  transition: transform 0.42s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.carousel-slide {
  min-width: calc(100% / 3.5);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
  display: block;
  text-decoration: none;
  cursor: pointer;
}

.carousel-slide img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
  transition: filter 0.35s;
}

.carousel-slide:hover img {
  filter: brightness(0.45);
}

.slide-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 24px;
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s;
}

.carousel-slide:hover .slide-overlay {
  opacity: 1;
}

.overlay-title {
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  line-height: 1.5;
}

.btn-saiba {
  border: 2px solid var(--yellow);
  color: var(--yellow);
  padding: 7px 22px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  transition: background 0.2s, color 0.2s;
  font-family: var(--font);
  display: inline-block;
}
.btn-saiba:hover { background: var(--yellow); color: var(--blue); }

.carousel-btn {
  position: absolute;
  z-index: 10;
  background: var(--blue-dark);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: none;
  font-size: 26px;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  top: 50%;
  transform: translateY(-50%);
  transition: opacity 0.2s;
  user-select: none;
  flex-shrink: 0;
}
.carousel-btn:hover  { opacity: 0.8; }
.carousel-btn.prev  { left: 10px; }
.carousel-btn.next  { right: 10px; }
.carousel-btn:disabled { opacity: 0.2; pointer-events: none; }

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--blue-dark);
  padding: 52px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

.footer-logo    { height: 58px; width: auto; }
.footer-tagline { height: 16px; width: auto; opacity: 0.75; }

/* ============================================================
   MODAL
   ============================================================ */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.62);
  z-index: 500;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal-overlay.active { display: flex; }

.modal-box {
  background: white;
  border-radius: 10px;
  padding: 44px 40px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  position: relative;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 24px;
  color: #888;
  transition: color 0.2s;
  line-height: 1;
}
.modal-close:hover { color: #111; }

.modal-box h3 {
  font-size: 20px;
  color: var(--blue);
  margin-bottom: 20px;
  font-weight: 700;
}

.modal-body p {
  font-size: 14px;
  color: #444;
  line-height: 1.75;
  margin-bottom: 14px;
}

/* ============================================================
   OBRIGADO PAGE
   ============================================================ */
.obrigado {
  min-height: calc(100vh - 135px);
  background: var(--blue);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 80px 24px;
  gap: 32px;
}

.obrigado-title {
  width: min(460px, 82%);
}

.obrigado-text {
  font-size: 18px;
  color: var(--white);
  line-height: 1.8;
  font-weight: 400;
}

.btn-share {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 2px solid rgba(255,255,255,0.45);
  background: transparent;
  color: var(--white);
  padding: 14px 36px;
  border-radius: 50px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: background 0.2s, border-color 0.2s;
}
.btn-share:hover {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.7);
}

.obrigado-icon {
  width: 80px;
  opacity: 0.9;
}

/* ============================================================
   CERTIFICATE
   ============================================================ */
.cert-container {
  position: fixed;
  left: -9999px;
  top: 0;
  z-index: -1;
  pointer-events: none;
}

.cert {
  width: 800px;
  min-height: 1000px;
  background: #F2EDD5;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 80px 100px;
  gap: 28px;
  font-family: var(--font);
}

/* Outer border */
.cert::before {
  content: '';
  position: absolute;
  inset: 24px;
  border: 1.5px solid var(--blue);
  pointer-events: none;
}

/* Corner ornaments */
.cert-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 48px;
}
.cert-corner img { width: 100%; opacity: 0.9; }

.cert-corner.tl { top: 32px;    left: 32px; }
.cert-corner.tr { top: 32px;    right: 32px; transform: scaleX(-1); }
.cert-corner.bl { bottom: 32px; left: 32px;  transform: scaleY(-1); }
.cert-corner.br { bottom: 32px; right: 32px; transform: scale(-1); }

/* Diamond */
.cert-diamond-wrap {
  position: relative;
  width: 210px;
  height: 210px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}

.cert-diamond-box {
  position: absolute;
  inset: 14px;
  border: 2px solid var(--blue);
  transform: rotate(45deg);
  border-radius: 4px;
}

.cert-diamond-text {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2px;
}

.cert-d1 {
  font-size: 15px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.04em;
}
.cert-d1 em { font-style: italic; font-weight: 600; }

.cert-d2, .cert-d3 {
  font-size: 16px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Name */
.cert-name-wrap {
  text-align: center;
  width: 100%;
  padding: 0 40px;
}

.cert-name {
  font-family: 'Dancing Script', cursive;
  font-size: 52px;
  color: var(--blue);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 10px;
}

.cert-name-line {
  height: 1.5px;
  background: var(--blue);
  width: 55%;
  margin: 0 auto;
  opacity: 0.6;
}

/* Body text */
.cert-body1, .cert-body2 {
  text-align: center;
  color: var(--blue);
  line-height: 1.7;
}
.cert-body1 { font-size: 15px; font-weight: 500; }
.cert-body2 { font-size: 13px; font-weight: 400; margin-top: -8px; }

/* Footer */
.cert-foot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.cert-logo    { height: 56px; width: auto; }
.cert-tagline {
  font-size: 14px;
  font-weight: 800;
  color: var(--blue);
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 860px) {
  .hero { padding: 40px 24px 56px; }
  .hero-form-row {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-top: 40px;
  }
  .about-text { font-size: 16px; }
  .counter-label { font-size: 16px; }
}

@media (max-width: 600px) {
  .site-header { padding: 12px 20px; }
  .hero-main-img { width: 90%; }
  .carousel-slide { min-width: 80%; }
  .obrigado-text  { font-size: 15px; }
  .obrigado-text br { display: none; }
}
