/* Ralph Klos Projects & Consultancy - rkpc.be */

:root {
  --navy: #0B3D91;
  --blue: #1E88E5;
  --blue-light: #64B5F6;
  --dark: #0F1B2D;
  --dark-2: #16263D;
  --bg: #F4F6F9;
  --text: #1F2A37;
  --muted: #5F6B7A;
  --border: #E3E8EF;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(11, 61, 145, .08);
  --max: 1160px;
  --font: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; font-family: var(--font); color: var(--text); background: #fff; line-height: 1.65; font-size: 17px; }
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.2; color: var(--navy); margin: 0 0 .6em; }
h1 { font-size: clamp(2.1rem, 4.5vw, 3.4rem); font-weight: 700; }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }

.container { max-width: var(--max); margin: 0 auto; padding: 0 24px; }
.section { padding: 96px 0; }
.section--alt { background: var(--bg); }
.section--dark { background: var(--dark); color: #D5DEEA; }
.section--dark h2, .section--dark h3 { color: #fff; }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 720px; }
.section-head { max-width: 760px; margin-bottom: 48px; }

/* Draft placeholders - remove class once content is final */
.todo { background: #FFF3C4; color: #7A5B00 !important; padding: 0 4px; border-radius: 4px; }

/* Buttons */
.btn { display: inline-block; padding: 14px 26px; border-radius: 999px; font-weight: 600; transition: transform .15s, box-shadow .15s, background .15s; }
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn--primary { background: var(--blue); color: #fff; box-shadow: 0 6px 18px rgba(30, 136, 229, .35); }
.btn--primary:hover { background: #1976D2; }
.btn--ghost { border: 2px solid rgba(255, 255, 255, .6); color: #fff; }
.btn--ghost:hover { background: rgba(255, 255, 255, .1); }

/* Language notice (French pages) */
.lang-notice { background: #E8F1FC; color: var(--navy); font-size: .92rem; text-align: center; padding: 10px 24px; border-bottom: 1px solid #CFE0F7; }

/* Header */
.header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .96); backdrop-filter: blur(8px); border-bottom: 1px solid transparent; transition: border-color .2s, box-shadow .2s; }
.header.is-scrolled { border-color: var(--border); box-shadow: 0 2px 12px rgba(0, 0, 0, .05); }
.header__inner { display: flex; align-items: center; justify-content: space-between; height: 76px; }
.header__logo img { height: 46px; width: auto; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { color: var(--text); font-weight: 500; font-size: .98rem; white-space: nowrap; }
.nav a:hover { color: var(--blue); text-decoration: none; }
.nav .btn { color: #fff; padding: 10px 20px; }
.nav .btn:hover { color: #fff; background: var(--navy); transform: none; }   /* stay readable, no jump in the header */
.lang { display: flex; gap: 4px; margin-left: 8px; padding-left: 20px; border-left: 1px solid var(--border); }
.lang a { font-size: .85rem; font-weight: 600; color: var(--muted); padding: 4px 8px; border-radius: 6px; }
.lang a[aria-current="true"] { color: var(--navy); background: var(--bg); }
.nav-toggle { display: none; background: none; border: 0; padding: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 24px; height: 2px; background: var(--navy); margin: 5px 0; transition: transform .2s, opacity .2s; }

/* Hero */
.hero { position: relative; color: #fff; padding: 140px 0 120px; background: var(--dark) url("../img/hero-earth.webp") center 30% / cover no-repeat; }
.hero::before { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, rgba(11, 30, 60, .94) 0%, rgba(11, 45, 110, .78) 55%, rgba(11, 61, 145, .35) 100%); }
.hero .container { position: relative; }
.hero h1 { color: #fff; max-width: 820px; }
.hero__sub { font-size: 1.25rem; color: #D5E3F5; max-width: 680px; margin-bottom: 36px; }
.hero__actions { display: flex; gap: 16px; flex-wrap: wrap; }
.hero__tagline { margin-top: 56px; display: flex; gap: 14px; align-items: center; color: var(--blue-light); font-weight: 600; letter-spacing: .12em; text-transform: uppercase; font-size: .85rem; flex-wrap: wrap; }
.hero__tagline span + span::before { content: "→"; margin-right: 14px; color: rgba(255, 255, 255, .45); }

/* Highlights strip */
.highlights { background: #fff; border-bottom: 1px solid var(--border); }
.highlights__grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; padding-top: 36px; padding-bottom: 36px; }
.highlight strong { display: block; color: var(--navy); font-size: 1.05rem; }
.highlight span { color: var(--muted); font-size: .95rem; }

/* Cards */
.grid { display: grid; gap: 24px; }
.grid--4 { grid-template-columns: repeat(4, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.card:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(11, 61, 145, .12); }
.card__icon { width: 54px; height: 54px; border-radius: 14px; background: linear-gradient(135deg, var(--blue), var(--navy)); display: grid; place-items: center; margin-bottom: 20px; }
.card__icon svg { width: 28px; height: 28px; }
.card p { color: var(--muted); font-size: .97rem; }
.card ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: .95rem; }
.card li { margin-bottom: 4px; }

/* Services: each card opens a detail popup; AI as a wide banner below the cards */
.card--service { display: flex; flex-direction: column; cursor: pointer; }
.ai-banner { display: grid; grid-template-columns: auto .85fr 1.7fr auto; gap: 16px 32px; align-items: center; margin-top: 24px; padding: 26px 30px; border-radius: var(--radius); border: 1px solid #CFE0F7; background: linear-gradient(90deg, #EEF5FD 0%, #F7FAFE 100%); box-shadow: var(--shadow); }
.ai-banner .card__icon { margin: 0; }
.ai-banner h3 { margin: 0 0 4px; }
.ai-banner p { margin: 0; color: var(--muted); font-size: .97rem; }
.ai-banner ul { margin: 0; padding-left: 18px; columns: 2; column-gap: 28px; color: var(--muted); font-size: .95rem; }
.ai-banner li { margin-bottom: 4px; break-inside: avoid; }
.ai-banner__more { font-weight: 600; font-size: .95rem; white-space: nowrap; }
.card__more { align-self: flex-start; margin-top: auto; padding: 18px 0 0; background: none; border: 0; font: inherit; font-weight: 600; font-size: .95rem; color: var(--blue); cursor: pointer; }
.card__more:hover { text-decoration: underline; }

/* Two ways of working */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 56px; }
.mode { position: relative; border-radius: var(--radius); overflow: hidden; color: #fff; min-height: 340px; display: flex; align-items: flex-end; background: var(--dark) center / cover no-repeat; }
.mode::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(15, 27, 45, .25) 0%, rgba(15, 27, 45, .92) 70%); }
.mode__body { position: relative; padding: 32px; }
.mode h3 { color: #fff; font-size: 1.45rem; }
.mode p { color: #D5DEEA; margin: 0; }
.mode--advice { background-image: url("../img/architecture-blocks.webp"); }
.mode--realize { background-image: url("../img/server-racks.webp"); }
.mode--advice { cursor: pointer; }
a.mode { text-decoration: none; }
.mode::before { transition: opacity .2s; }
.mode:hover::before { opacity: .88; }
.mode__more { display: inline-block; margin-top: 16px; padding: 0; background: none; border: 0; font: inherit; font-weight: 600; font-size: .95rem; color: var(--blue-light); cursor: pointer; }
.mode:hover .mode__more { color: #fff; }

/* Project cases: cards with the workflow diagram, details in the (wide) service popup */
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.case { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; cursor: pointer; transition: transform .2s, box-shadow .2s; }
.case:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(11, 61, 145, .14); }
.case__media { aspect-ratio: 16 / 9; padding: 14px; background: #F7FAFE; border-bottom: 1px solid var(--border); }
.case__media img { width: 100%; height: 100%; object-fit: contain; }
.case__body { display: flex; flex-direction: column; flex: 1; padding: 26px 30px 28px; }
.case__body p { color: var(--muted); font-size: .97rem; }
.case__tag { display: block; font-size: .78rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--blue); margin-bottom: 8px; }
.case__tech { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.case__tech li { font-size: .8rem; color: var(--navy); background: #EEF5FD; border-radius: 999px; padding: 3px 10px; }
.case__cost { margin: 12px 0 0; font-size: .9rem; color: var(--muted); }
.case__cost strong { color: var(--navy); font-weight: 600; }
.modal--service.modal--wide { width: min(1040px, calc(100% - 24px)); }
.service__body > .case__tag { margin: -10px 0 4px; }
.case__diagram { margin: 18px 0 8px; }
.case__diagram img { width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px; }
.case__diagram figcaption { margin-top: 6px; font-size: .88rem; text-align: right; }
.case__diagram a { cursor: zoom-in; }
.case__diagram video { display: block; width: 100%; height: auto; border: 1px solid var(--border); border-radius: 10px;
                       background: #0B1F3A; }

/* Diagram viewer (created by main.js) */
.viewer { width: calc(100% - 24px); height: calc(100% - 24px); max-width: none; max-height: none; padding: 0; border: 0; border-radius: var(--radius); overflow: hidden; background: #fff; box-shadow: 0 24px 64px rgba(0, 0, 0, .35); }
.viewer[open] { display: flex; flex-direction: column; }
.viewer::backdrop { background: rgba(15, 27, 45, .8); backdrop-filter: blur(3px); }
.viewer:focus { outline: none; }
.viewer__bar { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--border); background: var(--bg); }
.viewer__bar button { min-width: 40px; height: 40px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: var(--navy); font: inherit; font-size: 1.25rem; font-weight: 600; line-height: 1; cursor: pointer; }
.viewer__bar button:hover { border-color: var(--blue); }
.viewer__bar .viewer__pct, .viewer__bar .viewer__fit { font-size: .92rem; }
.viewer__pct { min-width: 64px; }
.viewer__hint { flex: 1; color: var(--muted); font-size: .85rem; padding-left: 8px; }
.viewer__bar .viewer__close { width: 40px; padding: 0; border-radius: 50%; font-size: 1.5rem; }
.viewer__stage { position: relative; flex: 1; overflow: hidden; cursor: grab; touch-action: none; background: #F7FAFE; }
.viewer__stage.is-dragging { cursor: grabbing; }
.viewer__title { flex: 1; min-width: 0; padding-left: 6px; color: var(--navy); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer__tab { padding: 0 8px; font-size: .92rem; font-weight: 600; }
.viewer__bar .viewer__download { padding: 9px 20px; font-size: .92rem; box-shadow: none; }
.viewer__pdf { flex: 1; width: 100%; border: 0; background: #525659; }
@media (max-width: 700px) { .viewer__tab { display: none; } }
.viewer__stage img { position: absolute; left: 0; top: 0; max-width: none; transform-origin: 0 0; user-select: none; -webkit-user-drag: none; }
@media (max-width: 600px) { .viewer__hint { display: none; } .viewer__bar { justify-content: space-between; } }

.cases--compact { grid-template-columns: repeat(3, 1fr); }
.case--compact .case__media { aspect-ratio: 16 / 8; padding: 10px; }
.case--compact .case__body { padding: 22px 24px 24px; }
.case--compact h3 { font-size: 1.1rem; }
.case--compact .case__body p { font-size: .95rem; }
.case--compact .card__more { padding-top: 6px; }
.cases__more { text-align: center; margin: 36px 0 0; }
.cases__more .btn { background: #fff; box-shadow: var(--shadow); }
.cases__more .btn:hover { background: var(--navy); color: #fff; text-decoration: none; }

/* Projects page */
.page-hero { color: #fff; padding: 120px 0 64px; background: linear-gradient(100deg, #0B1E3C 0%, #0B2D6E 60%, var(--navy) 100%); }
.page-hero h1 { color: #fff; }
.page-hero .hero__sub { margin-bottom: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 32px; }
.filters button { font: inherit; font-size: .95rem; font-weight: 600; color: var(--navy); background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 8px 18px; cursor: pointer; }
.filters button:hover { border-color: var(--blue); }
.filters button[aria-pressed="true"] { color: #fff; background: var(--navy); border-color: var(--navy); }
.cta-band { display: flex; align-items: center; justify-content: space-between; gap: 24px 48px; flex-wrap: wrap; }
.cta-band h2 { margin-bottom: 8px; }
.cta-band .lead { margin: 0; }

/* Packages */
.package { display: flex; flex-direction: column; }
.package__tag { align-self: flex-start; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--blue); background: #E8F1FC; padding: 4px 10px; border-radius: 999px; margin-bottom: 16px; }
.package__meta { margin-top: auto; padding-top: 18px; border-top: 1px solid var(--border); font-size: .9rem; color: var(--muted); }

/* AI */
.section--ai { background: linear-gradient(180deg, #EEF5FD 0%, #F7FAFE 100%); }
.ai__grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.checklist { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 18px; }
.checklist li { display: flex; gap: 14px; }
.checklist svg { flex: 0 0 24px; width: 24px; height: 24px; margin-top: 2px; }
.checklist strong { display: block; color: var(--navy); margin-bottom: 2px; }
.checklist span { color: var(--muted); font-size: .97rem; }
.ai-flow { position: sticky; top: 100px; background: var(--dark); color: #D5DEEA; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.ai-flow__title { font-size: .8rem; font-weight: 600; letter-spacing: .18em; text-transform: uppercase; color: #64B5F6; margin-bottom: 18px; }
.ai-flow__node { border: 1px solid rgba(100, 181, 246, .35); border-radius: 10px; padding: 14px 16px; background: rgba(255, 255, 255, .03); }
.ai-flow__node strong { display: block; color: #fff; }
.ai-flow__node small { color: #B0BEC5; }
.ai-flow__node--account { border: 2px dashed #64B5F6; padding: 18px; }
.ai-flow__node--account .ai-flow__node { margin-top: 12px; }
.ai-flow__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.ai-flow__chips span { font-size: .8rem; background: rgba(100, 181, 246, .15); color: #BBDEFB; padding: 3px 10px; border-radius: 999px; }
.ai-flow__arrow { text-align: center; color: #64B5F6; font-size: 1.2rem; line-height: 1; margin: 10px 0; }
.ai-flow__note { margin-top: 18px; font-size: .88rem; color: #B0BEC5; display: flex; gap: 10px; }
.ai-flow__note svg { flex: 0 0 20px; width: 20px; height: 20px; }
.ai__services { margin-top: 56px; }
.ai__services .card h3 { margin-top: 0; }

/* Approach */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; counter-reset: step; }
.step { position: relative; padding-top: 64px; }
.step::before { counter-increment: step; content: counter(step, decimal-leading-zero); position: absolute; top: 0; left: 0; font-size: 2.6rem; font-weight: 700; color: var(--blue-light); opacity: .9; line-height: 1; }
.step::after { content: ""; position: absolute; top: 20px; left: 72px; right: -12px; height: 2px; background: linear-gradient(90deg, var(--blue-light), transparent); opacity: .5; }
.step:last-child::after { display: none; }
.step p { font-size: .97rem; }

/* Expertise */
.split { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
.split__media { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.split__media img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4 / 3; }
.tags { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0 28px; }
.tag { background: #fff; border: 1px solid var(--border); border-radius: 999px; padding: 7px 16px; font-size: .92rem; font-weight: 600; color: var(--navy); }
.tag--muted { color: var(--muted); font-weight: 500; }
.tag-group h3 { font-size: 1rem; color: var(--text); margin-bottom: 6px; }

/* Why */
.why { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 28px 48px; }
.why li { display: flex; gap: 16px; }
.why svg { flex: 0 0 28px; width: 28px; height: 28px; margin-top: 2px; }
.why strong { display: block; color: #fff; font-size: 1.08rem; margin-bottom: 4px; }
.why span { font-size: .97rem; }

/* About */
.about p { color: var(--muted); }
.about .signature { color: var(--navy); font-weight: 600; margin-top: 24px; }

/* Contact */
.contact { position: relative; color: #fff; background: var(--dark) url("../img/fibre-blue.webp") center / cover no-repeat; }
.contact::before { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(15, 27, 45, .95) 0%, rgba(15, 27, 45, .8) 60%, rgba(15, 27, 45, .55) 100%); }
.contact .container { position: relative; }
.contact h2 { color: #fff; }
.contact .lead { color: #C9D6E8; }
.contact__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
.contact__card { background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .14); border-radius: var(--radius); padding: 32px; backdrop-filter: blur(6px); }
.contact__row { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.contact__row:last-of-type { border-bottom: 0; }
.contact__row svg { width: 22px; height: 22px; flex: 0 0 22px; }
.contact__row a { color: #fff; font-weight: 600; }
.contact__row small { display: block; color: #9FB3CC; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; }
/* WhatsApp: on a computer a QR code to continue on the phone; on a phone only the link */
.contact__row--wa > div { flex: 1; }
.contact__hint { display: block; color: #C9D6E8; font-size: .88rem; margin-top: 2px; }
.contact__qr { flex: none; width: 104px; height: 104px; padding: 6px; background: #fff; border-radius: 10px; }
@media (hover: none) and (pointer: coarse), (max-width: 560px) { .contact__hint, .contact__qr { display: none; } }
.contact__note { margin-top: 20px; font-size: .92rem; color: #C9D6E8; display: flex; gap: 10px; }
.contact__note svg { flex: 0 0 20px; width: 20px; height: 20px; margin-top: 2px; }

/* Footer */
.footer { background: #0A1422; color: #8797AD; font-size: .9rem; padding: 48px 0 32px; }
.footer__top { display: flex; justify-content: space-between; align-items: center; gap: 24px; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer__top img { height: 44px; width: auto; }
.footer__legal { display: flex; gap: 28px; flex-wrap: wrap; }
.footer__bottom { padding-top: 24px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: .82rem; }
.footer a { color: #B7C4D6; }

/* Responsive */
@media (max-width: 1020px) {
  .grid--4, .steps { grid-template-columns: repeat(2, 1fr); }
  .cases--compact { grid-template-columns: repeat(2, 1fr); }
  .ai-banner { grid-template-columns: auto 1fr; }
  .ai-banner ul, .ai-banner__more { grid-column: 1 / -1; }
  .step::after { display: none; }
  .highlights__grid { grid-template-columns: repeat(2, 1fr); }
  .split, .contact__grid, .ai__grid { grid-template-columns: 1fr; gap: 40px; }
  .nav { gap: 18px; }
  .lang { padding-left: 12px; }
}
/* the header only holds Contact, language and login: the hamburger menu is needed on phones only */
@media (max-width: 600px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: 76px; left: 0; right: 0; flex-direction: column; align-items: flex-start; gap: 0; background: #fff; border-bottom: 1px solid var(--border); padding: 8px 24px 24px; display: none; }
  .nav.is-open { display: flex; }
  .nav > a { padding: 12px 0; width: 100%; border-bottom: 1px solid var(--bg); }
  .nav .btn { margin-top: 16px; text-align: center; }
  .lang { margin: 16px 0 0; padding: 0; border: 0; }
}
@media (max-width: 860px) {
  .grid--3, .grid--2, .modes, .cases, .why { grid-template-columns: 1fr; }
  .section { padding: 72px 0; }
  .hero { padding: 100px 0 90px; }
}
@media (max-width: 560px) {
  .grid--4, .steps, .highlights__grid { grid-template-columns: 1fr; }
  .ai-banner { padding: 26px 24px; }
  .ai-banner ul { columns: 1; }
  .header__logo img { height: 38px; }
}

/* ---------- contact popup ---------- */
.package__cta { margin-top: 14px; font-weight: 600; font-size: .95rem; }
body.has-modal { overflow: hidden; }
.modal { border: 0; padding: 0; background: transparent; width: min(640px, calc(100% - 24px)); max-height: calc(100% - 24px); overflow: visible; }
.modal::backdrop { background: rgba(15, 27, 45, .72); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in .18s ease-out; }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.modal__box { position: relative; background: #fff; border-radius: var(--radius); box-shadow: 0 24px 64px rgba(0, 0, 0, .3); padding: 36px 36px 30px; max-height: calc(100vh - 24px); overflow-y: auto; }
.modal__box h2 { font-size: 1.6rem; color: var(--navy); margin: 0 0 8px; }
.modal__intro { color: var(--muted); margin: 0 0 22px; font-size: .97rem; }
.modal__close { position: absolute; top: 14px; right: 16px; width: 38px; height: 38px; border: 0; border-radius: 50%; background: var(--bg); color: var(--navy); font-size: 1.6rem; line-height: 1; cursor: pointer; }
.modal__close:hover { background: var(--border); }
.form__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form__field { display: block; margin-bottom: 14px; }
.form__field > span { display: block; font-size: .85rem; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.form__req { color: var(--blue); }
.form__field input, .form__field select, .form__field textarea { width: 100%; font: inherit; font-size: .97rem; color: var(--text); background: #fff; border: 1px solid #CBD5E1; border-radius: 10px; padding: 11px 13px; transition: border-color .15s, box-shadow .15s; }
.form__field textarea { resize: vertical; min-height: 120px; }
.form__field input:focus, .form__field select:focus, .form__field textarea:focus { outline: 0; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(30, 136, 229, .18); }
.was-validated :invalid { border-color: #C62828; }
.form__hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form__consent { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; color: var(--muted); margin: 4px 0 20px; }
.form__consent input { margin-top: 3px; width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--blue); }
.was-validated .form__consent input:invalid { outline: 2px solid #C62828; outline-offset: 2px; }
.form__actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.form__actions .btn { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.form__actions .btn:disabled { opacity: .6; cursor: wait; transform: none; }
.form__status { margin: 0; font-size: .9rem; color: var(--muted); flex: 1 1 200px; }
.form__status.is-error { color: #C62828; }
.modal__done { text-align: center; padding: 20px 0 8px; }
.modal__done p { color: var(--muted); max-width: 440px; margin: 0 auto 24px; }
.modal__done .btn { border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.modal__check { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--navy)); display: grid; place-items: center; margin: 0 auto 18px; }
.modal__check svg { width: 32px; height: 32px; }
@media (max-width: 600px) { .modal__box { padding: 28px 20px 22px; } .form__grid { grid-template-columns: 1fr; } }

/* Portal login link in the header */
.nav a.nav__login { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 10px; padding: 9px 16px; }
.nav a.nav__login::before { content: ""; width: 14px; height: 14px; background: currentColor; -webkit-mask: url("../img/icon-lock.svg") center / contain no-repeat; mask: url("../img/icon-lock.svg") center / contain no-repeat; }
.nav a.nav__login:hover { border-color: var(--blue); }
/* Desktop: sign-in pinned to the right edge of the screen (the header is the positioned box); the nav keeps room for it */
@media (min-width: 861px) {
  .nav a.nav__login { position: absolute; right: 24px; top: 50%; transform: translateY(-50%); }
  .nav:has(.nav__login:not([hidden])) { margin-right: clamp(0px, calc(170px - (100vw - var(--max)) / 2), 170px); }
}

[hidden] { display: none !important; }

/* Popup focus: no frame around the box or the close icon when opened by tap/click; ring only for keyboard users */
.modal:focus, .modal__box:focus { outline: none; }
.modal__close { -webkit-tap-highlight-color: transparent; }
.modal__close:focus { outline: none; }
.modal__close:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }

/* Service detail popup */
.modal--service { width: min(780px, calc(100% - 24px)); }
.service__head { display: flex; align-items: center; gap: 16px; margin: 0 44px 18px 0; }
.service__head .card__icon { margin: 0; flex: 0 0 54px; }
.service__head h2 { margin: 0; }
.detail__lead { font-size: 1.05rem; }
.detail__cols { display: grid; grid-template-columns: 1.5fr 1fr; gap: 8px 32px; }
.service__body h3 { font-size: 1rem; color: var(--navy); margin: 16px 0 8px; }
.service__body ul { margin: 0; padding-left: 20px; color: var(--muted); font-size: .96rem; }
.service__body li { margin-bottom: 6px; }
.detail__fit { margin: 20px 0 0; background: var(--bg); border-radius: 10px; padding: 14px 16px; color: var(--muted); font-size: .95rem; }
.detail__fit strong { color: var(--navy); }
.detail__fit + .detail__fit { margin-top: 8px; }
.service__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.btn--light { background: var(--bg); color: var(--navy); border: 0; font: inherit; font-weight: 600; cursor: pointer; }
.btn--light:hover { background: var(--border); }
@media (max-width: 600px) { .detail__cols { grid-template-columns: 1fr; } .service__head .card__icon { display: none; } }

/* Privacy statement (tools/build_privacy.py) */
.legal { max-width: 800px; }
.legal h2 { font-size: clamp(1.35rem, 2.2vw, 1.6rem); margin: 44px 0 14px; }
.legal h3 { font-size: 1.08rem; margin: 26px 0 8px; color: var(--navy); }
.legal p, .legal li { line-height: 1.7; }
.legal p { margin: 0 0 12px; }
.legal ul { padding-left: 22px; margin: 0 0 12px; }
.legal li { margin-bottom: 8px; }
.legal code { font-size: .9em; background: var(--bg); padding: 1px 6px; border-radius: 6px; }
.legal__updated { color: var(--muted); font-size: .92rem; }
.legal__card { background: var(--bg); border-radius: 12px; padding: 18px 22px; }

/* Terms and conditions (tools/build_terms.py) */
.legal__num { display: inline-block; min-width: 2.4em; font-weight: 600; color: var(--navy); font-variant-numeric: tabular-nums; }

/* Tools (tools/build_tools.py): icons on the home page, a card per tool on the tools page, the toolkit page */
.tool-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 24px; }
.tool-tile { display: flex; gap: 18px; align-items: flex-start; color: inherit; }
.tool-tile:hover { text-decoration: none; }
.tool-tile .card__icon { flex: none; margin: 0; }
.tool-tile h3 { margin-bottom: 4px; }
.tool-tile p { margin: 0; }
.tools { display: grid; gap: 28px; }
.tool { display: grid; grid-template-columns: auto 1fr; gap: 28px; scroll-margin-top: 96px; }
.tool:hover { transform: none; }
.tool h2 { font-size: 1.6rem; margin-bottom: 10px; }
.tool__icon .card__icon { width: 76px; height: 76px; border-radius: 18px; margin: 0; transition: transform .15s; }
.tool__icon .card__icon svg { width: 40px; height: 40px; }
.tool__icon:hover .card__icon { transform: scale(1.05); }
.tool__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.tool__facts .package__tag { margin: 0; }
.tool__privacy { display: flex; gap: 10px; align-items: flex-start; margin: 18px 0 0; padding: 12px 16px; background: #E8F1FC;
                 border-radius: 10px; color: var(--navy); font-size: .93rem; }
.tool__privacy svg { flex: none; width: 18px; height: 18px; margin-top: 3px; }
.tool__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.tools__note { color: var(--muted); font-size: .95rem; margin: 28px 0 0; max-width: 760px; }
.tool__note { margin: 14px 0 0; color: var(--muted); font-size: .93rem; font-style: italic; }
.tool__list { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px 40px; margin: 0; padding-left: 20px; max-width: 980px; }
.tool__list li::marker { color: var(--blue); }
.grid .card .package__tag { margin-bottom: 12px; }
@media (max-width: 760px) { .tool__list { grid-template-columns: 1fr; } }
/* Screenshot next to the text on wide screens, below it on narrow ones */
.tool--shot { grid-template-columns: auto minmax(0, 1fr) minmax(0, 460px); align-items: start; }
.tool__shot { display: block; border: 1px solid var(--border); border-radius: 10px; overflow: hidden; box-shadow: var(--shadow);
              transition: transform .2s, box-shadow .2s; }
.tool__shot:hover { transform: translateY(-2px); box-shadow: 0 12px 32px rgba(11, 61, 145, .14); }
.tool__shot img { display: block; width: 100%; height: auto; }
/* CloudReady in development, with the demo video */
.tools__soon { margin-top: 64px; }
.tools__soon > .eyebrow { display: block; margin-bottom: 14px; }
.tool--soon { background: linear-gradient(135deg, #fff 40%, #E8F1FC); border: 1px dashed #A9C8EE; }
.tool__pilot { margin: 18px 0 0; font-weight: 600; color: var(--navy); }
@media (max-width: 1060px) { .tool--shot { grid-template-columns: auto minmax(0, 1fr); } .tool__shot { grid-column: 2; max-width: 640px; } }
@media (max-width: 600px) { .tool, .tool--shot { grid-template-columns: 1fr; gap: 16px; } .tool__shot { grid-column: auto; } }

/* Printing (and the PDFs of the terms): the text only, dark on white */
@media print {
  @page { size: A4; margin: 18mm 18mm 20mm; }
  .header, .footer, dialog, .skip-link, .legal__extra { display: none !important; }
  body { font-size: 10.5pt; color: #000; background: #fff; }
  .page-hero { background: none; color: #000; padding: 0 0 10pt; border-bottom: 2px solid var(--navy); }
  .page-hero::before { content: "Ralph Klos Projects & Consultancy \00B7  rkpc.be"; display: block; margin-bottom: 8pt;
                       font-size: 9pt; font-weight: 600; letter-spacing: .04em; color: #5F6B7A; }
  .page-hero h1 { color: var(--navy); font-size: 20pt; margin: 0 0 4pt; }
  .page-hero .eyebrow { display: none; }
  .page-hero .hero__sub { color: #333; font-size: 10.5pt; }
  .section { padding: 12pt 0 0; }
  .container { max-width: none; padding: 0; }
  .legal { max-width: none; }
  .legal h2 { font-size: 12.5pt; margin: 16pt 0 6pt; break-after: avoid; }
  .legal p, .legal li { line-height: 1.5; orphans: 3; widows: 3; }
  .legal p { margin: 0 0 6pt; }
  .legal a { color: inherit; text-decoration: none; }
  .todo { background: none; color: inherit !important; }
}

/* ---------- home: explore tiles + main sections in popups ---------- */
.explore { padding: 72px 0; }
.explore .section-head { margin-bottom: 32px; }
.explore__grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.explore-tile { display: flex; flex-direction: column; color: inherit; padding: 26px 24px; }
.explore-tile:hover { text-decoration: none; }
.explore-tile .card__icon { margin-bottom: 16px; }
.explore-tile h3 { margin-bottom: 6px; }
.explore-tile p { flex: 1; margin: 0 0 14px; font-size: .95rem; }
.explore-tile__more { color: var(--blue); font-weight: 600; font-size: .95rem; }
/* phone: compact menu rows instead of tall cards, so the page stays short */
@media (max-width: 600px) {
  .explore { padding: 48px 0; }
  .explore .section-head { margin-bottom: 20px; }
  .explore__grid { grid-template-columns: 1fr; gap: 10px; }
  .explore-tile { display: grid; grid-template-columns: 44px 1fr auto; column-gap: 14px; align-items: center; padding: 14px 16px; }
  .explore-tile .card__icon { grid-row: span 2; width: 44px; height: 44px; border-radius: 12px; margin: 0; }
  .explore-tile .card__icon svg { width: 22px; height: 22px; }
  .explore-tile h3 { margin: 0; font-size: 1.05rem; }
  .explore-tile p { margin: 0; font-size: .9rem; line-height: 1.45; }
  .explore-tile__more { grid-column: 3; grid-row: 1 / span 2; font-size: 0; }
  .explore-tile__more span { font-size: 1.3rem; }
}

/* Sections marked data-panel open in a popup (main.js); without JavaScript they stay on the page as before */
.js-panels main > [data-panel] { display: none; }
.modal--panel { width: min(1180px, calc(100% - 24px)); }
.modal--panel .modal__box { padding: 0; overflow: hidden; display: flex; flex-direction: column; max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px); }
.panel__scroll { position: relative; flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; }
.modal--panel .section { padding: 64px 0 56px; }
.modal--panel .modal__box h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); margin: 0 0 .6em; }
.modal--panel .section--dark h2 { color: #fff; }
.modal--panel .modal__close { z-index: 3; box-shadow: 0 2px 10px rgba(0, 0, 0, .15); }
.panel__actions { flex: none; display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; padding: 14px 24px; border-top: 1px solid var(--border); background: #fff; }
.panel__actions .btn { padding: 11px 22px; }
.panel__actions .btn { white-space: nowrap; }
/* tablet and phone: when photo and text are stacked, keep the photo from filling the whole screen */
@media (max-width: 1020px) { .split__media img { aspect-ratio: 16 / 9; max-height: 340px; } }
/* phone: popup uses the full screen, buttons stay on one line */
@media (max-width: 600px) {
  .modal--panel { width: 100%; max-width: 100%; height: 100%; max-height: 100%; margin: 0; }
  .modal--panel .modal__box { height: 100%; max-height: 100%; border-radius: 0; }
  .modal--panel .modal__close { top: max(10px, env(safe-area-inset-top)); right: 10px; }
  .modal--panel .section { padding: 44px 0 32px; }
  .modal--panel .container { padding: 0 20px; }
  .panel__actions { padding: 10px 16px max(10px, env(safe-area-inset-bottom)); gap: 10px; }
  .panel__actions .btn { padding: 11px 16px; font-size: .95rem; }
  .panel__actions .btn--primary { flex: 1; text-align: center; }
}

/* Working together: four ways to work with me */
.work ul { margin: 0 0 4px; }
.work .card__icon { margin-bottom: 16px; }
.work .card__more { margin-top: 0; padding-top: 12px; }
.work .package__cta { display: inline-block; }

/* Availability badge (hero and the projects card); edit or remove the text in the HTML when booked */
.avail { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 18px; padding: 6px 14px 6px 12px; border-radius: 999px; font-size: .88rem; font-weight: 600; color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25); }
.avail::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: #34D399; box-shadow: 0 0 0 4px rgba(52, 211, 153, .25); }
.hero .avail { display: flex; width: fit-content; }
.avail--light { color: #0F6E4C; background: #E7F8F0; border-color: #BDEBD6; margin-bottom: 12px; align-self: flex-start; }
@media (max-width: 400px) { .hero .avail { font-size: .8rem; padding: 5px 12px 5px 10px; } }

/* Topic pages (security review, costs, interim) and the topic links in the footer */
.topic h2 { font-size: clamp(1.35rem, 2.2vw, 1.6rem); margin: 40px 0 14px; }
.topic h2:first-child { margin-top: 0; }
.topic ol { padding-left: 22px; margin: 0 0 12px; }
.topic ol li { margin-bottom: 8px; line-height: 1.7; }
.topic__cta { margin: 48px 0 28px; padding: 32px; border-radius: var(--radius); background: linear-gradient(135deg, #EEF5FD, #F7FAFE); border: 1px solid #CFE0F7; }
.topic__cta h2 { margin: 0 0 8px; }
.topic__cta p { color: var(--muted); }
.topic__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.topic__actions .btn--ghost { color: var(--navy); border-color: var(--navy); }
.topic__actions .btn--ghost:hover { background: var(--navy); color: #fff; }
.topic__related { color: var(--muted); font-size: .95rem; }
.page-hero .avail { display: flex; width: fit-content; }
.footer__topics { display: flex; flex-wrap: wrap; gap: 8px 28px; padding: 20px 0; border-bottom: 1px solid rgba(255, 255, 255, .08); }
.footer__topics a { color: #B7C4D6; font-weight: 600; }
@media (max-width: 600px) { .topic__cta { padding: 24px 20px; } .topic__actions { flex-direction: column; } .topic__actions .btn { text-align: center; } }
.eyebrow--light { color: var(--blue-light); }

/* Free tools: banner under the homepage tiles, link in the Tools card */
.explore-banner { display: flex; align-items: center; gap: 22px; margin-top: 20px; color: inherit; padding: 24px 28px; background: linear-gradient(90deg, #EEF5FD 0%, #F7FAFE 100%); border-color: #CFE0F7; }
.explore-banner:hover { text-decoration: none; }
.explore-banner .card__icon { flex: none; margin: 0; }
.explore-banner > div { flex: 1; }
.explore-banner h3 { margin: 0 0 4px; }
.explore-banner p { margin: 0; font-size: .95rem; }
.explore-banner .explore-tile__more { flex: none; white-space: nowrap; }
.work__try { margin: 12px 0 0; font-weight: 600; font-size: .95rem; }
.footer__tools { color: #fff !important; }
@media (max-width: 600px) {
  .explore-banner { display: grid; grid-template-columns: 44px 1fr auto; column-gap: 14px; padding: 16px; }
  .explore-banner .card__icon { width: 44px; height: 44px; border-radius: 12px; }
  .explore-banner .card__icon svg { width: 22px; height: 22px; }
  .explore-banner h3 { font-size: 1.05rem; }
  .explore-banner p { font-size: .9rem; line-height: 1.45; }
  .explore-banner .explore-tile__more { font-size: 0; }
  .explore-banner .explore-tile__more span { font-size: 1.3rem; }
}
