/* Site visual layer for every page with class "relook" on <body>: warm paper / deep ink themes,
   light display type, robot footer artwork and violet footer. Loaded last; changes appearance only.
   body.home = homepage, body.relook-legacy = older light pages. Light is the default; dark applies with the dark class. */
:root {
  --bg: #f4efe6; --bg-alt: #ede7da; --surface: #fffcf6; --text: #17142b; --muted: #5c5773;
  --line: rgba(23, 20, 43, .11); --line-strong: rgba(23, 20, 43, .22); --accent: #6d28d9;
  --c-understand: #17142b; --c-decide: #0369a1; --c-protect: #4f46e5; --c-act: #7c3aed;
  --accent-ink: linear-gradient(100deg, #4f46e5, #7c3aed 55%, #db2777);
}
.dark {
  --bg: #0f0b1f; --bg-alt: #151028; --surface: #1b1534; --text: #f4f0ff; --muted: #ada6c9;
  --line: rgba(255, 255, 255, .1); --line-strong: rgba(255, 255, 255, .22); --accent: #b9a0ff;
  --c-understand: #ffffff; --c-decide: #38bdf8; --c-protect: #818cf8; --c-act: #a78bfa;
  --accent-ink: linear-gradient(100deg, #93c5fd, #c4b5fd 55%, #f9a8d4);
}

/* Type: light geometric display, serif italic accent */
body.relook { font-family: 'DM Sans', system-ui, -apple-system, sans-serif; }
body.relook h1, body.relook h2, body.relook h3 { font-family: 'Space Grotesk', 'DM Sans', system-ui, sans-serif; }
body.relook h1, body.relook h2.headline { font-weight: 300; letter-spacing: -0.035em; line-height: 1.08; }
body.relook h3 { font-weight: 500; }
body.relook .accent-word, body.home #top h1 .t-protect, body.relook .text-gradient {
  font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; font-size: 1.1em; letter-spacing: -0.01em;
  background: var(--accent-ink); -webkit-background-clip: text; background-clip: text; color: transparent; padding: 0 .08em .04em 0;
}
body.home #top h1 .t-protect { background-image: linear-gradient(100deg, var(--c-protect), var(--c-act)); }
body.relook .eyebrow { display: inline-flex; align-items: center; gap: .6rem; font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 500; letter-spacing: .24em; color: var(--muted); }
body.relook .eyebrow::before { content: ""; width: .45rem; height: .45rem; background: var(--accent); transform: rotate(45deg); }

/* Surfaces and controls */
body.relook:not(.relook-legacy) .glass { background: color-mix(in srgb, var(--surface) 78%, transparent); }
body.relook:not(.relook-legacy) .btn-primary { background: linear-gradient(120deg, #6d28d9, #4f46e5); box-shadow: 0 14px 30px -16px rgba(109, 40, 217, .75); }
body.relook:not(.relook-legacy) .field { background: var(--bg); }
body.relook:not(.relook-legacy) .bg-alt { background-color: var(--bg-alt); }
body.relook .glow-top, body.relook .glow-bottom, body.relook .hero-glow { background-image: none; }

/* Homepage opening and the wave that leads into the footer artwork */
body.home #top { padding-bottom: 0; background-image: none; }
body.home #top .hero-dots { display: none; }
body.home #top h1 { font-weight: 300; }
body.relook .wave { position: absolute; left: 0; top: -1px; width: 100%; height: clamp(38px, 7vw, 96px); fill: var(--bg); }

/* Philosophy: four joined panels, each with its own stage-coloured plate */
body.relook .uda-track { gap: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 1.75rem; background: var(--surface); }
body.relook .uda-track::before, body.relook .uda-track::after { display: none; }
body.relook .uda-step { display: flex; flex-direction: column; padding: 1.5rem 1.5rem 2rem; border-top: 1px solid var(--line); }
body.relook .uda-step:first-child { border-top: 0; }
body.relook .uda-step::before {
  content: ""; order: -1; height: 7.5rem; margin-bottom: 1.5rem; border-radius: 1.1rem;
  background:
    radial-gradient(circle at 78% 120%, color-mix(in srgb, var(--c) 55%, transparent) 0 3.2rem, transparent 3.3rem),
    radial-gradient(circle at 24% -10%, color-mix(in srgb, var(--c) 30%, transparent) 0 3.6rem, transparent 3.7rem),
    radial-gradient(color-mix(in srgb, var(--c) 45%, transparent) 1px, transparent 1.6px) 0 0 / 14px 14px,
    color-mix(in srgb, var(--c) 9%, var(--surface));
}
body.relook .uda-node, body.relook .uda-track.in-view .uda-node { position: static; width: auto; height: auto; justify-content: flex-start; margin-bottom: .6rem; border: 0; background: none; box-shadow: none; font-family: 'Space Grotesk', system-ui, sans-serif; font-size: .75rem; letter-spacing: .2em; }
body.relook .uda-word { font-weight: 500; }
@media (min-width: 1024px) {
  body.relook .uda-track { gap: 0; }
  body.relook .uda-step { padding: 1.25rem 1.25rem 2rem; border-top: 0; border-left: 1px solid var(--line); }
  body.relook .uda-step:first-child { border-left: 0; }
}

/* Platform: CAL on a deep violet stage */
body.relook .kg-stage {
  background:
    radial-gradient(55% 45% at 50% 38%, rgba(167, 139, 250, .35), transparent 70%),
    radial-gradient(30% 35% at 88% 8%, rgba(244, 114, 182, .2), transparent 70%),
    linear-gradient(160deg, #4a22a8 0%, #2a1566 48%, #130c33 100%);
  border: 0; box-shadow: 0 50px 90px -60px rgba(76, 29, 149, .9);
}
body.relook .kg-grid { background-image: linear-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .07) 1px, transparent 1px); background-size: 44px 44px; }
body.relook .kg-stage .text-gradient { background-image: linear-gradient(100deg, #bae6fd, #ddd6fe 55%, #fbcfe8); }
body.relook .cal-wordmark { font-family: 'Space Grotesk', system-ui, sans-serif; font-weight: 500; }
body.relook .cal-module { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .16); }

/* Solutions: one panel split into cells */
body.home #solutions .grid { gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: 1.75rem; background: var(--line); }
body.home #solutions article { border: 0; border-radius: 0; transition: opacity .9s ease, transform .9s ease, background-color .25s ease; }
body.home #solutions article:hover { box-shadow: none; background: color-mix(in srgb, var(--c) 7%, var(--surface)); }
body.home #solutions article h3 { font-size: 1.4rem; letter-spacing: -0.02em; }

/* Consulting: cards with a stage-coloured plate on top */
body.relook .rule-top { position: relative; overflow: hidden; padding: 4.75rem 1.75rem 1.75rem; border: 1px solid var(--line); border-radius: 1.5rem; background: var(--surface); }
body.relook .rule-top::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 3.25rem;
  background: radial-gradient(color-mix(in srgb, var(--c) 55%, transparent) 1px, transparent 1.6px) 0 0 / 12px 12px, color-mix(in srgb, var(--c) 14%, var(--surface));
  border-bottom: 1px solid var(--line);
}

/* Footer: three robots by the river (sunset or night) flowing into a violet footer */
body.relook .footer-art { position: relative; height: clamp(260px, 32vw, 440px); background: #7c3aed url("../images/footer-robots-day.svg") center bottom / auto 100% no-repeat; }
.dark body.relook .footer-art { background: #2a1266 url("../images/footer-robots-night.svg") center bottom / auto 100% no-repeat; }
body.relook .footer-art .wave { fill: var(--bg); }
body.relook footer, body.relook footer.site-shell.standalone {
  --text: #ffffff; --muted: rgba(255, 255, 255, .76); --line: rgba(255, 255, 255, .2);
  --c-understand: #ffffff; --c-decide: #bae6fd; --c-protect: #c7d2fe; --c-act: #e9d5ff;
  border-top: 0; color: var(--text); background: linear-gradient(180deg, #5b21b6, #3b0a7a);
}
.dark body.relook footer, .dark body.relook footer.site-shell.standalone { background: linear-gradient(180deg, #2a1266, #14092e); }

body.relook .footer-art.on-alt .wave { fill: var(--bg-alt); }

/* Page-specific toggles with hard-coded blue */
body.relook .tab-active, body.relook .seg-btn.active { background: linear-gradient(120deg, #6d28d9, #4f46e5); box-shadow: 0 10px 15px -3px rgba(109, 40, 217, .3); }

/* Older pages: paper background, cream cards; colours come from js/relook-tailwind.js */
html:not(.dark) body.relook-legacy { background-color: #f4efe6; background-image: none; }
html:not(.dark) body.relook-legacy .bg-white { background-color: #fffcf6; }
html:not(.dark) body.relook-legacy .footer-art .wave { fill: #f4efe6; }
body.relook .site-shell.standalone {
  --bg: #f4efe6; --bg-alt: #ede7da; --surface: #fffcf6; --text: #17142b; --muted: #5c5773;
  --line: rgba(23, 20, 43, .11); --accent: #6d28d9; font-family: 'DM Sans', system-ui, sans-serif;
}
body.relook footer.site-shell.standalone { --text: #ffffff; --muted: rgba(255, 255, 255, .76); --line: rgba(255, 255, 255, .2); }
@media (max-width: 640px) {
  body.relook .footer-art { height: 270px; background-image: url("../images/footer-robots-day-phone.svg"); }
  .dark body.relook .footer-art { background-image: url("../images/footer-robots-night-phone.svg"); }
}
@media (prefers-reduced-motion: reduce) {
  body.home #solutions article { transition: none; }
}
