/* Dark purple theme adjustments */
:root {
    --bg: #0c0a12;
    /* deep aubergine */
    --bg-elev-1: #120f1b;
    /* card base */
    --bg-elev-2: #171327;
    /* card hover */
    --text: #e9e7f5;
    --text-muted: #b9b3d9;
    --text-subtle: #9a94c2;
    --border: #251f38;
    --border-soft: #2d2746;
    --accent: #fa8bf6;
    /* soft purple */
    --accent-2: #c084fc;
    /* lighter purple */
    --danger: #ef4444;
    --success: #22c55e;
    --shadow: 0 10px 30px rgba(20, 15, 40, 0.45);
    --ring: 0 0 0 2px rgba(167, 139, 250, 0.35);
}

html {
    box-sizing: border-box;
    overflow-x: hidden;
}

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

html,
body {
    background: radial-gradient(1200px 500px at 10% -10%, rgba(108, 64, 247, 0.08), transparent 60%), var(--bg);
    display: flex;
    flex-direction: column;
    width: 100%;
    overflow-x: hidden;
}

body {
    font-family: system-ui, Roboto, sans-serif;
    line-height: 1.5;
    margin: 0;
    padding: 0;
    color: var(--text);
    
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100vh;
}


#bighead {
    width: 100%;
    max-width: 100%;
    background: linear-gradient(180deg, 
        rgba(192, 132, 252, 0.07) 0%, 
        rgba(0, 0, 0, 0) 100%), 
        var(--bg-elev-1);
    border-bottom: 1px solid var(--border);
    padding: 2rem 1rem;
    box-shadow: 0 4px 20px rgba(20, 15, 40, 0.5);
    margin-bottom: 1.5rem;
    box-sizing: border-box;
}

#bighead .first-line {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 60rem;
    margin: 0 auto;
}

#bighead .container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
    width: 100%;
}

#bighead .logo {
    display: flex;
    align-items: center;
    justify-content: center;
}

#bighead .logo i {
    font-size: 4rem;
    color: var(--accent-2);
    text-shadow: 0 0 20px rgba(192, 132, 252, 0.4);
    transition: transform 200ms ease;
}

#bighead .logo i:hover {
    transform: scale(1.1) rotate(10deg);
}

#bighead .title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

#bighead .headline {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--accent-2);
    letter-spacing: 1px;
    text-transform: uppercase;
}

#bighead h1 {
    margin: 0;
    font-size: 3rem;
    font-weight: 700;
    color: var(--text);
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--accent-2), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}


#services-container {
    display: grid;
    gap: 1.25rem;
    width: 100%;
    max-width: 60rem;
    padding: 0 1rem;
    margin: 1.5rem auto;
    flex: 1;
    box-sizing: border-box;
}

.service-category, .heading-container {
    border: 0.1em solid var(--border);
    border-radius: 1rem;
    padding: 1rem;
    background:
        linear-gradient(180deg, rgba(167, 139, 250, 0.06), rgba(0, 0, 0, 0)),
        var(--bg-elev-1);
}


.heading-container {
    max-width: 40rem;
    margin-inline: 1rem;
}

.heading-container h1 {
    text-align: center;
}

.heading-container h4 {
    margin-bottom: 0;
}

.message-header {
    background: rgba(192, 132, 252, 0.12);
    border: 1px solid rgba(192, 132, 252, 0.35);
    border-radius: 8px;
    padding: 0.5rem 0.75rem;
    margin-bottom: 1rem;
    color: var(--accent-2);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.message-header i {
    font-size: 1.6rem;
}

.service-category h2 {
    position: relative;
    margin: 0.5rem 0 0.6rem 0;
    font-size: 1.15rem;
    color: var(--text);
    padding-bottom: 0.55rem;
}

.service-category h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    height: 2px;
    width: 100%;
    background: linear-gradient(90deg, var(--accent), rgba(0, 0, 0, 0));
}

.service-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15em, 1fr));
    gap: 1rem;
    margin: 0.25rem 0 1.2rem 0;
}

.service-card {
    background: var(--bg-elev-1);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.9rem 0.95rem;
    box-shadow: var(--shadow);
    transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.service-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-soft);
    background: var(--bg-elev-2);
    box-shadow: 0 14px 36px rgba(34, 22, 68, 0.55);
}

.service-link {
    color: inherit;
    text-decoration: none;
    display: block;
}

.service-card p {
    margin: 0 0 0.6rem 0;
    color: var(--text-muted);
}

.service-title {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;;
    min-height: 3.5em;
    max-width: 100%;
}

.service-title h3 {
    margin: 0 0 0.35rem 0;
    font-size: 1.02rem;
    font-weight: 600;
    letter-spacing: 0.2px;
    color: var(--text);
    word-wrap: break-word;
    min-width: 0;
}

.service-icon, i {
    width: 2.5em;
    height: 2.5em;
    object-fit: contain;
    float: left;
    margin-right: 0.7rem;
}

i {
    font-size: 2em;
    max-height: 1em;
}

.service-icon {
    border-radius: 8px;
    background: linear-gradient(180deg, rgba(167, 139, 250, 0.08), rgba(0, 0, 0, 0)), var(--bg-elev-2);
    border: 1px solid var(--border);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
    padding: 0.4em;
}

.service-meta {
    margin-top: 0.6rem;
    font-size: 0.86rem;
    color: var(--text-subtle);
}

.service-meta-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.2rem;
}

/* External badge in purple */
.external-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.78rem;
    padding: 0.22rem 0.5rem;
    border-radius: 999px;
    color: var(--accent-2);
    border: 1px solid rgba(192, 132, 252, 0.35);
    background: rgba(192, 132, 252, 0.12);
}

.empty {
    color: var(--text-subtle);
    font-style: italic;
}

.error {
    color: var(--danger);
}

/* Scrollbar (WebKit) */
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

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

*::-webkit-scrollbar-thumb {
    background: #251f38;
    border-radius: 8px;
    border: 2px solid var(--bg);
}

*::-webkit-scrollbar-thumb:hover {
    background: #2d2746;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .service-card {
        transition: none;
    }
}

#imprint-footer {
    width: 100%;
    max-width: 100%;
    background: var(--bg-elev-1);
    border-top: 1px solid var(--border);
    padding: 2rem 1rem;
    margin-top: auto;
    text-align: center;
    box-sizing: border-box;
}

#imprint-footer .imprint-content {
    max-width: 60rem;
    margin: 0 auto;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

#imprint-footer p {
    margin: 0.5rem 0;
}

#imprint-footer p:first-child {
    margin-top: 0;
    font-weight: 600;
    color: var(--text);
}

#imprint-footer a {
    color: var(--accent-2);
    text-decoration: none;
    transition: color 160ms ease;
}

#imprint-footer a:hover {
    color: var(--accent);
    text-decoration: underline;
}

#imprint-footer small {
    color: var(--text-subtle);
}