:root {
  --accent: #005dc7;
  --accent-hover: #004fa9;
  --title: #17191c;
  --body: #6f7680;
  --muted: #9298a1;
  --border: #e4e7eb;
  --border-strong: #cfd4da;
  --surface: #f7f8fa;
  --white: #ffffff;
  --icon-box-bg: #f3f7fc;
  --logo-navy: #144897;
  --logo-blue: #23539d;
  --logo-blue-light: #8fdafa;
  --success-text: #0c7f36;
  --success-dot: #22c55e;
  --radius: 8px;
  --radius-sm: 6px;
  --radius-lg: 16px;
  --max: 1120px;
  --ease-out: cubic-bezier(.22, .8, .3, 1);
  --ease-spring: cubic-bezier(.22, 1.2, .36, 1);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  color: var(--body);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

button, input, textarea, select { font: inherit; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

a[href], button, summary, label[for], select, [role="button"] { cursor: pointer; }

.container {
  width: min(calc(100% - 32px), var(--max));
  margin-inline: auto;
}

/* Header and navigation */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .96);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(8px);
}

.nav {
  position: relative;
  min-height: 72px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand img {
  display: block;
  width: auto;
  height: 32px;
}

.nav-links {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 28px;
}

.nav-link {
  color: var(--body);
  background: none;
  border: 0;
  padding: 8px 0;
  transition: color .18s ease;
}

.nav-link:hover,
.nav-link[aria-current="page"] { color: var(--title); }

.dropdown { position: relative; }

.dropdown-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.dropdown-trigger i {
  font-size: 14px;
  transition: transform .28s var(--ease-out);
}

.dropdown:hover .dropdown-trigger,
.dropdown:focus-within .dropdown-trigger,
.dropdown.is-open .dropdown-trigger { color: var(--title); }

.dropdown:hover .dropdown-trigger i,
.dropdown:focus-within .dropdown-trigger i,
.dropdown.is-open .dropdown-trigger i { transform: rotate(180deg); }

.dropdown-menu {
  position: absolute;
  top: 100%;
  left: -12px;
  z-index: 20;
  min-width: 260px;
  margin-top: 8px;
  padding: 6px;
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px) scale(.96);
  transform-origin: top left;
  transition: opacity .22s ease, transform .32s var(--ease-spring), visibility .32s;
}

/* Bridges the gap between trigger and menu so hover is not lost. */
.dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -10px;
  height: 10px;
}

.dropdown:hover .dropdown-menu,
.dropdown:focus-within .dropdown-menu,
.dropdown.is-open .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: none;
}

.dropdown-item {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--body);
  white-space: nowrap;
  opacity: 0;
  transform: translateY(-4px);
  transition: opacity .2s ease, transform .28s var(--ease-out), background-color .18s ease, color .18s ease;
}

.dropdown:hover .dropdown-item,
.dropdown:focus-within .dropdown-item,
.dropdown.is-open .dropdown-item {
  opacity: 1;
  transform: none;
}

.dropdown-item:nth-child(2) { transition-delay: .03s; }
.dropdown-item:nth-child(3) { transition-delay: .06s; }
.dropdown-item:nth-child(4) { transition-delay: .09s; }
.dropdown-item:nth-child(5) { transition-delay: .12s; }
.dropdown-item:nth-child(6) { transition-delay: .15s; }

.dropdown-item:hover,
.dropdown-item:focus-visible {
  background: var(--surface);
  color: var(--title);
  outline: none;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  color: var(--title);
  font-size: 22px;
  transition: border-color .18s ease;
}

.nav-toggle:hover { border-color: var(--border-strong); }

/* Buttons */

.button {
  min-height: 46px;
  padding: 0 18px;
  border-radius: var(--radius);
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 600;
  transition: transform .28s var(--ease-out), background-color .2s ease, border-color .2s ease, color .2s ease;
}

.button i { transition: transform .28s var(--ease-out); }
.button:hover { transform: translateY(-2px); }
.button:hover i.ph-arrow-right,
.button:hover i.ph-arrow-up-right { transform: translateX(3px); }
.button:active { transform: translateY(0); }

.button-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--white);
}

.button-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.button-secondary {
  background: var(--white);
  border-color: var(--border);
  color: var(--title);
}

.button-secondary:hover { border-color: var(--border-strong); }

.button-light {
  background: var(--white);
  color: var(--logo-navy);
}

.button-ghost {
  color: var(--white);
  border-color: rgba(255, 255, 255, .45);
}

.button-ghost:hover { border-color: var(--white); }

/* Primary button whose arrow opens out on hover. */
.button-reveal { gap: 0; }

.button-reveal .button-arrow {
  display: inline-flex;
  max-width: 0;
  margin-left: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateX(-6px);
  transition: max-width .32s var(--ease-out), margin-left .32s var(--ease-out), opacity .22s ease, transform .32s var(--ease-out);
}

.button-reveal:hover .button-arrow,
.card:hover .button-reveal .button-arrow {
  max-width: 24px;
  margin-left: 8px;
  opacity: 1;
  transform: none;
}

/* Type */

h1, h2, h3, p { margin-top: 0; }

h1, h2, h3 {
  font-size: 18px;
  line-height: 1.5;
  color: var(--title);
  font-weight: 600;
  margin-bottom: 0;
}

h1 {
  max-width: 560px;
  margin-bottom: 14px;
  font-size: 32px;
  line-height: 1.2;
  letter-spacing: -.02em;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 16px;
}

/* Sections */

section { padding: 48px 0; }

.section-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 40px;
}

.section-head .eyebrow { margin-bottom: 6px; }
.section-head p { margin-bottom: 0; max-width: 640px; }

.section-head-row {
  flex-direction: row;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}

.section-roomy { padding: 100px 0; }

/* Home hero */

.hero {
  padding: 88px 0 96px;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.hero .container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.hero h1 {
  margin: 0 0 18px;
  font-size: 40px;
}

.hero-copy { max-width: 590px; margin-bottom: 28px; }

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hero .hero-actions { justify-content: center; }

.meta-row {
  margin-top: 32px;
  padding-top: 18px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px 22px;
  color: var(--muted);
}

.meta-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.enrollment-status {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--success-text);
  font-weight: 600;
  padding-bottom: 20px;
}

.status-dot {
  position: relative;
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: var(--success-dot);
}

.status-dot::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: var(--success-dot);
  animation: status-pulse 2s ease-out infinite;
}

@keyframes status-pulse {
  0% { transform: scale(1); opacity: .6; }
  70%, 100% { transform: scale(2.6); opacity: 0; }
}

/* Cards */

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: transform .32s var(--ease-out), background-color .18s ease, border-color .18s ease;
}

a.card:hover {
  background: var(--surface);
  border-color: var(--border-strong);
  transform: translateY(-4px);
}

.card h3 { margin: 0; }
.card p { margin: 0; }

.icon-box {
  width: 44px;
  height: 44px;
  flex: 0 0 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  background: var(--icon-box-bg);
  color: var(--accent);
  font-size: 22px;
}

.program-card {
  gap: 8px;
  padding: 32px;
}

.program-card h3 {
  margin-top: 64px;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -.01em;
}

.program-card p { margin-bottom: 16px; }

/* Cards in a row share the same height; the button sits at the bottom. */
.program-card .button { margin-top: auto; align-self: flex-start; }

.pill {
  align-self: flex-start;
  padding: 2px 10px;
  border-radius: 999px;
  background: var(--icon-box-bg);
  color: var(--logo-navy);
  font-size: 14px;
  font-weight: 600;
}

/* Illustrations with parallax */

.illustration {
  position: relative;
  overflow: hidden;
  pointer-events: none;
}

.parallax-layer {
  position: absolute;
  left: 0;
  right: 0;
  will-change: transform;
}

.ensino-section {
  position: relative;
  overflow: hidden;
  padding: 72px 0 380px;
}

.ensino-section > .container { position: relative; z-index: 1; }
.ensino-section .section-head { margin: 32px 0 100px; }

.ensino-illustration {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 75%;
  z-index: 0;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
  mask-image: linear-gradient(to bottom, transparent 0%, #000 55%);
}

.ensino-illustration .parallax-layer {
  top: 48px;
  width: 1222px;
  max-width: 100%;
  height: 751px;
  margin-inline: auto;
  background: url("../assets/ilustracao-sala.webp") center bottom / cover no-repeat;
}

.facade-illustration { aspect-ratio: 1704 / 923; }

.facade-illustration .parallax-layer {
  top: -32.7%;
  height: 140.5%;
  background: url("../assets/ilustracao-fachada.webp") center bottom / 100% auto no-repeat;
}

/* Photo marquee */

.marquee {
  width: 100%;
  overflow-x: auto;
  padding: 0 16px;
  cursor: grab;
  scrollbar-width: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0, #000 12%, #000 88%, transparent 100%);
}

.marquee:active { cursor: grabbing; }
.marquee::-webkit-scrollbar { display: none; }

.marquee-track {
  display: flex;
  gap: 8px;
  width: max-content;
}

.marquee-item {
  flex: 0 0 min(800px, 82vw);
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.marquee-item img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  -webkit-user-drag: none;
  user-select: none;
}

.marquee-item figcaption {
  color: var(--title);
  font-weight: 600;
}

/* Enrollment band */

.enroll-band {
  position: relative;
  overflow: hidden;
  min-height: 320px;
  padding: 96px 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-radius: var(--radius-lg);
  background: var(--logo-navy);
}

.enroll-band-mark {
  position: absolute;
  right: -40px;
  top: 50%;
  height: 140%;
  width: auto;
  max-width: none;
  opacity: .12;
  transform: translateY(-50%);
  pointer-events: none;
}

.enroll-band-copy {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 560px;
}

.enroll-band-copy strong {
  color: var(--white);
  font-weight: 600;
  letter-spacing: .02em;
}

.enroll-band-copy p { margin: 0; color: #e8f0fb; }

.enroll-band .hero-actions { position: relative; }

/* Contact */

.contact-section {
  position: relative;
  overflow: hidden;
  padding-bottom: 0;
}

.contact-section > .container {
  position: relative;
  z-index: 1;
  padding-bottom: 64px;
}

.contact-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-row {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
}

.contact-row > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.contact-row strong { color: var(--title); font-weight: 600; }
.contact-row a { color: var(--accent); overflow-wrap: anywhere; transition: color .18s ease; }
.contact-row a:hover { color: var(--accent-hover); }

/* Footer */

footer {
  position: relative;
  z-index: 1;
  padding: 28px 0;
  background: var(--white);
  border-top: 1px solid var(--border);
}

.footer-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
}

.footer-row img { display: block; height: 24px; width: auto; }
.footer-links { display: flex; gap: 20px; }
.footer-links a { color: var(--body); transition: color .18s ease; }
.footer-links a:hover { color: var(--title); }

/* Scroll reveal */

.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease, transform .45s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* Reduced motion: stop large and continuous motion, keep short hover feedback. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .status-dot::after { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* Desktop: menu centered in the header, logo left, Matrículas right. */
@media (min-width: 961px) {
  .nav {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
  }

  .nav-links { margin: 0; }
  .nav-cta { justify-self: end; }
}

/* Responsive */

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; }
  .nav-cta { margin-left: auto; }

  .nav-links {
    position: absolute;
    top: 100%;
    left: -16px;
    right: -16px;
    margin: 0;
    padding: 8px 16px 16px;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--white);
    border-bottom: 1px solid var(--border);
    max-height: calc(100vh - 72px);
    overflow-y: auto;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity .22s ease, transform .32s var(--ease-out), visibility .32s;
  }

  .nav-links.is-open {
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .nav-links > .nav-link,
  .dropdown-trigger {
    width: 100%;
    min-height: 48px;
    padding: 12px 0;
    text-align: left;
    border-bottom: 1px solid var(--border);
  }

  .dropdown-trigger { justify-content: space-between; }

  .dropdown:hover .dropdown-trigger i,
  .dropdown:focus-within .dropdown-trigger i { transform: none; }
  .dropdown.is-open .dropdown-trigger i { transform: rotate(180deg); }

  .dropdown-menu,
  .dropdown:hover .dropdown-menu,
  .dropdown:focus-within .dropdown-menu {
    position: static;
    display: none;
    min-width: 0;
    margin: 4px 0 8px;
    border: 0;
    padding: 0;
    opacity: 1;
    visibility: visible;
    transform: none;
  }

  .dropdown.is-open .dropdown-menu { display: flex; }

  .dropdown-item {
    opacity: 1;
    transform: none;
    white-space: normal;
    padding: 10px 12px;
  }

  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
  .hero { padding: 64px 0 72px; }
  .hero h1 { font-size: 32px; }
  h1 { font-size: 28px; }
  .section-roomy { padding: 64px 0; }
  .ensino-section { padding-bottom: 220px; }
  .ensino-section .section-head { margin: 16px 0 48px; }
  .program-card { padding: 24px; }
  .program-card h3 { margin-top: 40px; font-size: 24px; }
  .enroll-band { padding: 56px 24px; min-height: 0; }
  .footer-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 480px) {
  .container { width: calc(100% - 24px); }
  .nav { gap: 12px; }
  .nav-links { left: -12px; right: -12px; padding-inline: 12px; }
  .nav-cta { padding: 0 14px; }
  .brand img { height: 28px; }
  .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: 28px; }
}
