:root {
  --navy: #0f2340;
  --navy-deep: #0a1a30;
  --navy-soft: #1c3557;
  --gold: #b8975a;
  --gold-light: #d2b57f;
  --ink: #1d2733;
  --grey: #5d6875;
  --grey-line: #dde1e7;
  --grey-bg: #f3f4f6;
  --white: #ffffff;
  --radius: 6px;
  --shadow: 0 6px 24px rgba(15, 35, 64, 0.08);
  --shadow-lg: 0 14px 36px rgba(15, 35, 64, 0.16);
  --header-h: 72px;
  --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --sans: "Instrument Sans", "Segoe UI", Helvetica, Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  margin: 0;
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }
ul, ol { margin: 0; padding: 0; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }

h1, h2, h3 { font-family: var(--serif); color: var(--navy); line-height: 1.15; margin: 0 0 0.6em; }
h2 { font-size: clamp(2rem, 4vw, 2.75rem); font-weight: 600; }
h3 { font-size: 1.5rem; font-weight: 700; }
p { margin: 0 0 1em; }

.container { width: min(1120px, 100% - 2.5rem); margin-inline: auto; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  background: rgba(10, 26, 48, 0.94);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(184, 151, 90, 0.35);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled { box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25); }

.header-inner { height: 100%; display: flex; align-items: center; justify-content: space-between; }

.brand { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--white); }

/* ---------- Nuevos Estilos del Logo SVG ---------- */
.brand-logo {
  height: 46px; /* Altura ajustada para destacar tu ícono del caballo */
  width: auto;
  display: block;
}

.brand-name { font-family: var(--serif); font-size: 1.5rem; font-weight: 700; letter-spacing: 0.01em; }
.brand-name span { font-weight: 500; color: var(--gold-light); }

.main-nav ul { list-style: none; display: flex; align-items: center; gap: 2rem; }
.main-nav a {
  text-decoration: none; color: rgba(255, 255, 255, 0.85);
  font-size: 0.95rem; font-weight: 500;
  padding: 0.4rem 0; border-bottom: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}
.main-nav a:hover, .main-nav a.active { color: var(--white); border-bottom-color: var(--gold); }
.main-nav .nav-cta {
  padding: 0.55rem 1.2rem; border: 1px solid var(--gold); border-radius: var(--radius);
  color: var(--gold-light);
}
.main-nav .nav-cta:hover, .main-nav .nav-cta.active { background: var(--gold); color: var(--navy-deep); border-color: var(--gold); }

.nav-toggle {
  display: none; width: 44px; height: 44px; padding: 0;
  background: none; border: 0; cursor: pointer;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); transition: transform 0.25s, opacity 0.25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; cursor: pointer;
  padding: 0.95rem 2rem; border: 0; border-radius: var(--radius);
  font-family: var(--sans); font-size: 1rem; font-weight: 600; text-decoration: none;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-gold { background: var(--gold); color: var(--navy-deep); }
.btn-gold:hover { background: var(--gold-light); }
.btn-navy { background: var(--navy); color: var(--white); }
.btn-navy:hover { background: var(--navy-soft); }

/* ---------- Hero ---------- */
.hero {
  min-height: 100vh; min-height: 100svh;
  display: flex; align-items: center;
  padding: calc(var(--header-h) + 3rem) 0 4rem;
  color: var(--white);
  background:
    linear-gradient(115deg, transparent 0 58%, rgba(184, 151, 90, 0.10) 58% 58.3%, transparent 58.3%),
    linear-gradient(115deg, transparent 0 66%, rgba(184, 151, 90, 0.07) 66% 66.25%, transparent 66.25%),
    linear-gradient(160deg, var(--navy) 0%, var(--navy-deep) 100%);
}
.hero-inner { max-width: 820px; margin-inline: 0; }
.hero h1 {
  color: var(--white);
  font-size: clamp(2.4rem, 6.2vw, 4.5rem);
  font-weight: 600;
  margin-bottom: 0.45em;
}
.hero-sub {
  font-family: var(--serif); font-size: clamp(1.4rem, 3vw, 1.9rem); font-style: italic;
  color: var(--gold-light);
  margin-bottom: 2.2rem; padding-left: 1rem; border-left: 3px solid var(--gold);
}
.hero .container { margin-left: max(1.25rem, calc((100% - 1120px) / 2)); }

/* ---------- Sections ---------- */
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section-alt { background: var(--grey-bg); }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head p { color: var(--grey); }

.about { display: grid; grid-template-columns: 1fr 1.6fr; gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.about h2 { position: relative; padding-top: 1.4rem; }
.about h2::before { content: ""; position: absolute; top: 0; left: 0; width: 56px; height: 3px; background: var(--gold); }
.about-text { max-width: 640px; }
.lead { font-family: var(--serif); font-size: clamp(1.5rem, 2.8vw, 2rem); line-height: 1.3; color: var(--navy); font-weight: 600; }
.about-text p:not(.lead) { color: var(--grey); }

/* ---------- Cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.75rem; }
.card {
  background: var(--white);
  padding: 2.25rem 2rem;
  border-radius: var(--radius);
  border-top: 3px solid var(--grey-line);
  box-shadow: var(--shadow);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-top-color: var(--gold); }
.card-icon {
  width: 54px; height: 54px; margin-bottom: 1.4rem;
  display: grid; place-items: center;
  color: var(--gold); background: var(--navy); border-radius: var(--radius);
}
.card-icon svg { width: 28px; height: 28px; }
.card > p { color: var(--grey); }
.card ul { list-style: none; margin-top: 1.25rem; padding-top: 1.25rem; border-top: 1px solid var(--grey-line); }
.card li { position: relative; padding: 0.3rem 0 0.3rem 1.4rem; font-size: 0.97rem; }
.card li::before {
  content: ""; position: absolute; left: 0; top: 0.85em;
  width: 8px; height: 8px; background: var(--gold); transform: rotate(45deg);
}

/* ---------- Value ---------- */
.value { background: var(--navy); color: var(--white); }
.value h2 { color: var(--white); }
.value-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.value-copy p { color: rgba(255, 255, 255, 0.8); max-width: 520px; margin-bottom: 2rem; }
.value-steps { list-style: none; position: relative; padding-left: 2.25rem; }
.value-steps::before {
  content: ""; position: absolute; left: 7px; top: 8px; bottom: 8px; width: 2px;
  background: linear-gradient(var(--gold), rgba(184, 151, 90, 0.2));
}
.value-steps li {
  position: relative; margin-bottom: 1.25rem; padding: 1.5rem 1.75rem;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: var(--radius);
}
.value-steps li:last-child { margin-bottom: 0; }
.value-steps li::before {
  content: ""; position: absolute; left: -2.25rem; top: 1.85rem;
  width: 16px; height: 16px; background: var(--gold); border: 3px solid var(--navy); border-radius: 50%;
}
.value-steps h3 { color: var(--gold-light); font-size: 1.45rem; margin-bottom: 0.3em; }
.value-steps p { margin: 0; color: rgba(255, 255, 255, 0.78); font-size: 0.98rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-form { background: var(--white); padding: clamp(1.5rem, 4vw, 2.5rem); border-radius: var(--radius); box-shadow: var(--shadow); }
.field { margin-bottom: 1.25rem; }
.field label { display: block; margin-bottom: 0.4rem; font-size: 0.93rem; font-weight: 600; color: var(--navy); }
.field input, .field textarea {
  width: 100%; padding: 0.85rem 1rem;
  font: inherit; color: var(--ink);
  background: var(--grey-bg); border: 1px solid var(--grey-line); border-radius: var(--radius);
  transition: border-color 0.2s, background 0.2s, box-shadow 0.2s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field textarea:focus { outline: none; background: var(--white); border-color: var(--gold); box-shadow: 0 0 0 3px rgba(184, 151, 90, 0.25); }
.field.invalid input, .field.invalid textarea { border-color: #b3261e; }
.error { display: block; min-height: 1.2em; margin-top: 0.3rem; font-size: 0.87rem; color: #b3261e; }
.form-status { margin: 1rem 0 0; font-size: 0.97rem; color: var(--navy); }
.form-status.ok { color: #1f6b3a; }

.contact-info { background: var(--navy); color: var(--white); padding: clamp(1.75rem, 4vw, 2.5rem); border-radius: var(--radius); border-left: 4px solid var(--gold); box-shadow: var(--shadow); }
.contact-info dl { margin: 0; }
.contact-info dt { font-family: var(--serif); font-size: 1.25rem; font-weight: 700; color: var(--gold-light); margin-top: 1.5rem; }
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd { margin: 0.2rem 0 0; color: rgba(255, 255, 255, 0.88); overflow-wrap: anywhere; }
.contact-info a { text-decoration-color: var(--gold); text-underline-offset: 4px; }
.contact-info a:hover { color: var(--gold-light); }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-deep); color: rgba(255, 255, 255, 0.75); padding: 3.5rem 0 2rem; border-top: 3px solid var(--gold); }
.footer-mission { max-width: 640px; }
.footer-mission h3 { color: var(--gold-light); margin-bottom: 0.3em; }
.footer-mission p { color: rgba(255, 255, 255, 0.82); }
.copyright { margin: 2rem 0 0; padding-top: 1.5rem; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.9rem; }

/* ---------- Reveal (una sola entrada al cargar la sección de servicios) ---------- */
.js .cards .card { opacity: 0; transform: translateY(24px); }
.js .cards.visible .card { opacity: 1; transform: none; transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease, border-color 0.3s ease; }
.js .cards.visible .card:nth-child(2) { transition-delay: 0.12s; }
.js .cards.visible .card:nth-child(3) { transition-delay: 0.24s; }
.js .cards.visible .card:hover, .js .cards.visible .card:focus-visible { transform: translateY(-8px); transition-delay: 0s; }

/* ---------- Tablet ---------- */
@media (max-width: 1024px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .cards .card:last-child { grid-column: 1 / -1; }
  .about, .value-grid, .contact-grid { grid-template-columns: 1fr; }
  .about h2 { margin-bottom: 0.2em; }
}

/* ---------- Móvil ---------- */
@media (max-width: 760px) {
  :root { --header-h: 64px; }
  
  /* Se escala un poco el SVG en móviles para que quepa bien junto al texto */
  .brand-logo { height: 36px; }
  
  .brand-name { font-size: 1.3rem; }
  .nav-toggle { display: flex; }
  .main-nav {
    position: fixed; top: var(--header-h); left: 0; right: 0;
    background: var(--navy-deep);
    max-height: 0; overflow: hidden;
    transition: max-height 0.35s ease;
    border-bottom: 1px solid rgba(184, 151, 90, 0.35);
  }
  .main-nav.open { max-height: 420px; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; padding: 0.5rem 1.25rem 1.25rem; }
  .main-nav li a { display: block; padding: 0.9rem 0; border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .main-nav .nav-cta { margin-top: 0.75rem; text-align: center; border: 1px solid var(--gold); }
  .cards { grid-template-columns: 1fr; }
  .cards .card:last-child { grid-column: auto; }
  .hero { text-align: left; }
  .btn { width: 100%; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .js .cards .card { opacity: 1; transform: none; }
}