/* Portfólio 1 · Cartão — cartão de visita 3D; papel claro, tinta escura e um acento da marca.
   Cores da marca: --c1..--c6 vêm do site.json → cores (<style>{{cores_css}}</style>).
   --c1 = acento (botão principal, fios do verso) · --c5 = tinta do verso (precisa ser escura). */
:root {
  --c1: #E8B24C; --c2: #3D7BE0; --c3: #D9534F; --c4: #2E9E7A; --c5: #141418; --c6: #8A8F99;
  --bg: #ECEEF2;            /* mesa */
  --bg-2: #FFFFFF;          /* papel */
  --fg: #141418;            /* texto */
  --muted: #555866;         /* texto fraco (≥ 4,5:1 sobre --bg e --bg-2) */
  --line: rgba(20, 20, 24, .12);
  --accent: var(--c1);
  --ink: var(--c5);         /* verso do cartão */
  --on-ink: #F4F2EE;
  --on-accent: #141418;     /* texto sobre o acento (troque para #FFF se --c1 for escura) */
  --f-display: "Fraunces", Georgia, serif;
  --f-text: "Geist", system-ui, sans-serif;
  --gut: clamp(16px, 4vw, 48px);
  --hh: 64px;
}
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; background: var(--bg); }
html:not(.has-lenis) { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html:not(.has-lenis) { scroll-behavior: auto; } }
body { font: 400 1.0625rem/1.6 var(--f-text); color: var(--fg); background: var(--bg); overflow-x: clip; -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
ul { list-style: none; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--fg); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--fg); color: var(--bg-2); padding: 10px 16px; border-radius: 8px; }
.skip:focus { top: 12px; }
[hidden] { display: none !important; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid var(--fg); font-weight: 600; font-size: .98rem; text-decoration: none; cursor: pointer;
  background: transparent; transition: background-color .2s, color .2s, translate .2s;
}
.btn--ink { background: var(--fg); color: var(--bg-2); }
.btn--accent { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { translate: 0 -2px; }
  .btn--line:hover { background: var(--fg); color: var(--bg-2); }
}

/* ---------- Topo ---------- */
.top { position: sticky; top: 0; z-index: 40; height: var(--hh); display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 0 var(--gut); background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); }
.top__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; min-height: 44px; }
.top__brand img { width: 32px; height: 32px; border-radius: 50%; }
.top__cta { font-weight: 600; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; }
@media (max-width: 420px) { .top__brand span { display: none; } }

/* ---------- Abertura: o cartão ---------- */
.hero { position: relative; min-height: calc(100svh - var(--hh)); display: grid; align-content: center; justify-items: center; gap: 28px; padding: 24px var(--gut) 56px; text-align: center; overflow-x: clip; isolation: isolate;
  background: radial-gradient(60% 55% at 50% 45%, rgba(255, 255, 255, .9), transparent 70%); }
.hero__giant {
  position: absolute; z-index: -1; left: 50%; top: 50%; translate: -50% -62%; white-space: nowrap; pointer-events: none;
  font-family: var(--f-display); font-style: italic; font-weight: 300; font-variation-settings: "opsz" 144;
  font-size: clamp(8rem, 40vw, 38rem); line-height: .8; letter-spacing: -.04em;
  color: color-mix(in srgb, var(--fg) 4%, transparent); -webkit-text-stroke: 1.5px color-mix(in srgb, var(--fg) 20%, transparent);
}
.hero__kicker { font-size: .8125rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero__ctrl { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.hero__hint { font-size: .875rem; color: var(--muted); }

.stage { width: min(660px, 100%); perspective: 1600px; }
.card { position: relative; display: grid; gap: 16px; }
.card__face {
  position: relative; aspect-ratio: 1.75; border-radius: 18px; padding: clamp(18px, 4vw, 30px);
  text-align: left; overflow: hidden;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .04), 0 10px 24px -8px rgba(20, 20, 24, .18), 0 40px 80px -30px rgba(20, 20, 24, .35);
}
.card__front {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: 1fr auto; gap: 12px 18px; align-items: end;
  background:
    radial-gradient(120% 90% at 0% 0%, #fff 0%, transparent 60%),
    linear-gradient(135deg, var(--bg-2), color-mix(in srgb, var(--bg-2) 94%, var(--fg)));
}
.card__front::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 5px; background: var(--accent); }
.card__front::after { /* fibra do papel */
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: .5; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}
.card__mark { grid-row: 1 / 3; align-self: start; width: clamp(44px, 9vw, 64px); height: auto; border-radius: 50%; }
.card__id { align-self: end; }
.card__name { font-family: var(--f-display); font-weight: 500; font-variation-settings: "opsz" 144; font-size: clamp(1.6rem, 5vw, 2.9rem); line-height: 1; letter-spacing: -.02em; }
.card__role { margin-top: 8px; font-size: clamp(.8rem, 1.9vw, .95rem); color: var(--muted); }
.card__meta { grid-column: 1 / -1; display: flex; justify-content: space-between; gap: 12px; padding-top: 12px; border-top: 1px solid var(--line); font-size: .8125rem; font-weight: 600; letter-spacing: .04em; }

.card__back {
  display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: stretch;
  background: radial-gradient(120% 120% at 100% 0%, color-mix(in srgb, var(--ink) 70%, var(--accent)) 0%, var(--ink) 55%);
  color: var(--on-ink);
}
.card__label { font-size: .75rem; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin-bottom: 8px; }
.card__links { display: grid; gap: 2px; }
.card__links a { display: grid; gap: 0; padding: 6px 0; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .14); min-height: 44px; }
.card__links span { font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; opacity: .7; }
.card__links b { font-weight: 500; font-size: clamp(.82rem, 2vw, .98rem); overflow-wrap: anywhere; }
.card__qrbox { display: grid; gap: 10px; align-content: end; justify-items: center; }
.card__qr { width: clamp(84px, 18vw, 118px); aspect-ratio: 1; padding: 8px; border-radius: 10px; background: #fff; color: var(--ink); }
.card__qr svg { display: block; width: 100%; height: 100%; }
.card__qr svg rect { fill: #fff; }
.card__qr svg path { fill: currentColor; }
.card__save { min-height: 40px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--accent); color: var(--on-accent); font-size: .82rem; font-weight: 700; cursor: pointer; }
.card__back :focus-visible { outline-color: var(--accent); }
@media (max-width: 520px) {
  .card__face { aspect-ratio: auto; min-height: 220px; }
  .card__back { grid-template-columns: 1fr; }
  .card__qrbox { grid-template-columns: auto 1fr; justify-items: start; align-items: center; }
}

/* Modo 3D (só com JS): as duas faces ocupam o mesmo lugar */
.card-live .card { display: block; transform-style: preserve-3d; cursor: grab; touch-action: pan-y; }
.card-live .card:active { cursor: grabbing; }
.card-live .card__face { backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.card-live .card__back { position: absolute; inset: 0; transform: rotateY(180deg); }
@media (max-width: 520px) { .card-live .card__front { min-height: 240px; } .card-live .card__back { min-height: 0; } }

/* ---------- Seções ---------- */
section { scroll-margin-top: var(--hh); }
.sec-t { font-family: var(--f-display); font-weight: 400; font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1; letter-spacing: -.02em; margin-bottom: clamp(24px, 4vw, 40px); }
.about { max-width: 860px; margin: 0 auto; padding: clamp(56px, 9vw, 120px) var(--gut); }
.about__head { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; }
.about__photo { width: 72px; height: 72px; border-radius: 50%; object-fit: cover; }
.about h2 { font-family: var(--f-display); font-weight: 400; font-style: italic; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; }
.about__text { font-family: var(--f-display); font-size: clamp(1.25rem, 2.4vw, 1.75rem); line-height: 1.45; font-variation-settings: "opsz" 24; }

.roles { padding: 0 var(--gut) clamp(56px, 9vw, 120px); max-width: 1200px; margin: 0 auto; }
.roles__list { display: grid; gap: 20px; }
@media (min-width: 760px) { .roles__list { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.role { display: grid; grid-template-rows: auto 1fr; background: var(--bg-2); border-radius: 18px; overflow: hidden; }
.role__pic { aspect-ratio: 16 / 10; overflow: hidden; }
.role__pic img { width: 100%; height: 100%; object-fit: cover; }
.role__txt { display: grid; gap: 10px; align-content: start; padding: 22px; }
.role__n { font-size: .8125rem; font-weight: 600; color: var(--muted); }
.role h3 { font-family: var(--f-display); font-weight: 500; font-size: 1.7rem; line-height: 1.05; }
.role h3 em { display: block; font-style: italic; font-weight: 300; color: var(--muted); }
.link { font-weight: 600; text-underline-offset: 4px; min-height: 44px; display: inline-flex; align-items: center; justify-self: start; }
.link::after { content: " →"; white-space: pre; }

.projects { padding: 0 var(--gut) clamp(56px, 9vw, 120px); max-width: 1240px; margin: 0 auto; }
.projects__head { display: grid; gap: 10px; margin-bottom: clamp(24px, 4vw, 44px); }
.projects__head .sec-t { margin-bottom: 0; }
.projects__head p { color: var(--muted); max-width: 52ch; }
.projects__list { display: grid; gap: clamp(28px, 5vw, 64px); }
.project { display: grid; gap: 18px; align-items: center; }
.project__pic { display: block; border-radius: 18px; overflow: hidden; background: var(--bg-2); }
.project__pic img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; transition: scale .6s cubic-bezier(.2, .7, .2, 1); }
.project__txt { display: grid; gap: 10px; justify-items: start; }
.project__meta { display: flex; gap: 10px; font-size: .8125rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.project__meta span { color: var(--fg); }
.project h3 { font-family: var(--f-display); font-weight: 500; font-size: clamp(1.8rem, 3.6vw, 2.8rem); line-height: 1; letter-spacing: -.02em; }
.project__sector { font-family: var(--f-display); font-style: italic; color: var(--muted); }
.project__list { display: grid; gap: 4px; padding-left: 0; }
.project__list li { position: relative; padding-left: 18px; font-size: .97rem; }
.project__list li::before { content: ""; position: absolute; left: 0; top: .62em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.project__tech { display: flex; flex-wrap: wrap; gap: 6px; }
.project__tech span { padding: 4px 10px; border-radius: 999px; background: var(--bg-2); font-size: .8rem; font-weight: 600; }
@media (min-width: 900px) {
  .project { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 4vw, 56px); }
  .project:nth-child(even) .project__pic { order: 2; }
}
@media (hover: hover) and (pointer: fine) { .project:hover .project__pic img { scale: 1.03; } }

.moments { padding: 0 var(--gut) clamp(56px, 9vw, 120px); max-width: 1200px; margin: 0 auto; }
.moments__list { display: grid; gap: 20px; }
@media (min-width: 760px) { .moments__list { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); } }
.moments img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 14px; }
.moments figcaption { margin-top: 10px; font-family: var(--f-display); font-style: italic; font-size: 1.1rem; }

.motto { padding: clamp(56px, 9vw, 120px) var(--gut); background: var(--ink); color: var(--on-ink); text-align: center; }
.motto blockquote { max-width: 900px; margin: 0 auto; }
.motto p { font-family: var(--f-display); font-style: italic; font-weight: 300; font-size: clamp(1.7rem, 4.4vw, 3.2rem); line-height: 1.15; }
.motto footer { margin-top: 18px; font-size: .875rem; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); }

.contact { padding: clamp(64px, 10vw, 140px) var(--gut); text-align: center; display: grid; gap: 18px; justify-items: center; }
.contact h2 { font-family: var(--f-display); font-weight: 400; font-size: clamp(2.4rem, 7vw, 5rem); line-height: 1; letter-spacing: -.02em; }
.contact p { color: var(--muted); max-width: 46ch; }
.contact__acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }

.foot { display: grid; gap: 8px; justify-items: center; text-align: center; padding: 32px var(--gut) 40px; border-top: 1px solid var(--line); font-size: .9rem; color: var(--muted); }
.foot b { color: var(--fg); }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; }
.foot a { text-underline-offset: 3px; min-height: 32px; display: inline-flex; align-items: center; }

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