/* ---------- Fonts ---------- */
@font-face {
  font-family: "Neue Haas Display";
  src: url("../fonts/NeueHaasDisplayXXThin.ttf") format("truetype");
  font-weight: 100;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Haas Display";
  src: url("../fonts/NeueHaasDisplayThin.ttf") format("truetype");
  font-weight: 200;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Haas Display";
  src: url("../fonts/NeueHaasDisplayLight.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Haas Display";
  src: url("../fonts/NeueHaasDisplayRoman.ttf") format("truetype");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Haas Display";
  src: url("../fonts/NeueHaasDisplayMedium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Haas Display";
  src: url("../fonts/NeueHaasDisplayBold.ttf") format("truetype");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Neue Haas Display";
  src: url("../fonts/NeueHaasDisplayBlack.ttf") format("truetype");
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Reset ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: "Neue Haas Display", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #0a0a0a;
  color: #fff;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; }

/* ---------- Tokens ---------- */
:root {
  --orange: #fb4e01;
  --orange-deep: #d63e00;
  --black: #0a0a0a;
  --page-pad: clamp(24px, 4vw, 48px);
  --topbar-h: clamp(72px, 9vw, 104px);
}

/* ---------- Topbar: logo | nav pill | name, all on one vertical axis ---------- */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  height: var(--topbar-h);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 0 var(--page-pad);
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }

.logo-mark {
  justify-self: start;
  transition: opacity 0.3s ease, transform 0.3s ease;
}
.logo-mark img { width: 38px; height: auto; display: block; }

.topbar .name {
  justify-self: end;
  font-weight: 400;
  font-size: clamp(15px, 1.6vw, 22px);
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

.topbar.is-scrolled .logo-mark,
.topbar.is-scrolled .name {
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
}

.nav-pill {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 48px);
  padding: 14px clamp(18px, 3vw, 32px);
  background: rgba(0, 0, 0, 0.14);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.nav-pill a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: rgba(255, 255, 255, 0.4);
  transition: color 0.2s ease;
}
.nav-pill a svg {
  width: 24px;
  height: 24px;
  transition: transform 0.2s ease;
}
.nav-pill a[data-section="contato"] svg {
  width: 21px;
  height: 21px;
}
.nav-pill a:hover { color: rgba(255, 255, 255, 0.7); }
.nav-pill a.is-active {
  color: #fff;
}
.nav-pill a.is-active svg {
  transform: scale(1.2);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  background-color: #fa4f02;
  background-image: url("../assets/home-bg.png");
  background-size: auto 115%;
  background-position: center calc(100% + 35px);
  background-repeat: no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
  scroll-margin-top: var(--topbar-h);
}
.hero-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding: 0 var(--page-pad);
}
.hero h1 {
  font-weight: 300;
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.98;
  letter-spacing: -0.01em;
}
.hero-tags {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: clamp(24px, 4vw, 40px);
}
.tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.hero-tags span {
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
  background: rgba(0, 0, 0, 0.12);
}
.hero-name { display: none; }

/* ---------- Projects section ---------- */
#projetos {
  position: relative;
  overflow: hidden;
  background-color: var(--black);
  background-image: url("../assets/projects-bg-plain.png");
  background-size: 100% auto;
  background-position: top center;
  background-repeat: no-repeat;
  background-attachment: fixed;
  scroll-margin-top: var(--topbar-h);
}
.projects-ball {
  position: absolute;
  top: 0;
  left: 0;
  width: clamp(560px, 75vw, 1100px);
  aspect-ratio: 1 / 1;
  background-image: url("../assets/projects-bola.png");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  will-change: transform;
}
.projects-hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: flex-end;
  padding: calc(var(--topbar-h) + 88px) var(--page-pad) 64px;
}
.projects-hero h1 {
  font-weight: 300;
  font-size: clamp(36px, 6vw, 56px);
}

.project-list {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: clamp(32px, 6vw, 64px);
  padding: 0 var(--page-pad) 120px;
  max-width: 1200px;
  margin: 0 auto;
}

.project-card {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  background: #050505;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.45);
}
.project-card .card-link {
  position: absolute;
  inset: 0;
  z-index: 5;
}
.project-card .cover {
  position: relative;
  height: clamp(280px, 42vw, 460px);
  overflow: hidden;
}
.project-card .cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;
}
.project-card .cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, 0.55) 75%, rgba(0, 0, 0, 0.92) 100%);
}
.project-card .body {
  position: relative;
  padding: 0 clamp(24px, 4vw, 48px) clamp(28px, 4vw, 40px);
  margin-top: -80px;
}
.project-card .tag {
  display: inline-block;
  border: 1px solid rgba(255, 255, 255, 0.6);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
}
.project-card h2 {
  font-weight: 800;
  font-size: clamp(24px, 3.4vw, 40px);
  line-height: 1.1;
  max-width: 80%;
}
.project-card .year {
  color: var(--orange);
  font-weight: 500;
  margin-top: 10px;
  font-size: 15px;
}
.project-card .brand {
  margin-top: 28px;
  height: 22px;
}
.project-card .brand img { height: 100%; width: auto; }
.project-card .arrow-btn {
  position: absolute;
  right: clamp(24px, 4vw, 48px);
  bottom: clamp(28px, 4vw, 40px);
  width: 64px;
  height: 64px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  color: var(--orange);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}
.project-card .arrow-btn svg { width: 22px; height: 22px; }
.project-card:hover .arrow-btn {
  background: var(--orange);
  border-color: var(--orange);
  color: #0a0a0a;
  transform: translate(3px, -3px);
}

/* ---------- Footer / Contato (anchor section, not a page) ---------- */
.site-footer {
  scroll-margin-top: var(--topbar-h);
  background: var(--black);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  padding: clamp(48px, 8vw, 96px) var(--page-pad) 0;
  display: flex;
  flex-direction: column;
  gap: clamp(36px, 6vw, 56px);
}

.footer-split {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: clamp(32px, 5vw, 56px);
  align-items: start;
}
.footer-intro .logo-mark img {
  width: clamp(48px, 6vw, 72px);
  height: auto;
  margin-bottom: clamp(20px, 3vw, 28px);
}
.site-footer h2 {
  font-weight: 300;
  font-size: clamp(44px, 7vw, 84px);
  line-height: 1.05;
}

.contact-col {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.contact-col .row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 24px;
}
.contact-col .row:last-child { border-bottom: none; padding-bottom: 0; }
.contact-col label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.4);
}
.contact-col a {
  display: block;
  font-size: clamp(20px, 2.6vw, 33px);
  font-weight: 500;
  line-height: 1.1;
  color: #fff;
  white-space: nowrap;
  transition: color 0.2s ease;
}
.contact-col a:hover { color: var(--orange); }

.footer-bottom {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: clamp(16px, 3vw, 20px) 0;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.4);
  font-size: 13px;
}
.back-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.55);
  transition: color 0.2s ease;
}
.back-top:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.45) 45%, rgba(0, 0, 0, 0.72) 100%);
    z-index: 0;
  }
  .hero-inner {
    position: absolute;
    inset: 0;
    padding: 0;
  }
  .hero-bottom {
    position: absolute;
    left: var(--page-pad);
    right: var(--page-pad);
    bottom: 40px;
  }
  .hero-tags {
    position: absolute;
    top: calc(var(--topbar-h) + 16px);
    right: var(--page-pad);
    margin-top: 0;
    align-items: flex-end;
    gap: 8px;
  }
  .tags-row {
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
  }
  .topbar .name { display: none; }
  .logo-mark img { width: 28px; }
  .hero-name {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
    font-size: 13px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    opacity: 0.75;
  }
  .project-card .body { margin-top: -60px; }
  .project-card h2 { max-width: 100%; }
  .project-card .arrow-btn { width: 52px; height: 52px; border-radius: 14px; }
  .footer-split {
    grid-template-columns: 1fr;
    align-items: start;
    gap: 32px;
  }
}
