/* Salas Partners — portfolio
   Palette: navy + blue, matching the CV. */

:root {
  --navy-950: #0B1528;
  --navy-900: #0F1C33;
  --navy-800: #16263F;
  --navy-700: #1D3155;
  --navy-line: rgba(255, 255, 255, 0.09);
  --blue: #3B6DB6;
  --blue-deep: #2B5595;
  --blue-soft: #8FB4EE;
  --blue-tint: #EEF3FB;
  --paper: #F5F7FB;
  --white: #FFFFFF;
  --ink: #13203A;
  --ink-2: #4B5872;
  --ink-3: #667289; /* darkened for WCAG AA: 4.85:1 on white, 4.52:1 on paper */
  --line: #E2E7F0;
  --green: #34C48B;
  --green-deep: #1C7A52;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 28, 51, 0.05), 0 8px 24px rgba(15, 28, 51, 0.07);
  --header-h: 64px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; letter-spacing: -0.015em; }
p { margin: 0; }
ul, ol { margin: 0; }
button { font: inherit; }
[hidden] { display: none !important; }
section[id], article[id], footer[id] { scroll-margin-top: var(--header-h); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
.site-header :focus-visible, .hero :focus-visible,
.site-footer :focus-visible, .page-hero :focus-visible, .offer :focus-visible { outline-color: var(--blue-soft); }

.container { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: #fff; color: var(--ink); padding: 8px 14px; border-radius: 8px; text-decoration: none; font-weight: 600; }
.skip-link:focus { top: 12px; }
.i { width: 18px; height: 18px; flex: none; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto; z-index: 50; height: var(--header-h);
  background: rgba(11, 21, 40, 0.96);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--navy-line);
  color: #fff;
}
.site-header .container { height: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; font-weight: 600; font-size: 0.82rem; letter-spacing: 0.14em; text-transform: uppercase; white-space: nowrap; }
.brand img { width: 34px; height: 34px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.16); }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-nav { display: flex; align-items: center; gap: 18px; font-size: 0.875rem; }
.header-nav a { color: rgba(255, 255, 255, 0.72); text-decoration: none; white-space: nowrap; padding-block: 7px; transition: color 0.2s; }
.header-nav a:hover { color: #fff; }
@media (max-width: 900px) { .header-nav a:not(.keep-mobile) { display: none; } }
@media (max-width: 600px) { .header-nav { gap: 10px; } }
.lang-toggle { display: flex; align-items: center; border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 3px; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; }
.lang-toggle a { padding: 4px 11px; border-radius: 999px; text-decoration: none; color: rgba(255, 255, 255, 0.6); transition: color 0.2s, background 0.2s; }
.lang-toggle a:hover { color: #fff; }
.lang-toggle a[aria-current="page"] { background: #fff; color: var(--navy-900); }
.lang-sep { width: 1px; height: 12px; background: rgba(255, 255, 255, 0.2); margin: 0 2px; }
@media (max-width: 520px) {
  .brand span { display: none; }
  }

/* ---------- Buttons & links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 600; font-size: 0.95rem; line-height: 1.2;
  padding: 14px 22px; border-radius: 10px; border: 1px solid transparent;
  text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background 0.2s, color 0.2s, transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.btn-lg { padding: 17px 28px; font-size: 1.02rem; }
.btn-sm { padding: 10px 16px; font-size: 0.875rem; }
.btn-primary { background: #fff; color: var(--navy-900); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28); }
.btn-blue { background: var(--blue); color: #fff; }
.btn-blue:hover { background: var(--blue-deep); transform: translateY(-1px); }
.btn-ghost { border-color: rgba(255, 255, 255, 0.24); color: #fff; background: transparent; }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.07); }
.btn-outline { border-color: var(--line); color: var(--ink); background: #fff; }
.btn-outline:hover { border-color: #C6D0E0; }
.arrow { transition: transform 0.2s; }
.btn:hover .arrow, .link-arrow:hover .arrow { transform: translateX(3px); }
.link-arrow { display: inline-flex; align-items: center; min-height: 24px; gap: 6px; font-weight: 600; font-size: 0.93rem; color: var(--blue); text-decoration: none; }
.link-arrow:hover { color: var(--blue-deep); text-decoration: underline; text-underline-offset: 3px; }
.link-muted { color: var(--ink-2); }

/* ---------- Shared section bits ---------- */
.section { padding: 104px 0; }
.section-paper { background: var(--paper); }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 0.74rem; font-weight: 600; letter-spacing: 0.13em; text-transform: uppercase; color: var(--blue); }
.hero .eyebrow, .site-footer .eyebrow, .page-hero .eyebrow, .offer .eyebrow { color: var(--blue-soft); }
.section-head { max-width: 740px; margin-bottom: 48px; }
.section-head h2 { margin-top: 14px; font-size: clamp(1.65rem, 1.2rem + 1.6vw, 2.4rem); font-weight: 700; }
.section-head p { margin-top: 14px; color: var(--ink-2); font-size: 1.08rem; }
/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff; background: var(--navy-950);
  padding: calc(var(--header-h) + 64px) 0 80px;
  min-height: min(76vh, 760px); display: flex; align-items: center;
}
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    radial-gradient(55% 60% at 85% 0%, rgba(59, 109, 182, 0.32), transparent 70%),
    radial-gradient(40% 50% at 0% 100%, rgba(59, 109, 182, 0.14), transparent 70%);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; opacity: 0.5;
  background-image: linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  -webkit-mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent 75%);
  mask-image: radial-gradient(70% 70% at 70% 30%, #000, transparent 75%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-name { margin-bottom: 18px; font-size: 0.86rem; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: var(--blue-soft); }
.hero h1 { max-width: 940px; font-size: clamp(2.05rem, 1.15rem + 3.4vw, 3.6rem); font-weight: 700; line-height: 1.1; letter-spacing: -0.03em; }
.hero h1 em { font-style: normal; color: var(--blue-soft); }
.hero-sub { margin-top: 28px; max-width: 640px; font-size: clamp(1.06rem, 1rem + 0.35vw, 1.25rem); color: rgba(255, 255, 255, 0.72); }
.hero-actions { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 14px; }

/* offer: button with the plain address beneath, for visitors without a mail app */
.offer-cta { display: grid; gap: 10px; justify-items: start; }
.offer-alt { margin: 0; font-size: 0.85rem; color: rgba(255, 255, 255, 0.72); }
.offer-alt a { color: #fff; }

/* ---------- Project cards (Home) ---------- */
.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 860px) { .cards { grid-template-columns: minmax(0, 1fr); max-width: 640px; } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; gap: 14px; box-shadow: var(--shadow); transition: transform 0.25s, box-shadow 0.25s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(15, 28, 51, 0.05), 0 16px 36px rgba(15, 28, 51, 0.1); }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.card-num { font-size: 0.8rem; font-weight: 600; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.badge { display: inline-flex; align-items: center; gap: 7px; font-size: 0.72rem; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--blue-tint); color: var(--blue-deep); letter-spacing: 0.02em; }
.card h3 { font-size: 1.2rem; font-weight: 700; }
.card-quote { font-size: 0.97rem; color: var(--ink); font-style: italic; }
.card-what { font-size: 0.95rem; color: var(--ink-2); }
.card-stack { margin-top: auto; padding-top: 14px; border-top: 1px dashed var(--line); font-family: var(--mono); font-size: 0.76rem; color: var(--ink-2); }
.card-links { display: flex; flex-wrap: wrap; gap: 8px 20px; }

/* ---------- About ---------- */
.about { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 64px; align-items: start; }
.about-photo { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 22px; box-shadow: var(--shadow); background: var(--paper); }
.about-name { margin-top: 14px; font-size: 1.15rem; font-weight: 600; letter-spacing: 0; }
.about-name span { font-weight: 400; color: var(--ink-2); }
.about-quote { margin-top: 18px; font-size: clamp(1.35rem, 1.05rem + 1vw, 1.85rem); font-weight: 600; line-height: 1.35; letter-spacing: -0.015em; color: var(--ink); }
/* Dated work history — what a recruiter looks for first */
.timeline { list-style: none; padding: 0; margin-top: 28px; display: grid; gap: 16px; max-width: 700px; }
.timeline li { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 4px 20px; color: var(--ink-2); font-size: 0.97rem; }
.timeline strong { color: var(--ink); display: block; }
.timeline-date { grid-row: span 2; font-size: 0.82rem; font-weight: 600; letter-spacing: 0.02em; color: var(--blue); padding-top: 2px; }
@media (max-width: 700px) {
  .timeline li { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .timeline-date { grid-row: auto; }
}
.facts { list-style: none; padding: 0; margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px; }
.fact { display: inline-flex; align-items: center; gap: 9px; padding: 9px 15px; border-radius: 999px; background: var(--paper); border: 1px solid var(--line); font-size: 0.92rem; color: var(--ink); }
.fact .i { color: var(--blue); width: 17px; height: 17px; }
.about-tech { margin-top: 24px; padding: 4px 0 4px 18px; border-left: 3px solid var(--blue); color: var(--ink-2); max-width: 680px; }
.about-tech strong { color: var(--ink); }
.about-links { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 10px 26px; }
@media (max-width: 800px) {
  .about { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .about-photo { width: 150px; }
}

/* ---------- Services + offer ---------- */
.builds { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.build { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: grid; grid-template-columns: 44px 1fr; gap: 16px; }
.build-icon { width: 44px; height: 44px; border-radius: 12px; background: var(--blue-tint); color: var(--blue); display: grid; place-items: center; }
.build h3 { font-size: 1.06rem; font-weight: 700; }
.build p { margin-top: 5px; font-size: 0.95rem; color: var(--ink-2); }
.offer { position: relative; overflow: hidden; margin-top: 44px; background: var(--navy-800); color: #fff; border-radius: 20px; padding: 44px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 36px; align-items: center; }
.offer::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(50% 90% at 100% 0%, rgba(59, 109, 182, 0.35), transparent 70%); }
.offer > * { position: relative; }
.offer h2, .offer h3 { margin-top: 12px; font-size: clamp(1.3rem, 1rem + 1.05vw, 1.8rem); font-weight: 700; line-height: 1.3; }
.offer p { margin-top: 12px; color: rgba(255, 255, 255, 0.7); max-width: 640px; }
@media (max-width: 800px) {
  .builds { grid-template-columns: minmax(0, 1fr); }
  .offer { grid-template-columns: minmax(0, 1fr); padding: 30px 26px; }
  .offer .btn { justify-self: start; white-space: normal; }
}

/* ---------- Footer / contact ---------- */
.site-footer { background: var(--navy-950); color: #fff; padding: 104px 0 32px; }
.contact { max-width: 760px; }
.contact h2 { margin-top: 14px; font-size: clamp(1.9rem, 1.3rem + 2.2vw, 2.9rem); font-weight: 700; }
.contact > p { margin-top: 14px; font-size: 1.1rem; color: rgba(255, 255, 255, 0.7); }
.contact-actions { margin-top: 34px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.contact-secondary { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 12px 28px; }
.contact-secondary a { display: inline-flex; align-items: center; gap: 9px; color: rgba(255, 255, 255, 0.8); text-decoration: none; font-weight: 500; }
.contact-secondary a:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.contact-secondary .i { color: var(--blue-soft); }
.footer-bottom { margin-top: 88px; padding-top: 24px; border-top: 1px solid var(--navy-line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 10px 24px; font-size: 0.85rem; color: rgba(255, 255, 255, 0.5); }
.footer-bottom a { color: rgba(255, 255, 255, 0.72); text-decoration: none; }
.footer-bottom a:hover { color: #fff; text-decoration: underline; }
@media (max-width: 520px) { .contact-actions .btn-primary { white-space: normal; word-break: break-all; } }

/* ---------- Projects page ---------- */
.page-hero { position: relative; overflow: hidden; background: var(--navy-950); color: #fff; padding: calc(var(--header-h) + 72px) 0 72px; }
.page-hero::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(50% 80% at 90% 0%, rgba(59, 109, 182, 0.3), transparent 70%); }
.page-hero .container { position: relative; }
.page-hero h1 { margin-top: 14px; font-size: clamp(2.1rem, 1.4rem + 2.6vw, 3.2rem); font-weight: 700; letter-spacing: -0.03em; }
.page-hero p { margin-top: 18px; max-width: 660px; font-size: 1.12rem; color: rgba(255, 255, 255, 0.72); }
.page-hero .hero-name { margin: 0 0 18px; max-width: none; font-size: 0.86rem; color: var(--blue-soft); }
.toc { list-style: none; padding: 0; margin-top: 38px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 880px; }
.toc a { display: flex; gap: 14px; align-items: baseline; height: 100%; padding: 16px 18px; border: 1px solid rgba(255, 255, 255, 0.14); border-radius: 12px; text-decoration: none; background: rgba(255, 255, 255, 0.03); transition: background 0.2s, border-color 0.2s; }
.toc a:hover { background: rgba(255, 255, 255, 0.07); border-color: rgba(255, 255, 255, 0.28); }
.toc b { color: var(--blue-soft); font-size: 0.82rem; font-variant-numeric: tabular-nums; }
.toc span { font-weight: 600; font-size: 0.97rem; line-height: 1.35; }
@media (max-width: 800px) { .toc { grid-template-columns: minmax(0, 1fr); } }

.case { padding: 96px 0; }
.case:nth-of-type(even) { background: var(--paper); }
.case-head { max-width: 860px; margin-bottom: 40px; }
.case-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.case-meta .card-num { font-size: 0.82rem; }
.case-head h2 { margin-top: 16px; font-size: clamp(1.75rem, 1.2rem + 1.9vw, 2.6rem); font-weight: 700; letter-spacing: -0.025em; }
.case-lede { margin-top: 14px; font-size: 1.18rem; color: var(--ink-2); max-width: 760px; }
.tags { list-style: none; padding: 0; margin-top: 20px; display: flex; flex-wrap: wrap; gap: 6px; }
.tags li { font-family: var(--mono); font-size: 0.76rem; padding: 4px 10px; border-radius: 6px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }

.case-block { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 36px; padding: 36px 0; border-top: 1px solid var(--line); }
.case-block > h3 { font-size: 0.76rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--blue); padding-top: 5px; line-height: 1.5; }
.case-block > h3 .n { display: block; color: var(--ink-3); font-weight: 600; margin-bottom: 2px; }
.case-body { min-width: 0; }
.prose { max-width: 740px; color: var(--ink-2); font-size: 1.02rem; }
.prose p + p { margin-top: 14px; }
.prose strong { color: var(--ink); }
.case-body > * + * { margin-top: 24px; }
@media (max-width: 820px) {
  .case-block { grid-template-columns: minmax(0, 1fr); gap: 14px; padding: 30px 0; }
  .case-block > h3 .n { display: inline; margin-right: 8px; }
}

.checklist { list-style: none; padding: 0; display: grid; gap: 14px; max-width: 780px; }
.checklist li { position: relative; padding-left: 30px; color: var(--ink-2); }
.checklist li::before { content: ""; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 6px; background: var(--blue-tint) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233B6DB6' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 12px no-repeat; }
.checklist strong { color: var(--ink); }
.checklist code { font-family: var(--mono); font-size: 0.85em; background: var(--blue-tint); color: var(--blue-deep); padding: 1px 6px; border-radius: 5px; }

/* Architecture flow (RAG agent) */
.flow { display: grid; grid-template-columns: minmax(0, 0.9fr) 44px minmax(0, 1.1fr) 44px minmax(0, 1.25fr); align-items: center; padding: 26px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.flow-node { border: 1px solid var(--line); border-radius: 12px; padding: 13px 15px; background: var(--paper); font-weight: 600; font-size: 0.93rem; line-height: 1.35; }
.flow-node small { display: block; margin-top: 3px; font-weight: 400; font-size: 0.8rem; color: var(--ink-3); }
.flow-core { background: var(--navy-800); color: #fff; border-color: var(--navy-800); }
.flow-core small { color: rgba(255, 255, 255, 0.65); }
.flow-tools { display: grid; gap: 10px; }
.flow-arrow { position: relative; height: 2px; margin: 0 8px; background: var(--blue); }
.flow-arrow::after { content: ""; position: absolute; right: -2px; top: -5px; border: 6px solid transparent; border-left: 8px solid var(--blue); border-right: 0; }
@media (max-width: 760px) {
  .flow { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .flow-arrow { width: 2px; height: 30px; margin: 8px auto; }
  .flow-arrow::after { right: auto; left: -5px; top: auto; bottom: -2px; border: 6px solid transparent; border-top: 8px solid var(--blue); border-bottom: 0; }
}

/* Validation cascade */
.steps { list-style: none; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; counter-reset: step; }
.steps li { counter-increment: step; display: inline-flex; align-items: center; gap: 9px; padding: 9px 14px 9px 9px; background: #fff; border: 1px solid var(--line); border-radius: 999px; font-size: 0.9rem; font-weight: 500; }
.steps li::before { content: counter(step); width: 24px; height: 24px; border-radius: 50%; background: var(--navy-800); color: #fff; font-size: 0.75rem; font-weight: 700; display: grid; place-items: center; }
.steps li + li { margin-left: 18px; position: relative; }
.steps li + li::after { content: "→"; position: absolute; left: -21px; color: var(--ink-3); }

/* Tables */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 0.93rem; min-width: 560px; }
.table-wrap th { text-align: left; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); padding: 12px 16px; background: var(--paper); border-bottom: 1px solid var(--line); white-space: nowrap; }
.table-wrap td { padding: 14px 16px; border-top: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.table-wrap tr:first-child td { border-top: 0; }
.table-wrap td:first-child { color: var(--ink); font-weight: 600; }
.pass { display: inline-flex; align-items: center; gap: 6px; color: var(--green-deep); font-weight: 600; white-space: nowrap; }
.num { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink); white-space: nowrap; }
@media (max-width: 600px) {
  .table-wrap table { min-width: 0; }
  .table-wrap thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table-wrap tr { display: block; padding: 14px 16px; border-top: 1px solid var(--line); }
  .table-wrap tr:first-child { border-top: 0; }
  .table-wrap td { display: block; padding: 2px 0; border: 0; }
  .table-wrap td + td { margin-top: 4px; }
  .table-wrap td:has(.num), .table-wrap td:has(.route), .table-wrap td:has(.pass) { display: inline-block; margin-right: 10px; }
}
.route { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 0.8rem; font-weight: 600; white-space: nowrap; }
.route-hot { background: #FDE8E6; color: #A1352A; }
.route-warm { background: #FDF3D8; color: #8A6212; }
.route-cold { background: #E6EEFA; color: var(--blue-deep); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; max-width: 880px; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px 20px; }
.stat b { display: block; font-size: 1.85rem; line-height: 1.1; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 6px; font-size: 0.84rem; color: var(--ink-3); line-height: 1.4; }
@media (max-width: 700px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Screenshots */
.shot { margin-inline: 0; margin-bottom: 0; }
.shots-2 .shot { margin-top: 0; }
.shot a { display: block; border-radius: 12px; }
.shot img { width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); background: #fff; }
.shot figcaption { margin-top: 10px; font-size: 0.86rem; color: var(--ink-3); }
.shots-2 { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 20px; align-items: start; }
@media (max-width: 800px) { .shots-2 { grid-template-columns: minmax(0, 1fr); } }

.case-note { max-width: 780px; padding: 12px 16px; border-left: 3px solid var(--line); background: #fff; border-radius: 0 8px 8px 0; font-size: 0.9rem; color: var(--ink-2); }
.case:nth-of-type(even) .case-note { background: var(--paper); border-left-color: #D5DCE8; }
.proof { padding: 20px 24px; border-radius: 12px; background: var(--navy-800); color: rgba(255, 255, 255, 0.82); max-width: 780px; }
.proof strong { color: #fff; }

/* Video (click-to-load, no YouTube cookies until played) */
.video { position: relative; aspect-ratio: 16 / 9; max-width: 860px; border-radius: 14px; overflow: hidden; background: var(--navy-950); box-shadow: var(--shadow); }
.video iframe, .video-btn { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.video-btn { padding: 0; cursor: pointer; background: var(--navy-950); }
.video-btn img { width: 100%; height: 100%; object-fit: cover; opacity: 0.78; transition: opacity 0.2s; }
.video-btn:hover img { opacity: 0.92; }
.video-play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%; background: #fff; color: var(--navy-900); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35); transition: transform 0.2s; }
.video-btn:hover .video-play { transform: scale(1.06); }
.video-play svg { width: 28px; height: 28px; margin-left: 4px; }

.case-cta { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }

/* ---------- 404 ---------- */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; background: var(--navy-950); color: #fff; padding: 24px; }
.notfound h1 { font-size: clamp(2rem, 1.5rem + 2vw, 3rem); }
.notfound p { margin-top: 12px; color: rgba(255, 255, 255, 0.7); }
.notfound .case-cta { justify-content: center; margin-top: 28px; }

/* ---------- Reveal on scroll (only once JS confirms it can reveal) ---------- */
.reveal-ready .reveal:not(.is-in) { opacity: 0; transform: translateY(18px); }
.reveal { transition: opacity 0.7s ease, transform 0.7s ease; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal-ready .reveal:not(.is-in) { opacity: 1; transform: none; }
}

/* ---------- Case-study page (projets/conduite-atlas) ---------- */
.back-link { display: inline-flex; align-items: center; gap: 8px; min-height: 24px; margin-bottom: 20px; font-size: 0.88rem; font-weight: 600; color: var(--blue-soft); text-decoration: none; }
.back-link:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.page-hero-case h1 { max-width: 900px; font-size: clamp(1.9rem, 1.25rem + 2.3vw, 2.8rem); line-height: 1.15; }
.page-hero-case h1 em { font-style: normal; color: var(--blue-soft); }
.page-hero-case p strong { color: #fff; }
.page-hero-case .hero-actions { margin-top: 32px; }
.builds-odd > .build:last-child:nth-child(odd) { grid-column: 1 / -1; }
.section-media { margin-top: 36px; }
.sub-title { margin: 48px 0 18px; font-size: 1.1rem; font-weight: 700; }
.offer-flush { margin-top: 0; }

/* Architecture with one more hop (visitor -> proxy -> agent -> tools) */
.flow-4 { grid-template-columns: minmax(0, 0.8fr) 40px minmax(0, 0.8fr) 40px minmax(0, 1fr) 40px minmax(0, 1.3fr); }
@media (max-width: 900px) {
  .flow-4 { grid-template-columns: minmax(0, 1fr); padding: 20px; }
  .flow-4 .flow-arrow { width: 2px; height: 30px; margin: 8px auto; }
  .flow-4 .flow-arrow::after { right: auto; left: -5px; top: auto; bottom: -2px; border: 6px solid transparent; border-top: 8px solid var(--blue); border-bottom: 0; }
}

/* Hard problems solved */
.solved { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 800px) { .solved { grid-template-columns: minmax(0, 1fr); } }
.solved-item { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.solved-item h3 { margin-top: 6px; font-size: 1.12rem; font-weight: 700; }
.solved-item dl { margin: 16px 0 0; display: grid; gap: 12px; }
.solved-item dt { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--blue); }
.solved-item dd { margin: 3px 0 0; font-size: 0.97rem; color: var(--ink-2); }

/* Tech stack, grouped */
.stack-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 26px 36px; max-width: 900px; }
@media (max-width: 700px) { .stack-groups { grid-template-columns: minmax(0, 1fr); } }
.stack-groups h3 { font-size: 0.74rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--blue); }
.stack-groups .tags { margin-top: 10px; }

/* Screenshot placeholder: replace the .shot-empty div with <a><img></a> once the capture exists */
.shot-empty { display: grid; place-content: center; gap: 6px; aspect-ratio: 16 / 7; padding: 24px; text-align: center; border: 2px dashed #C6D0E0; border-radius: 12px; background: #fff; }
.shot-empty.is-tall { aspect-ratio: 4 / 3; }
.shots-even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.flow-figure { margin: 0; }
#architecture .checklist code { white-space: nowrap; }
/* "Coming soon" buttons: an <a> with no href until its URL is set in assets/config.js */
.btn[data-pending] { cursor: default; pointer-events: none; }
.btn-soon { padding: 3px 8px; border-radius: 999px; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; background: var(--blue-tint); color: var(--blue-deep); }
.btn-ghost .btn-soon { background: rgba(255, 255, 255, 0.14); color: #fff; }
/* 44px tap target on touch screens; the negative/positive margins keep the original 24px + 20px layout */
@media (max-width: 800px) { .back-link { min-height: 44px; margin-top: -10px; margin-bottom: 10px; } }
/* On phones the hero buttons may wrap, so the "coming soon" pill never pushes them off-screen */
@media (max-width: 520px) { .page-hero-case .hero-actions .btn { max-width: 100%; white-space: normal; flex-wrap: wrap; row-gap: 6px; text-align: center; } }
@media (max-width: 800px) { .shots-even { grid-template-columns: minmax(0, 1fr); } }
.shot-empty span { font-size: 0.72rem; font-weight: 700; letter-spacing: 0.13em; text-transform: uppercase; color: var(--blue); }
.shot-empty b { font-size: 0.98rem; font-weight: 600; color: var(--ink-2); }

/* ---------- Demo page (/demo, /en/demo) ---------- */
.page-hero-demo { padding-bottom: 56px; }
.demo-section { padding-top: 56px; }
.demo-notice { display: flex; gap: 12px; align-items: flex-start; margin: 0 0 36px; padding: 16px 18px; border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 12px; background: var(--blue-tint); color: var(--ink); font-size: 0.98rem; }
.demo-notice .i { flex: none; width: 20px; height: 20px; margin-top: 2px; color: var(--blue-deep); }
.demo-layout { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); grid-template-areas: "prompts chat" "links chat"; gap: 24px 40px; align-items: start; }
.demo-prompts { grid-area: prompts; }
.demo-prompts h2 { font-size: 1.3rem; font-weight: 700; }
.demo-hint { margin-top: 6px; font-size: 0.92rem; color: var(--ink-2); }
.prompt-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 10px; }
.prompt-chip { display: block; width: 100%; min-height: 44px; padding: 12px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--ink); font: inherit; font-size: 0.95rem; font-weight: 500; line-height: 1.45; text-align: left; cursor: pointer; transition: border-color 0.2s, box-shadow 0.2s; }
.prompt-chip:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.prompt-chip small { display: block; margin-top: 2px; font-size: 0.82rem; font-weight: 400; color: var(--ink-3); }
.demo-chat { grid-area: chat; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.demo-noscript { margin: 0; padding: 24px; color: var(--ink-2); }
.demo-links { grid-area: links; display: grid; gap: 10px; justify-items: start; }
@media (max-width: 900px) {
  .demo-layout { grid-template-columns: minmax(0, 1fr); grid-template-areas: "prompts" "chat" "links"; }
}
@media (max-width: 600px) {
  .page-hero-demo { padding-top: calc(var(--header-h) + 36px); padding-bottom: 36px; }
  .demo-section { padding-top: 28px; }
  .demo-chat { margin-inline: -24px; border-radius: 0; border-inline: 0; }
}
/* n8n chat widget themed with the site palette; the variables are scoped to the embed only */
#n8n-chat {
  --chat--font-family: var(--font);
  --chat--color--primary: var(--blue);
  --chat--color--primary-shade-50: var(--blue-deep);
  --chat--color--primary--shade-100: var(--navy-700);
  --chat--color--secondary: var(--blue);
  --chat--color-secondary-shade-50: var(--blue-deep);
  --chat--color-dark: var(--navy-950);
  --chat--color-light: var(--paper);
  --chat--border-radius: 12px;
  --chat--header--background: var(--navy-950);
  --chat--header--color: #fff;
  --chat--header--padding: 16px 20px;
  --chat--heading--font-size: 1.05rem;
  --chat--subtitle--font-size: 0.85rem;
  --chat--message--font-size: 0.95rem;
  --chat--message--bot--background: #fff;
  --chat--message--bot--color: var(--ink);
  --chat--message--bot--border: 1px solid var(--line);
  --chat--message--user--background: var(--blue);
  --chat--message--user--color: #fff;
  --chat--input--font-size: 16px; /* 16px stops iOS zooming into the field */
  --chat--input--send--button--color: var(--blue);
  --chat--input--send--button--color-hover: var(--blue-deep);
  /* n8n resolves its derived colours once, on :root, so every one that shows must be set here too */
  --chat--body--background: var(--paper);
  --chat--input--send--button--background-hover: var(--blue-tint);
  --chat--button--background--primary: var(--blue);
  --chat--button--background--primary--hover: var(--blue-deep);
  --chat--message--actions--color: var(--blue);
  --chat--input--file--button--color: var(--blue);
  --chat--input--file--button--color-hover: var(--blue-deep);
  --chat--close--button--color-hover: var(--blue);
  --chat--toggle--background: var(--blue);
  --chat--toggle--hover--background: var(--blue-deep);
  --chat--footer--color: var(--ink-2);
}
.demo-status { margin: 0; padding: 28px 24px; color: var(--ink-2); font-size: 0.95rem; }
/* The widget removes the focus outline from its text box; show where the keyboard is */
#n8n-chat .chat-inputs:focus-within { box-shadow: inset 0 0 0 2px var(--blue); }
