/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Alan+Sans:wght@100;200;300;400;500;600;700&family=Sora:wght@400;600&family=Lora:ital,wght@0,400;0,500;0,600;0,700;0,800;1,400;1,500;1,600;1,700;1,800&display=swap');

/* ================================
   BREAKPOINTS — desktop first
   Usar sempre max-width, nunca min-width

   Desktop         → acima de 1024px (estilos base, sem media query)
   Tablet paisagem → max-width: 1023px
   Tablet retrato  → max-width: 767px
   Mobile          → max-width: 599px
   ================================ */

/* ============================
   RESET
   ============================ */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  min-height: 100vh;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}

input, button, textarea, select {
  font: inherit;
  color: inherit;
  background: none;
  border: none;
  outline: none;
}

button {
  cursor: pointer;
}

p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}

ul, ol {
  list-style: none;
}

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

table {
  border-collapse: collapse;
  border-spacing: 0;
}

/* ============================
   DESIGN TOKENS
   ============================ */

:root {

  /* -- Cores -- */
  --color-primary:    #00493f; /* Verde escuro — principal, vida, calma */
  --color-accent:     #ff5943; /* Vermelho-laranja — destaque, expansão */
  --color-secondary:  #66aa74; /* Verde médio — apoio */
  --color-cream:      #edefc4; /* Creme — fundo suave */
  --color-neutral:    #4c4c4c; /* Cinza escuro — texto */
  --color-white:      #ffffff; /* Fundo principal */
  --color-white-text: #f5f5f5; /* Branco - texto */

  /* -- Tipografia: famílias -- */
  --font-sora: 'Sora', system-ui, sans-serif;
  --font-alan: 'Alan Sans', system-ui, sans-serif;
  --font-lora: 'Lora', Georgia, serif;

  /* -- Tipografia: tracking -- */
  --tracking-brand: 0.180em; /* Sora SemiBold — nome da marca */
  --tracking-sub:   0.040em; /* Sora Regular — assinatura e subtítulo */

  /* -- Layout -- */
  --section-spacing: clamp(5rem, 8vw, 8rem);
  --container-max:    1200px;
  --container-gutter: clamp(1.5rem, 4vw, 5rem);
  --scrollnav-offset: 6rem;

  /* -- Tipografia: tamanhos globais -- */
  --font-size-h1: clamp(1.8rem, 4vw, 2.5rem);
  --font-size-h2: clamp(1.45rem, 3.6vw, 2.15rem);
  --font-size-h3: clamp(1.08rem, 2.15vw, 1.45rem);
  --font-size-p:  1rem;
}

/* ============================
   BASE
   ============================ */

body {
  font-family: var(--font-alan);
  background-color: var(--color-white);
  color: var(--color-neutral);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-alan);
  font-weight: 700;
  color: var(--color-neutral);
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }

p {
  font-size: var(--font-size-p);
  color: var(--color-neutral);
}

strong {
  font-weight: 700;
  font-style: normal;
  color: var(--color-primary);
}

/* ============================
   SECTION LABEL
   ============================ */

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  font-family: var(--font-sora);
  font-weight: 600;
  font-size: 0.65rem;
  letter-spacing: var(--tracking-brand);
  text-transform: uppercase;
  color: var(--color-primary);
  opacity: 0.6;
}

.section-label::before {
  content: '';
  width: 1.75rem;
  height: 1px;
  background: currentColor;
  flex-shrink: 0;
}

/* ============================
   SECTION HEADING (label + título + grafismo)
   ============================ */

.section-heading {
  display: flex;
  flex-direction: row-reverse;
  justify-content: flex-end;
  align-items: center;
  gap: 2rem;
}

.section-heading__text {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.section-heading__glyph {
  height: 100%;
  max-height: 4.5rem;
  width: auto;
  flex-shrink: 0;
  align-self: stretch;
  object-fit: contain;
}

/* Tablet retrato */
@media (max-width: 767px) {
  .section-heading {
    gap: 1.5rem;
  }

  .section-heading__glyph {
    max-height: 3.5rem;
  }
}

/* ============================
   PAGE HERO BG (imagem lateral nos headers internos)
   ============================ */

.prog-hero,
.prof-hero,
.insc-hero {
  position: relative;
  overflow: hidden;
}

.page-hero__bg {
  position: absolute;
  right: 0;
  top: 0;
  height: 100%;
  width: 50%;
  object-fit: cover;
  object-position: bottom;
  opacity: 0.40;
  pointer-events: none;
  
  mask-image: linear-gradient(to right, transparent 0%, black 40%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 40%);
}

/* ============================
   PAGE BARS (barras decorativas laterais com parallax)
   ============================ */

.page-bars {
  display: flex;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
  mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, transparent 0%, black 10%, black 90%, transparent 100%);
}

.page-bars__img {
  width: 30px;
  height: auto;
  display: block;
}

/* Tablet retrato */
@media (max-width: 767px) {
  .page-bars {
    display: none;
  }
}

/* ============================
   NAVBAR
   ============================ */

.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, box-shadow 0.4s ease;
}

.navbar__inner {
  position: relative;
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0 auto;
  padding: 1rem 2.5rem;
  transition: padding 0.4s ease;
}

.navbar__phrase {
  flex: 1;
}

.navbar__nav {
  flex: 1;
  justify-content: flex-end;
}

/* Páginas internas — navbar sempre com fundo */
.page--dark-hero .navbar {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
}

.navbar--scrolled {
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.07);
}

.navbar--scrolled .navbar__inner {
  padding: 0.6rem 2.5rem;
}

.navbar__logo {
  display: flex;
  align-items: center;
}

.navbar__logo img {
  height: 45px;
  width: auto;
  opacity: 1;
  will-change: opacity, transform, filter;
  transition: height 0.4s ease;
}

.navbar--scrolled .navbar__logo img {
  height: 52px;
}

.navbar__phrase {
  font-family: var(--font-alan);
  font-weight: 400;
  font-size: 0.7rem;
  letter-spacing: var(--tracking-sub);
  text-transform: uppercase;
  color: var(--color-primary);
  opacity: 0.7;
  white-space: nowrap;
}

.navbar__nav {
  display: flex;
  align-items: center;
}

.navbar__links {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.navbar__links a {
  font-family: var(--font-alan);
  font-weight: 400;
  font-size: 0.75rem;
  letter-spacing: var(--tracking-sub);
  text-transform: uppercase;
  color: var(--color-neutral);
  white-space: nowrap;
  position: relative;
  transition: color 0.25s ease;
}

.navbar__links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 1px;
  background: var(--color-accent);
  transition: width 0.3s ease;
}

.navbar__links a:hover {
  color: var(--color-primary);
}

.navbar__links a:hover::after {
  width: 100%;
}

.navbar__links .navbar__cta,
.navbar__drawer-links .navbar__cta {
  background: var(--color-primary);
  color: var(--color-white);
  padding: 0.45rem 1.2rem;
  border-radius: 999px;
  transition: background 0.3s ease, transform 0.25s ease;
}

.navbar__links .navbar__cta::after { display: none; }

.navbar__links .navbar__cta:hover,
.navbar__drawer-links .navbar__cta:hover {
  background: var(--color-accent);
  color: var(--color-white);
  transform: translateY(-1px);
}

/* --- Hamburger toggle ---------------------------------------- */

.navbar__toggle {
  display: none;
  width: 32px;
  height: 32px;
  cursor: pointer;
  padding: 0;
  position: relative;
}

.navbar--menu-open {
  z-index: 201 !important;
}

.navbar__toggle span {
  display: block;
  position: absolute;
  left: 4px;
  right: 4px;
  height: 1.5px;
  background: var(--color-primary);
  border-radius: 2px;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.3s ease,
              top 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar__toggle span:nth-child(1) { top: 11px; }
.navbar__toggle span:nth-child(2) { top: 19px; }

.navbar__toggle[aria-expanded="true"] span:nth-child(1) {
  top: 15px;
  transform: rotate(45deg);
  background: var(--color-primary) !important;
}

.navbar__toggle[aria-expanded="true"] span:nth-child(2) {
  top: 15px;
  transform: rotate(-45deg);
  background: var(--color-primary) !important;
}

/* --- Mobile fullscreen menu ---------------------------------- */

.mobile-menu {
  display: none;
}

@media (max-width: 767px) {
  .mobile-menu {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
    visibility: hidden;
  }

  .mobile-menu.is-open {
    pointer-events: all;
    visibility: visible;
  }
}

.mobile-menu__bg {
  position: absolute;
  inset: 0;
  background: rgba(0, 73, 63, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transform: translateY(-100%);
  transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-menu__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url('../../assets/images/img_menu.jpg') center / cover no-repeat;
  opacity: 0.60;
  pointer-events: none;
}

.mobile-menu.is-open .mobile-menu__bg {
  transform: translateY(0);
}

.mobile-menu__nav {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  height: 100%;
  padding: 6rem 2.5rem 3rem;
  gap: 2rem;
}

.mobile-menu__links {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
}

.mobile-menu__links li {
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.mobile-menu__links a {
  display: block;
  font-family: var(--font-sora);
  font-weight: 400;
  font-size: 0.82rem;
  letter-spacing: var(--tracking-sub);
  text-transform: uppercase;
  color: var(--color-white);
  padding: 1.1rem 0;
  text-align: right;
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), color 0.3s ease;
}

.mobile-menu__links a:hover {
  color: var(--color-cream);
}

.mobile-menu.is-open .mobile-menu__links li:nth-child(1) a { opacity: 1; transform: translateX(0); transition-delay: 0.15s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(2) a { opacity: 1; transform: translateX(0); transition-delay: 0.22s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(3) a { opacity: 1; transform: translateX(0); transition-delay: 0.29s; }
.mobile-menu.is-open .mobile-menu__links li:nth-child(4) a { opacity: 1; transform: translateX(0); transition-delay: 0.36s; }

.mobile-menu__cta {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sora);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: var(--tracking-brand);
  text-transform: uppercase;
  color: var(--color-white);
  background: var(--color-accent);
  padding: 0.85rem 2rem;
  border-radius: 999px;
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.4s ease 0.42s, transform 0.4s cubic-bezier(0.16, 1, 0.3, 1) 0.42s,
              background 0.3s ease;
}

.mobile-menu.is-open .mobile-menu__cta {
  opacity: 1;
  transform: translateY(0);
}

.mobile-menu__cta:hover {
  background: #e04530;
}

.mobile-menu__phrase {
  font-family: var(--font-sora);
  font-size: 0.6rem;
  font-weight: 400;
  letter-spacing: var(--tracking-brand);
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
  margin-top: auto;
  align-self: flex-end;
  text-align: right;
  opacity: 0;
  transition: opacity 0.5s ease 0.5s;
}

.mobile-menu.is-open .mobile-menu__phrase {
  opacity: 1;
}

/* ============================
   RESPONSIVIDADE
   ============================ */

/* Tablet paisagem */
@media (max-width: 1023px) {
  .navbar__phrase {
    display: none;
  }
  .navbar__links {
    gap: 1.25rem;
  }
}

/* Custom breakpoint — 860px */
@media (max-width: 860px) {
  .navbar__phrase {
    display: none;
  }
}

/* Tablet retrato */
@media (max-width: 767px) {
  .navbar__nav {
    display: none;
  }

  .navbar__toggle {
    display: flex;
    margin-left: auto;
  }
}
