/* Mobile overflow fix */
html, body { overflow-x: hidden; width: 100%; max-width: 100vw; }
*, *::before, *::after { box-sizing: border-box; }

/* ============================================
   GRAMA IMPERIAL - Modern Design
   ============================================ */

:root {
  /* Paleta Magigramas + Grama Imperial */
  --green-900: #003d25;
  --green-800: #005a38;
  --green-700: #008053;
  --green-600: #00a86b;
  --green-500: #00d084;
  --green-400: #33db9a;
  --green-300: #7bdcb5;
  --green-200: #a8efc2;
  --green-100: #d4f7e2;
  --green-50: #edfbf3;

  --accent: #ff665e;

  --dark: #32373c;
  --gray-900: #212226;
  --gray-800: #32373c;
  --gray-700: #4a4f57;
  --gray-600: #5f646c;
  --gray-500: #6b7280;
  --gray-400: #9ca3af;
  --gray-300: #d1d5db;
  --gray-200: #e5e7eb;
  --gray-100: #f3f4f6;
  --gray-50: #f9fafb;

  --white: #ffffff;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.07), 0 2px 4px -2px rgba(0,0,0,0.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -4px rgba(0,0,0,0.05);
  --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.08), 0 8px 10px -6px rgba(0,0,0,0.04);
  --radius: 12px;
  --radius-sm: 8px;
  --radius-lg: 20px;
  --radius-pill: 50px;
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body {
  overflow-x: hidden;
  width: 100%;
  max-width: 100vw;
}

*, *::before, *::after {
  box-sizing: border-box;
}


*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-padding-top: 80px; }
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
body {
  font-family: 'Roboto', -apple-system, sans-serif;
  color: var(--gray-800);
  line-height: 1.7;
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { text-decoration: none; color: inherit; }

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ---- HEADER ---- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: var(--transition);
  will-change: background, box-shadow;
  transform: translateZ(0);
}
.header--scrolled {
  background: rgba(255,255,255,0.97);
  border-bottom-color: var(--gray-200);
  box-shadow: var(--shadow-sm);
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
}

.logo {
  display: flex;
  align-items: center;
}
.logo__img {
  height: 120px;
  width: auto;
}
.logo__img--footer {
  height: 90px;
  filter: brightness(0) invert(1);
}

.nav { display: flex; align-items: center; gap: 8px; }
.nav__link {
  padding: 8px 16px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--gray-700);
  border-radius: var(--radius-sm);
  transition: var(--transition);
}
.nav__link:hover {
  color: var(--green-700);
  background: var(--green-50);
}
.nav__link--cta {
  background: var(--green-700);
  color: var(--white) !important;
  margin-left: 8px;
  border-radius: var(--radius-pill);
}
.nav__link--cta:hover {
  background: var(--green-800) !important;
}

.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--gray-800);
  border-radius: 2px;
  transition: var(--transition);
}
.menu-toggle--active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.menu-toggle--active span:nth-child(2) { opacity: 0; }
.menu-toggle--active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ---- HERO ---- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  background: var(--green-900) url('hero-bg.jpg') center center / cover no-repeat;
  overflow: hidden;
}
.hero__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.25);
}
.hero__content {
  position: relative;
  padding: 120px 0 80px;
}
.hero__badge {
  display: inline-block;
  padding: 8px 20px;
  background: rgba(255,255,255,0.15);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 100px;
  color: var(--green-200);
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 24px;
  backdrop-filter: blur(8px);
}
.hero__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  color: var(--white);
  line-height: 1.15;
  margin-bottom: 24px;
}
.hero__title .text-accent { color: var(--green-400); }
.hero__text {
  font-size: 1.15rem;
  color: rgba(255,255,255,0.8);
  max-width: 600px;
  margin-bottom: 36px;
  line-height: 1.8;
}
.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 60px;
}
.hero__actions .btn {
  padding: 14px 28px;
  min-width: 268px;
  justify-content: center;
  box-sizing: border-box;
  white-space: nowrap;
}

.hero__stats {
  display: flex;
  gap: 48px;
  padding-top: 40px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.hero__stat-number {
  display: block;
  font-family: 'Playfair Display', serif;
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--white);
}
.hero__stat-label {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* ---- BUTTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 36px;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: var(--radius-pill);
  border: 2px solid transparent;
  cursor: pointer;
  transition: var(--transition);
  font-family: inherit;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.btn--primary {
  background: var(--green-700);
  color: var(--white);
  border-color: var(--green-700);
}
.btn--primary:hover {
  background: var(--white);
  color: var(--green-700);
  border-color: var(--green-700);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,128,83,0.3);
}
.btn--outline {
  background: transparent;
  color: var(--white);
  border-color: rgba(255,255,255,0.4);
}
.btn--outline:hover {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.7);
}
.btn--small {
  padding: 10px 28px;
  font-size: 0.85rem;
  background: var(--green-700);
  color: var(--white);
  border-radius: var(--radius-pill);
}
.btn--small:hover {
  background: var(--white);
  color: var(--green-700);
  border-color: var(--green-700);
  transform: translateY(-1px);
}
.btn--large {
  padding: 18px 48px;
  font-size: 1.05rem;
}

/* ---- SECTIONS ---- */
.section {
  padding: 100px 0;
}
.section--alt {
  background: var(--gray-50);
}
.section--dark {
  background: var(--gray-900);
}
.section--green {
  background: linear-gradient(135deg, var(--green-800), var(--green-600));
}
.section__header {
  text-align: center;
  margin-bottom: 60px;
}
.section__label {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--green-600);
  margin-bottom: 12px;
}
.section__label--light { color: var(--green-300); }
.section__title {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: var(--gray-900);
  line-height: 1.3;
}
.section__title--light { color: var(--white); }
.section__subtitle {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.7);
  margin-top: 12px;
}

/* ---- ABOUT ---- */
.about__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}
.about__image-photo {
  width: 100%;
  border-radius: var(--radius-lg);
  display: block;
}
.about__text p {
  margin-bottom: 16px;
  color: var(--gray-600);
  font-size: 1.05rem;
}
.about__features {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-top: 32px;
}
.about__feature {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: var(--green-50);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.9rem;
  color: var(--gray-700);
}
.about__feature-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--green-600);
  color: var(--white);
  border-radius: 50%;
  font-size: 0.75rem;
  flex-shrink: 0;
}

/* ---- PRODUCTS ---- */
.products__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.product-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: var(--green-300);
}
.product-card__image {
  height: 200px;
  background: linear-gradient(135deg, var(--green-200), var(--green-100));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  overflow: hidden;
}
.product-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.product-card__body {
  padding: 28px;
  display: flex;
  flex-direction: column;
  flex: 1;
  position: relative;
}
.product-card__body .btn {
  margin-top: auto;
}
.product-card__tag {
  position: absolute;
  top: -14px;
  left: 20px;
  display: inline-block;
  padding: 4px 12px;
  background: var(--green-600);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: 100px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.product-card__title {
  font-family: 'Playfair Display', serif;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--gray-900);
  margin-bottom: 12px;
}
.product-card__text {
  color: var(--gray-600);
  font-size: 0.95rem;
  margin-bottom: 16px;
}
.product-card__list {
  list-style: none;
  margin-bottom: 20px;
}
.product-card__list li {
  padding: 4px 0;
  font-size: 0.9rem;
  color: var(--gray-600);
}
.product-card__list li::before {
  content: "\2713  ";
  color: var(--green-500);
  font-weight: 700;
}

/* ---- SERVICES ---- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.service-card {
  padding: 36px 28px;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-200);
  text-align: center;
  transition: var(--transition);
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--green-300);
}
.service-card__icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
}
.service-card__title {
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--gray-900);
  margin-bottom: 8px;
}
.service-card p {
  color: var(--gray-500);
  font-size: 0.92rem;
}

/* ---- PRODUCTION ---- */
.production__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.production__step {
  text-align: center;
  padding: 36px 20px;
}
.production__number {
  font-family: 'Playfair Display', serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--green-400);
  margin-bottom: 16px;
  line-height: 1;
}
.production__step h3 {
  color: var(--white);
  font-size: 1.15rem;
  margin-bottom: 12px;
}
.production__step p {
  color: rgba(255,255,255,0.6);
  font-size: 0.9rem;
}

/* ---- STATES ---- */
.states__grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
}
.state-tag {
  padding: 14px 28px;
  background: var(--green-50);
  border: 1px solid var(--green-200);
  border-radius: 100px;
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--green-700);
  transition: var(--transition);
}
.state-tag:hover {
  background: var(--green-600);
  color: var(--white);
  border-color: var(--green-600);
  transform: scale(1.05);
}

/* ---- BLOG ---- */
.blog__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.blog-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--gray-200);
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
}
.blog-card__image {
  height: 180px;
  min-height: 180px;
  max-height: 180px;
  background: linear-gradient(135deg, var(--green-100), var(--green-50));
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}
.blog-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  font-size: 3rem;
}
.blog-card__body {
  padding: 24px;
}
.blog-card__date {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-600);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.blog-card__title {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--gray-900);
  margin: 8px 0 12px;
  line-height: 1.4;
}
.blog-card p {
  color: var(--gray-500);
  font-size: 0.9rem;
}
.blog-card__link {
  display: inline-block;
  margin-top: 16px;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--green-600);
  transition: var(--transition);
}
.blog-card__link:hover { color: var(--green-800); }

/* ---- FORM ---- */
.form {
  max-width: 800px;
  margin: 0 auto;
}
.form__grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  margin-bottom: 20px;
}
.form__group--full { margin-bottom: 28px; }
.form__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255,255,255,0.9);
  margin-bottom: 8px;
}
.form__input {
  width: 100%;
  padding: 14px 18px;
  font-size: 0.95rem;
  font-family: inherit;
  border: 2px solid rgba(255,255,255,0.2);
  border-radius: var(--radius-sm);
  background: rgba(255,255,255,0.1);
  color: var(--white);
  transition: var(--transition);
  outline: none;
}
.form__input::placeholder { color: rgba(255,255,255,0.4); }
.form__input:focus {
  border-color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.15);
}
.form__input option { color: var(--gray-800); }
.form__textarea { resize: vertical; }
.form .btn { width: 100%; }

/* ---- FOOTER ---- */
.footer {
  background: var(--gray-900);
  padding-top: 60px;
}
.footer__inner {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
.footer__heading {
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 16px;
}
.footer__text {
  color: var(--gray-400);
  font-size: 0.9rem;
  line-height: 1.8;
}
.footer__link {
  display: block;
  color: var(--gray-400);
  font-size: 0.9rem;
  padding: 4px 0;
  transition: var(--transition);
}
.footer__link:hover { color: var(--green-400); }
.footer__bottom {
  padding: 20px 0;
  text-align: center;
}
.footer__bottom p {
  color: var(--gray-600);
  font-size: 0.85rem;
}

/* ---- WHATSAPP ---- */
.whatsapp-btn {
  position: fixed;
  bottom: 28px;
  right: 28px;
  width: 60px;
  height: 60px;
  background: #25D366;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 20px rgba(37,211,102,0.4);
  transition: var(--transition);
  z-index: 999;
}
.whatsapp-btn:hover {
  transform: scale(1.1);
  box-shadow: 0 6px 28px rgba(37,211,102,0.5);
}

/* ---- ANIMATIONS ---- */
.fade-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
.fade-in--visible {
  will-change: auto;
}
.fade-in--visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---- RESPONSIVE ---- */

@media (max-width: 1024px) {
  .products__grid { grid-template-columns: repeat(2, 1fr); }
  .production__grid { grid-template-columns: repeat(2, 1fr); }
}


/* Mobile scroll performance */
@media (max-width: 768px) {
  .header {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  * {
    -webkit-tap-highlight-color: transparent;
  }
}

@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  .container { max-width: 100%; overflow-x: hidden; }
  .hero { overflow: hidden; }
  .hero__stats { overflow: hidden; }

  .menu-toggle { display: flex; }
  .nav {
    position: fixed;
    top: 76px;
    left: 0;
    right: 0;
    background: var(--white);
    flex-direction: column;
    padding: 20px 24px;
    gap: 4px;
    border-bottom: 1px solid var(--gray-200);
    box-shadow: var(--shadow-lg);
    transform: translateY(-120%);
    opacity: 0;
    transition: var(--transition);
  }
  .nav--open {
    transform: translateY(0);
    opacity: 1;
  }
  .nav__link--cta { margin-left: 0; text-align: center; }

  .hero {
    min-height: 100vh;
    min-height: 100dvh;
    background-position: center center;
    background-size: cover;
  }
  .hero__overlay {
    background: rgba(0, 0, 0, 0.45);
  }
  .hero__content {
    padding: 110px 0 50px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    box-sizing: border-box;
  }
  .hero__badge {
    margin-left: auto;
    margin-right: auto;
  }
  .hero__title {
    font-size: 2rem;
    margin-bottom: 16px;
    width: 100%;
    text-shadow: 0 2px 8px rgba(0,0,0,0.4);
  }
  .hero__text {
    font-size: 1rem;
    margin-bottom: 28px;
    max-width: 100%;
    width: 100%;
    text-shadow: 0 1px 4px rgba(0,0,0,0.3);
  }
  .hero__actions {
    margin-bottom: 36px;
    justify-content: center;
    width: 100%;
  }
  .hero__stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px 16px;
    padding-top: 32px;
    width: 100%;
  }
  .hero__stat { text-align: center; }
  .hero__stat-number {
    font-size: 1.8rem;
    text-shadow: 0 2px 6px rgba(0,0,0,0.3);
  }

  .section { padding: 50px 0; }
  .section__title { font-size: 1.5rem; }

  .about__grid { grid-template-columns: 1fr; gap: 32px; }
  .products__grid { grid-template-columns: 1fr; }
  .blog__grid { grid-template-columns: repeat(2, 1fr); }
  .footer__inner { grid-template-columns: repeat(2, 1fr); }
  .contact__grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .hero__overlay {
    background: rgba(0, 0, 0, 0.50);
  }
  .hero__content {
    padding: 90px 16px 36px;
  }
  .hero__title {
    font-size: 1.5rem;
    line-height: 1.25;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
  }
  .hero__title br { display: none; }
  .hero__badge { font-size: 0.75rem; padding: 6px 14px; }
  .hero__text {
    font-size: 0.9rem;
    line-height: 1.7;
    margin-bottom: 24px;
    text-shadow: 0 1px 6px rgba(0,0,0,0.4);
  }
  .hero__actions {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }
  .hero__actions .btn {
    width: auto;
    min-width: 0;
    padding: 14px 24px;
    text-align: center;
    justify-content: center;
    white-space: nowrap;
  }
  .hero__stats {
    gap: 16px 12px;
    padding-top: 24px;
  }
  .hero__stat-number { font-size: 1.4rem; }
  .hero__stat-label { font-size: 0.7rem; }

  .section { padding: 40px 0; }
  .section__title { font-size: 1.3rem; }
  .section__label { font-size: 0.7rem; }

  .about__features { grid-template-columns: 1fr; }
  .about__text p { font-size: 0.95rem; }

  .product-card__image { height: 150px; }
  .product-card__body { padding: 20px; }
  .product-card__title { font-size: 1.2rem; }

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

  .blog-card__image { height: 140px; }
  .blog-card__body { padding: 16px; }
  .blog__grid { grid-template-columns: 1fr; }

  .footer__inner { grid-template-columns: 1fr; gap: 20px; }
  .footer__heading { font-size: 0.8rem; }
}
