/* styles.css */
:root {
  --dark: #1c2430;
  --dark-2: #151b25;
  --muted-dark: #232b37;
  --text: #c7cdd6;
  --white: #ffffff;
  --accent: #d97d4c;
  --accent-dark: #9b5b3e;
  --radius: 10px;
}
/* Quitar color azul y subrayado de links en proyectos destacados */
.project-link {
  color: inherit;
  text-decoration: none;
}
.project-link:visited {
  color: inherit;
}
.project-link:hover,
.project-link:focus {
  box-shadow: 0 0 0 2px var(--accent);
  outline: none;
  color: inherit;
}

* {
  box-sizing: border-box;
}
html,
body {
  height: 100%;
}
body {
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial;
  background: var(--dark);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 40px;
}
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  background: var(--dark);
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
}
.brand {
  display: flex;
  align-items: center;
  text-decoration: none;
}
.logo-svg {
  width: 220px;
  height: auto;
  object-fit: contain;
  display: block;
}
.logo-svg.small {
  width: 160px;
  height: auto;
}

.nav {
  display: flex;
  gap: 18px;
}
.nav a {
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.2s ease;
}
.nav a:hover {
  color: var(--accent);
}

.actions {
  display: flex;
  align-items: center;
  gap: 12px;
}
.btn {
  display: inline-block;
  padding: 10px 16px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}
.btn-ghost {
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.04);
  color: var(--text);
}
.btn-primary {
  background: var(--accent);
  color: var(--white);
}
.btn-outline {
  border: 1px solid rgba(199, 205, 214, 0.12);
  color: var(--text);
  background: transparent;
}
.btn-light {
  background: var(--white);
  color: var(--dark);
}

.hamburger {
  display: none;
  background: none;
  border: 0;
  padding: 8px;
  cursor: pointer;
}
.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--text);
  margin: 4px 0;
  border-radius: 2px;
}

/* Hero */
.hero {
  padding: 120px 0 140px;
  background: linear-gradient(135deg, var(--dark) 0%, var(--dark-2) 100%);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  top: -50%;
  right: -10%;
  width: 700px;
  height: 700px;
  background: radial-gradient(
    circle,
    rgba(217, 125, 76, 0.12) 0%,
    transparent 70%
  );
  pointer-events: none;
  animation: pulse 8s ease-in-out infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 0.5;
    transform: scale(1);
  }
  50% {
    opacity: 0.8;
    transform: scale(1.1);
  }
}
.hero-inner {
  display: flex;
  gap: 40px;
  align-items: center;
}
.hero-copy {
  flex: 1;
}
.hero-copy h1 {
  font-family: "Montserrat", "Inter", sans-serif;
  color: var(--white);
  font-size: 3.8rem;
  margin: 0 0 24px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 800;
}
.lead {
  color: var(--text);
  margin: 0 0 36px;
  font-size: 1.25rem;
  line-height: 1.7;
}
.hero-visual {
  width: 360px;
  display: flex;
  justify-content: center;
  align-items: center;
}
.mockphone-img {
  max-width: 120%;
  height: auto;
  filter: drop-shadow(0 20px 60px rgba(0, 0, 0, 0.7));
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-25px);
  }
}

.mockphone-img:hover {
  animation-play-state: paused;
  transform: translateY(-12px) scale(1.02);
}
.mockphone {
  width: 220px;
  height: 420px;
  border-radius: 22px;
  background: linear-gradient(180deg, #0f1720, #0b1115);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}
.mockscreen {
  width: 86%;
  height: 86%;
  background: linear-gradient(180deg, #19202a, #0f1519);
  border-radius: 10px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.4);
}

/* Sections */
.section {
  padding: 100px 0;
}
.section h2 {
  color: var(--white);
  margin: 0 0 60px;
  font-family: "Montserrat", sans-serif;
  font-size: 2.8rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: -0.02em;
}

.grid {
  display: grid;
  gap: 20px;
}
.servicios-grid {
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}
.card {
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.01) 100%
  );
  padding: 40px 32px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: all 0.3s ease;
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}

.card:hover {
  transform: translateY(-8px);
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.06) 0%,
    rgba(255, 255, 255, 0.02) 100%
  );
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(217, 125, 76, 0.3);
  border-color: rgba(217, 125, 76, 0.2);
}
.card h3 {
  margin: 0 0 16px;
  color: var(--white);
  font-size: 1.5rem;
  font-weight: 700;
}
.card p {
  margin: 0;
  color: var(--text);
  font-size: 1.05rem;
  line-height: 1.6;
}

.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
}

/* Unificar tamaño de todos los proyectos destacados */
.portfolio-grid > .project,
.portfolio-grid > a.project-with-visual,
.portfolio-grid > figure.project-with-visual {
  min-width: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  margin: 0;
}

.project {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.01) 100%);
  min-height: 340px;
  border-radius: 20px;
  padding: 0;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.project figcaption {
  position: relative;
  z-index: 2;
  padding: 28px 24px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
}
.project-illustration {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
  background: linear-gradient(
    135deg,
    rgba(217, 125, 76, 0.08) 0%,
    rgba(155, 91, 62, 0.04) 100%
  );
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  transition: transform 0.3s ease;
}

.project:hover .project-illustration {
  transform: scale(1.05);
}
.project:hover {
  transform: translateY(-12px);
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(217, 125, 76, 0.3);
  border-color: rgba(217, 125, 76, 0.2);
}
.project h4 {
  color: var(--white);
  margin: 0;
}
.project p {
  color: var(--text);
  margin: 6px 0 0;
}

.process {
  list-style: none;
  display: flex;
  gap: 18px;
  padding: 0;
  margin: 0;
  flex-wrap: wrap;
}
.process li {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), transparent);
  padding: 18px;
  border-radius: 12px;
  flex: 1;
  min-width: 200px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.process li strong {
  display: inline-block;
  background: var(--accent-dark);
  color: var(--white);
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  flex-shrink: 0;
}

.nosotros {
  background: var(--dark-2);
}

.nosotros-content {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  margin-top: 40px;
  align-items: start;
}

.nosotros-text,
.nosotros-valores {
  align-self: start;
}

.nosotros-text p {
  margin-bottom: 20px;
  line-height: 1.7;
}

.nosotros-text .lead {
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 30px;
}

.nosotros-valores h3 {
  font-family: "Montserrat", sans-serif;
  color: var(--white);
  margin-bottom: 24px;
  font-size: 1.5rem;
  margin-top: 0;
}

.valores-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.valores-list li {
  background: rgba(255, 255, 255, 0.02);
  padding: 20px;
  border-radius: 10px;
  margin-bottom: 16px;
  border-left: 3px solid var(--accent);
  transition: transform 0.2s ease, background 0.2s ease;
}

.valores-list li:hover {
  transform: translateX(4px);
  background: rgba(255, 255, 255, 0.04);
}

.valores-list strong {
  display: block;
  color: var(--white);
  font-weight: 600;
  margin-bottom: 6px;
  font-size: 1.05rem;
}

.valores-list span {
  color: var(--text);
  font-size: 0.95rem;
  line-height: 1.5;
}

.testimonials-grid {
  grid-template-columns: repeat(2, 1fr);
}
.testimonial {
  background: rgba(255, 255, 255, 0.02);
  padding: 20px;
  border-radius: 12px;
}
.testimonial p {
  margin: 0 0 8px;
}
.testimonial cite {
  color: var(--text);
  font-size: 0.95rem;
}

.cta-final {
  background: linear-gradient(90deg, var(--accent), var(--accent-dark));
  color: var(--white);
  text-align: center;
  padding: 48px;
  border-radius: 12px;
}

.footer {
  padding: 40px 0;
  background: #0e1418;
  color: var(--text);
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
  align-items: start;
}
.footer-nav a {
  display: block;
  color: var(--text);
  text-decoration: none;
  margin-bottom: 6px;
}
.muted {
  color: rgba(199, 205, 214, 0.6);
}
.center {
  text-align: center;
}

/* Responsive */
@media (max-width: 920px) {
  .logo-svg {
    width: 180px;
  }
  .hero-inner {
    flex-direction: column-reverse;
  }
  .hero-visual {
    width: 100%;
  }
  .servicios-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .portfolio-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .testimonials-grid {
    grid-template-columns: 1fr;
  }
  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .process {
    gap: 14px;
  }
  .process li {
    min-width: 160px;
    padding: 14px;
  }
  .section {
    padding: 48px 0;
  }
}

@media (max-width: 680px) {
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--dark-2);
    flex-direction: column;
    padding: 20px;
    gap: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  .nav.mobile-open {
    display: flex;
  }
  .nav a {
    padding: 12px 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  }
  .nav a:last-child {
    border-bottom: none;
  }
  .hamburger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
  }
  .logo-svg {
    width: 160px;
  }
  .header {
    padding: 12px 14px;
    position: relative;
  }
  .servicios-grid {
    grid-template-columns: 1fr;
  }
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
  .container {
    padding: 0 14px;
  }
  .hero-copy h1 {
    font-size: 1.6rem;
  }
  .process {
    flex-direction: column;
  }
  .process li {
    width: 100%;
    min-width: unset;
  }
  .footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .cta-final {
    padding: 32px 20px;
  }
  .hero-ctas {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
  .hero-ctas .btn {
    text-align: center;
  }
}

/* Small animations */
.hero-visual .mockphone {
  transform: translateY(0);
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.3, 1);
}
.project:focus {
  outline: 2px solid rgba(217, 125, 76, 0.18);
  transform: translateY(-8px);
}

/* Utility */
.hidden {
  display: none;
}

.back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: none;
  background: var(--accent);
  color: var(--white);
  font-size: 1.4rem;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 50;
}

.back-to-top:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.back-to-top.visible {
  opacity: 1;
  pointer-events: auto;
}

/* Accessibility focus */
a:focus {
  outline: 3px solid rgba(217, 125, 76, 0.22);
  outline-offset: 3px;
}

/* Formulario de Contacto */
.contacto {
  background: var(--dark-2);
}

.contact-form {
  max-width: 700px;
  margin: 40px auto 0;
  background: var(--muted-dark);
  padding: 40px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}

.form-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.form-group label {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--text);
  font-size: 0.95rem;
}

.form-group input,
.form-group textarea,
.form-group select {
  padding: 12px 16px;
  border: 1px solid rgba(199, 205, 214, 0.12);
  border-radius: 8px;
  background: var(--dark);
  color: var(--text);
  font-family: inherit;
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(217, 125, 76, 0.1);
}

.form-group textarea {
  resize: vertical;
  min-height: 120px;
}

.form-group input.error,
.form-group textarea.error {
  border-color: #e74c3c;
}

.error-message {
  color: #e74c3c;
  font-size: 0.85rem;
  margin-top: 6px;
  display: none;
}

.error-message.show {
  display: block;
}

.form-actions {
  margin-top: 30px;
  text-align: center;
}

.btn-submit {
  min-width: 200px;
  padding: 14px 32px;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  transition: background 0.2s ease, transform 0.2s ease;
}

.btn-submit:hover {
  background: var(--accent-dark);
  transform: translateY(-2px);
}

.btn-submit:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.form-message {
  margin-top: 20px;
  padding: 16px;
  border-radius: 8px;
  text-align: center;
  font-weight: 500;
  display: none;
}

.form-message.success {
  display: block;
  background: rgba(46, 204, 113, 0.1);
  border: 1px solid rgba(46, 204, 113, 0.3);
  color: #2ecc71;
}

.form-message.error {
  display: block;
  background: rgba(231, 76, 60, 0.1);
  border: 1px solid rgba(231, 76, 60, 0.3);
  color: #e74c3c;
}

@media (max-width: 920px) {
  .nosotros-content {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .contact-form {
    padding: 24px;
  }

  .btn-submit {
    width: 100%;
  }

  .nosotros-text .lead {
    font-size: 1.05rem;
  }

  .valores-list li {
    padding: 16px;
  }
}
