/* ===========================
   Ultra Agro Torneadora
   Design System
   =========================== */
:root {
  --green: #1B4332;
  --green-dark: #102b20;
  --black: #111111;
  --gray: #707070;
  --gray-light: #e9e9e9;
  --orange: #FF7A00;
  --orange-dark: #e56e00;
  --white: #ffffff;

  --bg: #f5f6f5;
  --surface: #ffffff;
  --text: #1c1c1c;
  --muted: #5d5d5d;

  --shadow-sm: 0 2px 8px rgba(17, 17, 17, 0.08);
  --shadow-md: 0 10px 30px rgba(17, 17, 17, 0.12);
  --shadow-lg: 0 20px 50px rgba(17, 17, 17, 0.22);

  --radius: 14px;
  --container: 1180px;
  --header-h: 76px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html { scroll-behavior: smooth; scroll-padding-top: var(--header-h); }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: 'Oswald', 'Inter', sans-serif; line-height: 1.1; letter-spacing: 0.5px; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }

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

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-weight: 700; font-size: 0.95rem; letter-spacing: 0.4px;
  padding: 14px 26px; border-radius: 10px; border: 2px solid transparent;
  cursor: pointer; transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.25s, color 0.25s;
  text-transform: uppercase;
}
.btn:hover { transform: translateY(-3px); }
.btn--primary { background: var(--orange); color: var(--white); box-shadow: 0 8px 20px rgba(255, 122, 0, 0.35); }
.btn--primary:hover { background: var(--orange-dark); box-shadow: 0 12px 26px rgba(255, 122, 0, 0.45); }
.btn--outline { background: transparent; color: var(--white); border-color: var(--white); }
.btn--outline:hover { background: var(--white); color: var(--green); }
.btn--whatsapp { background: #25D366; color: var(--white); padding: 10px 18px; }
.btn--whatsapp:hover { background: #1ebe5a; }

/* ===== Header ===== */
.header {
  position: fixed; top: 0; left: 0; width: 100%; z-index: 100;
  height: var(--header-h); display: flex; align-items: center;
  background: rgba(17, 17, 17, 0.55); backdrop-filter: blur(10px);
  transition: background 0.3s, box-shadow 0.3s;
}
.header.scrolled { background: var(--black); box-shadow: var(--shadow-md); }
.header__inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; }

.brand { display: flex; align-items: center; gap: 12px; }
.brand__logo { width: 48px; height: 48px; }
.brand__text { display: flex; flex-direction: column; line-height: 1; }
.brand__text strong { font-family: 'Oswald', sans-serif; color: var(--white); font-size: 1.15rem; letter-spacing: 1px; }
.brand__text small { color: var(--orange); font-size: 0.7rem; letter-spacing: 3px; font-weight: 600; }

.nav__list { display: flex; gap: 28px; list-style: none; }
.nav__link {
  color: var(--white); font-weight: 600; font-size: 0.95rem; position: relative; padding: 4px 0;
}
.nav__link::after {
  content: ''; position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
  background: var(--orange); transition: width 0.3s var(--ease);
}
.nav__link:hover, .nav__link.active { color: var(--orange); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

.header__cta { margin-left: 8px; }

.hamburger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; }
.hamburger span { width: 26px; height: 3px; background: var(--white); border-radius: 3px; transition: transform 0.3s var(--ease), opacity 0.3s; }
.hamburger.open span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; }
.hamburger.open span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative; min-height: 100vh; display: flex; align-items: center;
  background: url('/images/hero.jpg') center/cover no-repeat fixed;
  color: var(--white); padding-top: var(--header-h);
}
.hero__overlay {
  position: absolute; inset: 0;
  background: linear-gradient(120deg, rgba(16, 43, 32, 0.92) 0%, rgba(17, 17, 17, 0.78) 55%, rgba(17, 17, 17, 0.45) 100%);
}
.hero__content { position: relative; max-width: 720px; padding-top: 40px; padding-bottom: 40px; }
.hero__badge {
  display: inline-block; background: rgba(255, 122, 0, 0.15); color: var(--orange);
  border: 1px solid var(--orange); padding: 7px 16px; border-radius: 999px;
  font-weight: 600; font-size: 0.8rem; letter-spacing: 1.5px; text-transform: uppercase;
  margin-bottom: 22px; animation: fadeUp 0.8s var(--ease) both;
}
.hero__title {
  font-size: clamp(2.2rem, 5.5vw, 4rem); text-transform: uppercase; margin-bottom: 18px;
  animation: fadeUp 0.8s 0.1s var(--ease) both;
}
.hero__title { color: var(--white); }
.hero__text {
  font-size: clamp(1rem, 2vw, 1.3rem); color: rgba(255,255,255,0.88); max-width: 560px;
  margin-bottom: 34px; animation: fadeUp 0.8s 0.2s var(--ease) both;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 16px; animation: fadeUp 0.8s 0.3s var(--ease) both; }

@keyframes fadeUp { from { opacity: 0; transform: translateY(28px); } to { opacity: 1; transform: translateY(0); } }

/* ===== Sections ===== */
.section { padding: 96px 0; }
.section--alt { background: var(--surface); }
.section__head { text-align: center; max-width: 720px; margin: 0 auto 56px; }
.section__eyebrow {
  display: inline-block; color: var(--orange); font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; font-size: 0.8rem; margin-bottom: 10px;
}
.section__title { font-size: clamp(1.8rem, 4vw, 2.8rem); text-transform: uppercase; color: var(--green); }
.section__subtitle { color: var(--muted); margin-top: 12px; font-size: 1.05rem; }

/* ===== Cards grid ===== */
.cards { display: grid; gap: 28px; }
.cards--3 { grid-template-columns: repeat(3, 1fr); }

.about__lead { text-align: center; font-size: 1.15rem; color: var(--muted); max-width: 820px; margin: 0 auto 56px; }

.info-card, .service-card {
  background: var(--surface); border-radius: var(--radius); padding: 36px 30px;
  box-shadow: var(--shadow-sm); border: 1px solid var(--gray-light);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s;
  position: relative; overflow: hidden;
}
.section--alt .info-card { background: var(--bg); }
.info-card::before, .service-card::before {
  content: ''; position: absolute; left: 0; top: 0; height: 4px; width: 100%;
  background: linear-gradient(90deg, var(--green), var(--orange)); transform: scaleX(0); transform-origin: left;
  transition: transform 0.4s var(--ease);
}
.info-card:hover, .service-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-lg); border-color: var(--orange); }
.info-card:hover::before, .service-card:hover::before { transform: scaleX(1); }
.info-card__icon, .service-card__icon { font-size: 2.6rem; margin-bottom: 16px; }
.info-card h3, .service-card h3 { font-size: 1.4rem; color: var(--green); margin-bottom: 10px; text-transform: uppercase; }
.info-card p, .service-card p { color: var(--muted); }

/* ===== Gallery ===== */
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery__item {
  border: none; padding: 0; cursor: pointer; border-radius: var(--radius); overflow: hidden;
  position: relative; aspect-ratio: 4 / 3; box-shadow: var(--shadow-sm); background: var(--black);
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s var(--ease), opacity 0.4s; }
.gallery__item::after {
  content: '🔍'; position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(27, 67, 50, 0.55); color: var(--white); font-size: 1.8rem; opacity: 0; transition: opacity 0.4s;
}
.gallery__item:hover img { transform: scale(1.1); }
.gallery__item:hover::after { opacity: 1; }

/* ===== Carousel ===== */
.carousel { position: relative; max-width: 760px; margin: 0 auto; overflow: hidden; }
.carousel__track { display: flex; transition: transform 0.6s var(--ease); }
.testimonial {
  min-width: 100%; padding: 40px; text-align: center;
}
.testimonial blockquote { font-size: 1.25rem; color: var(--text); font-style: italic; margin-bottom: 22px; position: relative; }
.testimonial blockquote::before { content: '“'; font-family: 'Oswald'; font-size: 3.5rem; color: var(--orange); display: block; line-height: 0.4; margin-bottom: 18px; }
.testimonial figcaption strong { display: block; color: var(--green); font-size: 1.1rem; font-family: 'Oswald'; letter-spacing: 1px; }
.testimonial figcaption span { color: var(--muted); font-size: 0.9rem; }

.carousel__btn {
  position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%;
  border: none; background: var(--green); color: var(--white); font-size: 1.6rem; cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center; transition: background 0.3s, transform 0.3s;
}
.carousel__btn:hover { background: var(--orange); transform: translateY(-50%) scale(1.08); }
.carousel__btn--prev { left: 4px; }
.carousel__btn--next { right: 4px; }
.carousel__dots { display: flex; justify-content: center; gap: 10px; margin-top: 14px; }
.carousel__dots button { width: 11px; height: 11px; border-radius: 50%; border: none; background: var(--gray-light); cursor: pointer; transition: background 0.3s, transform 0.3s; }
.carousel__dots button.active { background: var(--orange); transform: scale(1.25); }

/* ===== Contact ===== */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.form { background: var(--surface); padding: 36px; border-radius: var(--radius); box-shadow: var(--shadow-md); border: 1px solid var(--gray-light); }
.section--alt .form { background: var(--bg); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.form__field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; }
.form__field span { font-weight: 600; font-size: 0.9rem; color: var(--green); }
.form__field input, .form__field select, .form__field textarea {
  padding: 13px 14px; border: 2px solid var(--gray-light); border-radius: 10px; font: inherit; background: var(--white);
  transition: border-color 0.25s, box-shadow 0.25s; resize: vertical;
}
.form__field input:focus, .form__field select:focus, .form__field textarea:focus {
  outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.15);
}
.form__field.invalid input, .form__field.invalid select, .form__field.invalid textarea { border-color: #d33; }
.form__error { color: #d33; font-size: 0.8rem; min-height: 1em; }
.form__submit { width: 100%; margin-top: 6px; }
.form__success { margin-top: 16px; color: var(--green); font-weight: 600; text-align: center; }

.contact__map { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); height: 100%; min-height: 420px; }
.contact__map iframe { width: 100%; height: 100%; min-height: 420px; border: 0; }

/* ===== Footer ===== */
.footer { background: var(--black); color: rgba(255,255,255,0.8); padding-top: 64px; }
.footer__grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 44px; }
.brand--footer { margin-bottom: 16px; }
.footer__about { font-size: 0.95rem; max-width: 320px; }
.footer__col h4 { color: var(--orange); text-transform: uppercase; letter-spacing: 1.5px; margin-bottom: 16px; font-size: 1.05rem; }
.footer__col p { margin-bottom: 10px; font-size: 0.95rem; }
.footer__col a:hover { color: var(--orange); }
.socials { display: flex; flex-direction: column; gap: 10px; }
.socials__link { font-weight: 600; transition: color 0.25s; }
.socials__link:hover { color: var(--orange); }
.footer__bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: 22px 0; text-align: center; font-size: 0.88rem; }
.footer__credit { margin-top: 6px; opacity: 0.75; font-size: 0.82rem; }
.footer__credit a { color: var(--color-orange, #FF7A00); text-decoration: none; font-weight: 600; }
.footer__credit a:hover { text-decoration: underline; }

/* ===== Back to top ===== */
.back-to-top {
  position: fixed; right: 22px; bottom: 22px; width: 50px; height: 50px; border-radius: 50%;
  background: var(--orange); color: var(--white); border: none; font-size: 1.5rem; cursor: pointer;
  box-shadow: var(--shadow-md); opacity: 0; visibility: hidden; transform: translateY(20px);
  transition: opacity 0.3s, visibility 0.3s, transform 0.3s, background 0.3s; z-index: 90;
}
.back-to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.back-to-top:hover { background: var(--green); transform: translateY(-4px); }

/* ===== Modal ===== */
.modal {
  position: fixed; inset: 0; z-index: 200; background: rgba(17,17,17,0.92);
  display: flex; align-items: center; justify-content: center; padding: 24px;
  opacity: 0; visibility: hidden; transition: opacity 0.35s, visibility 0.35s;
}
.modal.open { opacity: 1; visibility: visible; }
.modal__content { max-width: 90vw; max-height: 86vh; text-align: center; transform: scale(0.92); transition: transform 0.35s var(--ease); }
.modal.open .modal__content { transform: scale(1); }
.modal__content img { max-width: 100%; max-height: 78vh; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.modal__content figcaption { color: var(--white); margin-top: 14px; font-weight: 600; letter-spacing: 0.5px; }
.modal__close {
  position: absolute; top: 18px; right: 26px; background: none; border: none; color: var(--white);
  font-size: 2.6rem; cursor: pointer; line-height: 1; transition: transform 0.25s, color 0.25s;
}
.modal__close:hover { color: var(--orange); transform: rotate(90deg); }

/* ===== Reveal on scroll ===== */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* ===== Responsive ===== */
@media (max-width: 980px) {
  .cards--3 { grid-template-columns: repeat(2, 1fr); }
  .gallery { grid-template-columns: repeat(2, 1fr); }
  .contact { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 760px) {
  .header__cta { display: none; }
  .hamburger { display: flex; }
  .hero { background-attachment: scroll; }
  .nav {
    position: fixed; top: var(--header-h); right: 0; width: min(78%, 320px); height: calc(100vh - var(--header-h));
    background: var(--black); padding: 36px 28px; transform: translateX(110%); transition: transform 0.4s var(--ease);
    box-shadow: var(--shadow-lg);
  }
  .nav.open { transform: translateX(0); }
  .nav__list { flex-direction: column; gap: 22px; }
  .nav__link { font-size: 1.15rem; }
  .cards--3 { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: 1fr 1fr; }
  .form__row { grid-template-columns: 1fr; }
  .section { padding: 70px 0; }
  .footer__grid { grid-template-columns: 1fr; }
}

@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr; }
  .hero__actions .btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}
