:root {
  --primary: #00c853;
  --primary-dark: #009b3f;
  --secondary: #00bcd4;
  --accent: #ff9800;
  --bg-dark: #050814;
  --text-light: #f5f7ff;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  font-family: Arial, sans-serif;
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-dark);
  color: var(--text-light);
}

/* HEADER */
header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.85),
    rgba(0, 188, 212, 0.75)
  );
  backdrop-filter: blur(6px);
  z-index: 1000;
}

header img {
  height: 40px;
  animation: slideInLeft 0.8s ease-out;
}

nav a {
  color: var(--text-light);
  margin-left: 15px;
  text-decoration: none;
  font-size: 0.95rem;
  opacity: 0;
  transform: translateY(-10px);
  animation: navFadeIn 0.8s forwards;
}

nav a:nth-child(1) { animation-delay: 0.2s; }
nav a:nth-child(2) { animation-delay: 0.35s; }
nav a:nth-child(3) { animation-delay: 0.5s; }
nav a:nth-child(4) { animation-delay: 0.65s; }

nav a:hover {
  color: var(--accent);
}

/* HERO / PARALLAX */
.parallax-trepone {
  background-image: url("../../fondo_trepone.jpg");
  min-height: 100vh;
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center 0;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  animation: heroZoom 10s ease-in-out infinite alternate;
}

.overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at top left,
      rgba(0, 188, 212, 0.45),
      rgba(0, 0, 0, 0.7)
    ),
    radial-gradient(circle at bottom right,
      rgba(255, 152, 0, 0.35),
      rgba(0, 0, 0, 0.9)
    );
}

.hero-content {
  position: relative;
  z-index: 1;
  padding: 100px 20px 60px;
  max-width: 700px;
  animation: fadeInUp 1s ease-out;
}

h1, h2, h3 {
  color: var(--text-light);
}

h1 {
  font-size: 3rem;
  margin-bottom: 10px;
  background: linear-gradient(90deg, #ffffff, var(--secondary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.subtitle {
  font-size: 1.1rem;
  max-width: 600px;
  margin: 0 auto 25px;
}

.btn {
  display: inline-block;
  padding: 12px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #ffffff;
  text-decoration: none;
  font-weight: bold;
  border: none;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  animation: pulse 1.8s infinite;
}

.btn:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5);
}

.btn.clicked {
  animation: clickBounce 0.25s;
}

/* MAIN / SECCIONES */
main {
  margin-top: 60px;
}

section {
  padding: 80px 20px;
}

section:nth-of-type(odd) {
  background: linear-gradient(135deg, #0e1629, #07101f);
}

section:nth-of-type(even) {
  background: linear-gradient(135deg, #04121b, #051c2b);
}

section h2 {
  text-align: center;
  margin-bottom: 30px;
  font-size: 2rem;
}

.grid {
  max-width: 1000px;
  margin: 0 auto;
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-2 {
    grid-template-columns: 1.2fr 1fr;
    align-items: center;
  }
}

.card {
  padding: 20px;
  border-radius: 10px;
  background: rgba(7, 16, 31, 0.95);
  border-top: 3px solid var(--secondary);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity 0.6s ease-out,
    transform 0.6s ease-out,
    box-shadow 0.2s ease-out,
    border-color 0.2s ease-out;
}

.card.visible {
  opacity: 1;
  transform: translateY(0);
}

.card:hover {
  border-color: var(--accent);
  transform: translateY(-6px);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.55);
}

.maquina-img {
  max-width: 320px;
  display: block;
  margin: 0 auto;
}

/* CONTACTO */
.mensaje-estado {
  text-align: center;
  color: #00e676;
  font-weight: bold;
  margin-bottom: 20px;
}

form {
  max-width: 400px;
  margin: 0 auto;
}

form input {
  width: 100%;
  margin-bottom: 10px;
  padding: 10px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(3, 10, 20, 0.9);
  color: var(--text-light);
  font-size: 1rem;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

form input::placeholder {
  color: rgba(245, 247, 255, 0.6);
}

form input:focus {
  outline: none;
  border-color: var(--secondary);
  box-shadow: 0 0 0 2px rgba(0, 188, 212, 0.35);
  transform: translateY(-1px);
}

form button {
  width: 100%;
  padding: 12px;
  border-radius: 999px;
  border: none;
  background: linear-gradient(135deg, var(--primary), var(--secondary));
  color: #fff;
  font-weight: bold;
  cursor: pointer;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}

form button:hover {
  background: linear-gradient(135deg, var(--primary-dark), var(--accent));
  transform: translateY(-2px);
  box-shadow: 0 10px 22px rgba(0, 0, 0, 0.5);
}

/* FOOTER */
footer {
  text-align: center;
  padding: 20px;
  background: linear-gradient(90deg, #02040a, #050814);
  color: #9ea7c6;
  font-size: 0.9rem;
}

/* ANIMACIONES */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-40px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes navFadeIn {
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%   { transform: scale(1);   box-shadow: 0 0 0 0 rgba(0, 200, 83, 0.5); }
  70%  { transform: scale(1.03); box-shadow: 0 0 0 15px rgba(0, 200, 83, 0); }
  100% { transform: scale(1);   box-shadow: 0 0 0 0 rgba(0, 200, 83, 0); }
}

@keyframes heroZoom {
  from { background-size: 105%; }
  to   { background-size: 115%; }
}

@keyframes clickBounce {
  0%   { transform: scale(1); }
  50%  { transform: scale(0.96); }
  100% { transform: scale(1); }
}

/* RESPONSIVE */
@media (max-width: 768px) {
  h1 {
    font-size: 2.3rem;
  }
  .parallax-trepone {
    background-attachment: scroll;
  }
}
