:root {
  --bg: #f7f6f2;
  --surface: #ffffff;
  --surface-2: #f0efe9;
  --ink: #121212;
  --muted: #55554f;
  --faint: #84847c;
  --line: #e2e0d8;
  --accent: #0b6b4f;
  --accent-soft: #e2f0e9;
  --bubble-client: #e2f0e9;
  --header-bg: rgba(247, 246, 242, 0.72);
  --shadow: 0 1px 2px rgba(18, 18, 18, 0.04), 0 14px 36px rgba(18, 18, 18, 0.06);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d0e0d;
    --surface: #151716;
    --surface-2: #1c1f1d;
    --ink: #f1f1ed;
    --muted: #a3a39b;
    --faint: #71716a;
    --line: #252825;
    --accent: #5fd3a0;
    --accent-soft: #142a20;
    --bubble-client: #142a20;
    --header-bg: rgba(13, 14, 13, 0.72);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 14px 36px rgba(0, 0, 0, 0.38);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 96px;
  background: var(--bg);
}

body {
  font-family: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
  background: none;
  border: none;
}

.mono {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.82em;
  letter-spacing: 0;
}

.wrap {
  width: min(1140px, calc(100% - 48px));
  margin: 0 auto;
}

/* Clean scroll reading line */
.progress-line {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--accent);
  transform-origin: 0 50%;
  transform: scaleX(0);
  z-index: 80;
  pointer-events: none;
}

/* Floating translucent header (~72% opacity) */
.bar-shell {
  position: fixed;
  top: 14px;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.bar {
  pointer-events: auto;
  width: min(1140px, 100%);
  height: 52px;
  padding: 0 8px 0 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--header-bg);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
}

.brand {
  font-weight: 600;
  letter-spacing: -0.015em;
  white-space: nowrap;
}

.nav {
  display: flex;
  align-items: center;
  gap: 2px;
}

.nav a {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 0.88rem;
  color: var(--muted);
  white-space: nowrap;
  transition: color 0.18s ease, background-color 0.18s ease;
}

.nav a:hover {
  color: var(--ink);
  background: var(--accent-soft);
}

.bar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
}

.lang button {
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.lang button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.94rem;
  white-space: nowrap;
  transition: transform 0.22s var(--ease), background-color 0.2s ease, border-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}

.btn-accent {
  background: var(--accent);
  color: #ffffff;
}

@media (prefers-color-scheme: dark) {
  .btn-accent {
    color: #0d0e0d;
  }
}

.btn-ghost {
  border: 1px solid var(--line);
  background: var(--surface);
}

.btn-ghost:hover {
  border-color: var(--ink);
}

.btn-sm {
  height: 36px;
  padding: 0 15px;
  font-size: 0.84rem;
}

/* Hero */
.hero {
  padding: 144px 0 88px;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.08fr 0.92fr;
  gap: 56px;
  align-items: center;
}

.hero-id {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 24px;
}

.hero-id img {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--line);
}

.hero-id strong {
  display: block;
  line-height: 1.2;
}

.avail {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.84rem;
  color: var(--muted);
}

.dot {
  width: 8px;
  height: 8px;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

h1 {
  font-size: clamp(2.25rem, 4.4vw, 3.6rem);
  line-height: 1.04;
  letter-spacing: -0.035em;
  font-weight: 650;
  margin-bottom: 22px;
  text-wrap: balance;
}

.lede {
  font-size: 1.08rem;
  color: var(--muted);
  max-width: 545px;
  margin-bottom: 30px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-proof {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-wrap: wrap;
  gap: 10px 22px;
  font-size: 0.84rem;
  color: var(--muted);
}

.hero-proof strong {
  color: var(--ink);
  font-weight: 600;
}


/* Hero: what I take on */
.hero-scope {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 32px 28px;
}

.hero-scope .label {
  margin-bottom: 18px;
}

.scope-list {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 0 0 22px;
}

.scope-list li {
  position: relative;
  padding-left: 26px;
  color: var(--ink);
  font-size: 1rem;
  line-height: 1.45;
}

.scope-list li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.scope-note {
  color: var(--muted);
  font-size: 0.96rem;
  margin: 0;
}

/* Configurable Personal Agent Demo */
.phone {
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--surface);
  box-shadow: var(--shadow);
  overflow: hidden;
}

.phone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}

.phone-title {
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.86rem;
}

.phone-head small {
  display: block;
  color: var(--faint);
  font-size: 0.74rem;
  line-height: 1.25;
}

.agent-tag {
  font-size: 0.7rem;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 600;
  white-space: nowrap;
}

.agent-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 16px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--line);
  font-size: 0.74rem;
}

.seg {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.seg-label {
  color: var(--faint);
  margin-right: 3px;
}

.seg button {
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 500;
  transition: all 0.18s ease;
}

.seg button[aria-pressed="true"] {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}

.chat {
  height: 390px;
  overflow: hidden;
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 8px;
}

.msg {
  max-width: 84%;
  padding: 9px 13px;
  border-radius: 16px;
  font-size: 0.89rem;
  line-height: 1.45;
  white-space: pre-line;
  animation: rise 0.34s var(--ease) both;
}

.msg.bot {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--line);
  border-bottom-left-radius: 5px;
}

.msg.client {
  align-self: flex-end;
  background: var(--bubble-client);
  border-bottom-right-radius: 5px;
}

.msg.note {
  align-self: center;
  max-width: 100%;
  background: none;
  padding: 2px 0;
  color: var(--faint);
  font-size: 0.73rem;
}

.msg.typing {
  align-self: flex-start;
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 12px 14px;
  display: flex;
  gap: 4px;
}

.msg.typing i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--faint);
  animation: blink 1.1s infinite;
}

.msg.typing i:nth-child(2) { animation-delay: 0.15s; }
.msg.typing i:nth-child(3) { animation-delay: 0.3s; }

@keyframes rise {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

@keyframes blink {
  0%, 60%, 100% { opacity: 0.3; }
  30% { opacity: 1; }
}

.chat-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 18px;
  border-top: 1px solid var(--line);
  font-size: 0.74rem;
  color: var(--faint);
}

.replay {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--accent);
}

.replay:hover {
  text-decoration: underline;
}

/* Sections */
.section {
  padding: 92px 0;
  border-top: 1px solid var(--line);
}

.label {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  line-height: 1.12;
  letter-spacing: -0.03em;
  font-weight: 650;
  margin-bottom: 14px;
  max-width: 680px;
  text-wrap: balance;
}

.section-lede {
  color: var(--muted);
  max-width: 600px;
  margin-bottom: 44px;
}

/* Services 2x2 Grid */
.services {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
}

.services > .service:last-child:nth-child(odd) {
  grid-column: 1 / -1;
}

.service {
  background: var(--bg);
  padding: 32px;
  transition: background-color 0.25s ease;
}

.service:hover {
  background: var(--surface);
}

.service h3 {
  font-size: 1.18rem;
  letter-spacing: -0.02em;
  margin-bottom: 10px;
}

.service p {
  color: var(--muted);
  font-size: 0.96rem;
}

/* Flagship Reference Box (agendaf.com.br) */
.flagship-card {
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 36px;
  margin-bottom: 48px;
}

.flagship-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 20px;
}

.flagship-kicker {
  display: inline-block;
  font-size: 0.74rem;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 10px;
}

.flagship-top h3 {
  font-size: clamp(1.45rem, 2.5vw, 1.95rem);
  letter-spacing: -0.03em;
}

.flagship-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  padding: 18px 0;
  margin: 22px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.stat strong {
  display: block;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.stat span {
  font-size: 0.8rem;
  color: var(--muted);
}

.inspector-tabs {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  margin-bottom: 18px;
}

.inspector-tabs button {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  transition: background-color 0.2s ease, color 0.2s ease;
}

.inspector-tabs button[aria-selected="true"] {
  background: var(--ink);
  color: var(--bg);
}

.inspector-pane {
  display: none;
  color: var(--muted);
  font-size: 0.95rem;
  animation: rise 0.28s var(--ease);
}

.inspector-pane.active {
  display: block;
}

.inspector-pane ul {
  padding-left: 18px;
  display: grid;
  gap: 8px;
}

/* Work list */
.work-list {
  display: grid;
}

.work {
  display: grid;
  grid-template-columns: 0.78fr 1.22fr;
  gap: 48px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
}

.work h3 {
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
}

.work .meta {
  color: var(--faint);
  font-size: 0.85rem;
}

.work p {
  color: var(--muted);
  margin-bottom: 14px;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

.chip {
  padding: 3px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.77rem;
  color: var(--muted);
}

.link {
  font-weight: 600;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--line);
  transition: border-color 0.2s ease, color 0.2s ease;
}

.link:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* Open Source list */
.open-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 48px;
}

.open-row {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 16px;
  padding: 15px 0;
  border-top: 1px solid var(--line);
  transition: padding-left 0.25s var(--ease), border-color 0.2s ease;
}

.open-row:hover {
  padding-left: 8px;
  border-color: var(--accent);
}

.open-row strong {
  font-weight: 600;
}

.open-row span {
  color: var(--muted);
  font-size: 0.91rem;
}

/* About & Multi-language CV hub */
.about {
  display: grid;
  grid-template-columns: 0.72fr 1.28fr;
  gap: 60px;
  align-items: start;
}

.about-photo {
  width: 100%;
  border-radius: 20px;
  border: 1px solid var(--line);
  aspect-ratio: 1 / 1;
  object-fit: cover;
  display: block;
}

.cv-hub {
  margin-top: 20px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--surface);
}

.cv-hub-title {
  font-size: 0.84rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.cv-links {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.cv-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.cv-pill:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.about p {
  color: var(--muted);
  margin-bottom: 16px;
  max-width: 620px;
}

.timeline {
  margin-top: 32px;
  display: grid;
}

.job {
  display: grid;
  grid-template-columns: 126px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-top: 1px solid var(--line);
}

.job .when {
  color: var(--faint);
  font-size: 0.85rem;
}

.job strong {
  display: block;
}

.job span {
  color: var(--muted);
  font-size: 0.92rem;
}

.badges {
  display: flex;
  gap: 14px;
  align-items: center;
  margin-top: 26px;
}

.badges img {
  width: 56px;
  height: 56px;
  object-fit: contain;
}

/* Brief form */
.brief {
  display: grid;
  grid-template-columns: 0.82fr 1.18fr;
  gap: 60px;
  align-items: start;
}

.form {
  display: grid;
  gap: 16px;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.field select,
.field input,
.field textarea {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--bg);
  outline: none;
  transition: border-color 0.18s ease;
}

.field select:focus,
.field input:focus,
.field textarea:focus {
  border-color: var(--ink);
}

.field textarea {
  min-height: 112px;
  resize: vertical;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.form-note {
  font-size: 0.8rem;
  color: var(--faint);
}

.contact-lines {
  margin-top: 28px;
  display: grid;
  gap: 8px;
}

footer {
  padding: 40px 0 56px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.85rem;
}

footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* Scroll reveal & language crossfade */
[data-reveal] {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.65s var(--ease), transform 0.65s var(--ease);
  transition-delay: var(--d, 0s);
}

[data-reveal].in {
  opacity: 1;
  transform: none;
}

main,
footer {
  transition: opacity 0.18s ease;
}

.swapping main,
.swapping footer {
  opacity: 0;
}

.toast {
  position: fixed;
  bottom: 22px;
  right: 22px;
  z-index: 90;
  padding: 10px 16px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  font-size: 0.86rem;
  font-weight: 600;
  opacity: 0;
  transform: translateY(10px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s var(--ease);
}

.toast.show {
  opacity: 1;
  transform: none;
}

/* Outcomes (hero) */
.outcomes {
  list-style: none;
  display: grid;
  gap: 8px;
  margin: 22px 0 6px;
  max-width: 560px;
}

.outcomes li {
  position: relative;
  padding-left: 26px;
  color: var(--muted);
  font-size: 0.97rem;
}

.outcomes li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.55em;
  width: 10px;
  height: 6px;
  border-left: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

/* How I work */
.service-cta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.service-cta .btn {
  margin-top: 18px;
}

/* Results: before / after + testimonials */
.results {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.result {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  box-shadow: var(--shadow);
  padding: 28px;
}

.result .meta {
  color: var(--faint);
  margin-bottom: 14px;
}

.ba {
  display: grid;
  gap: 14px;
}

.ba-row {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.ba-row p {
  color: var(--muted);
  font-size: 0.96rem;
}

.ba-tag {
  display: inline-block;
  text-align: center;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--line);
  color: var(--muted);
}

.ba-after {
  background: var(--accent-soft);
  border-color: transparent;
  color: var(--accent);
}

.testimonials {
  margin-top: 48px;
}

.quotes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.quote {
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface);
  padding: 26px;
}

.quote blockquote {
  font-size: 1.05rem;
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.quote figcaption {
  color: var(--muted);
  font-size: 0.88rem;
}

[hidden] {
  display: none !important;
}

@media (max-width: 960px) {
  .results,
  .quotes {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .ba-row {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

@media (max-width: 960px) {
  .hero {
    padding-top: 118px;
  }
  .hero-grid,
  .about,
  .brief,
  .work {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .services,
  .open-list {
    grid-template-columns: 1fr;
  }
  .flagship-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .nav {
    display: none;
  }
  .about-photo {
    max-width: 320px;
  }
  .section {
    padding: 72px 0;
  }
}

@media (max-width: 560px) {
  .wrap {
    width: calc(100% - 34px);
  }
  .bar {
    padding: 0 8px 0 12px;
  }
  .brand {
    display: none;
  }
  .bar-right {
    width: 100%;
    justify-content: space-between;
  }
  .row {
    grid-template-columns: 1fr;
  }
  .job,
  .open-row {
    grid-template-columns: 1fr;
    gap: 2px;
  }
  .flagship-card {
    padding: 22px;
  }
  .chat {
    height: 360px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}
