/* ============================================
   CAAS — Design tokens
   Concept: el "sello de conformidad" — la marca de un
   expediente aprobado. Ledger lines + un sello circular
   como elemento de firma, en vez de tarjetas genéricas.
   ============================================ */

:root {
  --ink: #1B2A3D;
  --ink-soft: #33465C;
  --paper: #F7F5F0;
  --paper-alt: #EDE8DC;
  --sage: #3F6357;
  --sage-light: #DCE7E1;
  --stamp: #A13D2E;
  --gray: #6B6960;
  --line: rgba(27, 42, 61, 0.14);
  --line-strong: rgba(27, 42, 61, 0.28);

  --font-display: 'Fraunces', serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

/* ---------- Eyebrow / labels (expediente style) ---------- */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--sage);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}
.eyebrow::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--sage);
}

/* ---------- Header ---------- */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 84px;
}
.logo {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.logo span { color: var(--sage); }

nav.main { display: flex; align-items: center; gap: 36px; }
nav.main a {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
}
nav.main a.active { color: var(--ink); }
nav.main a.active::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0; right: 0;
  height: 2px;
  background: var(--stamp);
}
nav.main a:hover { color: var(--ink); }

.btn {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 600;
  padding: 12px 22px;
  border-radius: 3px;
  border: 1px solid transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
}
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-soft); }
.btn-outline { border-color: var(--line-strong); color: var(--ink); }
.btn-outline:hover { border-color: var(--ink); }

.menu-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  padding: 96px 0 88px;
  border-bottom: 1px solid var(--line);
}
.hero .wrap {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 64px;
  align-items: center;
}
.hero-simple .wrap { display: block; }
.hero-center {
  max-width: 640px;
  margin: 0 auto;
  text-align: center;
}
.hero h1 {
  font-family: var(--font-display);
  font-size: 52px;
  line-height: 1.08;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-bottom: 24px;
}
.hero p.lead {
  font-size: 18px;
  color: var(--ink-soft);
  max-width: 46ch;
  margin-bottom: 36px;
}
.hero .actions { display: flex; gap: 14px; flex-wrap: wrap; }

/* Seal / stamp signature element */
.seal-wrap { display: flex; justify-content: center; }
.seal {
  width: 260px;
  height: 260px;
}
.seal .ring-text {
  font-family: var(--font-mono);
  font-size: 10.4px;
  letter-spacing: 0.22em;
  fill: var(--sage);
}
.seal .ring-outer { fill: none; stroke: var(--sage); stroke-width: 1.2; }
.seal .ring-inner { fill: none; stroke: var(--sage); stroke-width: 0.6; opacity: 0.5; }
.seal .center-text {
  font-family: var(--font-display);
  fill: var(--ink);
  font-weight: 600;
}
.seal .center-sub {
  font-family: var(--font-mono);
  fill: var(--stamp);
  font-size: 9px;
  letter-spacing: 0.1em;
}

/* ---------- Section shells ---------- */
section { padding: 88px 0; }
section.alt { background: var(--paper-alt); }
.section-head { max-width: 620px; margin-bottom: 56px; }
.section-head h2 {
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 600;
  line-height: 1.2;
}
.section-head p { color: var(--gray); font-size: 16px; margin-top: 14px; }

/* ---------- Case cards (¿te pasa esto?) ---------- */
.cases {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--line);
}
.case {
  padding: 32px 28px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}
.case:last-child { border-right: none; }
.case .file-no {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--stamp);
  margin-bottom: 16px;
  display: block;
}
.case h3 {
  font-family: var(--font-display);
  font-size: 19px;
  font-weight: 600;
  margin-bottom: 12px;
  line-height: 1.35;
}
.case p { color: var(--gray); font-size: 14.5px; }

/* ---------- Process ledger ---------- */
.ledger {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 32px;
}
.ledger::before {
  content: '';
  position: absolute;
  top: 17px; left: 0; right: 0;
  height: 1px;
  background: var(--line-strong);
}
.step { position: relative; padding-top: 48px; }
.step .num {
  position: absolute;
  top: 0; left: 0;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 13px;
}
.step h4 { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.step p { font-size: 14px; color: var(--gray); }

/* ---------- Services grid ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card {
  background: var(--paper);
  padding: 30px 26px;
}
.service-card .code {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--sage);
  margin-bottom: 14px;
  display: block;
}
.service-card h3 {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}
.service-card p { font-size: 14px; color: var(--gray); margin-bottom: 16px; }
.service-card a.more {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  border-bottom: 1px solid var(--stamp);
}

/* ---------- Testimonial ---------- */
.testimonial {
  border: 1px solid var(--line);
  background: var(--paper);
  padding: 48px;
  position: relative;
}
.testimonial blockquote {
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.45;
  font-weight: 500;
  max-width: 60ch;
  margin-bottom: 24px;
}
.testimonial .who {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--gray);
}
.testimonial .who .stamp-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--sage-light);
  color: var(--sage);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
}
.badges { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 40px; }
.badge {
  font-family: var(--font-mono);
  font-size: 12px;
  padding: 8px 14px;
  border: 1px solid var(--line-strong);
  color: var(--gray);
}

/* ---------- Team preview / grid ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 40px;
}
.team-card { display: flex; gap: 20px; }
.avatar {
  width: 76px; height: 76px;
  border-radius: 50%;
  background: var(--sage-light);
  color: var(--sage);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono);
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.logo img { height: 54px; display: block; }
.team-card h4 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.status-note {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--gray);
  font-style: italic;
  display: block;
  margin-top: -4px;
  margin-bottom: 8px;
}
.team-card .role {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--sage);
  margin-bottom: 10px;
  display: block;
}
.team-card p.bio { font-size: 14px; color: var(--gray); }

/* ---------- Final CTA ---------- */
.cta-final {
  background: var(--ink);
  color: var(--paper);
  padding: 80px 0;
}
.cta-final .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}
.cta-final h2 {
  font-family: var(--font-display);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 12px;
}
.cta-final p { color: rgba(247,245,240,0.7); max-width: 48ch; }
.cta-final .actions { display: flex; gap: 14px; flex-shrink: 0; }
.cta-final .btn-primary { background: var(--paper); color: var(--ink); }
.cta-final .btn-primary:hover { background: var(--paper-alt); }
.cta-final .btn-outline { border-color: rgba(247,245,240,0.35); color: var(--paper); }
.cta-final .btn-outline:hover { border-color: var(--paper); }

/* ---------- Footer ---------- */
footer.site {
  border-top: 1px solid var(--line);
  padding: 40px 0;
}
footer.site .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  color: var(--gray);
}
footer.site nav { display: flex; gap: 24px; }

/* ---------- WhatsApp floating button ---------- */
.wa-float {
  position: fixed;
  bottom: 28px; right: 28px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--sage);
  color: var(--paper);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 16px rgba(27,42,61,0.25);
  z-index: 60;
}
.wa-float svg { width: 26px; height: 26px; }

/* ---------- Inner page hero (Servicios/Equipo/Contacto) ---------- */
.page-hero {
  padding: 64px 0 56px;
  border-bottom: 1px solid var(--line);
}
.page-hero h1 {
  font-family: var(--font-display);
  font-size: 42px;
  font-weight: 600;
  max-width: 20ch;
}
.page-hero p { color: var(--gray); margin-top: 16px; max-width: 55ch; font-size: 16.5px; }

/* Full service detail blocks */
.service-detail {
  padding: 48px 0;
  border-bottom: 1px solid var(--line);
  display: grid;
  grid-template-columns: 0.9fr 1.6fr;
  gap: 48px;
}
.service-detail:last-child { border-bottom: none; }
.service-detail .code {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--stamp);
}
.service-detail h2 {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  margin-top: 8px;
}
.service-detail .who {
  font-size: 14px;
  color: var(--sage);
  margin-top: 14px;
  font-weight: 600;
}
.service-detail .desc { color: var(--ink-soft); margin: 14px 0 20px; max-width: 60ch; }
.service-detail ul { list-style: none; }
.service-detail li {
  font-size: 14.5px;
  color: var(--gray);
  padding: 10px 0;
  border-top: 1px solid var(--line);
}
.service-detail li:first-child { border-top: none; }

/* Team full bios */
.team-full { display: grid; grid-template-columns: repeat(2, 1fr); gap: 48px; }
.bio-card { border: 1px solid var(--line); padding: 32px; }
.bio-card .avatar { width: 88px; height: 88px; margin-bottom: 20px; }
.bio-card h3 { font-family: var(--font-display); font-size: 20px; font-weight: 600; }
.bio-card .role { font-family: var(--font-mono); font-size: 12px; color: var(--sage); margin: 6px 0 16px; display: block; }
.bio-card p { font-size: 14.5px; color: var(--gray); margin-bottom: 10px; }

/* Contact page */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
}
.contact-info .item { margin-bottom: 28px; }
.contact-info .item .label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--sage);
  display: block;
  margin-bottom: 6px;
}
.contact-info .item .value { font-size: 16px; }

form.contact-form { display: flex; flex-direction: column; gap: 18px; }
form.contact-form label {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--gray);
  margin-bottom: 6px;
  display: block;
}
form.contact-form input,
form.contact-form textarea {
  width: 100%;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  padding: 12px 14px;
  font-family: var(--font-body);
  font-size: 14.5px;
  color: var(--ink);
  border-radius: 2px;
}
form.contact-form input:focus,
form.contact-form textarea:focus {
  outline: none;
  border-color: var(--sage);
}
form.contact-form textarea { resize: vertical; min-height: 120px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 38px; }
  .seal-wrap { order: -1; }
  .seal { width: 180px; height: 180px; }
  .cases { grid-template-columns: 1fr; }
  .case { border-right: none; }
  .ledger { grid-template-columns: repeat(2, 1fr); row-gap: 40px; }
  .ledger::before { display: none; }
  .services-grid { grid-template-columns: 1fr; }
  .team-grid, .team-full { grid-template-columns: 1fr; }
  .cta-final .wrap { flex-direction: column; align-items: flex-start; text-align: left; }
  .service-detail { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; }
  nav.main { display: none; }
  .menu-toggle { display: block; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
