:root {
  --blue-900: #0a2f7a;
  --blue-700: #0b57c9;
  --blue-500: #1d8bf0;
  --cyan: #1fb0ff;
  --ink: #12151c;
  --ink-2: #2b303b;
  --muted: #5d6675;
  --line: #e3e8f0;
  --bg: #ffffff;
  --bg-alt: #f4f7fb;
  --dark: #0d1220;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(14, 30, 70, .10);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased; }
img, svg { max-width: 100%; }
a { color: var(--blue-700); }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 5vw, 3.5rem); font-weight: 800; }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 800; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.muted { color: var(--muted); }
.skip { position: absolute; left: -999px; top: 8px; background: #fff; padding: 8px 12px; z-index: 100; border-radius: 6px; }
.skip:focus { left: 8px; }

/* ---------- brand ---------- */
.brand { display: inline-flex; align-items: center; gap: 12px; }
.brand .logo-mark { height: 44px; width: auto; flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 900; font-size: 1.55rem; letter-spacing: .12em; color: var(--ink); }
.brand-sub { font-size: .55rem; letter-spacing: .32em; color: var(--muted); margin-top: 5px; font-weight: 600; }
.brand-link { text-decoration: none; color: inherit; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255, 255, 255, .92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; min-height: 72px; gap: 16px; }
.menu { display: flex; align-items: center; gap: 18px; }
.menu a:not(.btn) { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: .9rem; white-space: nowrap; }
.menu a:not(.btn):hover { color: var(--blue-700); }
.navtoggle, .burger { display: none; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1.5px solid transparent; border-radius: 10px; padding: 12px 22px; font: inherit; font-weight: 700; font-size: .98rem; text-decoration: none; cursor: pointer; transition: transform .12s, box-shadow .15s, background .15s; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(29, 139, 240, .45); outline-offset: 2px; }
.btn-primary { background: linear-gradient(135deg, var(--blue-700), var(--blue-500)); color: #fff; box-shadow: 0 6px 18px rgba(11, 87, 201, .35); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11, 87, 201, .42); }
.btn-ghost { background: transparent; color: var(--blue-700); border-color: #c5d3ea; }
.btn-ghost:hover { background: #eef4ff; border-color: var(--blue-500); }
.btn-danger { background: #fff; color: #b3261e; border-color: #f0c4c1; }
.btn-danger:hover { background: #fdeceb; }
.btn-sm { padding: 8px 14px; font-size: .88rem; }
.btn.block { width: 100%; }

/* ---------- hero ---------- */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #f6f9ff 0%, #fff 100%); padding: clamp(56px, 9vw, 110px) 0 clamp(56px, 8vw, 96px); }
.hex-bg { position: absolute; inset: 0; opacity: .55; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'><g fill='none' stroke='%23c9d6ea' stroke-width='1.2'><path d='M28 2 54 17v30L28 62 2 47V17z'/><path d='M28 62v35M54 47l-26 15M2 47l26 15' opacity='.0'/></g></svg>");
  background-size: 56px 97px;
  -webkit-mask-image: linear-gradient(115deg, #000 0%, transparent 65%); mask-image: linear-gradient(115deg, #000 0%, transparent 65%); }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.25fr .75fr; gap: 48px; align-items: center; }
.eyebrow { text-transform: uppercase; letter-spacing: .16em; font-size: .78rem; font-weight: 800; color: var(--blue-700); margin-bottom: 14px; }
.hero h1 em { font-style: normal; background: linear-gradient(120deg, var(--blue-700), var(--cyan)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.15rem; color: var(--ink-2); max-width: 60ch; }
.cta { display: flex; flex-wrap: wrap; gap: 14px; margin: 28px 0 22px; }
.tagline { font-size: .8rem; letter-spacing: .24em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.hero-art { display: flex; justify-content: center; }
.hero-card { width: min(320px, 80%); aspect-ratio: 1; display: grid; place-items: center; background: radial-gradient(circle at 30% 20%, #fff, #e8f0fc); border: 1px solid var(--line); border-radius: 36px; box-shadow: var(--shadow); }
.hero-card .logo-mark { width: 62%; height: auto; }

/* ---------- sections ---------- */
.section { padding: clamp(56px, 8vw, 100px) 0; }
.section-alt { background: var(--bg-alt); }
.section-head { max-width: 680px; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.cards.three { margin-top: 22px; }
.cards.four { grid-template-columns: repeat(2, 1fr); }
.card-tile, .project-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-tile:hover, .project-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: #c9d9f3; }
.card-tile p, .project-card p { color: var(--muted); margin: 0; }
.icon { width: 48px; height: 48px; border-radius: 12px; background: linear-gradient(135deg, #e6f0ff, #d5e8ff); display: grid; place-items: center; margin-bottom: 16px; }
.icon svg { width: 24px; height: 24px; fill: none; stroke: var(--blue-700); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.tag { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--blue-700); background: #e6f0ff; border-radius: 999px; padding: 4px 11px; margin-bottom: 12px; }

.project { display: grid; grid-template-columns: 1.2fr .8fr; gap: 40px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 4vw, 44px); box-shadow: var(--shadow); }
.project h3 { font-size: 1.8rem; }
.project p { color: var(--muted); }
.ticks { list-style: none; padding: 0; margin: 0 0 8px; display: grid; gap: 8px; }
.ticks li { position: relative; padding-left: 28px; color: var(--ink-2); }
.ticks li::before { content: ""; position: absolute; left: 0; top: .35em; width: 16px; height: 16px; border-radius: 50%; background: var(--blue-500) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'><path d='m4.5 8.3 2.3 2.3 4.7-4.9' fill='none' stroke='white' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat; }
.project-visual svg { width: 100%; height: auto; }
.v-panel { fill: #f1f6ff; stroke: #cfdcf2; }
.v-line { fill: #b9cae8; } .v-line.soft { fill: #d6e1f4; }
.v-bars rect { fill: var(--blue-500); opacity: .85; rx: 4; }
.v-printer { fill: #1d2330; } .v-screen { fill: #5ec1ff; } .v-ok { fill: #2ecc71; }

.about-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: start; }
.about-grid p { color: var(--ink-2); font-size: 1.05rem; }
.facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.facts li { border-left: 4px solid var(--blue-500); background: var(--bg-alt); border-radius: 0 var(--radius) var(--radius) 0; padding: 18px 22px; }
.facts strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.facts span { color: var(--muted); }

/* ---------- contact ---------- */
.section-dark { background: radial-gradient(1000px 500px at 85% -10%, #14336e 0%, transparent 60%), var(--dark); color: #e8edf8; }
.section-dark .eyebrow { color: var(--cyan); }
.section-dark h2 { color: #fff; }
.contact-grid { display: grid; grid-template-columns: .85fr 1.15fr; gap: 56px; align-items: start; }
.contact-info p { color: #b6c2da; font-size: 1.05rem; }
.contact-list { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 14px; }
.contact-list li { display: flex; align-items: center; gap: 14px; }
.contact-list svg { width: 22px; height: 22px; flex: none; fill: none; stroke: var(--cyan); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.contact-list a { color: #fff; text-decoration: none; font-weight: 600; }
.contact-list a:hover { text-decoration: underline; }
.contact-form-wrap { background: #fff; color: var(--ink); border-radius: 20px; padding: clamp(22px, 3.5vw, 38px); box-shadow: 0 24px 60px rgba(0, 0, 0, .35); }

/* ---------- forms ---------- */
.form { display: grid; gap: 16px; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.field small { font-weight: 500; color: var(--muted); }
input, select, textarea { width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1.5px solid #cfd8e6; border-radius: 10px; padding: 11px 13px; }
input:focus, select:focus, textarea:focus { border-color: var(--blue-500); }
textarea { resize: vertical; min-height: 130px; }
.msg, .field-validation-error { color: #b3261e; font-size: .85rem; }
.input-validation-error { border-color: #d9534f; }
.fine { font-size: .82rem; color: var(--muted); margin: 0; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { border-radius: 10px; padding: 12px 16px; font-size: .95rem; }
.notice.err, .validation-summary-errors { background: #fdeceb; color: #8a1c15; border: 1px solid #f3c6c3; }
.validation-summary-errors ul { margin: 0; padding-left: 18px; }
.validation-summary-valid { display: none; }
.notice.ok { background: #e9f8ef; color: #14532d; border: 1px solid #bfe8cf; padding: 22px; }
.notice.ok h3 { margin-bottom: 6px; }

/* ---------- footer ---------- */
.site-footer { background: #090d18; color: #8d9ab3; padding: 34px 0; font-size: .9rem; }
.site-footer .foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; }
.site-footer p { margin: 0; }
.site-footer a { color: #b6c2da; }
.site-footer .brand-name { color: #fff; }
.site-footer .brand-sub { color: #8d9ab3; }
.site-footer .brand .logo-mark { height: 36px; }

/* ---------- login ---------- */
.login-page { position: relative; min-height: 100vh; display: grid; place-items: center; padding: 24px; background: linear-gradient(180deg, #f6f9ff, #e9f0fb); overflow: hidden; }
.login-card { position: relative; width: min(420px, 100%); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px 32px; box-shadow: var(--shadow); display: grid; gap: 10px; }
.login-card h1 { font-size: 1.8rem; margin: 14px 0 0; }
.login-card .brand { margin-bottom: 6px; }

/* ---------- responsive ---------- */
@media (max-width: 920px) {
  .hero-grid, .project, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 1120px) {
  .burger { display: grid; place-items: center; width: 44px; height: 44px; cursor: pointer; border-radius: 10px; border: 1px solid var(--line); }
  .burger span, .burger span::before, .burger span::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
  .burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
  .burger span::before { top: -6px; } .burger span::after { top: 6px; }
  .menu { display: none; position: absolute; top: 72px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 8px 16px 16px; }
  .menu a:not(.btn) { padding: 12px 4px; border-bottom: 1px solid var(--line); font-size: .96rem; }
  .menu .btn { margin-top: 12px; }
  .navtoggle:checked ~ .menu { display: flex; }
}
@media (max-width: 760px) {
  .brand-sub { letter-spacing: .2em; }
  .cards, .cards.four { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* ---------- Fusion Clock page and project links ---------- */
.project-card .more { display: inline-block; margin-top: 14px; font-weight: 700; text-decoration: none; }
.project-card .more:hover { text-decoration: underline; }
.project .more { display: inline-block; margin-top: 18px; font-weight: 700; text-decoration: none; }
.project .more:hover { text-decoration: underline; }
.project-visual img { display: block; width: 100%; height: auto; border-radius: 14px; box-shadow: 0 10px 30px rgba(10, 30, 70, .18); }
.project-card { display: flex; flex-direction: column; align-items: flex-start; }
.project-card .more { margin-top: auto; padding-top: 14px; }
.project-card .shot { align-self: stretch; margin: -28px -28px 20px; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius) var(--radius) 0 0; border-bottom: 1px solid var(--line); background: #0d1117; }
.project-card .shot img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: left top; }
.project-card .shot-photo img { object-position: center; }
.project-card .shot-device img { object-position: center; }
.clock-shot { margin: 0; }
.clock-shot img { width: 100%; height: auto; border-radius: 20px; box-shadow: var(--shadow); border: 1px solid var(--line); display: block; }
.mode-grid, .two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.mode { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 20px 24px; }
.mode img { width: 100%; height: auto; border-radius: 10px; margin-bottom: 16px; display: block; }
.mode p { color: var(--muted); }
.card-tile .ticks { margin-top: 14px; }
.ticks.on-dark li { color: #d4def2; }
.contact-info .coming { margin-top: 28px; color: #fff; }
.field.consent .check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.field.consent input[type=checkbox] { width: auto; margin-top: 4px; }
@media (max-width: 920px) { .mode-grid, .two-col { grid-template-columns: 1fr; } }

/* ---------- real logo artwork ---------- */
.brand .logo-mark { height: 46px; width: auto; }
.hero-card .hero-logo { width: 78%; height: auto; }
.login-logo { display: flex; justify-content: center; }
.login-logo img { width: 190px; height: auto; }
.site-footer .brand .logo-mark { background: #fff; border-radius: 8px; padding: 4px; height: 44px; }

/* ---------- logo: one copy per background (Pages/Shared/_LogoMark.cshtml) ---------- */
.logo-on-dark { display: none !important; }
.site-dark .logo-on-light { display: none !important; }
.site-dark .logo-on-dark { display: inline-block !important; }
.site-dark .hero-card .logo-on-dark, .site-dark .login-logo .logo-on-dark { display: block !important; }

/* ---------- dark theme of the public pages (home, Fusion Clock, Admin sign-in), set by html.site-dark in _Layout ----------
   It matches the online apps (zmm.css), so moving between menu items stays dark. The Admin portal has its own layout and stays light. */
.site-dark {
  --ink: #e8edf8; --ink-2: #c3cde0; --muted: #8f9bb4; --line: #263049;
  --bg: #10141f; --bg-alt: #141a28; --surface: #182032; --surface-2: #1d2639; --link: #63adff; --tint: rgba(29, 139, 240, .14);
  --shadow: 0 14px 34px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
:where(.site-dark) a { color: var(--link); }
.site-dark .skip { background: var(--surface); color: var(--ink); }
.site-dark .site-header { background: rgba(13, 18, 32, .88); }
.site-dark .menu a:not(.btn):hover, .site-dark .eyebrow, .site-dark .tag { color: var(--link); }
.site-dark .btn-ghost { color: var(--link); border-color: #34446a; }
.site-dark .btn-ghost:hover { background: var(--tint); border-color: var(--link); }
.site-dark .btn-danger { background: transparent; color: #ff9b94; border-color: #7a3430; }
.site-dark .btn-danger:hover { background: rgba(255, 123, 114, .12); }

.site-dark .hero { background: radial-gradient(900px 460px at 12% 0%, rgba(11, 87, 201, .28), transparent 70%), linear-gradient(180deg, #0d1220 0%, var(--bg) 100%); }
.site-dark .hex-bg { opacity: .35;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='56' height='97' viewBox='0 0 56 97'><g fill='none' stroke='%233a5288' stroke-width='1.2'><path d='M28 2 54 17v30L28 62 2 47V17z'/></g></svg>"); }
.site-dark .hero h1 em { background-image: linear-gradient(120deg, #3d8bff, var(--cyan)); }
.site-dark .hero-card { background: radial-gradient(circle at 30% 20%, #1f2a44, var(--surface)); }

.site-dark .card-tile, .site-dark .project-card, .site-dark .project, .site-dark .mode { background: var(--surface); }
.site-dark .card-tile:hover, .site-dark .project-card:hover { border-color: #3a5288; }
.site-dark .icon { background: var(--tint); }
.site-dark .icon svg { stroke: var(--link); }
.site-dark .tag { background: var(--tint); }
.site-dark .v-panel { fill: var(--surface-2); stroke: var(--line); }
.site-dark .v-line { fill: #3a4a6c; } .site-dark .v-line.soft { fill: #2c3954; }

.site-dark .section-dark { border-top: 1px solid var(--line); }
.site-dark .contact-form-wrap { background: var(--surface); border: 1px solid var(--line); }
.site-dark input, .site-dark select, .site-dark textarea { background: var(--bg); border-color: #33405e; }
.site-dark input:focus, .site-dark select:focus, .site-dark textarea:focus { border-color: var(--blue-500); }
.site-dark .msg, .site-dark .field-validation-error { color: #ff9b94; }
.site-dark .notice.err, .site-dark .validation-summary-errors { background: #3a1d1c; color: #ffb3ad; border-color: #6e2f2b; }
.site-dark .notice.ok { background: #12301f; color: #a7e9c0; border-color: #24583a; }

.site-dark .site-footer { border-top: 1px solid var(--line); }
.site-dark .site-footer .brand .logo-mark { background: none; padding: 0; }

.site-dark .login-page { background: radial-gradient(800px 480px at 50% 0%, rgba(11, 87, 201, .25), transparent 70%), var(--bg); }
.site-dark .login-card { background: var(--surface); }
@media (max-width: 1120px) { .site-dark .menu { background: #0d1220; } }

/* ---------- contact form picture check (Services/CaptchaService.cs) ---------- */
.captcha-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.captcha-img { display: block; border-radius: 8px; border: 1px solid var(--line); max-width: 100%; height: auto; background: #eef1f6; }
.captcha-input { max-width: 220px; letter-spacing: .15em; text-transform: uppercase; }

/* ---------- light / dark switch in the header (js/fsc-theme.js) ---------- */
.theme-btn { width: 36px; height: 36px; display: inline-grid; place-items: center; border: 1.5px solid var(--line); border-radius: 10px; background: none; color: var(--ink-2); cursor: pointer; padding: 0; flex: none; }
.theme-btn:hover { color: var(--blue-700); border-color: var(--blue-500); }
.site-dark .theme-btn { border-color: #34446a; color: var(--link); }
.theme-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.theme-btn .i-moon { display: none; }
:root[data-theme="light"] .theme-btn .i-sun { display: none; }
:root[data-theme="light"] .theme-btn .i-moon { display: block; }
@media (max-width: 1120px) { .menu .theme-btn { margin-top: 12px; align-self: flex-start; } }

/* ---------- logos on a white tile (header, footer and the home page logo card) ----------
   The original logo (dark "S") sits on white in both modes, so it stands out on the dark pages as well. */
.site-dark .brand .logo-mark.logo-on-dark, .site-dark .hero-card .logo-on-dark { display: none !important; }
.site-dark .brand .logo-mark.logo-on-light { display: inline-block !important; }
.site-dark .hero-card .logo-on-light { display: block !important; }
.brand .logo-mark { background: #fff; border-radius: 10px; padding: 4px; box-shadow: 0 1px 2px rgba(14, 30, 70, .12); }
.site-dark .brand .logo-mark { box-shadow: 0 4px 14px rgba(0, 0, 0, .35); }
.site-dark .site-footer .brand .logo-mark { background: #fff; padding: 4px; }
.site-dark .hero-card { background: #fff; border-color: rgba(255, 255, 255, .25); box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
/* Keep "SOURCE CODE SOLUTIONS" on one line under the header logo; tighten the menu a little on narrower desktops. */
.brand-sub { white-space: nowrap; }
@media (max-width: 1320px) and (min-width: 1121px) { .menu { gap: 13px; } .menu a:not(.btn) { font-size: .86rem; } }
