[hidden] {
  display: none !important;
}

* {
  box-sizing: border-box;
}

:root {
  --line: #dbe3ef;
  --dark: #0f172a;
  --blue: #2563eb;
  --muted: #64748b;
  --soft: #f8fafc;
}

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, Segoe UI, sans-serif;
  background:
    radial-gradient(circle at top left, #e0f2fe, transparent 32%),
    linear-gradient(135deg, #f8fafc, #eef2ff);
  color: var(--dark);
  min-height: 100vh;
}

.shell {
  width: min(1160px, 92vw);
  margin: 0 auto;
}

/* Header */

.nav {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: inherit;
  text-decoration: none;
  font-size: 22px;
  font-weight: 950;
  letter-spacing: -.04em;
}

.brand span {
  width: 34px;
  height: 34px;
  border-radius: 13px;
  background: linear-gradient(135deg, #2563eb, #06b6d4);
}

.toplinks {
  display: flex;
  gap: 14px;
  align-items: center;
}

.toplinks a {
  color: #334155;
  text-decoration: none;
  font-weight: 800;
}

/* Homepage */

.hero-home {
  padding: 70px 0 34px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 950;
  color: var(--blue);
  letter-spacing: .18em;
  text-transform: uppercase;
}

h1 {
  font-size: clamp(42px, 6vw, 74px);
  letter-spacing: -.07em;
  line-height: .92;
  margin: 12px 0 18px;
}

h2 {
  letter-spacing: -.03em;
}

.sub {
  font-size: 19px;
  color: #475569;
  line-height: 1.55;
  max-width: 760px;
}

.search-box {
  position: relative;
  margin-top: 28px;
  max-width: 680px;
}

.search-box input {
  height: 58px;
  border-radius: 22px;
  font-size: 17px;
  padding: 0 18px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-top: 10px;
}

.section-head h2 {
  margin-bottom: 6px;
}

.section-head p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.count-pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 9px 13px;
  color: #475569;
  font-weight: 900;
  font-size: 13px;
  white-space: nowrap;
}

/* Category chips */

.chips {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 16px 0 24px;
}

.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 11px 15px;
  font-weight: 900;
  cursor: pointer;
  text-decoration: none;
  color: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.chip:hover {
  border-color: var(--blue);
  background: #eff6ff;
}

.chip.active,
.chip.active:hover {
  background: #0f172a;
  color: #fff;
}

/* Tool cards */

.tools-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  padding-bottom: 60px;
  align-items: stretch;
}

.tool-card {
  background: rgba(255, 255, 255, .88);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 24px;
  padding: 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 18px 45px rgba(15, 23, 42, .08);
  transition: .15s;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: relative;
  min-height: 230px;
}

.tool-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 60px rgba(15, 23, 42, .13);
}

.tool-card b {
  font-size: 18px;
  letter-spacing: -.02em;
}

.tool-card p {
  color: var(--muted);
  line-height: 1.5;
  margin: 0;
}

.tool-card-body {
  display: grid;
  gap: 8px;
}

.category-badge {
  background: transparent;
  border: 0;
  padding: 0;
  border-radius: 0;
  font-size: 12px;
  font-weight: 950;
  letter-spacing: .08em;
  text-transform: uppercase;
  align-self: flex-start;
}

.cat-imagenes {
  color: #0369a1;
}

.cat-pdf {
  color: #991b1b;
}

.cat-texto {
  color: #92400e;
}

.cat-seguridad {
  color: #166534;
}

.cat-desarrollo {
  color: #5b21b6;
}

.cat-calculadoras {
  color: #9d174d;
}

.tool-cta {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  border-radius: 14px;
  background: #0f172a;
  color: #fff;
  font-weight: 950;
  font-size: 14px;
  padding: 0 14px;
  align-self: flex-start;
}

.tool-card:hover .tool-cta {
  background: var(--blue);
}

/* Tool pages */

.page {
  padding: 40px 0 70px;
}

.card {
  background: rgba(255, 255, 255, .9);
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 30px;
  padding: 28px;
  box-shadow: 0 30px 90px rgba(15, 23, 42, .12);
}

.tool-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  gap: 22px;
}

.tool-box {
  margin-top: 22px;
  display: grid;
  gap: 14px;
}

/* Forms */

.field {
  display: grid;
  gap: 7px;
}

.field span {
  font-weight: 850;
  color: #334155;
  font-size: 13px;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 13px 14px;
  font-size: 15px;
  background: #fff;
  outline: none;
}

textarea {
  min-height: 140px;
  resize: vertical;
}

input:focus,
textarea:focus,
select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px #dbeafe;
}

/* Buttons */

.primary,
.ghost {
  border: 0;
  border-radius: 16px;
  font-weight: 950;
  cursor: pointer;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  transition: .15s;
}

.primary {
  height: 54px;
  background: #0f172a;
  color: #fff;
  font-size: 16px;
}

.primary:hover {
  background: var(--blue);
}

.ghost {
  min-height: 48px;
  background: #eef2ff;
  color: #1e3a8a;
  padding: 0 16px;
}

.ghost:hover {
  background: #dbeafe;
}

/* Generic tool output */

.output {
  display: none;
  margin-top: 12px;
  padding: 16px;
  border-radius: 20px;
  background: var(--soft);
  border: 1px solid #e2e8f0;
}

.output.show {
  display: block;
}

.result-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 12px;
}

.preview-img {
  max-width: 100%;
  border-radius: 18px;
  background: #fff;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* SEO text */

.seo-text p {
  color: #475569;
  line-height: 1.7;
}

/* Modal */

.modal {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, .6);
  display: none;
  place-items: center;
  padding: 20px;
  z-index: 50;
}

.modal.show {
  display: grid;
}

.modal-card {
  position: relative;
  background: #fff;
  border-radius: 28px;
  padding: 30px;
  width: min(460px, 94vw);
  text-align: center;
  box-shadow: 0 30px 120px rgba(0, 0, 0, .28);
}

.x {
  position: absolute;
  right: 15px;
  top: 14px;
  border: 0;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 24px;
  font-weight: 900;
  cursor: pointer;
}

/* Footer */

.footer {
  border-top: 1px solid rgba(148, 163, 184, .35);
  padding: 24px 0 34px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.footer-links {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.footer-links a {
  color: #334155;
  text-decoration: none;
  font-weight: 800;
}

/* Legal pages */

.legal .card p {
  color: #475569;
  line-height: 1.75;
  font-size: 16px;
}

.legal h1 {
  font-size: clamp(34px, 5vw, 58px);
}

/* Helpers */

.small {
  color: var(--muted);
  font-size: 13px;
}

/* Responsive */

@media (max-width: 950px) {
  .tools-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .tool-layout {
    grid-template-columns: 1fr;
  }

  .row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 650px) {
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .tool-card {
    min-height: auto;
  }

  .tool-cta {
    width: 100%;
  }

  .footer-links {
    justify-content: flex-start;
  }
}

@media (max-width: 560px) {
  .tools-grid {
    grid-template-columns: 1fr;
  }

  .footer {
    flex-direction: column;
  }

  .nav {
    height: auto;
    padding: 18px 0;
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  h1 {
    font-size: 44px;
  }
}