/* ============================================================
   SERMEC - Agro & Industria | Stylesheet
   ============================================================ */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --black:        #0a0a0a;
  --black-2:      #121212;
  --gray-dark:    #1a1a1a;
  --gray-mid:     #2a2a2a;
  --gray-light:   #e0e0e0;
  --accent:       #ffcc00;
  --accent-hover: #e6b800;
  --white:        #ffffff;
  --font:         'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --max-w:        1200px;
  --nav-h:        72px;
  --topbar-h:     38px;
  --radius:       6px;
  --transition:   0.3s ease;
}

html {
  scroll-behavior: smooth;
  font-size: 16px;
}

body {
  font-family: var(--font);
  background: var(--black);
  color: var(--gray-light);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }

.container {
  width: 100%;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}

.text-accent { color: var(--accent); }

/* ---------- TOP BAR ---------- */
.topbar {
  background: var(--gray-dark);
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  font-size: 0.8125rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.topbar__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
}

.topbar__item a { color: var(--gray-light); transition: color var(--transition); }
.topbar__item a:hover { color: var(--accent); }

/* ---------- HEADER ---------- */
.header {
  background: var(--white);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
}

.header__inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 24px;
}

.header__logo {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--black);
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.header__logo span {
  font-weight: 400;
  font-size: 0.8rem;
  letter-spacing: 0.3px;
  color: var(--gray-mid);
}

.header__nav ul {
  display: flex;
  gap: 32px;
}

.nav-link {
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 1px;
  color: var(--black-2);
  transition: color var(--transition);
  position: relative;
  padding: 4px 0;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 2px;
  background: var(--accent);
  transition: width var(--transition);
}
.nav-link:hover { color: var(--accent); }
.nav-link:hover::after { width: 100%; }

/* Hamburger */
.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}
.hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--black);
  transition: var(--transition);
  border-radius: 2px;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

.header__cta {
  white-space: nowrap;
}

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  font-weight: 700;
  font-size: 0.875rem;
  letter-spacing: 0.5px;
  padding: 12px 28px;
  border-radius: var(--radius);
  border: 2px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  text-align: center;
}
.btn--primary {
  background: var(--accent);
  color: var(--black);
  border-color: var(--accent);
}
.btn--primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(255,204,0,0.3);
}
.btn--ghost {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.3);
}
.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.btn--outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--accent);
  font-size: 0.8rem;
  padding: 8px 20px;
}
.btn--outline:hover {
  background: var(--accent);
  color: var(--black);
}
.btn--sm { font-size: 0.75rem; padding: 8px 18px; }
.btn--submit {
  width: 100%;
  background: #1b5e20;
  color: var(--white);
  border-color: #1b5e20;
  font-size: 1rem;
  padding: 14px 28px;
  margin-top: 8px;
}
.btn--submit:hover {
  background: #2e7d32;
  border-color: #2e7d32;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(27,94,32,0.3);
}

/* ---------- SECTION TITLES ---------- */
.section__title {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -1px;
  color: var(--black);
  margin-bottom: 16px;
}
.section__title--light {
  color: var(--white);
}
.section__subtitle {
  font-size: 1.1rem;
  color: var(--gray-light);
  max-width: 600px;
  margin-bottom: 48px;
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: calc(100vh - var(--topbar-h) - var(--nav-h));
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero__bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 30% 50%, #1a1a1a 0%, var(--black) 70%);
  z-index: 0;
}
.hero__bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.015'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  opacity: 0.4;
}
.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
}
.hero__title {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 900;
  line-height: 1.1;
  color: var(--white);
  margin-bottom: 24px;
  letter-spacing: -2px;
}
.hero__subtitle {
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--gray-light);
  margin-bottom: 40px;
  max-width: 640px;
  line-height: 1.7;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- VALOR ---------- */
.valor {
  background: var(--gray-dark);
  padding: 100px 0;
}
.valor__inner {
  max-width: 720px;
}
.valor__text {
  font-size: 1.1rem;
  color: var(--gray-light);
  margin-bottom: 40px;
  line-height: 1.7;
}
.valor__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

/* ---------- PRODUCTOS ---------- */
.productos {
  background: var(--black-2);
  padding: 100px 0;
}
.productos__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 24px;
}

.producto-card {
  background: var(--gray-dark);
  border-radius: var(--radius);
  overflow: hidden;
  transition: transform var(--transition), box-shadow var(--transition);
  border: 1px solid rgba(255,255,255,0.06);
}
.producto-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(0,0,0,0.4);
  border-color: rgba(255,204,0,0.15);
}

.producto-card__img {
  height: 200px;
  background: var(--gray-mid);
  display: flex;
  align-items: center;
  justify-content: center;
}
.producto-card__placeholder {
  color: rgba(255,255,255,0.15);
}
.producto-card__body {
  padding: 24px;
}
.producto-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 8px;
}
.producto-card__desc {
  font-size: 0.875rem;
  color: var(--gray-light);
  margin-bottom: 20px;
  line-height: 1.6;
}

/* ---------- SERVICIOS ---------- */
.servicios {
  position: relative;
  padding: 100px 0;
  background: var(--black);
  background-image: linear-gradient(135deg, #0a0a0a 0%, #1a1a1a 50%, #0a0a0a 100%);
}
.servicios__overlay {
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
  opacity: 0.6;
  z-index: 0;
}
.servicios > .container { position: relative; z-index: 1; }

.servicios__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.servicio-card {
  background: rgba(26,26,26,0.9);
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 12px;
  padding: 48px 36px;
  transition: transform var(--transition), border-color var(--transition);
}
.servicio-card:hover {
  transform: translateY(-4px);
  border-color: var(--accent);
}
.servicio-card__icon {
  color: var(--accent);
  margin-bottom: 20px;
}
.servicio-card__title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--white);
  margin-bottom: 16px;
  line-height: 1.3;
}
.servicio-card__desc {
  font-size: 0.9375rem;
  color: var(--gray-light);
  margin-bottom: 28px;
  line-height: 1.7;
}
.servicio-card .btn--primary {
  width: 100%;
}

/* ---------- NOSOTROS ---------- */
.nosotros {
  padding: 120px 0;
  background: var(--black);
  border-top: 1px solid rgba(255,255,255,0.04);
  border-bottom: 1px solid rgba(255,255,255,0.04);
}
.nosotros__tag {
  display: inline-block;
  font-size: 0.75rem;
  letter-spacing: 3px;
  color: var(--accent);
  border: 1px solid var(--accent);
  padding: 4px 14px;
  border-radius: 100px;
  margin-bottom: 20px;
}
.nosotros__inner {
  max-width: 860px;
}
.nosotros__text {
  font-size: 1.05rem;
  color: var(--gray-light);
  line-height: 1.8;
  margin-bottom: 24px;
}
.nosotros__valores {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.valor-item__num {
  font-size: 2.5rem;
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}
.valor-item h4 {
  font-size: 1rem;
  font-weight: 600;
  color: var(--white);
}

/* ---------- CONTACTO ---------- */
.contacto__wrapper {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  min-height: 600px;
}

/* Info column */
.contacto__info {
  background: var(--black);
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contacto__title {
  font-size: 3rem;
  font-weight: 900;
  color: var(--white);
  letter-spacing: -2px;
  margin-bottom: 48px;
  line-height: 1.1;
}
.contacto__datos {
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.contacto__datos li {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  font-size: 0.95rem;
  line-height: 1.5;
}
.contacto__datos li strong {
  color: var(--white);
  font-weight: 600;
}
.contacto__datos li a {
  color: var(--accent);
  transition: color var(--transition);
}
.contacto__datos li a:hover {
  color: var(--accent-hover);
}
.contacto__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,204,0,0.1);
  border-radius: 50%;
  color: var(--accent);
}

/* Form column */
.contacto__form {
  background: #f5f5f0;
  padding: 80px 60px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.contacto__form-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--black);
  letter-spacing: -0.5px;
  margin-bottom: 6px;
}
.contacto__form-sub {
  font-size: 0.9375rem;
  color: #555;
  margin-bottom: 32px;
}
.form-group {
  margin-bottom: 18px;
}
.form-group label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--black-2);
  margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 12px 16px;
  font-family: var(--font);
  font-size: 0.9375rem;
  border: 1px solid #ccc;
  border-radius: var(--radius);
  background: var(--white);
  color: var(--black-2);
  transition: border-color var(--transition), box-shadow var(--transition);
  outline: none;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(255,204,0,0.15);
}
.form-group textarea {
  resize: vertical;
  min-height: 100px;
}

/* ---------- FOOTER ---------- */
.footer {
  background: var(--gray-dark);
  padding: 24px 0;
  text-align: center;
  font-size: 0.8125rem;
  color: rgba(255,255,255,0.4);
  border-top: 1px solid rgba(255,255,255,0.04);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 968px) {
  .contacto__wrapper {
    grid-template-columns: 1fr;
  }
  .contacto__info {
    padding: 60px 32px;
  }
  .contacto__form {
    padding: 60px 32px;
  }
  .servicios__grid {
    grid-template-columns: 1fr;
  }
  .nosotros__valores {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

@media (max-width: 768px) {
  :root { --nav-h: 64px; }

  .topbar__inner {
    flex-direction: column;
    gap: 2px;
    font-size: 0.75rem;
    padding: 4px 16px;
  }
  .topbar { height: auto; padding: 6px 0; }

  .hamburger { display: flex; }
  .header__nav {
    position: absolute;
    top: var(--nav-h);
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
    padding: 16px 24px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding 0.3s ease;
  }
  .header__nav.open {
    max-height: 400px;
    padding: 24px;
  }
  .header__nav ul {
    flex-direction: column;
    gap: 16px;
  }
  .header__cta {
    font-size: 0.75rem;
    padding: 8px 16px;
    margin-left: auto;
  }
  .header__logo { font-size: 1rem; }
  .header__logo span { display: none; }

  .section__title {
    font-size: 1.8rem;
  }
  .section__subtitle {
    font-size: 0.95rem;
    margin-bottom: 32px;
  }

  .hero__actions { flex-direction: column; }
  .hero__actions .btn { width: 100%; justify-content: center; }

  .valor__actions { flex-direction: column; }
  .valor__actions .btn { width: 100%; justify-content: center; }

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

  .servicio-card {
    padding: 32px 24px;
  }

  .contacto__title {
    font-size: 2.2rem;
  }
}

@media (max-width: 480px) {
  .container { padding: 0 16px; }
  .header__inner { padding: 0 16px; }
  .header__cta { display: none; }
  .hero { min-height: auto; padding: 80px 0 60px; }
  .valor { padding: 60px 0; }
  .productos { padding: 60px 0; }
  .servicios { padding: 60px 0; }
  .nosotros { padding: 80px 0; }
}
