/* =====================================================
   DESIGN SYSTEM — Reed Technology Consulting
   Dark / Technical Theme
   ===================================================== */

:root {
    --bg-primary:    #0d1117;
    --bg-secondary:  #161b22;
    --bg-card:       #1c2128;
    --bg-card-hover: #21262d;
    --accent-blue:   #58a6ff;
    --accent-green:  #3fb950;
    --accent-purple: #a371f7;
    --text-primary:  #f0f6fc;
    --text-secondary:#8b949e;
    --text-muted:    #6e7681;
    --border:        #21262d;
    --border-muted:  #30363d;
    --shadow-sm:     0 1px 3px rgba(0,0,0,0.4);
    --shadow:        0 8px 24px rgba(0,0,0,0.4);
    --shadow-lg:     0 16px 48px rgba(0,0,0,0.5);
    --radius:        8px;
    --radius-lg:     14px;
    --nav-height:    64px;
    --container:     1160px;
    --font-body:     'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono:     'JetBrains Mono', 'Cascadia Code', 'Fira Code', monospace;
}

/* ---- Reset & Base --------------------------------- */

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

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
    background: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1:focus {
    outline: none;
}

p {
    margin: 0;
}

a {
    color: var(--accent-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

img {
    max-width: 100%;
}

/* ---- Loading Screen ------------------------------- */

.app-loading {
    position: fixed;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: var(--bg-primary);
    gap: 1.75rem;
}

.loading-logo {
    width: 140px;
    height: 140px;
    object-fit: contain;
    mix-blend-mode: screen;
}

.loading-progress {
    width: 5rem;
    height: 5rem;
    display: block;
}

.loading-progress circle {
    fill: none;
    stroke: var(--border);
    stroke-width: 0.5rem;
    transform-origin: 50% 50%;
    transform: rotate(-90deg);
}

.loading-progress circle:last-child {
    stroke: var(--accent-blue);
    stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
    transition: stroke-dasharray 0.05s ease-in-out;
}

/* ---- Blazor Error UI ------------------------------ */

#blazor-error-ui {
    color-scheme: dark;
    background: #2d1515;
    border-top: 1px solid #7f1d1d;
    color: #fca5a5;
    bottom: 0;
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.75rem 1.5rem;
    position: fixed;
    width: 100%;
    z-index: 9999;
    font-size: 0.9rem;
}

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

#blazor-error-ui .dismiss:hover {
    opacity: 1;
}

/* ---- Container ------------------------------------ */

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ---- Buttons -------------------------------------- */

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-blue);
    color: #0d1117;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    border: none;
    cursor: pointer;
    transition: background 0.15s, transform 0.1s, box-shadow 0.15s;
    text-decoration: none;
}

.btn-primary:hover {
    background: #79b8ff;
    color: #0d1117;
    text-decoration: none;
    box-shadow: 0 0 20px rgba(88,166,255,0.35);
    transform: translateY(-1px);
}

.btn-primary.btn-large {
    font-size: 1.05rem;
    padding: 0.9rem 2.25rem;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: transparent;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.75rem 1.75rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-muted);
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s, background 0.15s;
    text-decoration: none;
}

.btn-outline:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(88,166,255,0.06);
    text-decoration: none;
}

/* ---- Section labels ------------------------------- */

.section-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--accent-blue);
    margin-bottom: 0.75rem;
}

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 0.75rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 560px;
    margin: 0 auto;
}

/* ---- Hero Section --------------------------------- */

.hero {
    position: relative;
    min-height: calc(100vh - var(--nav-height));
    display: flex;
    align-items: center;
    overflow: hidden;
    padding: 5rem 0;
}

.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(88,166,255,0.07) 1px, transparent 1px);
    background-size: 28px 28px;
    z-index: 0;
}

.hero::after {
    content: '';
    position: absolute;
    top: -10%;
    right: -5%;
    width: 55%;
    height: 70%;
    background: radial-gradient(ellipse, rgba(88,166,255,0.06) 0%, transparent 65%);
    z-index: 0;
    pointer-events: none;
}

.hero-content {
    position: relative;
    z-index: 1;
    max-width: 760px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    padding: 0.35rem 0.85rem;
    margin-bottom: 1.75rem;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 8px var(--accent-green);
    flex-shrink: 0;
}

.hero h1 {
    font-size: clamp(2.4rem, 5.5vw, 3.75rem);
    font-weight: 800;
    letter-spacing: -0.025em;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, #f0f6fc 0%, #8b949e 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-sub {
    font-size: clamp(1rem, 2vw, 1.2rem);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2.5rem;
    max-width: 620px;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

/* ---- Services Section ----------------------------- */

.services-section {
    padding: 6rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.service-card:hover {
    border-color: var(--border-muted);
    transform: translateY(-3px);
    box-shadow: var(--shadow);
}

.service-card.featured {
    border-color: var(--accent-blue);
    background: linear-gradient(145deg, #1c2128 0%, #1a2233 100%);
    box-shadow: 0 0 0 1px rgba(88,166,255,0.15), var(--shadow);
}

.service-icon {
    width: 48px;
    height: 48px;
    background: rgba(88,166,255,0.1);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.service-icon svg {
    width: 22px;
    height: 22px;
}

.service-card h3 {
    font-size: 1.1rem;
    font-weight: 600;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.93rem;
    line-height: 1.65;
    flex: 1;
}

.card-link {
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--accent-blue);
    text-decoration: none;
    margin-top: auto;
}

.card-link:hover {
    text-decoration: underline;
}

/* ---- Why Section ---------------------------------- */

.why-section {
    padding: 6rem 0;
}

.why-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5rem;
    align-items: center;
}

.why-content h2 {
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    margin-bottom: 1rem;
}

.why-content > p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 2rem;
}

.why-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.why-list li {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.check-icon {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: rgba(63,185,80,0.12);
    color: var(--accent-green);
    font-size: 0.75rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.why-list strong {
    display: block;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.2rem;
}

.why-list span {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* ---- Code Window Decoration ----------------------- */

.code-window {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.code-window-bar {
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.code-window-bar .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

.dot.red    { background: #ff5f57; }
.dot.yellow { background: #febc2e; }
.dot.green  { background: #28c840; }

.code-window-title {
    margin-left: 0.5rem;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: var(--text-muted);
}

.code-block {
    margin: 0;
    padding: 1.75rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    line-height: 1.8;
    color: var(--text-secondary);
    overflow-x: auto;
}

.code-block .kw   { color: #ff7b72; }
.code-block .cls  { color: #79c0ff; }
.code-block .pu   { color: var(--text-secondary); }
.code-block .fn   { color: #d2a8ff; }

/* ---- CTA Section ---------------------------------- */

.cta-section {
    padding: 5rem 0;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    text-align: center;
}

.cta-section h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    margin-bottom: 1rem;
}

.cta-section p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 500px;
    margin: 0 auto 2.5rem;
}

/* ---- Footer --------------------------------------- */

.site-footer {
    background: var(--bg-primary);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
}

.footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-copy {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
}

.footer-links a {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-links a:hover {
    color: var(--text-primary);
}

/* ---- Page header (inner pages) -------------------- */

.page-header {
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-secondary);
}

.page-header h1 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    margin-bottom: 0.75rem;
}

.page-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    max-width: 580px;
}

/* ---- Services Detail Page ------------------------- */

.services-detail {
    padding: 5rem 0;
}

.service-block {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 3rem;
    padding: 3rem 0;
    border-bottom: 1px solid var(--border);
    align-items: start;
}

.service-block:last-child {
    border-bottom: none;
}

.service-block-icon {
    width: 56px;
    height: 56px;
    background: rgba(88,166,255,0.1);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-blue);
    margin-bottom: 1.25rem;
}

.service-block-icon svg {
    width: 26px;
    height: 26px;
}

.service-block-meta h3 {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.35rem;
}

.service-block-meta .service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
}

.service-block-body p {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
}

.service-features {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.service-features li {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.service-features li::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-blue);
    flex-shrink: 0;
}

/* ---- About Page ----------------------------------- */

.about-section {
    padding: 5rem 0;
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.about-text h2 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.about-text p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1.25rem;
}

.about-text p:last-child {
    margin-bottom: 0;
}

.values-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.value-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    transition: border-color 0.15s;
}

.value-card:hover {
    border-color: var(--border-muted);
}

.value-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
    display: block;
}

.value-card h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

.value-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.55;
}

.tech-stack {
    margin-top: 3rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border);
}

.tech-stack h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.tech-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.tech-tag {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--accent-blue);
    background: rgba(88,166,255,0.08);
    border: 1px solid rgba(88,166,255,0.2);
    border-radius: 6px;
    padding: 0.3rem 0.7rem;
}

/* ---- Contact Page --------------------------------- */

.contact-section {
    padding: 5rem 0;
}

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

.contact-info h2 {
    font-size: 1.75rem;
    margin-bottom: 1.25rem;
}

.contact-info p {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-email-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-email-card .email-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
}

.contact-email-card .email-address {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--accent-blue);
    text-decoration: none;
}

.contact-email-card .email-address:hover {
    text-decoration: underline;
}

.contact-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.contact-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
}

.contact-card h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 1.75rem;
}

.expect-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.expect-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.92rem;
    color: var(--text-secondary);
}

.expect-list li::before {
    content: '→';
    color: var(--accent-blue);
    font-weight: 600;
    flex-shrink: 0;
}

/* ---- Privacy Policy ------------------------------- */

.privacy-section {
    padding: 5rem 0;
}

.prose {
    max-width: 720px;
}

.prose h2 {
    font-size: 1.3rem;
    margin: 2.5rem 0 0.875rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.prose h2:first-child {
    margin-top: 0;
}

.prose p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.prose ul {
    color: var(--text-secondary);
    padding-left: 1.5rem;
    margin-bottom: 1rem;
    line-height: 1.75;
}

.prose ul li {
    margin-bottom: 0.35rem;
}

.prose a {
    color: var(--accent-blue);
}

.prose .last-updated {
    display: inline-block;
    font-size: 0.82rem;
    color: var(--text-muted);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 0.35rem 0.75rem;
    margin-bottom: 2rem;
}

/* ---- Not Found ------------------------------------ */

.not-found {
    min-height: calc(100vh - var(--nav-height) - 80px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 4rem 1.5rem;
}

.not-found-code {
    font-family: var(--font-mono);
    font-size: 6rem;
    font-weight: 800;
    color: var(--border-muted);
    line-height: 1;
    margin-bottom: 1rem;
}

.not-found h2 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.not-found p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

/* ---- Responsive ----------------------------------- */

@media (max-width: 900px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 520px;
        margin: 0 auto;
    }

    .why-grid,
    .about-grid,
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }

    .service-block {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .service-features {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .hero {
        padding: 3rem 0;
        min-height: auto;
    }

    .hero-actions {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-actions .btn-primary,
    .hero-actions .btn-outline {
        width: 100%;
        justify-content: center;
    }

    .footer-inner {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}
