/* ==========================================================================
   AFSIS — design tokens
   ========================================================================== */
:root {
  --bg: #0a0a0a;
  --bg-alt: #101012;
  --surface: rgba(255, 255, 255, 0.04);
  --header-bg: rgba(10, 10, 10, 0.72);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.16);

  --orange: #ff7f2a;
  --orange-soft: #ffb27a;
  --orange-dim: rgba(255, 127, 42, 0.14);
  --orange-glow: rgba(255, 127, 42, 0.32);

  --text: #f5f5f5;
  --text-dim: #a3a3a3;
  --text-faint: #6f6f76;

  --font-head: "Space Grotesk", "Inter", system-ui, sans-serif;
  --font-body: "Inter", system-ui, -apple-system, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "SF Mono", monospace;

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;

  --container: 1160px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.4, 0.64, 1);

  color-scheme: dark;
}

[data-theme="light"] {
  --bg: #f7f6f4;
  --bg-alt: #efeeeb;
  --surface: rgba(12, 10, 8, 0.035);
  --header-bg: rgba(247, 246, 244, 0.8);
  --border: rgba(12, 10, 8, 0.1);
  --border-strong: rgba(12, 10, 8, 0.18);

  --orange-dim: rgba(240, 105, 15, 0.1);
  --orange-glow: rgba(240, 105, 15, 0.2);

  --text: #17150f;
  --text-dim: #56534d;
  --text-faint: #8b8880;

  color-scheme: light;
}
[data-theme="light"] body { --orange: #e56c0f; }

/* ==========================================================================
   Reset / base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 96px; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  transition: background 0.35s var(--ease), color 0.35s var(--ease);
  overflow-x: hidden;
}

::selection { background: var(--orange); color: #140900; }

h1, h2, h3 { font-family: var(--font-head); line-height: 1.12; margin: 0; letter-spacing: -0.015em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { margin: 0; padding: 0; list-style: none; }

a:focus-visible, button:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--orange); color: #140900; font-weight: 600;
  padding: 0.6rem 1rem; border-radius: var(--radius-sm);
  transition: top 0.2s var(--ease);
  z-index: 400;
}
.skip-link:focus { top: 1rem; }

/* film grain — barely-there texture so surfaces don't feel flat */
.grain {
  position: fixed; inset: 0;
  z-index: 2000;
  pointer-events: none;
  opacity: 0.028;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='140' height='140' filter='url(%23n)'/%3E%3C/svg%3E");
}

.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, var(--orange), var(--orange-soft));
  z-index: 300;
}
@media (prefers-reduced-motion: reduce) { .scroll-progress { display: none; } }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.5rem;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.95rem;
  white-space: nowrap;
  transition: transform 0.25s var(--ease-spring), background 0.2s var(--ease),
              border-color 0.2s var(--ease), box-shadow 0.25s var(--ease), color 0.2s var(--ease);
}
.btn svg { transition: transform 0.25s var(--ease); }
.btn:hover { transform: translateY(-2px); }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
  background: var(--orange);
  color: #140900;
  box-shadow: 0 8px 28px -10px var(--orange-glow);
}
.btn-primary:hover { box-shadow: 0 12px 32px -8px var(--orange-glow); }

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}
.btn-ghost:hover { border-color: var(--orange); color: var(--orange); }

.inline-link {
  color: var(--orange);
  font-weight: 600;
  background-image: linear-gradient(var(--orange), var(--orange));
  background-size: 0% 1px;
  background-repeat: no-repeat;
  background-position: 0 100%;
  transition: background-size 0.3s var(--ease);
  padding-bottom: 2px;
}
.inline-link:hover { background-size: 100% 1px; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--header-bg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: background 0.35s var(--ease);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.brand { display: flex; align-items: center; gap: 0.6rem; }
.brand-mark { height: 26px; width: auto; }
.brand-name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: 0.02em;
}

.nav { display: flex; align-items: center; gap: 1.9rem; }
.nav a {
  position: relative;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 0.92rem;
  padding: 4px 0;
  transition: color 0.2s var(--ease);
}
.nav a:not(.nav-github)::after {
  content: "";
  position: absolute;
  left: 0; bottom: -2px;
  width: 100%; height: 2px;
  background: var(--orange);
  transform: scaleX(0);
  transform-origin: right;
  transition: transform 0.3s var(--ease);
}
.nav a:hover, .nav a.is-active { color: var(--text); }
.nav a:hover::after, .nav a.is-active::after {
  transform: scaleX(1);
  transform-origin: left;
}
.nav-github { display: flex; align-items: center; color: var(--text-dim) !important; }
.nav-github:hover { color: var(--orange) !important; }

.header-controls { display: flex; align-items: center; gap: 0.6rem; }

.theme-toggle {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  transition: color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.3s var(--ease-spring);
}
.theme-toggle:hover { color: var(--orange); border-color: var(--orange); }
.theme-toggle .icon-sun { display: none; }
[data-theme="light"] .theme-toggle .icon-sun { display: block; }
[data-theme="light"] .theme-toggle .icon-moon { display: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
}
.nav-toggle span {
  display: block; height: 2px; margin: 0 8px;
  background: var(--text);
  transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   Hero
   ========================================================================== */
.hero {
  position: relative;
  padding: 5.5rem 0 4.5rem;
  overflow: hidden;
}

.hero-bg { position: absolute; inset: 0; z-index: 0; pointer-events: none; }
.grid-overlay {
  position: absolute; inset: -1px;
  background-image:
    linear-gradient(var(--border) 1px, transparent 1px),
    linear-gradient(90deg, var(--border) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 75% 65% at 60% 30%, black 30%, transparent 85%);
}
.hero-beam {
  position: absolute;
  left: 0; right: 0; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--orange-glow), transparent);
  animation: beam-sweep 8s linear infinite;
  opacity: 0.7;
}
@keyframes beam-sweep {
  0% { top: 0; opacity: 0; }
  8% { opacity: 0.7; }
  92% { opacity: 0.7; }
  100% { top: 100%; opacity: 0; }
}
@media (prefers-reduced-motion: reduce) { .hero-beam { display: none; } }

.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(100px);
}
.glow-a {
  width: 560px; height: 560px;
  background: var(--orange-glow);
  opacity: 0.45;
  top: -220px; right: -120px;
}

.hero-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 3rem;
  align-items: center;
}

/* entrance sequence */
.hero-copy > * {
  opacity: 0;
  transform: translateY(22px);
  animation: rise 0.9s var(--ease) forwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.15s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.28s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.4s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.52s; }
.hero-visual {
  opacity: 0;
  animation: rise 1s var(--ease) 0.45s forwards;
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-copy > *, .hero-visual { opacity: 1; transform: none; animation: none; }
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 1.5rem;
}
.eyebrow-rule {
  width: 36px; height: 1px;
  background: var(--orange);
  flex-shrink: 0;
}

.hero-title {
  font-size: clamp(2.4rem, 4.6vw, 3.7rem);
  font-weight: 700;
  max-width: 15ch;
  letter-spacing: -0.025em;
}
.hl {
  position: relative;
  color: var(--orange);
  white-space: nowrap;
}
.hl::after {
  content: "";
  position: absolute;
  left: 0; bottom: 0.04em;
  width: 100%; height: 3px;
  background: var(--orange);
  opacity: 0.5;
  border-radius: 2px;
  transform: scaleX(0);
  transform-origin: left;
  animation: underline-in 0.7s var(--ease) 1s forwards;
}
@keyframes underline-in { to { transform: scaleX(1); } }
@media (prefers-reduced-motion: reduce) { .hl::after { transform: scaleX(1); animation: none; } }

.hero-sub {
  margin-top: 1.4rem;
  font-size: 1.08rem;
  color: var(--text-dim);
  max-width: 46ch;
}

.hero-actions {
  margin-top: 2.2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
}

.hero-note {
  margin-top: 1.6rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}

/* --- integration diagram --- */
.hero-visual { display: flex; justify-content: center; }
.integration-svg { width: 100%; max-width: 520px; height: auto; }

.integration-svg .orbit {
  stroke: var(--border);
  stroke-dasharray: 3 7;
  fill: none;
}
.integration-svg .ipath {
  stroke: var(--border-strong);
  stroke-width: 1.2;
  fill: none;
}
.integration-svg .flow-dot {
  fill: var(--orange);
  filter: drop-shadow(0 0 4px var(--orange));
}
@media (prefers-reduced-motion: reduce) { .integration-svg .flow-dot { display: none; } }

.integration-svg .ipath-os { stroke-dasharray: 4 5; }
.integration-svg .node-dot {
  fill: var(--orange);
}
.integration-svg .node-os .node-dot {
  fill: var(--bg);
  stroke: var(--orange);
  stroke-width: 1.4;
}
.integration-svg .node text {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.02em;
  fill: var(--text-dim);
}
.integration-svg .hub rect {
  fill: var(--bg);
  stroke: var(--orange);
  stroke-width: 1.4;
}
.integration-svg .hub {
  filter: drop-shadow(0 0 18px var(--orange-glow));
}
.integration-svg .pulse-ring {
  fill: none;
  stroke: var(--orange);
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: pulse-ring 3.2s var(--ease) infinite;
}
.integration-svg .pr2 { animation-delay: 1.6s; }
@keyframes pulse-ring {
  0% { opacity: 0.5; transform: scale(0.72); }
  100% { opacity: 0; transform: scale(1.5); }
}
@media (prefers-reduced-motion: reduce) { .integration-svg .pulse-ring { display: none; } }

/* ==========================================================================
   Marquee
   ========================================================================== */
.marquee {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  overflow: hidden;
  padding: 1.1rem 0;
  background: var(--bg-alt);
}
.marquee-track {
  display: flex;
  align-items: center;
  gap: 2.75rem;
  width: max-content;
  animation: marquee 34s linear infinite;
}
.marquee-track span {
  font-family: var(--font-head);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
  white-space: nowrap;
}
.marquee-track i {
  font-style: normal;
  font-size: 0.55rem;
  color: var(--orange);
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) { .marquee-track { animation: none; } }

/* ==========================================================================
   Sections — editorial heads
   ========================================================================== */
.section { padding: 7rem 0; }
.section-alt {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.sec-head { margin-bottom: 4rem; }
.sec-meta {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.sec-index {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--orange);
}
.sec-rule {
  height: 1px;
  width: 56px;
  background: var(--border-strong);
}
.sec-kicker {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.sec-title-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 3rem;
  align-items: end;
}
.sec-title-row h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.7rem);
  max-width: 20ch;
}
.sec-lead {
  color: var(--text-dim);
  font-size: 1.02rem;
  max-width: 44ch;
  justify-self: end;
}

/* ==========================================================================
   Sobre
   ========================================================================== */
.about-cols {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 4rem;
  align-items: start;
}
.about-text p {
  color: var(--text-dim);
  font-size: 1.02rem;
  line-height: 1.75;
}
.about-text p + p { margin-top: 1.25rem; }
.about-text strong { color: var(--text); font-weight: 600; }

.pillar-list { border-top: 1px solid var(--border-strong); }
.pillar-row {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 1.25rem;
  padding: 1.6rem 0.25rem;
  border-bottom: 1px solid var(--border);
  transition: padding-left 0.3s var(--ease), background 0.3s var(--ease);
}
.pillar-row:hover { padding-left: 0.9rem; background: var(--surface); }
.pillar-num {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--orange);
  padding-top: 0.3rem;
}
.pillar-num::before { content: "("; color: var(--text-faint); }
.pillar-num::after { content: ")"; color: var(--text-faint); }
.pillar-row h3 { font-size: 1.08rem; margin-bottom: 0.45rem; }
.pillar-row p { color: var(--text-dim); font-size: 0.94rem; }

/* ==========================================================================
   Produtos — bento
   ========================================================================== */
.bento {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.bcard {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.6rem 1.6rem 1.4rem;
  overflow: hidden;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
/* animated top accent */
.bcard::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: linear-gradient(90deg, var(--orange), var(--orange-soft));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--ease);
}
.bcard:hover {
  border-color: var(--border-strong);
  transform: translateY(-5px);
  box-shadow: 0 22px 48px -24px rgba(0, 0, 0, 0.55);
}
.bcard:hover::before { transform: scaleX(1); }

.bcard-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.1rem;
}
.bcard-index {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-faint);
  transition: color 0.3s var(--ease);
}
.bcard:hover .bcard-index { color: var(--orange); }
.bcard-tag {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--orange);
  background: var(--orange-dim);
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
}
.bcard h3 { font-size: 1.3rem; margin-bottom: 0.55rem; }
.bcard p { color: var(--text-dim); font-size: 0.93rem; flex: 1; }

.private-badge {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-faint);
}
.private-badge svg { flex-shrink: 0; }

/* featured card */
.bcard-featured {
  grid-column: span 2;
  padding: 2rem;
  background:
    radial-gradient(circle at 88% 18%, var(--orange-dim) 0%, transparent 55%),
    var(--surface);
}
.bcard-featured h3 { font-size: 1.7rem; }
.bcard-featured p { max-width: 42ch; flex: none; }
.ghost-number {
  position: absolute;
  right: 1.2rem; bottom: -1.4rem;
  font-family: var(--font-head);
  font-size: clamp(5rem, 9vw, 7.5rem);
  font-weight: 700;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.5px var(--orange);
  opacity: 0.28;
  pointer-events: none;
  transition: opacity 0.4s var(--ease), transform 0.4s var(--ease);
}
.bcard-featured:hover .ghost-number { opacity: 0.5; transform: translateY(-4px); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 1.2rem;
}
.chip-row li {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--text-dim);
  border: 1px solid var(--border-strong);
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  transition: border-color 0.25s var(--ease), color 0.25s var(--ease);
}
.bcard-featured:hover .chip-row li { border-color: var(--orange); color: var(--text); }

/* mini bar-chart flourish on the BI card */
.spark {
  position: absolute;
  right: 1.5rem; bottom: 1.3rem;
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 34px;
  opacity: 0.55;
  transition: opacity 0.3s var(--ease);
}
.bcard:hover .spark { opacity: 1; }
.spark i {
  width: 6px;
  background: var(--orange);
  border-radius: 2px;
  transform-origin: bottom;
  transition: transform 0.45s var(--ease-spring);
}
.spark i:nth-child(1) { height: 40%; transition-delay: 0s; }
.spark i:nth-child(2) { height: 70%; transition-delay: 0.05s; }
.spark i:nth-child(3) { height: 50%; transition-delay: 0.1s; }
.spark i:nth-child(4) { height: 95%; transition-delay: 0.15s; }
.spark i:nth-child(5) { height: 65%; transition-delay: 0.2s; }
.bcard .spark i { transform: scaleY(0.45); }
.bcard:hover .spark i { transform: scaleY(1); }

/* CTA card */
.bcard-cta {
  justify-content: space-between;
  background:
    linear-gradient(135deg, var(--orange-dim), transparent 60%),
    var(--surface);
  border-color: var(--border-strong);
  cursor: pointer;
}
.bcard-cta h3 { font-size: 1.25rem; }
.bcard-cta p { flex: none; margin-top: 0.5rem; }
.cta-arrow {
  margin-top: 1.4rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid var(--orange);
  color: var(--orange);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), transform 0.3s var(--ease-spring);
}
.bcard-cta:hover .cta-arrow {
  background: var(--orange);
  color: #140900;
  transform: translateX(4px);
}

/* services */
.services-strip {
  margin-top: 3.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--border-strong);
}
.service-row {
  display: grid;
  grid-template-columns: 64px 1fr;
  gap: 1.25rem;
  padding: 1.9rem 1rem 1.9rem 0.25rem;
  border-bottom: 1px solid var(--border);
  transition: background 0.3s var(--ease), padding-left 0.3s var(--ease);
}
.service-row:hover { background: var(--surface); padding-left: 0.9rem; }
.service-index {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--orange);
  padding-top: 0.15rem;
}
.service-row h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.service-row p { color: var(--text-dim); font-size: 0.93rem; }

/* ==========================================================================
   Open source
   ========================================================================== */
.os-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
.os-card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.6rem;
  transition: border-color 0.3s var(--ease), transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.os-card:hover {
  border-color: var(--orange);
  transform: translateY(-5px);
  box-shadow: 0 22px 48px -24px rgba(0, 0, 0, 0.55);
}
.os-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.os-repo {
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--text-faint);
}
.os-repo strong { color: var(--text); font-weight: 600; }
.os-ext {
  color: var(--text-faint);
  flex-shrink: 0;
  transition: color 0.25s var(--ease), transform 0.3s var(--ease);
}
.os-card:hover .os-ext { color: var(--orange); transform: translate(2px, -2px); }
.os-card p { color: var(--text-dim); font-size: 0.92rem; flex: 1; }
.os-meta {
  display: flex;
  gap: 1.1rem;
  margin-top: 1.3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}
.lang {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-family: var(--font-mono);
  font-size: 0.76rem;
  color: var(--text-dim);
}
.lang i {
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--lang, var(--orange));
}

.os-more { margin-top: 2.5rem; }

/* ==========================================================================
   Contato — statement piece
   ========================================================================== */
.contact { text-align: left; }
.contact .sec-meta { margin-bottom: 2rem; }
.contact-title {
  font-size: clamp(2.2rem, 5vw, 3.6rem);
  max-width: 16ch;
  letter-spacing: -0.025em;
}
.contact-sub {
  margin-top: 1.25rem;
  color: var(--text-dim);
  font-size: 1.05rem;
}
.contact-mail {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-top: 2.5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.3rem, 3vw, 2.1rem);
  color: var(--text);
  border-bottom: 2px solid var(--orange);
  padding-bottom: 0.35rem;
  transition: color 0.25s var(--ease);
}
.contact-mail:hover { color: var(--orange); }
.mail-arrow {
  font-size: 0.7em;
  color: var(--orange);
  transition: transform 0.3s var(--ease-spring);
}
.contact-mail:hover .mail-arrow { transform: translate(4px, -4px); }
.contact-meta {
  margin-top: 2rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: var(--text-faint);
  font-size: 0.95rem;
}
.dotsep { color: var(--text-faint); }

/* ==========================================================================
   Footer — always dark (brand anchor)
   ========================================================================== */
.site-footer {
  background: #0a0a0a;
  color: #f5f5f5;
  padding: 3.5rem 0 2rem;
  border-top: 1px solid rgba(245, 245, 245, 0.08);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 3rem;
  margin-bottom: 2.5rem;
}
.footer-brand .brand-mark { height: 22px; }
.footer-brand .brand-name { font-size: 1.05rem; color: #f5f5f5; }
.footer-tagline {
  margin-top: 0.9rem;
  color: rgba(245, 245, 245, 0.45);
  font-size: 0.88rem;
  max-width: 32ch;
}
.footer-heading {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: rgba(245, 245, 245, 0.35);
  margin-bottom: 1rem;
}
.footer-links { display: flex; flex-direction: column; gap: 0.75rem; }
.footer-links a {
  font-size: 0.9rem;
  color: rgba(245, 245, 245, 0.6);
  transition: color 0.2s var(--ease);
  width: fit-content;
}
.footer-links a:hover { color: #fff; }
.footer-bottom {
  border-top: 1px solid rgba(245, 245, 245, 0.08);
  padding-top: 1.5rem;
}
.footer-note { color: rgba(245, 245, 245, 0.35); font-size: 0.85rem; }

/* ==========================================================================
   Scroll reveal (staggered via JS-set transition-delay)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.reveal.is-visible { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 980px) {
  .hero-layout { grid-template-columns: 1fr; gap: 3.5rem; }
  .hero-visual { max-width: 460px; margin: 0 auto; }
  .sec-title-row { grid-template-columns: 1fr; gap: 1.25rem; }
  .sec-lead { justify-self: start; }
  .about-cols { grid-template-columns: 1fr; gap: 2.5rem; }
  .bento { grid-template-columns: 1fr 1fr; }
  .bcard-featured { grid-column: span 2; }
  .os-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 720px) {
  .nav {
    position: absolute;
    top: 72px; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 0.5rem 1.5rem 1rem;
    transform-origin: top;
    transform: scaleY(0);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s var(--ease), opacity 0.25s var(--ease);
  }
  .nav.is-open { transform: scaleY(1); opacity: 1; pointer-events: auto; }
  .nav a { padding: 0.75rem 0; width: 100%; border-bottom: 1px solid var(--border); }
  .nav a::after { display: none; }
  .nav a:last-child { border-bottom: none; }
  .nav-toggle { display: flex; }

  .section { padding: 5rem 0; }
  .hero { padding: 4rem 0 3.5rem; }
  .bento { grid-template-columns: 1fr; }
  .bcard-featured { grid-column: span 1; }
  .services-strip { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .contact-mail { font-size: 1.25rem; word-break: break-all; }
}
