/* GOB-PA — Confirmação de Presença · 7 de Setembro */

:root {
  --navy: #0B1F3A;
  --navy-deep: #061428;
  --navy-mid: #143056;
  --gold: #C9A227;
  --gold-soft: #E0C56A;
  --gold-muted: rgba(201, 162, 39, 0.35);
  --green: #009B3A;
  --green-soft: rgba(0, 155, 58, 0.12);
  --white: #FFFFFF;
  --off-white: #F7F8FA;
  --text: #1A2A3A;
  --text-muted: #5A6B7D;
  --border: #E4E8EE;
  --error: #B42318;
  --shadow: 0 12px 40px rgba(11, 31, 58, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "Poppins", system-ui, sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* —— Atmosphere —— */
.page-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
  background: var(--white);
}

.bg-flag,
.bg-geometry {
  display: none;
}

/* —— Layout —— */
.shell {
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  padding: 1.5rem 1rem 2.5rem;
  min-height: 100dvh;
}

.card {
  width: 100%;
  max-width: 480px;
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(11, 31, 58, 0.06);
  border: 1px solid rgba(11, 31, 58, 0.12);
  padding: 2rem 1.5rem 1.75rem;
  animation: card-in 0.7s var(--ease) both;
}

@keyframes card-in {
  from {
    opacity: 0;
    transform: translateY(18px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* —— Header —— */
.card-header {
  text-align: center;
}

.logo {
  display: block;
  width: 132px;
  height: auto;
  margin: 0 auto 0.85rem;
  object-fit: contain;
  animation: logo-in 0.9s var(--ease) 0.1s both;
}

@keyframes logo-in {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.org-name {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--navy);
}

.org-state {
  margin: 0.2rem 0 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  letter-spacing: 0.04em;
}

.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin: 1.15rem 0 1.25rem;
}

.divider-line {
  display: block;
  width: 48px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.divider-star {
  color: var(--gold);
  font-size: 0.65rem;
  line-height: 1;
}

.card-header h1 {
  margin: 0;
  font-size: clamp(1.35rem, 4.5vw, 1.65rem);
  font-weight: 700;
  color: var(--navy);
  letter-spacing: -0.02em;
  line-height: 1.25;
}

.subtitle {
  margin: 0.45rem 0 0;
}

.date-accent {
  display: inline-block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--green);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.date-weekday {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  letter-spacing: 0.02em;
}

.description {
  margin: 0.85rem auto 0;
  max-width: 36ch;
  font-size: 0.875rem;
  color: var(--text-muted);
  line-height: 1.6;
}

/* —— Event schedule —— */
.event {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.section-label {
  margin: 0 0 1.35rem;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold);
  text-align: center;
}

.schedule {
  list-style: none;
  margin: 0;
  padding: 0;
  position: relative;
}

.schedule::before {
  content: "";
  position: absolute;
  left: 0.35rem;
  top: 0.55rem;
  bottom: 0.55rem;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--gold-muted) 8%,
    var(--gold) 50%,
    var(--gold-muted) 92%,
    transparent
  );
}

.schedule-item {
  display: grid;
  grid-template-columns: 4.75rem 1fr;
  column-gap: 1.1rem;
  align-items: start;
  position: relative;
  padding: 0.95rem 0 0.95rem 1.35rem;
}

.schedule-item:not(:last-child) {
  border-bottom: 1px solid rgba(228, 232, 238, 0.9);
}

.schedule-item::before {
  content: "";
  position: absolute;
  left: 0.1rem;
  top: 1.35rem;
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: var(--white);
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 0 3px var(--white);
  z-index: 1;
}

.schedule-time {
  margin: 0;
  padding-top: 0.15rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--navy);
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: nowrap;
}

.schedule-body {
  min-width: 0;
}

.schedule-body h3 {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 600;
  color: var(--navy);
  line-height: 1.4;
}

.schedule-place {
  margin: 0.55rem 0 0;
  line-height: 1.4;
}

.btn-location {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.55rem 0.85rem;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(180deg, var(--navy-mid) 0%, var(--navy) 100%);
  border: 1px solid rgba(201, 162, 39, 0.45);
  border-radius: 8px;
  text-decoration: none;
  box-shadow: 0 3px 10px rgba(11, 31, 58, 0.18);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, background 0.2s ease;
}

.btn-location-icon {
  flex-shrink: 0;
  color: var(--gold-soft);
}

.btn-location:hover,
.btn-location:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(11, 31, 58, 0.26);
}

.btn-location:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.schedule-address {
  margin: 0.4rem 0 0;
  font-size: 0.82rem;
  font-weight: 400;
  color: var(--text-muted);
  line-height: 1.45;
}

@media (min-width: 480px) {
  .schedule-item {
    grid-template-columns: 5.25rem 1fr;
    column-gap: 1.35rem;
    padding: 1.1rem 0 1.1rem 1.5rem;
  }

  .schedule-time {
    font-size: 1.12rem;
  }

  .schedule-body h3 {
    font-size: 1.08rem;
  }
}

/* —— Form —— */
.form-section {
  margin-top: 1.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.form-section h2 {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  text-align: center;
}

.form-intro {
  margin: 0.35rem 0 1.35rem;
  font-size: 0.875rem;
  color: var(--text-muted);
  text-align: center;
}

.field {
  margin-bottom: 1.15rem;
}

.field label {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.required-mark {
  color: var(--gold);
  font-weight: 700;
}

.field-captcha {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.field-captcha[hidden] {
  display: none !important;
}

.captcha-label {
  margin: 0 0 0.55rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

#recaptcha-widget {
  transform-origin: left top;
}

@media (max-width: 380px) {
  #recaptcha-widget {
    transform: scale(0.92);
  }
}

.field input,
.field select {
  width: 100%;
  padding: 0.85rem 1rem;
  font-family: inherit;
  font-size: 1rem;
  color: var(--text);
  background: var(--off-white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  appearance: none;
  -webkit-appearance: none;
}

.field input::placeholder {
  color: #9AA8B8;
}

.field input:hover,
.field select:hover {
  border-color: #C5CED8;
}

.field input:focus,
.field select:focus {
  border-color: var(--navy-mid);
  background: var(--white);
  box-shadow: 0 0 0 3px rgba(11, 31, 58, 0.1);
}

.field input.is-invalid,
.field select.is-invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(180, 35, 24, 0.1);
}

.select-wrap {
  position: relative;
}

.select-wrap::after {
  content: "";
  position: absolute;
  right: 1rem;
  top: 50%;
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid var(--navy);
  border-bottom: 2px solid var(--navy);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}

.field select {
  padding-right: 2.5rem;
  cursor: pointer;
}

.field select:invalid,
.field select option[value=""] {
  color: #9AA8B8;
}

.field select option {
  color: var(--text);
}

.error {
  margin: 0.4rem 0 0;
  font-size: 0.78rem;
  color: var(--error);
}

.error[hidden],
.success[hidden],
.form-section[hidden] {
  display: none !important;
}

/* —— Submit button —— */
.btn-submit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 0.5rem;
  padding: 1rem 1.25rem;
  font-family: inherit;
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(180deg, var(--navy-mid) 0%, var(--navy) 100%);
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 4px 14px rgba(11, 31, 58, 0.28),
    0 0 0 1px rgba(201, 162, 39, 0.35);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, opacity 0.2s ease;
  position: relative;
  overflow: hidden;
}

.btn-submit::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.15), transparent);
  transform: translateX(-100%);
  transition: transform 0.5s var(--ease);
}

.btn-submit:hover:not(:disabled)::before {
  transform: translateX(100%);
}

.btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.12) inset,
    0 6px 18px rgba(11, 31, 58, 0.35),
    0 0 0 1px rgba(201, 162, 39, 0.5);
}

.btn-submit:active:not(:disabled) {
  transform: translateY(0);
}

.btn-submit:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-submit:disabled {
  cursor: not-allowed;
  opacity: 0.85;
}

.btn-content,
.btn-loading {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  position: relative;
  z-index: 1;
}

.btn-content[hidden],
.btn-loading[hidden] {
  display: none !important;
}

.btn-icon {
  flex-shrink: 0;
  color: var(--gold-soft);
}

.spinner {
  width: 1.1rem;
  height: 1.1rem;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: var(--gold-soft);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* —— Success —— */
.success {
  margin-top: 1.75rem;
  padding: 1.75rem 0.5rem 0.5rem;
  text-align: center;
  border-top: 1px solid var(--border);
  animation: success-in 0.55s var(--ease) both;
}

@keyframes success-in {
  from {
    opacity: 0;
    transform: scale(0.96);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success-icon {
  color: var(--green);
  margin-bottom: 1rem;
  animation: check-pop 0.6s var(--ease) 0.15s both;
}

.success-icon svg circle,
.success-icon svg path {
  stroke-dasharray: 120;
  stroke-dashoffset: 120;
  animation: draw 0.7s var(--ease) 0.25s forwards;
}

.success-icon svg path {
  stroke-dasharray: 60;
  stroke-dashoffset: 60;
  animation-delay: 0.45s;
}

@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}

@keyframes check-pop {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.success h2 {
  margin: 0;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
}

.success-message {
  margin: 0.75rem auto 0;
  max-width: 34ch;
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.65;
}

.success-whatsapp-text {
  margin: 1.1rem auto 0;
  max-width: 32ch;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--navy);
  line-height: 1.5;
}

.success-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-top: 1.15rem;
}

.btn-calendar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  width: 100%;
  max-width: 300px;
  padding: 0.9rem 1.15rem;
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--white);
  background: linear-gradient(180deg, var(--navy-mid) 0%, var(--navy) 100%);
  border: 1px solid rgba(201, 162, 39, 0.4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(11, 31, 58, 0.22);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease;
}

.btn-calendar:hover,
.btn-calendar:focus-visible {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(11, 31, 58, 0.3);
}

.btn-calendar:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.btn-calendar-icon {
  flex-shrink: 0;
  color: var(--gold-soft);
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  width: 100%;
  max-width: 300px;
  margin-top: 0.75rem;
  padding: 0.9rem 1.25rem;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  background: #25D366;
  border-radius: var(--radius-sm);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(37, 211, 102, 0.35);
  transition: transform 0.2s var(--ease), box-shadow 0.2s ease, background 0.2s ease;
}

.btn-whatsapp:hover,
.btn-whatsapp:focus-visible {
  background: #1ebe57;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(37, 211, 102, 0.42);
}

.btn-whatsapp:focus-visible {
  outline: 2px solid var(--navy);
  outline-offset: 3px;
}

.btn-whatsapp-icon {
  flex-shrink: 0;
}

.success-org {
  margin: 1.35rem 0 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.04em;
}

/* —— Footer —— */
.card-footer {
  margin-top: 2rem;
  text-align: center;
}

.divider-footer {
  margin-bottom: 1.15rem;
}

.made-by {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}

.made-by:hover,
.made-by:focus-visible {
  opacity: 0.88;
  transform: translateY(-1px);
}

.made-by:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 4px;
  border-radius: 8px;
}

.made-by-text {
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.made-by-logo {
  display: block;
  height: 24px;
  width: auto;
  max-width: 150px;
  object-fit: contain;
}

.footer-primary {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--navy);
}

.footer-secondary {
  margin: 0.15rem 0 0;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--gold);
}

.footer-signature {
  margin: 0.85rem 0 0;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-dept {
  margin: 0.25rem 0 0;
  font-size: 0.68rem;
  color: #8A97A6;
}

/* —— Responsive —— */
@media (min-width: 480px) {
  .shell {
    padding: 2.5rem 1.25rem 3rem;
    align-items: center;
  }

  .card {
    padding: 2.35rem 2.15rem 2rem;
  }

  .logo {
    width: 148px;
  }
}

@media (min-width: 768px) {
  .shell {
    padding: 3rem 1.5rem;
  }

  .card {
    max-width: 520px;
  }

  .description {
    max-width: 40ch;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
