/* AXK Status — Editorial redesign
 * Fraunces serif + JetBrains Mono + Inter sans.
 * Hero-led, heartbeat-driven, manifesto-ending.
 */

:root {
  --bg:          #0a0b0d;
  --bg-elev:     #0d0e12;
  --bg-row:      #0f1116;
  --bg-row-hi:   #121520;

  --border:      rgba(255, 255, 255, 0.055);
  --border-mid:  rgba(255, 255, 255, 0.1);
  --border-hi:   rgba(255, 255, 255, 0.18);

  --text:        #f3f3ee;
  --text-dim:    #a4a39c;
  --text-muted:  #6e6d67;
  --text-faint:  #3f3e39;

  --green:       #22c55e;
  --green-soft:  rgba(34, 197, 94, 0.1);
  --green-glow:  rgba(34, 197, 94, 0.55);
  --amber:       #eab308;
  --red:         #ef4444;
  --red-soft:    rgba(239, 68, 68, 0.1);
  --red-glow:    rgba(239, 68, 68, 0.55);

  --accent:      #22c55e;

  --font-serif:  "Fraunces", "Times New Roman", serif;
  --font-sans:   "Inter var", "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-mono:   "JetBrains Mono", "SF Mono", "Menlo", monospace;
}

@supports (font-variation-settings: normal) {
  :root { --font-sans: "Inter var", system-ui, sans-serif; }
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html { background: var(--bg); color-scheme: dark; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.55;
  letter-spacing: -0.005em;
  min-height: 100vh;
  overflow-x: hidden;
}

body.state-incident {
  background:
    radial-gradient(ellipse 90% 50% at 50% 0%, rgba(239, 68, 68, 0.06) 0%, transparent 60%),
    var(--bg);
}

.mono {
  font-family: var(--font-mono);
  font-feature-settings: "ss01";
  letter-spacing: 0;
}

a { color: inherit; text-decoration: none; }

.shell {
  max-width: 1080px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
}

/* ───── ambient grid background ───── */

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255, 255, 255, 0.017) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255, 255, 255, 0.017) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse at 50% 0%, black 0%, transparent 70%);
}

/* ───── nav ───── */

.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(10, 11, 13, 0.75);
  backdrop-filter: blur(16px) saturate(170%);
  -webkit-backdrop-filter: blur(16px) saturate(170%);
  border-bottom: 1px solid var(--border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--text);
  text-transform: uppercase;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: linear-gradient(135deg, var(--accent) 0%, #16a34a 100%);
  color: #07100b;
}

.brand-sep {
  color: var(--text-faint);
  font-weight: 400;
}

.brand-section {
  color: var(--text-muted);
}

.nav-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.nav-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: relative;
}

.nav-dot.ok {
  background: var(--green);
  box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.15), 0 0 12px var(--green-glow);
}

.nav-dot.bad {
  background: var(--red);
  box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15), 0 0 12px var(--red-glow);
  animation: blink 1.2s ease-in-out infinite;
}

@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

/* ═══════════════ HERO ═══════════════ */

.hero {
  position: relative;
  min-height: calc(100vh - 56px);
  display: flex;
  align-items: center;
  padding: 80px 0 60px;
  z-index: 1;
}

.hero-inner {
  width: 100%;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 6px 14px;
  border: 1px solid var(--border-mid);
  border-radius: 100px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--text-dim);
  background: rgba(255, 255, 255, 0.015);
  margin-bottom: 44px;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.1s forwards;
}

.spin-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 10px var(--green-glow);
  position: relative;
}

.spin-dot::after {
  content: "";
  position: absolute;
  inset: -4px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  opacity: 0;
  animation: ping 2.4s ease-out infinite;
}

.state-incident .spin-dot {
  background: var(--red);
  box-shadow: 0 0 10px var(--red-glow);
}
.state-incident .spin-dot::after { border-color: var(--red); }

@keyframes ping {
  0%   { opacity: 0; transform: scale(1); }
  15%  { opacity: 0.6; }
  100% { opacity: 0; transform: scale(2.2); }
}

/* The headline */

.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(56px, 11vw, 156px);
  font-weight: 350;
  line-height: 0.92;
  letter-spacing: -0.04em;
  color: var(--text);
  margin-bottom: 36px;
  font-variation-settings: "opsz" 144, "SOFT" 30;
}

.hero-headline .line {
  display: block;
  opacity: 0;
  transform: translateY(24px);
  animation: lineUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.line-1 { animation-delay: 0.15s; }
.line-2 {
  animation-delay: 0.3s;
  font-style: italic;
  color: var(--text-dim);
  padding-left: 0.1em;
}

.state-incident .line-2 { color: var(--red); }

@keyframes lineUp {
  to { opacity: 1; transform: translateY(0); }
}

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

/* Rotating storytelling line */

.hero-rot {
  position: relative;
  height: 22px;
  margin-bottom: 72px;
  opacity: 0;
  animation: fadeIn 0.8s ease 0.6s forwards;
}

.hero-rot .rot {
  position: absolute;
  top: 0;
  left: 0;
  font-size: 14px;
  color: var(--text-dim);
  letter-spacing: -0.005em;
  opacity: 0;
  white-space: nowrap;
}

/* 4 lines rotating through 16s loop, 4s each */
.hero-rot .rot-1 { animation: rot 16s ease-in-out 0s infinite; }
.hero-rot .rot-2 { animation: rot 16s ease-in-out 4s infinite; }
.hero-rot .rot-3 { animation: rot 16s ease-in-out 8s infinite; }
.hero-rot .rot-4 { animation: rot 16s ease-in-out 12s infinite; }

@keyframes rot {
  0%, 22%  { opacity: 1; transform: translateY(0); }
  25%, 97% { opacity: 0; transform: translateY(-6px); }
  98%      { opacity: 0; transform: translateY(6px); }
}

/* Heartbeat */

.heartbeat {
  position: relative;
  color: var(--green);
  opacity: 0;
  animation: fadeIn 1s ease 0.9s forwards;
}

.state-incident .heartbeat { color: var(--red); }

.heartbeat svg {
  display: block;
}

.beat-line {
  filter: drop-shadow(0 0 6px currentColor);
  animation: breathe 3.6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.65; }
}

.heartbeat-label {
  position: absolute;
  top: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  color: var(--text-muted);
  letter-spacing: 0.12em;
}

.beat-pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  color: var(--accent);
  box-shadow: 0 0 8px currentColor;
  animation: beat 1.2s ease-in-out infinite;
}

.state-incident .beat-pulse { color: var(--red); }

@keyframes beat {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%      { transform: scale(0.7); opacity: 0.5; }
}

/* Scroll cue */

.scroll-cue {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  font-size: 9px;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  opacity: 0;
  animation: cueBounce 1.6s ease-in-out 1.4s infinite, fadeIn 0.8s ease 1.2s forwards;
}

@keyframes cueBounce {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 6px); }
}

/* ═══════════════ DETAIL SECTION ═══════════════ */

.detail {
  padding: 120px 0 40px;
  position: relative;
  z-index: 1;
}

.section-label {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 56px;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.16em;
  color: var(--text-muted);
}

.section-line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

/* product section */

.product {
  padding: 48px 0;
  border-top: 1px solid var(--border);
}

.product:first-of-type { border-top: none; padding-top: 0; }

.product-head {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 28px;
}

.product-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 3px 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-radius: 3px;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.12em;
  color: var(--text-dim);
}

.product-name {
  font-family: var(--font-serif);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.025em;
  color: var(--text);
  line-height: 1;
  font-variation-settings: "opsz" 48, "SOFT" 20;
}

.product-meta {
  margin-left: auto;
  font-size: 10px;
  letter-spacing: 0.1em;
  color: var(--text-faint);
}

/* service rows */

.svc-list {
  list-style: none;
  display: flex;
  flex-direction: column;
}

.svc-list > li {
  border-top: 1px solid var(--border);
}
.svc-list > li:first-child { border-top: 1px solid var(--border-mid); }
.svc-list > li:last-child  { border-bottom: 1px solid var(--border-mid); }

.svc summary { list-style: none; cursor: pointer; }
.svc summary::-webkit-details-marker { display: none; }

.svc-row {
  display: grid;
  grid-template-columns: 32px 1fr auto auto 20px;
  align-items: center;
  gap: 20px;
  padding: 22px 4px;
  transition: background 0.2s ease;
}

.svc-row:hover {
  background: rgba(255, 255, 255, 0.015);
}

.svc[open] .svc-row {
  background: rgba(255, 255, 255, 0.025);
}

.svc-index {
  font-size: 10px;
  color: var(--text-faint);
  letter-spacing: 0.06em;
}

.svc-main { min-width: 0; }

.svc-name {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 400;
  letter-spacing: -0.018em;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 2px;
  font-variation-settings: "opsz" 36, "SOFT" 15;
}

.svc-desc {
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: -0.002em;
}

.svc-line {
  font-size: 10px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-style: normal;
  white-space: nowrap;
}

.svc-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 100px;
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.1em;
  white-space: nowrap;
}

.pill-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

.pill-operational {
  color: var(--green);
  background: var(--green-soft);
  border: 1px solid rgba(34, 197, 94, 0.18);
}
.pill-operational .pill-dot {
  background: var(--green);
  box-shadow: 0 0 6px var(--green);
}

.pill-incident {
  color: var(--red);
  background: var(--red-soft);
  border: 1px solid rgba(239, 68, 68, 0.18);
}
.pill-incident .pill-dot {
  background: var(--red);
  box-shadow: 0 0 6px var(--red);
  animation: pulse 1.4s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.4; transform: scale(0.82); }
}

.svc-caret {
  color: var(--text-faint);
  display: inline-flex;
  transition: transform 0.25s ease, color 0.2s ease;
}

.svc:hover .svc-caret { color: var(--text-muted); }
.svc[open] .svc-caret { transform: rotate(90deg); color: var(--text-dim); }

/* expanded body */

.svc-body {
  padding: 12px 4px 32px 56px;
  animation: fadeUp 0.35s ease;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.svc-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  padding-top: 8px;
  margin-bottom: 24px;
}

.panel {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.panel-label {
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.14em;
}

.panel-empty {
  font-size: 11px;
  color: var(--text-faint);
  padding: 14px 0;
}

.spark {
  color: var(--green);
  opacity: 0.85;
}
.svc:has(.pill-incident) .spark { color: var(--red); }

.bars {
  display: flex;
  gap: 2px;
  height: 22px;
}

.bar {
  flex: 1;
  border-radius: 1.5px;
  min-width: 3px;
  transition: transform 0.12s ease;
}
.bar:hover { transform: scaleY(1.15); }
.bar-operational { background: var(--green); }
.bar-partial     { background: var(--amber); }
.bar-incident    { background: var(--red); }
.bar-unknown     { background: rgba(255, 255, 255, 0.04); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.stat-cell { display: flex; flex-direction: column; gap: 6px; }

.stat-v {
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.02em;
  line-height: 1;
}

.stat-u {
  font-size: 11px;
  font-weight: 400;
  color: var(--text-muted);
  margin-left: 3px;
}

.stat-l {
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.14em;
}

/* ═══════════════ MANIFESTO ═══════════════ */

.manifesto {
  padding: 120px 0 80px;
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--border);
}

.manifesto-inner {
  max-width: 820px;
}

.big-number {
  margin-bottom: 52px;
}

.big-val {
  font-family: var(--font-serif);
  font-size: clamp(90px, 16vw, 220px);
  font-weight: 300;
  letter-spacing: -0.05em;
  line-height: 0.88;
  color: var(--text);
  font-variation-settings: "opsz" 144, "SOFT" 40;
}

.big-unit {
  font-size: 0.5em;
  color: var(--text-dim);
  font-weight: 300;
  margin-left: -0.05em;
}

.big-label {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.16em;
  color: var(--text-muted);
  margin-top: 16px;
}

.manifesto-quote {
  font-family: var(--font-serif);
  font-size: 22px;
  font-weight: 300;
  line-height: 1.5;
  letter-spacing: -0.015em;
  color: var(--text-dim);
  max-width: 640px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  font-variation-settings: "opsz" 36, "SOFT" 25;
}

.manifesto-quote em {
  font-style: italic;
  color: var(--text);
  font-weight: 400;
}

/* ═══════════════ FOOTER ═══════════════ */

.foot {
  padding: 56px 0 64px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}

.foot-inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.foot-col { display: flex; flex-direction: column; gap: 6px; }
.foot-right { align-items: flex-end; text-align: right; }

.foot-brand {
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.08em;
}

.foot-tag {
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.1em;
}

.foot-link {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-dim);
  border-bottom: 1px dotted var(--text-faint);
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.foot-link:hover { color: var(--accent); }

.foot-dim {
  font-size: 9px;
  color: var(--text-faint);
  letter-spacing: 0.12em;
}

/* ═══════════════ RESPONSIVE ═══════════════ */

@media (max-width: 860px) {
  .shell { padding: 0 24px; }
  .hero { padding: 56px 0 40px; min-height: calc(100vh - 56px); }
  .hero-headline { margin-bottom: 24px; }
  .hero-rot { margin-bottom: 48px; }
  .hero-rot .rot { white-space: normal; }

  .svc-row {
    grid-template-columns: 28px 1fr auto 20px;
    gap: 14px;
    padding: 18px 4px;
  }
  .svc-line { display: none; }
  .svc-desc { display: none; }
  .svc-name { font-size: 18px; }

  .svc-body { padding-left: 42px; }
  .svc-grid { grid-template-columns: 1fr; gap: 20px; }
  .stat-row { grid-template-columns: repeat(2, 1fr); gap: 20px; }

  .manifesto { padding: 80px 0 60px; }
  .manifesto-quote { font-size: 17px; }
  .product-name { font-size: 26px; }

  .foot-inner { flex-direction: column; align-items: flex-start; }
  .foot-right { align-items: flex-start; text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
