:root {
  --bg: #f8f5f0;
  --surface: #ffffff;
  --dark: #18212f;
  --text: #4a5968;
  --muted: #607080;
  --primary: #6f5bff;
  --primary-soft: #f0ecff;
  --accent: #83d6c4;
  --coral: #ffb8a5;
  --line: #e2dcd2;
  --shadow: 0 22px 60px rgba(24, 33, 47, 0.1);
  --radius-xl: 32px;
  --radius-md: 22px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--dark);
  line-height: 1.6;
}

body.menu-open,
body.modal-open {
  overflow: hidden;
}

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

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

button {
  font-family: inherit;
}

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

.site-header {
  position: relative;
  overflow: hidden;
  padding: 24px 0 76px;
}

.blob {
  position: absolute;
  border-radius: 999px;
  filter: blur(64px);
  pointer-events: none;
  z-index: 0;
}

.blob-one {
  width: 360px;
  height: 360px;
  top: -130px;
  right: -110px;
  background: rgba(199, 185, 255, 0.58);
}

.blob-two {
  width: 320px;
  height: 320px;
  left: -100px;
  bottom: 30px;
  background: rgba(131, 214, 196, 0.32);
}

.nav,
.hero {
  position: relative;
  z-index: 1;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 0 58px;
}

.brand {
  display: grid;
  gap: 2px;
}

.brand-name {
  font-size: 21px;
  font-weight: 900;
  letter-spacing: -0.045em;
}

.brand-subtitle {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.27em;
  text-transform: uppercase;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 30px;
  color: var(--text);
  font-size: 15px;
}

.nav-links a {
  transition: color 0.2s ease;
}

.nav-links a:hover {
  color: var(--primary);
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  cursor: pointer;
  place-items: center;
  gap: 4px;
  padding: 11px;
}

.menu-toggle span {
  display: block;
  width: 20px;
  height: 2px;
  border-radius: 999px;
  background: var(--dark);
}

.nav-button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  border-radius: 999px;
  border: 0;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.nav-button:hover,
.button:hover {
  transform: translateY(-2px);
}

.nav-button {
  padding: 12px 24px;
  background: var(--dark);
  color: white;
  box-shadow: 0 18px 38px rgba(24, 33, 47, 0.16);
}

.hero {
  display: grid;
  grid-template-columns: 1.04fr 0.96fr;
  gap: 54px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 17px;
  border: 1px solid #ddd6cc;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--text);
  font-size: 14px;
  box-shadow: 0 12px 28px rgba(24, 33, 47, 0.07);
  margin-bottom: 28px;
}

.eyebrow span {
  color: var(--primary);
}

h1,
.section-heading h2,
.about-section h2,
.projects-header h2,
.tools-panel h2,
.contact-box h2 {
  letter-spacing: -0.05em;
  line-height: 1.02;
}

h1 {
  max-width: 760px;
  font-size: clamp(42px, 5.5vw, 72px);
}

.hero-text {
  max-width: 650px;
  margin-top: 24px;
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
}

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

.button {
  padding: 14px 26px;
}

.button-primary {
  background: var(--primary);
  color: white;
  box-shadow: 0 20px 36px rgba(111, 91, 255, 0.25);
}

.button-light {
  border: 1px solid #d7d0c6;
  background: rgba(255, 255, 255, 0.85);
  color: var(--dark);
  box-shadow: 0 10px 22px rgba(24, 33, 47, 0.07);
}

.profile-card {
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 34px;
  background: rgba(255, 255, 255, 0.72);
  padding: 20px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.screen-card {
  min-height: 470px;
  border-radius: 26px;
  background: var(--dark);
  color: white;
  padding: 28px;
}

.screen-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  margin-bottom: 52px;
}

.dots {
  display: flex;
  gap: 8px;
}

.dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
}

.coral { background: var(--coral); }
.yellow { background: #f5d66b; }
.green { background: var(--accent); }

.screen-label,
.section-label,
.project-area {
  text-transform: uppercase;
  letter-spacing: 0.22em;
  font-size: 12px;
  font-weight: 900;
}

.screen-label {
  margin-bottom: 12px;
  color: var(--accent);
}

.screen-card h2 {
  font-size: 34px;
  letter-spacing: -0.045em;
}

.screen-card > p:not(.screen-label) {
  margin-top: 12px;
  max-width: 380px;
  color: rgba(255, 255, 255, 0.7);
}

.screen-list {
  display: grid;
  gap: 14px;
  margin-top: 48px;
}

.screen-list div {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.1);
  padding: 17px;
}

.screen-list strong {
  display: block;
  margin-bottom: 12px;
  font-size: 14px;
}

.screen-list span {
  display: block;
  height: 8px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.12);
}

.screen-list i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #c7b9ff, var(--coral));
}

.section {
  padding: 88px 0;
}

.section-label {
  color: var(--primary);
  margin-bottom: 12px;
}

.section-heading {
  max-width: 760px;
}

.section-heading h2,
.about-section h2,
.projects-header h2,
.tools-panel h2,
.contact-box h2 {
  font-size: clamp(34px, 4vw, 54px);
}

.section-heading p,
.projects-header > p,
.contact-box p {
  color: var(--text);
  font-size: 18px;
  line-height: 1.75;
  margin-top: 18px;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 18px;
  margin-top: 42px;
}

.service-card,
.project-card,
.tools-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: var(--surface);
  box-shadow: 0 12px 24px rgba(24, 33, 47, 0.04);
}

.service-card {
  padding: 26px;
}

.service-card,
.project-card {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.service-card:hover,
.project-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 24px 46px rgba(24, 33, 47, 0.09);
}

.icon-box {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 18px;
  margin-bottom: 22px;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 22px;
  font-weight: 900;
}

.service-card h3 {
  margin-bottom: 10px;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.service-card p,
.project-card p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.72;
}

.about-section {
  padding: 88px 0;
  background: var(--dark);
  color: white;
}

.about-grid {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 60px;
  align-items: start;
}

.about-section .section-label {
  color: var(--accent);
}

.about-text p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 18px;
  line-height: 1.78;
}

.about-text p + p {
  margin-top: 20px;
}

.projects-header {
  display: grid;
  grid-template-columns: 1fr 0.72fr;
  gap: 40px;
  align-items: end;
  margin-bottom: 42px;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
}

.project-card {
  overflow: hidden;
}

.project-card img {
  width: 100%;
  height: 245px;
  object-fit: cover;
  border-bottom: 1px solid var(--line);
  transition: transform 0.35s ease;
}

.project-card:hover img {
  transform: scale(1.035);
}

.project-body {
  padding: 24px;
}

.project-area {
  margin-bottom: 10px;
  color: var(--primary);
  letter-spacing: 0.14em;
}

.project-card h3 {
  font-size: 24px;
  letter-spacing: -0.04em;
  margin-bottom: 10px;
}

.project-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--dark);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 900;
  transition: transform 0.2s ease, color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}

.project-link::after {
  content: '→';
}

.project-link:hover {
  transform: translateY(-1px);
  border-color: rgba(111, 91, 255, 0.35);
  background: var(--primary-soft);
  color: var(--primary);
}

.project-button {
  font: inherit;
  cursor: pointer;
}

.tools-section {
  padding-top: 0;
}

.tools-panel {
  padding: 38px;
}

.tools-list {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.tools-list span {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  padding: 10px 16px;
  font-size: 14px;
  font-weight: 800;
}

.contact-section {
  padding: 0 0 90px;
}

.contact-box {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: center;
  border-radius: 38px;
  background: var(--primary);
  color: white;
  padding: 58px;
  box-shadow: 0 30px 70px rgba(111, 91, 255, 0.22);
}

.contact-box .section-label,
.contact-box p {
  color: rgba(255, 255, 255, 0.78);
}

.contact-actions {
  display: grid;
  gap: 12px;
}

.button-dark {
  background: white;
  color: var(--primary);
}

.button-outline {
  border: 1px solid rgba(255, 255, 255, 0.38);
  background: transparent;
  color: white;
}

.site-footer {
  color: var(--muted);
  text-align: center;
  padding: 28px 20px 48px;
  font-size: 14px;
}

.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 33, 47, 0.72);
  backdrop-filter: blur(5px);
}

.modal-content {
  position: relative;
  z-index: 1;
  width: min(1040px, 100%);
  max-height: 88vh;
  overflow: auto;
  border-radius: 28px;
  background: white;
  padding: 20px;
  box-shadow: var(--shadow);
}

.modal-content h3 {
  padding: 0 48px 14px 4px;
  font-size: 22px;
  letter-spacing: -0.03em;
}

.modal-content img {
  width: 100%;
  border-radius: 18px;
}

.modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--dark);
  color: white;
  cursor: pointer;
  font-size: 26px;
  line-height: 1;
}

@media (max-width: 920px) {
  .container {
    width: min(100% - 32px, 1120px);
  }

  .menu-toggle {
    display: grid;
  }

  .nav-links {
    position: fixed;
    top: 82px;
    left: 16px;
    right: 16px;
    z-index: 20;
    display: grid;
    gap: 6px;
    border: 1px solid var(--line);
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.95);
    padding: 16px;
    box-shadow: var(--shadow);
    transform: translateY(-12px);
    opacity: 0;
    pointer-events: none;
    transition: 0.2s ease;
  }

  .nav-links.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }

  .nav-links a {
    padding: 12px 14px;
    border-radius: 16px;
  }

  .nav-links a:hover {
    background: var(--primary-soft);
  }

  .nav-button {
    display: none;
  }

  .hero,
  .about-grid,
  .projects-header,
  .contact-box {
    grid-template-columns: 1fr;
  }

  .hero {
    gap: 42px;
  }

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

  .contact-actions {
    width: 100%;
  }
}

@media (max-width: 620px) {
  .site-header {
    padding-top: 16px;
  }

  .nav {
    padding-bottom: 40px;
  }

  .brand-name {
    font-size: 19px;
  }

  h1 {
    font-size: clamp(38px, 13vw, 54px);
  }

  .eyebrow {
    align-items: flex-start;
    border-radius: 20px;
  }

  .hero-actions,
  .button,
  .contact-actions .button {
    width: 100%;
  }

  .profile-card {
    padding: 12px;
    border-radius: 26px;
  }

  .screen-card {
    min-height: auto;
    padding: 22px;
    border-radius: 22px;
  }

  .screen-top {
    margin-bottom: 34px;
  }

  .screen-card h2 {
    font-size: 30px;
  }

  .section,
  .about-section {
    padding: 68px 0;
  }

  .project-card img {
    height: 210px;
  }

  .tools-panel {
    padding: 26px;
  }

  .contact-box {
    padding: 34px 24px;
    border-radius: 28px;
  }
}

/* Ajuste menú móvil: evita que quede debajo del hero y mejora legibilidad */
@media (max-width: 920px) {
  .site-header {
    overflow: visible;
  }

  .nav {
    z-index: 1000;
  }

  .hero {
    z-index: 1;
  }

  .menu-toggle {
    position: relative;
    z-index: 2100;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(24, 33, 47, 0.10);
  }

  .nav-links {
    top: 88px;
    z-index: 2000;
    background: #ffffff;
    border: 1px solid var(--line);
    box-shadow: 0 24px 60px rgba(24, 33, 47, 0.18);
    backdrop-filter: none;
  }

  .nav-links a {
    color: var(--dark);
    font-weight: 850;
    background: var(--bg);
    border: 1px solid var(--line);
  }

  .nav-links a:hover,
  .nav-links a:focus-visible {
    background: var(--primary-soft);
    color: var(--primary);
  }

  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 900;
    background: rgba(24, 33, 47, 0.16);
    pointer-events: none;
  }
}


/* Fix móvil: evita que la página se corra hacia los costados */
html,
body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

.site-header,
.section,
.about-section,
.contact-section,
main {
  max-width: 100%;
}

@media (max-width: 920px) {
  .site-header {
    overflow-x: hidden;
    overflow-y: visible;
  }

  .nav-links {
    width: auto;
    max-width: calc(100vw - 32px);
    left: 16px;
    right: 16px;
  }
}

@media (max-width: 620px) {
  .container {
    width: 100%;
    max-width: 100%;
    padding-inline: 16px;
  }

  .hero,
  .services-grid,
  .projects-grid,
  .about-grid,
  .contact-box,
  .tools-panel,
  .project-card,
  .service-card,
  .profile-card {
    width: 100%;
    max-width: 100%;
  }

  .project-card,
  .service-card,
  .tools-panel,
  .contact-box,
  .profile-card {
    overflow: hidden;
  }

  .project-card img,
  .profile-card img,
  .screen-card,
  .preview-card {
    max-width: 100%;
  }

  h1 {
    font-size: clamp(36px, 11vw, 48px);
    overflow-wrap: break-word;
  }

  .eyebrow {
    width: 100%;
  }
}
