/* ==========================================================
   Lucas Pascoal — portfolio
   Minimal, black & white, big type.
   ========================================================== */

:root {
  --bg: #ffffff;
  --ink: #0f1115;
  --ink-2: #3a3d44;
  --muted: #7a7d85;
  --line: #e7e7ea;
  --soft: #f5f5f6;
  --soft-2: #ededef;

  --font-display: "Inter Tight", "Inter", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;

  --container: 1200px;
  --gutter: 16px;
  --radius: 16px;
  --radius-sm: 10px;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  --ease-soft: cubic-bezier(0.4, 0, 0.2, 1);
  --t: 0.6s;
}

@media (min-width: 768px) {
  :root { --gutter: 40px; }
}
@media (min-width: 1200px) {
  :root { --gutter: 56px; }
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; }
h1, h2, h3, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--ink); color: #fff; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Typography ---------- */
.h2 {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(1.75rem, 3.6vw, 2.75rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  max-width: 20ch;
}
.lead {
  color: var(--muted);
  font-size: 1rem;
  max-width: 44ch;
}
.tag {
  display: inline-block;
  padding: 6px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  margin-bottom: 20px;
}
.tag--light { border-color: rgba(255,255,255,0.22); color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid var(--ink);
  transition: background var(--t) var(--ease-out), color var(--t) var(--ease-out), transform 0.4s var(--ease-out);
  will-change: transform;
}
.btn--outline { background: transparent; color: var(--ink); }
.btn--outline:hover { background: var(--ink); color: #fff; }
.btn--dark { background: var(--ink); color: #fff; }
.btn--dark:hover { background: #fff; color: var(--ink); }
.btn--light { background: #fff; color: var(--ink); border-color: #fff; }
.btn--light:hover { background: transparent; color: #fff; }
.btn--lg { padding: 16px 30px; font-size: 1rem; gap: 10px; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  font-size: 0.95rem;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s;
}
.link-arrow span { display: inline-block; transition: transform 0.4s var(--ease-out); }
.link-arrow:hover span { transform: translateX(4px); }
.link-arrow:hover { border-color: currentColor; }
.link-arrow--light { color: rgba(255,255,255,0.75); }
.link-arrow--light:hover { color: #fff; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  transition: transform 0.5s var(--ease-out), background 0.4s, box-shadow 0.4s;
}
.nav.is-hidden { transform: translateY(-100%); }
.nav.is-scrolled {
  background: rgba(255,255,255,0.82);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}
.nav__logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
}
.nav__mark {
  width: 22px; height: 22px;
  border-radius: 7px 7px 7px 2px;
  background: var(--ink);
  position: relative;
}
.nav__mark::after {
  content: "";
  position: absolute;
  right: 4px; bottom: 4px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #fff;
  transition: box-shadow 0.5s var(--ease-out), transform 0.5s var(--ease-out);
}
/* ∴ — segure o mouse no logo */
.nav__logo:hover .nav__mark::after {
  transform: translate(-3px, 1px);
  box-shadow: 8px 0 0 #fff, 4px -7px 0 #fff;
}
.nav__mark--light { background: #fff; }
.nav__mark--light::after { background: var(--ink); }

.nav__links { display: none; gap: 32px; }
.nav__links a {
  font-size: 0.9rem;
  color: var(--ink-2);
  position: relative;
  transition: color 0.3s;
}
.nav__links a::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--ink);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.4s var(--ease-out);
}
.nav__links a:hover { color: var(--ink); }
.nav__links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav__cta { display: none; }

.nav__burger {
  width: 44px; height: 44px;
  display: grid;
  place-items: center;
  margin-right: -10px;
}
.nav__burger span {
  display: block;
  width: 22px; height: 1.5px;
  background: var(--ink);
  transition: transform 0.4s var(--ease-out), opacity 0.3s;
  grid-area: 1 / 1;
}
.nav__burger span:first-child { transform: translateY(-4px); }
.nav__burger span:last-child { transform: translateY(4px); }
.nav__burger[aria-expanded="true"] span:first-child { transform: rotate(45deg); }
.nav__burger[aria-expanded="true"] span:last-child { transform: rotate(-45deg); }

@media (min-width: 900px) {
  .nav__links, .nav__cta { display: inline-flex; }
  .nav__burger { display: none; }
}

/* ---------- Mobile menu ---------- */
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: var(--bg);
  padding: 110px var(--gutter) 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease-soft), visibility 0.4s;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; }
.mobile-menu nav { display: flex; flex-direction: column; gap: 6px; }
.mobile-menu nav a {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 11vw, 3.5rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--ease-out), transform 0.6s var(--ease-out);
  transition-delay: calc(var(--i) * 60ms + 80ms);
}
.mobile-menu.is-open nav a { opacity: 1; transform: none; }
.mobile-menu__foot { display: flex; gap: 20px; color: var(--muted); font-size: 0.9rem; }
body.menu-open { overflow: hidden; }

/* ---------- Hero ---------- */
.hero {
  min-height: 100svh;
  padding-top: 96px;
  padding-bottom: 40px;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto 1fr auto;
  grid-template-areas:
    "meta    focus"
    "title   title"
    "tagline tagline";
  grid-template-columns: 1fr auto;
  row-gap: 24px;
}
.hero__focus {
  grid-area: focus;
  align-self: start;
  text-align: right;
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.7;
}
.hero__focus li { position: relative; padding-right: 14px; }
.hero__focus li::after {
  content: "";
  position: absolute;
  right: 0; top: 50%;
  width: 5px; height: 5px;
  border-radius: 50%;
  background: var(--line);
  transform: translateY(-50%);
  animation: focus-dot 4.5s var(--ease-soft) infinite;
}
.hero__focus li:nth-child(2)::after { animation-delay: 1.5s; }
.hero__focus li:nth-child(3)::after { animation-delay: 3s; }
@keyframes focus-dot {
  0%, 26%  { background: var(--ink); transform: translateY(-50%) scale(1.15); }
  33%, 100% { background: var(--line); transform: translateY(-50%) scale(1); }
}
.hero__title { align-self: end; }
.hero__title {
  grid-area: title;
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(3.6rem, 17vw, 11.5rem);
  line-height: 0.92;
  letter-spacing: -0.045em;
}
.hero__tagline {
  grid-area: tagline;
  font-size: 0.95rem;
  color: var(--ink-2);
  line-height: 1.5;
}
.hero__meta {
  grid-area: meta;
  align-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.85rem;
  color: var(--muted);
}
.dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 0 0 rgba(34,197,94,0.5);
  animation: pulse 2.4s infinite;
}

.flag {
  font-size: 0.95em;
  line-height: 1;
  opacity: 0.85;
  filter: saturate(0.85);
  margin-left: 2px;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(34,197,94,0.45); }
  70%  { box-shadow: 0 0 0 10px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

@media (min-width: 900px) {
  .hero {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      "meta  focus"
      "title title"
      "title tagline";
    grid-template-rows: auto 1fr auto;
    column-gap: 48px;
    row-gap: 0;
    padding-top: 140px;
    padding-bottom: 64px;
    align-items: end;
  }
  .hero__tagline { text-align: right; max-width: 300px; justify-self: end; padding-bottom: 0.4em; }
  .hero__meta { align-self: start; }
}

/* Text line reveal (hero + contact) */
.line { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.line__inner {
  display: block;
  transform: translateY(110%);
  transition: transform 1.1s var(--ease-out);
}
.is-loaded .line__inner,
.in-view .line__inner { transform: translateY(0); }
.line:nth-child(2) .line__inner { transition-delay: 0.1s; }

/* ---------- Marquee ---------- */
.marquee {
  overflow: hidden;
  border-block: 1px solid var(--line);
  padding: 18px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track {
  display: flex;
  gap: 12px;
  width: max-content;
  animation: marquee 38s linear infinite;
}
.marquee:hover .marquee__track { animation-play-state: paused; }
@keyframes marquee {
  to { transform: translateX(-50%); }
}
.chip {
  padding: 12px 26px;
  border-radius: 999px;
  background: var(--soft);
  font-family: var(--font-display);
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

/* ---------- Sections ---------- */
.section { padding-block: clamp(72px, 10vw, 128px); }
.section--soft { background: var(--soft); }
.section__head {
  display: grid;
  gap: 20px;
  margin-bottom: clamp(36px, 5vw, 64px);
}
@media (min-width: 900px) {
  .section__head {
    grid-template-columns: 1.4fr 1fr;
    align-items: end;
    gap: 48px;
  }
  .section__head .lead { justify-self: end; }
}

/* ---------- Sobre ---------- */
.about__grid {
  display: grid;
  gap: 32px;
}
.about__visual {
  border-radius: var(--radius);
  background: var(--ink);
  color: #fff;
  min-height: 280px;
  display: flex;
  align-items: flex-end;
  padding: 28px;
  position: relative;
  overflow: hidden;
}
.about__visual::before {
  content: "";
  position: absolute;
  inset: auto -20% -40% auto;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
}
.about__visual::after {
  content: "";
  position: absolute;
  inset: -30% auto auto -10%;
  width: 40%;
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.12);
}
.about__card { position: relative; max-width: 34ch; }
.about__card-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  margin-bottom: 10px;
}
.about__card p { font-family: var(--font-display); font-size: 1.35rem; line-height: 1.3; letter-spacing: -0.01em; }
.about__card strong { font-weight: 500; }

.stats { display: grid; gap: 8px; }
.stats li {
  display: grid;
  gap: 4px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.stats strong {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 5vw, 3.8rem);
  line-height: 1;
  letter-spacing: -0.04em;
}
.stats li > span { color: var(--muted); font-size: 0.9rem; max-width: 30ch; }

@media (min-width: 900px) {
  .about__grid { grid-template-columns: 1.3fr 1fr; gap: 64px; align-items: start; }
  .about__visual { min-height: 380px; }
  .stats li { padding: 28px 0; }
}

/* ---------- Serviços ---------- */
.services { display: grid; gap: 40px; }
.services__intro .btn { margin-top: 28px; }
.services__intro .lead { margin: 12px 0 0; }
.services__grid {
  display: grid;
  gap: 12px;
}
.service {
  position: relative;
  padding: 26px 24px 30px;
  border-radius: var(--radius-sm);
  background: var(--soft);
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: hidden;
  transition: background 0.5s var(--ease-soft), color 0.5s var(--ease-soft), transform 0.5s var(--ease-out);
}
.service::before {
  content: "";
  display: block;
  width: 28px; height: 1.5px;
  background: currentColor;
  margin-bottom: 6px;
  transition: width 0.5s var(--ease-out);
}
.service h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}
.service p { font-size: 0.92rem; color: var(--muted); transition: color 0.5s; }
.service__arrow {
  margin-top: auto;
  font-size: 1.3rem;
  line-height: 1;
  transition: transform 0.5s var(--ease-out);
}
.service--dark { background: var(--ink); color: #fff; }
.service--dark p { color: rgba(255,255,255,0.65); }
.service--dark::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 140px; height: 140px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.15);
}
@media (hover: hover) {
  .service:hover { background: var(--ink); color: #fff; transform: translateY(-3px); }
  .service:hover p { color: rgba(255,255,255,0.65); }
  .service:hover::before { width: 48px; }
  .service:hover .service__arrow { transform: translate(4px, 0); }
  .service--dark:hover { background: #1c1f26; }
}

@media (min-width: 640px) {
  .services__grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 900px) {
  .services { grid-template-columns: 1fr 1.25fr; gap: 80px; align-items: start; }
  .service { min-height: 230px; padding: 30px 28px 34px; }
}

/* ---------- Experiência ---------- */
.timeline { border-top: 1px solid var(--line); }
.timeline__item {
  display: grid;
  gap: 8px;
  padding: 24px 0;
  border-bottom: 1px solid var(--line);
  transition: background 0.4s var(--ease-soft), padding 0.4s var(--ease-out);
}
.timeline__item h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
}
.timeline__item h3 span { color: var(--muted); font-weight: 400; }
.timeline__item p { color: var(--muted); font-size: 0.9rem; max-width: 52ch; margin-top: 4px; }
.timeline__item time {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(1.4rem, 3vw, 2rem);
  letter-spacing: -0.03em;
  white-space: nowrap;
}
@media (min-width: 768px) {
  .timeline__item {
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 40px;
    padding: 30px 16px;
    margin-inline: -16px;
    border-radius: var(--radius-sm);
  }
  .timeline__item:hover { background: #fff; }
}

/* ---------- Projetos ---------- */
.projects {
  display: grid;
  gap: 16px;
}
.project {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--soft);
}
.project__visual {
  aspect-ratio: 4 / 3;
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
  transition: transform 0.9s var(--ease-out);
}
.project__visual span {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(4rem, 12vw, 7rem);
  letter-spacing: -0.06em;
  line-height: 1;
  opacity: 0.9;
  transition: transform 0.9s var(--ease-out);
}
/* Substitua por <img> reais quando tiver screenshots */
.project__visual--1 { background: linear-gradient(135deg, #0f1115 0%, #2b2f38 100%); color: #fff; }
.project__visual--2 { background: linear-gradient(135deg, #ededef 0%, #d9dade 100%); color: var(--ink); }
.project__visual--3 { background: radial-gradient(circle at 30% 30%, #3a3d44, #0f1115 70%); color: #fff; }
.project__visual--4 { background: linear-gradient(160deg, #f5f5f6 0%, #cfd0d4 100%); color: var(--ink); }
.project__visual--5 { background: linear-gradient(135deg, #1c1f26 0%, #4a4e57 100%); color: #fff; }
.project__visual--6 { background: repeating-linear-gradient(135deg, #f5f5f6 0 12px, #e7e7ea 12px 24px); color: var(--ink); }

.project__info {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 18px 20px 20px;
}
.project__info h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.05rem;
  letter-spacing: -0.015em;
}
.project__info p { color: var(--muted); font-size: 0.85rem; white-space: nowrap; }
.project__arrow {
  position: absolute;
  top: 16px; right: 16px;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: #fff;
  color: var(--ink);
  display: grid;
  place-items: center;
  font-size: 1.1rem;
  opacity: 0;
  transform: translate(-6px, 6px);
  transition: opacity 0.4s, transform 0.5s var(--ease-out);
}
@media (hover: hover) {
  .project:hover .project__visual { transform: scale(1.02); }
  .project:hover .project__visual span { transform: scale(1.08) rotate(-2deg); }
  .project:hover .project__arrow { opacity: 1; transform: translate(0, 0); }
}
.projects__more { margin-top: 40px; display: flex; justify-content: center; }

@media (min-width: 640px) {
  .projects { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 1000px) {
  .projects { grid-template-columns: repeat(3, 1fr); gap: 20px; }
}

/* ---------- Contato ---------- */
.contact {
  background: var(--ink);
  color: #fff;
  padding-block: clamp(80px, 12vw, 160px);
}
.contact__inner {
  display: grid;
  gap: 40px;
}
.contact__title {
  font-family: var(--font-display);
  font-weight: 300;
  font-size: clamp(2.6rem, 8vw, 6rem);
  line-height: 1;
  letter-spacing: -0.04em;
  margin-bottom: 24px;
}
.contact__lead { color: rgba(255,255,255,0.6); max-width: 40ch; }
.contact__actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 20px;
}
@media (min-width: 900px) {
  .contact__inner { grid-template-columns: 1.4fr 1fr; align-items: end; }
  .contact__actions { align-items: flex-end; }
}

/* ---------- Footer ---------- */
.footer {
  background: var(--ink);
  color: rgba(255,255,255,0.7);
  border-top: 1px solid rgba(255,255,255,0.1);
  font-size: 0.88rem;
}
.footer__inner {
  display: grid;
  gap: 32px;
  padding-block: 48px;
}
.footer__brand { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 10px; color: #fff; font-weight: 500; }
.footer__brand p { grid-column: 1 / -1; margin-top: 14px; color: rgba(255,255,255,0.55); font-weight: 400; max-width: 30ch; }
.footer__col { display: grid; gap: 10px; align-content: start; }
.footer__col > span { color: rgba(255,255,255,0.4); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.1em; margin-bottom: 4px; }
.footer__col a { transition: color 0.3s; width: fit-content; }
.footer__col a:hover { color: #fff; }
.footer__bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 12px;
  padding-block: 22px;
  border-top: 1px solid rgba(255,255,255,0.1);
  color: rgba(255,255,255,0.45);
  font-size: 0.8rem;
}
.tri {
  display: inline-block;
  margin: 0 6px;
  color: rgba(255,255,255,0.3);
  transition: color 0.4s;
  cursor: default;
}
.tri:hover { color: #fff; }
.footer__top { transition: color 0.3s; }
.footer__top:hover { color: #fff; }
@media (min-width: 768px) {
  .footer__inner { grid-template-columns: 2fr 1fr 1fr; gap: 40px; padding-block: 64px; }
}

/* ---------- Scroll reveal ---------- */
.reveal, .reveal-scale {
  opacity: 0;
  transition: opacity 0.9s var(--ease-out), transform 0.9s var(--ease-out);
  will-change: opacity, transform;
}
.reveal { transform: translateY(26px); }
.reveal-scale { transform: scale(0.96) translateY(14px); }
.reveal.in-view, .reveal-scale.in-view { opacity: 1; transform: none; }

/* stagger siblings */
.services__grid .service:nth-child(2), .projects .project:nth-child(2), .stats li:nth-child(2) { transition-delay: 0.08s; }
.services__grid .service:nth-child(3), .projects .project:nth-child(3), .stats li:nth-child(3) { transition-delay: 0.16s; }
.services__grid .service:nth-child(4), .projects .project:nth-child(4) { transition-delay: 0.24s; }
.projects .project:nth-child(5) { transition-delay: 0.32s; }
.projects .project:nth-child(6) { transition-delay: 0.4s; }
.timeline__item:nth-child(2) { transition-delay: 0.06s; }
.timeline__item:nth-child(3) { transition-delay: 0.12s; }
.timeline__item:nth-child(4) { transition-delay: 0.18s; }

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal-scale, .line__inner, .mobile-menu nav a { opacity: 1 !important; transform: none !important; transition: none !important; }
  .marquee__track { animation: none; }
  .dot, .hero__focus li::after { animation: none; }
  .hero__focus li:first-child::after { background: var(--ink); }
  * { transition-duration: 0.01ms !important; }
}
