/* Direction
   Product: an AI product builder who ships apps, sites, agents and RAG systems.
   Character: bold, precise, confident.
   World: code editors, terminals and screens, graphite with one warm light.
   Moments: the 3D code panels over the hero photo, and the laptop typing code in the contact block.
   Signature: monospace labels (01, 02 ...) that read like file names. */

:root {
  --bg: #FAFAF9;
  --soft: #EEEEEB;
  --fg: #0F1114;
  --muted: #565C64;
  --line: #DCDCD7;
  --accent: #B45309;
  --band: #0F1114;
  --band-fg: #F2F2F2;
  --band-muted: #9AA0A8;
  --band-line: #2A2E35;
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0F1114;
    --soft: #15171B;
    --fg: #F2F2F2;
    --muted: #9AA0A8;
    --line: #262A31;
    --accent: #FFB547;
    --band: #F2F2F2;
    --band-fg: #0F1114;
    --band-muted: #4B5159;
    --band-line: #C9CDD2;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0F1114;
  --soft: #15171B;
  --fg: #F2F2F2;
  --muted: #9AA0A8;
  --line: #262A31;
  --accent: #FFB547;
  --band: #F2F2F2;
  --band-fg: #0F1114;
  --band-muted: #4B5159;
  --band-line: #C9CDD2;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: "Work Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  padding-left: max(clamp(24px, 5vw, 96px), env(safe-area-inset-left, 0px));
  padding-right: max(clamp(28px, 7vw, 128px), env(safe-area-inset-right, 0px));
  overflow-x: hidden;
}
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
img { max-width: 100%; display: block; }
.wrap { width: 100%; }
.label { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--muted); }

/* Header */
.top {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  min-height: 60px; padding-block: 8px;
  margin-inline: calc(-1 * clamp(24px, 5vw, 96px)) calc(-1 * clamp(28px, 7vw, 128px));
  padding-inline: clamp(24px, 5vw, 96px) clamp(28px, 7vw, 128px);
  background: #FFFFFF;
}
.brand { display: inline-flex; align-items: center; gap: 12px; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: 16px; text-decoration: none; line-height: 1; }
.logo { width: 28px; height: 28px; object-fit: contain; }
.top nav { display: flex; align-items: center; gap: 24px; font-size: 14px; line-height: 1; font-weight: 700; }
.top nav a { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); transition: color .2s var(--ease); }
.top nav a:hover { color: var(--accent); }
.top nav a svg { width: 16px; height: 16px; flex-shrink: 0; }
.menu-btn {
  display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  width: 44px; height: 44px; padding: 0; background: none; border: 0; cursor: pointer; color: var(--fg);
}
.menu-btn span { display: block; width: 22px; height: 2px; border-radius: 2px; background: currentColor; transition: transform .3s var(--ease), opacity .3s var(--ease); }
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .top nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: flex-start; gap: 20px;
    padding: 24px clamp(24px, 5vw, 96px) 28px; background: var(--bg); border-bottom: 1px solid var(--line);
    font-size: 15px;
  }
  .top.open nav { display: flex; }
  .top nav a { color: var(--fg); }
  .top.open .menu-btn span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .top.open .menu-btn span:nth-child(2) { opacity: 0; }
  .top.open .menu-btn span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
}

/* Hero: full height, photo, 3D panels, oversized headline */
.hero {
  position: relative; isolation: isolate; overflow: hidden;
  margin: 0 calc(-1 * clamp(24px, 5vw, 96px)) 0 calc(-1 * clamp(24px, 5vw, 96px));
  margin-right: calc(-1 * clamp(28px, 7vw, 128px));
  padding: clamp(40px, 6vw, 72px) clamp(24px, 5vw, 96px) clamp(40px, 5vw, 64px) clamp(24px, 5vw, 96px);
  padding-right: clamp(28px, 7vw, 128px);
  min-height: max(560px, 92vh);
  color: #F2F2F2;
  display: flex; flex-direction: column; justify-content: flex-end;
  background: #0F1114;
}
.hero-img { position: absolute; inset: 0; margin: 0; z-index: 0; }
.hero-img img { width: 100%; height: 100%; object-fit: cover; object-position: center 40%; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(15,17,20,.94) 0%, rgba(15,17,20,.66) 45%, rgba(15,17,20,.08) 100%),
    linear-gradient(0deg, rgba(15,17,20,.92) 0%, rgba(15,17,20,0) 45%);
}
.hero > *:not(.hero-img):not(.hero-3d) { position: relative; z-index: 2; }
/* The 3D scene lives in the right half of the banner, so it never sits under the title */
.hero > .hero-3d { position: absolute; top: 0; left: 50%; width: 50%; height: 100%; z-index: 1; pointer-events: none; display: block; }
@media (max-width: 1100px) { .hero > .hero-3d { opacity: .8; } }
@media (max-width: 820px) { .hero > .hero-3d { display: none; } }
.status { display: inline-flex; align-items: center; gap: 10px; margin: 0; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: #C9CDD2; }
.status i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 25%, transparent); }
/* Title typed like a terminal: monospace, a prompt, a blinking block cursor */
.hero h1.typed {
  margin: 24px 0 0;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; text-transform: uppercase;
  font-size: clamp(2.8rem, 8.4vw, 6.6rem); line-height: 1.02; letter-spacing: -0.035em;
  white-space: normal;
}
.hero h1 .prompt { color: var(--accent); }
.hero h1 .t2 { color: var(--accent); }
.hero h1 .caret {
  display: inline-block; width: .05em; height: .85em; margin-left: .06em; vertical-align: -.06em;
  background: var(--accent); animation: caret-blink .9s linear 3 forwards;
}
/* Blinks a few times, then stays hidden */
@keyframes caret-blink { 0%, 49% { opacity: 1; } 50%, 100% { opacity: 0; } }
.hero-foot { display: grid; gap: 28px; margin-top: clamp(28px, 4vw, 48px); }
@media (min-width: 820px) { .hero-foot { grid-template-columns: 1fr auto; align-items: end; gap: 48px; } }
.lead { margin: 0; font-size: clamp(1.05rem, 1.9vw, 1.3rem); line-height: 1.5; max-width: 44ch; color: #F2F2F2; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 24px; border-radius: 12px; font-weight: 600; font-size: 15px;
  text-decoration: none; border: 1px solid transparent;
  transition: background-color .25s var(--ease), color .25s var(--ease), border-color .25s var(--ease), transform .25s var(--ease);
}
.btn:active { transform: scale(.98); }
.btn.solid { background: var(--fg); color: var(--bg); }
.btn.solid:hover { background: var(--accent); color: #0F1114; }
.btn.line { border-color: currentColor; background: transparent; color: inherit; }
.btn.line:hover { background: currentColor; }
.btn.line:hover { color: var(--bg); }
.hero .btn.solid { background: #F2F2F2; color: #0F1114; }
.hero .btn.solid:hover { background: var(--accent); }
.hero .btn.line:hover { color: #0F1114; }
.hero .btn.line:hover { background: #F2F2F2; }
.hero .btn.line { color: #F2F2F2; }

/* Section heads */
.sec-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: clamp(32px, 4vw, 56px); }
h2 { margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: clamp(2.6rem, 7vw, 6.4rem); letter-spacing: -0.04em; line-height: .95; }

/* About */
.about {
  display: grid; gap: 40px; align-items: start;
  padding-block: clamp(56px, 8vw, 112px);
}
@media (min-width: 820px) { .about { grid-template-columns: 5fr 7fr; } }
.about-photo { margin: 0; max-width: 420px; border-radius: 24px; overflow: hidden; border: 1px solid var(--line); }
.about-photo img { width: 100%; height: auto; }
.about-title { margin: 0 0 28px; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: clamp(3rem, 8vw, 7rem); letter-spacing: -0.045em; line-height: .9; }
.about p { margin: 0 0 18px; font-size: clamp(1.05rem, 1.7vw, 1.25rem); color: var(--muted); max-width: 58ch; }
.about p strong { color: var(--fg); font-weight: 600; }
.skills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.skills span { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 14px; color: var(--fg); transition: border-color .2s var(--ease), color .2s var(--ease); }
.skills span:hover { border-color: var(--accent); color: var(--accent); }

/* Services: light block with large numbered rows */
.svc-band {
  background: var(--soft);
  margin-inline: calc(-1 * clamp(24px, 5vw, 96px)) calc(-1 * clamp(28px, 7vw, 128px));
  padding-inline: clamp(24px, 5vw, 96px) clamp(28px, 7vw, 128px);
  padding-block: clamp(56px, 8vw, 112px);
}
.services { list-style: none; margin: 0; padding: 0; counter-reset: svc; }
.services li {
  display: grid; gap: 12px; padding-block: 28px; border-top: 1px solid var(--line);
  grid-template-columns: 40px 1fr; column-gap: 20px; align-items: center;
  transition: padding-left .35s var(--ease);
}
.services li:last-child { border-bottom: 1px solid var(--line); }
.services li:hover { padding-left: 12px; }
@media (min-width: 820px) { .services li { grid-template-columns: 56px minmax(0, 1.2fr) minmax(0, 1.4fr); gap: 40px; } }
.services .n { display: inline-flex; color: var(--accent); width: 40px; height: 40px; }
.services .n svg { width: 40px; height: 40px; display: block; }
.services h3 { margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 600; font-size: clamp(1.5rem, 3.2vw, 2.4rem); letter-spacing: -0.03em; line-height: 1.05; }
.services p { margin: 0; color: var(--muted); font-size: 1.02rem; }
.services li h3, .services li p { grid-column: 2; }
@media (min-width: 820px) { .services li h3, .services li p { grid-column: auto; } }

/* Projects: dark band, big names, arrow on hover */
.band {
  background: var(--band); color: var(--band-fg);
  margin-inline: calc(-1 * clamp(24px, 5vw, 96px)) calc(-1 * clamp(28px, 7vw, 128px));
  padding-inline: clamp(24px, 5vw, 96px) clamp(28px, 7vw, 128px);
  padding-block: clamp(56px, 8vw, 112px);
}
.band h2 { color: var(--band-fg); }
.band .label { color: var(--band-muted); }
/* Bloco de artigos: fundo cinza claro com texto escuro, nos dois temas */
#artigos {
  --band: #E4E4E1; --band-fg: #0F1114; --band-muted: #565C64; --band-line: #C9CDD2; --accent: #B45309;
}
.index { list-style: none; margin: 0; padding: 0; }
/* Projects as cards: soft surface, rounded corners, no divider lines */
.index { display: grid; gap: 12px; }
.index li {
  border-radius: 20px; overflow: hidden;
  background: color-mix(in srgb, var(--band-fg) 5%, transparent);
  transition: background-color .3s var(--ease), box-shadow .3s var(--ease);
}
.index li:hover {
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 45%, transparent);
}
.index a {
  position: relative; display: grid; gap: 12px; padding: 28px 28px; text-decoration: none; color: inherit;
  grid-template-columns: 1fr; transition: padding-left .35s var(--ease);
}
@media (min-width: 820px) { .index a { grid-template-columns: 64px minmax(0, 2fr) minmax(0, 1.2fr) auto; align-items: center; gap: 32px; } }
.index .no { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--band-muted); }
.index h3 { margin: 0; font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: clamp(1.9rem, 4.6vw, 3.6rem); letter-spacing: -0.035em; line-height: 1; transition: color .25s var(--ease); }
.index a:hover h3 { color: var(--accent); }
.index p { margin: 12px 0 0; color: var(--band-muted); font-size: 1rem; max-width: 62ch; }
.index .kind { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 13px; color: var(--band-muted); }
.index .go { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 14px; white-space: nowrap; justify-self: start; }
.index a:hover .go { color: var(--accent); }
.badge { display: inline-block; font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; border: 1px solid var(--band-line); border-radius: 999px; padding: 4px 12px; color: var(--band-muted); white-space: nowrap; justify-self: start; }

/* Contact: text on the left, the 3D laptop on the right */
.closing {
  position: relative; isolation: isolate; overflow: visible;
  padding-block: clamp(24px, 2.9vw, 41px);
  margin-inline: calc(-1 * clamp(24px, 5vw, 96px)) calc(-1 * clamp(28px, 7vw, 128px));
  padding-inline: clamp(24px, 5vw, 96px) clamp(28px, 7vw, 128px);
  background: var(--soft);
}
.closing::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background: url("contato.webp") center / cover no-repeat; opacity: .2;
}
/* Code rain falling from the top across the whole contact background */
#contato .rain { position: absolute; top: 0; left: 0; z-index: 0; pointer-events: none; display: block; }
.closing-grid { position: relative; z-index: 1; display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .closing-grid { grid-template-columns: 1.25fr 1fr; gap: 48px; } }
.closing h2 { color: #0F1114; font-size: clamp(3rem, 5.4vw, 5.2rem); line-height: 1.02; text-wrap: balance; }
.closing p { margin: 24px 0 0; color: #2A2E33; max-width: 46ch; font-size: clamp(1.05rem, 1.6vw, 1.2rem); }
.closing .label { color: #3A3F45; }
.closing .actions { margin-top: 36px; }
.closing .btn.solid { background: #0F1114; color: #FAFAF9; }
.closing .btn.solid:hover { background: var(--accent); color: #0F1114; }
.laptop-box {
  position: relative; width: 100%; height: clamp(255px, 39.1vw, 408px);
  overflow: visible;
}
/* The stage is 170% of the box, centered on it, so flying cards are never cut off */
.laptop-box canvas {
  position: absolute; left: -35%; top: -35%; width: 170% !important; height: 170% !important;
  display: block; pointer-events: none;
}

footer {
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px;
  margin-inline: calc(-1 * clamp(24px, 5vw, 96px)) calc(-1 * clamp(28px, 7vw, 128px));
  padding-inline: clamp(24px, 5vw, 96px) clamp(28px, 7vw, 128px);
  padding-block: 28px 36px;
  background: var(--band); color: var(--band-muted);
  font-size: 13px;
}
.social { display: inline-flex; align-items: center; gap: 8px; color: var(--band-fg); text-decoration: none; font-weight: 600; transition: color .2s var(--ease); }
.social:hover { color: var(--accent); }
.social svg { width: 18px; height: 18px; }

/* Phone layout */
@media (max-width: 640px) {
  .hero { min-height: auto; padding-top: 48px; padding-bottom: 40px; }
  .hero h1.typed { font-size: clamp(1.9rem, 9vw, 2.6rem); }
  .lead { font-size: 1.02rem; }
  .btn { height: 48px; padding: 0 18px; font-size: 14px; }
  .actions .btn { flex: 1 1 auto; justify-content: center; }
  .about-title, h2 { font-size: clamp(2.4rem, 13vw, 3.4rem); }
  .services li { padding-block: 22px; }
  .services h3 { font-size: 1.35rem; }
  .index h3 { font-size: clamp(1.6rem, 8vw, 2.1rem); }
  .index a:hover { padding-left: 0; }
  .closing h2 { font-size: clamp(2.2rem, 11vw, 3rem); }
  .svc-band, .band, .closing { padding-block: 48px; }
  .closing { padding-bottom: 38px; } /* phones: 20% less space below the animation */
  .sec-head { margin-bottom: 24px; }
  footer { flex-direction: column; align-items: flex-start; }
}

/* Motion: sections rise in as they enter; off for reduced motion */
html.js .reveal { opacity: 0; transform: translate3d(0, 24px, 0); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .btn, .services li, .index a { transition: none; }
}

/* Páginas de artigo: usam o mesmo cabeçalho, rodapé e cores da landing */
.article-page{max-width:720px;margin:0 auto;padding:48px 0 72px}
.article-page h1{font-family:"Space Grotesk",sans-serif;font-weight:700;font-size:clamp(2rem,4.6vw,3rem);line-height:1.1;letter-spacing:-.03em;margin:0 0 16px}
.article-page h2{font-family:"Space Grotesk",sans-serif;font-size:1.6rem;letter-spacing:-.02em;margin:40px 0 12px}
.article-page p,.article-page li{line-height:1.7}
.article-page .meta{opacity:.7;font-size:14px;margin:0 0 32px}
.article-page .cta-box{border:1px solid rgba(127,127,127,.3);border-radius:16px;padding:28px;margin-top:48px}
.article-page .cta-box p{margin:0 0 16px}
.article-page .cta-box .btn{margin:0 8px 8px 0}
