/* =========================================================
   Bercun & Asociados — Sitio web
   Paleta: azul marino + dorado · tipografía Playfair + Inter
   ========================================================= */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;500;600;700&family=Inter:wght@300;400;500;600&display=swap');

:root {
  --navy:         #0F2742;
  --navy-deep:    #081627;
  --navy-soft:    #1B3A5F;
  --navy-glass:   rgba(15, 39, 66, 0.92);
  --gold:         #C9A14A;
  --gold-soft:    #E0C387;
  --gold-deep:    #A8862F;
  --bone:         #F7F4EE;
  --paper:        #FFFFFF;
  --ink:          #14232E;
  --ink-soft:     #4A5562;
  --ink-mute:     #76808B;
  --line:         rgba(15, 39, 66, 0.12);
  --line-light:   rgba(255, 255, 255, 0.14);
  --shadow-sm:    0 1px 2px rgba(15, 39, 66, 0.06), 0 2px 8px rgba(15, 39, 66, 0.04);
  --shadow-md:    0 4px 12px rgba(15, 39, 66, 0.08), 0 12px 32px rgba(15, 39, 66, 0.06);
  --shadow-lg:    0 12px 32px rgba(15, 39, 66, 0.12), 0 32px 64px rgba(15, 39, 66, 0.08);

  --serif:        'Playfair Display', 'Times New Roman', Georgia, serif;
  --sans:         'Inter', -apple-system, 'Segoe UI', system-ui, sans-serif;

  --container:    1200px;
  --radius:       4px;
  --radius-lg:    8px;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: var(--navy); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--gold-deep); }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 500;
  color: var(--navy);
  letter-spacing: -0.005em;
  margin: 0 0 0.6em;
  line-height: 1.18;
}
h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.6rem); }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1em; color: var(--ink-soft); }

.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.site-header__inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header__logo {
  display: flex;
  align-items: center;
  color: var(--navy);
  height: 48px;
}
.site-header__logo svg { height: 48px; width: auto; }
.site-header__logo:hover { color: var(--navy); }

.site-nav {
  display: flex;
  gap: 6px;
  align-items: center;
}
.site-nav a {
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink);
  padding: 10px 16px;
  border-radius: var(--radius);
  position: relative;
}
.site-nav a:hover { color: var(--gold-deep); }
.site-nav a.is-active { color: var(--navy); }
.site-nav a.is-active::after {
  content: '';
  position: absolute;
  left: 16px; right: 16px; bottom: 4px;
  height: 1px;
  background: var(--gold);
}

.nav-toggle {
  display: none;
  background: none;
  border: 0;
  width: 40px; height: 40px;
  cursor: pointer;
  color: var(--navy);
}
.nav-toggle span {
  display: block;
  width: 22px; height: 2px;
  background: currentColor;
  margin: 5px auto;
  transition: transform .25s ease, opacity .25s ease;
}

@media (max-width: 820px) {
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    gap: 0;
    background: #fff;
    border-bottom: 1px solid var(--line);
    box-shadow: var(--shadow-md);
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: transform .25s ease, opacity .25s ease;
  }
  .site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  .site-nav a {
    width: 100%;
    padding: 16px 24px;
    border-bottom: 1px solid var(--line);
  }
  .site-nav a.is-active::after { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, var(--navy-soft) 100%);
  color: #fff;
  padding: clamp(80px, 12vw, 140px) 0 clamp(80px, 12vw, 140px);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 85% 15%, rgba(201, 161, 74, 0.18), transparent 45%),
    radial-gradient(circle at 10% 90%, rgba(201, 161, 74, 0.10), transparent 45%);
  pointer-events: none;
}
.hero__inner {
  position: relative;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.hero__inner--split {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.hero__content { min-width: 0; }
.hero__visual {
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__logo-frame {
  position: relative;
  width: 100%;
  max-width: 420px;
  aspect-ratio: 1 / 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.hero__logo-pulse {
  width: 78%;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  animation: hero-breathe 5.5s ease-in-out 1.6s infinite;
}
.hero__logo {
  width: 100%;
  height: auto;
  opacity: 0;
  transform: scale(0.85);
  filter: drop-shadow(0 14px 36px rgba(0,0,0,0.25));
  animation: hero-appear 1.2s cubic-bezier(.2,.7,.2,1) 0.3s forwards;
}
.hero__ring {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  animation: hero-ring-in 1.4s ease-out 0.6s forwards;
}
.hero__ring--outer {
  inset: 0;
  border: 1px solid rgba(224, 195, 135, 0.28);
}
.hero__ring--outer::before,
.hero__ring--outer::after {
  content: '';
  position: absolute;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--gold-soft);
  box-shadow: 0 0 12px rgba(224, 195, 135, 0.6);
}
.hero__ring--outer::before { top: -4px; left: 50%; transform: translateX(-50%); }
.hero__ring--outer::after  { bottom: -4px; left: 50%; transform: translateX(-50%); }
.hero__ring--inner {
  inset: 12%;
  border: 1px dashed rgba(224, 195, 135, 0.18);
  animation-delay: 0.85s;
}

@keyframes hero-appear {
  0%   { opacity: 0; transform: scale(0.85); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes hero-breathe {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.035); }
}
@keyframes hero-ring-in {
  0%   { opacity: 0; }
  100% { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .hero__logo, .hero__logo-pulse, .hero__ring { animation: none; opacity: 1; transform: none; }
}

@media (max-width: 900px) {
  .hero__inner--split {
    grid-template-columns: 1fr;
    gap: 32px;
    text-align: left;
  }
  .hero__visual { order: -1; }
  .hero__logo-frame { max-width: 240px; }
}
.hero__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--gold);
}
.hero h1 {
  color: #fff;
  max-width: 18ch;
  font-weight: 400;
}
.hero h1 em {
  font-style: italic;
  color: var(--gold-soft);
  font-weight: 400;
}
.hero__lede {
  font-size: 1.12rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.78);
  max-width: 56ch;
  margin: 28px 0 36px;
}
.hero__cta {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}

/* ---------- Page header (for inner pages) ---------- */
.page-head {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 100%);
  color: #fff;
  padding: clamp(60px, 9vw, 110px) 0 clamp(56px, 8vw, 96px);
  position: relative;
  overflow: hidden;
}
.page-head::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle at 90% 20%, rgba(201, 161, 74, 0.16), transparent 50%);
  pointer-events: none;
}
.page-head__inner { position: relative; max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.page-head__eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-soft);
  margin-bottom: 18px;
}
.page-head h1 { color: #fff; margin: 0 0 18px; font-weight: 400; }
.page-head p { color: rgba(255, 255, 255, 0.78); max-width: 60ch; font-size: 1.05rem; margin: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--sans);
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all .25s ease;
}
.btn--gold {
  background: var(--gold);
  color: var(--navy-deep);
  border-color: var(--gold);
}
.btn--gold:hover { background: var(--gold-soft); border-color: var(--gold-soft); color: var(--navy-deep); }
.btn--ghost {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.4);
}
.btn--ghost:hover { background: rgba(255, 255, 255, 0.08); color: #fff; border-color: #fff; }
.btn--navy {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}
.btn--navy:hover { background: var(--navy-deep); border-color: var(--navy-deep); color: #fff; }

/* ---------- Sections ---------- */
.section { padding: clamp(70px, 9vw, 110px) 0; }
.section--bone { background: var(--bone); }
.section--navy { background: var(--navy); color: #fff; }

.section__head { max-width: 720px; margin: 0 auto 60px; text-align: center; }
.section__head .eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 16px;
}
.section--navy .section__head .eyebrow { color: var(--gold-soft); }
.section--navy .section__head h2 { color: #fff; }
.section--navy .section__head p { color: rgba(255, 255, 255, 0.75); }
.section__head h2 { margin: 0 0 16px; }
.section__head p { font-size: 1.05rem; color: var(--ink-soft); margin: 0; }

/* Decorative gold rule */
.gold-rule {
  display: inline-block;
  width: 48px;
  height: 1px;
  background: var(--gold);
  margin: 0 0 24px;
  vertical-align: middle;
}

/* ---------- Pillars (home: por qué nos elegirías) ---------- */
.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.pillar {
  padding: 36px 28px;
  border-top: 2px solid var(--gold);
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: transform .3s ease, box-shadow .3s ease;
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.pillar h3 { color: var(--navy); margin: 0 0 12px; }
.pillar p { margin: 0; color: var(--ink-soft); font-size: 0.96rem; }
.pillar__num {
  font-family: var(--serif);
  font-size: 0.9rem;
  font-style: italic;
  color: var(--gold-deep);
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: block;
}
@media (max-width: 820px) { .pillars { grid-template-columns: 1fr; gap: 20px; } }

/* ---------- Areas grid ---------- */
.areas-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.area-card {
  padding: 36px 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: all .3s ease;
  position: relative;
  overflow: hidden;
}
.area-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--gold);
  transform: scaleY(0);
  transform-origin: top;
  transition: transform .35s ease;
}
.area-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: transparent;
}
.area-card:hover::before { transform: scaleY(1); }
.area-card__icon {
  width: 44px; height: 44px;
  color: var(--gold-deep);
  margin-bottom: 18px;
}
.area-card h3 {
  font-size: 1.15rem;
  font-weight: 500;
  margin: 0 0 12px;
  color: var(--navy);
}
.area-card p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
  line-height: 1.6;
}
@media (max-width: 980px) { .areas-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .areas-grid { grid-template-columns: 1fr; } }

/* ---------- Profesionales ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 36px;
}
.team-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}
.team-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.avatar {
  aspect-ratio: 1 / 1;
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy-soft) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-soft);
  font-family: var(--serif);
  font-size: clamp(3.5rem, 8vw, 5rem);
  letter-spacing: 0.04em;
  position: relative;
  overflow: hidden;
}
.avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 75% 20%, rgba(201, 161, 74, 0.18), transparent 55%);
  pointer-events: none;
}
.avatar--photo {
  background: #F7F4EE;
  padding: 0;
}
.avatar--photo::after { display: none; }
.avatar--photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.team-card__body { padding: 28px; flex: 1; display: flex; flex-direction: column; }
.team-card__title {
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--gold-deep);
  margin-bottom: 8px;
}
.team-card h3 {
  font-size: 1.35rem;
  margin: 0 0 6px;
  font-weight: 500;
  color: var(--navy);
}
.team-card__role {
  font-family: var(--sans);
  font-size: 0.92rem;
  color: var(--ink-mute);
  margin-bottom: 18px;
  font-style: italic;
}
.team-card__bio {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}
.team-card__bio em {
  color: var(--ink-mute);
  font-style: italic;
}

@media (max-width: 980px) { .team-grid { grid-template-columns: 1fr; gap: 24px; max-width: 480px; margin: 0 auto; } }

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: 60px;
  align-items: start;
}
@media (max-width: 900px) { .contact-grid { grid-template-columns: 1fr; gap: 40px; } }

.contact-info h3 {
  font-size: 0.85rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-family: var(--sans);
  font-weight: 600;
  color: var(--gold-deep);
  margin: 0 0 12px;
}
.contact-block { padding: 22px 0; border-top: 1px solid var(--line); }
.contact-block:first-of-type { border-top: 0; padding-top: 0; }
.contact-block__label {
  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-mute);
  margin-bottom: 8px;
}
.contact-block__value {
  font-family: var(--serif);
  font-size: 1.15rem;
  color: var(--navy);
  margin: 0;
}
.contact-block__value a { color: var(--navy); }
.contact-block__value a:hover { color: var(--gold-deep); }

.contact-form {
  background: #fff;
  padding: 40px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.contact-form h3 {
  margin: 0 0 24px;
  color: var(--navy);
  font-size: 1.4rem;
}
.field { margin-bottom: 20px; }
.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--ink);
  margin-bottom: 8px;
}
.field input, .field textarea, .field select {
  width: 100%;
  padding: 12px 14px;
  font-family: var(--sans);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bone);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s ease, background .2s ease;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--gold);
  background: #fff;
}
.field textarea { resize: vertical; min-height: 120px; }
.contact-form .btn { width: 100%; justify-content: center; }

.map-frame {
  margin-top: 28px;
  width: 100%;
  height: 280px;
  border: 0;
  border-radius: var(--radius);
  filter: grayscale(0.2) contrast(1.05);
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--navy-deep);
  color: rgba(255, 255, 255, 0.72);
  padding: 64px 0 32px;
  font-size: 0.92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr; gap: 36px; } }
.site-footer h4 {
  color: var(--gold-soft);
  font-family: var(--sans);
  font-size: 0.78rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  font-weight: 600;
  margin: 0 0 18px;
}
.site-footer p { color: rgba(255, 255, 255, 0.7); margin: 0 0 8px; }
.site-footer a { color: rgba(255, 255, 255, 0.85); }
.site-footer a:hover { color: var(--gold-soft); }
.footer-logo { color: #fff; height: 64px; margin-bottom: 18px; display: inline-block; }
.footer-logo svg { height: 64px; width: auto; }
.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 10px; }

.footer-bottom {
  border-top: 1px solid var(--line-light);
  padding-top: 28px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.84rem;
  color: rgba(255, 255, 255, 0.55);
}

/* ---------- Utilities & animations ---------- */
.fade-up {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .8s ease, transform .8s ease;
}
.fade-up.is-visible { opacity: 1; transform: translateY(0); }

::selection { background: var(--gold); color: var(--navy-deep); }
