/* relax.host — Status page CSS
   Stays on Daylight tokens. The status surface borrows the marketing/Inside
   aesthetic but adds a few status-specific primitives. */

/* ============ STATUS-SPECIFIC TOKENS ============ */
:root {
  --status-ok:        #5fa86a;   /* sage-green for operational */
  --status-ok-bg:     rgba(95,168,106,0.10);
  --status-ok-border: rgba(95,168,106,0.30);
  --status-degraded:  #f5b945;   /* gold for degraded */
  --status-degraded-bg: rgba(245,185,69,0.14);
  --status-degraded-border: rgba(245,185,69,0.36);
  --status-partial:   #e89554;   /* peach-dark for partial */
  --status-partial-bg: rgba(232,149,84,0.14);
  --status-partial-border: rgba(232,149,84,0.36);
  --status-major:     #c43575;   /* coral-deep for major */
  --status-major-bg:  rgba(196,53,117,0.10);
  --status-major-border: rgba(196,53,117,0.30);
  --status-maint:     #8b5fdb;   /* lavender for maintenance */
  --status-maint-bg:  rgba(180,141,255,0.12);
  --status-maint-border: rgba(180,141,255,0.36);
}

/* ============ HERO STATUS BANNER ============ */
.status-hero {
  max-width: 1080px;
  margin: 32px auto 0;
  padding: 0 32px;
}
.status-hero-inner {
  position: relative;
  padding: 36px 36px 32px;
  background: linear-gradient(180deg, rgba(95,168,106,0.10) 0%, rgba(255,255,255,0.6) 60%);
  border: 1px solid rgba(95,168,106,0.28);
  border-radius: 22px;
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  box-shadow:
    0 24px 60px -20px rgba(95,168,106,0.18),
    inset 0 0 0 1px rgba(255,255,255,0.6);
  overflow: hidden;
}
.status-hero-inner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.45) 0%, transparent 40%);
  border-radius: inherit;
}
.status-hero-inner > * { position: relative; }

.status-hero-row {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
.status-hero-l { display: flex; align-items: center; gap: 22px; }
.status-pulse {
  position: relative;
  width: 52px; height: 52px;
  flex-shrink: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #79c285, #4a9159);
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  box-shadow: 0 8px 22px -6px rgba(95,168,106,0.55);
}
.status-pulse::before, .status-pulse::after {
  content: ""; position: absolute; inset: -4px;
  border-radius: 50%;
  border: 2px solid rgba(95,168,106,0.4);
  animation: statusRipple 2.6s ease-out infinite;
}
.status-pulse::after { animation-delay: 1.3s; }
@keyframes statusRipple {
  0% { transform: scale(0.9); opacity: 1; }
  100% { transform: scale(1.6); opacity: 0; }
}
.status-pulse svg { width: 24px; height: 24px; }

.status-hero-text { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.status-hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--ink-2);
}
.status-hero-h {
  font-family: var(--f-serif); font-weight: 400;
  font-size: clamp(32px, 4vw, 48px);
  letter-spacing: -0.02em; line-height: 1.25;
  margin: 0;
  color: var(--ink);
}
.status-hero-h em {
  font-style: italic;
  color: var(--status-ok);
}

.status-hero-r {
  display: flex; align-items: center; gap: 10px;
}
.status-hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px;
  background: rgba(255,255,255,0.7);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--ink);
  text-decoration: none;
  cursor: pointer;
}
.status-hero-pill:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.status-hero-stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 4px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid rgba(95,168,106,0.18);
}
.status-hero-stat { padding: 0 18px 0 0; border-right: 1px solid rgba(10,10,12,0.06); }
.status-hero-stat:last-child { border-right: none; }
.status-hero-stat .n {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: 28px; letter-spacing: -0.015em; line-height: 1;
  color: var(--ink);
}
.status-hero-stat .l {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 6px;
}

/* ============ STATUS LEVEL VARIANTS (for degraded/partial/major) ============ */
.status-hero.is-degraded .status-hero-inner {
  background: linear-gradient(180deg, var(--status-degraded-bg) 0%, rgba(255,255,255,0.6) 60%);
  border-color: var(--status-degraded-border);
  box-shadow: 0 24px 60px -20px rgba(245,185,69,0.22), inset 0 0 0 1px rgba(255,255,255,0.6);
}
.status-hero.is-degraded .status-pulse { background: linear-gradient(135deg, #f5b945, #d49b2e); }
.status-hero.is-degraded .status-pulse::before, .status-hero.is-degraded .status-pulse::after { border-color: rgba(245,185,69,0.45); }
.status-hero.is-degraded .status-hero-h em { color: #b78525; }

.status-hero.is-major .status-hero-inner {
  background: linear-gradient(180deg, var(--status-major-bg) 0%, rgba(255,255,255,0.6) 60%);
  border-color: var(--status-major-border);
}
.status-hero.is-major .status-pulse { background: linear-gradient(135deg, #e8528c, #c43575); }
.status-hero.is-major .status-pulse::before, .status-hero.is-major .status-pulse::after { border-color: rgba(232,82,140,0.45); }
.status-hero.is-major .status-hero-h em { color: var(--coral-deep); }

/* ============ SECTION HEADS ============ */
.status-section {
  max-width: 1080px;
  margin: 56px auto 0;
  padding: 0 32px;
}
.status-section-h {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
  padding-bottom: 14px;
  margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.status-section-h h2 {
  font-family: var(--f-serif); font-weight: 400;
  font-size: 28px; letter-spacing: -0.015em; line-height: 1.25;
  margin: 0;
  color: var(--ink);
}
.status-section-h h2 em { font-style: italic; color: var(--coral-deep); }
.status-section-h .meta {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-3);
}

/* ============ COMPONENT (SERVICE) STATUS LIST ============ */
.status-group {
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  margin-bottom: 16px;
  overflow: hidden;
  backdrop-filter: blur(22px) saturate(180%);
  box-shadow: 0 12px 32px -16px rgba(10,10,12,0.08);
}
.status-group-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(255,255,255,0.4);
}
.status-group-h {
  font-family: var(--f-serif); font-style: italic; font-weight: 400;
  font-size: 19px; letter-spacing: -0.005em;
  color: var(--ink);
}
.status-group-meta {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.08em;
  color: var(--status-ok);
  text-transform: uppercase;
  font-weight: 600;
}
.status-group-meta .dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--status-ok);
  box-shadow: 0 0 8px rgba(95,168,106,0.6);
}

.status-row {
  display: grid;
  grid-template-columns: 1fr 240px 120px;
  align-items: center;
  gap: 18px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--line);
  transition: background .15s;
}
.status-row:last-child { border-bottom: none; }
.status-row:hover { background: rgba(255,255,255,0.45); }

.status-row-l { min-width: 0; }
.status-row-name {
  font-family: var(--f-sans); font-weight: 500;
  font-size: 15px; color: var(--ink);
  display: flex; align-items: center; gap: 10px;
}
.status-row-name .iglyph {
  width: 22px; height: 22px;
  border-radius: 7px;
  background: rgba(10,10,12,0.05);
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--ink-2);
  flex-shrink: 0;
}
.status-row-name .iglyph svg { width: 13px; height: 13px; }
.status-row-desc {
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-top: 4px;
  margin-left: 32px;
}

/* Uptime bars (90-day chart) */
.uptime {
  display: flex; align-items: flex-end;
  gap: 2px;
  height: 28px;
}
.uptime span {
  flex: 1;
  height: 100%;
  border-radius: 2px;
  background: var(--status-ok);
  opacity: 0.78;
  transition: opacity .15s, transform .15s;
  cursor: pointer;
}
.uptime span:hover { opacity: 1; transform: scaleY(1.08); }
.uptime span.is-degraded { background: var(--status-degraded); }
.uptime span.is-partial  { background: var(--status-partial); }
.uptime span.is-major    { background: var(--status-major); }
.uptime span.is-maint    { background: var(--status-maint); opacity: 0.6; }

/* Status pill */
.status-pill {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 11px;
  border: 1px solid;
  border-radius: 999px;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  font-weight: 600;
  white-space: nowrap;
  justify-self: end;
}
.status-pill.is-ok        { color: var(--status-ok);        background: var(--status-ok-bg);        border-color: var(--status-ok-border); }
.status-pill.is-degraded  { color: #b78525;                  background: var(--status-degraded-bg);  border-color: var(--status-degraded-border); }
.status-pill.is-partial   { color: #b86d3a;                  background: var(--status-partial-bg);   border-color: var(--status-partial-border); }
.status-pill.is-major     { color: var(--coral-deep);        background: var(--status-major-bg);     border-color: var(--status-major-border); }
.status-pill.is-maint     { color: #8b5fdb;                  background: var(--status-maint-bg);     border-color: var(--status-maint-border); }
.status-pill .d {
  width: 6px; height: 6px; border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Uptime numeric meta */
.status-uptime-meta {
  display: flex; flex-direction: column;
  gap: 4px;
  align-items: stretch;
}
.status-uptime-meta .label {
  display: flex; justify-content: space-between;
  font-family: var(--f-mono); font-size: 9.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-3);
}
.status-uptime-meta .label strong { color: var(--ink); font-weight: 600; }

/* ============ INCIDENTS ============ */
.incident {
  background: rgba(255,255,255,0.55);
  border: 1px solid var(--glass-border);
  border-radius: 18px;
  padding: 22px 24px;
  margin-bottom: 14px;
  backdrop-filter: blur(20px);
  position: relative;
  overflow: hidden;
}
.incident::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--inc-color, var(--status-major));
  border-radius: 0 3px 3px 0;
}
.incident.is-resolved { --inc-color: var(--status-ok); }
.incident.is-investigating { --inc-color: var(--status-major); }
.incident.is-monitoring { --inc-color: var(--status-degraded); }
.incident.is-scheduled { --inc-color: var(--status-maint); }

.incident-head {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 10px;
}
.incident-h {
  font-family: var(--f-serif); font-weight: 400;
  font-size: 19px; letter-spacing: -0.005em; line-height: 1.3;
  color: var(--ink);
}
.incident-meta {
  display: flex; gap: 14px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.06em;
  color: var(--ink-3);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.incident-meta strong { color: var(--ink); font-weight: 500; }

.incident-timeline { display: flex; flex-direction: column; gap: 0; }
.incident-update {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 18px;
  padding: 12px 0;
  border-top: 1px dashed var(--line);
  font-size: 13.5px; color: var(--ink-2);
  line-height: 1.55;
}
.incident-update:first-child { border-top: 1px solid var(--line); }
.incident-update strong {
  display: inline-block;
  font-family: var(--f-mono); font-size: 10px;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink); font-weight: 600;
  margin-right: 8px;
}
.incident-update p { margin: 4px 0 0; color: var(--ink-2); }
.incident-update .when { font-family: var(--f-mono); font-size: 10.5px; color: var(--ink-3); }

.incident-empty {
  padding: 32px 24px;
  text-align: center;
  background: rgba(255,255,255,0.5);
  border: 1px dashed var(--line-2);
  border-radius: 18px;
  color: var(--ink-2);
  font-family: var(--f-serif); font-style: italic;
  font-size: 17px;
}
.incident-empty .check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--status-ok-bg);
  color: var(--status-ok);
  margin-bottom: 8px;
}

/* ============ DATE-GROUPED RECENT HISTORY ============ */
.history-day {
  margin-bottom: 22px;
}
.history-day-h {
  font-family: var(--f-mono); font-size: 11px;
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 10px;
  display: flex; align-items: center; gap: 14px;
}
.history-day-h::after {
  content: ""; flex: 1; height: 1px;
  background: var(--line);
}

/* ============ SUBSCRIBE BOX ============ */
.subscribe-box {
  max-width: 1080px;
  margin: 56px auto 0;
  padding: 32px 36px;
  background:
    radial-gradient(ellipse at 30% 50%, rgba(232,82,140,0.10), transparent 60%),
    radial-gradient(ellipse at 80% 50%, rgba(180,141,255,0.10), transparent 60%),
    rgba(255,255,255,0.65);
  border: 1px solid var(--glass-border);
  border-radius: 22px;
  backdrop-filter: blur(28px);
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
}
.subscribe-box h3 {
  font-family: var(--f-serif); font-weight: 400;
  font-size: 26px; letter-spacing: -0.015em; line-height: 1.3;
  margin: 0 0 6px;
  color: var(--ink);
}
.subscribe-box h3 em {
  font-style: italic;
  background: linear-gradient(120deg, var(--coral), var(--lavender));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
}
.subscribe-box p { margin: 0; color: var(--ink-2); font-size: 14.5px; }
.subscribe-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.subscribe-actions .btn {
  padding: 10px 18px;
  font-size: 13px;
}

/* ============ LEGEND ============ */
.status-legend {
  max-width: 1080px;
  margin: 56px auto 0;
  padding: 18px 28px;
  background: rgba(255,255,255,0.45);
  border: 1px solid var(--glass-border);
  border-radius: 16px;
  backdrop-filter: blur(20px);
  display: flex; align-items: center; justify-content: center;
  gap: 24px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 10.5px;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--ink-2);
}
.status-legend .lg-item { display: inline-flex; align-items: center; gap: 8px; }
.status-legend .lg-swatch {
  width: 14px; height: 14px; border-radius: 4px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 720px) {
  .status-row { grid-template-columns: 1fr; gap: 10px; }
  .uptime { height: 22px; }
  .status-row-desc { margin-left: 0; }
  .status-hero-stats { grid-template-columns: 1fr 1fr; }
  .subscribe-box { grid-template-columns: 1fr; }
}
