:root {
  --bg: #f7f3ec;
  --bg-muted: #ebe4d8;
  --text: #151515;
  --text-soft: #58534b;
  --card: #fffdf9;
  --border: #d9cebf;
  --accent: #172236;
  --accent-2: #8b5e34;
  --accent-soft: #e2d7c9;
  --success: #1f6b4d;
  --radius: 24px;
  --shadow: 0 24px 70px rgba(23, 34, 54, 0.11);
  --max-width: 1120px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
}

body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(139, 94, 52, 0.12), transparent 28rem),
    radial-gradient(circle at 90% 6%, rgba(23, 34, 54, 0.10), transparent 26rem),
    var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
}

p {
  margin: 0;
  color: var(--text-soft);
}

ul {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-soft);
}

li {
  margin-top: 0.35rem;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  letter-spacing: -0.04em;
}

h1 {
  max-width: 920px;
  font-size: clamp(2.65rem, 7vw, 5.7rem);
}

h2 {
  font-size: clamp(2rem, 4vw, 3.2rem);
}

h3 {
  font-size: 1.25rem;
}

::selection {
  background: var(--accent);
  color: white;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  transform: translateY(-160%);
  z-index: 99;
  background: white;
  color: var(--accent);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.container {
  width: min(var(--max-width), calc(100% - 40px));
  margin-inline: auto;
}

.section {
  padding: 104px 0;
}

.section-muted {
  background:
    linear-gradient(180deg, rgba(235, 228, 216, 0.92), rgba(235, 228, 216, 0.86)),
    var(--bg-muted);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 243, 236, 0.88);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(217, 206, 191, 0.8);
}

.navbar {
  height: 74px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 13px;
  display: grid;
  place-items: center;
  background: var(--accent);
  color: white;
  font-size: 0.88rem;
  box-shadow: 0 12px 28px rgba(23, 34, 54, 0.2);
}

.nav-menu {
  display: flex;
  align-items: center;
  gap: 28px;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.95rem;
  color: var(--text-soft);
}

.nav-menu a {
  position: relative;
  transition: color 0.2s ease;
}

.nav-menu a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -7px;
  width: 0;
  height: 2px;
  border-radius: 99px;
  background: var(--accent-2);
  transition: width 0.2s ease;
}

.nav-menu a:hover,
.nav-menu a.active {
  color: var(--text);
}

.nav-menu a:hover::after,
.nav-menu a.active::after {
  width: 100%;
}

.nav-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: transparent;
  cursor: pointer;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text);
  margin: 4px auto;
}

.hero {
  padding-top: 82px;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.36fr) minmax(280px, 0.64fr);
  gap: 48px;
  align-items: center;
}

.eyebrow {
  color: var(--accent-2);
  font-size: 0.82rem;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}

.hero-text {
  max-width: 740px;
  margin-top: 28px;
  font-size: 1.23rem;
}

.hero-actions,
.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 34px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 900;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent);
  color: white;
  box-shadow: 0 14px 34px rgba(23, 34, 54, 0.18);
}

.btn-secondary {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
}

.btn-light {
  background: white;
  color: var(--accent);
}

.btn-light-outline {
  color: white;
  border-color: rgba(255, 255, 255, 0.62);
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 54px;
}

.hero-meta div {
  position: relative;
  border-top: 1px solid var(--border);
  padding-top: 16px;
}

.hero-meta div::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  width: 36px;
  height: 1px;
  background: var(--accent-2);
}

.hero-meta strong {
  display: block;
  font-size: 1.45rem;
  line-height: 1;
  color: var(--accent);
}

.hero-meta span {
  display: block;
  margin-top: 8px;
  color: var(--text-soft);
  font-size: 0.92rem;
}

.profile-card {
  background: rgba(255, 253, 249, 0.84);
  border: 1px solid rgba(217, 206, 191, 0.92);
  border-radius: calc(var(--radius) + 8px);
  box-shadow: var(--shadow);
  padding: 28px;
  backdrop-filter: blur(16px);
}

.profile-image-wrap {
  position: relative;
  border-radius: 22px;
  overflow: hidden;
  margin-bottom: 24px;
  background: var(--accent);
}

.profile-image-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  border: 1px solid rgba(255,255,255,0.2);
  border-radius: 22px;
  pointer-events: none;
}

.profile-image {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.profile-card h2 {
  font-size: 1.65rem;
  margin-bottom: 12px;
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin-top: 22px;
}

.profile-tags li {
  background: var(--accent-soft);
  color: var(--accent);
  border-radius: 999px;
  padding: 7px 11px;
  margin: 0;
  font-size: 0.84rem;
  font-weight: 900;
}

.section-heading {
  max-width: 780px;
  margin-bottom: 46px;
}

.section-heading p:not(.eyebrow) {
  margin-top: 18px;
  font-size: 1.08rem;
}

.cards,
.metrics-grid,
.stack-grid {
  display: grid;
  gap: 20px;
}

.four-columns {
  grid-template-columns: repeat(4, 1fr);
}

.card,
.metric-card,
.case-card,
.stack-grid > div,
.contact-form {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 14px 42px rgba(23, 34, 54, 0.05);
}

.card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}

.card-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  margin-bottom: 22px;
  background: var(--accent);
  color: white;
  font-weight: 900;
}

.card h3,
.metric-card h3,
.stack-grid h3 {
  margin-bottom: 12px;
}

.card p {
  margin-bottom: 20px;
}

.metrics-grid {
  grid-template-columns: repeat(4, 1fr);
}

.metric {
  display: block;
  color: var(--accent);
  font-size: 3rem;
  font-weight: 950;
  letter-spacing: -0.08em;
  line-height: 1;
  margin-bottom: 22px;
}

.timeline {
  display: grid;
  gap: 20px;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: 24px 1fr;
  gap: 18px;
}

.timeline-dot {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-2);
  margin-top: 8px;
  box-shadow: 0 0 0 8px rgba(139, 94, 52, 0.14);
}

.timeline-content {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}

.timeline-subtitle {
  margin: 10px 0 18px;
}

.case-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.case-card {
  position: relative;
  overflow: hidden;
}

.case-card::before {
  content: "";
  position: absolute;
  right: -60px;
  top: -60px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(139, 94, 52, 0.09);
}

.case-card span {
  display: inline-block;
  margin-bottom: 22px;
  color: var(--accent-2);
  font-weight: 950;
  letter-spacing: -0.06em;
  font-size: 2rem;
}

.case-card h3 {
  margin-bottom: 14px;
}

.stack-grid {
  grid-template-columns: repeat(2, 1fr);
}

.stack-grid p {
  margin-top: 10px;
}

.contact-section {
  background:
    radial-gradient(circle at 16% 0%, rgba(139, 94, 52, 0.34), transparent 26rem),
    linear-gradient(135deg, #172236, #0d1420);
  color: white;
}

.contact-section p,
.contact-section .eyebrow {
  color: rgba(255, 255, 255, 0.76);
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 0.86fr;
  gap: 48px;
  align-items: start;
}

.contact-form {
  color: var(--text);
  display: grid;
  gap: 12px;
}

.contact-form label {
  font-weight: 900;
  font-size: 0.92rem;
}

.contact-form input,
.contact-form textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 15px;
  padding: 14px 15px;
  font: inherit;
  background: #fbfaf7;
  color: var(--text);
}

.contact-form input:focus,
.contact-form textarea:focus {
  outline: 3px solid rgba(139, 94, 52, 0.22);
  border-color: var(--accent-2);
}

.contact-form textarea {
  resize: vertical;
}

.form-note {
  font-size: 0.85rem;
}

.site-footer {
  padding: 28px 0;
  background: #0d1420;
  color: white;
}

.footer-grid {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: center;
}

.footer-grid p,
.footer-grid a {
  color: rgba(255, 255, 255, 0.72);
}

@media (max-width: 980px) {
  .hero-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .four-columns,
  .metrics-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .profile-card {
    max-width: 520px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(100% - 28px, var(--max-width));
  }

  .section {
    padding: 72px 0;
  }

  .nav-toggle {
    display: block;
  }

  .nav-menu {
    position: fixed;
    inset: 74px 14px auto 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: var(--shadow);
    padding: 18px;
    display: none;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
  }

  .nav-menu.open {
    display: flex;
  }

  .nav-menu a::after {
    display: none;
  }

  .hero {
    padding-top: 52px;
  }

  .hero-meta,
  .four-columns,
  .metrics-grid,
  .case-list,
  .stack-grid {
    grid-template-columns: 1fr;
  }

  .hero-text {
    font-size: 1.08rem;
  }

  .footer-grid {
    flex-direction: column;
    align-items: flex-start;
  }
}

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

  .btn,
  .nav-menu a::after {
    transition: none;
  }

  .btn:hover {
    transform: none;
  }
}

/* Formulario real */
.contact-form label span {
  color: var(--text-soft);
  font-weight: 700;
  font-size: 0.82rem;
}

.checkbox-field {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  margin: 6px 0 4px;
  color: var(--text-soft);
  font-weight: 700;
  line-height: 1.4;
}

.checkbox-field input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.contact-form .form-note a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.honeypot-field {
  display: none !important;
}

/* Página legal */
.legal-page {
  min-height: 70vh;
}

.legal-content {
  max-width: 860px;
}

.legal-content h1 {
  font-size: clamp(2.3rem, 5vw, 4.2rem);
  margin-bottom: 26px;
}

.legal-content h2 {
  font-size: 1.35rem;
  margin-top: 34px;
  margin-bottom: 10px;
}

.legal-content a {
  color: var(--accent);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.legal-note {
  margin-top: 34px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--card);
}

.footer-links {
  display: inline-flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* Selector de idioma */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 4px;
  padding-left: 4px;
}

.lang-switch a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.02em;
  color: var(--text-soft);
  background: rgba(255, 253, 249, 0.58);
}

.lang-switch a.active,
.lang-switch a:hover {
  color: white;
  background: var(--accent);
  border-color: var(--accent);
}

@media (max-width: 760px) {
  .lang-switch {
    margin-left: 0;
    padding-left: 0;
    padding-top: 8px;
    border-top: 1px solid var(--border);
    width: 100%;
  }
}
