:root {
  --brown: #3a2a24;
  --brown-2: #4b352d;
  --brown-3: #6a5146;
  --ink: #272321;
  --muted: #716861;
  --ivory: #f5f1ea;
  --paper: #fbf9f5;
  --sand: #d7c8b9;
  --line: rgba(58,42,36,.14);
  --white: #fff;
  --radius: 22px;
  --shadow: 0 28px 70px rgba(58,42,36,.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'DM Sans', Arial, sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}
body.menu-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }
.container { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.section-pad { padding: 110px 0; }

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  background: rgba(245,241,234,.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(58,42,36,.08);
}
.nav-wrap { min-height: 82px; display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brown); color: var(--ivory); font-family: 'DM Serif Display', serif; font-size: 20px;
}
.brand-text { display: grid; line-height: 1.15; }
.brand-text strong { font-size: 14px; text-transform: uppercase; letter-spacing: .07em; }
.brand-text small { margin-top: 5px; color: var(--muted); font-size: 12px; }
.main-nav { display: flex; align-items: center; gap: 28px; font-size: 14px; font-weight: 500; }
.main-nav a { position: relative; }
.main-nav a:not(.nav-cta)::after { content: ''; position: absolute; left: 0; bottom: -7px; width: 0; height: 1px; background: var(--brown); transition: .25s; }
.main-nav a:hover::after { width: 100%; }
.nav-cta { padding: 11px 18px; border: 1px solid var(--brown); border-radius: 999px; }
.nav-cta:hover { background: var(--brown); color: var(--ivory); }
.menu-toggle { display: none; background: none; border: 0; padding: 8px; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: var(--brown); margin: 5px 0; }

.hero {
  position: relative;
  overflow: hidden;
  min-height: 820px;
  padding: 190px 0 110px;
  background: linear-gradient(135deg, #3a2a24 0%, #443028 58%, #2f231f 100%);
  color: var(--ivory);
}
.hero::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px; mask-image: linear-gradient(to bottom, rgba(0,0,0,.8), transparent 90%);
}
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: 1.15fr .85fr; gap: 80px; align-items: center; }
.eyebrow { margin: 0 0 24px; font-size: 12px; font-weight: 600; letter-spacing: .18em; }
.eyebrow.dark { color: var(--brown-3); }
h1, h2, h3 { font-family: 'DM Serif Display', Georgia, serif; font-weight: 400; line-height: 1.05; margin-top: 0; }
h1 { font-size: clamp(58px, 7vw, 98px); max-width: 920px; margin-bottom: 28px; letter-spacing: -.035em; }
.hero-lead { max-width: 690px; font-size: 21px; color: rgba(245,241,234,.78); }
.hero-actions { display: flex; gap: 14px; margin-top: 40px; flex-wrap: wrap; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: .25s ease; }
.btn-primary { background: var(--ivory); color: var(--brown); }
.btn-primary:hover { transform: translateY(-2px); background: #fff; }
.btn-ghost { border: 1px solid rgba(245,241,234,.36); color: var(--ivory); }
.btn-ghost:hover { border-color: var(--ivory); transform: translateY(-2px); }
.hero-panel { position: relative; min-height: 490px; }
.hero-card { position: absolute; border: 1px solid rgba(255,255,255,.12); box-shadow: var(--shadow); }
.hero-card-main {
  right: 0; top: 0; width: min(420px, 100%); min-height: 470px; padding: 42px;
  background: rgba(255,255,255,.08); backdrop-filter: blur(14px); border-radius: 36px;
  display: flex; flex-direction: column; justify-content: flex-end;
}
.hero-card-main strong { display: block; font-family: 'DM Serif Display', serif; font-size: 48px; font-weight: 400; line-height: 1.08; }
.hero-card-kicker { margin-bottom: auto; color: rgba(245,241,234,.65); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; }
.hero-card-line { width: 100%; height: 1px; background: rgba(245,241,234,.22); margin: 28px 0 18px; }
.hero-card-main > span:last-child { font-size: 13px; color: rgba(245,241,234,.65); }
.hero-card-note {
  left: -35px; bottom: -35px; width: 260px; padding: 25px; border-radius: 18px;
  background: var(--ivory); color: var(--brown); font-family: 'DM Serif Display', serif; font-size: 22px; line-height: 1.2;
}
.hero-orbit { position: absolute; border: 1px solid rgba(255,255,255,.09); border-radius: 50%; }
.hero-orbit-a { width: 520px; height: 520px; right: -160px; top: 130px; }
.hero-orbit-b { width: 360px; height: 360px; left: -160px; bottom: -140px; }

.intro { background: var(--ivory); }
.intro-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 100px; align-items: end; }
.section-heading h2 { font-size: clamp(44px, 5vw, 72px); letter-spacing: -.025em; margin-bottom: 0; }
.intro-copy p { font-size: 20px; margin: 0; color: var(--muted); }

.practice { background: var(--paper); }
.practice-heading { margin-bottom: 56px; max-width: 820px; }
.practice-list { border-top: 1px solid var(--line); }
.practice-item { border-bottom: 1px solid var(--line); }
.practice-trigger {
  width: 100%; padding: 28px 0; border: 0; background: transparent; display: grid;
  grid-template-columns: 70px 1fr 40px; align-items: center; text-align: left; cursor: pointer; color: var(--ink);
}
.practice-number { color: var(--brown-3); font-size: 13px; }
.practice-title { font-family: 'DM Serif Display', serif; font-size: clamp(31px, 3vw, 48px); line-height: 1.1; }
.practice-plus { font-size: 32px; color: var(--brown-3); text-align: right; font-weight: 300; }
.practice-content { max-height: 0; overflow: hidden; opacity: 0; transition: max-height .45s ease, opacity .35s ease, padding .35s ease; padding: 0 0 0 70px; }
.practice-content.open { max-height: 700px; opacity: 1; padding: 0 0 34px 70px; }
.practice-content p { max-width: 800px; font-size: 18px; color: var(--muted); }
.practice-content ul { margin: 18px 0 0; padding: 0; list-style: none; max-width: 960px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 34px; }
.practice-content li { padding-left: 18px; position: relative; color: #4e4742; }
.practice-content li::before { content: '•'; position: absolute; left: 0; color: var(--brown-3); }

.team { background: var(--brown); color: var(--ivory); }
.team-head { display: grid; grid-template-columns: 1fr .7fr; gap: 80px; align-items: end; margin-bottom: 65px; }
.team-head > p { margin: 0; color: rgba(245,241,234,.68); font-size: 18px; }
.team-grid { display: grid; gap: 26px; }
.person-card {
  display: grid; grid-template-columns: 270px 1fr; gap: 42px; padding: 34px;
  border: 1px solid rgba(255,255,255,.12); border-radius: var(--radius); background: rgba(255,255,255,.04);
}
.person-visual { min-height: 310px; border-radius: 18px; background: linear-gradient(145deg, #6a5146, #2e221e); display: grid; place-items: center; overflow: hidden; }
.person-visual span { width: 110px; height: 110px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; display: grid; place-items: center; font-family: 'DM Serif Display', serif; font-size: 30px; color: rgba(255,255,255,.75); }
.person-role { margin: 0 0 12px; color: var(--sand); font-size: 12px; font-weight: 600; letter-spacing: .16em; }
.person-copy h3 { font-size: clamp(34px, 3vw, 48px); margin-bottom: 20px; }
.person-copy p:not(.person-role) { margin: 0 0 12px; color: rgba(245,241,234,.72); }

.presence { background: var(--ivory); }
.presence-grid { display: grid; grid-template-columns: 1fr .85fr; gap: 90px; align-items: start; }
.location-list { border-top: 1px solid var(--line); }
.location { display: grid; grid-template-columns: 60px 1fr; align-items: center; padding: 24px 0; border-bottom: 1px solid var(--line); }
.location span { font-size: 12px; color: var(--brown-3); }
.location strong { font-family: 'DM Serif Display', serif; font-size: 38px; font-weight: 400; }

.contact { background: #2d221e; color: var(--ivory); }
.contact-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 90px; align-items: start; }
.contact-copy h2 { font-size: clamp(48px, 5vw, 76px); margin-bottom: 22px; }
.contact-copy p:last-child { color: rgba(245,241,234,.68); max-width: 520px; }
.contact-cards { display: grid; gap: 16px; }
.contact-card { padding: 26px; border: 1px solid rgba(255,255,255,.12); border-radius: 18px; display: grid; gap: 7px; transition: .25s ease; background: rgba(255,255,255,.03); }
.contact-card:hover { transform: translateY(-3px); background: rgba(255,255,255,.07); }
.contact-card span { color: rgba(245,241,234,.68); font-size: 14px; }
.contact-card strong { font-size: 19px; }
.contact-card em { margin-top: 8px; font-style: normal; color: var(--sand); font-size: 13px; }

.site-footer { background: #241a17; color: rgba(245,241,234,.62); padding: 32px 0; font-size: 12px; }
.footer-grid { display: grid; grid-template-columns: 1fr 1.3fr auto; gap: 28px; align-items: center; }
.footer-grid > div:first-child { display: grid; }
.footer-grid strong { color: var(--ivory); font-weight: 500; }

.whatsapp-float {
  position: fixed; right: 22px; bottom: 22px; z-index: 90; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brown); color: var(--ivory); border: 1px solid rgba(255,255,255,.25);
  box-shadow: 0 12px 30px rgba(0,0,0,.22); font-size: 12px; font-weight: 700; letter-spacing: .06em;
}

.reveal { opacity: 0; transform: translateY(20px); transition: opacity .7s ease, transform .7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: .12s; }

@media (max-width: 900px) {
  .container { width: min(100% - 34px, 1180px); }
  .section-pad { padding: 82px 0; }
  .menu-toggle { display: block; z-index: 101; }
  .main-nav {
    position: fixed; inset: 0; background: var(--ivory); flex-direction: column; justify-content: center; gap: 24px;
    font-family: 'DM Serif Display', serif; font-size: 34px; transform: translateY(-100%); transition: .35s ease;
  }
  .main-nav.open { transform: translateY(0); }
  .nav-cta { border: 0; padding: 0; }
  .hero { min-height: auto; padding-top: 150px; }
  .hero-grid, .intro-grid, .team-head, .presence-grid, .contact-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-panel { min-height: 430px; max-width: 520px; }
  .hero-card-main { left: 0; right: auto; }
  .hero-card-note { left: 15px; }
  .person-card { grid-template-columns: 1fr; }
  .person-visual { min-height: 260px; }
  .footer-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  .brand-text small { display: none; }
  .brand-text strong { font-size: 11px; }
  h1 { font-size: 52px; }
  .hero { padding-bottom: 85px; }
  .hero-lead { font-size: 18px; }
  .hero-panel { min-height: 380px; }
  .hero-card-main { min-height: 360px; padding: 28px; border-radius: 26px; }
  .hero-card-main strong { font-size: 38px; }
  .hero-card-note { width: 220px; bottom: -20px; font-size: 18px; }
  .section-heading h2 { font-size: 44px; }
  .practice-trigger { grid-template-columns: 42px 1fr 28px; }
  .practice-title { font-size: 30px; }
  .practice-content, .practice-content.open { padding-left: 42px; }
  .practice-content ul { grid-template-columns: 1fr; }
  .person-card { padding: 22px; gap: 28px; }
  .contact-card strong { font-size: 16px; }
}

/* v2 adjustments */
.brand { gap: 0; }
.brand-text strong { font-size: 15px; letter-spacing: .09em; }
.hero { background: #2f231f; isolation: isolate; }
.hero-slideshow { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
.hero-slide { position: absolute; inset: -3%; background-size: cover; background-position: center; opacity: 0; transform: scale(1.03); animation: heroFade 18s infinite; }
.hero-slide-1 { background-image: url('img/hero-ambiental.jpg'); animation-delay: 0s; }
.hero-slide-2 { background-image: url('img/hero-maritimo.jpg'); animation-delay: 6s; }
.hero-slide-3 { background-image: url('img/hero-aeronautico.jpg'); animation-delay: 12s; }
.hero-overlay { position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, rgba(37,26,22,.90) 0%, rgba(47,35,31,.76) 48%, rgba(36,26,23,.52) 100%); }
.hero::after { z-index: 1; }
.hero-grid { z-index: 2; }
h1 { font-size: clamp(50px, 5.9vw, 82px); max-width: 780px; }
.hero-panel { min-height: 470px; padding-bottom: 58px; }
.hero-card-main { min-height: 430px; }
.hero-card-note { left: auto; right: 24px; bottom: 0; width: 250px; }
.person-visual { background: #2e221e; }
.person-visual img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-card:nth-child(1) .person-visual img { object-position: center 30%; }
.person-card:nth-child(2) .person-visual img { object-position: center 35%; }
.person-card:nth-child(3) .person-visual img { object-position: center 25%; }
.footer-grid > div:first-child { display: block; }
@keyframes heroFade {
  0% { opacity: 0; transform: scale(1.04); }
  7% { opacity: 1; }
  28% { opacity: 1; }
  36% { opacity: 0; transform: scale(1.09); }
  100% { opacity: 0; transform: scale(1.09); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide { animation: none; opacity: 0; }
  .hero-slide-1 { opacity: 1; }
}
@media (max-width: 900px) {
  .hero-overlay { background: linear-gradient(180deg, rgba(37,26,22,.86), rgba(47,35,31,.72)); }
  .hero-card-note { right: 8px; left: auto; bottom: 0; }
}
@media (max-width: 640px) {
  .brand-text strong { font-size: 12px; }
  h1 { font-size: 46px; }
  .hero-panel { min-height: 410px; padding-bottom: 44px; }
  .hero-card-note { width: 210px; }
}

/* v3: hero panel without overlap + WhatsApp icon */
.hero-panel {
  min-height: 0;
  padding-bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
}
.hero-panel .hero-card { position: static; }
.hero-card-main {
  width: min(420px, 100%);
  min-height: 430px;
}
.hero-card-note {
  width: min(420px, 100%);
  margin-right: 0;
}
.whatsapp-float {
  background: #25D366;
  color: #fff;
  border: 0;
  transition: transform .22s ease, box-shadow .22s ease;
}
.whatsapp-float:hover {
  transform: translateY(-2px) scale(1.04);
  box-shadow: 0 16px 36px rgba(0,0,0,.28);
}
.whatsapp-float svg { width: 30px; height: 30px; display: block; }
@media (max-width: 900px) {
  .hero-panel { align-items: flex-start; gap: 16px; }
  .hero-card-note { width: min(420px, 100%); margin: 0; }
}
@media (max-width: 640px) {
  .hero-panel { min-height: 0; padding-bottom: 0; }
  .hero-card-note { width: 100%; margin: 0; }
}

/* v7: mobile navigation panel */
@media (max-width: 900px) {
  .site-header { height: 82px; }
  .nav-wrap { min-height: 82px; }

  .main-nav {
    position: fixed;
    top: 82px;
    left: 0;
    right: 0;
    bottom: 0;
    inset: 82px 0 0 0;
    width: 100%;
    height: calc(100dvh - 82px);
    padding: 34px 28px 48px;
    background: rgba(245,241,234,.98);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 0;
    font-family: 'DM Sans', Arial, sans-serif;
    font-size: 18px;
    font-weight: 500;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .22s ease, transform .22s ease, visibility 0s linear .22s;
    z-index: 99;
  }

  .main-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .22s ease, transform .22s ease;
  }

  .main-nav a,
  .main-nav .nav-cta {
    display: flex;
    align-items: center;
    min-height: 66px;
    padding: 0;
    border: 0;
    border-bottom: 1px solid rgba(58,42,36,.13);
    border-radius: 0;
    color: var(--brown);
  }

  .main-nav a::after { display: none !important; }
  .main-nav .nav-cta:hover { background: transparent; color: var(--brown); }

  .menu-toggle {
    position: relative;
    width: 44px;
    height: 44px;
    padding: 8px;
  }

  .menu-toggle span {
    position: absolute;
    left: 9px;
    width: 26px;
    margin: 0;
    transition: transform .22s ease, opacity .18s ease, top .22s ease;
  }
  .menu-toggle span:nth-child(1) { top: 13px; }
  .menu-toggle span:nth-child(2) { top: 21px; }
  .menu-toggle span:nth-child(3) { top: 29px; }

  .menu-toggle[aria-expanded="true"] span:nth-child(1) { top: 21px; transform: rotate(45deg); }
  .menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
  .menu-toggle[aria-expanded="true"] span:nth-child(3) { top: 21px; transform: rotate(-45deg); }
}

@media (max-width: 640px) {
  .main-nav { padding: 22px 24px 40px; }
  .main-nav a,
  .main-nav .nav-cta { min-height: 62px; font-size: 17px; }
}
