/* ============================================
   RCE ESQUADRIAS — INDUSTRIAL BOLD THEME
   Rede Completa Esquadrias LTDA
   rce.ind.br
   ============================================ */

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

:root {
  /* Core Palette */
  --black: #0a0a0a;
  --dark: #141414;
  --dark-gray: #1a1a1a;
  --mid-gray: #2a2a2a;
  --steel: #3a3a3a;
  --light-steel: #666;
  --silver: #999;
  --light: #e0e0e0;
  --white: #f5f5f5;
  --pure-white: #ffffff;

  /* Accent — Brand Green (RC Esquadrias) */
  --accent: #3a9a12;
  --accent-light: #4ab81e;
  --accent-dark: #2d7a0e;
  --accent-glow: rgba(58, 154, 18, 0.3);

  /* Functional */
  --danger: #e74c3c;
  --success: #2ecc71;

  /* Typography */
  --font-heading: 'Oswald', 'Impact', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* Spacing */
  --section-pad: clamp(60px, 8vw, 120px);
  --container-width: 1280px;

  /* Transitions */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-body);
  background: var(--black);
  color: var(--light);
  line-height: 1.6;
  overflow-x: hidden;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }

/* ---------- CONTAINER ---------- */
.container {
  width: 90%;
  max-width: var(--container-width);
  margin: 0 auto;
}

.container--wide {
  max-width: 1440px;
}

/* ---------- TYPOGRAPHY ---------- */
h1, h2, h3, h4, h5 {
  font-family: var(--font-heading);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  line-height: 1.1;
  color: var(--pure-white);
}

h1 { font-size: clamp(2.5rem, 6vw, 5rem); }
h2 { font-size: clamp(2rem, 4vw, 3.5rem); }
h3 { font-size: clamp(1.5rem, 3vw, 2rem); }
h4 { font-size: clamp(1.2rem, 2vw, 1.5rem); }

.section-label {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.5rem;
  display: block;
}

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

/* ---------- BUTTONS ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 36px;
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  border: 2px solid transparent;
  transition: all 0.4s var(--ease-out);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  top: 0; left: -100%;
  width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
  transition: left 0.6s var(--ease-out);
}

.btn:hover::before { left: 100%; }

.btn--primary {
  background: var(--accent);
  color: var(--black);
  border-color: var(--accent);
}

.btn--primary:hover {
  background: var(--accent-light);
  border-color: var(--accent-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px var(--accent-glow);
}

.btn--outline {
  background: transparent;
  color: var(--pure-white);
  border-color: var(--light-steel);
}

.btn--outline:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-2px);
}

.btn--ghost {
  background: transparent;
  color: var(--accent);
  padding: 8px 0;
  border: none;
  font-size: 0.9rem;
}

.btn--ghost:hover { color: var(--accent-light); }

.btn--ghost .arrow {
  display: inline-block;
  transition: transform 0.3s var(--ease-out);
}
.btn--ghost:hover .arrow { transform: translateX(6px); }

/* ---------- HEADER / NAV ---------- */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  padding: 20px 0;
  transition: all 0.4s var(--ease-out);
}

.header.scrolled {
  background: rgba(10, 10, 10, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  padding: 12px 0;
  border-bottom: 1px solid var(--mid-gray);
}

.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header__logo {
  display: flex;
  align-items: center;
}

.header__logo img {
  height: 44px;
  width: auto;
  transition: opacity 0.3s;
}

.header.scrolled .header__logo img { height: 36px; }

.footer__brand-logo {
  height: 40px;
  width: auto;
  margin-bottom: 12px;
}

.nav { display: flex; align-items: center; gap: 32px; }

.nav__link {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--silver);
  transition: color 0.3s;
  position: relative;
}

.nav__link::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.3s var(--ease-out);
}

.nav__link:hover, .nav__link.active { color: var(--pure-white); }
.nav__link:hover::after, .nav__link.active::after { width: 100%; }

.nav__cta {
  padding: 10px 24px;
  background: var(--accent);
  color: var(--black);
  font-family: var(--font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  transition: all 0.3s var(--ease-out);
}

.nav__cta:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}

/* Mobile menu */
.menu-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 8px;
  z-index: 1001;
}

.menu-toggle span {
  width: 28px; height: 2px;
  background: var(--pure-white);
  transition: all 0.3s var(--ease-out);
}

.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;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero__bg img, .hero__bg video {
  width: 100%; height: 100%;
  object-fit: cover;
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    135deg,
    rgba(10, 10, 10, 0.92) 0%,
    rgba(10, 10, 10, 0.7) 50%,
    rgba(10, 10, 10, 0.85) 100%
  );
  z-index: 1;
}

.hero__content {
  position: relative;
  z-index: 2;
  max-width: 800px;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: rgba(58, 154, 18, 0.1);
  border: 1px solid rgba(58, 154, 18, 0.3);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.hero__badge .dot {
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.3; }
}

.hero__title {
  font-size: clamp(3rem, 7vw, 6rem);
  line-height: 0.95;
  margin-bottom: 24px;
}

.hero__title .line {
  display: block;
  overflow: hidden;
}

.hero__title .line span {
  display: inline-block;
  transform: translateY(110%);
  animation: revealLine 1s var(--ease-out) forwards;
}

.hero__title .line:nth-child(2) span { animation-delay: 0.15s; }
.hero__title .line:nth-child(3) span { animation-delay: 0.3s; }

@keyframes revealLine {
  to { transform: translateY(0); }
}

.hero__desc {
  font-size: clamp(1rem, 1.5vw, 1.25rem);
  color: var(--silver);
  margin-bottom: 40px;
  max-width: 540px;
  line-height: 1.7;
  opacity: 0;
  animation: fadeIn 1s 0.6s var(--ease-out) forwards;
}

@keyframes fadeIn {
  to { opacity: 1; }
}

.hero__actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  opacity: 0;
  animation: fadeIn 1s 0.8s var(--ease-out) forwards;
}

.hero__scroll {
  position: absolute;
  bottom: 40px; left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--light-steel);
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  opacity: 0;
  animation: fadeIn 1s 1.2s var(--ease-out) forwards;
}

.hero__scroll .line-anim {
  width: 1px; height: 40px;
  background: var(--steel);
  position: relative;
  overflow: hidden;
}

.hero__scroll .line-anim::after {
  content: '';
  position: absolute;
  top: -100%; left: 0;
  width: 100%; height: 100%;
  background: var(--accent);
  animation: scrollLine 2s infinite;
}

@keyframes scrollLine {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* ---------- SECTIONS ---------- */
.section {
  padding: var(--section-pad) 0;
  position: relative;
}

.section--dark { background: var(--dark); }
.section--darker { background: var(--black); }
.section--accent { background: var(--accent); color: var(--black); }

.section__header {
  margin-bottom: 60px;
}

.section__header--center { text-align: center; }

.section__divider {
  width: 60px; height: 3px;
  background: var(--accent);
  margin-top: 20px;
}

.section__header--center .section__divider {
  margin-left: auto;
  margin-right: auto;
}

/* ---------- STATS BAR ---------- */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--mid-gray);
  border-bottom: 1px solid var(--mid-gray);
}

.stat {
  padding: 48px 32px;
  text-align: center;
  border-right: 1px solid var(--mid-gray);
  transition: background 0.4s;
}

.stat:last-child { border-right: none; }
.stat:hover { background: var(--dark-gray); }

.stat__number {
  font-family: var(--font-heading);
  font-size: clamp(2.5rem, 4vw, 4rem);
  font-weight: 900;
  color: var(--accent);
  line-height: 1;
  margin-bottom: 8px;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--silver);
}

/* ---------- PRODUCT CATEGORIES GRID ---------- */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px;
}

.category-card {
  position: relative;
  aspect-ratio: 4/3;
  overflow: hidden;
  cursor: pointer;
  background: var(--dark-gray);
}

.category-card__img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease-out), filter 0.8s;
  filter: brightness(0.5) saturate(0.8);
}

.category-card:hover .category-card__img {
  transform: scale(1.08);
  filter: brightness(0.35) saturate(1);
}

.category-card__content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 32px;
  z-index: 1;
}

.category-card__count {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}

.category-card__title {
  font-size: clamp(1.3rem, 2.5vw, 1.8rem);
  margin-bottom: 8px;
}

.category-card__line {
  width: 0; height: 2px;
  background: var(--accent);
  transition: width 0.5s var(--ease-out);
}

.category-card:hover .category-card__line { width: 60px; }

/* ---------- FEATURES ---------- */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px;
}

.feature {
  padding: 40px;
  background: var(--dark-gray);
  border: 1px solid var(--mid-gray);
  transition: all 0.4s var(--ease-out);
  position: relative;
}

.feature::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s var(--ease-out);
}

.feature:hover {
  border-color: var(--steel);
  transform: translateY(-4px);
}

.feature:hover::before { transform: scaleX(1); }

.feature__icon {
  width: 48px; height: 48px;
  margin-bottom: 24px;
  color: var(--accent);
}

.feature__icon svg {
  width: 100%; height: 100%;
  stroke: currentColor;
  stroke-width: 1.5;
  fill: none;
}

.feature__title {
  font-size: 1.1rem;
  margin-bottom: 12px;
}

.feature__text {
  font-size: 0.9rem;
  color: var(--silver);
  line-height: 1.7;
}

/* ---------- CTA BAND ---------- */
.cta-band {
  padding: 80px 0;
  background: var(--accent);
  position: relative;
  overflow: hidden;
}

.cta-band__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
}

.cta-band h2 {
  color: var(--black);
  font-size: clamp(2rem, 4vw, 3rem);
}

.cta-band p {
  color: rgba(0,0,0,0.7);
  margin-top: 8px;
  font-size: 1.1rem;
}

.cta-band .btn--dark {
  background: var(--black);
  color: var(--pure-white);
  border-color: var(--black);
  white-space: nowrap;
}

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

/* ---------- FOOTER ---------- */
.footer {
  background: var(--dark);
  border-top: 1px solid var(--mid-gray);
  padding: 80px 0 40px;
}

.footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 60px;
  margin-bottom: 60px;
}

.footer__brand p {
  color: var(--silver);
  font-size: 0.9rem;
  margin-top: 16px;
  max-width: 300px;
  line-height: 1.7;
}

.footer__title {
  font-family: var(--font-heading);
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--pure-white);
  margin-bottom: 20px;
}

.footer__links { list-style: none; }

.footer__links li { margin-bottom: 10px; }

.footer__links a {
  font-size: 0.9rem;
  color: var(--silver);
  transition: color 0.3s;
}

.footer__links a:hover { color: var(--accent); }

.footer__bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 40px;
  border-top: 1px solid var(--mid-gray);
  font-size: 0.8rem;
  color: var(--light-steel);
}

.footer__social {
  display: flex;
  gap: 16px;
}

.footer__social a {
  width: 40px; height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--steel);
  color: var(--silver);
  transition: all 0.3s;
}

.footer__social a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ---------- SCROLL ANIMATIONS ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.8s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.reveal--left {
  opacity: 0;
  transform: translateX(-40px);
}

.reveal--left.visible {
  opacity: 1;
  transform: translateX(0);
}

.reveal--right {
  opacity: 0;
  transform: translateX(40px);
}

.reveal--right.visible {
  opacity: 1;
  transform: translateX(0);
}

/* Stagger children */
.stagger > * {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s var(--ease-out);
}

.stagger.visible > *:nth-child(1) { transition-delay: 0s; opacity: 1; transform: none; }
.stagger.visible > *:nth-child(2) { transition-delay: 0.1s; opacity: 1; transform: none; }
.stagger.visible > *:nth-child(3) { transition-delay: 0.2s; opacity: 1; transform: none; }
.stagger.visible > *:nth-child(4) { transition-delay: 0.3s; opacity: 1; transform: none; }
.stagger.visible > *:nth-child(5) { transition-delay: 0.4s; opacity: 1; transform: none; }
.stagger.visible > *:nth-child(6) { transition-delay: 0.5s; opacity: 1; transform: none; }

/* ---------- TEXTURE OVERLAYS ---------- */
.texture-noise::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
}

/* ---------- METAL GRADIENT ---------- */
.metal-gradient {
  background: linear-gradient(
    135deg,
    var(--dark-gray) 0%,
    var(--mid-gray) 25%,
    var(--dark-gray) 50%,
    var(--steel) 75%,
    var(--dark-gray) 100%
  );
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: repeat(2, 1fr); gap: 40px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .menu-toggle { display: flex; }

  .nav {
    position: fixed;
    top: 0; right: -100%;
    width: 80%; height: 100vh;
    flex-direction: column;
    justify-content: center;
    background: var(--dark);
    border-left: 1px solid var(--mid-gray);
    padding: 40px;
    gap: 24px;
    transition: right 0.4s var(--ease-out);
  }

  .nav.open { right: 0; }

  .nav__link { font-size: 1.2rem; }

  .categories-grid { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr; }
  .stats-bar { grid-template-columns: 1fr; }
  .stat { border-right: none; border-bottom: 1px solid var(--mid-gray); }

  .cta-band__inner { flex-direction: column; text-align: center; }

  .hero__title { font-size: clamp(2.2rem, 10vw, 3.5rem); }
}

@media (max-width: 480px) {
  .btn { padding: 14px 28px; font-size: 0.9rem; }
  .hero__actions { flex-direction: column; }
}
