:root {
  --orange: #f94d12;
  --orange-deep: #e03f08;
  --orange-soft: #ff6d3c;
  --ink: #1d1d1d;
  --beige: #f5ebe3;
  --cream: #ffffff;
  --cream-soft: #fff3eb;
  --white: #ffffff;
  --muted: rgba(29, 29, 29, 0.65);
  --danger: #c62828;
  --ok: #1b7a3d;
  --radius: 999px;
  --font: "DM Sans", system-ui, sans-serif;
  --display: "DM Sans", system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--ink);
  background-attachment: fixed;
}

body.page-links {
  background: var(--orange);
}

body.page-form {
  background: var(--beige);
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

.page {
  width: min(100% - 2rem, 28rem);
  margin: 0 auto;
  padding: 1.5rem 0 3rem;
}

.page--wide {
  width: min(100% - 2rem, 40rem);
}

/* Links page */
.profile {
  display: grid;
  justify-items: center;
  text-align: center;
  gap: 0.65rem;
  margin-bottom: 1.75rem;
  animation: rise 0.7s ease both;
}

.avatar {
  width: 8.5rem;
  height: 8.5rem;
  border-radius: 50%;
  background: var(--orange);
  overflow: hidden;
  border: 3px solid rgba(255, 255, 255, 0.95);
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.brand {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.tagline {
  margin: 0.15rem 0 0;
  color: rgba(255, 255, 255, 0.95);
  font-size: 1rem;
  font-weight: 600;
}

.campus {
  margin: 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

.links {
  display: grid;
  gap: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.link-card {
  animation: rise 0.7s ease both;
}

.link-card:nth-child(1) { animation-delay: 0.05s; }
.link-card:nth-child(2) { animation-delay: 0.1s; }
.link-card:nth-child(3) { animation-delay: 0.15s; }
.link-card:nth-child(4) { animation-delay: 0.2s; }
.link-card:nth-child(5) { animation-delay: 0.25s; }
.link-card:nth-child(6) { animation-delay: 0.3s; }
.link-card:nth-child(7) { animation-delay: 0.35s; }

.link-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  min-height: 3.35rem;
  padding: 0.85rem 1.15rem;
  border-radius: var(--radius);
  background: var(--white);
  border: none;
  color: var(--orange);
  font-weight: 700;
  text-align: center;
  transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.link-btn:hover,
.link-btn:focus-visible {
  transform: scale(1.02);
  background: var(--cream-soft);
  outline: none;
}

.link-btn:active {
  transform: scale(0.99);
}

.link-btn--primary {
  background: var(--ink);
  color: var(--white);
  min-height: 3.85rem;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  animation: pulse-cta 1.8s ease-in-out infinite;
}

.link-btn--primary:hover,
.link-btn--primary:focus-visible {
  background: #2a2a2a;
  color: var(--white);
  animation-play-state: paused;
}

.link-btn__stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.15rem;
  line-height: 1.2;
}

.link-btn__title {
  font-weight: 700;
}

.link-btn__sub {
  font-size: 0.78rem;
  font-weight: 400;
  opacity: 0.88;
}

.link-btn .icon {
  width: 1.2rem;
  height: 1.2rem;
  flex-shrink: 0;
}

.socials {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 1.35rem;
  margin-top: 1.85rem;
  animation: rise 0.7s ease 0.4s both;
}

.social {
  display: grid;
  place-items: center;
  width: auto;
  height: auto;
  background: transparent;
  border: none;
  color: var(--white);
  transition: transform 0.18s ease, opacity 0.18s ease;
}

.social:hover,
.social:focus-visible {
  background: transparent;
  color: var(--white);
  opacity: 0.85;
  transform: translateY(-2px) scale(1.08);
  outline: none;
}

.social svg {
  width: 1.65rem;
  height: 1.65rem;
}

.footer-note {
  margin-top: 1.75rem;
  text-align: center;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.45;
  animation: rise 0.7s ease 0.45s both;
}

.footer-note a {
  text-decoration: underline;
  text-underline-offset: 2px;
}

/* Form page */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--orange);
  font-weight: 700;
  font-size: 0.95rem;
}

.page-form .back {
  color: var(--orange);
}

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

.form-shell {
  background: var(--white);
  border: none;
  border-radius: 1rem;
  overflow: hidden;
  animation: rise 0.65s ease both;
}

.form-banner {
  margin: 0;
  padding: 0;
  line-height: 0;
  background: #1a8cff;
}

.form-banner img {
  width: 100%;
  height: auto;
  display: block;
}

.form-body {
  padding: 1.35rem 1.25rem 1.5rem;
}

.form-title {
  font-family: var(--display);
  font-size: clamp(1.35rem, 4vw, 1.7rem);
  font-weight: 800;
  margin: 0 0 0.25rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--ink);
}

.form-sub {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.required-note {
  color: var(--danger);
  font-size: 0.85rem;
  margin: 0 0 1.25rem;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.wizard-progress {
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  margin: 0;
}

.wizard-progress__bar {
  height: 0.35rem;
  background: #efe4db;
  overflow: hidden;
}

.wizard-progress__fill {
  display: block;
  height: 100%;
  width: 16.66%;
  background: var(--orange);
  transition: width 0.25s ease;
}

.wizard-step[hidden] {
  display: none !important;
}

.step-title {
  margin: 0 0 0.35rem;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.step-desc {
  margin: 0 0 1.15rem;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.field {
  margin-bottom: 1.1rem;
  min-width: 0;
  max-width: 100%;
}

.form-body,
.wizard-step,
#inscricao-form {
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  min-width: 0;
}

@media (max-width: 520px) {
  .field-row {
    grid-template-columns: 1fr;
  }
}

.field label,
.fieldset-legend {
  display: block;
  font-weight: 700;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.req {
  color: var(--danger);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="tel"],
.field input[type="search"],
.field textarea,
.field select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border: 1px solid #d9d9d9;
  border-radius: 0.65rem;
  padding: 0.8rem 0.9rem;
  background: var(--white);
  color: var(--ink);
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 75, 18, 0.16);
}

.field textarea {
  min-height: 5rem;
  resize: vertical;
}

.field-hint {
  margin: 0.35rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.field.error input,
.field.error textarea,
.field.error .choice-grid {
  border-color: var(--danger);
}

.field-error {
  display: none;
  margin: 0.35rem 0 0;
  color: var(--danger);
  font-size: 0.8rem;
}

.field.error .field-error {
  display: block;
}

.choice-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

.choice-row--stack {
  flex-direction: column;
}

.choice {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid #d9d9d9;
  border-radius: var(--radius);
  background: var(--white);
  cursor: pointer;
  font-weight: 600;
}

.choice--lg {
  width: 100%;
  min-height: 3.2rem;
  justify-content: center;
  font-size: 1.05rem;
  border-radius: 0.85rem;
}

.choice:has(input:checked) {
  border-color: var(--orange);
  background: var(--cream-soft);
  color: var(--orange-deep);
}

.choice input {
  accent-color: var(--orange);
}

.course-search {
  width: 100%;
  border: 1px solid #d9d9d9;
  border-radius: 0.65rem;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.75rem;
  background: var(--white);
}

.course-search:focus {
  outline: none;
  border-color: var(--orange);
  box-shadow: 0 0 0 3px rgba(255, 75, 18, 0.16);
}

.selected-courses {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.75rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: var(--radius);
  background: var(--cream-soft);
  color: var(--orange-deep);
  font-size: 0.78rem;
  font-weight: 600;
}

.review-card {
  display: grid;
  gap: 0.75rem;
  padding: 1rem;
  border: 1px solid #eadfd5;
  border-radius: 0.85rem;
  background: #fffaf6;
}

.review-item {
  display: grid;
  gap: 0.15rem;
}

.review-item strong {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--muted);
}

.review-item span {
  font-size: 0.95rem;
  line-height: 1.35;
  word-break: break-word;
}

.wizard-actions {
  justify-content: space-between;
}

.wizard-actions .btn-primary {
  margin-left: auto;
}

.fieldset {
  border: none;
  margin: 0 0 1.1rem;
  padding: 0;
}

.choice-grid {
  display: grid;
  gap: 0.45rem;
  max-height: 16rem;
  overflow: auto;
  padding: 0.75rem;
  border: 1px solid #d9d9d9;
  border-radius: 0.85rem;
  background: var(--white);
}

.choice-grid label {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  font-weight: 500;
  font-size: 0.92rem;
  padding: 0.35rem 0.25rem;
  cursor: pointer;
}

.choice-grid input {
  margin-top: 0.15rem;
  accent-color: var(--orange);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.btn {
  appearance: none;
  border: none;
  border-radius: var(--radius);
  min-height: 3rem;
  padding: 0.7rem 1.35rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease, background 0.15s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: scale(1.02);
  outline: none;
}

.btn:active {
  transform: scale(0.99);
}

.btn-primary {
  background: var(--orange);
  color: var(--white);
}

.btn-primary:hover,
.btn-primary:focus-visible {
  filter: brightness(1.05);
}

.btn-ghost {
  background: #f2f2f2;
  color: var(--ink);
}

.status {
  display: none;
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: 0.75rem;
  font-weight: 600;
}

.status.is-ok {
  display: block;
  background: #e7f7ec;
  color: var(--ok);
  border: 1px solid #b7e0c4;
}

.status.is-error {
  display: block;
  background: #fdecea;
  color: var(--danger);
  border: 1px solid #f5c2c0;
}

.thanks {
  text-align: center;
  padding: 2.5rem 1.5rem;
}

.thanks .thanks-logo {
  width: 5.5rem;
  height: 5.5rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid rgba(249, 77, 18, 0.25);
}

.thanks .thanks-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.thanks h1 {
  font-family: var(--display);
  margin: 0 0 0.5rem;
}

.thanks p {
  color: var(--muted);
  margin: 0 0 1.5rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes pulse-cta {
  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(29, 29, 29, 0.35);
  }
  50% {
    transform: scale(1.035);
    box-shadow: 0 0 0 12px rgba(29, 29, 29, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}
