/* ============================================================
   Search Consultores — styles.css
   Editorial system: paper ground, pine surfaces, brass accents.
   Sharp corners throughout; brass reserved for seal, rules,
   numerals and focus rings.
   ============================================================ */

:root {
  --paper:      #F5F3EC;
  --ink:        #14251F;
  --pine:       #164B3D;
  --pine-deep:  #0D322A;
  --brass:      #A8822F;
  --brass-soft: #C9A24B;
  --stone:      #55645B;
  --line:       #D9D4C5;
  --white:      #FCFBF7;

  --font-display: "Spectral", Georgia, "Times New Roman", serif;
  --font-body:    "Archivo", "Segoe UI", Helvetica, Arial, sans-serif;

  --wrap: 74rem;
  --gutter: clamp(1.15rem, 4vw, 3rem);
  --rule: 1px solid var(--line);

  /* Vertical rhythm */
  --sp-1: 0.75rem;
  --sp-2: 1.25rem;
  --sp-3: 2rem;
  --sp-4: 3.25rem;
  --sp-5: 5rem;
}

/* ---------- Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

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

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }
ul, ol, dl, dd, figure, blockquote, address { margin: 0; padding: 0; }
address { font-style: normal; }

:focus-visible {
  outline: 3px solid var(--brass);
  outline-offset: 3px;
  border-radius: 1px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--pine-deep);
  color: var(--white);
  padding: 0.6rem 1rem;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

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

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.01em;
  padding: 0.82rem 1.5rem;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}

.btn--solid {
  background: var(--pine);
  color: var(--white);
}
.btn--solid:hover { background: var(--pine-deep); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--ghost:hover { background: var(--ink); color: var(--paper); }

.link-arrow {
  display: inline-block;
  font-weight: 600;
  color: var(--pine);
  text-decoration: underline;
  text-decoration-color: var(--brass);
  text-decoration-thickness: 2px;
  text-underline-offset: 4px;
}
.link-arrow:hover { color: var(--pine-deep); }

/* ---------- Header ---------- */
.hdr {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(245, 243, 236, 0.94);
  backdrop-filter: blur(6px);
  border-bottom: var(--rule);
}

.hdr__in {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 4.5rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--ink);
  text-decoration: none;
  margin-right: auto;
}
.brand__seal { width: 34px; height: 34px; color: var(--brass); flex: none; }
.brand__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
  line-height: 1;
}
.brand__sub {
  display: block;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  color: var(--stone);
  margin-top: 0.28rem;
}

.nav__list {
  display: flex;
  gap: clamp(1rem, 2.4vw, 1.9rem);
  list-style: none;
}
.nav__link {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.97rem;
  padding-block: 0.4rem;
  border-bottom: 2px solid transparent;
  transition: border-color 140ms ease;
}
.nav__link:hover { border-bottom-color: var(--brass); }

.burger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  padding: 0 10px;
  background: none;
  border: 1px solid var(--line);
  cursor: pointer;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--ink);
  transition: transform 180ms ease, opacity 180ms ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  padding-block: clamp(var(--sp-4), 7vh, var(--sp-5)) var(--sp-4);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(var(--sp-3), 5vw, var(--sp-5));
  align-items: end;
}

.hero__meta {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  font-weight: 600;
  font-size: 0.86rem;
  letter-spacing: 0.06em;
  color: var(--stone);
  padding-bottom: var(--sp-2);
  margin-bottom: var(--sp-2);
  border-bottom: 2px solid var(--brass);
  max-width: 30ch;
}

.hero__title {
  font-size: clamp(2.5rem, 5.6vw, 4.35rem);
  letter-spacing: -0.015em;
  max-width: 15ch;
}

.hero__lead {
  margin-top: var(--sp-2);
  max-width: 46ch;
  color: var(--stone);
  font-size: 1.1rem;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-1);
  margin-top: var(--sp-3);
}

.hero__media {
  position: relative;
}
.hero__media img {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  filter: saturate(0.88);
}
/* Offset brass frame — the single ornamental gesture of the page */
.hero__media::after {
  content: "";
  position: absolute;
  inset: 1.1rem -1.1rem -1.1rem 1.1rem;
  border: 1px solid var(--brass);
  pointer-events: none;
}

/* Fact strip */
.facts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin-top: clamp(var(--sp-4), 6vh, var(--sp-5));
  border-top: 2px solid var(--ink);
}
.fact {
  padding: var(--sp-2) var(--sp-2) 0 0;
  border-right: var(--rule);
  padding-left: var(--sp-2);
}
.fact:first-child { padding-left: 0; }
.fact:last-child  { border-right: 0; }
.fact dt {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brass);
  margin-bottom: 0.3rem;
}
.fact dd {
  font-family: var(--font-display);
  font-size: 1.28rem;
  font-weight: 500;
  line-height: 1.25;
}

/* ---------- Band (manifiesto) ---------- */
.band {
  background: var(--pine);
  color: var(--white);
}
.band__grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(var(--sp-3), 5vw, var(--sp-5));
  padding-block: var(--sp-5);
  align-items: start;
}
.band__claim {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 3.6vw, 2.9rem);
  font-weight: 500;
  line-height: 1.2;
  text-wrap: balance;
}
.band__text {
  display: grid;
  gap: var(--sp-2);
  color: #D8DED6;
  padding-top: 0.5rem;
}
.band__strip { border-top: 1px solid rgba(255,255,255,0.14); }
.band__strip img {
  width: 100%;
  height: clamp(220px, 32vw, 380px);
  object-fit: cover;
  filter: saturate(0.7) brightness(0.82);
}

/* ---------- Section commons ---------- */
.sec { padding-block: var(--sp-5); }

.sec__title {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  max-width: 24ch;
}
.sec__head { margin-bottom: var(--sp-4); }
.sec__head--onDark .sec__title { color: var(--white); }

/* Firma + timeline */
.firm__intro {
  columns: 2;
  column-gap: var(--sp-4);
  max-width: 62ch;
  color: var(--stone);
  margin-bottom: var(--sp-4);
}
.firm__intro p { break-inside: avoid; margin-bottom: var(--sp-2); }

.tl {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 2px solid var(--ink);
  counter-reset: none;
}
.tl__item {
  border-right: var(--rule);
  padding: var(--sp-2) var(--sp-2) 0;
}
.tl__item:last-child { border-right: 0; }
.tl__year {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--brass);
  display: block;
  margin-bottom: 0.4rem;
}
.tl__text { font-size: 0.96rem; color: var(--stone); line-height: 1.55; }

/* ---------- Servicios: índice expandible ---------- */
.sec--svc {
  background: var(--white);
  border-block: var(--rule);
}

.svc-layout {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 8fr);
  gap: clamp(var(--sp-3), 5vw, var(--sp-5));
  align-items: start;
}

.svc-rail { position: sticky; top: 6.5rem; }
.svc-rail__note {
  margin-top: var(--sp-2);
  color: var(--stone);
  font-size: 0.98rem;
  max-width: 30ch;
}
.svc-rail .link-arrow { margin-top: var(--sp-2); }

.svc { border-bottom: var(--rule); }
.svc:first-child { border-top: 2px solid var(--ink); }

.svc__h { margin: 0; }
.svc__head {
  width: 100%;
  display: flex;
  align-items: baseline;
  gap: var(--sp-2);
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  padding: var(--sp-2) 0;
  font-family: inherit;
  color: var(--ink);
  transition: background-color 140ms ease;
}
.svc__head:hover { background: rgba(168, 130, 47, 0.07); }

.svc__idx {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--brass);
  min-width: 2.2rem;
}

.svc__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.3rem, 2.2vw, 1.7rem);
  line-height: 1.2;
}

.svc__toggle {
  position: relative;
  margin-left: auto;
  width: 18px;
  height: 18px;
  flex: none;
  align-self: center;
}
.svc__toggle::before,
.svc__toggle::after {
  content: "";
  position: absolute;
  background: var(--brass);
  inset: 50% auto auto 0;
  width: 100%;
  height: 2px;
  transform: translateY(-50%);
  transition: transform 200ms ease;
}
.svc__toggle::after { transform: translateY(-50%) rotate(90deg); }
.svc__head[aria-expanded="true"] .svc__toggle::after { transform: translateY(-50%) rotate(0deg); }

.svc__panel { overflow: hidden; }
.svc__panel[hidden] { display: none; }
.svc__panel > * {
  padding-left: calc(2.2rem + var(--sp-2)); /* alinea con el nombre tras el índice */
  max-width: 60ch;
  color: var(--stone);
}
.svc__panel > p { padding-bottom: var(--sp-1); }
.svc__panel { padding-bottom: var(--sp-2); }

.svc__bullets {
  list-style: none;
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.4rem;
}
.svc__bullets li {
  position: relative;
  padding-left: 1.2rem;
  font-size: 0.96rem;
}
.svc__bullets li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 0.55rem;
  height: 2px;
  background: var(--brass);
}

/* ---------- Método ---------- */
.sec--method {
  background: var(--pine-deep);
  color: var(--white);
}
.steps {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-3);
}
.step {
  border-top: 2px solid var(--brass);
  padding-top: var(--sp-2);
}
.step__num {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 2.4rem;
  color: var(--brass-soft);
  display: block;
  line-height: 1;
  margin-bottom: var(--sp-1);
}
.step__name {
  font-size: 1.35rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}
.step__text { font-size: 0.96rem; color: #CBD4CB; }

/* ---------- Cita ---------- */
.quote {
  background: var(--paper);
  border-block: var(--rule);
  padding-block: var(--sp-4);
}
.quote__bl p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: clamp(1.5rem, 3vw, 2.15rem);
  line-height: 1.3;
  max-width: 32ch;
  margin-inline: auto;
  text-align: left;
}
.quote__cite {
  display: block;
  margin-top: var(--sp-2);
  font-style: normal;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--stone);
}

/* ---------- Sectores ---------- */
.sect-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(var(--sp-3), 5vw, var(--sp-5));
  align-items: start;
}
.sect-intro {
  grid-column: 1 / -1;
  color: var(--stone);
  max-width: 58ch;
}
.sect-list {
  grid-column: 1 / -1;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 2px solid var(--ink);
}
.sect-list li {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.22rem;
  padding: var(--sp-2) var(--sp-1) var(--sp-2) 0;
  border-bottom: var(--rule);
  border-right: var(--rule);
  padding-left: var(--sp-1);
}
.sect-list li:nth-child(3n) { border-right: 0; }
.sect-list li:hover { background: rgba(168, 130, 47, 0.07); }

/* ---------- Contacto ---------- */
.sec--contact {
  background: var(--white);
  border-top: var(--rule);
}
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 6fr) minmax(0, 6fr);
  gap: clamp(var(--sp-3), 5vw, var(--sp-5));
  align-items: start;
}

.contact-co__lead {
  margin-top: var(--sp-2);
  color: var(--stone);
  max-width: 44ch;
}
.co { margin-top: var(--sp-3); }
.co__row {
  display: grid;
  grid-template-columns: 7rem 1fr;
  gap: var(--sp-1);
  padding-block: 0.7rem;
  border-top: var(--rule);
  font-size: 0.99rem;
}
.co__row:last-child { border-bottom: var(--rule); }
.co__label {
  font-weight: 600;
  font-size: 0.78rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--brass);
  padding-top: 0.15rem;
}
.co__row a { color: var(--pine); font-weight: 500; }
.co__row a:hover { color: var(--pine-deep); }
.contact-co__img {
  margin-top: var(--sp-3);
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  filter: saturate(0.85);
}

/* Formulario */
.form { display: grid; gap: var(--sp-2); }
.field { display: grid; gap: 0.35rem; }
.field__label {
  font-weight: 600;
  font-size: 0.92rem;
}
.field__label span { color: var(--brass); }
.field__input {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-bottom: 2px solid var(--ink);
  padding: 0.72rem 0.85rem;
  width: 100%;
  transition: border-color 140ms ease, background-color 140ms ease;
}
.field__input:focus {
  outline: none;
  border-bottom-color: var(--brass);
  background: var(--white);
}
.field__input--area { resize: vertical; min-height: 8rem; }
.field__error {
  color: #8A3B1F;
  font-size: 0.86rem;
  font-weight: 500;
}
.field__input.invalid { border-bottom-color: #8A3B1F; }

.form__submit { justify-self: start; }
.form__ok {
  border: 1px solid var(--pine);
  background: rgba(22, 75, 61, 0.08);
  padding: var(--sp-2);
  font-size: 0.95rem;
}
.form__ok a { color: var(--pine); font-weight: 600; }
.form__privacy { font-size: 0.84rem; color: var(--stone); }

/* ---------- Footer ---------- */
.ftr {
  background: var(--pine-deep);
  color: var(--white);
  padding-top: var(--sp-4);
}
.ftr__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: var(--sp-3);
  padding-bottom: var(--sp-3);
}
.ftr .brand__seal { color: var(--brass-soft); }
.ftr__word {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.2rem;
  margin-left: 0.6rem;
}
.ftr__brand { display: flex; align-items: center; }
.ftr__tag {
  font-size: 0.88rem;
  color: #AEBBB2;
  margin-top: 0.6rem;
}
.ftr__brand .ftr__tag { flex-basis: 100%; }
.ftr__brand { flex-wrap: wrap; }

.ftr__nav {
  display: grid;
  gap: 0.4rem;
  align-content: start;
}
.ftr__nav a {
  color: #D8DED6;
  text-decoration: none;
  font-size: 0.95rem;
  width: fit-content;
  border-bottom: 1px solid transparent;
}
.ftr__nav a:hover { border-bottom-color: var(--brass-soft); }

.ftr__soc {
  display: grid;
  gap: 0.4rem;
  align-content: start;
  justify-items: start;
}
.ftr__soc a {
  color: #D8DED6;
  text-decoration: none;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
}
.ftr__soc a:hover { border-bottom-color: var(--brass-soft); }

.ftr__legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: var(--sp-1);
  border-top: 1px solid rgba(255,255,255,0.14);
  padding-block: var(--sp-2);
  font-size: 0.84rem;
  color: #9FB0A5;
}

/* ---------- Animación de entrada (única orquestación) ---------- */
[data-rise] { opacity: 0; transform: translateY(14px); animation: rise 640ms cubic-bezier(.2,.7,.2,1) forwards; }
[data-rise]:nth-of-type(1), .hero__meta  { animation-delay: 60ms; }
.hero__title { animation-delay: 150ms; }
.hero__lead  { animation-delay: 260ms; }
.hero__actions { animation-delay: 370ms; }
.hero__media { animation-delay: 320ms; }
.facts { animation-delay: 480ms; }

@keyframes rise {
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  [data-rise] { opacity: 1; transform: none; animation: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero__grid { grid-template-columns: 1fr; align-items: start; }
  .hero__media { max-width: 26rem; }
  .facts { grid-template-columns: repeat(2, 1fr); }
  .fact { padding-left: 0; border-right: 0; border-bottom: var(--rule); padding-bottom: var(--sp-1); }
  .fact:nth-last-child(-n+2) { border-bottom: 0; }

  .band__grid { grid-template-columns: 1fr; }
  .firm__intro { columns: 1; }
  .tl { grid-template-columns: repeat(2, 1fr); }
  .tl__item { border-right: 0; border-bottom: var(--rule); padding-left: 0; }
  .tl__item:nth-last-child(-n+2) { border-bottom: 0; }

  .svc-layout { grid-template-columns: 1fr; }
  .svc-rail { position: static; }

  .steps { grid-template-columns: repeat(2, 1fr); }
  .sect-list { grid-template-columns: repeat(2, 1fr); }
  .sect-list li:nth-child(3n) { border-right: var(--rule); }
  .sect-list li:nth-child(2n) { border-right: 0; }
  .contact-grid { grid-template-columns: 1fr; }
  .ftr__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .hdr__cta { display: none; }
  .burger { display: flex; }

  /* Menú móvil */
  .nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: var(--rule);
    display: none;
    box-shadow: 0 18px 30px rgba(20, 37, 31, 0.12);
  }
  .nav.is-open { display: block; }
  .nav__list {
    flex-direction: column;
    gap: 0;
    padding: var(--sp-1) var(--gutter) var(--sp-2);
  }
  .nav__list li + li { border-top: var(--rule); }
  .nav__link { display: block; padding: 0.85rem 0; font-size: 1.05rem; }

  .steps { grid-template-columns: 1fr; }
  .sect-list { grid-template-columns: 1fr; }
  .sect-list li { border-right: 0 !important; }
  .ftr__grid { grid-template-columns: 1fr; }
  .co__row { grid-template-columns: 5.5rem 1fr; }
}

@media (max-width: 520px) {
  .facts { grid-template-columns: 1fr; }
  .fact:nth-last-child(-n+2) { border-bottom: var(--rule); }
  .fact:last-child { border-bottom: 0; }
  .quote__bl p { text-align: left; }
}
