/* ==============================================================
   Beauchef Inversiones — hoja de estilos
   Paleta: navy #1B2A4A · gold #B08D3E · fondo #FAF8F4
   ============================================================== */

:root {
  --navy: #1B2A4A;
  --navy-dark: #14203A;
  --gold: #B08D3E;
  --gold-light: #C9A75B;
  --gold-dark: #9A7A33;
  --bg: #FAF8F4;
  --bg-alt: #F2EEE5;
  --card: #FFFFFF;
  --border: #E7E1D4;
  --text: #1B2A4A;
  --text-soft: #4A5568;
  --error: #B4362E;
  --ok: #2F7A4D;
  --serif: 'Libre Baskerville', Georgia, serif;
  --sans: 'Source Sans 3', system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3 { font-family: var(--serif); line-height: 1.25; margin: 0; text-wrap: pretty; }
p { margin: 0; }
a { color: var(--gold); text-decoration: none; }
a:hover { color: var(--gold-dark); }
img { display: block; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--gold); color: #fff; padding: 10px 18px; font-weight: 600;
}
.skip-link:focus { left: 0; color: #fff; }

/* ---------- Utilidades ---------- */
.kicker {
  color: var(--gold); font-size: 13px; font-weight: 700;
  letter-spacing: 0.26em; margin: 0;
}
.kicker--light { color: var(--gold-light); letter-spacing: 0.3em; font-size: 14px; }
.rule { width: 72px; height: 4px; background: var(--gold); margin: 26px 0; }

.btn {
  display: inline-block; border-radius: 4px; cursor: pointer;
  font-family: var(--sans); font-size: 16px; font-weight: 600;
  padding: 14px 30px; letter-spacing: 0.02em; border: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.btn--gold { background: var(--gold); color: #fff; }
.btn--gold:hover { background: var(--gold-dark); color: #fff; }
.btn--ghost { border: 1px solid rgba(255,255,255,0.5); color: #fff; background: transparent; }
.btn--ghost:hover { border-color: var(--gold-light); color: var(--gold-light); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--gold); }
.btn--navy[disabled] { opacity: 0.6; cursor: wait; }
.btn--outline { background: transparent; border: 1px solid #D8D2C4; color: var(--text); }
.btn--outline:hover { border-color: var(--gold); color: var(--gold); }

[data-reveal] { opacity: 0; transform: translateY(26px); transition: opacity 0.6s ease, transform 0.6s ease; }
[data-reveal].is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  [data-reveal] { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); border-bottom: 1px solid rgba(255,255,255,0.15);
}
.nav__inner {
  max-width: 1160px; margin: 0 auto; padding: 12px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.nav__brand { display: flex; align-items: center; gap: 12px; color: #fff; }
.nav__brand:hover { color: #fff; }
.nav__logo {
  display: flex; width: 42px; height: 42px; background: #fff; border-radius: 6px;
  align-items: center; justify-content: center; overflow: hidden; flex: none;
}
.nav__logo img { width: 36px; height: 36px; object-fit: contain; }
.nav__name { display: flex; flex-direction: column; line-height: 1.1; }
.nav__name-main { font-family: var(--serif); font-size: 16px; letter-spacing: 0.04em; }
.nav__name-sub { font-size: 10.5px; letter-spacing: 0.28em; color: var(--gold-light); }
.nav__right { display: flex; align-items: center; gap: 18px; }
.nav__links { display: flex; align-items: center; gap: 26px; }
.nav__links a { color: rgba(255,255,255,0.85); font-size: 15px; font-weight: 500; }
.nav__links a:hover { color: var(--gold-light); }

.lang { display: flex; border: 1px solid rgba(255,255,255,0.35); border-radius: 4px; overflow: hidden; }
.lang button {
  padding: 5px 11px; font-size: 13px; font-weight: 600; border: none; cursor: pointer;
  background: transparent; color: rgba(255,255,255,0.75); font-family: var(--sans);
}
.lang button.is-active { background: var(--gold); color: #fff; }

.nav__burger {
  display: none; background: transparent; border: 1px solid rgba(255,255,255,0.35);
  border-radius: 4px; width: 44px; height: 44px; cursor: pointer;
  flex-direction: column; gap: 5px; align-items: center; justify-content: center;
}
.nav__burger span {
  display: block; width: 20px; height: 2px; background: #fff; border-radius: 2px;
  transition: transform 0.25s, opacity 0.25s;
}
.nav__burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__mobile { display: none; background: var(--navy-dark); border-top: 1px solid rgba(255,255,255,0.12); flex-direction: column; }
.nav__mobile a {
  color: #fff; font-size: 17px; font-weight: 600; padding: 16px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.nav__mobile a:last-child { border-bottom: none; }

/* ---------- Hero ---------- */
.hero { position: relative; background: var(--navy); overflow: hidden; }
.hero__bg {
  position: absolute; inset: 0;
  /* Reemplace por una fotografía corporativa: background-image: url('../assets/hero.jpg'); */
  background: linear-gradient(100deg, rgba(20,32,58,0.98) 0%, rgba(20,32,58,0.9) 45%, rgba(31,48,84,0.85) 100%);
  background-size: cover; background-position: center;
}
.hero__inner {
  position: relative; max-width: 1160px; margin: 0 auto;
  padding: clamp(64px, 12vw, 150px) 24px clamp(84px, 13vw, 170px);
  animation: fadeUp 0.7s ease both;
}
.hero h1 {
  color: #fff; font-weight: 700; margin-top: 18px;
  font-size: clamp(32px, 5.2vw, 60px); line-height: 1.15; max-width: 15ch;
}
.hero__sub { color: rgba(255,255,255,0.85); font-size: clamp(16px, 1.6vw, 20px); line-height: 1.6; max-width: 52ch; }
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 36px; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(26px); } to { opacity: 1; transform: translateY(0); } }

/* ---------- Misión / Visión ---------- */
.mv { position: relative; z-index: 2; max-width: 1160px; margin: -64px auto 0; padding: 0 24px; scroll-margin-top: 110px; }
.mv__card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  box-shadow: 0 24px 60px -24px rgba(27,42,74,0.35);
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); overflow: hidden;
}
.mv__col { padding: clamp(28px, 4vw, 52px); }
.mv__col--alt { border-top: 1px solid var(--border); background: #FBF9F5; }
.mv__col h2 { font-size: clamp(21px, 2.2vw, 27px); margin-top: 14px; }
.mv__col p:not(.kicker) { color: var(--text-soft); font-size: 16px; line-height: 1.7; margin-top: 16px; }

/* ---------- Sectores ---------- */
.sectores { max-width: 1160px; margin: 0 auto; padding: clamp(56px, 8vw, 110px) 24px; scroll-margin-top: 90px; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto; }
.section-head h2 { font-size: clamp(25px, 3vw, 36px); margin-top: 14px; }
.section-head__hint { color: var(--text-soft); font-size: 15.5px; margin-top: 12px; }
.sectores__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 22px; margin-top: 40px;
}
.sector-card {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  overflow: hidden; display: flex; flex-direction: column; cursor: pointer;
  text-align: left; padding: 0; font-family: var(--sans);
  transition: box-shadow 0.25s, transform 0.25s;
}
.sector-card:hover { box-shadow: 0 16px 38px -16px rgba(27,42,74,0.35); transform: translateY(-4px); }
.sector-card__img { height: 160px; overflow: hidden; background: #1B2A4A; }
.sector-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.sector-card:hover .sector-card__img img { transform: scale(1.04); }
.sector-card__body { padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.sector-card__num { color: var(--gold); font-family: var(--serif); font-size: 15px; }
.sector-card__body h3 { font-family: var(--sans); font-size: 19px; font-weight: 700; }
.sector-card__body p { color: var(--text-soft); font-size: 15px; line-height: 1.6; flex: 1; }
.sector-card__more { color: var(--gold); font-size: 14.5px; font-weight: 600; margin-top: 4px; }

/* ---------- Contacto ---------- */
.contacto { background: var(--bg-alt); border-top: 1px solid var(--border); scroll-margin-top: 90px; }
.contacto__inner {
  max-width: 1160px; margin: 0 auto; padding: clamp(56px, 8vw, 100px) 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: clamp(32px, 5vw, 72px);
}
.contacto__info h2 { font-size: clamp(25px, 3vw, 36px); margin-top: 14px; }
.contacto__info > p:not(.kicker) { color: var(--text-soft); font-size: 16px; line-height: 1.7; max-width: 44ch; margin-top: 16px; }
.contacto__data { display: flex; flex-direction: column; gap: 18px; margin: 32px 0 0; }
.contacto__data div { display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.contacto__data dt { color: var(--gold); font-weight: 700; font-size: 13px; letter-spacing: 0.16em; width: 86px; flex: none; }
.contacto__data dd { margin: 0; font-size: 16px; font-weight: 600; }
.contacto__data dd a { color: var(--text); }
.contacto__data dd a:hover { color: var(--gold); }

/* ---------- Formulario ---------- */
.form {
  background: var(--card); border: 1px solid var(--border); border-radius: 8px;
  padding: clamp(24px, 3vw, 40px); display: flex; flex-direction: column; gap: 16px; align-self: start;
}
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 600; }
.form input, .form textarea {
  border: 1px solid #D8D2C4; border-radius: 4px; padding: 12px 14px;
  font-size: 16px; background: #FBF9F5; font-family: var(--sans); resize: vertical;
}
.form input:focus, .form textarea:focus { outline: 2px solid var(--gold); outline-offset: 0; }
.form .is-invalid { border-color: var(--error); }
.form__error { color: var(--error); font-size: 13px; font-weight: 500; font-style: normal; display: none; }
.form__error.is-on { display: block; }
.form__fail { color: var(--error); font-size: 14px; font-weight: 600; display: none; }
.form__fail.is-on { display: block; }
.form__hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form--success { align-items: center; text-align: center; gap: 14px; animation: fadeUp 0.4s ease both; }
.form__check {
  width: 58px; height: 58px; border-radius: 50%; background: #EAF3EC; color: var(--ok);
  display: flex; align-items: center; justify-content: center; font-size: 26px; font-weight: 700;
}
.form--success h3 { font-size: 22px; }
.form--success p { color: var(--text-soft); font-size: 15.5px; line-height: 1.6; max-width: 38ch; }

/* ---------- Detalle de sector ---------- */
.detail-hero { background: var(--navy); }
.detail-hero__inner { max-width: 1160px; margin: 0 auto; padding: clamp(48px, 7vw, 90px) 24px clamp(56px, 8vw, 100px); }
.back-link { color: var(--gold-light); font-size: 14.5px; font-weight: 600; }
.back-link:hover { color: #fff; }
.detail-hero .kicker { margin-top: 26px; }
.detail-hero h1 { color: #fff; font-size: clamp(28px, 4vw, 46px); line-height: 1.2; max-width: 20ch; margin-top: 14px; }
.detail-hero .rule { margin-bottom: 0; width: 60px; margin-top: 22px; }
.detail-body {
  max-width: 1160px; margin: 0 auto; padding: clamp(44px, 6vw, 72px) 24px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: clamp(32px, 5vw, 64px);
}
.detail-body__text p { font-size: clamp(17px, 1.6vw, 19px); line-height: 1.75; }
.detail-body__text .btn { margin-top: 30px; }
.detail-points { background: var(--card); border: 1px solid var(--border); border-radius: 8px; padding: clamp(24px, 3vw, 36px); align-self: start; }
.detail-points ul { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.detail-points li { display: flex; gap: 12px; align-items: baseline; border-bottom: 1px solid #F0EBDF; padding-bottom: 14px; }
.detail-points li:last-child { border-bottom: none; padding-bottom: 0; }
.detail-points .n { color: var(--gold); font-family: var(--serif); font-size: 14px; flex: none; }
.detail-points .txt { font-size: 15.5px; line-height: 1.55; color: #37415A; }
.detail-others { max-width: 1160px; margin: 0 auto; padding: 0 24px clamp(56px, 7vw, 90px); }
.detail-others .kicker { margin-bottom: 16px; }
.chip-row { display: flex; gap: 14px; flex-wrap: wrap; }
.chip {
  border: 1px solid #D8D2C4; background: var(--card); border-radius: 6px;
  padding: 12px 18px; font-size: 15px; font-weight: 600; color: var(--text); cursor: pointer;
  font-family: var(--sans);
}
.chip:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Legal ---------- */
.legal-hero { background: var(--navy); }
.legal-hero__inner { max-width: 860px; margin: 0 auto; padding: clamp(40px, 6vw, 72px) 24px clamp(44px, 6vw, 80px); }
.legal-hero .kicker { margin-top: 26px; }
.legal-hero h1 { color: #fff; font-size: clamp(26px, 3.6vw, 42px); margin-top: 14px; }
.legal-hero__date { color: rgba(255,255,255,0.7); font-size: 14.5px; margin-top: 16px; }
.legal-body { max-width: 860px; margin: 0 auto; padding: clamp(36px, 5vw, 60px) 24px clamp(56px, 7vw, 90px); }
.legal-body__intro { color: #37415A; font-size: 16.5px; line-height: 1.75; }
.legal-body section { margin-top: clamp(26px, 3vw, 36px); }
.legal-body h2 { font-size: clamp(19px, 2vw, 23px); }
.legal-body section p { color: #37415A; font-size: 16px; line-height: 1.75; margin-top: 12px; white-space: pre-line; }
.legal-contact {
  margin-top: clamp(36px, 5vw, 52px); background: var(--bg-alt);
  border: 1px solid var(--border); border-radius: 8px; padding: clamp(22px, 3vw, 32px);
}
.legal-contact p { color: #37415A; font-size: 16px; line-height: 1.7; margin-top: 12px; }
.legal-contact a { font-weight: 600; }
.legal-others { margin-top: clamp(30px, 4vw, 44px); }

/* ---------- Footer ---------- */
.footer { background: var(--navy-dark); margin-top: auto; }
.footer__inner {
  max-width: 1160px; margin: 0 auto; padding: 26px 24px 10px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  color: rgba(255,255,255,0.75); font-size: 14px;
}
.footer__brand { display: flex; align-items: center; gap: 10px; }
.footer__logo {
  display: flex; width: 32px; height: 32px; background: #fff; border-radius: 4px;
  align-items: center; justify-content: center; overflow: hidden;
}
.footer__logo img { width: 27px; height: 27px; object-fit: contain; }
.footer__tag { color: rgba(255,255,255,0.45); font-size: 13.5px; }
.footer__legal {
  max-width: 1160px; margin: 12px auto 0; padding: 12px 24px 24px;
  display: flex; gap: 10px 24px; flex-wrap: wrap; border-top: 1px solid rgba(255,255,255,0.1);
}
.footer__legal a { color: rgba(255,255,255,0.6); font-size: 13.5px; }
.footer__legal a:hover { color: var(--gold-light); }

/* ---------- Vistas / transición ---------- */
.view-enter { animation: fadeUp 0.4s ease both; }

/* ---------- Responsive ---------- */
@media (max-width: 820px) {
  .nav__links { display: none; }
  .nav__burger { display: flex; }
  .nav__mobile.is-open { display: flex; }
}
