/* =========================================================
   FORME AUTOMOTIVE — design system premium
   Branco / off-white / preto / cinza claro
   Tipografia: Manrope + Cormorant Garamond
   ========================================================= */

:root {
  --white: #ffffff;
  --off-white: #f7f6f4;
  --bg: #fcfbf9;
  --ink: #141414;
  --gray-900: #2a2a2a;
  --gray-700: #5c5a57;
  --gray-500: #8a8883;
  --gray-300: #e3e1dd;
  --gray-200: #edebe8;
  --line: #e8e6e2;

  --font-sans: "Manrope", "Helvetica Neue", Arial, sans-serif;
  --font-serif: "Cormorant Garamond", Georgia, serif;

  --max: 1320px;
  --section-pad: clamp(96px, 13vw, 180px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--bg);
  font-weight: 400;
  line-height: 1.6;
  overflow-x: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
  color: inherit;
}

ul,
ol {
  list-style: none;
}

.container {
  width: min(var(--max), 100% - 64px);
  margin-inline: auto;
}

.container.narrow {
  width: min(880px, 100% - 64px);
}

/* =========================================================
   TIPOGRAFIA UTILITÁRIA
   ========================================================= */

.eyebrow {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.85);
}

.section-head {
  display: flex;
  align-items: baseline;
  gap: 24px;
  margin-bottom: clamp(40px, 6vw, 72px);
}

.section-index {
  font-size: 13px;
  letter-spacing: 0.18em;
  color: var(--gray-500);
  font-weight: 400;
}

.section-title {
  font-size: clamp(34px, 4.6vw, 60px);
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.section-sub {
  font-size: 16px;
  color: var(--gray-700);
  max-width: 560px;
  margin-top: -36px;
  margin-bottom: 48px;
  line-height: 1.7;
}

.big-statement {
  font-size: clamp(30px, 4.4vw, 56px);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.12;
}

.big-statement .statement-serif {
  font-family: var(--font-serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.06em;
  letter-spacing: 0;
}

.intro-desc {
  font-size: clamp(16px, 1.4vw, 18px);
  color: var(--gray-700);
  line-height: 1.9;
  max-width: 640px;
}

/* =========================================================
   BOTÕES
   ========================================================= */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 30px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  border-radius: 3px;
  transition: background 0.3s var(--ease), color 0.3s var(--ease),
    border-color 0.3s var(--ease), transform 0.3s var(--ease);
}

.btn--nav {
  padding: 10px 22px;
  background: var(--ink);
  color: #fff;
  border-radius: 3px;
}

.btn--nav:hover {
  background: var(--gray-900);
}

.btn--light {
  background: #fff;
  color: var(--ink);
}

.btn--light:hover {
  background: transparent;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.6);
}

.btn--dark {
  background: var(--ink);
  color: #fff;
}

.btn--dark:hover {
  background: var(--gray-900);
}

.btn--large {
  padding: 20px 48px;
  font-size: 16px;
}

/* =========================================================
   HEADER / NAVBAR
   ========================================================= */

.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 26px max(32px, 4vw);
  color: #fff;
  transition: background 0.4s var(--ease), padding 0.4s var(--ease),
    color 0.4s var(--ease), box-shadow 0.4s var(--ease);
}

.header.scrolled {
  background: rgba(252, 251, 249, 0.9);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  color: var(--ink);
  padding: 16px max(32px, 4vw);
  border-bottom: 1px solid var(--line);
}

.brand {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.nav {
  display: flex;
  align-items: center;
  gap: clamp(24px, 3.5vw, 48px);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
}

.nav-link {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: 0.02em;
  padding: 4px 0;
  position: relative;
  opacity: 0.9;
  transition: opacity 0.3s var(--ease);
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.nav-link:hover {
  opacity: 1;
}

.nav-link:hover::after {
  transform: scaleX(1);
}

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

/* Menu toggle (mobile) */
.menu-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  padding: 10px;
}

.menu-toggle span {
  width: 24px;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.menu-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: translateY(4.5px) rotate(45deg);
}
.menu-toggle[aria-expanded="true"] span:nth-child(2) {
  transform: translateY(-4.5px) rotate(-45deg);
}

.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 99;
  background: var(--bg);
  padding: 110px 28px 40px;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid var(--line);
  opacity: 0;
  transform: translateY(-24px);
  pointer-events: none;
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}

.mobile-menu.open {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.mobile-menu .nav-link {
  font-size: 26px;
  font-weight: 400;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  opacity: 1;
}

.mobile-menu .nav-link::after {
  display: none;
}

.mobile-menu .btn {
  margin-top: 24px;
  width: 100%;
}

/* =========================================================
   HERO
   ========================================================= */

.hero {
  position: relative;
  height: 100vh;
  min-height: 680px;
  overflow: hidden;
  display: flex;
  align-items: center;
  color: #fff;
  background: var(--ink);
}

.hero-media {
  position: absolute;
  inset: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 40%;
  transform: scale(1.05);
  animation: hero-zoom 3.4s var(--ease) forwards;
}

@keyframes hero-zoom {
  to {
    transform: scale(1);
  }
}

.hero-shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(12, 12, 12, 0.62) 0%,
    rgba(12, 12, 12, 0.15) 45%,
    rgba(12, 12, 12, 0.35) 100%
  );
}

.hero-content {
  position: relative;
  z-index: 2;
  max-width: var(--max);
  width: 100%;
  margin: 0 auto;
  padding: 0 max(32px, 4vw);
  padding-top: 10vh;
}

.hero-eyebrow {
  margin-bottom: 32px;
}

.hero-title {
  font-size: clamp(44px, 9vw, 128px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin-bottom: 36px;
}

.hero-sub {
  font-size: clamp(16px, 1.5vw, 19px);
  font-weight: 300;
  color: rgba(255, 255, 255, 0.92);
  max-width: 460px;
  margin-bottom: 44px;
  line-height: 1.7;
}

.hero-cta {
  display: inline-flex;
}

/* Reveal do hero */
.reveal-hero {
  opacity: 0;
  transform: translateY(24px);
  animation: reveal-up 0.9s var(--ease) forwards;
}
.hero-eyebrow { animation-delay: 0.15s; }
.hero-title { animation-delay: 0.3s; }
.hero-sub { animation-delay: 0.5s; }
.hero-cta { animation-delay: 0.68s; }

@keyframes reveal-up {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scroll hint */
.scroll-hint {
  position: absolute;
  bottom: 34px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  color: rgba(255, 255, 255, 0.9);
}

.scroll-label {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  font-weight: 400;
}

.scroll-line {
  width: 1px;
  height: 56px;
  background: rgba(255, 255, 255, 0.35);
  position: relative;
  overflow: hidden;
}

.scroll-line::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 100%;
  background: #fff;
  animation: scroll-drip 2.4s var(--ease) infinite;
}

@keyframes scroll-drip {
  0% { top: -100%; }
  100% { top: 100%; }
}

/* =========================================================
   INTRODUÇÃO
   ========================================================= */

.intro {
  padding-block: var(--section-pad);
  background: var(--bg);
}

.intro .big-statement {
  margin-bottom: 40px;
}

/* =========================================================
   SERVIÇOS (lista + preview hover)
   ========================================================= */

.services {
  padding-block: clamp(48px, 7vw, 96px) var(--section-pad);
  border-top: 1px solid var(--line);
  position: relative;
}

.services-list {
  display: flex;
  flex-direction: column;
}

.service-item {
  display: grid;
  grid-template-columns: 90px 1fr 40px;
  align-items: center;
  gap: 24px;
  padding: clamp(24px, 3vw, 36px) 0;
  border-bottom: 1px solid var(--line);
  cursor: default;
  transition: padding-left 0.4s var(--ease);
}

.service-item:first-child {
  border-top: 1px solid var(--line);
}

.service-num {
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--gray-500);
}

.service-name {
  font-size: clamp(24px, 3.4vw, 44px);
  font-weight: 400;
  letter-spacing: -0.02em;
  transition: transform 0.4s var(--ease), color 0.4s var(--ease);
}

.service-arrow {
  font-size: 24px;
  color: var(--gray-500);
  opacity: 0;
  transform: translateX(-12px);
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease),
    color 0.4s var(--ease);
}

.service-item:hover {
  padding-left: 12px;
}

.service-item:hover .service-name {
  transform: translateX(12px);
  color: var(--ink);
}

.service-item:hover .service-arrow {
  opacity: 1;
  transform: translateX(0);
}

/* Preview flutuante ao hover (somente dispositivos com hover) */
.services-preview {
  position: fixed;
  z-index: 50;
  width: 300px;
  height: 400px;
  pointer-events: none;
  opacity: 0;
  transform: scale(0.96);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
  will-change: transform;
}

.services-preview.active {
  opacity: 1;
  transform: scale(1);
}

.preview-card {
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 4px;
}

.preview-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* =========================================================
   TRANSFORMAÇÃO / ANTES-DEPOIS
   ========================================================= */

.transformation {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--line);
  background: var(--off-white);
}

.compare {
  position: relative;
  width: 100%;
  height: clamp(380px, 62vw, 720px);
  overflow: hidden;
  cursor: ew-resize;
  user-select: none;
}

.compare-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.compare-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.compare-after {
  z-index: 1;
}

.compare-before {
  z-index: 2;
  width: 50%;
  border-right: 1.5px solid rgba(255, 255, 255, 0.9);
}

.compare-before img {
  width: 100vw;
  max-width: none;
  height: 100%;
  object-fit: cover;
}

.compare-handle {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  z-index: 3;
  width: 0;
  transform: translateX(0);
}

.handle-line {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1.5px;
  transform: translateX(-50%);
  background: rgba(255, 255, 255, 0.9);
}

.compare-label {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  padding: 8px 14px;
  background: rgba(12, 12, 12, 0.65);
  color: #fff;
  border-radius: 3px;
  white-space: nowrap;
}

.compare-label--left {
  top: 24px;
}

.compare-label--right {
  bottom: 24px;
}

/* =========================================================
   PROJETOS (composição assimétrica)
   ========================================================= */

.projects {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--line);
}

.projects-wrap {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 48px 32px;
}

.project {
  position: relative;
}

.project:nth-child(1) {
  grid-column: 1 / span 6;
  grid-row: 1;
}

.project:nth-child(2) {
  grid-column: 7 / span 6;
  grid-row: 1;
  margin-top: 90px;
}

.project:nth-child(3) {
  grid-column: 3 / span 7;
  grid-row: 2;
  margin-top: 60px;
}

.project-link-full {
  display: block;
}

.project-media {
  overflow: hidden;
  border-radius: 4px;
  aspect-ratio: 4 / 5;
  background: var(--gray-200);
}

.project-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.8s var(--ease);
}

.project-link-full:hover .project-media img {
  transform: scale(1.05);
}

.project-meta {
  display: flex;
  align-items: baseline;
  gap: 18px;
  padding-top: 20px;
}

.project-num {
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--gray-500);
}

.project-name {
  font-size: clamp(22px, 2.4vw, 30px);
  font-weight: 500;
  letter-spacing: -0.02em;
}

.project-tag {
  font-size: 14px;
  color: var(--gray-700);
  margin-left: auto;
}

/* =========================================================
   PROCESSO
   ========================================================= */

.process {
  padding-block: var(--section-pad);
  border-top: 1px solid var(--line);
  background: var(--ink);
  color: #fff;
}

.process .section-index,
.process .section-sub {
  color: rgba(255, 255, 255, 0.55);
}

.process-list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}

.process-step {
  padding: 40px 28px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.03);
  min-height: 280px;
  display: flex;
  flex-direction: column;
}

.step-num {
  font-size: 13px;
  letter-spacing: 0.2em;
  color: rgba(255, 255, 255, 0.5);
  margin-bottom: auto;
}

.step-title {
  font-size: clamp(20px, 2vw, 26px);
  font-weight: 400;
  letter-spacing: -0.01em;
  margin-top: 28px;
  margin-bottom: 12px;
}

.step-desc {
  font-size: 14.5px;
  font-weight: 300;
  color: rgba(255, 255, 255, 0.65);
  line-height: 1.7;
}

/* =========================================================
   SOBRE
   ========================================================= */

.about {
  padding-block: var(--section-pad);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
  border-top: 1px solid var(--line);
}

.about-media {
  height: 100%;
  min-height: 520px;
}

.about-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.about-content {
  padding-block: 40px;
}

.about-content .section-head {
  margin-bottom: 40px;
}

.about-statement {
  margin-bottom: 32px;
}

/* =========================================================
   CTA FINAL
   ========================================================= */

.cta-final {
  padding-block: clamp(120px, 16vw, 200px);
  text-align: center;
  border-top: 1px solid var(--line);
  background: var(--bg);
}

.cta-final .eyebrow {
  color: var(--gray-500);
  margin-bottom: 28px;
}

.cta-title {
  font-size: clamp(44px, 8vw, 104px);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 0.98;
  margin-bottom: 28px;
}

.cta-sub {
  font-size: clamp(17px, 1.6vw, 20px);
  color: var(--gray-700);
  margin-bottom: 48px;
}

/* =========================================================
   FOOTER
   ========================================================= */

.footer {
  border-top: 1px solid var(--line);
  padding: 72px max(32px, 4vw) 40px;
  background: var(--bg);
}

.footer-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 64px;
}

.footer-brand {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-logo {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: 0.22em;
}

.footer-sub {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gray-500);
}

.footer-links {
  display: flex;
  gap: 32px;
}

.footer-links a {
  font-size: 14.5px;
  color: var(--gray-700);
  position: relative;
  padding: 2px 0;
  transition: color 0.3s var(--ease);
}

.footer-links a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.35s var(--ease);
}

.footer-links a:hover {
  color: var(--ink);
}

.footer-links a:hover::after {
  transform: scaleX(1);
}

.footer-bottom {
  border-top: 1px solid var(--line);
  padding-top: 28px;
  font-size: 13px;
  color: var(--gray-500);
  letter-spacing: 0.02em;
}

/* =========================================================
   MODAL PROJETO
   ========================================================= */

.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.4s var(--ease);
}

.modal.open {
  opacity: 1;
  pointer-events: auto;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 12, 12, 0.82);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

.modal-panel {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  width: min(1080px, 100%);
  max-height: 88vh;
  background: var(--bg);
  border-radius: 6px;
  overflow: hidden;
  transform: translateY(24px) scale(0.98);
  transition: transform 0.45s var(--ease);
}

.modal.open .modal-panel {
  transform: translateY(0) scale(1);
}

.modal-figure {
  min-height: 320px;
}

.modal-figure img {
  width: 100%;
  height: 100%;
  max-height: 88vh;
  object-fit: cover;
}

.modal-info {
  padding: clamp(28px, 4vw, 56px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
}

.modal-info .project-name {
  font-size: clamp(28px, 3vw, 40px);
}

.modal-desc {
  color: var(--gray-700);
  line-height: 1.8;
  margin: 8px 0 20px;
}

.modal-info .btn {
  align-self: flex-start;
}

.modal-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(12, 12, 12, 0.75);
  color: #fff;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.3s var(--ease), transform 0.3s var(--ease);
}

.modal-close:hover {
  background: rgba(12, 12, 12, 0.95);
  transform: rotate(90deg);
}

/* =========================================================
   REVEAL NO SCROLL
   ========================================================= */

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease);
}

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

/* =========================================================
   RESPONSIVO
   ========================================================= */

@media (max-width: 900px) {
  .nav {
    display: none;
  }

  .menu-toggle {
    display: flex;
  }

  .nav-right .btn--nav {
    display: none;
  }

  .process-list {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .process-step {
    min-height: 220px;
    padding: 30px 24px;
  }

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

  .about-media {
    min-height: 420px;
  }

  .projects-wrap {
    gap: 24px;
  }

  .project:nth-child(1),
  .project:nth-child(2),
  .project:nth-child(3) {
    grid-column: 1 / -1;
    grid-row: auto;
    margin-top: 0;
  }

  .project-media {
    aspect-ratio: 4 / 5;
  }

  .modal-panel {
    grid-template-columns: 1fr;
    max-height: 90vh;
    overflow-y: auto;
  }

  .modal-figure img {
    max-height: 45vh;
  }
}

@media (max-width: 600px) {
  .container,
  .container.narrow {
    width: calc(100% - 40px);
  }

  .header {
    padding: 20px 20px;
  }

  .header.scrolled {
    padding: 13px 20px;
  }

  .hero-content {
    padding: 0 24px;
    padding-top: 14vh;
  }

  .hero {
    min-height: 100svh;
  }

  .scroll-hint {
    display: none;
  }

  .service-item {
    grid-template-columns: 44px 1fr 24px;
    gap: 12px;
  }

  .service-name {
    font-size: 24px;
  }

  .section-sub {
    margin-top: -28px;
  }

  .process-list {
    grid-template-columns: 1fr;
  }

  .process-step {
    min-height: auto;
  }

  .footer-top {
    flex-direction: column;
    gap: 40px;
  }

  .footer-links {
    flex-direction: column;
    gap: 16px;
  }
}

/* Touch devices: desliga preview hover */
@media (hover: none) {
  .services-preview {
    display: none;
  }
}

/* =========================================================
   ACESSIBILIDADE / MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }

  .reveal,
  .reveal-hero {
    opacity: 1;
    transform: none;
  }
}
