/* Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Raleway:wght@300;400;500;600;700&display=swap');

/* CSS Variables - Design System */
/* Aliança Jurídica — Premium Static Styles */

:root {
  --background: 0 0% 100%;
  --foreground: 0 0% 6%;
  --muted-foreground: 0 0% 40%;
  --border: 0 0% 92%;
  --brand: 354 100% 38%;
  --ease-premium: cubic-bezier(0.22, 1, 0.36, 1);
}

html { scroll-behavior: smooth; }
body { font-feature-settings: 'cv11', 'ss01', 'ss03'; }

h1, h2, h3, h4 {
  font-family: 'Plus Jakarta Sans', 'Inter', sans-serif;
  letter-spacing: -0.025em;
}

.text-display {
  font-family: 'Plus Jakarta Sans', sans-serif;
  letter-spacing: -0.04em;
  line-height: 1.02;
}

.container-premium {
  max-width: 80rem;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}
@media (min-width: 768px) {
  .container-premium { padding-left: 2.5rem; padding-right: 2.5rem; }
}

/* Eyebrow */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: hsl(var(--muted-foreground));
  font-weight: 500;
}
.eyebrow::before {
  content: '';
  width: 1.5rem;
  height: 1px;
  background: hsl(var(--brand));
}

/* Reveal */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.9s var(--ease-premium), transform 0.9s var(--ease-premium);
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Underline link */
.link-underline { position: relative; display: inline-block; }
.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  height: 1px;
  width: 100%;
  background: hsl(var(--brand));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.5s var(--ease-premium);
}
.link-underline:hover::after { transform: scaleX(1); transform-origin: left; }

/* Buttons */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: hsl(var(--foreground));
  color: hsl(var(--background));
  padding: 0.85rem 1.5rem;
  border-radius: 0.6rem;
  font-weight: 500;
  font-size: 0.95rem;
  transition: transform 0.3s var(--ease-premium), box-shadow 0.3s var(--ease-premium), background 0.3s;
}
.btn-primary:hover {
  background: hsl(var(--brand));
  transform: translateY(-1px);
  box-shadow: 0 8px 30px -8px hsl(var(--brand) / 0.4);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid hsl(var(--border));
  background: transparent;
  color: hsl(var(--foreground));
  padding: 0.85rem 1.5rem;
  border-radius: 0.6rem;
  font-weight: 500;
  font-size: 0.95rem;
  transition: all 0.3s var(--ease-premium);
}
.btn-ghost:hover { border-color: hsl(var(--foreground)); }

.btn-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: hsl(var(--brand));
  color: #fff;
  padding: 0.95rem 1.75rem;
  border-radius: 0.6rem;
  font-weight: 500;
  transition: all 0.3s var(--ease-premium);
  box-shadow: 0 8px 30px -8px hsl(var(--brand) / 0.5);
}
.btn-brand:hover { transform: translateY(-1px); box-shadow: 0 12px 40px -8px hsl(var(--brand) / 0.7); }

.btn-ghost-dark {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  border: 1px solid rgba(255,255,255,0.2);
  color: #fff;
  padding: 0.95rem 1.75rem;
  border-radius: 0.6rem;
  font-weight: 500;
  transition: all 0.3s var(--ease-premium);
}
.btn-ghost-dark:hover { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.4); }

/* Grid backdrop for hero */
.bg-grid {
  background-image:
    linear-gradient(hsl(var(--border) / 0.6) 1px, transparent 1px),
    linear-gradient(90deg, hsl(var(--border) / 0.6) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at top, black 30%, transparent 70%);
}

/* Navbar scroll state */
#site-nav.scrolled {
  background: hsl(var(--background) / 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid hsl(var(--border));
}

/* ============== MODULE MODAL ============== */
.module-modal {
  position: fixed; inset: 0; z-index: 100;
  display: flex; align-items: center; justify-content: center;
  padding: 1rem;
  opacity: 0; visibility: hidden;
  transition: opacity .35s ease, visibility .35s ease;
}
.module-modal.is-open { opacity: 1; visibility: visible; }
.module-modal__overlay {
  position: absolute; inset: 0;
  background: hsl(0 0% 4% / 0.55);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.module-modal__dialog {
  position: relative;
  width: 100%; max-width: 1080px;
  max-height: 90vh;
  background: hsl(0 0% 100%);
  border-radius: 1.25rem;
  overflow: hidden;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  box-shadow: 0 30px 80px -20px hsl(0 0% 0% / 0.45);
  transform: translateY(20px) scale(.98);
  opacity: 0;
  transition: transform .45s cubic-bezier(.2,.8,.2,1), opacity .35s ease;
}
.module-modal.is-open .module-modal__dialog {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.module-modal__media {
  background: hsl(0 0% 97%);
  overflow: auto;
  max-height: 90vh;
}
.module-modal__media img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: contain;
}
.module-modal__content {
  padding: 2.5rem 2.75rem;
  overflow-y: auto;
  max-height: 90vh;
}
.module-modal__close {
  position: absolute; top: 1rem; right: 1rem; z-index: 2;
  width: 38px; height: 38px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: hsl(0 0% 100%);
  border: 1px solid hsl(0 0% 92%);
  color: hsl(0 0% 6%);
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.module-modal__close:hover { background: hsl(0 0% 96%); transform: rotate(90deg); }
body.modal-open { overflow: hidden; }

@media (max-width: 860px) {
  .module-modal__dialog { grid-template-columns: 1fr; max-height: 92vh; }
  .module-modal__media { max-height: 40vh; }
  .module-modal__content { padding: 1.75rem; max-height: none; }
}


/* ================= NAVBAR ================= */

#site-nav.scrolled {
    background: hsl(var(--background) / .88);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid hsl(var(--border));
}

#site-nav.scrolled #headerLogo {
    height: 32px;
}

/* ================= BUTTON OUTLINE ================= */

.btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    padding: 0 1rem;
    border-radius: .6rem;
    border: 1px solid hsl(var(--foreground));
    color: hsl(var(--foreground));
    font-size: .88rem;
    font-weight: 500;
    transition: .3s;
}

.btn-outline:hover {
    background: hsl(var(--foreground));
    color: white;
}

/* Navbar buttons menores */
.btn-primary {
    height: 40px;
    padding: 0 1rem;
    font-size: .88rem;
}

/* ================= HAMBURGER ================= */
.hamburger {
    width: 42px;
    height: 42px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
}

.hamburger span {
    width: 24px;
    height: 2px;
    background: hsl(var(--foreground));
    transition: .3s;
}

/* ================= OVERLAY ================= */
.menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    opacity: 0;
    visibility: hidden;
    transition: .35s;
    z-index: 60;
}

.menu-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ================= MENU ================= */
.mobile-menu {
    position: fixed;
    top: 0;
    left: -100%;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    background: white;
    z-index: 70;
    transition: .35s;
    display: flex;
    flex-direction: column;
    padding: 1.8rem;
    box-shadow: 10px 0 40px rgba(0,0,0,.15);
}

.mobile-menu.open {
    left: 0;
}

.mobile-menu-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
}

.close-menu {
    border: none;
    background: none;
    font-size: 1.5rem;
    cursor: pointer;
}

.mobile-menu nav {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.mobile-menu nav a {
    font-size: 1rem;
    font-weight: 500;
    color: hsl(var(--foreground));
}

.mobile-actions {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-actions .btn-primary,
.mobile-actions .btn-outline {
    width: 100%;
    justify-content: center;
}

body.menu-open {
    overflow: hidden;
}