:root {
  --bg: #f5f9ff;
  --paper: #f5f9ff;
  --paper-bright: #ffffff;
  --ink: #152440;
  --muted: #65728a;
  --soft: #edf4ff;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-strong: #ffffff;
  --line: rgba(21, 36, 64, 0.13);
  --line-modern: rgba(44, 87, 171, 0.16);
  --gold: #b7cbf4;
  --teal: #315fda;
  --mint: #dce8ff;
  --charcoal: #152440;
  --shadow: 0 22px 60px rgba(28, 63, 125, 0.10);
}

html { background: var(--bg); }
body.sc-site {
  color: var(--ink);
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 52%, #f0f6ff 100%);
}

/* Chaptered editorial: the header is part of the title page, never a fixed bar. */
.sc-site .site-header {
  position: relative !important;
  top: auto;
  min-height: 74px;
  background: rgba(248, 251, 255, 0.96);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  backdrop-filter: none;
}
.sc-site .site-header.is-scrolled { box-shadow: none; }
.sc-site .brand-mark {
  color: #fff;
  background: #315fda;
  border-color: #315fda;
  border-radius: 13px;
}
.sc-site .brand small { color: var(--muted); }
.sc-site .site-nav { color: var(--muted); }
.sc-site .site-nav a:hover,
.sc-site .mail-link:hover,
.sc-site .site-footer a:hover { color: #315fda; }
.sc-site .header-cta,
.sc-site .button-primary {
  color: #fff;
  background: #315fda;
  border-color: #315fda;
  box-shadow: 0 10px 28px rgba(49, 95, 218, 0.18);
}
.sc-site .header-cta:hover,
.sc-site .button-primary:hover {
  color: #fff;
  background: #244fbd;
  border-color: #244fbd;
}
.sc-site .button-secondary {
  color: #294a82;
  background: #fff;
  border-color: rgba(49, 95, 218, 0.22);
}
.sc-site .language-switch { background: #fff; border-color: var(--line); }
.sc-site .profile-photo {
  border-color: #fff;
  box-shadow: 0 0 0 1px rgba(49, 95, 218, 0.25), 0 7px 18px rgba(28, 63, 125, 0.12);
}
.sc-site .reading-progress {
  display: block;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 1000;
  width: 100%;
  height: 3px;
  pointer-events: none;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, #315fda 0%, #438cff 62%, #61d7f2 100%);
  box-shadow: 0 1px 9px rgba(49, 95, 218, 0.24);
}

/* The first page is a quiet title page; editorial photography begins in chapter one. */
.sc-site .hero,
.sc-site .hero-ai,
.sc-site .portfolio-hero {
  min-height: min(740px, calc(88svh - 74px));
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  overflow: visible;
  color: var(--ink);
  background: #f5f9ff;
  background-image: none !important;
}
.sc-site .hero::before { display: none; }
.sc-site .hero-content,
.sc-site .hero-ai .hero-content {
  width: 100%;
  max-width: 930px;
  padding: clamp(64px, 10vh, 112px) 0;
  grid-column: 1;
  grid-row: 1;
}
.sc-site .hero h1,
.sc-site .portfolio-hero h1 {
  max-width: 100%;
  color: #152440;
  font-size: clamp(3.5rem, 7vw, 6.2rem);
  line-height: 0.97;
  letter-spacing: -0.075em;
}
.sc-site .hero .eyebrow,
.sc-site .hero .hero-lead { color: #53627d; }
.sc-site .hero .eyebrow,
.sc-site .portfolio-hero .eyebrow,
.sc-site .eyebrow,
.sc-site .mini-label { color: #315fda; }
.sc-site .hero-lead { max-width: 660px; font-size: clamp(1.08rem, 1.7vw, 1.36rem); line-height: 1.6; }
.sc-site .hero .button-secondary { background: #fff; }
.sc-site .signal-row span {
  color: #40557b;
  background: #e9f1ff;
  border-color: rgba(49, 95, 218, 0.12);
}
.sc-site .hero-caption { color: #74819a; }
.sc-site .hero-caption span { color: #315fda; }
.sc-site .service-landing {
  grid-template-columns: minmax(0, 1fr);
  min-height: min(690px, calc(86svh - 74px));
  padding-top: clamp(64px, 9vh, 100px);
  padding-bottom: clamp(64px, 9vh, 100px);
  background: #f5f9ff;
}
.sc-site .service-landing-copy { max-width: 940px; }
.sc-site .service-landing-copy h1 { max-width: 14ch; font-size: clamp(3.1rem, 7vw, 6.4rem); line-height: 0.98; letter-spacing: -0.07em; }
.sc-site .service-landing-visual {
  width: min(calc(100% - 48px), 1060px);
  max-width: 1060px;
  margin: -12px auto 74px;
  padding: 0;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(49, 95, 218, 0.12);
  border-radius: 22px;
  background: #eaf1fc;
  box-shadow: 0 22px 58px rgba(28, 63, 125, 0.12);
}
.sc-site .service-landing-visual img { width: 100%; height: 100%; max-height: none; aspect-ratio: auto; object-fit: cover; }
.sc-site .service-detail > .service-landing-visual { grid-column: 1 / -1; width: min(100%, 1120px); margin: 0 auto 24px; }

.sc-site .section,
.sc-site .portfolio-hero { color: var(--ink); }
.sc-site .section { border-top-color: var(--line-modern); }
.sc-site .section:nth-of-type(even),
.sc-site .portfolio-preview { background: rgba(255, 255, 255, 0.68); }
.sc-site .section-heading h2,
.sc-site .section-copy h2 { color: #152440; }
.sc-site .section-note,
.sc-site .intro-text,
.sc-site .service-detail-copy,
.sc-site .portfolio-preview-copy { color: var(--muted); }

/* New photographic artwork is edge-to-edge, cropped from the original 16:9 frame. */
.sc-site figure.section-visual:not(.proof-visual),
.sc-site .svg-visual:not(.proof-visual),
.sc-site .dashboard-visual:not(.proof-visual) {
  width: min(100%, 820px);
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(49, 95, 218, 0.13);
  border-radius: 20px;
  background: #eaf1fc !important;
  box-shadow: 0 20px 52px rgba(28, 63, 125, 0.10);
  transform: none;
}
.sc-site figure.section-visual.section-visual-wide:not(.proof-visual),
.sc-site .dashboard-visual:not(.proof-visual) { width: min(100%, 1120px); }
.sc-site figure.section-visual:not(.proof-visual) img,
.sc-site .svg-visual:not(.proof-visual) img,
.sc-site .dashboard-visual:not(.proof-visual) img {
  width: 100%;
  height: 100%;
  max-height: none;
  aspect-ratio: auto;
  object-fit: cover;
  filter: none !important;
}
.sc-site .photo-visual { isolation: isolate; }
.sc-site .contact-visual { margin-top: 26px !important; }
.sc-site .intro-visual { width: min(100%, 640px) !important; }

/* The diagnosis interaction is a pale blue working surface; the 800+ proof stays dark. */
.sc-site main#top > .section.diagnosis {
  color: var(--ink);
  background: #eaf1ff !important;
  border-top: 1px solid var(--line-modern);
}
.sc-site .diagnosis .eyebrow,
.sc-site .diagnosis .section-note { color: #5a6881; }
.sc-site .diagnosis-option {
  color: #1e3156;
  background: rgba(255, 255, 255, 0.82);
  border-color: rgba(49, 95, 218, 0.14);
}
.sc-site .diagnosis-option:hover,
.sc-site .diagnosis-option.is-active {
  background: #fff;
  border-color: rgba(49, 95, 218, 0.48);
  box-shadow: 0 8px 24px rgba(49, 95, 218, 0.08);
}
.sc-site .diagnosis-option span { color: #315fda; }
.sc-site .diagnosis-option small { color: #68758d; }
.sc-site .diagnosis-result {
  color: #fff;
  background: linear-gradient(140deg, #315fda, #4e83e9);
}
.sc-site .diagnosis-result h3,
.sc-site .diagnosis-result p:not(.mini-label) { color: #fff; }
.sc-site .diagnosis-result .mini-label { color: #dbe7ff; }
.sc-site .diagnosis-result .button-primary { color: #fff; background: #152440; border-color: #152440; }

.sc-site .service-grid { border-color: rgba(49, 95, 218, 0.13); background: rgba(49, 95, 218, 0.12); box-shadow: none; }
.sc-site .service-card,
.sc-site .portfolio-card,
.sc-site .method-steps article,
.sc-site .service-detail-grid article {
  color: #213456;
  background: #fff;
  border-color: rgba(49, 95, 218, 0.13);
  box-shadow: 0 12px 36px rgba(28, 63, 125, 0.05);
}
.sc-site .service-card-featured,
.sc-site .service-card-featured:hover {
  color: #213456;
  background: #edf4ff;
  box-shadow: inset 0 4px 0 #315fda;
}
.sc-site .service-card-featured p,
.sc-site .service-card-featured:hover p { color: #65728a; }
.sc-site .service-card .card-index,
.sc-site .method-steps span,
.sc-site .portfolio-card span { color: #315fda; }
.sc-site .method-steps article:hover { background: #fff; }
.sc-site .proof { background: #11203a; color: #f4f7ff; }
.sc-site .proof .eyebrow { color: #7be6ec; }
.sc-site .proof-panel p,
.sc-site .proof-stats span { color: rgba(244, 247, 255, 0.72); }
.sc-site .proof-panel,
.sc-site .proof-stats div { background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.17); }
.sc-site .proof-stats strong { color: #7be6ec; }
.sc-site .proof-visual {
  width: min(100%, 620px);
  min-height: 250px;
  background: radial-gradient(circle at 50% 42%, rgba(92,225,230,.18), transparent 30%), linear-gradient(145deg, #071c2c, #0c3149 58%, #071521);
  border-color: rgba(92,225,230,.24);
  box-shadow: 0 28px 70px rgba(2,22,34,.16);
}
.sc-site .contact-section { background: #edf4ff; }
.sc-site .contact-form { background: #fff; border-color: var(--line-modern); box-shadow: 0 18px 50px rgba(28, 63, 125, 0.07); }
.sc-site .contact-form input,
.sc-site .contact-form textarea,
.sc-site .contact-form select { background: #fbfdff; border-color: var(--line-modern); }
.sc-site .site-footer { background: #11203a; color: rgba(244,247,255,0.74); }
.sc-site .site-footer .footer-brand { color: #fff; }

/* The bespoke margin folio is a process trace, not a generic page percentage. */
.sc-process-trace {
  --trace-progress: 0;
  position: fixed;
  top: 50%;
  right: clamp(12px, 2.1vw, 34px);
  z-index: 12;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #52627f;
  pointer-events: none;
  transform: translateY(-50%);
}
.sc-process-trace__label {
  max-width: 90px;
  position: relative;
  top: -24px;
  color: #315fda;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
}
.sc-process-trace__rail {
  position: relative;
  display: block;
  width: 2px;
  height: 148px;
  background: rgba(49, 95, 218, 0.17);
}
.sc-process-trace__rail > i {
  position: absolute;
  inset: 0;
  display: block;
  background: #315fda;
  transform: scaleY(var(--trace-progress));
  transform-origin: top;
}
.sc-process-trace__nodes {
  position: absolute;
  top: 34px;
  display: flex;
  height: 148px;
  flex-direction: column;
  justify-content: space-between;
}
.sc-process-trace__nodes i {
  width: 8px;
  height: 8px;
  border: 1px solid #b5c8ed;
  border-radius: 50%;
  background: #f5f9ff;
  transition: background 180ms ease, border-color 180ms ease, scale 180ms ease;
}
.sc-process-trace__nodes i.is-passed { border-color: #315fda; background: #315fda; scale: 1.16; }

@media (max-width: 980px) {
  .sc-process-trace { display: none; }
}
@media (max-width: 700px) {
  .sc-site .site-header { min-height: 64px; }
  .sc-site .hero,
  .sc-site .hero-ai,
  .sc-site .portfolio-hero,
  .sc-site .service-landing { min-height: auto; }
  .sc-site .hero-content,
  .sc-site .hero-ai .hero-content { padding: 62px 0 76px; }
  .sc-site .hero h1,
  .sc-site .portfolio-hero h1 { font-size: clamp(2.5rem, 12vw, 4.4rem); }
  .sc-site .service-landing-copy h1 { font-size: clamp(2.9rem, 13vw, 4.8rem); }
  .sc-site .service-landing-visual { width: calc(100% - 36px); margin: -8px auto 48px; border-radius: 16px; }
  .sc-site figure.section-visual:not(.proof-visual),
  .sc-site .svg-visual:not(.proof-visual),
  .sc-site .dashboard-visual:not(.proof-visual) { border-radius: 15px; }
  .sc-site .section { padding: 58px 18px; }
  .sc-site .proof-visual { padding: 24px; }
}

@media (prefers-reduced-motion: reduce) {
  .sc-process-trace__nodes i { transition: none; }
}

/* The home hero pairs the editorial workspace with a clear, practical AI flow. */
.sc-site .hero-ai {
  grid-template-columns: minmax(0, 1fr) minmax(0, 0.98fr);
  gap: clamp(28px, 4.2vw, 64px);
  background:
    radial-gradient(ellipse at 79% 44%, rgba(49, 95, 218, 0.11), transparent 34%),
    linear-gradient(125deg, #f7faff 0%, #f4f8ff 55%, #edf4ff 100%);
}
.sc-site .hero-ai .hero-content {
  max-width: 610px;
  padding-block: clamp(42px, 6vh, 72px);
}
.sc-site .hero-ai h1 {
  max-width: 13ch;
  font-size: clamp(3rem, 5.2vw, 4.6rem);
  line-height: 0.98;
}
html[lang="pl"] .sc-site .hero-ai h1 {
  max-width: 17ch;
  font-size: clamp(2.8rem, 4.5vw, 3.95rem);
}
.sc-site .hero-visual-card {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  width: min(100%, 540px);
  aspect-ratio: 1.18;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(49, 95, 218, 0.18);
  border-radius: 24px;
  background: #eaf2ff;
  box-shadow: 0 24px 58px rgba(30, 67, 132, 0.15);
  isolation: isolate;
}
.sc-site .hero-visual-card::before {
  position: absolute;
  z-index: 1;
  inset: 0;
  content: "";
  pointer-events: none;
  background: linear-gradient(180deg, rgba(250, 253, 255, 0.02) 8%, rgba(226, 237, 255, 0.08) 43%, rgba(18, 47, 91, 0.2) 100%);
}
.sc-site .hero-visual-card .hero-visual-art {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-height: none;
  object-fit: cover;
  object-position: 54% center;
  border-radius: inherit;
  filter: saturate(0.82) contrast(1.02);
}
.hero-workflow-panel {
  position: absolute;
  z-index: 2;
  right: clamp(14px, 2vw, 22px);
  bottom: clamp(14px, 2vw, 22px);
  left: clamp(14px, 2vw, 22px);
  padding: clamp(14px, 2vw, 20px);
  border: 1px solid rgba(255, 255, 255, 0.84);
  border-radius: 16px;
  color: #52627d;
  background: rgba(250, 252, 255, 0.93);
  box-shadow: 0 15px 38px rgba(21, 48, 91, 0.17);
  backdrop-filter: blur(14px);
}
.hero-workflow-head,
.hero-workflow-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.hero-workflow-head {
  color: #53627d;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.035em;
}
.hero-workflow-title { display: inline-flex; align-items: center; gap: 7px; color: #1e3154; }
.hero-workflow-title i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #39a5c9;
  box-shadow: 0 0 0 3px rgba(57, 165, 201, 0.12);
}
.hero-workflow-note { color: #6b7890; text-align: right; }
.hero-workflow {
  display: flex;
  align-items: center;
  gap: clamp(5px, 1vw, 10px);
  margin: 16px 0 12px;
}
.hero-workflow-node {
  display: grid;
  flex: 1 1 0;
  min-width: 0;
  min-height: 42px;
  place-items: center;
  padding: 6px 4px;
  border: 1px solid rgba(49, 95, 218, 0.13);
  border-radius: 9px;
  color: #435574;
  background: rgba(241, 246, 255, 0.88);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: 0.08em;
}
.hero-workflow-node--ai {
  color: #fff;
  border-color: #315fda;
  background: linear-gradient(145deg, #4779e8, #315fda);
  box-shadow: 0 7px 16px rgba(49, 95, 218, 0.2);
}
.hero-workflow-link {
  position: relative;
  flex: 0 0 clamp(10px, 1.35vw, 18px);
  height: 1px;
  background: rgba(49, 95, 218, 0.35);
}
.hero-workflow-link::after {
  position: absolute;
  top: 50%;
  left: 0;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  content: "";
  background: #3b9ed7;
  transform: translate(-50%, -50%);
  animation: hero-workflow-pulse 2.6s ease-in-out infinite;
}
.hero-workflow-link:nth-of-type(2)::after { animation-delay: 0.6s; }
.hero-workflow-link:nth-of-type(3)::after { animation-delay: 1.2s; }
.hero-workflow-foot {
  color: #758198;
  font-size: 9px;
  font-weight: 650;
}
.hero-workflow-foot span:last-child { color: #315fda; }
@keyframes hero-workflow-pulse {
  0%, 100% { left: 0; opacity: 0.45; }
  55% { left: 100%; opacity: 1; }
}

@media (max-width: 980px) {
  .sc-site .hero-ai {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  .sc-site .hero-ai .hero-content { grid-column: 1; grid-row: 1; max-width: 760px; padding-block: 54px 18px; }
  .sc-site .hero-visual-card { grid-column: 1; grid-row: 2; justify-self: center; width: min(100%, 620px); aspect-ratio: 1.42; margin-bottom: 34px; }
}
@media (max-width: 700px) {
  .sc-site .hero-ai { gap: 12px; padding-top: 12px; padding-bottom: 24px; }
  .sc-site .hero-ai .hero-content { padding-block: 38px 16px; }
  .sc-site .hero-ai h1 { max-width: 15ch; font-size: clamp(2.35rem, 9.4vw, 3.6rem); }
  html[lang="pl"] .sc-site .hero-ai h1 { font-size: clamp(2.35rem, 9.4vw, 3.6rem); }
  .sc-site .hero-visual-card { width: min(100%, 480px); aspect-ratio: 1.12; margin-bottom: 20px; border-radius: 18px; }
  .hero-workflow-panel { right: 12px; bottom: 12px; left: 12px; padding: 12px; border-radius: 13px; }
  .hero-workflow-head { font-size: 8px; gap: 6px; }
  .hero-workflow-title { gap: 5px; }
  .hero-workflow-note { max-width: 44%; }
  .hero-workflow { gap: 5px; margin: 11px 0 0; }
  .hero-workflow-node { min-height: 36px; font-size: 8px; letter-spacing: 0.04em; }
  .hero-workflow-link { flex-basis: 8px; }
  .hero-workflow-foot { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-workflow-link::after { animation: none; }
}
