/* Lagartija Labs – estilos base, accesibles y sin dependencias */
:root {
  --bg: #0b1120;
  --bg-alt: #0f172a;
  --card: #0f172a;
  --text: #e5e7eb;
  --muted: #94a3b8;
  --primary: #0ea5e9;
  --primary-600: #0284c7;
  --secondary: #22c55e;
  --ring: #38bdf8;
  --shadow: 0 8px 20px rgba(0, 0, 0, 0.28);
  --radius: 14px;
}

/* Reset ligero y utilidades */
* { box-sizing: border-box; }
html, body { height: 100%; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
  line-height: 1.6;
  color: var(--text);
  background: radial-gradient(1100px 520px at 85% -120px, rgba(14,165,233,0.10), transparent 60%),
              radial-gradient(820px 420px at -10% -80px, rgba(34,197,94,0.10), transparent 60%),
              var(--bg);
  overflow-x: hidden;
  word-break: break-word;
}
:where(img, svg, video) { max-width: 100%; height: auto; display: block; }
::selection { background: rgba(56,189,248,0.25); }

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

/* Header */
.site-header { position: sticky; top: 0; backdrop-filter: blur(6px); background: rgba(11,17,32,0.6); border-bottom: 1px solid rgba(148,163,184,0.08); z-index: 10; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; padding: .9rem 0; gap: .8rem; }
.brand { display: inline-flex; align-items: center; gap: .6rem; text-decoration: none; color: var(--text); font-weight: 700; letter-spacing: .2px; }
.brand-mark { font-size: 1.25rem; filter: drop-shadow(0 2px 6px rgba(34,197,94,0.4)); }
.brand-text { font-size: 1.05rem; }
.nav { display: flex; gap: .6rem 1rem; flex-wrap: wrap; }
.nav a { color: var(--text); text-decoration: none; opacity: .9; padding: .35rem .6rem; border-radius: 8px; transition: .2s ease; }
.nav a:hover { opacity: 1; background: rgba(148,163,184,0.08); }

/* Hero */
.hero { padding: 4.2rem 0 2.6rem; }
.hero-inner { display: grid; gap: 1.4rem; align-items: center; }
.hero h1 { margin: 0 0 .5rem; font-size: clamp(1.8rem, 2.1vw + 1.1rem, 2.6rem); line-height: 1.2; letter-spacing: .2px; }
.hero p { color: var(--muted); margin: 0 0 1rem; font-size: 1.03rem; max-width: 60ch; }
.cta-row { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Sections */
.section { padding: 2.6rem 0; scroll-margin-top: 80px; }
.section.alt { background: linear-gradient(180deg, rgba(15,23,42,0.7), rgba(15,23,42,0.7)), var(--bg-alt); border-block: 1px solid rgba(148,163,184,0.08); }
.section h2 { margin: 0 0 .5rem; font-size: clamp(1.25rem, 1.2vw + .9rem, 1.7rem); letter-spacing: .2px; }
.section-lead { color: var(--muted); margin: 0 0 1.4rem; }

/* Cards */
.grid.cards { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.card { position: relative; border: 1px solid rgba(148,163,184,0.12); background: linear-gradient(180deg, rgba(15,23,42,0.85), rgba(15,23,42,0.95)); border-radius: var(--radius); box-shadow: var(--shadow); display: flex; flex-direction: column; min-height: 180px; overflow: hidden; }
.card::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, var(--primary), var(--secondary)); opacity: .9; }
.card.placeholder { opacity: .85; }
.card-body { padding: 1rem; }
.card-title { margin: 0 0 .4rem; font-size: 1.1rem; }
.card-text { margin: 0; color: var(--muted); }
.card-actions { display: flex; gap: .6rem; padding: 0 1rem 1rem; margin-top: auto; flex-wrap: wrap; }
.card-actions .btn { flex: 1 1 180px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .68rem 1.15rem; min-height: 40px; border-radius: 10px; border: 1px solid transparent; text-decoration: none; font-weight: 600; color: #0b1120; transition: transform .06s ease, filter .2s ease, box-shadow .2s ease; will-change: transform; max-width: 100%; text-align: center; line-height: 1.28; }
.btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.btn:active { transform: translateY(0); }
.btn-primary { background: linear-gradient(180deg, var(--primary), var(--primary-600)); color: white; box-shadow: 0 6px 18px rgba(14,165,233,0.3); border-color: rgba(56,189,248,0.35); }
.btn-secondary { background: linear-gradient(180deg, var(--secondary), #16a34a); color: white; box-shadow: 0 6px 18px rgba(34,197,94,0.28); border-color: rgba(34,197,94,0.4); }
.btn-ghost { background: rgba(148,163,184,0.1); color: var(--text); border-color: rgba(148,163,184,0.25); }
.btn:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(56,189,248,0.35); }

/* Button/CTA overflow fixes */
.btn { white-space: normal; overflow-wrap: anywhere; word-break: normal; }
.cta-row .btn, .card-actions .btn { min-width: 0; }

/* Lists */
.bullets { margin: 1rem 0 0; padding-left: 1rem; color: var(--muted); }
.bullets li + li { margin-top: .4rem; }

/* Contact cards */
.contact-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin-top: 1rem; }
.contact-card { display: flex; align-items: center; gap: .8rem; padding: .9rem 1rem; border-radius: 12px; text-decoration: none; color: var(--text); background: rgba(148,163,184,0.08); border: 1px solid rgba(148,163,184,0.14); }
.contact-card:hover { background: rgba(148,163,184,0.12); border-color: rgba(148,163,184,0.25); }
.contact-card .icon { font-size: 1.2rem; }
.contact-card strong { display: block; }
.contact-card small { color: var(--muted); }

/* Footer */
.site-footer { border-top: 1px solid rgba(148,163,184,0.12); margin-top: 2rem; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 0; color: var(--muted); }
.footer-nav { display: flex; gap: .9rem; }
.footer-nav a { color: var(--muted); text-decoration: none; }
.footer-nav a:hover { color: var(--text); }

@media (prefers-color-scheme: light) {
  :root { --bg: #f8fafc; --bg-alt: #f1f5f9; --card: white; --text: #0b1120; --muted: #475569; --ring: #0284c7; }
  body { background: radial-gradient(1200px 600px at 80% -100px, rgba(14,165,233,0.10), transparent 60%),
                    radial-gradient(800px 400px at -10% -50px, rgba(34,197,94,0.10), transparent 60%), var(--bg); }
  .site-header { background: rgba(255,255,255,0.6); }
}

/* Resp. finos */
@media (max-width: 640px) {
  .hero { padding: 3.2rem 0 2rem; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 480px) {
  .card-actions .btn { flex-basis: 100%; }
}
@media (max-width: 400px) {
  .btn { padding: .6rem 1rem; font-size: .96rem; }
  .nav a { padding: .3rem .5rem; }
}
