/* GLMMMB — Institutional styles */

:root {
  --black: #0b0d10;
  --ink: #1a1d24;
  --white: #ffffff;
  --off-white: #f4f5f7;
  --gray-100: #eceef2;
  --gray-300: #c5cad3;
  --gray-500: #6b7280;
  --gray-700: #3a4050;
  --royal: #0c2f6e;
  --royal-deep: #071f4a;
  --royal-mid: #143f8c;
  --cyan: #5ec8d8;
  --cyan-soft: #a8e0ea;
  --burgundy: #7a1c2e;
  --burgundy-deep: #5a1220;
  --gold: #c9a227;
  --gold-light: #e0c05a;
  --gold-dark: #9a7a1a;

  --font: "Merriweather", Georgia, "Times New Roman", serif;
  --max: 1240px;
  --narrow: 780px;
  --header-h: 5.75rem;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.8;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--royal-mid);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.25s var(--ease);
}

a:hover {
  color: var(--burgundy);
}

h1, h2, h3 {
  font-weight: 700;
  line-height: 1.25;
  color: var(--black);
  margin: 0 0 0.75rem;
}

h1 {
  font-size: clamp(2.15rem, 4.5vw, 3.35rem);
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.85rem, 3.2vw, 2.55rem);
}

h3 {
  font-size: 1.3rem;
}

p {
  margin: 0 0 1.25rem;
}

ul, ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--gold);
  color: var(--black);
  padding: 0.75rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
}

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.container.narrow {
  width: min(100% - 2.5rem, var(--narrow));
}

.section {
  padding: clamp(3.5rem, 8vw, 6rem) 0;
}

.section-alt {
  background:
    linear-gradient(180deg, var(--off-white) 0%, #e8eaef 100%);
  position: relative;
}

.section-alt::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(12, 47, 110, 0.06) 1px, transparent 0);
  background-size: 28px 28px;
  pointer-events: none;
  opacity: 0.7;
}

.section-dark {
  background:
    radial-gradient(ellipse at 20% 0%, rgba(94, 200, 216, 0.14), transparent 50%),
    radial-gradient(ellipse at 80% 100%, rgba(201, 162, 39, 0.12), transparent 45%),
    linear-gradient(160deg, var(--royal-deep) 0%, var(--royal) 55%, #0a2858 140%);
  color: rgba(255, 255, 255, 0.94);
}

.section-dark h2,
.section-dark h3 {
  color: var(--white);
}

.section-dark .center-text {
  opacity: 1;
  color: rgba(255, 255, 255, 0.9);
}

.section-dark .eyebrow.light {
  color: var(--cyan-soft);
}

.section-head {
  margin-bottom: 1.75rem;
}

.section-head.center {
  text-align: center;
}

.eyebrow {
  display: inline-block;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--burgundy);
  margin: 0 0 0.75rem;
}

.eyebrow.light {
  color: var(--gold-light);
}

.lead {
  font-size: 1.28rem;
  color: var(--gray-700);
}

.justified {
  text-align: justify;
  hyphens: auto;
}

.center-text {
  text-align: center;
  max-width: 40rem;
  margin-inline: auto;
  margin-bottom: 2.5rem;
  opacity: 0.92;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--gray-100);
  box-shadow: 0 1px 0 rgba(201, 162, 39, 0.25);
}

.header-inner {
  width: min(100% - 2rem, var(--max));
  margin-inline: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: var(--header-h);
  position: relative;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.95rem;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.brand:hover {
  color: inherit;
}

.brand-logo {
  width: 3.85rem;
  height: 3.85rem;
  object-fit: cover;
  border-radius: 50%;
  border: 2px solid var(--gold);
  box-shadow: 0 0 0 3px rgba(12, 47, 110, 0.08);
  flex-shrink: 0;
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-weight: 900;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
  color: var(--royal);
}

.brand-sub {
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--gray-500);
  max-width: 16rem;
}

.site-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.2rem 1.2rem;
  justify-content: flex-end;
}

.site-nav a {
  text-decoration: none;
  color: var(--gray-700);
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.4rem 0;
  position: relative;
  white-space: nowrap;
}

.site-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 2px;
  background: var(--burgundy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s var(--ease);
}

.site-nav a:hover,
.site-nav a.is-active {
  color: var(--royal);
}

.site-nav a.is-active::after,
.site-nav a:hover::after {
  transform: scaleX(1);
}

.site-nav .btn-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 0.35rem;
  padding: 0.55rem 0.95rem;
  background: var(--burgundy);
  color: var(--white);
  border: 1px solid var(--burgundy);
  letter-spacing: 0.08em;
  text-decoration: none;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s;
}

.site-nav .btn-nav::after {
  display: none;
}

.site-nav .btn-nav:hover,
.site-nav .btn-nav.is-active {
  background: var(--burgundy-deep);
  color: var(--white);
  border-color: var(--burgundy-deep);
}

.nav-toggle {
  display: none;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--gray-300);
  background: var(--white);
  border-radius: 2px;
  cursor: pointer;
  padding: 0;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 5px;
}

.nav-toggle span {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: var(--royal);
  transition: transform 0.25s var(--ease), opacity 0.2s;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Hero */

.hero {
  position: relative;
  overflow: hidden;
  color: var(--white);
  min-height: auto;
  display: flex;
  align-items: stretch;
}

.hero-bg {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(115deg, rgba(7, 31, 74, 0.92) 0%, rgba(12, 47, 110, 0.88) 42%, rgba(90, 18, 32, 0.75) 100%),
    radial-gradient(ellipse at 70% 30%, rgba(94, 200, 216, 0.22), transparent 55%),
    linear-gradient(180deg, var(--royal-deep), var(--royal));
  z-index: 0;
}

.hero-bg::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(
      -18deg,
      transparent,
      transparent 12px,
      rgba(255, 255, 255, 0.015) 12px,
      rgba(255, 255, 255, 0.015) 13px
    );
  opacity: 0.8;
}

.hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 3.25rem auto 3.5rem;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.hero-kicker {
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--cyan-soft);
  margin-bottom: 1rem;
}

.hero h1 {
  color: var(--white);
  margin-bottom: 1.1rem;
  max-width: 16ch;
  animation: rise 0.9s var(--ease) both;
}

.hero-lead {
  font-size: 1.2rem;
  font-weight: 300;
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.9);
  max-width: 38rem;
  margin-bottom: 1.75rem;
  animation: rise 0.9s 0.12s var(--ease) both;
}

.hero-lead em {
  color: var(--gold-light);
  font-style: italic;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  animation: rise 0.9s 0.22s var(--ease) both;
}

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

.hero-crest {
  justify-self: end;
  animation: crest-in 1.1s 0.15s var(--ease) both;
}

.hero-crest img {
  width: min(100%, 380px);
  border-radius: 50%;
  border: 3px solid var(--gold);
  box-shadow:
    0 0 0 10px rgba(255, 255, 255, 0.06),
    0 24px 60px rgba(0, 0, 0, 0.35);
  background: var(--white);
}

.hero-rule {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: var(--gold);
  z-index: 2;
}

/* Buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.6rem;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s, transform 0.2s;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-gold {
  background: var(--gold);
  color: var(--black);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: var(--gold-light);
  color: var(--black);
}

.btn-outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.55);
}

.btn-outline:hover {
  border-color: var(--cyan);
  color: var(--cyan-soft);
}

.btn-outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.45);
}

.btn-outline-light:hover {
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* Motto */

.motto {
  margin: 2.5rem 0 0;
  padding: 1.5rem 1.75rem;
  border-left: 3px solid var(--gold);
  background: linear-gradient(90deg, rgba(12, 47, 110, 0.06), transparent);
}

.motto p {
  font-size: 1.35rem;
  font-style: italic;
  color: var(--royal);
  margin-bottom: 0.5rem;
}

.motto cite {
  font-size: 0.95rem;
  font-style: normal;
  letter-spacing: 0.06em;
  color: var(--burgundy);
  text-transform: uppercase;
}

/* Rulers */

.rulers-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
}

.ruler {
  text-align: center;
}

.ruler-photo {
  margin-bottom: 1rem;
  overflow: hidden;
  position: relative;
  aspect-ratio: 3 / 4;
  background: var(--royal-deep);
  border-bottom: 3px solid var(--gold);
}

.ruler-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  display: block;
}

.ruler h3 {
  color: var(--royal-mid);
  font-size: 1.15rem;
  margin-bottom: 0.35rem;
}

.ruler p {
  font-size: 1.05rem;
  color: var(--gray-700);
  margin: 0;
}

/* Degree */

.degree-layout {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

.degree-points {
  margin-top: 1.5rem;
  display: grid;
  gap: 0.75rem;
}

.degree-points li {
  position: relative;
  padding-left: 1.35rem;
  color: var(--gray-700);
  font-size: 1.1rem;
}

.degree-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65em;
  width: 0.55rem;
  height: 0.55rem;
  background: var(--cyan);
  border: 2px solid var(--royal);
  transform: rotate(45deg);
}

.symbol-panel {
  background: var(--gray-100);
  padding: 2rem 1.5rem 1.5rem;
  text-align: center;
  border-top: 3px solid var(--gold);
  border-bottom: 3px solid var(--gold);
}

.symbol-panel img {
  width: min(100%, 280px);
  margin: 0 auto 1.25rem;
  border-radius: 0;
  border: none;
}

.symbol-caption {
  font-size: 1rem;
  color: var(--gray-700);
  margin: 0;
  font-style: italic;
}

/* Mark stripes — apenas na seção Progressão */

.mark-stripe {
  display: block;
  height: 8px;
  width: 100%;
  background: linear-gradient(
    to bottom,
    var(--burgundy) 0 50%,
    var(--cyan) 50% 100%
  );
}

.mark-stripe--short {
  width: 5.5rem;
  margin: 0.85rem auto 0;
}

/* Progression steps */

.steps {
  display: grid;
  gap: 1rem;
}

.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.25rem;
  align-items: center;
  padding: 1.15rem 1.35rem 1.15rem 1.55rem;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.22);
  position: relative;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.steps li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 8px;
  background: linear-gradient(
    to bottom,
    var(--burgundy) 0 50%,
    var(--cyan) 50% 100%
  );
}

.steps li:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: translateX(4px);
}

.step-num {
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--gold-light);
  letter-spacing: 0.05em;
}

.steps h3 {
  margin-bottom: 0.2rem;
  font-size: 1.2rem;
  color: var(--white);
}

.steps p {
  margin: 0;
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
}

/* Voices */

.voices-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.voice {
  margin: 0;
  padding: 0 0 0 1.25rem;
  border-left: 2px solid var(--burgundy);
}

.voice blockquote {
  margin: 0 0 1.25rem;
}

.voice blockquote p {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--gray-700);
  margin: 0;
}

.voice figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.voice figcaption strong {
  color: var(--royal);
  font-size: 1.05rem;
}

.voice figcaption span {
  font-size: 0.92rem;
  color: var(--gray-500);
}

/* News */

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.news-item {
  padding: 1.5rem 0 0;
  border-top: 2px solid var(--royal);
  position: relative;
  transition: border-color 0.25s;
}

.news-item:hover {
  border-color: var(--gold);
}

.news-item time {
  display: block;
  font-size: 0.9rem;
  letter-spacing: 0.06em;
  color: var(--burgundy);
  margin-bottom: 0.65rem;
  text-transform: uppercase;
}

.news-item h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.news-item h3 a {
  text-decoration: none;
  color: var(--black);
}

.news-item h3 a:hover {
  color: var(--royal-mid);
}

.news-item p {
  font-size: 1.05rem;
  color: var(--gray-700);
  margin-bottom: 1rem;
}

.news-tag {
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--royal);
  padding: 0.3rem 0.6rem;
}

/* CTA */

.cta {
  background:
    linear-gradient(135deg, var(--royal-deep) 0%, var(--royal) 40%, #0a4a6e 100%);
  color: var(--white);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta::before {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  border: 1px solid rgba(201, 162, 39, 0.25);
  right: -120px;
  top: -160px;
  pointer-events: none;
}

.cta::after {
  content: "";
  position: absolute;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  border: 1px solid rgba(94, 200, 216, 0.2);
  left: -80px;
  bottom: -100px;
  pointer-events: none;
}

.cta h2 {
  color: var(--white);
}

.cta-text {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 1.75rem;
}

/* Footer */

.site-footer {
  background: var(--black);
  color: rgba(255, 255, 255, 0.78);
  padding-top: 3.5rem;
  font-size: 1.05rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  padding-bottom: 2.5rem;
}

.footer-brand {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}

.footer-brand img {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  border: 2px solid var(--gold);
  flex-shrink: 0;
}

.footer-brand strong {
  display: block;
  color: var(--white);
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.footer-brand p {
  margin: 0 0 0.35rem;
  font-size: 0.98rem;
}

.footer-motto {
  color: var(--gold) !important;
  font-style: italic;
  font-size: 0.92rem !important;
}

.site-footer h3 {
  color: var(--gold-light);
  font-size: 0.9rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.site-footer ul {
  display: grid;
  gap: 0.5rem;
}

.site-footer a {
  color: rgba(255, 255, 255, 0.78);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--cyan-soft);
}

.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding: 1.15rem 0;
  font-size: 0.92rem;
  color: rgba(255, 255, 255, 0.5);
}

.footer-bottom p {
  margin: 0;
}

/* To top */

.to-top {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  width: 2.6rem;
  height: 2.6rem;
  border-radius: 50%;
  border: none;
  background: var(--royal);
  color: var(--white);
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.25s, visibility 0.25s, transform 0.25s, background 0.2s;
  z-index: 90;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

.to-top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.to-top:hover {
  background: var(--burgundy);
}

/* Reveal on scroll */

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* Animations */

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

@keyframes crest-in {
  from {
    opacity: 0;
    transform: scale(0.92) translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Responsive */

@media (max-width: 960px) {
  .rulers-grid,
  .voices-grid,
  .news-grid {
    grid-template-columns: 1fr 1fr;
  }

  .hero-inner,
  .degree-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .hero-crest {
    justify-self: center;
    order: -1;
  }

  .hero-crest img {
    width: min(100%, 260px);
  }

  .hero h1 {
    max-width: none;
  }

  .hero {
    min-height: auto;
    padding: 1rem 0 2rem;
  }

}

@media (max-width: 720px) {
  .nav-toggle {
    display: inline-flex;
  }

  .brand-sub {
    display: none;
  }

  .site-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    background: var(--white);
    border-bottom: 1px solid var(--gray-100);
    padding: 0.75rem 1.25rem 1.25rem;
    display: none;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    z-index: 20;
  }

  .site-nav.is-open {
    display: block;
  }

  .site-nav ul {
    flex-direction: column;
    gap: 0;
  }

  .site-nav a {
    display: block;
    padding: 0.85rem 0;
    border-bottom: 1px solid var(--gray-100);
    font-size: 0.95rem;
  }

  .site-nav .btn-nav {
    margin: 0.85rem 0 0;
    width: 100%;
    text-align: center;
    border-bottom: none;
  }

  .rulers-grid,
  .voices-grid,
  .news-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .header-inner {
    position: relative;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

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