/* Every career phase shares its frame, reading order and detail-card language. */
.chapter:focus { outline: none; }
.chapters .chapter .chapter-content {
  display: block;
  margin: 0;
  padding: 32px;
  min-height: 0;
  background: #fbfcf7;
  color: var(--ink);
  border: 1px solid #d5dccb;
  border-radius: 20px;
}
.chapters .chapter .chapter-date {
  margin: 0 0 20px;
  gap: 12px;
}
.chapters .chapter .chapter-date > p { color: #667752; }
.chapters .chapter .chapter-date > small {
  background: #edf1e6;
  color: #667752;
}
.chapters .chapter .chapter-content > h2 { margin: 0; }
.chapters .chapter .chapter-lead,
.chapters .chapter .agency-context {
  color: #56614f;
  max-width: 750px;
  margin-top: 20px;
  line-height: 1.7;
}

/* The early roles read as dated entries rather than a separate table layout. */
.technical-roles {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}
.technical-roles > div {
  display: grid;
  grid-template-columns: 100px minmax(0, 1fr);
  gap: 5px 24px;
  padding: 20px;
  background: #edf1e7;
  border: 1px solid #d5dccb;
  border-radius: 12px;
}
.technical-roles time { grid-column: 1; grid-row: 1 / 3; padding-top: 4px; }
.technical-roles h3 { grid-column: 2; margin: 0; }
.technical-roles p { grid-column: 2; margin: 0; }

/* Client examples and product entries use the same neutral cards. */
.agency-examples { margin-top: 28px; max-width: none; }
.agency-account { background: #edf1e7; border-color: #d5dccb; }
.chapters .ecosystem-launcher { margin-top: 28px; }
.chapters .ecosystem .ecosystem-node {
  color: var(--ink);
  background: #edf1e7;
  border-color: #d5dccb;
  box-shadow: none;
}
.chapters .ecosystem .ecosystem-node:hover {
  border-color: #9cad84;
  background: #e6eddb;
  box-shadow: 0 6px 18px #243b2410;
}
.chapters .ecosystem-node .node-role,
.chapters .ecosystem-node .node-purpose { color: #56614f; }
.chapters .ecosystem-node .node-role { min-height: 3.2em; letter-spacing: 0; }
.chapters .ecosystem-node .node-purpose { min-height: 4.95em; }
.chapters .ecosystem-node .node-action { color: #344d2b; border-color: #c3cfb5; }
.chapters .ecosystem-connection > b { color: #7b8e67; }
.chapters .ecosystem-node .node-preview { background: transparent; }
.chapters .ecosystem-node .preview-app { background: transparent; }

.phase-pagination {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.phase-pagination > button {
  min-height: 52px;
  width: 100%;
  padding: 10px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  gap: 12px;
}
.phase-pagination > button:hover { background: transparent; text-decoration: none; }
.phase-pagination > button > span[aria-hidden] {
  width: 38px; height: 38px; flex: 0 0 38px;
  border: 1px solid #bdcbb0; border-radius: 50%;
  display: grid; place-items: center;
  transition: background .2s, border-color .2s, transform .2s;
}
.phase-pagination > button > span[aria-hidden] svg {
  width: 18px; height: 18px; display: block;
  fill: none; stroke: currentColor; stroke-width: 1.75;
  stroke-linecap: round; stroke-linejoin: round;
}
.phase-pagination > button:hover > span[aria-hidden] { background: var(--lime); border-color: #a4be6c; }
.phase-pagination [data-phase-prev]:hover > span[aria-hidden] { transform: translateX(-3px); }
.phase-pagination [data-phase-next]:hover > span[aria-hidden] { transform: translateX(3px); }
.phase-pagination [data-phase-prev] { grid-column: 1; grid-row: 1; max-width: none; justify-content: flex-start; text-align: left; }
.phase-pagination .phase-position { grid-column: 2; grid-row: 1; margin: 0; }
.phase-pagination [data-phase-next] { grid-column: 3; grid-row: 1; margin: 0; max-width: none; justify-content: flex-end; text-align: right; }
.ana-story #ana-demo-title {
  display: flex; align-items: baseline; gap: 12px;
}
.ana-story #ana-demo-title .ana-star { flex-shrink: 0; }
.ana-title-copy { min-width: 0; }
.story-client-example { border-top: 0; padding-top: 0; }
.story-closing { margin-top: 24px; color: var(--muted); font-size: var(--type-body); line-height: 1.7; }
.story-client-example .account-links { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.story-client-example .account-link {
  display: grid; grid-template-columns: minmax(0, 1fr) 18px;
  grid-template-rows: 45px minmax(0, 1fr); align-items: start;
  gap: 12px; padding: 16px; min-width: 0;
}
.story-client-example .account-link img { grid-column: 1; grid-row: 1; }
.story-client-example .account-link > div { grid-column: 1 / -1; grid-row: 2; min-width: 0; }
.story-client-example .account-link > i { grid-column: 2; grid-row: 1; margin-left: auto; align-self: center; }
.story-client-example .account-link strong { font-size: var(--type-secondary); overflow-wrap: anywhere; }
.story-client-example .account-link span { font-size: var(--type-caption); }
.phase-label strong { overflow-wrap: normal; word-break: normal; hyphens: none; }
.phase-title-line { display: block; white-space: nowrap; }
.phase-tab { padding-block: 14px; min-height: 60px; }
.opening-projects .opening-phone { scale: .9; transform-origin: center center; }
@media (min-width: 801px) {
  .chapters .ecosystem-node .node-purpose { min-height: 0; margin-bottom: 18px; }
  .chapters .ecosystem-node .node-preview { margin-top: auto; }
}

@media (max-width: 800px) {
  .chapters .chapter .chapter-content { padding: 24px 20px; border-radius: 16px; }
  .chapters .ecosystem-node .node-purpose { min-height: 0; }
  .chapters .ecosystem-node .node-role { min-height: 0; }
  .technical-roles > div { grid-template-columns: 78px minmax(0, 1fr); padding: 17px; gap: 6px 15px; }
  .phase-pagination { gap: 9px; }
  .phase-pagination > button { padding: 10px 0; gap: 8px; }
  .phase-pagination > button > span[aria-hidden] { width: 32px; height: 32px; flex-basis: 32px; }
  .story-related { gap: 20px; }
  .phase-nav {
    grid-template-columns: repeat(var(--phase-count,4), minmax(min-content, 1fr));
    grid-auto-flow: row; grid-auto-columns: auto;
    gap: 4px; overflow: visible;
    padding-bottom: 0;
  }
  .phase-tab { --dot-size: 28px; width: 100%; min-width: 0; min-height: 0; padding-block: 5px 6px; gap: 8px; }
  .phase-tab::before { left: -1px; right: -1px; }
  .phase-tab:first-child::before { display: block; left: 50%; }
  .phase-tab:last-child::before { right: 50%; }
  .phase-label { width: 100%; }
  .phase-label strong {
    width: auto; margin-inline: auto; min-height: 2.9em;
    overflow-wrap: normal; word-break: normal; hyphens: none;
  }
  .chapter { scroll-margin-top: 110px; }
}
@media (max-width: 360px) {
  .chronology .phase-nav-wrap { padding-inline: 4px; }
  .phase-nav { gap: 4px; }
  .phase-tab { padding-inline: 0; }
  .phase-label strong { letter-spacing: -.025em; }
}
@media (max-width: 420px) {
  .chapters .chapter .chapter-content { padding: 23px 16px; }
  .technical-roles > div { display: block; }
  .technical-roles time { display: block; padding: 0; margin-bottom: 9px; }
  .technical-roles p { margin-top: 7px; }
  .agency-examples { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .agency-account { display: grid; grid-template-columns: minmax(0, 1fr) 18px; padding: 14px; }
  .agency-account > span { min-width: 0; }
  .phase-pagination > button { padding: 10px 0; align-items: center; }
}

/* Company names are the discreet entry points to their social pages. */
.company-inline-link { color: inherit; text-decoration: underline; text-decoration-color: #8e9f7a; text-underline-offset: .2em; text-decoration-thickness: 1px; }
.company-inline-link:hover { color: var(--ink); text-decoration-color: currentColor; }
.company-inline-link:focus-visible { outline: 2px solid #6b813f; outline-offset: 4px; border-radius: 2px; }
body.social-sheet-open, body.image-open { overflow: hidden; }
#ms-socials { position: fixed; inset: auto 0 0; margin: 0 auto; width: min(540px, 100%); max-width: 100%; max-height: 85dvh; padding: 14px 28px max(30px, env(safe-area-inset-bottom)); border: 1px solid var(--line); border-bottom: 0; border-radius: 24px 24px 0 0; background: var(--paper); }
#ms-socials[open] { animation: sheet-in 280ms var(--ease) both; }
#ms-socials.is-closing { animation: sheet-out 220ms var(--ease) both; }
#ms-socials::backdrop { background: #14251e80; backdrop-filter: blur(5px); }
.sheet-handle { width: 34px; height: 4px; background: #bdc7b5; border-radius: 9px; margin: 0 auto 22px; }
.social-sheet header { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.social-sheet h2 { font-size: var(--type-subtitle); font-family: LocalSans, Arial, sans-serif; font-weight: 500; line-height: 1.4; letter-spacing: -.025em; }
.sheet-close { display: grid; place-items: center; width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%; background: #e6eadf; font-size: var(--type-section); line-height: 1; }
.sheet-social-links { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; margin-top: 25px; }
.sheet-social-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #cbd4c0; background: #edf0e6; border-radius: 12px; padding: 17px; font-size: var(--type-body); transition: background .2s; }
.sheet-social-links a:hover { background: #e0e8d2; }
@keyframes sheet-in { from { transform: translateY(100%); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
@keyframes sheet-out { to { transform: translateY(100%); opacity: .6; } }
/* A wide screenshot keeps its complete aspect ratio, including on mobile. */
.story-image.wide { flex: 0 0 min(660px, 100%); }
.story-image.wide figure > button { height: auto; overflow: visible; }
.story-image.wide figure > button > img { display: block; width: 100%; height: auto; max-height: none; object-fit: contain; border-radius: 12px; transform: none; }
/* One swipeable enlargement gallery per product. */
#image-dialog { width: min(1440px, 96vw); max-width: none; height: 94dvh; max-height: 94dvh; padding: 0; border-radius: 18px; overflow: hidden; background: var(--paper); }
#image-dialog[open] { display: grid; grid-template-rows: auto minmax(0,1fr) auto; animation: dialog-in .25s var(--ease); }
.zoom-bar { display: flex; align-items: center; gap: 16px; min-height: 64px; padding: 12px 20px; border-bottom: 1px solid var(--line); font-size: var(--type-secondary); }
#zoom-product { font-weight: 500; }
#zoom-position { margin-left: auto; color: var(--muted); font-variant-numeric: tabular-nums; }
#image-dialog .close-image { position: static; width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 36px; line-height: 1; font-size: var(--type-section); }
.zoom-slides { display: flex; min-width: 0; min-height: 0; overflow-x: auto; overflow-y: hidden; scroll-snap-type: x mandatory; scrollbar-width: none; overscroll-behavior-x: contain; cursor: grab; }
.zoom-slides::-webkit-scrollbar { display: none; }
.zoom-slides.is-dragging { scroll-snap-type: none; cursor: grabbing; user-select: none; }
#image-dialog .zoom-slide { flex: 0 0 100%; width: 100%; height: 100%; min-width: 0; min-height: 0; margin: 0; padding: 16px; scroll-snap-align: center; scroll-snap-stop: always; display: grid; place-items: center; }
#image-dialog .zoom-slide img { width: 100%; height: 100%; min-height: 0; max-width: 100%; max-height: 100%; object-fit: contain; margin: 0; user-select: none; }
.zoom-footer { display: grid; grid-template-columns: 40px minmax(0,1fr) 40px; align-items: center; gap: 16px; padding: 14px 20px; min-height: 72px; border-top: 1px solid var(--line); }
#image-caption { font-size: var(--type-secondary); line-height: 1.5; padding: 0; margin: 0; max-width: none; }
.zoom-nav { display: grid; place-items: center; width: 40px; height: 40px; border: 1px solid #cbd4c0; border-radius: 50%; background: transparent; color: var(--ink); }
.zoom-nav:hover:enabled { background: #e0e8d2; }
.zoom-nav:disabled { opacity: .25; cursor: default; }
.zoom-nav svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
@media(max-width: 600px) {
 #image-dialog { width: 100%; height: 100dvh; max-height: 100dvh; max-width: 100%; border: 0; border-radius: 0; }
 .zoom-bar { padding: 12px 16px; }
 #image-dialog .zoom-slide { padding: 8px; }
 .zoom-footer { gap: 10px; padding: 14px 12px max(18px,env(safe-area-inset-bottom)); }
 #ms-socials { padding-inline: 22px; }
}
@media(prefers-reduced-motion: reduce) { #ms-socials[open], #ms-socials.is-closing, #image-dialog[open] { animation: none; } }

/* One contact module: email is primary, copy and LinkedIn are secondary. */
.contact-grid { align-items: start; }
.contact-copy { min-width: 0; }
.contact-channels { width: 100%; max-width: 460px; padding: 24px; border: 1px solid #c7d2ba; border-radius: 18px; background: #f7f8f1b3; }
.contact-email-row { display: grid; grid-template-columns: minmax(0,1fr) 40px; align-items: center; gap: 16px; }
.contact-email { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; padding-block: 4px; }
.contact-channel-label { color: var(--muted); letter-spacing: .12em; margin-bottom: 7px; }
.contact-email-address { color: var(--ink); font-weight: 500; letter-spacing: -.025em; overflow-wrap: anywhere; }
.contact-email:hover .contact-email-address { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 5px; }
.contact-channels .copy-email { display: grid; place-items: center; margin: 0; padding: 0; width: 40px; height: 40px; border: 1px solid transparent; border-radius: 50%; color: #5b6e4c; background: transparent; transition: background .2s, border-color .2s; }
.contact-channels .copy-email:hover { background: #e3ead8; border-color: #c7d2ba; color: var(--ink); }
.contact-channels .copy-email svg { width: 18px; height: 18px; }
.contact-network { display: flex; align-items: baseline; gap: 6px; border-top: 1px solid #d1dbc6; margin-top: 20px; padding-top: 16px; color: var(--muted); }
.contact-channels .contact-link { display: inline-flex; align-items: baseline; gap: 10px; margin: 0; padding: 0; border: 0; color: var(--ink); }
.contact-channels .contact-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.contact-email:focus-visible, .contact-channels .copy-email:focus-visible, .contact-channels .contact-link:focus-visible { outline: 2px solid #6b813f; outline-offset: 5px; border-radius: 4px; }
@media(max-width: 800px) {
 .contact-channels { max-width: 460px; padding: 20px; }
 .contact-email-row { gap: 10px; }
 .contact-copy > p { margin-bottom: 22px; }
}
@media(max-width: 360px) { .contact-channels { padding: 18px; } }

/* A bank card identifies this terminal only in the three-product overview. */
#projetos .terminal-preview-group { display: block; position: relative; width: 130px; }
#projetos .terminal-preview-group .device-terminal { margin-left: 12px; }
#projetos .terminal-bank-card { position: absolute; display: block; left: 58px; top: 140px; width: 82px; height: 52px; border: 1px solid #70826d; border-radius: 7px; color: #e9f0e4; background: linear-gradient(135deg,#405d4e,#21382f); box-shadow: 0 7px 12px #18262228; transform: rotate(-15deg); }
#projetos .bank-card-chip { position: absolute; left: 10px; top: 12px; width: 15px; height: 12px; border: 1px solid #e0d8b1; border-radius: 3px; background: linear-gradient(90deg,transparent 43%,#887f60 44% 50%,transparent 51%),linear-gradient(transparent 43%,#887f60 44% 50%,transparent 51%),#c6bd94; }
#projetos .bank-card-contactless { position: absolute; left: 31px; top: 11px; width: 10px; height: 14px; opacity: .8; }
#projetos .bank-card-number { position: absolute; left: 10px; bottom: 8px; font: 9px/1 Arial,sans-serif; letter-spacing: 1px; }
#projetos .bank-card-network { position: absolute; display: flex; right: 8px; bottom: 8px; }
#projetos .bank-card-network i { width: 10px; height: 10px; border: 1px solid #c4d2b9; border-radius: 50%; }
#projetos .bank-card-network i + i { margin-left: -4px; }
@media(max-width:800px) {
 #projetos .terminal-preview-group { width: 84px; }
 #projetos .terminal-preview-group .device-terminal { margin-left: 0; }
 #projetos .terminal-bank-card { left: 8px; top: 112px; transform: rotate(-15deg) scale(.78); transform-origin: top left; }
}

@media(max-width:800px) {
 .bo-before-after { grid-template-columns: minmax(0,1fr); gap: 0; }
 .bo-before-after .bo-scene { grid-area: 1/1; opacity: 0; visibility: hidden; transform: translateY(8px) scale(.985); transition: opacity .4s ease, transform .45s cubic-bezier(.22,.61,.36,1), visibility .45s; }
 .bo-before-after .bo-scene.is-current { opacity: 1; visibility: visible; transform: none; }
}
@media(max-width:800px) and (prefers-reduced-motion:reduce) {
 .bo-before-after .bo-scene { transition: none; transform: none; }
}

.bo-scene .bo-scene-caption { font-size: var(--type-secondary); font-weight: 500; line-height: 1.55; color: #344d3c; padding-top: 16px; margin-top: 20px; }
@media(max-width:800px) {
 .bo-scene .bo-illustration { height: auto; min-height: 240px; margin: 24px auto 20px; }
 .bo-scene .bo-scene-caption { margin-top: 0; }
}

.bo-scene .bo-scene-caption { display: flex; align-items: flex-start; gap: 8px; }
.bo-result-mark { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 1px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.bo-before .bo-result-mark { color: #996050; }
.bo-after .bo-result-mark { color: #355d3f; }

.ms-chapter .chapter-lead strong { font-weight: 700; color: var(--ink); }

.opening-lead-mobile { display: none; }
@media(max-width:800px) {
 .opening-lead-desktop { display: none; }
 .opening-lead-mobile { display: inline; }
}

.contact-intro { min-width: 0; }
.contact-intro p { margin-top: 18px; max-width: 43ch; color: #536052; font-size: var(--type-body); line-height: 1.7; }
.contact-grid .contact-copy { padding: 0; }
.contact-grid .contact-channels { max-width: 460px; padding: 0; border: 0; border-radius: 0; background: transparent; }
.contact-email-row { grid-template-columns: minmax(0,1fr) 44px; padding-bottom: 24px; border-bottom: 1px solid #bdc9af; }
.contact-email { padding: 0; }
.contact-channel-label { margin-bottom: 10px; }
.contact-channels .copy-email { width: 44px; height: 44px; border-color: #c1cdb5; background: #ffffff30; }
.contact-network { justify-content: space-between; border-top: 0; margin-top: 0; padding-top: 20px; }
@media(max-width:800px) {
 .contact-grid { gap: 28px; }
 .contact-intro p { margin-top: 16px; }
 .contact-email-row { padding-bottom: 20px; }
 .contact-network { padding-top: 18px; }
}

.contact-channel-label { letter-spacing: 0; font-size: var(--type-secondary); }

.mobile-nav a[aria-current=step] { color: var(--ink); font-weight: 500; text-decoration: underline; text-underline-offset: 4px; }
