/* ============================================================
   FEDERAL MÓVEIS PLANEJADOS
   Design: Editorial / Luxo Contemporâneo
   Cores: Verde da logo + off-white + dark charcoal
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;0,900;1,400&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&display=swap');

:root {
  --bg: #0a0a0a;
  --bg-alt: #111111;
  --bg-card: #171717;
  --brand: #8dc538;
  --brand-light: #a3d94e;
  --brand-dark: #6a9a24;
  --text: #e8e2d9;
  --text-muted: #9c948a;
  --white: #f5f0eb;
  --border: #2a2a2a;
  --transition: 0.4s cubic-bezier(0.25, 0.1, 0.25, 1);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', -apple-system, sans-serif;
  --max-width: 1320px;
  --header-h: 80px;
}

/* RESET */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }
body { font-family: var(--font-body); background: var(--bg); color: var(--text); line-height: 1.7; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; }

/* TYPOGRAPHY */
h1, h2, h3, h4 { font-family: var(--font-display); font-weight: 600; }
h1 { font-size: clamp(2.6rem, 5.5vw, 5rem); line-height: 1.1; letter-spacing: -0.02em; }
h2 { font-size: clamp(1.8rem, 3.5vw, 3rem); line-height: 1.2; letter-spacing: -0.01em; }
h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); line-height: 1.3; }
.accent { color: var(--brand); }
.text-muted { color: var(--text-muted); }
.section-label { font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.22em; color: var(--brand); margin-bottom: 1rem; display: block; }

/* HEADER */
.site-header { position: fixed; top: 0; left: 0; right: 0; z-index: 1000; height: var(--header-h); background: rgba(10,10,10,0.92); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); border-bottom: 1px solid rgba(255,255,255,0.05); }
.header-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; height: 100%; display: flex; align-items: center; justify-content: space-between; }
.logo { display: flex; align-items: center; }
.logo img { height: 38px; width: auto; }
.nav-links { display: flex; gap: 2.2rem; align-items: center; }
.nav-links a { font-size: 0.82rem; font-weight: 500; letter-spacing: 0.04em; color: var(--text-muted); text-transform: uppercase; padding: 0.3rem 0; position: relative; transition: color var(--transition); }
.nav-links a::after { content: ""; position: absolute; bottom: 0; left: 0; width: 0; height: 1.5px; background: var(--brand); transition: width var(--transition); }
.nav-links a:hover, .nav-links a.active { color: var(--white); }
.nav-links a:hover::after, .nav-links a.active::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; padding: 0.5rem; z-index: 1001; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--white); transition: var(--transition); }

/* HERO */
.hero { position: relative; height: 100vh; min-height: 600px; display: flex; align-items: center; overflow: hidden; }
.hero-bg { position: absolute; inset: 0; background: url("../img/hero-bg.jpg") center/cover no-repeat; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10,10,10,0.4) 0%, rgba(10,10,10,0.85) 100%); }
.hero-content { position: relative; z-index: 2; max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; width: 100%; }
.hero h1 { max-width: 750px; margin-bottom: 1.5rem; }
.hero-sub { font-size: 1.1rem; color: var(--text-muted); max-width: 500px; margin-bottom: 2.5rem; line-height: 1.8; }

/* BUTTONS */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.95rem 2rem; font-family: var(--font-body); font-size: 0.82rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; border: none; cursor: pointer; transition: all var(--transition); }
.btn-primary { background: var(--brand); color: #1a1a1a; }
.btn-primary:hover { background: var(--brand-light); transform: translateY(-2px); box-shadow: 0 15px 30px rgba(141,197,56,0.2); }
.btn-outline { background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,0.25); }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-2px); }

/* SECTIONS */
.section { padding: 6rem 2rem; }
.section-dark { background: var(--bg); }
.section-alt { background: var(--bg-alt); }
.section-header { text-align: center; max-width: 600px; margin: 0 auto 3.5rem; }
.section-header p { color: var(--text-muted); font-size: 1rem; margin-top: 1rem; line-height: 1.8; }
.container { max-width: var(--max-width); margin: 0 auto; }

/* ABOUT */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.about-image { position: relative; overflow: hidden; }
.about-image img { width: 100%; height: 480px; object-fit: cover; }
.about-image::after { content: ""; position: absolute; top: -20px; right: -20px; width: 100px; height: 100px; border: 1.5px solid var(--brand); opacity: 0.4; pointer-events: none; }
.about-text p { color: var(--text-muted); margin-bottom: 1rem; line-height: 1.8; }
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.stat-item h3 { color: var(--brand); font-size: 2.2rem; margin-bottom: 0.2rem; font-family: var(--font-display); }
.stat-item p { color: var(--text-muted); font-size: 0.82rem; margin: 0; }

/* SERVICES */
.services-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.service-card { background: var(--bg-card); border: 1px solid var(--border); padding: 2.2rem 1.8rem; position: relative; overflow: hidden; transition: all var(--transition); }
.service-card::before { content: ""; position: absolute; top: 0; left: 0; width: 3px; height: 0; background: var(--brand); transition: height 0.5s ease; }
.service-card:hover { border-color: rgba(141,197,56,0.3); transform: translateY(-5px); }
.service-card:hover::before { height: 100%; }
.service-card .icon { font-size: 1.8rem; margin-bottom: 1.2rem; display: block; }
.service-card h3 { margin-bottom: 0.6rem; }
.service-card p { color: var(--text-muted); font-size: 0.9rem; line-height: 1.7; }
.service-card .card-link { display: inline-flex; align-items: center; gap: 0.4rem; margin-top: 1.2rem; font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); transition: gap var(--transition); }
.service-card:hover .card-link { gap: 0.7rem; }
.service-card-link { text-decoration: none; color: inherit; display: block; }
.service-card-link:hover .service-card h3 { color: var(--brand); }

/* PORTFOLIO GRID */
.portfolio-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; }
.portfolio-item { position: relative; overflow: hidden; cursor: pointer; aspect-ratio: 4/3; display: block; text-decoration: none; color: inherit; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease, filter 0.4s ease; filter: brightness(0.75); }
.portfolio-item:hover img { transform: scale(1.06); filter: brightness(0.5); }
.item-overlay { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.8rem; background: linear-gradient(0deg, rgba(10,10,10,0.9) 0%, transparent 60%); opacity: 0; transition: opacity var(--transition); }
.portfolio-item:hover .item-overlay { opacity: 1; }
.item-cat { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.14em; color: var(--brand); margin-bottom: 0.3rem; }
.item-title { font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; color: var(--white); }
.portfolio-cta { text-align: center; margin-top: 3rem; }

/* PAGE HERO */
.page-hero { position: relative; height: 45vh; min-height: 350px; display: flex; align-items: center; overflow: hidden; background: var(--bg-alt); }
.page-hero-bg { position: absolute; inset: 0; opacity: 0.3; background-size: cover; background-position: center; }
.page-hero-overlay { position: absolute; inset: 0; background: linear-gradient(0deg, var(--bg) 0%, transparent 100%); }
.page-hero-content { position: relative; z-index: 2; max-width: var(--max-width); margin: 0 auto; padding: 0 2rem; width: 100%; text-align: center; }

/* CONTACT */
.contact-grid { display: grid; grid-template-columns: 1fr 1.2fr; gap: 3.5rem; }
.info-item { display: flex; gap: 1rem; padding: 1.5rem 0; border-bottom: 1px solid var(--border); }
.info-item:first-child { padding-top: 0; }
.info-icon { font-size: 1.3rem; width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: var(--bg-card); border: 1px solid var(--border); flex-shrink: 0; }
.info-text h4 { font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--brand); margin-bottom: 0.2rem; }
.info-text p { color: var(--text); font-size: 0.92rem; }
.contact-form { background: var(--bg-card); padding: 2.5rem; border: 1px solid var(--border); }
.form-group { margin-bottom: 1.3rem; }
.form-group label { display: block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.1em; color: var(--text-muted); margin-bottom: 0.5rem; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 0.85rem; background: var(--bg); border: 1px solid var(--border); color: var(--text); font-family: var(--font-body); font-size: 0.92rem; outline: none; transition: border-color var(--transition); }
.form-group input:focus, .form-group textarea:focus, .form-group select:focus { border-color: var(--brand); }
.form-group textarea { min-height: 130px; resize: vertical; }

/* FILTER */
.filter-bar { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; margin-bottom: 2.5rem; }
.filter-btn { padding: 0.55rem 1.3rem; font-family: var(--font-body); font-size: 0.75rem; font-weight: 500; letter-spacing: 0.05em; text-transform: uppercase; background: transparent; border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; transition: all var(--transition); }
.filter-btn:hover, .filter-btn.active { border-color: var(--brand); color: var(--brand); background: rgba(141,197,56,0.07); }

/* SERVICE PAGE CARDS */
.services-page-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.2rem; }
a.service-page-card { display: block; text-decoration: none; color: inherit; position: relative; overflow: hidden; aspect-ratio: 16/10; }
.service-page-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; filter: brightness(0.55); }
a.service-page-card:hover img { transform: scale(1.05); filter: brightness(0.35); }
.card-content { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; padding: 2rem; }
a.service-page-card h3 { font-family: var(--font-display); font-size: 1.6rem; margin-bottom: 0.3rem; }
a.service-page-card p { color: var(--text-muted); font-size: 0.88rem; }

/* FOOTER */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 4.5rem 2rem 2rem; }
.footer-grid { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 2.5rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.88rem; line-height: 1.7; max-width: 260px; margin-top: 0.8rem; }
.footer-col h4 { font-family: var(--font-body); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--white); margin-bottom: 1.2rem; }
.footer-col a { display: block; color: var(--text-muted); font-size: 0.88rem; padding: 0.3rem 0; transition: color var(--transition); }
.footer-col a:hover { color: var(--brand); }
.footer-bottom { max-width: var(--max-width); margin: 0 auto; padding-top: 2rem; margin-top: 3rem; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; }
.footer-bottom p { color: var(--text-muted); font-size: 0.8rem; }

/* SCROLL REVEAL */
.reveal { opacity: 0; transform: translateY(35px); transition: opacity 0.7s ease, transform 0.7s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); }

/* BACK TO TOP */
.back-to-top { position: fixed; bottom: 1.8rem; right: 1.8rem; width: 42px; height: 42px; background: var(--brand); color: #1a1a1a; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; opacity: 0; visibility: hidden; transition: all var(--transition); z-index: 99; }
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--brand-light); transform: translateY(-3px); }

/* RESPONSIVE ======================================== */
@media (max-width: 1024px) {
  .about-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .about-image img { height: 350px; }
  .services-grid, .portfolio-grid { grid-template-columns: repeat(2, 1fr); }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .services-page-grid { grid-template-columns: 1fr 1fr; }
  h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
  h2 { font-size: clamp(1.5rem, 3vw, 2.3rem); }
  .hero { min-height: 500px; }
}

@media (max-width: 768px) {
  :root { --header-h: 64px; }
  html { font-size: 15px; }
  .section { padding: 3.5rem 1.2rem; }
  
  .nav-links { position: fixed; top: var(--header-h); left: 0; right: 0; bottom: 0; background: rgba(10,10,10,0.98); backdrop-filter: blur(30px); flex-direction: column; justify-content: center; gap: 2.2rem; transform: translateX(100%); transition: transform 0.4s cubic-bezier(0.77, 0.2, 0.05, 1); }
  .nav-links.open { transform: translateX(0); }
  .nav-links a { font-size: 1.2rem; }
  .nav-toggle { display: flex; }
  .nav-toggle.open span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
  .nav-toggle.open span:nth-child(2) { opacity: 0; }
  .nav-toggle.open span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

  .services-grid, .portfolio-grid, .services-page-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; gap: 1rem; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-bottom { flex-direction: column; gap: 0.6rem; text-align: center; }
  .hero { min-height: 90vh; height: auto; padding: 7rem 0 4rem; }
  .hero-content { text-align: center; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero .btn { display: block; width: 100%; justify-content: center; }
  .hero .btn-outline { margin-left: 0 !important; margin-top: 0.8rem; }
  .page-hero { min-height: 260px; height: 30vh; }
  .contact-form { padding: 1.8rem; }
  .about-image img { height: 260px; }
  .about-image::after { width: 60px; height: 60px; top: -12px; right: -12px; }
  .service-card { padding: 1.8rem 1.4rem; }
}

@media (max-width: 480px) {
  html { font-size: 14px; }
  .section { padding: 2.8rem 1rem; }
  .header-inner { padding: 0 1rem; }
  .logo img { height: 30px; }
  .hero { padding: 5.5rem 0 3rem; min-height: auto; }
  .hero-sub { font-size: 0.95rem; }
  .page-hero { min-height: 220px; }
  .section-header { margin-bottom: 2.2rem; }
  .filter-btn { padding: 0.4rem 0.9rem; font-size: 0.7rem; }
  a.service-page-card { aspect-ratio: 3/2; }
  a.service-page-card h3 { font-size: 1.3rem; }
  a.service-page-card .card-content { padding: 1.2rem; }
  .back-to-top { bottom: 1.2rem; right: 1.2rem; width: 38px; height: 38px; }
}
