/* ==========================================================================
   Giddens Consulting — Digital Blueprint Architecture Theme
   Navy · Charcoal · Cyan · Amber — Precision Engineering Aesthetic
   ========================================================================== */

:root {
    /* — Core Navy & Charcoal — */
    --navy: #0B1426;
    --navy-light: #111D35;
    --navy-mid: #162544;
    --charcoal: #1A1F2E;
    --slate: #2A3142;
    --slate-light: #3A4256;

    /* — Cyan / Teal Accents — */
    --cyan: #00D4FF;
    --cyan-dim: #0099CC;
    --cyan-glow: rgba(0, 212, 255, 0.15);
    --teal: #00B8A9;

    /* — Amber / Gold Craft Accents — */
    --amber: #F5A623;
    --amber-glow: rgba(245, 166, 35, 0.15);
    --gold: #E8C547;

    /* — Neutrals — */
    --white: #FFFFFF;
    --off-white: #F0F2F5;
    --text-primary: #E8ECF1;
    --text-secondary: #8892A4;
    --text-muted: #5A6577;
    --border: rgba(0, 212, 255, 0.08);
    --border-hover: rgba(0, 212, 255, 0.2);

    /* — Typography — */
    --font-display: 'Syne', sans-serif;
    --font-body: 'DM Sans', sans-serif;
    --font-mono: 'JetBrains Mono', monospace;

    /* — Shadows — */
    --shadow-card: 0 4px 24px rgba(0, 0, 0, 0.3), 0 0 0 1px var(--border);
    --shadow-card-hover: 0 8px 40px rgba(0, 0, 0, 0.4), 0 0 0 1px var(--border-hover);
    --shadow-glow: 0 0 30px rgba(0, 212, 255, 0.1);

    /* — Radius — */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-pill: 50px;
}

/* — Reset & Base — */
*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    font-weight: 400;
    color: var(--text-primary);
    background: var(--navy);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* — Typography — */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.02em;
    color: var(--white);
}

h1:focus { outline: none; }

a {
    color: var(--cyan);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--amber);
}

/* — Buttons — */
.btn-primary {
    font-family: var(--font-body);
    font-weight: 600;
    color: var(--navy);
    background: var(--cyan);
    border: none;
    border-radius: var(--radius-pill);
    padding: 14px 36px;
    font-size: 0.95rem;
    letter-spacing: 0.3px;
    box-shadow: 0 4px 20px rgba(0, 212, 255, 0.3);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
    background: var(--white);
    color: var(--navy);
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
    box-shadow: 0 0 0 0.15rem var(--navy), 0 0 0 0.3rem var(--cyan);
}

/* — Content — */
.content {
    padding-top: 0;
}

/* — Forms — */
.valid.modified:not([type=checkbox]) {
    outline: 2px solid var(--teal);
}

.invalid {
    outline: 2px solid #FF4757;
}

.validation-message {
    color: #FF4757;
    font-family: var(--font-mono);
    font-size: 0.85rem;
}

/* — Error UI — */
#blazor-error-ui {
    color-scheme: dark only;
    background: var(--charcoal);
    bottom: 0;
    box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.4);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    font-family: var(--font-mono);
    color: var(--text-primary);
    border-top: 1px solid var(--cyan-dim);
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
}

.blazor-error-boundary {
    background: #FF4757;
    padding: 1rem 1.5rem;
    color: white;
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.blazor-error-boundary::after {
    content: "Runtime exception. Check console for details."
}

/* — Loader — */
.gc-loader {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--navy);
    position: relative;
    overflow: hidden;
}

.gc-loader-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(0, 212, 255, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.04) 1px, transparent 1px);
    background-size: 48px 48px;
}

.gc-loader-content {
    position: relative;
    text-align: center;
    z-index: 1;
}

.gc-loader-mark {
    font-family: var(--font-mono);
    font-size: 2rem;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 2px;
    margin-bottom: 16px;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.4);
    animation: loaderPulse 2s ease-in-out infinite;
}

.gc-loader-text {
    font-family: var(--font-mono);
    font-size: 0.85rem;
    color: var(--text-muted);
    letter-spacing: 3px;
    text-transform: uppercase;
    margin-bottom: 20px;
    animation: loaderFade 1.5s ease-in-out infinite;
}

.gc-loader-bar {
    width: 200px;
    height: 2px;
    background: var(--slate);
    border-radius: 1px;
    overflow: hidden;
    margin: 0 auto;
}

.gc-loader-fill {
    width: 40%;
    height: 100%;
    background: linear-gradient(90deg, var(--cyan), var(--teal));
    border-radius: 1px;
    animation: loaderSlide 1.2s ease-in-out infinite;
}

@keyframes loaderPulse {
    0%, 100% { opacity: 0.7; }
    50% { opacity: 1; }
}

@keyframes loaderFade {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 0.8; }
}

@keyframes loaderSlide {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

/* — Code — */
code {
    color: var(--cyan);
    font-family: var(--font-mono);
    font-size: 0.9em;
    background: rgba(0, 212, 255, 0.08);
    padding: 2px 6px;
    border-radius: 4px;
}

/* — Scrollbar — */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--navy);
}

::-webkit-scrollbar-thumb {
    background: var(--slate);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-light);
}

/* — Selection — */
::selection {
    background: rgba(0, 212, 255, 0.3);
    color: var(--white);
}

/* — Global Animations — */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes drawLine {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

@keyframes gridScroll {
    from { background-position: 0 0; }
    to { background-position: 48px 48px; }
}

/* — Form Floating — */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: var(--text-muted);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    text-align: start;
}
