/* ===================================================================
   moba — estudio de datos y automatización
   Design tokens per brand brief. Self-hosted fonts, no external calls.
=================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/fonts/SpaceGrotesk-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/fonts/Inter-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("/fonts/IBMPlexMono-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

:root {
  --carbon: #232323;
  --grad-top: #333333;
  --grad-bottom: #171717;
  --bone: #F4F1EC;
  --red: #E63946;
  --red-hover: #C1121F;
  --gray: #4A4A4A;

  --font-display: "Space Grotesk", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;

  --max-w: 1120px;
  --pad: clamp(20px, 5vw, 48px);
}

*, *::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;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--carbon);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.15;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

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

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

button {
  font-family: inherit;
  cursor: pointer;
}

.wrap {
  max-width: var(--max-w);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

.mono-label {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--red);
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
}

.mono-label::before {
  content: "";
  width: 1.4em;
  height: 1px;
  background: var(--red);
  display: inline-block;
}

/* ---------- corner-bracket device ----------
   Echoes the icon's own corner brackets. Used to frame
   key blocks instead of card borders/shadows. */
.bracketed {
  position: relative;
  padding: clamp(28px, 4vw, 44px);
}
.bracketed::before,
.bracketed::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 2px solid var(--red);
  transition: border-color 0.2s ease;
}
.bracketed::before {
  top: 0;
  left: 0;
  border-right: none;
  border-bottom: none;
}
.bracketed::after {
  bottom: 0;
  right: 0;
  border-left: none;
  border-top: none;
}

/* ---------- header ---------- */
.site-header {
  background: linear-gradient(180deg, var(--grad-top), var(--grad-bottom));
  color: var(--bone);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
}

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

.brand img {
  width: 44px;
  height: 44px;
  filter: drop-shadow(0 3px 8px rgba(0, 0, 0, 0.45));
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-text span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--bone);
}

.brand-tag {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--red);
  margin-top: 2px;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 20px;
}

.lang-switch {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  display: flex;
  gap: 6px;
  color: var(--bone);
}

.lang-switch a {
  padding: 2px 6px;
  opacity: 0.55;
  transition: opacity 0.15s;
}

.lang-switch a.active {
  opacity: 1;
  color: var(--red);
}

.lang-switch a:hover { opacity: 1; }

.header-cta {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.9rem;
  background: var(--red);
  color: var(--bone);
  padding: 9px 18px;
  border-radius: 3px;
  transition: background 0.15s;
  white-space: nowrap;
}

.header-cta:hover { background: var(--red-hover); }

/* ---------- hero ---------- */
.hero {
  background-color: var(--carbon);
  background-image:
    linear-gradient(90deg, var(--carbon) 0%, rgba(35,35,35,0.55) 45%, rgba(35,35,35,0) 70%),
    url('/images/hero-bg.jpg');
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  color: var(--bone);
  padding: clamp(72px, 12vw, 150px) 0 clamp(80px, 11vw, 150px);
  min-height: clamp(420px, 60vw, 640px);
  display: flex;
  align-items: center;
}

.hero .wrap {
  width: 100%;
}

.hero-content {
  max-width: 640px;
}

.hero h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.4rem);
  color: var(--bone);
  max-width: 15ch;
}

.hero .sub {
  margin-top: 20px;
  font-size: 1.15rem;
  color: var(--bone);
  opacity: 0.9;
  max-width: 46ch;
  font-weight: 400;
}

.hero .cta-row {
  margin-top: 32px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.btn-primary {
  background: var(--red);
  color: var(--bone);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  padding: 14px 28px;
  border-radius: 3px;
  border: none;
  display: inline-block;
  transition: background 0.15s;
}

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

@media (max-width: 720px) {
  .hero {
    background-image:
      linear-gradient(180deg, rgba(35,35,35,0.35) 0%, var(--carbon) 78%),
      url('/images/hero-bg-mobile.jpg');
    background-position: center top;
    min-height: unset;
    padding-top: clamp(48px, 14vw, 80px);
  }
  .hero-content { max-width: 100%; }
}

/* ---------- generic section ---------- */
.section {
  padding: clamp(56px, 8vw, 96px) 0;
}

.section-head {
  max-width: 60ch;
  margin-bottom: clamp(32px, 5vw, 52px);
}

.section-head h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  margin-top: 10px;
}

.section-alt {
  background: var(--carbon);
  color: var(--bone);
}

.section-alt .mono-label { color: var(--red); }

/* ---------- para quién es ---------- */
.symptoms {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(28px, 4vw, 56px) clamp(40px, 6vw, 80px);
}

.symptom {
  position: relative;
  padding-left: clamp(52px, 6vw, 72px);
}

.symptom p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: var(--carbon);
}

.symptom .num {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--red);
  font-size: clamp(1.8rem, 3vw, 2.4rem);
  line-height: 1;
  position: absolute;
  left: 0;
  top: -0.1em;
  opacity: 0.85;
}

@media (max-width: 640px) {
  .symptoms { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- servicios ---------- */
.services {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(28px, 4vw, 48px);
}

.service-block {
  background: #2a2a2a;
  color: var(--bone);
  opacity: 0.72;
  padding: clamp(24px, 3.2vw, 36px);
  transition: opacity 0.2s ease, background-color 0.2s ease, transform 0.2s ease;
}

.services:hover .service-block {
  opacity: 0.55;
}

.services .service-block:hover {
  opacity: 1;
  background: #333333;
  transform: translateY(-2px);
}

.service-block:hover::before,
.service-block:hover::after {
  border-color: var(--red-hover);
}

.service-block .service-tag {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.5rem, 2.4vw, 1.9rem);
  color: var(--bone);
  display: block;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}

.service-block .service-tag::before {
  content: "";
  width: 1.4em;
  height: 3px;
  background: var(--red);
  display: block;
  margin-bottom: 14px;
}

.service-block h3 {
  font-size: 1.05rem;
  font-weight: 500;
  font-family: var(--font-body);
  color: var(--red);
  margin-bottom: 4px;
}

.service-block ul {
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.service-block li {
  padding: 10px 0;
  border-top: 1px solid rgba(244, 241, 236, 0.15);
  font-size: 0.98rem;
  display: flex;
  gap: 12px;
}

.service-block li::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--red);
  flex-shrink: 0;
  margin-top: 8px;
}

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

/* ---------- cómo se trabaja ---------- */
.process-section {
  background-color: var(--bone);
  background-image:
    linear-gradient(90deg, rgba(244,241,236,0) 0%, rgba(244,241,236,0.6) 32%, var(--bone) 55%),
    url('/images/how-we-work.jpg');
  background-size: cover;
  background-position: center left;
  background-repeat: no-repeat;
  min-height: clamp(380px, 42vw, 520px);
  display: flex;
  align-items: center;
}

.process-section .wrap { width: 100%; }

.process-copy {
  max-width: 46ch;
  margin-left: auto;
}

.process-copy h2 {
  font-size: clamp(1.6rem, 3.2vw, 2.3rem);
  margin-top: 10px;
}

.process-copy p {
  margin-top: 18px;
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--gray);
}

@media (max-width: 720px) {
  .process-section {
    background-image:
      linear-gradient(180deg, rgba(244,241,236,0.4) 0%, var(--bone) 80%),
      url('/images/how-we-work.jpg');
    background-position: center top;
    min-height: unset;
    padding: clamp(48px, 14vw, 80px) 0;
  }
  .process-copy { max-width: 100%; margin-left: 0; }
}

/* ---------- contacto ---------- */
.contact-grid {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.contact-grid .section-head {
  margin-bottom: clamp(32px, 5vw, 48px);
  max-width: 60ch;
}

.contact-grid .section-head p {
  margin-left: auto;
  margin-right: auto;
}

.contact-form {
  max-width: 480px;
  width: 100%;
  text-align: left;
}

.form-field {
  margin-bottom: 18px;
}

.form-field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--gray);
  margin-bottom: 6px;
}

.form-field input,
.form-field textarea {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--gray);
  padding: 10px 2px;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--bone);
  border-radius: 0;
}

.form-field textarea { min-height: 90px; resize: vertical; }

.form-field input:focus,
.form-field textarea:focus {
  outline: none;
  border-bottom-color: var(--red);
}

.contact-form .btn-primary {
  margin-top: 6px;
  border: none;
  width: 100%;
}

/* ---------- footer ---------- */
.site-footer {
  background: linear-gradient(180deg, var(--grad-top), var(--grad-bottom));
  color: var(--bone);
  padding: 32px 0;
}

.site-footer .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 12px;
  opacity: 0.9;
}

.footer-left img { width: 22px; height: 22px; }

.footer-right {
  display: flex;
  align-items: center;
  gap: 18px;
  opacity: 0.75;
}

.footer-right a:hover { color: var(--red); opacity: 1; }

/* ---------- focus states ---------- */
a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}
