/* ============================================================
   GLOBAL — Amanda Domingues Advocacia
   global.css — Reset, tipografia, layout, utilidades
   ============================================================ */

/* ── Reset ── */
*,
*::before,
*::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

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

body {
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  color: var(--color-text);
  background-color: var(--color-bg-white);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

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

button {
  cursor: pointer;
  border: none;
  background: none;
  font-family: inherit;
  font-size: inherit;
}

ul, ol {
  list-style: none;
}

/* ── Skip to Content (Acessibilidade) ── */
.skip-to-content {
  position: absolute;
  top: -100%;
  left: 50%;
  transform: translateX(-50%);
  background: var(--color-accent);
  color: var(--color-primary);
  padding: var(--space-sm) var(--space-lg);
  border-radius: var(--radius-md);
  font-weight: var(--fw-semibold);
  z-index: calc(var(--z-progress) + 1);
  transition: top var(--duration-fast) var(--ease-default);
}

.skip-to-content:focus {
  top: var(--space-md);
}

/* ── Tipografia ── */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  line-height: var(--lh-heading);
  color: var(--color-primary);
  font-weight: var(--fw-bold);
}

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

p {
  margin-bottom: var(--space-md);
}

p:last-child {
  margin-bottom: 0;
}

strong {
  font-weight: var(--fw-semibold);
}

/* ── Layout Container ── */
.container {
  width: 100%;
  max-width: var(--max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--container-padding);
  padding-right: var(--container-padding);
}

.container--narrow {
  max-width: var(--max-width-narrow);
}

/* ── Seções ── */
.section {
  padding-top: var(--space-section);
  padding-bottom: var(--space-section);
  position: relative;
  overflow: hidden;
}

.section--dark {
  background-color: var(--color-bg-dark);
  color: var(--color-text-on-dark);
}

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

.section--light {
  background-color: var(--color-bg-light);
}

.section--white {
  background-color: var(--color-bg-white);
}

/* ── Section Headers ── */
.section__header {
  text-align: center;
  margin-bottom: var(--space-lg);
}

.section__header h2 {
  margin-bottom: var(--space-md);
}

.section__subtitle {
  font-size: var(--fs-body-lg);
  color: var(--color-text-light);
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.section--dark .section__subtitle {
  color: var(--color-text-on-dark-muted);
}

/* ── Filete Dourado (detalhe lateral ou inferior) ── */
.gold-line {
  display: block;
  width: 40px;
  height: 2px;
  background-color: var(--color-accent);
  margin-top: var(--space-md);
}

.gold-line--center {
  margin-left: auto;
  margin-right: auto;
}

.gold-line--left {
  margin-left: 0;
}

/* Barra vertical dourada ao lado do heading */
.heading-bar {
  position: relative;
  padding-left: var(--space-lg);
}

.heading-bar::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background-color: var(--color-accent);
  border-radius: 2px;
}

/* ── Grid Utilities ── */
.grid {
  display: grid;
  gap: var(--space-xl);
}

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

.grid--3 {
  grid-template-columns: repeat(3, 1fr);
}

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

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

@media (max-width: 1024px) {
  .grid--4,
  .grid--2x4 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid--2,
  .grid--3 {
    grid-template-columns: 1fr;
  }

  .grid--4,
  .grid--2x4 {
    grid-template-columns: 1fr;
  }
}

/* ── Flex Utilities ── */
.flex {
  display: flex;
}

.flex--center {
  align-items: center;
  justify-content: center;
}

.flex--between {
  align-items: center;
  justify-content: space-between;
}

.flex--col {
  flex-direction: column;
}

.flex--gap-sm { gap: var(--space-sm); }
.flex--gap-md { gap: var(--space-md); }
.flex--gap-lg { gap: var(--space-lg); }
.flex--gap-xl { gap: var(--space-xl); }

/* ── Split Layout (Texto + Foto lado a lado) ── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-xl);
  align-items: center;
}

.split--40-60 {
  grid-template-columns: 40% 60%;
}

.split--60-40 {
  grid-template-columns: 60% 40%;
}

.split--65-35 {
  grid-template-columns: 65% 35%;
}

.split--45-55 {
  grid-template-columns: 45% 55%;
}

.split--35-65 {
  grid-template-columns: 35% 65%;
}

.split--reverse {
  direction: rtl;
}

.split--reverse > * {
  direction: ltr;
}

@media (max-width: 768px) {
  .split,
  .split--40-60,
  .split--60-40,
  .split--65-35,
  .split--45-55,
  .split--35-65 {
    grid-template-columns: 1fr;
    gap: var(--space-lg);
  }

  .split--reverse {
    direction: ltr;
  }
}

/* ── Text Utilities ── */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-gold { color: var(--color-accent); }
.text-white { color: #fff; }
.text-muted { color: var(--color-text-light); }

/* ── Visually Hidden (Acessibilidade) ── */
.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;
}

/* ── Focus Visible (Acessibilidade — outline dourado custom) ── */
:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: var(--radius-sm);
}

/* ── Selection ── */
::selection {
  background-color: rgba(212, 175, 55, 0.2);
  color: var(--color-primary);
}

/* ── Scroll Progress Bar ── */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--gradient-gold);
  z-index: var(--z-progress);
  transition: width 50ms linear;
}

/* ── Responsive Text ── */
@media (max-width: 768px) {
  body {
    font-size: 15px;
  }
}
