:root {
    --bg-deep: #020d18;
    --bg-surface: #041728;
    --surface-strong: rgba(8, 34, 54, 0.92);
    --surface-tile: rgba(7, 41, 63, 0.72);
    --line: rgba(0, 201, 255, 0.22);
    --text-main: #f3fbff;
    --text-muted: #a8c6d8;
    --text-soft: #88a9bd;
    --accent: #00c9ff;
    --accent-soft: #20d5ff;
    --accent-ink: #d6f4ff;
    --accent-rgb: 0, 201, 255;
    --ok: #22c55e;
    --warn: #f3b340;
    --err: #ff5b6d;
    --unknown: #92adc0;
    --card-border: rgba(255, 255, 255, 0.05);
    --card-bg: #002b3d;
    --card-hover: #004563;
    --card-title: #e0f1ff;
    --header-logo-width: clamp(160px, 20vw, 240px);
    --container-max: 1280px;
    --card-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    --card-overlay: linear-gradient(180deg, rgba(0, 201, 255, 0.12) 0%, transparent 58%);
    --focus-ring: 0 0 0 2px rgba(0, 201, 255, 0.35);
}

* {
    box-sizing: border-box;
}

@font-face {
    font-family: "Fellix";
    src: url("../fonts/Fellix-Medium.otf") format("opentype");
    font-style: normal;
    font-weight: 500;
    font-display: swap;
}

html {
    font-family: "Fellix", sans-serif;
}

button,
input,
select,
textarea {
    font-family: inherit;
}

body {
    margin: 0;
    min-height: 100vh;
    color: var(--text-main);
    font-family: inherit;
    font-weight: 500;
    background:
        radial-gradient(circle at 10% -8%, rgba(var(--accent-rgb), 0.18), transparent 38%),
        radial-gradient(circle at 90% -2%, rgba(var(--accent-rgb), 0.12), transparent 34%),
        linear-gradient(180deg, #041726 0%, var(--bg-deep) 60%, #020915 100%);
    letter-spacing: 0.01em;
    display: flex;
    flex-direction: column;
}

header {
    position: sticky;
    top: 0;
    z-index: 12;
    background: linear-gradient(180deg, rgba(4, 20, 34, 0.95), rgba(4, 16, 28, 0.9));
    border-bottom: 1px solid rgba(var(--accent-rgb), 0.24);
    backdrop-filter: blur(10px);
}

.header-inner {
    max-width: var(--container-max);
    width: min(97%, var(--container-max));
    margin: 0 auto;
    height: 78px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: var(--header-logo-width);
    max-width: 48vw;
    height: auto;
}

.header-copy {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.header-text {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 1.7px;
    text-transform: uppercase;
    color: var(--text-soft);
}

.header-subtext {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.header-actions {
    margin-left: auto;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.header-cta {
    padding: 10px 14px;
    border-radius: 999px;
    border: 1px solid rgba(var(--accent-rgb), 0.4);
    color: #beefff;
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.14), rgba(0, 86, 127, 0.24));
    font-size: 12px;
    text-decoration: none;
    font-weight: 700;
    white-space: nowrap;
    transition: all 180ms ease;
    letter-spacing: 0.02em;
}

.header-cta:hover {
    transform: translateY(-1px);
    border-color: rgba(var(--accent-rgb), 0.75);
    background: linear-gradient(180deg, rgba(var(--accent-rgb), 0.23), rgba(0, 86, 127, 0.26));
}

a:focus-visible,
button:focus-visible {
    outline: none;
    box-shadow: var(--focus-ring);
}

.status-page {
    max-width: var(--container-max);
    width: min(97%, var(--container-max));
    margin: 26px auto 76px;
    display: grid;
    gap: 8px;
}

.status-overview,
.reliability-section,
.incident-section,
.status-grid {
    display: grid;
    gap: 14px;
}

.overview-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 18px;
}

.eyebrow {
    margin: 0;
    color: var(--text-soft);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
}

h1 {
    margin: 6px 0 8px;
    font-size: clamp(30px, 4.4vw, 44px);
    line-height: 1.05;
    letter-spacing: -0.01em;
}

.status-context {
    margin: 0;
    color: var(--text-muted);
    max-width: 720px;
}

.status-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 8px;
}

.metric-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: none;
    position: absolute;
    inset: 0;
    background: var(--card-overlay);
    pointer-events: none;
}

.metric-card > * {
    position: relative;
}

.metric-label {
    margin: 0;
    text-transform: uppercase;
    color: #b5d3e5;
    font-size: 11px;
    letter-spacing: 0.13em;
}

.metric-value {
    margin: 6px 0 4px;
    font-size: 24px;
    font-weight: 800;
}

.meta-text {
    margin: 0;
    color: var(--text-soft);
    font-size: 13px;
}

.status-grid {
    margin-top: 0;
    gap: 8px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.status-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 24px;
    box-shadow: var(--card-shadow);
    transition: background-color 180ms ease, border-color 180ms ease;
}

.status-card:hover {
    background: var(--card-hover);
}

.status-card .row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.service-title {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
}

.service-icon {
    --icon-rgb: 0, 201, 255;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    display: inline-grid;
    place-items: center;
    flex: 0 0 45px;
    background: rgba(var(--icon-rgb), 0.12);
    border: 2px solid rgba(var(--icon-rgb), 0.38);
    color: rgb(var(--icon-rgb));
}

.service-icon svg,
.service-icon img {
    width: 22px;
    height: 22px;
    display: block;
    line-height: 0;
    color: inherit;
    object-fit: contain;
}

.service-icon--emarine {
    --icon-rgb: 0, 201, 255;
}

.service-icon--ixon {
    --icon-rgb: 128, 228, 255;
}

.service-icon--aws {
    --icon-rgb: 255, 153, 0;
}

.service-name {
    font-size: 1.15rem;
    font-weight: 700;
    text-align: left;
    letter-spacing: 0.02em;
    color: var(--card-title);
}

.service-description {
    margin: 10px 0 14px;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
    min-height: 0;
}

.service-metrics {
    border-top: 1px dashed var(--line);
    border-bottom: 1px dashed var(--line);
    margin-bottom: 10px;
    padding: 10px 0;
    display: grid;
    gap: 6px;
    color: var(--text-soft);
    font-size: 13px;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.service-meta {
    color: var(--text-soft);
    font-size: 12px;
}

.status-pill {
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 0.09em;
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid transparent;
    font-weight: 700;
    white-space: nowrap;
}

.status-ok {
    background: rgba(var(--accent-rgb), 0.12);
    border-color: rgba(34, 197, 94, 0.46);
    color: var(--ok);
}

.status-warn {
    background: rgba(243, 179, 64, 0.14);
    border-color: rgba(243, 179, 64, 0.45);
    color: var(--warn);
}

.status-err {
    background: rgba(255, 91, 109, 0.14);
    border-color: rgba(255, 91, 109, 0.4);
    color: var(--err);
}

.status-unknown {
    background: rgba(146, 173, 192, 0.16);
    border-color: rgba(146, 173, 192, 0.45);
    color: var(--unknown);
}

.section-header h2 {
    margin: 0;
    font-size: 22px;
}

.section-header p {
    margin: 4px 0 10px;
    color: var(--text-soft);
    font-size: 13px;
}

.reliability-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
}

.reliability-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 15px;
    padding: 24px;
    box-shadow: var(--card-shadow);
}

.sli-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    margin-top: 10px;
    gap: 10px;
}

.sli-stats p {
    margin: 0;
    color: var(--text-soft);
    font-size: 12px;
}

.sli-stats p strong,
.sli-metric strong {
    color: var(--text-main);
}

.sli-metric {
    margin: 10px 0;
    display: flex;
    justify-content: space-between;
    color: var(--text-soft);
    font-size: 13px;
    border-bottom: 1px dashed var(--line);
    padding-bottom: 10px;
}

.sli-bar {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: rgba(6, 30, 46, 0.74);
    border: 1px solid rgba(0, 201, 255, 0.2);
    overflow: hidden;
}

.sli-bar span {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--accent), var(--accent-soft));
    width: 0%;
    border-radius: inherit;
    transition: width 600ms ease;
}

.incident-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    border-top: 1px solid var(--line);
}

.incident-item {
    display: grid;
    gap: 6px;
    padding: 12px 2px;
    border-bottom: 1px solid rgba(0, 201, 255, 0.16);
}

.incident-title {
    margin: 0;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.incident-meta {
    margin: 0;
    color: var(--text-soft);
    font-size: 12px;
}

.incident-status {
    font-weight: 700;
}

.incident-empty {
    margin: 12px 0 0;
    color: var(--text-soft);
}

footer {
    margin-top: auto;
    border-top: 1px solid rgba(0, 201, 255, 0.25);
    background: linear-gradient(180deg, rgba(3, 20, 32, 0.98), #030f1a);
    padding: 30px 0 20px;
}

.footer-inner {
    width: min(98%, var(--container-max));
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    align-items: start;
}

.service-availability {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
}

.service-availability .sli-stats {
    margin-top: 0;
}

.service-availability .sli-stats p {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.service-availability .sli-stats strong {
    font-size: 18px;
}

.footer-inner > div {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0;
}

.footer-brand {
    display: flex;
    gap: 10px;
    align-items: center;
}

.footer-logo {
    width: 178px;
    max-width: 35vw;
    height: auto;
}

.footer-brand-title {
    margin: 0;
    font-size: 16px;
    font-weight: 700;
}

.footer-brand-sub {
    margin: 4px 0 0;
    color: var(--text-soft);
    font-size: 13px;
}

.footer-inner h2 {
    margin: 0 0 8px;
    color: #d7ecfa;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
}

.footer-inner p {
    margin: 0 0 6px;
    color: var(--text-muted);
    font-size: 13px;
}

.footer-inner a {
    color: #bde9fb;
    text-decoration: none;
}

.footer-bottom {
    margin: 20px auto 0;
    width: min(98%, var(--container-max));
    padding-top: 12px;
    border-top: 1px solid rgba(0, 201, 255, 0.2);
    color: var(--text-soft);
    font-size: 12px;
}

@media (max-width: 760px) {
    .header-inner {
        min-height: 72px;
        height: auto;
        width: 92%;
        padding: 12px 0;
        flex-wrap: wrap;
        gap: 10px;
    }

    .brand-mark {
        width: 150px;
    }

    .status-page {
        width: 92%;
        margin-top: 20px;
    }

    .overview-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .header-actions {
        margin-left: 0;
    }

    .header-cta {
        margin-left: 0;
        font-size: 11px;
        padding: 7px 11px;
    }
}

.skip-link {
    position: absolute;
    top: -100px;
    left: 16px;
    z-index: 100;
    padding: 12px;
    background: var(--bg-deep);
    color: var(--text-main);
}

.skip-link:focus { top: 8px; }
.metric-value, .footer-inner a { overflow-wrap: anywhere; }
.footer-brand { flex-wrap: wrap; }
.status-card .row { flex-wrap: wrap; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; animation: none !important; }
}

.incident-status.status-ok {
    color: var(--ok);
}

.incident-status.status-warn {
    color: var(--warn);
}

.incident-status.status-err {
    color: var(--err);
}

.incident-status.status-unknown {
    color: var(--unknown);
}
