/* =========================================================
   BASE + PRIMITIVES
   Everything MudBlazor used to provide (layout container, buttons, grid,
   inputs, alerts, spinner) hand-rolled, so the WebAssembly payload does not
   have to carry a component library for five widgets.
   Colour tokens live in :root further down — CSS variables resolve at use
   time, so being referenced above their declaration is fine.
   ========================================================= */

*, *::before, *::after { box-sizing: border-box; }

body {
    margin: 0;
    font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    color: var(--color-text);
    background: var(--color-bg);
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, p, ul, figure { margin: 0; }
ul { padding: 0; list-style: none; }
img { max-width: 100%; }
a { color: inherit; }

/* ---------- Layout container (was MudContainer) ---------- */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-md { max-width: 960px; }
.container-sm { max-width: 600px; }

/* ---------- Grid (was MudGrid / MudItem) ---------- */
.grid {
    display: grid;
    gap: 24px;
    grid-template-columns: 1fr;
}

/* ---------- Buttons (was MudButton) ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 10px 22px;
    border: 1px solid transparent;
    border-radius: 999px;
    font: inherit;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.btn-lg { padding: 13px 32px; font-size: 1rem; }

.btn-primary {
    background: var(--color-accent);
    color: #fff;
    box-shadow: 0 8px 24px rgba(225, 29, 46, 0.28);
}

.btn-primary:hover { background: var(--color-accent-hover); }

.btn-outline {
    background: transparent;
    color: var(--color-text);
    border-color: rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
}

.btn-text {
    background: transparent;
    color: var(--color-accent);
    padding: 8px 12px;
}

.btn-text:hover { color: var(--color-accent-hover); }

.btn:disabled { opacity: 0.6; cursor: default; }

.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 50%;
    color: var(--color-text);
    cursor: pointer;
}

.icon-button:hover { background: rgba(255, 255, 255, 0.06); }

/* ---------- Icons (was MudIcon) ---------- */
.icon {
    width: 24px;
    height: 24px;
    display: block;
    flex-shrink: 0;
}

/* ---------- Form controls (was MudTextField) ---------- */
.field-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: 1fr;
}

.field { display: flex; flex-direction: column; gap: 7px; }

.field label {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.field-optional { font-weight: 400; opacity: 0.75; }

.input {
    width: 100%;
    padding: 12px 14px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text);
    font: inherit;
    transition: border-color 0.15s ease;
}

.input:hover { border-color: #55555a; }

.input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(225, 29, 46, 0.18);
}

.input:disabled { opacity: 0.6; }

.textarea { resize: vertical; min-height: 128px; }

.field-help {
    font-size: 0.82rem;
    color: var(--color-text-muted);
    opacity: 0.85;
}

/* Blazor's own validation classes. */
.validation-message,
.field .validation-message {
    color: #ff6b78;
    font-size: 0.85rem;
}

.input.invalid { border-color: #ff6b78; }

/* ---------- Alerts (was MudAlert) ---------- */
.alert {
    margin-top: 20px;
    padding: 14px 18px;
    border-radius: 12px;
    border: 1px solid;
    font-size: 0.95rem;
    line-height: 1.55;
}

.alert-warning {
    background: rgba(225, 29, 46, 0.1);
    border-color: rgba(225, 29, 46, 0.45);
    color: #ffc9ce;
}

.alert-info {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--color-border);
    color: var(--color-text-muted);
}

.alert-link { color: inherit; font-weight: 700; text-decoration: underline; }

/* ---------- Spinner (was MudProgressCircular) ---------- */
.spinner {
    width: 17px;
    height: 17px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- App bar (was MudAppBar / MudLayout) ---------- */
.site-appbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--appbar-height);
    z-index: 100;
}

.appbar-inner {
    display: flex;
    align-items: center;
    height: 100%;
}

/* MudMainContent used to reserve this space automatically. */
main { padding-top: var(--appbar-height); }

/* ---------- Boot screen ---------- */
/* Replaced by the app the moment the runtime starts, so it only needs to look
   deliberate for the second or two before that. */
.boot-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    background: #1c1c1e;
}

.boot-badge {
    width: 190px;
    height: 190px;
    border-radius: 50%;
    border: 4px solid #e11d2e;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bootPulse 1.8s ease-in-out infinite;
}

.boot-mark {
    font-family: 'Alex Brush', cursive;
    font-size: 3rem;
    color: #f7f7f7;
}

.boot-heading {
    margin: 4px 24px 0;
    max-width: 620px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    font-weight: 600;
    text-align: center;
    color: #f7f7f7;
}

.boot-copy {
    margin: 10px 24px 0;
    max-width: 560px;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.95rem;
    line-height: 1.6;
    text-align: center;
    color: #c9c9c9;
}

.boot-copy a { color: #ff2f42; }

.boot-text {
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 0.85rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #c9c9c9;
}

@keyframes bootPulse {
    0%, 100% { opacity: 0.75; transform: scale(1); }
    50%      { opacity: 1;    transform: scale(1.03); }
}

/* ---------- Blazor error strip ---------- */
#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    color: #111;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

/* Wording supplied here rather than in index.html: on a WebAssembly site Blazor's
   default failure wording was the only real text in the body, and Google indexed
   it as the page description. */
#blazor-error-ui .error-text::before {
    content: "Something went wrong. ";
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}
/* =========================================================
   SIGNATORY — brand tokens
   ========================================================= */
:root {
    --font-brand: 'Alex Brush', cursive;
    --color-accent: #e11d2e;
    --color-accent-hover: #ff2f42;
    --color-accent-dark: #8c0a14;
    --color-bg: #1c1c1e;
    --color-surface: #242426;
    --color-border: #3d3d3f;
    --color-text: #f7f7f7;
    --color-text-muted: #c9c9c9;
    --appbar-height: 64px;
    --section-pad: 112px;
}

html, body {
    margin: 0;
    background: var(--color-bg);
    scroll-behavior: smooth;
}

/* Keep anchored section titles clear of the fixed app bar. */
[id] {
    scroll-margin-top: calc(var(--appbar-height) + 24px);
}

#top {
    scroll-margin-top: 0;
}

:focus-visible {
    outline: 2px solid var(--color-accent-hover);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Blazor's FocusOnNavigate gives the page heading tabindex="-1" and focuses it
   on every navigation so screen readers announce the new page. That focus is not
   user-initiated, so a focus ring is wrong here -- it drew a red box around the
   hero wordmark on load. Real interactive elements still get their ring above. */
[tabindex="-1"]:focus,
[tabindex="-1"]:focus-visible {
    outline: none;
}

/* ---------- App bar ---------- */
.site-appbar {
    background: rgba(28, 28, 30, 0.72) !important;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.logo-lockup {
    color: inherit !important;
}

.logo-seal-letter {
    height: 1.9rem;
    width: 1.9rem;
    margin-right: 0;
    flex-shrink: 0;
}

.logo-word {
    font-family: var(--font-brand);
    font-size: 1.7rem !important;
    color: var(--color-text);
    line-height: 1;
    white-space: nowrap;
    transition: color 0.15s ease;
}

.logo-lockup:hover .logo-word {
    color: var(--color-accent);
}

/* ---------- Nav: inline links on desktop, dropdown on small screens ---------- */
.nav-links {
    display: none;
    align-items: center;
    gap: 4px;
}

.nav-link {
    position: relative;
    padding: 8px 18px;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease;
}

.nav-link::after {
    content: "";
    position: absolute;
    left: 18px;
    right: 18px;
    bottom: 2px;
    height: 2px;
    border-radius: 2px;
    background: var(--color-accent);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform 0.2s ease;
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link:hover::after {
    transform: scaleX(1);
}

.nav-links-menu {
    display: flex;
    align-items: center;
    position: relative;
}

.menu-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-surface);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 8px;
    min-width: 160px;
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.45);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-6px);
    transition: opacity 0.15s ease, transform 0.15s ease;
    z-index: 20;
}

.menu-dropdown.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

.menu-dropdown-link {
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--color-text-muted) !important;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s ease, background 0.15s ease;
}

.menu-dropdown-link:hover {
    color: var(--color-accent) !important;
    background: rgba(255, 255, 255, 0.05);
}

/* ---------- Hero ---------- */
.hero {
    position: relative;
    overflow: hidden;
    padding: 150px 0 110px;
    text-align: center;
}

.hero-content {
    position: relative;
    z-index: 1;
}

/* The glow layers get clipped by their section overflow:hidden, which left a
   hard horizontal seam at each section edge — mask them out before they hit it. */
.hero-glow,
.apps-glow,
.cta-glow {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 74%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 22%, #000 74%, transparent 100%);
}

.glow-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.35;
    animation: driftBlob 12s ease-in-out infinite;
}

.blob-1 {
    width: 420px;
    height: 420px;
    left: -10%;
    top: -15%;
    background: var(--color-accent);
}

.blob-2 {
    width: 380px;
    height: 380px;
    right: -12%;
    top: 0%;
    background: var(--color-accent-dark);
    animation-duration: 15s;
    animation-delay: -4s;
}

.blob-3 {
    width: 320px;
    height: 320px;
    left: 30%;
    bottom: -25%;
    background: var(--color-accent-hover);
    animation-duration: 10s;
    animation-delay: -8s;
}

/* Mirror the arrangement in the Apps section so the two glows do not read as a
   repeat of the same image further down the page. */
.apps-glow .glow-blob {
    opacity: 0.32;
}

.apps-glow .blob-1 {
    left: auto;
    right: -12%;
    top: -22%;
}

.apps-glow .blob-2 {
    right: auto;
    left: -10%;
    top: 8%;
}

.apps-glow .blob-3 {
    left: 52%;
    bottom: -32%;
}

@keyframes driftBlob {
    0% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(110px, -70px) scale(1.22); }
    66% { transform: translate(-90px, 60px) scale(0.88); }
    100% { transform: translate(0, 0) scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .glow-blob, .stamp-badge, .tagline, .hero-actions {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}

.stamp-badge {
    position: relative;
    width: min(44vw, 280px);
    aspect-ratio: 1 / 1;
    border-radius: 50%;
    border: 4px solid var(--color-accent);
    margin: 0 auto 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 40%, rgba(225, 29, 46, 0.12), transparent 70%);
    box-shadow: 0 0 60px rgba(225, 29, 46, 0.18);
    animation: logoSpinIn 1.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes logoSpinIn {
    0% {
        opacity: 0;
        transform: scale(0.2) rotate(-540deg);
    }
    60% {
        opacity: 1;
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

.stamp-badge::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    border: 1.5px solid var(--color-accent);
    opacity: 0.55;
}

.brand-font {
    font-family: var(--font-brand) !important;
    font-size: clamp(2.8rem, 9vw, 4.6rem) !important;
    font-weight: 400 !important;
    text-align: center;
    white-space: nowrap;
    color: var(--color-text) !important;
}

.tagline {
    color: var(--color-text-muted);
    font-size: 1.2rem;
    line-height: 1.6;
    max-width: 560px;
    margin: 24px auto 0;
    text-wrap: balance;
    animation: taglineRiseIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both;
}

@keyframes taglineRiseIn {
    from {
        opacity: 0;
        transform: translateY(24px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 40px;
    flex-wrap: wrap;
    animation: taglineRiseIn 0.7s cubic-bezier(0.16, 1, 0.3, 1) 1.1s both;
}

.cta-button,
.cta-button-outline {
    border-radius: 999px !important;
    padding: 0 32px !important;
    text-transform: none !important;
    font-weight: 600 !important;
}

.cta-button {
    box-shadow: 0 8px 24px rgba(225, 29, 46, 0.28) !important;
}

.cta-button-outline {
    color: var(--color-text) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
}

.cta-button-outline:hover {
    border-color: var(--color-accent) !important;
    color: var(--color-accent) !important;
}

/* ---------- Sections ---------- */
.section {
    position: relative;
    padding: var(--section-pad) 0;
}

.section::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.35), transparent);
    z-index: 2;
    animation: dividerPulse 7s ease-in-out infinite;
}

/* drop-shadow, not box-shadow: the line is a gradient that fades to transparent
   at both ends, and box-shadow would halo the full element box — putting a glow
   either side of where the line is invisible. drop-shadow follows the alpha. */
@keyframes dividerPulse {
    0%, 100% {
        opacity: 0.5;
        filter: drop-shadow(0 0 3px rgba(255, 255, 255, 0.12));
    }
    50% {
        opacity: 1;
        filter: drop-shadow(0 0 8px rgba(255, 255, 255, 0.4));
    }
}

/* Offset each divider so they breathe independently — pulsing in unison reads as
   the whole page flickering. Counts <section> siblings inside <main>, where the
   hero is 1; reorder the sections and these delays just reshuffle harmlessly. */
.section:nth-of-type(3)::before {
    animation-delay: -1.75s;
}

.section:nth-of-type(4)::before {
    animation-delay: -3.5s;
}

.section:nth-of-type(5)::before {
    animation-delay: -5.25s;
}


.apps-content {
    position: relative;
    z-index: 1;
}

.section-heading {
    margin-bottom: 44px;
}

.section-title {
    position: relative;
    display: inline-block;
    font-weight: 700 !important;
    letter-spacing: -0.01em;
}

.section-title::after {
    content: "";
    display: block;
    width: 48px;
    height: 3px;
    background: var(--color-accent);
    margin-top: 14px;
    border-radius: 2px;
}

.section-subtitle {
    margin-top: 16px;
    font-size: 1.05rem;
}

/* ---------- About ---------- */
.about-lead {
    max-width: 700px;
    font-size: 1.45rem;
    line-height: 1.45;
    font-weight: 500;
    color: var(--color-text) !important;
    text-wrap: balance;
}

.about-copy {
    max-width: 700px;
    font-size: 1.05rem;
    line-height: 1.75;
    margin-top: 20px;
}

/* ---------- Contact ---------- */
.contact-item {
    display: flex;
    align-items: center;
    gap: 16px;
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 14px !important;
    padding: 20px 24px !important;
    height: 100%;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.contact-item:hover {
    border-color: var(--color-accent) !important;
    transform: translateY(-4px);
}

.contact-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 50%;
    background: rgba(225, 29, 46, 0.15);
    color: var(--color-accent) !important;
}

.contact-label {
    display: block;
    margin-bottom: 2px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.7rem !important;
}

.contact-value {
    color: var(--color-text) !important;
    font-weight: 600;
    word-break: break-word;
}

.contact-value:hover {
    color: var(--color-accent) !important;
}

/* ---------- Footer ---------- */
.site-footer {
    padding: 56px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.footer-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 24px;
    text-align: center;
}

.footer-lockup {
    display: flex;
    align-items: center;
    color: inherit !important;
}

.footer-seal {
    height: 1.6rem;
    width: 1.6rem;
    flex-shrink: 0;
}

.footer-word {
    font-family: var(--font-brand);
    font-size: 1.45rem !important;
    color: var(--color-text);
    line-height: 1;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 28px;
}

.footer-link {
    color: var(--color-text-muted) !important;
    font-size: 0.95rem;
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-link:hover {
    color: var(--color-accent) !important;
}

.footer-copyright {
    color: var(--color-text-muted);
    opacity: 0.7;
}

/* ---------- Skip link ---------- */
.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 2000;
    padding: 12px 20px;
    border-radius: 0 0 10px 10px;
    background: var(--color-accent);
    color: #fff !important;
    font-weight: 600;
    text-decoration: none;
    transition: top 0.15s ease;
}

.skip-link:focus {
    top: 0;
}

/* ---------- Nav CTA ---------- */
.nav-link-cta {
    margin-left: 10px;
    padding: 8px 20px;
    border: 1px solid var(--color-accent);
    border-radius: 999px;
    color: var(--color-text) !important;
}

.nav-link-cta::after {
    display: none;
}

.nav-link-cta:hover {
    background: var(--color-accent);
    color: #fff !important;
}

/* ---------- Services ---------- */
.service-card {
    height: 100%;
    padding: 28px 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 14px;
    transition: border-color 0.2s ease, transform 0.2s ease;
}

.service-card:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
}

.service-icon {
    width: 44px;
    height: 44px;
    padding: 10px;
    border-radius: 12px;
    background: rgba(225, 29, 46, 0.15);
    color: var(--color-accent) !important;
}

.service-title {
    margin: 18px 0 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
}

.service-description {
    margin: 10px 0 0;
    font-size: 0.95rem;
    line-height: 1.65;
    color: var(--color-text-muted);
}

/* ---------- Work / case study ---------- */
.work-section {
    position: relative;
    overflow: hidden;
}

.work-case {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    align-items: center;
    padding: 28px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
}

.work-shot {
    display: block;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--color-border);
    line-height: 0;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
}

.work-shot img {
    width: 100%;
    height: auto;
    display: block;
}

.work-shot:hover {
    border-color: var(--color-accent);
    transform: translateY(-4px);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.4);
}

.work-sector {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.work-name {
    margin: 10px 0 0;
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--color-text);
}

.work-summary {
    margin: 14px 0 0;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.work-highlights {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.work-highlights li {
    padding: 5px 12px;
    border: 1px solid var(--color-border);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    color: var(--color-text-muted);
}

.work-link {
    margin: 20px 0 0 -8px !important;
    text-transform: none !important;
    font-weight: 600 !important;
}

.work-footnote {
    margin: 32px 0 0;
    font-size: 1rem;
    color: var(--color-text-muted);
}

.work-footnote-link {
    color: var(--color-accent) !important;
    font-weight: 600;
}

/* ---------- Contact form ---------- */
.contact-form-panel {
    padding: 32px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
}

/* Honeypot: off-canvas rather than display:none, because some bots skip
   display:none fields. Never focusable, never announced. */
.hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
}

.form-note {
    flex: 1 1 200px;
}

.form-result {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding: 16px 0;
}

.form-result-icon {
    width: 48px;
    height: 48px;
    padding: 10px;
    border-radius: 50%;
    background: rgba(225, 29, 46, 0.15);
    color: var(--color-accent) !important;
    margin-bottom: 8px;
}

.form-result-title {
    font-weight: 700 !important;
}

.alert-link {
    color: inherit !important;
    font-weight: 700;
    text-decoration: underline;
}

.contact-rows {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.contact-value-plain {
    display: block;
    color: var(--color-text);
    font-weight: 600;
}

/* ---------- 404 / error pages ---------- */
.status-page {
    min-height: 70vh;
    display: flex;
    align-items: center;
}

.status-code {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.status-title {
    margin: 14px 0 0;
    font-size: clamp(1.9rem, 5vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    color: var(--color-text);
}

.status-copy {
    margin: 18px auto 0;
    max-width: 480px;
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--color-text-muted);
}

.status-requestid {
    margin-top: 36px;
    font-size: 0.8rem;
    color: var(--color-text-muted);
    opacity: 0.6;
}

/* ---------- Footer additions ---------- */
.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.footer-blurb {
    margin: 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    opacity: 0.8;
}

/* ---------- Closing CTA band on the home page ---------- */
.cta-band {
    position: relative;
    overflow: hidden;
    text-align: center;
}

/* This band is roughly a third the height of the hero, so the shared 22%/74%
   fade masks out most of the blob area and the glow reads far weaker than the
   sections above. Ease the fade off and sit the blobs inside the visible strip. */
.cta-glow {
    -webkit-mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 86%, transparent 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, #000 12%, #000 86%, transparent 100%);
}

/* Third arrangement, so the closing band doesn't mirror the hero or the work
   section. Both side blobs pulled inward; the centred copy sits in the gap. */
.cta-glow .glow-blob {
    opacity: 0.38;
}

.cta-glow .blob-1 {
    left: -12%;
    top: -8%;
}

.cta-glow .blob-2 {
    right: -12%;
    top: -2%;
}

.cta-glow .blob-3 {
    left: 40%;
    bottom: -35%;
}

.cta-band-inner {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cta-band-title {
    margin: 0;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    font-weight: 700;
    letter-spacing: -0.01em;
    color: var(--color-text);
}

.cta-band-copy {
    margin: 16px 0 32px;
    max-width: 460px;
    font-size: 1.1rem;
    line-height: 1.65;
    color: var(--color-text-muted);
    text-wrap: balance;
}

/* ---------- Contact page ---------- */
.contact-page {
    position: relative;
    overflow: hidden;
    padding-top: 140px;
}

.contact-page-inner {
    position: relative;
    z-index: 1;
}

.contact-intro {
    max-width: 620px;
    margin-bottom: 48px;
}

.contact-page-title {
    margin: 0;
    font-size: clamp(2.2rem, 6vw, 3.2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.1;
    color: var(--color-text);
}

.contact-page-copy {
    margin: 20px 0 0;
    font-size: 1.15rem;
    line-height: 1.7;
    color: var(--color-text-muted);
}

.contact-aside {
    margin: 4px 0 0;
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--color-text-muted);
}

.contact-aside-link {
    color: var(--color-accent) !important;
    font-weight: 600;
}

/* ---------- Admin: sign in ---------- */
.admin-auth {
    min-height: 70vh;
    display: flex;
    align-items: center;
    padding-top: 140px;
}

.admin-auth-card {
    max-width: 420px;
    margin: 0 auto;
    padding: 32px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
}

.admin-auth-title {
    margin: 0 0 20px;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-text);
}

.admin-auth-copy {
    margin: 0;
    color: var(--color-text-muted);
    line-height: 1.65;
}

.admin-auth-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.admin-auth-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.admin-auth-input {
    padding: 12px 14px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text);
    font-size: 1rem;
    font-family: inherit;
}

.admin-auth-input:focus {
    outline: 2px solid var(--color-accent);
    outline-offset: 1px;
    border-color: transparent;
}

.admin-auth-button,
.admin-logout {
    padding: 12px 24px;
    background: var(--color-accent);
    border: none;
    border-radius: 999px;
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease;
}

.admin-auth-button:hover,
.admin-logout:hover {
    background: var(--color-accent-hover);
}

.admin-logout {
    padding: 8px 18px;
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

.admin-logout:hover {
    background: transparent;
    border-color: var(--color-accent);
    color: var(--color-accent);
}

/* ---------- Admin: inbox ---------- */
.admin-page {
    padding-top: 140px;
}

.admin-header {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 32px;
}

.admin-title {
    margin: 0;
    font-size: clamp(1.8rem, 4vw, 2.4rem);
    font-weight: 700;
    color: var(--color-text);
}

.admin-subtitle {
    margin: 8px 0 0;
    color: var(--color-text-muted);
}

.admin-empty {
    padding: 56px 24px;
    text-align: center;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
}

.admin-empty-icon {
    width: 48px;
    height: 48px;
    color: var(--color-border) !important;
    margin-bottom: 12px;
}

.admin-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.admin-item {
    padding: 24px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
}

/* Unread gets an accent edge rather than a different background, so the list
   still reads as one column of cards. */
.admin-item.unread {
    border-left: 3px solid var(--color-accent);
}

.admin-item-head {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: flex-start;
    justify-content: space-between;
}

.admin-item-name {
    margin: 0;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-text);
}

.admin-item-business {
    margin-left: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--color-text-muted);
}

.admin-item-meta {
    margin: 6px 0 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.admin-item-link {
    color: var(--color-text-muted);
    text-decoration: none;
}

.admin-item-link:hover {
    color: var(--color-accent);
}

.admin-item-sep {
    margin: 0 8px;
    opacity: 0.5;
}

.admin-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
}

.admin-status.status-sent {
    border-color: rgba(120, 200, 140, 0.4);
    color: #8fd3a3;
}

.admin-status.status-failed {
    border-color: var(--color-accent);
    color: var(--color-accent-hover);
}

.admin-item-message {
    margin: 16px 0 0;
    padding: 16px;
    background: var(--color-bg);
    border-radius: 10px;
    line-height: 1.7;
    color: var(--color-text);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.admin-item-actions {
    margin-top: 12px;
}

/* ---------- Pong (hidden page) ---------- */
.pong-page {
    position: relative;
    overflow: hidden;
    /* Tight on purpose: the board should clear the fold on a laptop rather than
       making you scroll to find the game you just unlocked. */
    padding: 84px 0 64px;
    text-align: center;
}

.pong-inner {
    position: relative;
    z-index: 1;
}

.pong-eyebrow {
    margin: 0;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--color-accent);
}

.pong-title {
    margin: 12px 0 0;
    font-size: clamp(2.2rem, 6vw, 3rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--color-text);
}

.pong-copy {
    margin: 12px auto 0;
    max-width: 440px;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--color-text-muted);
    text-wrap: balance;
}

/* Same surface treatment as the cards elsewhere, so the game reads as part of
   the site rather than an embedded widget. */
.pong-frame {
    margin: 26px auto 0;
    padding: 12px;
    max-width: 716px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 18px;
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.4);
}

.pong-canvas {
    display: block;
    width: 100%;
    height: auto;
    /* Matches the canvas's fixed logical resolution so it never distorts. */
    aspect-ratio: 800 / 500;
    border-radius: 10px;
    background: var(--color-bg);
    cursor: none;
    touch-action: none;
}

.pong-canvas:focus-visible {
    outline: 2px solid var(--color-accent-hover);
    outline-offset: 3px;
}

.pong-footnote {
    margin: 22px 0 0;
    font-size: 0.95rem;
    color: var(--color-text-muted);
}

.pong-back {
    color: var(--color-accent) !important;
    font-weight: 600;
    margin-left: 6px;
}

/* ---------- Breakpoints (kept last so they win over the base rules) ---------- */
@media (max-width: 899px) {
    :root {
        --section-pad: 80px;
    }

    .hero {
        padding: 120px 0 88px;
    }

    .section-heading {
        margin-bottom: 32px;
    }

    .about-lead {
        font-size: 1.25rem;
    }
}

@media (min-width: 900px) {
    .nav-links {
        display: flex;
    }

    .nav-links-menu {
        display: none;
    }

    .footer-inner {
        flex-direction: row;
        justify-content: space-between;
        text-align: left;
    }
}
/* ---------- Breakpoints for the new sections (kept last) ---------- */
@media (min-width: 900px) {
    .work-case {
        grid-template-columns: 1.15fr 1fr;
        gap: 40px;
        padding: 32px;
    }

    .footer-brand {
        align-items: flex-start;
    }
}

@media (max-width: 899px) {
    .contact-form-panel {
        padding: 24px 20px;
    }

    .work-case {
        padding: 20px;
    }

    .work-name {
        font-size: 1.35rem;
    }
}
/* ---------- Contact-page breakpoints (kept last) ---------- */
@media (max-width: 899px) {
    .contact-page {
        padding-top: 112px;
    }

    .contact-intro {
        margin-bottom: 32px;
    }

    .contact-page-copy {
        font-size: 1.05rem;
    }
}

@media (max-width: 899px) {
    /* The blobs are wider than a phone viewport, so all three overlap and the
       closing band turns into one solid red wash. Ease them back so it reads
       like the hero rather than louder than it. */
    .cta-glow .glow-blob {
        opacity: 0.26;
    }
}

/* Kept at the end of the file on purpose: the earlier prefers-reduced-motion
   block sits ABOVE .section::before, so an override there would lose the cascade
   to the animation declared later. */
@media (prefers-reduced-motion: reduce) {
    .section::before {
        animation: none;
        opacity: 1;
        filter: none;
    }
}
/* ---------- Admin breakpoints (kept last) ---------- */
@media (max-width: 899px) {
    .admin-page,
    .admin-auth {
        padding-top: 112px;
    }

    .admin-item {
        padding: 18px;
    }
}
/* ---------- Pong breakpoints (kept last) ---------- */
@media (max-width: 899px) {
    .pong-page {
        padding-top: 104px;
    }

    .pong-frame {
        padding: 8px;
        margin-top: 28px;
    }

    /* A mouse-following paddle needs a visible cursor on touch devices anyway. */
    .pong-canvas {
        cursor: auto;
    }
}

/* =========================================================
   GRID LAYOUTS for the hand-rolled primitives.
   Base first, then their media queries, so the ordering rule that governs the
   rest of this file still holds for these selectors.
   ========================================================= */
.about-copy-wrap { max-width: 700px; }

/* MudBlazor utility classes used to supply these; they have to be real CSS now. */
.logo-lockup {
    display: flex;
    align-items: center;
    margin-right: auto;   /* pushes the nav to the right edge */
    text-decoration: none;
}

.work-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin: 20px 0 0 !important;
    color: var(--color-accent) !important;
    text-decoration: none;
}

.work-link-icon { width: 18px; height: 18px; }

.contact-value { text-decoration: none; }

.form-result-title { font-size: 1.25rem; margin: 0; }

.form-result-copy { color: var(--color-text-muted); margin: 0; }

.form-slow-note {
    margin: 14px 0 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
    opacity: 0.85;
}

.contact-grid {
    display: grid;
    gap: 32px;
    grid-template-columns: 1fr;
    align-items: start;
}

@media (min-width: 600px) {
    .field-grid { grid-template-columns: 1fr 1fr; }
    .field-wide { grid-column: 1 / -1; }
}

@media (min-width: 700px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 1000px) {
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .contact-grid { grid-template-columns: 7fr 5fr; gap: 48px; }
}
