/* ============================================================
   MARTINS ADVOGADOS — Landing Page
   Design system: deep olive + cream, geometric type,
   signature "olive rule" divider echoing the wordmark.
   ============================================================ */

:root {
  /* Olive scale */
  --olive-950: #1b2314;
  --olive-900: #232d1a;
  --olive-850: #293420;
  --olive-800: #2f3b24;
  --olive-700: #3c4a2d;
  --olive-600: #4a5a38;
  --sage-500: #6e7f58;
  --sage-400: #8a9a6e;
  --sage-300: #a9b592;

  /* Neutrals */
  --cream: #f4f2e8;
  --cream-2: #fbfaf3;
  --paper: #ffffff;
  --ink: #191d12;
  --ink-soft: #4c5340;
  --ink-mute: #78806a;

  /* Utility */
  --line-dark: rgba(245, 243, 234, 0.16);
  --line-light: rgba(74, 90, 56, 0.22);
  --shadow-sm: 0 2px 10px rgba(27, 35, 20, 0.06);
  --shadow-md: 0 18px 50px -20px rgba(27, 35, 20, 0.35);
  --shadow-lg: 0 40px 80px -30px rgba(27, 35, 20, 0.45);

  --font-display: 'Sora', 'Segoe UI', sans-serif;
  --font-body: 'Manrope', 'Segoe UI', sans-serif;

  --max: 1240px;
  --gutter: clamp(1.25rem, 4vw, 4rem);
  --radius: 2px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.65;
  font-size: clamp(0.98rem, 0.9rem + 0.3vw, 1.06rem);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; margin: 0; padding: 0; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.08; margin: 0; }

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }

/* ---------- Shared bits ---------- */
.eyebrow {
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--sage-500);
  display: inline-flex;
  align-items: center;
  gap: 0.9rem;
}
.eyebrow::before {
  content: "";
  width: 34px; height: 1px;
  background: var(--sage-500);
  display: inline-block;
}
section .eyebrow { color: var(--olive-600); }
section .eyebrow::before { background: var(--olive-600); }

/* Signature: the olive rule that echoes the logo underline */
.rule {
  height: 1px;
  background: var(--olive-600);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 1.1s var(--ease);
}
.reveal.in .rule { transform: scaleX(1); }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.9rem;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  border-radius: var(--radius);
  transition: all 0.4s var(--ease);
  position: relative;
  overflow: hidden;
}
.btn .arrow { transition: transform 0.4s var(--ease); }
.btn:hover .arrow { transform: translateX(5px); }

.btn-primary {
  background: var(--olive-700);
  color: var(--cream-2);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--olive-800); transform: translateY(-2px); box-shadow: var(--shadow-md); }

.btn-ghost {
  color: var(--cream-2);
  border: 1px solid var(--line-dark);
}
.btn-ghost:hover { border-color: var(--sage-400); color: #fff; background: rgba(255,255,255,0.04); }

.btn-outline-dark {
  color: var(--olive-800);
  border: 1px solid var(--line-light);
}
.btn-outline-dark:hover { background: var(--olive-800); color: var(--cream-2); border-color: var(--olive-800); }

/* ============================================================
   HEADER / NAV
   ============================================================ */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  padding: 1.35rem 0;
  transition: background 0.5s var(--ease), padding 0.5s var(--ease), box-shadow 0.5s var(--ease);
}
.site-header.scrolled {
  background: rgba(27, 35, 20, 0.92);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 0.85rem 0;
  box-shadow: 0 1px 0 var(--line-dark);
}
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}
.brand img { height: 30px; width: auto; transition: height 0.4s var(--ease); }
.site-header.scrolled .brand img { height: 26px; }

.nav-links {
  display: flex;
  align-items: center;
  gap: 2.4rem;
}
.nav-links a {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  color: var(--cream-2);
  position: relative;
  padding: 0.35rem 0;
  opacity: 0.85;
  transition: opacity 0.3s var(--ease);
}
.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0;
  width: 100%; height: 1px;
  background: var(--sage-400);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease);
}
.nav-links a:hover { opacity: 1; }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }

.nav-right { display: flex; align-items: center; gap: 1.5rem; }

.lang-toggle {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line-dark);
  border-radius: 100px;
  overflow: hidden;
  font-family: var(--font-display);
}
.lang-toggle button {
  padding: 0.4rem 0.85rem;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--cream-2);
  opacity: 0.55;
  transition: all 0.35s var(--ease);
}
.lang-toggle button.active { background: var(--olive-600); opacity: 1; }

.nav-toggle {
  display: none;
  width: 34px; height: 34px;
  position: relative;
}
.nav-toggle span {
  position: absolute;
  left: 5px; right: 5px; height: 1.5px;
  background: var(--cream-2);
  transition: all 0.4s var(--ease);
}
.nav-toggle span:nth-child(1) { top: 11px; }
.nav-toggle span:nth-child(2) { top: 17px; }
.nav-toggle span:nth-child(3) { top: 23px; }
body.menu-open .nav-toggle span:nth-child(1) { top: 17px; transform: rotate(45deg); }
body.menu-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav-toggle span:nth-child(3) { top: 17px; transform: rotate(-45deg); }

/* ============================================================
   HERO
   ============================================================ */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  align-items: center;
  color: var(--cream-2);
  background: var(--olive-950);
  overflow: hidden;
  padding: 8rem 0 4rem;
}
.hero-bg { position: absolute; inset: 0; z-index: 0; }
.hero-bg svg { width: 100%; height: 100%; object-fit: cover; }
.hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background:
    linear-gradient(180deg, rgba(27,35,20,0.55) 0%, rgba(27,35,20,0.72) 55%, rgba(20,26,15,0.96) 100%),
    radial-gradient(1200px 700px at 78% 18%, rgba(110,127,88,0.28), transparent 60%);
}
.hero .container { position: relative; z-index: 2; width: 100%; }
.hero-inner { max-width: 900px; }

.hero h1 {
  font-weight: 300;
  font-size: clamp(2.1rem, 1.2rem + 4.4vw, 4.6rem);
  letter-spacing: -0.01em;
  margin: 1.7rem 0 0;
}
.hero h1 .accent { color: var(--sage-300); font-weight: 400; }
.hero h1 .line { display: block; overflow: hidden; }
.hero h1 .line > span {
  display: block;
  transform: translateY(110%);
  animation: rise 1s var(--ease) forwards;
}
.hero h1 .line:nth-child(1) > span { animation-delay: 0.35s; }
.hero h1 .line:nth-child(2) > span { animation-delay: 0.5s; }
.hero h1 .line:nth-child(3) > span { animation-delay: 0.65s; }
@keyframes rise { to { transform: translateY(0); } }

.hero .eyebrow { opacity: 0; animation: fade 0.9s var(--ease) 0.15s forwards; }
.hero-sub {
  max-width: 620px;
  font-size: clamp(1rem, 0.95rem + 0.35vw, 1.18rem);
  color: rgba(244, 242, 232, 0.82);
  margin: 1.8rem 0 2.6rem;
  opacity: 0;
  animation: fade 1s var(--ease) 0.8s forwards;
}
.hero-cta { display: flex; flex-wrap: wrap; gap: 1rem; opacity: 0; animation: fade 1s var(--ease) 0.95s forwards; }
@keyframes fade { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero-stats {
  position: relative; z-index: 2;
  display: flex;
  flex-wrap: wrap;
  gap: clamp(1.5rem, 4vw, 4rem);
  margin-top: clamp(3rem, 6vw, 5.5rem);
  padding-top: 2rem;
  border-top: 1px solid var(--line-dark);
  opacity: 0;
  animation: fade 1s var(--ease) 1.15s forwards;
}
.hero-stats .stat b {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.9rem, 1.3rem + 2vw, 2.7rem);
  color: #fff;
  display: block;
  line-height: 1;
}
.hero-stats .stat span {
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  color: rgba(244,242,232,0.6);
  text-transform: uppercase;
  margin-top: 0.5rem;
  display: block;
}

.scroll-cue {
  position: absolute; z-index: 2;
  bottom: 1.8rem; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 0.6rem;
  font-size: 0.66rem; letter-spacing: 0.28em; text-transform: uppercase;
  color: rgba(244,242,232,0.55);
}
.scroll-cue .dot { width: 1px; height: 40px; background: linear-gradient(var(--sage-400), transparent); animation: cue 2.2s var(--ease) infinite; }
@keyframes cue { 0%,100% { transform: scaleY(0.4); opacity: 0.4; transform-origin: top; } 50% { transform: scaleY(1); opacity: 1; } }

/* ============================================================
   SECTIONS (light)
   ============================================================ */
.section { padding: clamp(4.5rem, 9vw, 8rem) 0; position: relative; }
.section-head { max-width: 760px; margin-bottom: clamp(2.5rem, 5vw, 4rem); }
.section-head h2 {
  font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3.2rem);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-top: 1.3rem;
  color: var(--ink);
}
.section-head .lead {
  margin-top: 1.4rem;
  font-size: clamp(1rem, 0.95rem + 0.3vw, 1.15rem);
  color: var(--ink-soft);
  max-width: 620px;
}

/* Reveal animation */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.9s var(--ease), transform 0.9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: 0.08s; }
.reveal.d2 { transition-delay: 0.16s; }
.reveal.d3 { transition-delay: 0.24s; }
.reveal.d4 { transition-delay: 0.32s; }

/* ---------- SERVICES ---------- */
.services { background: var(--cream-2); }
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-light);
  border: 1px solid var(--line-light);
}
.svc {
  background: var(--cream-2);
  padding: clamp(1.8rem, 3vw, 2.6rem);
  position: relative;
  transition: background 0.5s var(--ease);
  overflow: hidden;
}
.svc::after {
  content: "";
  position: absolute; left: 0; top: 0;
  width: 0; height: 2px;
  background: var(--olive-600);
  transition: width 0.5s var(--ease);
}
.svc:hover { background: var(--paper); }
.svc:hover::after { width: 100%; }
.svc .num {
  font-family: var(--font-display);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  color: var(--sage-500);
}
.svc h3 {
  font-size: 1.35rem;
  font-weight: 500;
  margin: 1.4rem 0 0.9rem;
  color: var(--ink);
}
.svc p { color: var(--ink-soft); font-size: 0.96rem; margin: 0; }
.svc .ico { width: 30px; height: 30px; color: var(--olive-600); margin-bottom: 1.4rem; opacity: 0.85; }

/* BPO feature block */
.bpo {
  margin-top: 1px;
  background: var(--olive-900);
  color: var(--cream-2);
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  overflow: hidden;
  position: relative;
}
.bpo-body { padding: clamp(2.4rem, 5vw, 4rem); position: relative; z-index: 2; }
.bpo .eyebrow { color: var(--sage-300); }
.bpo .eyebrow::before { background: var(--sage-300); }
.bpo h3 { font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); font-weight: 300; margin: 1.2rem 0 1.1rem; }
.bpo p { color: rgba(244,242,232,0.82); max-width: 520px; }
.bpo ul { margin: 1.8rem 0 2.2rem; display: grid; gap: 0.85rem; }
.bpo li { display: flex; gap: 0.8rem; align-items: flex-start; font-size: 0.95rem; color: rgba(244,242,232,0.9); }
.bpo li svg { flex: none; width: 18px; height: 18px; color: var(--sage-400); margin-top: 3px; }
.bpo-art { position: relative; }
.bpo-art svg { position: absolute; inset: 0; width: 100%; height: 100%; }

/* ---------- ABOUT ---------- */
.about { background: var(--cream); }
.about-grid { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: clamp(2.5rem, 5vw, 5rem); align-items: center; }
.portrait { position: relative; }
.portrait-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--olive-900);
}
.portrait-frame img {
  width: 100%; height: 100%;
  object-fit: cover;
  filter: grayscale(100%) contrast(1.05);
  transition: filter 0.7s var(--ease), transform 1.2s var(--ease);
}
.portrait-frame::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(160deg, rgba(74,90,56,0.35), rgba(27,35,20,0.15));
  mix-blend-mode: multiply;
  opacity: 0.6;
  transition: opacity 0.7s var(--ease);
}
.portrait:hover .portrait-frame img { transform: scale(1.03); filter: grayscale(60%) contrast(1.05); }
.portrait:hover .portrait-frame::after { opacity: 0.25; }
.portrait-badge {
  position: absolute;
  left: -1px; bottom: 26px;
  background: var(--olive-800);
  color: var(--cream-2);
  padding: 1rem 1.4rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.portrait-badge b { font-family: var(--font-display); font-weight: 500; display: block; font-size: 0.95rem; letter-spacing: 0.02em; }
.portrait-badge span { font-size: 0.76rem; letter-spacing: 0.08em; color: var(--sage-300); text-transform: uppercase; }

.about-body h2 { font-size: clamp(1.8rem, 1.2rem + 2.2vw, 2.8rem); font-weight: 400; margin: 1.3rem 0 1.5rem; }
.about-body p { color: var(--ink-soft); margin: 0 0 1.15rem; }
.about-body p strong { color: var(--ink); font-weight: 600; }
.about-tags { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 2rem; }
.about-tags span {
  font-family: var(--font-display);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--olive-700);
  border: 1px solid var(--line-light);
  padding: 0.5rem 0.9rem;
  border-radius: 100px;
}

/* ---------- CONTACT ---------- */
.contact { background: var(--olive-950); color: var(--cream-2); position: relative; overflow: hidden; }
.contact-bg { position: absolute; inset: 0; opacity: 0.5; }
.contact-bg svg { width: 100%; height: 100%; }
.contact .container { position: relative; z-index: 2; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2.5rem, 5vw, 5rem); }
.contact .eyebrow { color: var(--sage-300); }
.contact .eyebrow::before { background: var(--sage-300); }
.contact h2 { font-size: clamp(1.9rem, 1.2rem + 2.6vw, 3rem); font-weight: 300; margin: 1.3rem 0 1.4rem; }
.contact-lead { color: rgba(244,242,232,0.8); max-width: 460px; margin-bottom: 2.6rem; }

.contact-list { display: grid; gap: 1.6rem; }
.contact-item { display: flex; gap: 1.1rem; align-items: flex-start; }
.contact-item .ic {
  flex: none; width: 44px; height: 44px;
  border: 1px solid var(--line-dark);
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--sage-300);
  transition: all 0.4s var(--ease);
}
.contact-item:hover .ic { background: var(--olive-700); border-color: var(--olive-700); color: #fff; }
.contact-item .lbl { font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--sage-400); }
.contact-item .val { font-family: var(--font-display); font-size: 1.05rem; color: var(--cream-2); margin-top: 0.2rem; }
.contact-item a.val:hover { color: #fff; text-decoration: underline; text-underline-offset: 4px; }

/* Form */
.form { display: grid; gap: 1.15rem; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.15rem; }
.field label {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage-400);
  margin-bottom: 0.5rem;
}
.field input, .field textarea {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid var(--line-dark);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  color: var(--cream-2);
  font-family: var(--font-body);
  font-size: 0.96rem;
  transition: border-color 0.35s var(--ease), background 0.35s var(--ease);
}
.field textarea { min-height: 130px; resize: vertical; }
.field input::placeholder, .field textarea::placeholder { color: rgba(244,242,232,0.4); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--sage-400); background: rgba(255,255,255,0.06); }
.form .btn-primary { justify-content: center; margin-top: 0.4rem; background: var(--olive-600); }
.form .btn-primary:hover { background: var(--sage-500); }

/* ============================================================
   FOOTER
   ============================================================ */
.footer { background: var(--olive-950); color: var(--cream-2); padding: 3.5rem 0 2rem; border-top: 1px solid var(--line-dark); }
.footer-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 2rem; align-items: flex-start; }
.footer-brand img { height: 30px; margin-bottom: 1.1rem; }
.footer-brand p { color: rgba(244,242,232,0.6); max-width: 320px; font-size: 0.92rem; }
.footer-nav { display: flex; gap: 3rem; flex-wrap: wrap; }
.footer-col h4 { font-family: var(--font-display); font-size: 0.72rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--sage-400); margin: 0 0 1rem; font-weight: 600; }
.footer-col a, .footer-col span { display: block; color: rgba(244,242,232,0.72); font-size: 0.92rem; margin-bottom: 0.6rem; transition: color 0.3s var(--ease); }
.footer-col a:hover { color: #fff; }
.footer-bottom {
  margin-top: 3rem; padding-top: 1.6rem;
  border-top: 1px solid var(--line-dark);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
  font-size: 0.8rem; color: rgba(244,242,232,0.5);
}

/* ============================================================
   MOBILE MENU
   ============================================================ */
.mobile-menu {
  position: fixed; inset: 0; z-index: 99;
  background: var(--olive-950);
  display: flex; flex-direction: column; justify-content: center;
  padding: var(--gutter);
  transform: translateY(-100%);
  transition: transform 0.6s var(--ease);
  visibility: hidden;
}
body.menu-open .mobile-menu { transform: translateY(0); visibility: visible; }
.mobile-menu a {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 8vw, 2.6rem);
  font-weight: 300;
  color: var(--cream-2);
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line-dark);
  display: flex; justify-content: space-between; align-items: center;
}
.mobile-menu a span { font-size: 0.9rem; color: var(--sage-400); }
.mobile-lang { margin-top: 2.5rem; display: flex; gap: 0.8rem; }
.mobile-lang button {
  padding: 0.6rem 1.4rem; border: 1px solid var(--line-dark); border-radius: 100px;
  color: var(--cream-2); font-family: var(--font-display); font-weight: 600; letter-spacing: 0.1em; font-size: 0.8rem;
}
.mobile-lang button.active { background: var(--olive-600); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 980px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .bpo { grid-template-columns: 1fr; }
  .bpo-art { min-height: 200px; order: -1; }
  .about-grid { grid-template-columns: 1fr; gap: 3rem; }
  .portrait { max-width: 380px; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .nav-links, .nav-right .lang-toggle { display: none; }
  .nav-toggle { display: block; }
  .services-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1.8rem 2.5rem; }
  .form .row { grid-template-columns: 1fr; }
  .footer-top { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
  .hero h1 .line > span, .reveal { transform: none !important; opacity: 1 !important; }
  .rule { transform: scaleX(1) !important; }
}

/* focus visibility */
a:focus-visible, button:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--sage-400);
  outline-offset: 3px;
}
