:root {
    --paper: #F6F7F9;
    --surface: #FFFFFF;
    --tint: #E9EFFB;
    --ink: #0B1630;
    --ink-2: #3A4562;
    --muted: #6C768C;
    --line: #DFE3EB;
    --line-2: #C9D0DC;
    --accent: #2B5BD7;
    --accent-ink: #1F45A8;
    --on-accent: #FFFFFF;
    --dark: #0B1630;
    --dark-2: #111D3A;
    --on-dark: #F3F5F9;
    --on-dark-2: #A9B4CC;
  }
  @media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
      --paper: #0E1220;
      --surface: #151B2C;
      --tint: #1B2540;
      --ink: #EEF1F7;
      --ink-2: #C4CBDA;
      --muted: #8E98AE;
      --line: #263049;
      --line-2: #33405C;
      --accent: #6D97FF;
      --accent-ink: #9DB9FF;
      --on-accent: #0B1630;
      --dark: #070B16;
      --dark-2: #0E1428;
      --on-dark: #F3F5F9;
      --on-dark-2: #A9B4CC;
    }
  }
  :root[data-theme="dark"] {
    --paper: #0E1220;
    --surface: #151B2C;
    --tint: #1B2540;
    --ink: #EEF1F7;
    --ink-2: #C4CBDA;
    --muted: #8E98AE;
    --line: #263049;
    --line-2: #33405C;
    --accent: #6D97FF;
    --accent-ink: #9DB9FF;
    --on-accent: #0B1630;
    --dark: #070B16;
    --dark-2: #0E1428;
    --on-dark: #F3F5F9;
    --on-dark-2: #A9B4CC;
  }

  /* language switch: PT is the resting state */
  :root:not(.lang-en):not(.lang-es) :is(.en, .es) { display: none !important; }
  :root.lang-en :is(.pt, .es) { display: none !important; }
  :root.lang-es :is(.pt, .en) { display: none !important; }

  * { box-sizing: border-box; }
  html { scroll-behavior: smooth; }
  @media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
  body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: "Archivo", "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
  }
  img { max-width: 100%; height: auto; display: block; }
  a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
  a:hover { color: var(--accent); }
  :focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

  .eyebrow { font-family: "IBM Plex Mono", ui-monospace, Menlo, monospace; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
  .wrap { max-width: 1200px; margin: 0 auto; padding-inline: clamp(18px, 4vw, 40px); }

  /* header */
  header.top {
    position: sticky; top: 0; z-index: 20;
    background: color-mix(in srgb, var(--paper) 88%, transparent);
    backdrop-filter: saturate(140%) blur(10px);
    border-bottom: 1px solid var(--line);
  }
  .topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; height: 60px; }
  .mark { font-weight: 800; letter-spacing: -.02em; font-size: 17px; color: var(--ink); text-decoration: none; font-stretch: 90%; white-space: nowrap; }
  .mark small { font-family: "IBM Plex Mono", monospace; font-weight: 400; font-size: 11px; color: var(--muted); letter-spacing: .06em; margin-left: 10px; text-transform: uppercase; }
  nav.main { display: flex; gap: 20px; }
  nav.main a { color: var(--ink-2); text-decoration: none; font-size: 14px; font-weight: 500; }
  nav.main a:hover { color: var(--accent); }
  .langsw { display: flex; border: 1px solid var(--line-2); border-radius: 999px; overflow: hidden; }
  .langsw button {
    all: unset; cursor: pointer; padding: 5px 10px; font-family: "IBM Plex Mono", monospace; font-size: 12px; letter-spacing: .06em; color: var(--muted);
  }
  .langsw button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
  .langsw button:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }

  /* hero */
  .hero { background: var(--dark); color: var(--on-dark); }
  .hero .grid { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 580px; }
  .hero .txt { padding-block: clamp(40px, 6vw, 72px); padding-right: clamp(20px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; gap: 22px; }
  .hero .eyebrow { color: var(--on-dark-2); }
  .hero h1 {
    margin: 0; font-size: clamp(38px, 5.6vw, 68px); line-height: .98; letter-spacing: -.03em; font-weight: 800; font-stretch: 88%; text-wrap: balance;
  }
  .hero h1 em { font-style: normal; color: #8FB4FF; }
  .hero .lead { margin: 0; font-size: clamp(17px, 1.6vw, 20px); line-height: 1.5; color: var(--on-dark-2); max-width: 52ch; text-wrap: pretty; }
  .hero .lead strong { color: var(--on-dark); font-weight: 600; }
  .roles { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; letter-spacing: .04em; color: var(--on-dark-2); display: flex; flex-wrap: wrap; gap: 6px 18px; }
  .roles > span::before { content: "▸ "; color: #8FB4FF; }
  .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
  .btn { display: inline-block; padding: 12px 18px; border-radius: 6px; font-weight: 600; font-size: 14.5px; text-decoration: none; border: 1px solid transparent; }
  .btn.pri { background: #FFFFFF; color: #0B1630; }
  .btn.pri:hover { background: #E6ECFA; color: #0B1630; }
  .btn.ghost { border-color: rgba(255,255,255,.35); color: var(--on-dark); }
  .btn.ghost:hover { border-color: #fff; color: #fff; }
  .hero .pic { position: relative; min-height: 380px; }
  .hero .pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 55% 30%; }
  .hero .pic::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(90deg, var(--dark) 0%, transparent 22%); pointer-events: none; }

  /* proof strip */
  .proof { border-bottom: 1px solid var(--line); background: var(--surface); }
  .proof .row { display: grid; grid-template-columns: repeat(6, 1fr); }
  .proof .cell { padding: 22px 18px 20px; border-left: 1px solid var(--line); }
  .proof .cell:first-child { border-left: 0; padding-left: 0; }
  .proof .n { font-weight: 800; font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.03em; line-height: 1; font-stretch: 85%; font-variant-numeric: tabular-nums; color: var(--ink); }
  .proof .n small { font-size: .55em; font-weight: 700; letter-spacing: 0; margin-left: 2px; }
  .proof .l { margin-top: 8px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }

  /* logo wall (typographic wordmarks) */
  .logos { border-bottom: 1px solid var(--line); background: var(--paper); }
  .logos .row { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
  .logos .grp { padding: 18px 0 20px; }
  .logos .grp + .grp { border-left: 1px solid var(--line); padding-left: 28px; }
  .logos .eyebrow { margin-bottom: 10px; font-size: 11px; }
  .wall { display: flex; flex-wrap: wrap; gap: 8px 26px; align-items: baseline; }
  .wm { font-weight: 800; font-stretch: 90%; letter-spacing: -.015em; font-size: 17px; color: var(--muted); white-space: nowrap; }
  .wm.sm { font-size: 13px; letter-spacing: .04em; text-transform: uppercase; font-weight: 700; }
  .wm.cap { text-transform: uppercase; letter-spacing: .08em; font-size: 14px; }
  .wm.serif { font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-style: italic; font-stretch: 100%; }
  .wm.mono { font-family: "IBM Plex Mono", monospace; font-weight: 500; font-stretch: 100%; letter-spacing: .1em; font-size: 14px; }

  /* sections */
  .sec { display: grid; grid-template-columns: 200px 1fr; gap: clamp(20px, 4vw, 56px); padding-block: clamp(56px, 8vw, 96px); border-top: 1px solid var(--line); }
  .sec:first-of-type { border-top: 0; }
  .sec .lab { position: sticky; top: 76px; align-self: start; }
  .sec .lab .eyebrow { color: var(--accent-ink); }
  .sec .lab p { margin: 8px 0 0; font-size: 13px; color: var(--muted); max-width: 22ch; line-height: 1.45; }
  h2 { margin: 0 0 18px; font-size: clamp(28px, 3.4vw, 42px); line-height: 1.05; letter-spacing: -.025em; font-weight: 800; font-stretch: 90%; text-wrap: balance; max-width: 22ch; }
  .intro { font-size: clamp(17px, 1.5vw, 19px); color: var(--ink-2); max-width: 62ch; margin: 0 0 32px; text-wrap: pretty; }
  .note { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

  /* three fronts */
  .fronts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
  .front { padding: 26px 22px 26px 0; border-left: 1px solid var(--line); padding-left: 22px; }
  .front:first-child { border-left: 0; padding-left: 0; }
  .front h3 { margin: 0 0 10px; font-size: 20px; letter-spacing: -.02em; font-weight: 700; }
  .front p { margin: 0; color: var(--ink-2); font-size: 15px; }
  .front .pf { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line-2); font-size: 13.5px; color: var(--muted); }
  .front .pf b { color: var(--ink); font-weight: 600; }

  /* cases */
  .cases { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .case { background: var(--surface); border: 1px solid var(--line); padding: 22px 24px 22px; display: grid; grid-template-rows: auto auto auto auto 1fr; gap: 8px; }
  .case .wm { font-size: 15px; color: var(--ink-2); }
  .case .eyebrow { color: var(--muted); }
  .case h3 { margin: 4px 0 0; font-size: 22px; line-height: 1.15; letter-spacing: -.02em; text-wrap: balance; }
  .case .big { font-weight: 800; font-size: 40px; letter-spacing: -.03em; line-height: 1; font-stretch: 82%; color: var(--accent-ink); font-variant-numeric: tabular-nums; margin-top: 4px; }
  .case .big small { font-size: .45em; font-weight: 600; letter-spacing: 0; margin-left: 4px; color: var(--muted); font-stretch: 100%; }
  .case dl { margin: 10px 0 0; display: grid; gap: 8px; font-size: 14px; }
  .case dl div { display: grid; grid-template-columns: 74px 1fr; gap: 10px; }
  .case dt { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
  .case dd { margin: 0; color: var(--ink-2); }
  .case dd b { color: var(--ink); font-weight: 600; }
  .fig-wide { margin: 28px 0 0; }
  .fig-wide img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; object-position: 50% 35%; }
  figcaption { font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--muted); margin-top: 8px; letter-spacing: .04em; }

  /* certification seals */
  .seals { margin-top: 28px; border: 1px solid var(--line); background: var(--surface); padding: 20px 22px 18px; }
  .seals .hd { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; }
  .seals .hd p { margin: 0; font-size: 13px; color: var(--muted); max-width: 60ch; }
  .sealrow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 12px; }
  .seal { text-align: center; color: var(--accent-ink); }
  .seal svg { width: 100%; max-width: 116px; height: auto; margin: 0 auto; display: block; }
  .seal .cap { font-family: "IBM Plex Mono", monospace; font-size: 10.5px; letter-spacing: .04em; color: var(--muted); margin-top: 6px; line-height: 1.3; }

  /* story */
  .story { display: grid; grid-template-columns: 1fr 360px; gap: 40px; align-items: start; }
  .acts { display: grid; gap: 0; border-top: 1px solid var(--line); }
  .act { display: grid; grid-template-columns: 64px 1fr; gap: 18px; padding: 22px 0; border-bottom: 1px solid var(--line); }
  .act .no { font-family: "IBM Plex Mono", monospace; font-size: 13px; color: var(--accent-ink); padding-top: 4px; }
  .act .yrs { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; }
  .act h3 { margin: 4px 0 8px; font-size: 21px; letter-spacing: -.02em; }
  .act p { margin: 0; color: var(--ink-2); font-size: 15px; max-width: 60ch; }
  .story figure { margin: 0; position: sticky; top: 76px; }
  .story figure img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 20%; }
  .cv { margin-top: 34px; }
  .cv table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
  .cv th { text-align: left; font-family: "IBM Plex Mono", monospace; font-weight: 500; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); padding: 0 12px 8px 0; border-bottom: 1px solid var(--line-2); }
  .cv td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
  .cv td.y { font-family: "IBM Plex Mono", monospace; font-size: 12.5px; white-space: nowrap; color: var(--muted); }
  .cv td.c { color: var(--ink); font-weight: 700; white-space: nowrap; font-stretch: 92%; }

  /* boards */
  .boards { display: grid; grid-template-columns: 1fr 1fr 300px; gap: 18px; align-items: stretch; }
  .seat { background: var(--surface); border: 1px solid var(--line); padding: 22px 24px 24px; display: flex; flex-direction: column; gap: 10px; }
  .seat .kn { font-weight: 800; font-size: 44px; letter-spacing: -.03em; font-stretch: 82%; color: var(--accent-ink); line-height: 1; font-variant-numeric: tabular-nums; }
  .seat .kn small { font-size: .5em; font-weight: 700; letter-spacing: 0; }
  .seat .kl { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .06em; color: var(--muted); text-transform: uppercase; line-height: 1.4; margin-top: -2px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
  .seat .eyebrow { margin-top: 4px; }
  .seat h3 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
  .seat p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
  .boards figure { margin: 0; }
  .boards figure img { width: 100%; height: 100%; aspect-ratio: 3 / 4; object-fit: cover; object-position: 50% 15%; }

  /* press */
  .press { display: grid; grid-template-columns: 1fr 320px; gap: 40px; align-items: start; }
  .plist { border-top: 1px solid var(--line); }
  .pitem { display: grid; grid-template-columns: 150px 1fr; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 14.5px; }
  .pitem .src { font-family: "IBM Plex Mono", monospace; font-size: 12px; color: var(--muted); letter-spacing: .02em; }
  .pitem .src b { display: block; color: var(--ink-2); font-weight: 500; }
  .pitem a { color: var(--ink); text-decoration: none; font-weight: 600; }
  .pitem a:hover { color: var(--accent); text-decoration: underline; }
  .pitem .t { font-weight: 600; }
  .pitem .k { color: var(--muted); font-size: 13px; }
  .press figure { margin: 0; }
  .press figure img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }

  /* garage */
  .gal { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
  .gal figure { margin: 0; }
  .gal .lead-img { grid-column: 1 / -1; }
  .gal .lead-img img { width: 100%; aspect-ratio: 21 / 9; object-fit: cover; }
  .gal .tile img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
  .ig { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; font-weight: 600; text-decoration: none; color: var(--ink); border: 1px solid var(--line-2); padding: 10px 14px; border-radius: 6px; }
  .ig:hover { border-color: var(--accent); color: var(--accent); }
  .ig svg { width: 16px; height: 16px; }

  /* contact */
  .contact { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
  .contact .col p { margin: 0 0 18px; color: var(--ink-2); font-size: 15.5px; max-width: 48ch; }
  .clinks { display: grid; margin-top: 8px; }
  .clinks a { display: grid; grid-template-columns: 110px 1fr; gap: 12px; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); text-decoration: none; color: var(--ink); font-weight: 600; }
  .clinks a:last-child { border-bottom: 1px solid var(--line); }
  .clinks a span { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 400; }
  .clinks a:hover { color: var(--accent); }
  .contact figure { margin: 0; }
  .contact figure img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; }

  footer.ft { border-top: 1px solid var(--line); padding-block: 24px 40px; }
  footer .row { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; font-family: "IBM Plex Mono", monospace; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; }

  @media (max-width: 1000px) {
    .proof .row { grid-template-columns: repeat(3, 1fr); }
    .proof .cell:nth-child(4) { border-left: 0; padding-left: 0; }
    .proof .cell { padding-block: 16px; }
    .story, .press { grid-template-columns: 1fr; }
    .boards { grid-template-columns: 1fr 1fr; }
    .boards figure { display: none; }
    .story figure, .sec .lab { position: static; }
    .story figure img { aspect-ratio: 4 / 3; }
    .sealrow { grid-template-columns: repeat(4, 1fr); }
  }
  @media (max-width: 820px) {
    nav.main { display: none; }
    .hero .grid { grid-template-columns: 1fr; min-height: 0; }
    .hero .pic { order: -1; min-height: 0; aspect-ratio: 16 / 10; }
    .hero .pic::before { background: linear-gradient(180deg, transparent 60%, var(--dark) 100%); }
    .hero .txt { padding-right: 0; }
    .logos .row { grid-template-columns: 1fr; }
    .logos .grp + .grp { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
    .sec { grid-template-columns: 1fr; gap: 14px; }
    .fronts { grid-template-columns: 1fr; }
    .front { border-left: 0; padding-left: 0; border-top: 1px solid var(--line); }
    .front:first-child { border-top: 0; }
    .cases { grid-template-columns: 1fr; }
    .boards { grid-template-columns: 1fr; }
    .contact { grid-template-columns: 1fr; }
    .gal { grid-template-columns: 1fr 1fr; }
    .gal .tile.sw { grid-column: 1 / -1; }
    .gal .tile.sw img { aspect-ratio: 2 / 1; }
  }
  @media (max-width: 520px) {
    .proof .row { grid-template-columns: repeat(2, 1fr); }
    .proof .cell:nth-child(4) { border-left: 1px solid var(--line); padding-left: 18px; }
    .proof .cell:nth-child(odd) { border-left: 0; padding-left: 0; }
    .pitem { grid-template-columns: 1fr; gap: 4px; }
    .act { grid-template-columns: 40px 1fr; }
    .sealrow { grid-template-columns: repeat(3, 1fr); }
    .clinks a { grid-template-columns: 1fr; gap: 2px; }
    .mark small { display: none; }
  }
