:root {
    color-scheme: dark only;
    --bg: #0b0d10; --panel: #1b2027; --surface: #20262e; --text: #f4f7f8;
    --muted: #b7c0c5; --soft: #89969e; --line: rgba(244, 247, 248, 0.14);
    --line-strong: rgba(244, 247, 248, 0.24); --teal: #64ffda; --cyan: #80cbc4;
    --amber: #ffca28; --green: #81c784; --coral: #ff8a65;
    --emerald: #10b981; --emerald-deep: #059669;
    --shadow-2: 0 3px 6px rgba(0, 0, 0, 0.32), 0 3px 6px rgba(0, 0, 0, 0.24);
    --shadow-8: 0 8px 16px rgba(0, 0, 0, 0.36), 0 12px 28px rgba(0, 0, 0, 0.32);
    --shadow-16: 0 18px 34px rgba(0, 0, 0, 0.44), 0 28px 72px rgba(0, 0, 0, 0.42);
}

* { box-sizing: border-box; }
html { overflow-y: scroll; scrollbar-gutter: stable; background: var(--bg); }
body {
    margin: 0; min-width: 320px; color: var(--text);
    background: var(--bg);
    font-family: Inter, Roboto, "Segoe UI", Arial, sans-serif; font-size: 16px; line-height: 1.6;
}
body:has(.project-modal:target) { overflow: hidden; }
a { color: inherit; -webkit-tap-highlight-color: transparent; }
:where(h1, h2, h3, p) { margin-top: 0; }
h1:focus { outline: none; }

.landing-shell {
    overflow: hidden;
}
.hero {
    min-height: 80vh; position: relative; overflow: hidden; padding: 0;
}
.button, .project-modal__close {
    display: flex; align-items: center;
}
.hero__grid {
    position: relative; width: 100vw; min-height: 80vh; margin-left: calc(50% - 50vw);
}
.hero__copy {
    position: absolute; z-index: 2; top: 50%; left: max(24px, calc((100vw - 1180px) / 2));
    max-width: 640px; padding: 0; transform: translateY(-50%);
}
.hero__logo {
    display: block; width: 112px; height: 112px; margin-bottom: 24px;
    filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.42));
}
.eyebrow {
    margin-bottom: 14px; color: var(--amber); font-size: 0.82rem; font-weight: 700;
    line-height: 1.35; text-transform: uppercase;
}
.hero h1 { margin-bottom: 24px; color: var(--text); font-size: 5rem; line-height: 0.95; letter-spacing: 0; }
.hero h1 span { display: block; }
.hero h1 span:not(:first-child) { color: var(--cyan); }
.hero__lead { max-width: 590px; margin-bottom: 30px; color: var(--muted); font-size: 1.18rem; }
.button {
    justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 6px;
    font-weight: 700; text-decoration: none; box-shadow: var(--shadow-2);
}
.button--primary { background: var(--teal); color: #07100d; }
.button--primary:hover, .button--primary:focus-visible {
    background: #8bffe7; outline: 2px solid rgba(255, 202, 40, 0.7); outline-offset: 4px;
}
.hero__visual { position: relative; min-width: 0; width: 100vw; height: 80vh; padding-top: 0; }
.hero__visual::after {
    content: ""; position: absolute; inset: 0;
    background: linear-gradient(90deg, rgba(11, 13, 16, 0.92) 0%, rgba(11, 13, 16, 0.72) 34%, rgba(11, 13, 16, 0.2) 70%, rgba(11, 13, 16, 0.34) 100%);
    pointer-events: none;
}
.communications-map { display: block; width: 100vw; height: 80vh; margin: 0; }

.section {
    width: 100%; padding: 86px max(24px, calc((100vw - 1180px) / 2)); border-top: 1px solid var(--line);
}
.section__intro { max-width: 760px; margin-bottom: 34px; }
.section h2 {
    margin-bottom: 16px; color: var(--text); font-size: 2.65rem; line-height: 1.08; letter-spacing: 0;
}
.section__intro p:last-child { color: var(--muted); font-size: 1.04rem; }
.work { background: var(--panel); }
.project-carousel {
    display: grid; grid-auto-columns: minmax(320px, 385px); grid-auto-flow: column; gap: 18px;
    margin: 0 -24px; padding: 8px 24px 22px; overflow-x: auto;
    overscroll-behavior-inline: contain; scroll-snap-type: inline mandatory;
    scrollbar-color: var(--teal) rgba(255, 255, 255, 0.08);
}
.project-card, .service-card {
    border: 1px solid var(--line); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow-2);
}
.project-card {
    min-height: 292px; display: flex; flex-direction: column; justify-content: space-between;
    scroll-snap-align: start; padding: 24px; color: var(--text); text-decoration: none;
}
.project-card:hover, .project-card:focus-visible {
    transform: scale(1.015); border-color: rgba(100, 255, 218, 0.55);
    background: #222a32; outline: none; box-shadow: var(--shadow-8);
}
.project-card__type, .project-card__meta { color: var(--cyan); font-size: 0.88rem; font-weight: 700; }
.project-card h3, .service-card h3 {
    margin: 20px 0 12px; color: var(--text); font-size: 1.45rem; line-height: 1.2; letter-spacing: 0;
}
.project-card p, .service-card p { color: var(--muted); }
.project-card__meta { color: var(--amber); }
.service-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.service-card { min-height: 210px; padding: 24px; }
.service-card__icon {
    display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid rgba(100, 255, 218, 0.32);
    border-radius: 8px; background: rgba(100, 255, 218, 0.08); color: var(--teal); box-shadow: var(--shadow-2);
}
.service-card__icon svg {
    width: 28px; height: 28px;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.service-card:hover .service-card__icon svg {
    transform: scale(1.1) rotate(2deg);
}
.service-card__icon .stroke-primary {
    fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.service-card__icon .fill-secondary {
    fill: currentColor; stroke: none; opacity: 0.18;
    transition: opacity 0.3s ease;
}
.service-card:hover .service-card__icon .fill-secondary {
    opacity: 0.35;
}
.service-card:nth-child(2n) { border-color: rgba(128, 203, 196, 0.28); }
.service-card:nth-child(3n) { border-color: rgba(255, 202, 40, 0.26); }
.service-card:nth-child(2n) .service-card__icon {
    border-color: rgba(128, 203, 196, 0.36); background: rgba(128, 203, 196, 0.08); color: var(--cyan);
}
.service-card:nth-child(3n) .service-card__icon {
    border-color: rgba(255, 202, 40, 0.38); background: rgba(255, 202, 40, 0.08); color: var(--amber);
}

.team {
    background: var(--surface);
}
.team__intro { margin-bottom: 22px; }
.team__intro h2 { margin-bottom: 0; }
.team-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 360px)); gap: 18px;
}
.team-card { width: min(360px, 100%); }
.team-card__surface {
    display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 18px; align-items: center;
    min-height: 164px; padding: 20px; border: 1px solid var(--line); border-radius: 8px;
    background: #20262e; box-shadow: var(--shadow-8);
}
.team-card__photo {
    display: block; width: 96px; height: 96px; border: 1px solid var(--line-strong); border-radius: 50%;
    background: var(--panel); object-fit: cover; box-shadow: var(--shadow-2);
}
.team-card__copy { display: grid; gap: 6px; }
.team-card__name { color: var(--text); font-size: 1.16rem; font-weight: 800; line-height: 1.1; }
.team-card__role {
    color: var(--amber); font-size: 0.68rem; font-weight: 800; line-height: 1.25; text-transform: uppercase;
}
.team-card__education { color: var(--muted); font-size: 0.84rem; line-height: 1.35; }

.project-modal {
    position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 24px;
    visibility: hidden; opacity: 0; pointer-events: none; transition: opacity 160ms ease, visibility 160ms ease;
}
.project-modal:target { visibility: visible; opacity: 1; pointer-events: auto; }
.project-modal__scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.74); backdrop-filter: blur(8px); }
.project-modal__card {
    position: relative; width: min(680px, 100%); max-height: min(78vh, 760px); overflow: auto;
    padding: 32px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--surface); box-shadow: var(--shadow-16);
}
.project-modal__card h2 { margin-bottom: 16px; font-size: 2.05rem; line-height: 1.15; letter-spacing: 0; }
.project-modal__card p, .project-modal__card li { color: var(--muted); }
.project-modal__card ul { display: grid; gap: 10px; margin: 20px 0 0; padding-left: 1.2rem; }
.project-modal__close {
    float: right; justify-content: center; min-height: 38px; padding: 0 14px; border-radius: 6px;
    background: rgba(255, 255, 255, 0.09); color: var(--text); font-weight: 700; text-decoration: none;
}
.project-modal__close:hover, .project-modal__close:focus-visible { background: var(--amber); color: #11100a; outline: none; }

.valid.modified:not([type=checkbox]) { outline: 1px solid #26b050; }
.invalid { outline: 1px solid #e50000; }
.validation-message { color: #ff8a80; }
.blazor-error-boundary { background: #b32121; color: white; padding: 1rem; }
.blazor-error-boundary::after { content: "An error has occurred."; }
.darker-border-checkbox.form-check-input { border-color: #929292; }
.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--soft); text-align: end;
}
.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder { text-align: start; }

@media (prefers-reduced-motion: no-preference) {
    .project-card, .button {
        transition: background-color 160ms ease, border-color 160ms ease, box-shadow 160ms ease, color 160ms ease, transform 160ms ease;
    }
}

@media (max-width: 1060px) {
    .hero__copy { max-width: 760px; }
    .hero h1 { font-size: 4rem; }
    .service-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
    body { font-size: 15px; }
    .hero { min-height: 80vh; padding: 0; }
    .hero__copy { left: 18px; right: 18px; max-width: none; }
    .hero__logo { width: 84px; height: 84px; margin-bottom: 18px; }
    .hero h1 { font-size: 3rem; line-height: 1; }
    .hero__lead { font-size: 1.05rem; }
    .hero__visual { height: 80vh; padding-top: 0; }
    .communications-map { height: 80vh; }
    .section { padding: 64px 18px; }
    .section h2 { font-size: 2.1rem; }
    .project-carousel { grid-auto-columns: minmax(286px, 82vw); gap: 14px; margin: 0 -18px; padding-inline: 18px; }
    .project-card { min-height: 270px; padding: 20px; }
    .service-grid { grid-template-columns: 1fr; }
    .service-card { min-height: auto; }
    .project-modal { padding: 14px; }
    .project-modal__card { max-height: 84vh; padding: 24px; }
    .project-modal__card h2 { font-size: 1.75rem; }
}

@media (max-width: 420px) {
    .hero h1 { font-size: 2.55rem; }
    .button { width: 100%; }
    .team { padding-inline: 10px; }
    .team-card__surface { grid-template-columns: 1fr; justify-items: center; text-align: center; }
}

/* ============================================================
   Kruseio design system (used by post-hero sections + sub-pages)
   ============================================================ */

