/* Layout: menu flutuante em moldura (Porphiolio) · hero com retrato central e nome gigante sobreposto (Julian David)
   · 4 cards em leque que voam para a grade de projetos (Launchfolio) · lista de serviços em acordeão (Altrum) */
:root {
  --bg: #080909;
  --bg-raised: #0f1112;
  --surface: #161819;
  --line: #1f2324;
  --fg: #f2f1ee;
  --muted: #8b9396;
  --faint: #4d5457;
  --accent: #4fb8ff;
  --ok: #3ddc84;
  --ink: #0a0a0a;

  --font: "Helvetica Suzuki", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --w-light: 300;
  --w-regular: 400;
  --w-bold: 700;

  --max: 1180px;
  --radius: 18px;
  --ease: cubic-bezier(.22, .8, .24, 1);
  color-scheme: dark;
}

@font-face { font-family: "Helvetica Suzuki"; src: url("fonts/helvetica-light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Helvetica Suzuki"; src: url("fonts/helvetica-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Helvetica Suzuki"; src: url("fonts/helvetica-oblique.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Helvetica Suzuki"; src: url("fonts/helvetica-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Helvetica Suzuki"; src: url("fonts/helvetica-bold-oblique.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--bg); }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font);
  font-weight: var(--w-regular);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 60; background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; border-radius: 8px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }

.wrap {
  max-width: var(--max);
  margin-inline: auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.label {
  font-size: 12px;
  font-weight: var(--w-regular);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 22px;
  border-radius: 999px;
  font-size: 15px; font-weight: var(--w-regular);
  transition: background .25s, color .25s, transform .25s var(--ease);
  white-space: nowrap;
}
.btn-light { background: var(--fg); color: var(--ink); }
.btn-light:hover { background: #fff; transform: translateY(-1px); }
.btn-dark { background: var(--surface); color: var(--fg); border: 1px solid var(--line); }
.btn-dark:hover { background: #1e2122; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); flex: none; }

/* ---------- Menu (Porphiolio) ---------- */
.nav-shell {
  position: fixed; z-index: 50;
  top: calc(env(safe-area-inset-top, 0px) + 18px);
  left: 0; right: 0;
  display: flex; justify-content: center;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
  pointer-events: none;
}
.nav {
  --full-w: min(1080px, 100%);
  --compact-w: 292px;
  position: relative;
  width: var(--full-w);
  height: 66px;
  pointer-events: auto;
  border: 1px solid var(--line);
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: width .6s var(--ease);
}
.nav .corner { position: absolute; width: 7px; height: 7px; background: var(--line); border: 1px solid #2c3133; }
.nav .corner:nth-of-type(1) { top: -4px; left: -4px; }
.nav .corner:nth-of-type(2) { top: -4px; right: -4px; }
.nav .corner:nth-of-type(3) { bottom: -4px; left: -4px; }
.nav .corner:nth-of-type(4) { bottom: -4px; right: -4px; }

.nav-full, .nav-compact {
  position: absolute; inset: 0;
  display: flex; align-items: center;
  padding: 0 12px;
  transition: opacity .35s ease, visibility .35s;
}
.nav-full { justify-content: space-between; gap: 16px; }
.nav-compact { justify-content: center; gap: 10px; opacity: 0; visibility: hidden; }

.brand { display: flex; align-items: center; gap: 12px; font-weight: var(--w-bold); font-size: 16px; letter-spacing: -.01em; white-space: nowrap; }
.avatar { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); flex: none; }

.nav-links { display: flex; gap: 6px; list-style: none; margin: 0; padding: 0; position: absolute; left: 50%; transform: translateX(-50%); }
.nav-links a {
  display: inline-flex; align-items: center; gap: 8px;
  height: 42px; padding: 0 16px;
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  color: #d9dad7;
  transition: background .2s, color .2s;
}
.nav-links a:hover, .nav-links a.is-active { background: #202324; color: var(--fg); }
.nav-links svg { width: 16px; height: 16px; flex: none; }

.pill-status {
  display: inline-flex; align-items: center; gap: 10px;
  height: 46px; padding: 0 20px;
  border-radius: 999px;
  background: var(--fg); color: var(--ink);
  font-size: 15px; white-space: nowrap;
}

/* Estado compacto: ao rolar a página. Hover ou foco reabrem o menu completo. */
.nav.is-compact:not(:hover):not(:focus-within) { width: var(--compact-w); }
.nav.is-compact:not(:hover):not(:focus-within) .nav-full { opacity: 0; visibility: hidden; }
.nav.is-compact:not(:hover):not(:focus-within) .nav-compact { opacity: 1; visibility: visible; transition-delay: .18s; }

/* ---------- Hero (Julian David) ---------- */
.hero {
  position: relative;
  padding-top: calc(env(safe-area-inset-top, 0px) + 128px);
  padding-bottom: 56px;
}
.hero-stage {
  position: relative;
  display: flex; flex-direction: column; align-items: center;
  max-width: 1080px; margin-inline: auto;
  padding-left: max(20px, env(safe-area-inset-left, 0px));
  padding-right: max(20px, env(safe-area-inset-right, 0px));
}
.portrait {
  position: relative; z-index: 6;
  width: clamp(240px, 26vw, 340px);
  aspect-ratio: 4 / 5;
  border-radius: 26px;
  overflow: hidden;
  background: var(--bg-raised);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.08), 0 40px 80px -40px rgba(0,0,0,.9);
}
.portrait::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 2; pointer-events: none;
  padding: 1px;
  background: linear-gradient(180deg, rgba(255,255,255,.55), rgba(255,255,255,.06) 40%, transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.portrait img {
  width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%;
  -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent 96%);
  mask-image: linear-gradient(to bottom, #000 55%, transparent 96%);
}
.hello {
  position: relative; z-index: 7;
  margin-top: -64px;
  font-size: 12px; letter-spacing: .24em; text-transform: uppercase; color: #c9cbc8;
}
.hero-name {
  position: relative; z-index: 7;
  margin-top: 6px;
  font-weight: var(--w-bold);
  font-size: clamp(64px, 12.2vw, 176px);
  line-height: .8;
  letter-spacing: -.065em;
  text-align: center;
  color: #ededeb;
}
.hero-name span { display: block; }
.hero-name span + span { margin-top: .02em; }
.hero-lead {
  position: relative; z-index: 7;
  margin-top: 30px;
  max-width: 470px;
  text-align: center;
  font-size: 18px; line-height: 1.55;
  color: #bfc3c2;
}
.hero-actions { position: relative; z-index: 7; display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 28px; }
.hero-meta {
  display: flex; justify-content: space-between; gap: 16px;
  max-width: 1180px; margin: 56px auto 0;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}

/* Leque de cards (Launchfolio) */
.fan-slot {
  position: absolute; z-index: 3;
  width: clamp(150px, 15vw, 196px);
  aspect-ratio: 800 / 1174;
  top: 70px;
  left: 50%;
  margin-left: calc(var(--x) - clamp(150px, 15vw, 196px) / 2);
  transform: translateY(var(--y)) rotate(var(--r));
  pointer-events: none;
}
.fan-slot[data-i="0"] { --x: -27vw; --y: 96px; --r: -12deg; }
.fan-slot[data-i="1"] { --x: -15vw; --y: 24px; --r: -5deg; }
.fan-slot[data-i="2"] { --x: 15vw;  --y: 24px; --r: 5deg; }
.fan-slot[data-i="3"] { --x: 27vw;  --y: 96px; --r: 12deg; }
@media (min-width: 1500px) {
  .fan-slot[data-i="0"] { --x: -400px; }
  .fan-slot[data-i="1"] { --x: -228px; }
  .fan-slot[data-i="2"] { --x: 228px; }
  .fan-slot[data-i="3"] { --x: 400px; }
}

.fly-layer { position: fixed; inset: 0; z-index: 4; pointer-events: none; overflow: hidden; }
.fly {
  position: absolute; top: 0; left: 0;
  border-radius: 14px; overflow: hidden;
  background: var(--surface);
  box-shadow: 0 30px 60px -30px rgba(0,0,0,.85), 0 0 0 1px rgba(255,255,255,.06);
  will-change: transform;
  transform-origin: 50% 50%;
}
.fly img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Clientes ---------- */
.clients { border-block: 1px solid var(--line); }
.clients .wrap { display: flex; align-items: center; gap: 40px; padding-block: 30px; }
.clients ul { display: flex; flex-wrap: wrap; gap: 14px 44px; list-style: none; margin: 0; padding: 0; }
.clients li { font-size: 22px; font-weight: var(--w-light); letter-spacing: -.01em; color: #d6d8d5; white-space: nowrap; }
.clients .label { flex: none; max-width: 150px; line-height: 1.5; }

/* ---------- Cabeçalho de seção estilo Altrum ---------- */
.section { padding-block: 120px; }
.sec-meta { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.sec-meta .label { display: inline-flex; gap: 8px; align-items: center; }
.big-title {
  display: flex; align-items: flex-start; gap: 14px;
  font-weight: var(--w-bold);
  font-size: clamp(56px, 11vw, 168px);
  line-height: .9;
  letter-spacing: -.06em;
}
.big-title sup {
  font-size: clamp(18px, 2.2vw, 34px);
  font-weight: var(--w-regular);
  letter-spacing: -.02em;
  color: var(--faint);
  line-height: 1; margin-top: .25em;
}
.sec-lead { max-width: 520px; margin-top: 28px; font-size: 18px; color: #bfc3c2; }
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; margin-bottom: 64px; }

/* ---------- Projetos ---------- */
.work-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 64px 28px; list-style: none; margin: 0; padding: 0; }
.work { min-width: 0; }
.work-media {
  position: relative;
  aspect-ratio: 800 / 1174;
  border-radius: 14px; overflow: hidden;
  background: var(--surface);
}
.work-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .8s var(--ease); }
.work:hover .work-media img { transform: scale(1.03); }
.fly-on .work-media[data-fly] { background: transparent; }
.fly-on .work-media[data-fly] img { opacity: 0; }
.work-body { padding-top: 22px; display: grid; gap: 14px; }
.work-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.work h3 { font-size: 19px; font-weight: var(--w-bold); letter-spacing: -.01em; }
.work .label { font-size: 11px; white-space: nowrap; }
.metric { display: grid; gap: 4px; padding-top: 14px; border-top: 1px solid var(--line); }
.metric strong { font-size: 40px; line-height: 1; font-weight: var(--w-light); letter-spacing: -.04em; color: var(--accent); font-variant-numeric: tabular-nums; }
.metric span { font-size: 14px; line-height: 1.5; color: var(--muted); max-width: 32ch; }

/* ---------- Serviços (Altrum) ---------- */
.services { background: var(--bg-raised); border-top: 1px solid var(--line); }
.svc-list { list-style: none; margin: 72px 0 0; padding: 0; border-top: 1px solid var(--line); }
.svc { border-bottom: 1px solid var(--line); }
.svc-btn {
  width: 100%;
  display: flex; align-items: center; gap: 14px;
  padding: 30px 0;
  text-align: left;
}
.svc-num { align-self: flex-start; margin-top: 4px; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; min-width: 34px; }
.svc-name {
  flex: 1;
  font-size: clamp(28px, 3.6vw, 46px);
  font-weight: var(--w-bold);
  letter-spacing: -.035em;
  line-height: 1.05;
  transition: transform .4s var(--ease), color .3s;
}
.svc-btn:hover .svc-name { transform: translateX(8px); }
.svc-icon { position: relative; width: 18px; height: 18px; flex: none; color: var(--muted); transition: transform .4s var(--ease), color .3s; }
.svc-icon::before, .svc-icon::after { content: ""; position: absolute; left: 50%; top: 50%; width: 16px; height: 1.5px; background: currentColor; transform: translate(-50%, -50%); }
.svc-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.svc-btn[aria-expanded="true"] .svc-icon { transform: rotate(45deg); color: var(--fg); }
.svc-panel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .5s var(--ease); }
.svc-panel > div { overflow: hidden; }
.svc.is-open .svc-panel { grid-template-rows: 1fr; }
.svc-panel p { padding: 0 0 34px 48px; max-width: 64ch; font-size: 17px; color: #b9bdbc; }

/* ---------- Sobre ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 64px; align-items: start; }
.about h2 { font-size: clamp(38px, 4.6vw, 64px); font-weight: var(--w-bold); line-height: 1; letter-spacing: -.045em; }
.about-intro { font-size: 20px; line-height: 1.55; color: #d4d6d3; max-width: 56ch; }
.about-intro em { font-style: italic; color: var(--fg); }
.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin-top: 56px; list-style: none; padding: 0; }
.pillars li { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid var(--line); }
.pillars h3 { font-size: 18px; font-weight: var(--w-bold); letter-spacing: -.01em; }
.pillars p { font-size: 15px; color: var(--muted); }

/* ---------- Contato ---------- */
.contact { border-top: 1px solid var(--line); }
.contact-inner { display: grid; gap: 36px; justify-items: start; }
.contact h2 { font-size: clamp(48px, 8.4vw, 128px); font-weight: var(--w-bold); line-height: .92; letter-spacing: -.06em; max-width: 15ch; }
.contact h2 em { font-style: normal; font-weight: var(--w-light); color: var(--muted); }
.contact-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 20px; }
.contact-row .status { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; color: #c9cbc8; }

footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding-block: 28px 36px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
footer strong { color: var(--fg); font-weight: var(--w-bold); }
footer a:hover { color: var(--fg); }

/* ---------- Responsivo ---------- */
@media (max-width: 1080px) {
  .nav-links a span { display: none; }
  .nav-links a { padding: 0 13px; }
}
@media (max-width: 899px) {
  .fan-slot, .fly-layer { display: none; }
  .work-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px 18px; }
  .about-grid { grid-template-columns: 1fr; gap: 28px; }
  .clients .wrap { flex-direction: column; align-items: flex-start; gap: 18px; }
  .clients .label { max-width: none; }
}
@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav { height: 60px; --compact-w: 270px; }
  .nav-full .btn { height: 40px; padding: 0 16px; font-size: 14px; }
  .avatar { width: 36px; height: 36px; }
  .pill-status { height: 40px; font-size: 14px; padding: 0 16px; }
  .hero { padding-top: calc(env(safe-area-inset-top, 0px) + 108px); }
  .hello { margin-top: -48px; }
  .hero-lead { font-size: 16px; padding-inline: 8px; }
  .hero-meta { margin-top: 40px; }
  .section { padding-block: 84px; }
  .sec-head { margin-bottom: 44px; }
  .svc-btn { padding: 22px 0; }
  .svc-num { min-width: 28px; }
  .svc-panel p { padding-left: 42px; font-size: 16px; }
  .pillars { grid-template-columns: 1fr; gap: 20px; margin-top: 40px; }
  .metric strong { font-size: 32px; }
  .clients li { font-size: 18px; }
  .clients ul { gap: 10px 28px; }
}
@media (max-width: 520px) {
  .work-grid { grid-template-columns: 1fr; }
  .brand-name { display: none; }
  .hero-meta .label { font-size: 11px; letter-spacing: .1em; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
