:root {
  --ink: #102126;
  --muted: #5d6d72;
  --paper: #f6f8f7;
  --white: #ffffff;
  --teal: #075b5f;
  --teal-dark: #063d43;
  --amber: #c9923a;
  --line: #d8e1df;
  --shadow: 0 18px 48px rgba(13, 37, 42, 0.14);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Arial, Helvetica, sans-serif;
  line-height: 1.6;
}

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

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px clamp(18px, 4vw, 56px);
  color: var(--white);
  transition: background 180ms ease, box-shadow 180ms ease, color 180ms ease;
}

.site-header.is-scrolled,
.site-header.is-open {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 10px 30px rgba(16, 33, 38, 0.1);
  backdrop-filter: blur(12px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 4px;
  font-size: 0.78rem;
  letter-spacing: 0;
}

.nav {
  display: flex;
  gap: clamp(18px, 3vw, 34px);
  font-size: 0.94rem;
  font-weight: 700;
}

.nav a {
  opacity: 0.9;
}

.nav a:hover {
  opacity: 1;
  color: var(--amber);
}

.menu-button {
  display: none;
  width: 42px;
  height: 42px;
  padding: 10px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: inherit;
  background: transparent;
}

.menu-button span {
  display: block;
  height: 2px;
  margin: 5px 0;
  background: currentColor;
}

.hero {
  position: relative;
  min-height: 92vh;
  display: grid;
  align-items: center;
  overflow: hidden;
  color: var(--white);
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  background-image: url("assets/hero-medicina-legal.png");
  background-size: cover;
  background-position: center;
  transform: scale(1.02);
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(4, 33, 38, 0.86) 0%, rgba(4, 33, 38, 0.62) 38%, rgba(4, 33, 38, 0.16) 76%),
    linear-gradient(0deg, rgba(4, 33, 38, 0.58) 0%, rgba(4, 33, 38, 0) 26%);
}

.hero-content {
  position: relative;
  z-index: 1;
  width: min(720px, calc(100% - 36px));
  margin-left: clamp(18px, 8vw, 112px);
  padding-top: 70px;
}

.eyebrow,
.section-kicker {
  margin: 0 0 12px;
  color: var(--amber);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: clamp(3.2rem, 8vw, 7rem);
  line-height: 0.95;
}

h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.35rem);
  line-height: 1.06;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.16rem;
  line-height: 1.25;
}

.hero-copy {
  max-width: 620px;
  margin: 22px 0 0;
  color: rgba(255, 255, 255, 0.9);
  font-size: clamp(1rem, 1.8vw, 1.22rem);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}

.button {
  display: inline-flex;
  min-height: 46px;
  align-items: center;
  justify-content: center;
  padding: 12px 18px;
  border: 1px solid transparent;
  border-radius: 4px;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

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

.button.primary:hover {
  background: var(--teal-dark);
}

.button.secondary {
  color: var(--white);
  border-color: rgba(255, 255, 255, 0.76);
  background: rgba(255, 255, 255, 0.08);
}

.button.secondary:hover {
  background: rgba(255, 255, 255, 0.18);
}

.section,
.section-band,
.contact-section {
  padding: clamp(56px, 8vw, 104px) clamp(18px, 5vw, 72px);
}

.section {
  background: var(--paper);
}

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

.intro-grid,
.section-heading,
.section-split,
.contact-panel {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.intro-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}

.intro-grid p:last-child,
.split-copy p,
.contact-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
}

.section-heading {
  margin-bottom: 28px;
}

.section-heading h2 {
  max-width: 780px;
}

.cards-grid {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.info-card,
.content-list article {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(16, 33, 38, 0.05);
}

.info-card {
  min-height: 214px;
  padding: 24px;
}

.card-icon {
  display: inline-grid;
  width: 42px;
  height: 34px;
  margin-bottom: 24px;
  place-items: center;
  border-left: 3px solid var(--amber);
  color: var(--teal);
  font-weight: 800;
}

.info-card p,
.content-list p {
  margin: 0;
  color: var(--muted);
}

.section-split {
  display: grid;
  grid-template-columns: 0.88fr 1.12fr;
  gap: clamp(28px, 6vw, 78px);
  align-items: start;
  border-top: 1px solid var(--line);
}

.split-copy p {
  margin-top: 20px;
}

.process-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.process-list li {
  position: relative;
  min-height: 86px;
  padding: 18px 20px 18px 72px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.process-list li::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  top: 18px;
  left: 20px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 4px;
  color: var(--white);
  background: var(--teal);
  font-weight: 800;
}

.process-list strong,
.process-list span {
  display: block;
}

.process-list span {
  color: var(--muted);
}

.content-list {
  width: min(1180px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.content-list article {
  padding: 24px;
}

.contact-section {
  background: var(--teal-dark);
}

.contact-panel {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(28px, 5vw, 64px);
  align-items: start;
  color: var(--white);
}

.contact-panel p {
  max-width: 560px;
  margin-top: 18px;
  color: rgba(255, 255, 255, 0.78);
}

.contact-form {
  display: grid;
  gap: 14px;
  padding: clamp(20px, 3vw, 32px);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: var(--shadow);
}

.contact-form label {
  display: grid;
  gap: 7px;
  color: rgba(255, 255, 255, 0.86);
  font-weight: 700;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 4px;
  padding: 12px 13px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  font: inherit;
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 2px solid var(--amber);
  outline-offset: 2px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px 24px;
  padding: 24px clamp(18px, 5vw, 72px);
  color: var(--muted);
  background: var(--white);
  font-size: 0.92rem;
}

.site-footer p {
  margin: 0;
}

@media (max-width: 860px) {
  .menu-button {
    display: block;
  }

  .nav {
    position: absolute;
    top: 100%;
    right: 18px;
    left: 18px;
    display: none;
    flex-direction: column;
    gap: 0;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--ink);
    background: var(--white);
    box-shadow: var(--shadow);
  }

  .nav.is-open {
    display: flex;
  }

  .nav a {
    padding: 12px;
  }

  .hero {
    min-height: 88vh;
  }

  .hero-media {
    background-position: 58% center;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(4, 33, 38, 0.9) 0%, rgba(4, 33, 38, 0.66) 70%, rgba(4, 33, 38, 0.42) 100%),
      linear-gradient(0deg, rgba(4, 33, 38, 0.62) 0%, rgba(4, 33, 38, 0) 32%);
  }

  .hero-content {
    width: min(640px, calc(100% - 32px));
    margin: 0 auto;
  }

  .intro-grid,
  .section-split,
  .contact-panel,
  .cards-grid,
  .content-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .site-header {
    padding: 14px 16px;
  }

  .brand span:last-child {
    max-width: 150px;
  }

  h1 {
    font-size: 3rem;
  }

  .hero-actions,
  .button {
    width: 100%;
  }

  .section,
  .section-band,
  .contact-section {
    padding-inline: 16px;
  }

  .info-card,
  .content-list article,
  .contact-form {
    padding: 20px;
  }
}
