/* ================================================================
   KF LEGAL — Styles
   Palette: navy #314D69 (KF blue) / cream #F7F4F0 / peach badge #E0BAA5
   ================================================================ */

:root {
  --navy: #314D69;
  --navy-dark: #233a52;
  --navy-deep: #1a2c3f;
  --navy-light: #4a6788;
  --cream: #F7F4F0;
  --cream-2: #efeae3;
  --peach: #E0BAA5;
  --paper: #ffffff;
  --ink: #1A2330;
  --ink-soft: #5a6878;
  --rule: rgba(49, 77, 105, 0.12);

  --serif: "Myriad Pro", "Source Sans 3", Arial, sans-serif;
  --sans:  "Myriad Pro", "Source Sans 3", Arial, sans-serif;

  --shadow-soft: 0 8px 32px rgba(26, 35, 48, 0.06);
  --shadow-card: 0 18px 50px rgba(26, 35, 48, 0.08);

  --header-h: 84px;
  --container-max: 1200px;
  --gutter: clamp(20px, 4vw, 56px);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--paper);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

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

/* ============================== HEADER ============================== */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: border-color .3s ease;
}
.site-header.is-scrolled {
  border-bottom-color: rgba(255,255,255,0.14);
}

.header-inner {
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  gap: clamp(16px, 4vw, 48px);
  min-height: var(--header-h);
}

.brand {
  display: flex; align-items: center; gap: 14px;
  flex-shrink: 0;
}
.brand-logo {
  display: inline-flex;
  width: 48px; height: 48px;
  background: rgba(224, 186, 165, 0.3);
  border-radius: 10px;
  padding: 5px;
  align-items: center; justify-content: center;
  transition: background .3s ease, transform .3s ease;
}
.brand-logo img { width: 100%; height: 100%; object-fit: contain; }
.brand:hover .brand-logo { background: rgba(224, 186, 165, 0.5); transform: translateY(-1px); }
.brand-text {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: 0.16em;
  font-size: 0.95rem;
  color: #fff;
  text-transform: uppercase;
}

.nav-main { flex: 1; }
.nav-main ul {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  gap: 0;
  justify-content: center;
  align-items: center;
}
.nav-main li {
  display: flex;
  align-items: center;
}
.nav-main li + li::before {
  content: "/";
  color: rgba(255,255,255,0.35);
  font-size: 0.75rem;
  padding: 0 clamp(6px, 1.2vw, 14px);
  pointer-events: none;
}
.nav-main a {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.9);
  font-weight: 500;
  padding: 8px 2px;
  position: relative;
  white-space: nowrap;
  transition: color .25s ease;
}
.nav-main a::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: 2px;
  height: 1px;
  background: rgba(255, 255, 255, 0.9);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .35s cubic-bezier(.2,.7,.2,1);
}
.nav-main a:hover::after,
.nav-main a.is-active::after { transform: scaleX(1); }

.lang-switch {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.78rem; letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.9);
}
.lang-switch button {
  background: none; border: 0;
  padding: 6px 4px;
  color: rgba(255, 255, 255, 0.9);
  opacity: 0.55;
  letter-spacing: inherit;
  font-weight: 500;
  text-transform: uppercase;
  transition: opacity .2s ease;
}
.lang-switch button:hover { opacity: 0.85; }
.lang-switch button.is-active { opacity: 1; font-weight: 600; }
.lang-switch span { opacity: 0.4; }

/* mobile menu toggle */
.menu-toggle {
  display: none;
  background: none; border: 0;
  width: 40px; height: 40px;
  flex-direction: column; justify-content: center; align-items: center;
  gap: 5px;
  margin-left: auto;
}
.menu-toggle span {
  display: block;
  width: 22px; height: 1.5px;
  background: #fff;
  transition: transform .3s ease, opacity .3s ease;
}
.menu-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.is-open span:nth-child(2) { opacity: 0; }
.menu-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================== HERO ============================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--navy-deep);
  padding-top: var(--header-h);
}

/* Hero background photo */
.hero-photo {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}
.hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}
.hero-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(20, 30, 45, 0.58);
}
.hero-bg {
  position: absolute; inset: 0; z-index: 0;
  pointer-events: none;
}
.hero-orb {
  position: absolute;
  right: -10%;
  bottom: -12%;
  width: 65vw;
  height: 65vw;
  max-width: 900px;
  max-height: 900px;
  border-radius: 50%;
  background: radial-gradient(
    circle at 30% 30%,
    rgba(49, 77, 105, 0.42) 0%,
    rgba(49, 77, 105, 0.22) 30%,
    rgba(49, 77, 105, 0.05) 65%,
    rgba(49, 77, 105, 0) 100%
  );
  filter: blur(20px);
  animation: orbFloat 22s ease-in-out infinite;
}
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(-30px, -20px) scale(1.06); }
}

.hero-inner {
  position: relative; z-index: 1;
  max-width: var(--container-max);
  margin: 0 auto;
  width: 100%;
  padding: 60px var(--gutter) 80px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: calc(100vh - var(--header-h));
  gap: 40px;
}

/* Logo box + firm name (top of hero) */
.hero-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 12px;
}
.hero-logo-box {
  width: clamp(100px, 14vw, 170px);
  height: clamp(100px, 14vw, 170px);
  background: transparent;
  padding: 0;
  border-radius: 0;
  box-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero-logo-box img {
  width: 100%; height: 100%;
  object-fit: contain;
}
.hero-firm-name {
  display: block;
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1rem, 1.8vw, 1.35rem);
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 0.42em;
  text-indent: 0.42em; /* compensa el espacio final del letter-spacing */
  white-space: nowrap;
  text-align: left;
}

/* Tagline (bottom of hero) */
.hero-text { min-width: 0; }

.hero-tagline {
  font-family: var(--sans);
  font-weight: 700;
  font-style: normal;
  font-size: clamp(1.1rem, 2.2vw, 2rem);
  line-height: 1.12;
  letter-spacing: 0.1em;
  margin: 0 0 14px 0;
  color: #fff;
  text-transform: uppercase;
}
.hero-tagline span { display: block; }

.hero-sub {
  font-family: var(--sans);
  font-size: clamp(0.72rem, 1vw, 0.84rem);
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.68);
  margin: 0;
  font-weight: 400;
  line-height: 1.5;
}

/* ============================== SECTIONS ============================== */
.section {
  padding: clamp(80px, 12vw, 160px) 0;
  position: relative;
}
.section-nosotras { background: var(--paper); }
.section-valores  { background: var(--cream); }
.section-areas    { background: var(--paper); }
.section-sectores { background: var(--cream); }
.section-clientes { background: var(--paper); }
.section-contacto { background: var(--navy); color: #fff; }

.section-head { margin-bottom: clamp(48px, 6vw, 80px); text-align: center; }
.kicker {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 14px;
  font-weight: 500;
}
.section-contacto .kicker { color: rgba(255,255,255,0.55); }
.section-title {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(2.5rem, 5.5vw, 4.5rem);
  line-height: 1;
  margin: 0;
  color: var(--navy);
  letter-spacing: 0.02em;
}
.section-contacto .section-title { color: #fff; }

/* Brand variant: used when the section title is the firm name itself */
.section-title-brand {
  font-style: normal;
  letter-spacing: 0.08em;
  font-weight: 500;
}

.section-lead {
  margin: 24px auto 0;
  max-width: 720px;
  font-family: var(--sans);
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.55;
  letter-spacing: 0.005em;
  color: var(--ink-soft);
  font-weight: 400;
}
.section-contacto .section-lead { color: rgba(255,255,255,0.7); }

/* ---------- Nosotras ---------- */
.nosotras-hero {
  margin: 0 auto clamp(48px, 6vw, 80px);
  max-width: 1000px;
}
.nosotras-hero figure {
  margin: 0;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: var(--shadow-card);
}
.nosotras-hero img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
}

.nosotras-text {
  max-width: 740px;
  margin: 0 auto;
  font-size: clamp(1.05rem, 1.4vw, 1.18rem);
  line-height: 1.78;
  color: var(--ink);
  text-align: justify;
}
.nosotras-text p { margin: 0 0 1.2em 0; }
.nosotras-text p:last-child { margin-bottom: 0; }
.nosotras-text em { color: var(--navy); font-style: italic; }

.partners {
  margin-top: clamp(80px, 10vw, 130px);
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(48px, 6vw, 96px);
}
@media (min-width: 880px) {
  .partners { grid-template-columns: 1fr 1fr; }
}
.partner {
  display: flex; flex-direction: column;
  gap: 24px;
}
.partner-photo {
  aspect-ratio: 4/5;
  overflow: hidden;
  border-radius: 4px;
  background: var(--cream-2);
  box-shadow: var(--shadow-soft);
}
.partner-photo img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s ease;
}
.partner:hover .partner-photo img { transform: scale(1.03); }

.partner-name {
  font-family: var(--sans);
  font-style: normal;
  font-weight: 700;
  font-size: clamp(1.6rem, 2.5vw, 2.2rem);
  line-height: 1.1;
  color: var(--navy);
  margin: 0 0 8px 0;
  letter-spacing: 0.04em;
}
.partner-role {
  font-size: 0.78rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 16px 0;
  font-weight: 500;
}
.partner-bio {
  font-size: 1rem;
  line-height: 1.72;
  color: var(--ink);
  margin: 0;
  text-align: justify;
}
.partner-bio p { margin: 0 0 0.85em; }
.partner-bio p:last-child { margin-bottom: 0; }

.ambient-photo {
  margin: clamp(80px, 10vw, 130px) auto 0;
  max-width: 1100px;
}
.ambient-photo img {
  width: 100%;
  aspect-ratio: 3/2;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: var(--shadow-card);
}
.ambient-photo figcaption {
  margin-top: 18px;
  text-align: center;
  font-family: var(--serif);
  font-style: italic;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  color: var(--ink-soft);
}

/* ---------- Valores ---------- */
.valores-grid {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(8px, 1.5vw, 18px) clamp(10px, 1.8vw, 22px);
  text-align: center;
}
.valor {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.4rem, 3vw, 2.4rem);
  color: var(--navy);
  line-height: 1.1;
  white-space: nowrap;
}
.valor-plus, .valor-equals {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(1.2rem, 2.5vw, 2rem);
  color: var(--peach);
  line-height: 1;
}
.valor-equals { margin-left: 6px; }
.valor-logo {
  display: inline-flex;
  width: clamp(80px, 9vw, 130px);
  height: clamp(80px, 9vw, 130px);
  margin-left: 4px;
  background: rgba(224, 186, 165, 0.35);
  border-radius: 16px;
  padding: 8px;
}
.valor-logo img { width: 100%; height: 100%; object-fit: contain; }

/* ---------- Bullet grid (Áreas / Sectores) ---------- */
.bullet-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px clamp(24px, 4vw, 56px);
  max-width: 980px;
  margin-inline: auto;
}
@media (min-width: 640px) { .bullet-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .bullet-grid { grid-template-columns: 1fr 1fr 1fr; } }

.bullet-grid li {
  padding: 14px 0;
  font-size: clamp(1rem, 1.3vw, 1.1rem);
  line-height: 1.4;
  color: var(--ink);
  border-bottom: 1px solid var(--rule);
  letter-spacing: 0.005em;
  text-align: center;
}
.bullet-grid li::before {
  content: "— ";
  color: var(--navy);
}

/* ---------- Clientes ---------- */
.logo-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(20px, 2.5vw, 40px);
  align-items: center;
}
@media (min-width: 540px) { .logo-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 768px) { .logo-grid { grid-template-columns: repeat(4, 1fr); } }
@media (min-width: 1024px){ .logo-grid { grid-template-columns: repeat(5, 1fr); } }

.logo-cell {
  aspect-ratio: 16/9;
  display: flex; align-items: center; justify-content: center;
  padding: 14px;
  background: #ffffff;
  border: none;
  border-radius: 4px;
}
.logo-cell img {
  max-width: 88%;
  max-height: 80%;
  object-fit: contain;
  filter: none;
}

/* ---------- Contacto ---------- */
.section-contacto {
  background:
    radial-gradient(at 15% 90%, rgba(224, 186, 165, 0.08) 0%, rgba(224, 186, 165, 0) 50%),
    radial-gradient(at 85% 10%, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0) 50%),
    var(--navy);
}
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(40px, 6vw, 80px);
  max-width: 1000px;
  margin: 0 auto;
}
@media (min-width: 880px) {
  .contacto-grid { grid-template-columns: 1fr 1.2fr; align-items: start; }
}

.contacto-info {
  padding-top: 8px;
}
.contacto-info p {
  margin: 0 0 28px 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.contacto-label {
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}
.contacto-value {
  font-family: var(--sans);
  font-style: normal;
  font-size: clamp(1.1rem, 2vw, 1.5rem);
  color: #fff;
  line-height: 1.4;
  font-weight: 400;
}
a.contacto-value { transition: color .25s ease; border-bottom: 1px solid rgba(255,255,255,0.25); padding-bottom: 2px; align-self: flex-start; }
a.contacto-value:hover { color: var(--peach); border-bottom-color: var(--peach); }

.contacto-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-size: 0.72rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.65);
  font-weight: 500;
}
.field input,
.field textarea {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid rgba(255,255,255,0.25);
  color: #fff;
  font: inherit;
  font-family: var(--sans);
  font-size: 1rem;
  padding: 10px 0;
  transition: border-color .25s ease;
}
.field input:focus,
.field textarea:focus {
  outline: none;
  border-bottom-color: var(--peach);
}
.field textarea { resize: vertical; min-height: 100px; font-family: var(--sans); }

.honey { position: absolute; left: -9999px; }

.btn-primary {
  align-self: flex-start;
  background: var(--peach);
  color: var(--navy);
  border: 0;
  padding: 16px 38px;
  font-family: var(--sans);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  border-radius: 999px;
  transition: transform .25s ease, background .25s ease, box-shadow .25s ease;
  margin-top: 12px;
}
.btn-primary:hover {
  background: #f3d1bd;
  transform: translateY(-2px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
}
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.form-status {
  margin: 8px 0 0;
  font-size: 0.95rem;
  min-height: 1.4em;
}
.form-status.is-success { color: var(--peach); }
.form-status.is-error { color: #ffb3a0; }

/* ============================== FOOTER ============================== */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255,255,255,0.7);
  padding: 36px 0;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.footer-inner {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer-brand {
  display: flex; align-items: center; gap: 12px;
  color: rgba(255,255,255,0.85);
}
.footer-brand img {
  width: 38px; height: 38px;
  background: rgba(224, 186, 165, 0.18);
  border-radius: 8px;
  padding: 4px;
}
.footer-brand span {
  font-family: var(--sans);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.95rem;
}
.footer-copy {
  margin: 0;
  font-size: 0.82rem;
  letter-spacing: 0.04em;
}

/* ============================== REVEAL ANIMATION ============================== */
.reveal {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity .9s cubic-bezier(.2,.7,.2,1), transform .9s cubic-bezier(.2,.7,.2,1);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .hero-orb { animation: none; }
  .hero-scroll span { animation: none; }
  html { scroll-behavior: auto; }
}

/* ============================== MOBILE ============================== */
@media (max-width: 880px) {
  .menu-toggle { display: flex; }
  .nav-main {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid var(--rule);
    padding: 24px 0;
    transform: translateY(-130%);
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .25s ease, visibility 0s linear .35s;
    flex: none;
    z-index: 150;
    box-shadow: 0 12px 24px rgba(26, 35, 48, 0.08);
    will-change: transform;
  }
  .nav-main.is-open {
    transform: translateY(0);
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transition: transform .35s cubic-bezier(.2,.7,.2,1), opacity .25s ease, visibility 0s linear 0s;
  }
  .nav-main ul {
    flex-direction: column;
    gap: 4px;
    align-items: stretch;
  }
  .nav-main a {
    display: block;
    padding: 14px var(--gutter);
    text-align: center;
  }
  .lang-switch { order: 3; margin-left: auto; }
  .brand-text { display: none; }
}

@media (max-width: 520px) {
  .hero-orb { right: -30%; bottom: -20%; }
  .hero-scroll { display: none; }
}
