/* Arlem — data & AI. World: the operator's ledger (see DESIGN.md). */
:root {
  --paper: #FFFFFF; --paper-2: #F4F4F4; --ink: #000000; --ink-2: #5C5C5C; --rule: #E6E6E6;
  --acc: #0B2A5B; --acc-2: #071C3E; --acc-tint: #E6ECF6;
  --on-dark: #FFFFFF; --on-dark-2: #A9B6CE; --todo: #F5E29A;
  --max: 1240px; --gut: 32px;
  --display: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --sans: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; color-scheme: light; }
body { font-family: var(--sans); font-size: 1.05rem; line-height: 1.6; color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--acc); color: var(--on-dark); }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 3px; border-radius: 4px; }
html { scrollbar-color: var(--rule) var(--paper); scrollbar-width: thin; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 0.18em; text-decoration-color: var(--rule); }
a:hover { text-decoration-color: var(--acc); color: var(--acc); }
img, svg { max-width: 100%; display: block; }
h1, h2, h3, .display { font-family: var(--display); font-weight: 600; letter-spacing: -0.035em; line-height: 1.06; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 4.8vw, 3.6rem); }
h2 { font-size: clamp(1.5rem, 2.3vw, 1.9rem); letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; line-height: 1.3; letter-spacing: -0.015em; }
em, .it { font-style: normal; color: var(--acc); }
.mono, .idx .r, .case-head .meta b, th, .svc .tech, .steps dt small, .idx .c small, .hero .foot, .sysmap text, .bk-slot, .bk-day small, .legal { font-family: var(--mono); letter-spacing: 0; }
p { max-width: 68ch; }
.lede { font-size: 1.15rem; line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.small { font-size: 0.88rem; }
.muted { color: var(--ink-2); }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }

/* Header */
.hd { position: sticky; top: 0; z-index: 20; background: rgba(255,255,255,0.72); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid rgba(0,0,0,0.08); }
.hd .wrap { display: flex; align-items: center; gap: 28px; height: 68px; }
.mark { font-family: var(--sans); font-weight: 800; font-size: 1.3rem; letter-spacing: 0.42em; text-transform: uppercase; text-decoration: none; margin-right: -0.42em; }
.mark:hover { color: var(--ink); }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a { text-decoration: none; padding: 8px 14px; border-radius: 20px; font-size: 0.95rem; color: var(--ink); font-weight: 500; }
.nav a:hover, .nav a[aria-current] { color: var(--ink); background: var(--paper-2); }
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--ink); color: #fff; text-decoration: none; padding: 12px 24px; border-radius: 28px; font-weight: 600; font-size: 0.95rem; border: 1px solid var(--ink); transition: background .18s ease, border-color .18s ease, transform .18s ease; }
.btn:hover { background: var(--acc); border-color: var(--acc); color: #fff; transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule); }
.btn.ghost:hover { border-color: var(--ink); background: var(--paper-2); }
.nav .btn { margin-left: 10px; }
.nav a.btn { color: #fff; background: var(--ink); }
.nav a.btn:hover { background: var(--acc); color: #fff; }
.menu-btn { display: none; margin-left: auto; background: none; border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; font: inherit; color: var(--ink); cursor: pointer; }

/* Sections */
section { padding: 72px 0; border-top: 1px solid var(--rule); }
section.first { border-top: 0; }
.two { display: grid; grid-template-columns: 4fr 8fr; gap: 48px; align-items: start; }
.two > *, .hero .grid > *, .idx a > *, .svc > *, .steps dd, .team > *, .places > * { min-width: 0; }
body { overflow-x: hidden; }
.two > h2 { position: sticky; top: 88px; }
.stack > * + * { margin-top: 1.1em; }
.flow > * + * { margin-top: 44px; }

/* Hero */
.hero { padding: 36px 0 72px; }
.hero .grid { display: grid; grid-template-columns: 7fr 5fr; gap: 40px; align-items: center; background: var(--paper-2); border-radius: 18px; padding: 56px; }
.hero > .wrap > h1, .hero > .wrap > .lede { padding: 0; }
.hero .grid .lede { color: var(--ink-2); }
h1 .ln { display: block; }
.hero .ctas { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 34px; }
.hero .lede { margin-top: 22px; }
.hero .foot { margin-top: 40px; color: var(--ink-2); font-size: 0.9rem; display: flex; gap: 24px; flex-wrap: wrap; }
.hero .foot { font-size: 0.8rem; }
.hero .foot span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--acc); margin-right: 8px; vertical-align: 2px; }
@media (prefers-reduced-motion: no-preference) {
  .hero h1 .ln { opacity: 0; filter: blur(6px); transform: translateY(12px); animation: rise .9s cubic-bezier(.2,.8,.2,1) forwards; }
  .hero h1 .ln:nth-child(2) { animation-delay: .08s; } .hero h1 .ln:nth-child(3) { animation-delay: .16s; }
  .hero .lede, .hero .ctas, .hero .foot { opacity: 0; animation: rise .9s cubic-bezier(.2,.8,.2,1) .28s forwards; }
  @keyframes rise { to { opacity: 1; filter: blur(0); transform: none; } }
}
.sysmap { width: 100%; height: auto; }
.sysmap text { font-family: var(--sans); font-size: 11px; fill: var(--ink-2); }
.sysmap .t { fill: var(--ink); font-weight: 500; }
.sysmap .box { fill: #fff; stroke: var(--ink); stroke-width: 1; }
.sysmap .core { fill: var(--acc-tint); stroke: var(--acc); }
.sysmap .ln { stroke: var(--ink-2); stroke-width: 1; fill: none; }
.sysmap .dot { fill: var(--acc); }

/* Index rows (case studies) */
.idx { border-top: 1px solid var(--rule); }
.idx a { display: grid; grid-template-columns: 3fr 6fr 2fr 1fr; gap: 24px; align-items: baseline; padding: 26px 0; border-bottom: 1px solid var(--rule); text-decoration: none; transition: background .18s ease; }
.idx a:hover { background: var(--paper-2); box-shadow: 0 0 0 12px var(--paper-2); color: var(--ink); }
.idx .c { font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.02em; }
.idx .c small { display: block; font-weight: 400; font-size: 0.78rem; color: var(--ink-2); margin-top: 6px; }
.idx .w { color: var(--ink-2); }
.idx .r { color: var(--ink-2); font-size: 0.9rem; font-variant-numeric: tabular-nums; }
.idx .ar { text-align: right; color: var(--acc); font-size: 1.2rem; }
.idx a:hover { background: var(--paper-2); box-shadow: 0 0 0 12px var(--paper-2); border-radius: 4px; }

/* Services */
.svc { display: grid; grid-template-columns: 1fr 1fr; gap: 20px 48px; padding: 36px 0; border-top: 1px solid var(--rule); }
.svc:first-of-type { border-top: 0; padding-top: 0; }
.svc h3 { grid-column: 1 / -1; }
.svc ul { list-style: none; }
.svc li { padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 0.98rem; }
.svc li:last-child { border-bottom: 0; }
.svc .tech { grid-column: 1 / -1; color: var(--ink-2); font-size: 0.88rem; }
.svc .tech b { color: var(--ink); font-weight: 500; }

/* Steps */
.steps { display: grid; grid-template-columns: 1fr; }
.steps > div { display: grid; grid-template-columns: 3fr 9fr; gap: 24px; padding: 28px 0; border-top: 1px solid var(--rule); }
.steps > div:first-child { border-top: 0; padding-top: 0; }
.steps dt { font-family: var(--display); font-weight: 600; font-size: 1.25rem; line-height: 1.2; letter-spacing: -0.02em; }
.steps dt small { display: block; font-weight: 400; font-size: 0.78rem; color: var(--ink-2); margin-top: 6px; }
.steps dd p + p { margin-top: 0.8em; }

/* Dark band */
.band { background: var(--acc); color: var(--on-dark); border-top: 0; border-radius: 18px; margin: 0 var(--gut); }
.band .wrap { padding: 0 32px; }
.band ::selection { background: var(--on-dark); color: var(--ink); }
.band .muted, .band .lede { color: var(--on-dark-2); }
.band h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); max-width: 22ch; }
.band a { text-decoration-color: var(--on-dark-2); }
.band a:hover { color: var(--on-dark); text-decoration-color: var(--on-dark); }
.band .btn { background: #fff; color: var(--acc); border-color: #fff; }
.band .btn:hover { background: #fff; color: var(--ink); border-color: #fff; }
.band .cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; margin-top: 56px; }
.band .cols h3 { color: var(--on-dark); margin-bottom: 10px; }
.band .cols p { color: var(--on-dark-2); font-size: 0.98rem; }

/* CTA */
.cta { text-align: left; }
.cta .row { display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; flex-wrap: wrap; }
.cta .contact { display: grid; gap: 6px; font-size: 0.98rem; color: var(--ink-2); }
.cta .contact b { color: var(--ink); font-weight: 500; }

/* Case pages */
.case-head { padding: 72px 0 56px; }
.case-head .lede, .hero h1 + .lede { margin-top: 22px; }
.case-head .meta { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin-top: 44px; padding-top: 24px; border-top: 1px solid var(--rule); font-size: 0.95rem; }
.case-head .meta b { display: block; font-weight: 500; color: var(--ink-2); font-size: 0.82rem; margin-bottom: 4px; }
.arch { background: var(--paper-2); padding: 28px; border-radius: 14px; }
.arch ol { list-style: none; display: grid; gap: 14px; counter-reset: s; }
.arch li { position: relative; padding-left: 38px; }
.arch li::before { counter-increment: s; content: counter(s); position: absolute; left: 0; top: 0.15em; font-size: 0.8rem; color: var(--acc); font-variant-numeric: tabular-nums; border: 1px solid var(--acc); border-radius: 50%; width: 22px; height: 22px; display: inline-grid; place-items: center; line-height: 1; }
.arch li b { font-weight: 500; }
.next { display: flex; justify-content: space-between; gap: 24px; align-items: baseline; }

/* About / team */
.team { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px 32px; }
.team .p h3 { margin-bottom: 4px; }
.team .p .role { color: var(--ink-2); font-size: 0.92rem; }
.team .p p { margin-top: 10px; font-size: 0.98rem; }
.places { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; }
.places h3 { margin-bottom: 8px; }
address { font-style: normal; color: var(--ink-2); line-height: 1.55; }

/* Contact */
.form { display: grid; gap: 16px; max-width: 560px; }
.form label { display: grid; gap: 6px; font-size: 0.9rem; color: var(--ink-2); }
.form input, .form textarea, .form select { font: inherit; color: var(--ink); background: #fff; border: 1px solid #D6D6D6; border-radius: 10px; padding: 11px 12px; caret-color: var(--acc); }
.form input::placeholder, .form textarea::placeholder { color: #7A756C; }
.form input:focus, .form textarea:focus { border-color: var(--acc); outline: none; box-shadow: 0 0 0 3px var(--acc-tint); }
.form textarea { min-height: 140px; resize: vertical; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form .hint { font-size: 0.85rem; color: var(--ink-2); }
.form .err { color: #9A2F1F; font-size: 0.88rem; min-height: 1.2em; }
.contact-side { display: grid; gap: 28px; align-content: start; }
.contact-side b { display: block; font-weight: 500; margin-bottom: 4px; }
.contact-side p { color: var(--ink-2); }

/* Placeholder for facts the owner must supply — never ship these */
.todo { background: var(--todo); color: var(--ink); padding: 0 4px; border-radius: 3px; font-style: normal; }

/* Table */
table { border-collapse: collapse; width: 100%; font-variant-numeric: tabular-nums; font-size: 0.95rem; }
th, td { text-align: left; padding: 12px 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { font-weight: 500; color: var(--ink-2); font-size: 0.85rem; }

/* Footer */
footer { border-top: 1px solid var(--rule); padding: 56px 0 72px; font-size: 0.9rem; color: var(--ink-2); }
footer .cols { display: grid; grid-template-columns: 2fr 1fr 1fr 1.4fr; gap: 32px; }
footer .mark { color: var(--ink); }
footer ul { list-style: none; display: grid; gap: 8px; margin-top: 10px; }
footer a { text-decoration: none; }
footer a:hover { text-decoration: underline; }
footer .legal { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 0.82rem; }

/* Responsive */
@media (max-width: 960px) {
  .two { grid-template-columns: 1fr; gap: 24px; } .two > h2 { position: static; }
  .hero .grid { grid-template-columns: 1fr; gap: 40px; }
  .idx a { grid-template-columns: 1fr; gap: 8px; } .idx .ar { display: none; }
  .svc { grid-template-columns: 1fr; }
  .steps > div { grid-template-columns: 1fr; gap: 10px; }
  .band .cols { grid-template-columns: 1fr; gap: 28px; }
  .case-head .meta { grid-template-columns: 1fr 1fr; }
  .team { grid-template-columns: 1fr 1fr; }
  footer .cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  :root { --gut: 20px; }
  section { padding: 56px 0; } .hero { padding: 48px 0 40px; }
  .hd .wrap { height: 60px; }
  .nav { display: none; position: absolute; top: 60px; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--rule); flex-direction: column; align-items: stretch; padding: 12px 20px 20px; gap: 6px; }
  .nav.open { display: flex; } .nav .btn { margin: 8px 0 0; justify-content: center; }
  .menu-btn { display: inline-block; }
  .team, .places, .form .row { grid-template-columns: 1fr; }
  footer .cols { grid-template-columns: 1fr; }
  .lede { font-size: 1.1rem; }
  h1 { font-size: clamp(1.9rem, 8.5vw, 2.4rem); }
  .hero .grid { padding: 28px 22px; border-radius: 14px; }
  .band { margin: 0 var(--gut); } .band .wrap { padding: 0 8px; }
  .idx .r { font-size: 0.85rem; }
}

/* Booking */
.bk-top { margin-bottom: 18px; }
.bk-days { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: thin; }
.bk-day { flex: none; font: inherit; background: #fff; border: 1px solid #D6D6D6; border-radius: 12px; padding: 10px 14px; cursor: pointer; text-align: left; color: var(--ink); min-width: 118px; transition: border-color .15s ease, background .15s ease; }
.bk-day span { display: block; font-weight: 500; font-size: 0.95rem; }
.bk-day small { display: block; color: var(--ink-2); font-size: 0.78rem; margin-top: 2px; }
.bk-day:hover { border-color: var(--ink); }
.bk-day.on { background: var(--ink); color: var(--on-dark); border-color: var(--ink); }
.bk-day.on small { color: var(--on-dark-2); }
.bk-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; margin-top: 16px; }
.bk-slot { font: inherit; font-variant-numeric: tabular-nums; background: #fff; border: 1px solid #D6D6D6; border-radius: 20px; padding: 10px 8px; cursor: pointer; color: var(--ink); transition: border-color .15s ease, background .15s ease; }
.bk-slot:hover { border-color: var(--acc); background: var(--acc-tint); }
.bk-form { margin-top: 20px; }
.bk-picked { color: var(--ink-2); font-size: 0.95rem; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--acc); text-decoration: underline; text-underline-offset: 0.18em; cursor: pointer; }
.bk-done h3 { font-size: 1.6rem; }
.bk-done p { margin-top: 10px; }

[hidden] { display: none !important; }

/* FAQ (AI-search friendly: question = summary, answer = one paragraph) */
.faq-list details { border-top: 1px solid var(--rule); padding: 16px 4px; }
.faq-list details:last-child { border-bottom: 1px solid var(--rule); }
.faq-list summary { cursor: pointer; font-weight: 600; font-size: 1rem; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; color: var(--ink-2); font-size: 1.3rem; font-weight: 400; flex: none; }
.faq-list details[open] summary::after { content: "–"; }
.faq-list p { margin-top: 12px; color: var(--ink-2); font-size: 0.98rem; line-height: 1.6; max-width: 70ch; }
/* Key facts */
.facts { display: grid; gap: 0; }
.facts > div { display: grid; grid-template-columns: 3fr 9fr; gap: 24px; padding: 14px 0; border-top: 1px solid var(--rule); }
.facts > div:last-child { border-bottom: 1px solid var(--rule); }
.facts dt { font-family: var(--mono); font-size: 0.85rem; color: var(--ink-2); }
.facts dd { font-size: 0.98rem; }
@media (max-width: 680px) { .facts > div { grid-template-columns: 1fr; gap: 4px; } }

/* Brief lists (home services) */
.brief > div { display: grid; grid-template-columns: 3fr 9fr; gap: 24px; padding: 18px 0; border-top: 1px solid var(--rule); }
.brief > div:first-child { border-top: 0; padding-top: 0; }
.brief h3 { font-size: 1rem; }
.brief p { color: var(--ink-2); font-size: 0.98rem; }
.brief .more, .more { margin-top: 22px; font-weight: 500; }
ul.tight { list-style: none; display: grid; gap: 0; }
ul.tight li { padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 0.98rem; }
ul.tight li:first-child { border-top: 1px solid var(--rule); }
@media (max-width: 680px) { .brief > div { grid-template-columns: 1fr; gap: 6px; } }

/* Stories (bento como astrafy) */
.hero .grid.solo { grid-template-columns: 1fr; }
.hero .grid.solo h1 { max-width: 16ch; }
.stories { display: grid; grid-template-columns: 1.6fr 1fr; grid-template-rows: 1fr 1fr; gap: 16px; }
.story { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 36px; border-radius: 18px; text-decoration: none; color: var(--ink); min-height: 260px; transition: transform .18s ease, box-shadow .18s ease; }
.story:hover { transform: translateY(-2px); box-shadow: 0 10px 30px rgba(0,0,0,0.08); color: inherit; }
.story.big { grid-row: 1 / 3; min-height: 540px; padding: 44px; }
.story.tint { background: var(--acc-tint); }
.story.gray { background: var(--paper-2); }
.story.dark { background: var(--acc); color: #fff; }
.story h3 { font-size: 1.35rem; line-height: 1.2; letter-spacing: -0.025em; max-width: 24ch; }
.story.big h3 { font-size: clamp(1.7rem, 2.6vw, 2.3rem); max-width: 22ch; }
.story h3 em { color: var(--acc); }
.story.dark h3 em { color: #9DC1FF; }
.story p { color: var(--ink-2); font-size: 0.98rem; max-width: 52ch; margin-top: auto; }
.story .tag { font-family: var(--mono); font-size: 0.72rem; letter-spacing: 0.02em; color: var(--ink-2); border: 1px solid rgba(0,0,0,0.18); border-radius: 999px; padding: 5px 10px; align-self: flex-start; }
.story.dark .tag { color: var(--on-dark-2); border-color: rgba(255,255,255,0.35); }
.story .pill { align-self: flex-end; margin-top: auto; border: 1px solid var(--ink); border-radius: 28px; padding: 10px 20px; font-weight: 600; font-size: 0.9rem; background: transparent; transition: background .18s ease, color .18s ease; }
.story.big .pill { margin-top: 0; }
.story:hover .pill { background: var(--ink); color: #fff; }
.story.dark .pill { border-color: #fff; color: #fff; }
.story.dark:hover .pill { background: #fff; color: var(--acc); }
@media (max-width: 900px) { .stories { grid-template-columns: 1fr; grid-template-rows: auto; } .story.big { grid-row: auto; min-height: 340px; padding: 32px 24px; } .story { min-height: 220px; padding: 28px 22px; } }

/* ===== Hero noir (home) ===== */
:root { --night: #050B18; --night-2: #0A1630; --signal: #4F8DFF; }
.noir { position: relative; background: var(--night); color: #fff; border-top: 0; padding: 0; margin-top: -68px; min-height: clamp(640px, 100svh, 960px); display: flex; align-items: stretch; overflow: hidden; isolation: isolate; }
.noir-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: 0; }
.noir::after { content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(120% 80% at 50% 110%, rgba(5,11,24,0.85), rgba(5,11,24,0) 60%); }
.noir-in { position: relative; z-index: 2; display: flex; flex-direction: column; justify-content: space-between; width: 100%; padding-top: 108px; padding-bottom: 36px; gap: 40px; }
.noir-top { display: flex; justify-content: space-between; gap: 16px; color: rgba(255,255,255,0.62); font-size: 0.78rem; letter-spacing: 0.04em; text-transform: uppercase; }
.noir-h { font-size: clamp(2.8rem, 8.2vw, 7.2rem); line-height: 0.98; letter-spacing: -0.045em; font-weight: 600; color: #fff; max-width: 14ch; margin-top: auto; }
.noir-h .ln { display: block; overflow: hidden; }
.noir-h .ln i { display: block; font-style: normal; }
.noir-h em { color: var(--signal); font-style: normal; }
.noir-row { display: grid; grid-template-columns: minmax(0, 52ch) auto; justify-content: space-between; align-items: end; gap: 24px 48px; }
.noir-lede { color: rgba(255,255,255,0.72); font-size: 1.1rem; line-height: 1.55; max-width: 48ch; }
.btn.light { background: #fff; color: var(--night); border-color: #fff; }
.btn.light:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn.outline { background: transparent; color: #fff; border-color: rgba(255,255,255,0.45); }
.btn.outline:hover { background: rgba(255,255,255,0.08); border-color: #fff; color: #fff; }
.noir-tick { display: flex; flex-wrap: wrap; gap: 10px 36px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.14); color: rgba(255,255,255,0.62); font-size: 0.78rem; letter-spacing: 0.02em; }
.noir-tick span::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--signal); margin-right: 10px; vertical-align: 1px; }
/* header sobre el hero */
.hd { transition: background .25s ease, border-color .25s ease; }
.hd.on-dark { background: rgba(5,11,24,0.35); border-bottom-color: rgba(255,255,255,0.1); }
.hd.on-dark .mark, .hd.on-dark .nav a { color: #fff; }
.hd.on-dark .nav a:hover, .hd.on-dark .nav a[aria-current] { background: rgba(255,255,255,0.1); }
.hd.on-dark .nav a.btn { background: #fff; color: var(--night); border-color: #fff; }
.hd.on-dark .nav a.btn:hover { background: var(--signal); border-color: var(--signal); color: #fff; }
.hd.on-dark .menu-btn { color: #fff; border-color: rgba(255,255,255,0.4); }
/* momento focal: las líneas suben desde su máscara, el resto aparece después */
@media (prefers-reduced-motion: no-preference) {
  .noir-h .ln i { transform: translateY(110%); animation: noirUp 1s cubic-bezier(.16,1,.3,1) forwards; }
  .noir-h .ln:nth-child(2) i { animation-delay: .09s; } .noir-h .ln:nth-child(3) i { animation-delay: .18s; }
  .noir-top, .noir-row, .noir-tick { opacity: 0; animation: noirIn .9s cubic-bezier(.16,1,.3,1) .45s forwards; }
  .noir-tick { animation-delay: .6s; }
  @keyframes noirUp { to { transform: none; } }
  @keyframes noirIn { to { opacity: 1; } }
}
@media (max-width: 900px) { .noir-row { grid-template-columns: 1fr; } }
@media (max-width: 680px) {
  .noir { margin-top: -60px; min-height: clamp(560px, 92svh, 820px); }
  .noir-in { padding-top: 92px; padding-bottom: 28px; gap: 28px; }
  .noir-h { font-size: clamp(2.5rem, 12.5vw, 3.4rem); max-width: 12ch; }
  .noir-top { font-size: 0.68rem; } .noir-tick { gap: 8px 20px; font-size: 0.72rem; }
  .hd.on-dark .nav { background: var(--night); }
}

/* ===== v3: productos con nombre, menos blanco ===== */
.mono.cap { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); display: block; margin-bottom: 14px; }
.sec-head { margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(1.8rem, 3vw, 2.6rem); max-width: 22ch; }
.dark-sec { background: var(--night-2); color: #fff; border-top: 0; }
.dark-sec.pad-top { padding-top: 120px; }
.dark-sec .mono.cap { color: rgba(255,255,255,0.55); }
.dark-sec h1, .dark-sec h2 { color: #fff; }
.products { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.prod { position: relative; display: flex; flex-direction: column; gap: 14px; padding: 32px 32px 28px; border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; text-decoration: none; color: #fff; background: rgba(255,255,255,0.02); min-height: 300px; overflow: hidden; transition: border-color .2s ease, background .2s ease, transform .2s ease; }
.prod:hover { border-color: var(--signal); background: rgba(79,141,255,0.06); transform: translateY(-2px); color: #fff; }
.plabel { font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--signal); }
.prod h3 { font-size: clamp(1.35rem, 2vw, 1.75rem); letter-spacing: -0.03em; max-width: 18ch; }
.prod ul { list-style: none; display: grid; gap: 6px; margin-top: 4px; }
.prod li { color: rgba(255,255,255,0.7); font-size: 0.92rem; padding-left: 14px; position: relative; }
.prod li::before { content: ""; position: absolute; left: 0; top: 0.62em; width: 5px; height: 5px; border-radius: 50%; background: var(--signal); }
.motif { position: absolute; right: 24px; bottom: 20px; width: 150px; height: auto; color: var(--signal); opacity: 0.55; fill: none; stroke: currentColor; stroke-width: 1.2; pointer-events: none; transition: opacity .2s ease; }
.prod:hover .motif { opacity: 0.9; }
.prod ul { max-width: calc(100% - 150px); }
/* h2 de services con etiqueta de producto */
.two > h2 .plabel.dk { display: block; color: var(--acc); margin-bottom: 10px; }
/* banda: título + pasos en columnas */
.band .mono.cap { color: var(--on-dark-2); }
.band .cols { margin-top: 40px; }
.band .cols h3 small { display: block; font-family: var(--mono); font-weight: 400; font-size: 0.74rem; letter-spacing: 0.04em; color: var(--on-dark-2); margin-top: 6px; text-transform: uppercase; }
/* CTA y footer oscuros */
.cta.dark { background: var(--night); color: #fff; border-top: 0; }
.cta.dark h2 { color: #fff; }
.cta.dark .lede, .cta.dark .contact { color: rgba(255,255,255,0.7); }
.cta.dark .contact b, .cta.dark .contact a { color: #fff; }
.cta.dark .btn.ghost { color: #fff; border-color: rgba(255,255,255,0.45); }
.cta.dark .btn.ghost:hover { background: rgba(255,255,255,0.1); border-color: #fff; }
.cta.dark .btn:not(.ghost):not(.light) { background: #fff; color: var(--night); border-color: #fff; }
.cta.dark .btn:not(.ghost):not(.light):hover { background: var(--signal); border-color: var(--signal); color: #fff; }
footer { background: var(--night); color: rgba(255,255,255,0.62); border-top: 1px solid rgba(255,255,255,0.1); }
footer .mark, footer b { color: #fff; }
footer a:hover { color: #fff; }
footer .legal { border-top-color: rgba(255,255,255,0.12); }
section.faq { padding: 56px 0; }
@media (max-width: 900px) { .products { grid-template-columns: 1fr; } .prod { min-height: 0; padding: 26px 22px 24px; } .motif { display: none; } .prod ul { max-width: 100%; } .dark-sec.pad-top { padding-top: 96px; } }

/* ===== Productos con glosa latina ===== */
.plabel small { font-size: 0.68rem; letter-spacing: 0.04em; text-transform: lowercase; color: rgba(255,255,255,0.45); margin-left: 10px; font-weight: 400; }
.plabel.dk small { color: var(--ink-2); }
.lede.dk { color: rgba(255,255,255,0.7); margin-top: 14px; }
/* ===== Organigramas ===== */
.tabs { display: flex; gap: 8px; margin-bottom: 22px; flex-wrap: wrap; }
.tabs [role=tab] { font: inherit; font-size: 0.9rem; font-weight: 500; color: rgba(255,255,255,0.7); background: transparent; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 9px 16px; cursor: pointer; transition: all .15s ease; }
.tabs [role=tab]:hover { color: #fff; border-color: rgba(255,255,255,0.5); }
.tabs [role=tab][aria-selected=true] { background: #fff; color: var(--night); border-color: #fff; }
.org { --cols: 3; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 28px; color: #fff; }
.o-row { display: grid; grid-template-columns: repeat(var(--cols), 1fr); gap: 12px; }
.o-leads { display: flex; justify-content: center; gap: 12px; }
.o-box { border: 1px solid rgba(255,255,255,0.28); border-radius: 10px; padding: 14px 16px; text-align: center; background: var(--night); }
.o-box.lead { min-width: 160px; font-weight: 600; }
.o-box b { display: block; font-weight: 600; font-size: 0.98rem; }
.o-box small { display: block; color: rgba(255,255,255,0.55); font-size: 0.78rem; margin-top: 4px; }
.o-line { height: 22px; margin: 0 auto; width: 1px; background: rgba(255,255,255,0.3); position: relative; }
.o-line::before { content: ""; position: absolute; left: calc(-50% * (var(--cols) - 1) / var(--cols) * 1); }
.o-funcs { position: relative; padding-top: 14px; }
.o-funcs::before { content: ""; position: absolute; top: 0; left: calc(100% / var(--cols) / 2); right: calc(100% / var(--cols) / 2); height: 1px; background: rgba(255,255,255,0.3); }
.o-funcs .o-box { position: relative; }
.o-funcs .o-box::before { content: ""; position: absolute; top: -14px; left: 50%; width: 1px; height: 14px; background: rgba(255,255,255,0.3); }
.o-sys-row { margin-top: 12px; gap: 12px 12px; }
.o-sys { background: var(--acc); border: 1px solid var(--signal); border-radius: 10px; padding: 12px 16px; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; box-shadow: 0 0 0 4px rgba(79,141,255,0.12); }
.o-sys .plabel { color: #BFD6FF; }
.o-sys b { font-weight: 500; font-size: 0.92rem; color: #fff; }
.o-note { margin-top: 18px; color: rgba(255,255,255,0.6); font-size: 0.9rem; max-width: 70ch; }
.dark-sec .two > h2 { color: #fff; }
@media (max-width: 680px) {
  .org { padding: 18px 14px; }
  .o-row, .o-sys-row { grid-template-columns: 1fr; }
  .o-funcs::before, .o-funcs .o-box::before { display: none; } .o-funcs { padding-top: 0; }
  .o-sys { grid-column: 1 / -1 !important; }
  .o-box.lead { min-width: 0; flex: 1; }
  .plabel small { display: none; }
}

main > .band:last-of-type { margin-bottom: 40px; }

/* ===== Fotos: tratamiento azul noche (duotono) ===== */
.offices { background: var(--night); color: #fff; border-top: 0; }
.offices h2 { color: #fff; }
.off-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.off { position: relative; display: block; border-radius: 16px; overflow: hidden; aspect-ratio: 16 / 9; text-decoration: none; color: #fff; isolation: isolate; }
.off img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.05) brightness(0.85); transition: transform .6s cubic-bezier(.16,1,.3,1), filter .4s ease; }
.off::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(11,42,91,0.35), rgba(5,11,24,0.85)); mix-blend-mode: multiply; z-index: 1; }
.off::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(79,141,255,0.18), rgba(5,11,24,0) 50%); z-index: 1; pointer-events: none; }
.off:hover img { transform: scale(1.03); filter: grayscale(0.6) contrast(1.05) brightness(0.9); }
.off-cap { position: absolute; left: 24px; right: 24px; bottom: 22px; z-index: 2; display: grid; gap: 4px; }
.off-cap b { font-size: 1.2rem; font-weight: 600; letter-spacing: -0.02em; }
.off-cap span { font-family: var(--mono); font-size: 0.74rem; color: rgba(255,255,255,0.7); }
/* historias con foto de fondo */
.story.photo { background-image: var(--img); background-size: cover; background-position: center; color: #fff; isolation: isolate; }
.story.photo::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(5,11,24,0.55), rgba(5,11,24,0.9)); z-index: 0; border-radius: inherit; }
.story.photo::after { content: ""; position: absolute; inset: 0; background: var(--acc); mix-blend-mode: color; opacity: 0.85; z-index: 0; border-radius: inherit; pointer-events: none; }
.story.photo > * { position: relative; z-index: 1; }
.story.photo h3, .story.photo p { color: #fff; }
.story.photo h3 em { color: var(--signal); }
.story.photo p { color: rgba(255,255,255,0.75); }
.story.photo .tag { color: rgba(255,255,255,0.75); border-color: rgba(255,255,255,0.35); }
.story.photo .pill { border-color: #fff; color: #fff; }
.story.photo:hover .pill { background: #fff; color: var(--night); }
/* about: fotos de sedes */
.place-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 12px; margin-bottom: 14px; filter: grayscale(1) brightness(0.9); }
@media (max-width: 680px) { .off-grid { grid-template-columns: 1fr; } .off { aspect-ratio: 4 / 3; } }

/* ===== Ontología + conversación ===== */
.onto-grid { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: stretch; }
.onto-wrap { background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 18px; overflow-x: auto; }
.onto { width: 100%; min-width: 560px; height: auto; display: block; }
.onto text { font-family: var(--sans); font-size: 14px; font-weight: 500; fill: #fff; text-anchor: middle; }
.onto text.s { font-family: var(--mono); font-size: 10.5px; font-weight: 400; fill: rgba(255,255,255,0.6); }
.onto .obj rect { fill: var(--night); stroke: rgba(255,255,255,0.35); stroke-width: 1; }
.onto .agent rect { fill: var(--acc); stroke: var(--signal); stroke-width: 1.2; }
.onto .agent rect.tab { fill: rgba(79,141,255,0.12); stroke: var(--signal); stroke-dasharray: 3 3; }
.onto .agent text.lbl { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; fill: #BFD6FF; }
.onto .agent text.s { fill: rgba(255,255,255,0.7); }
.chat { background: var(--night); border: 1px solid rgba(255,255,255,0.12); border-radius: 16px; padding: 18px; display: flex; flex-direction: column; gap: 10px; color: #fff; }
.chat-hd { font-family: var(--mono); font-size: 0.74rem; letter-spacing: 0.04em; text-transform: uppercase; color: rgba(255,255,255,0.55); padding-bottom: 10px; border-bottom: 1px solid rgba(255,255,255,0.1); display: flex; align-items: center; gap: 8px; }
.chat-hd .dot { width: 8px; height: 8px; border-radius: 50%; background: #3DDC84; box-shadow: 0 0 0 3px rgba(61,220,132,0.18); }
.msg { max-width: 92%; padding: 10px 14px; border-radius: 14px; font-size: 0.92rem; line-height: 1.5; }
.msg b { display: block; font-family: var(--mono); font-weight: 500; font-size: 0.68rem; letter-spacing: 0.06em; text-transform: uppercase; margin-bottom: 4px; opacity: 0.7; }
.msg.h { align-self: flex-end; background: rgba(255,255,255,0.1); border-bottom-right-radius: 4px; }
.msg.a { align-self: flex-start; background: var(--acc); border: 1px solid rgba(79,141,255,0.5); border-bottom-left-radius: 4px; }
.msg.a b { color: #BFD6FF; opacity: 1; }
.msg.sys { align-self: stretch; max-width: 100%; background: transparent; border: 1px dashed rgba(79,141,255,0.45); color: rgba(255,255,255,0.78); font-family: var(--mono); font-size: 0.78rem; padding: 8px 12px; }
.msg.sys b { color: var(--signal); opacity: 1; }
.msg .cf { display: inline-block; margin-top: 6px; padding: 4px 10px; border: 1px solid #fff; border-radius: 999px; font-size: 0.8rem; font-weight: 600; }
.chat-ft { margin-top: auto; padding-top: 10px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.7rem; color: rgba(255,255,255,0.5); }
@media (prefers-reduced-motion: no-preference) {
  .chat .msg { opacity: 0; transform: translateY(8px); animation: msgIn .5s cubic-bezier(.16,1,.3,1) forwards; }
  .chat .msg:nth-child(2) { animation-delay: .1s } .chat .msg:nth-child(3) { animation-delay: .5s } .chat .msg:nth-child(4) { animation-delay: .9s } .chat .msg:nth-child(5) { animation-delay: 1.4s } .chat .msg:nth-child(6) { animation-delay: 2.2s } .chat .msg:nth-child(7) { animation-delay: 2.6s }
  @keyframes msgIn { to { opacity: 1; transform: none; } }
}
@media (max-width: 900px) { .onto-grid { grid-template-columns: 1fr; } }

/* ===== Logo ===== */
.mark { display: inline-flex; align-items: center; gap: 12px; }
.mark .logo { width: 26px; height: 26px; display: block; margin-right: 2px; transition: filter .25s ease; }
.hd.on-dark .mark .logo, footer .mark .logo { filter: invert(1); }
