/* ==========================================================================
   Services Hub — Swiss Editorial Minimalism
   DM Serif Display + DM Mono · Near-monochromatic · One accent
   ========================================================================== */

/* ── Design Tokens ─────────────────────────────────────────────────────── */
:root {
  --bg:           #0c0c0c;
  --surface:      #141414;
  --surface-2:    #1a1a1a;
  --border:       #222222;
  --border-hover: #333333;
  --text:         #e8e8e8;
  --text-muted:   #888888;
  --text-dim:     #444444;
  --accent:       #e8d5b7;
  --accent-dim:   rgba(232, 213, 183, 0.12);
  --accent-line:  rgba(232, 213, 183, 0.2);

  --font-serif: 'DM Serif Display', Georgia, serif;
  --font-mono:  'DM Mono', 'Courier New', monospace;

  --max-width:  1160px;
  --ease-out:   cubic-bezier(0.23, 1, 0.32, 1);

  --space-xs:   0.25rem;
  --space-sm:   0.5rem;
  --space-md:   1rem;
  --space-lg:   2rem;
  --space-xl:   4rem;
  --space-2xl:  7rem;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-mono);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
}

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

hr {
  border: none;
}

/* ── Hero ──────────────────────────────────────────────────────────────── */
.hero {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100svh;
  padding: var(--space-lg) var(--space-md);
  text-align: center;
}

.hero__content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-md);
  max-width: 640px;
  width: 100%;
}

.hero__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.hero__headline {
  font-family: var(--font-serif);
  font-size: clamp(3rem, 6vw, 5rem);
  font-weight: 400;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero__sub {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 300;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.hero__rule {
  width: 100%;
  height: 1px;
  background: var(--border);
  margin-top: var(--space-sm);
}

/* ── Main layout ───────────────────────────────────────────────────────── */
.main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--space-md) var(--space-xl);
}

/* ── Section ───────────────────────────────────────────────────────────── */
.section {
  margin-bottom: var(--space-2xl);
}

.section:last-child {
  margin-bottom: 0;
}

.section__header {
  display: flex;
  align-items: baseline;
  gap: var(--space-md);
  margin-bottom: var(--space-sm);
}

.section__label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.section__count {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 300;
  color: var(--text-dim);
}

.section__line {
  height: 1px;
  background: var(--border);
  margin-bottom: var(--space-lg);
}

/* ── Grid ──────────────────────────────────────────────────────────────── */
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
}

@media (min-width: 640px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  }
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.card {
  display: flex;
  flex-direction: column;
  background: var(--surface);
  padding: var(--space-lg);
  gap: var(--space-sm);
  transition:
    background 200ms var(--ease-out),
    box-shadow 200ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
    background: var(--surface-2);
    box-shadow: inset 0 0 0 1px var(--border-hover);
  }
}

/* ── Card icon ─────────────────────────────────────────────────────────── */
.card__icon {
  color: var(--text-dim);
  flex-shrink: 0;
  margin-bottom: var(--space-xs);
}

/* ── Card body ─────────────────────────────────────────────────────────── */
.card__body {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.card__name {
  font-family: var(--font-serif);
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text);
  letter-spacing: 0;
  line-height: 1.3;
}

.card__desc {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-muted);
  letter-spacing: 0.01em;
}

/* ── Card footer ───────────────────────────────────────────────────────── */
.card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  padding-top: var(--space-md);
  margin-top: auto;
  border-top: 1px solid var(--border);
}

.card__status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 300;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.status-dot {
  display: block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot--running {
  background: var(--accent);
}

.status-dot--static {
  background: var(--text-dim);
}

.status-label {
  color: var(--text-dim);
}

/* ── Card link ─────────────────────────────────────────────────────────── */
.card__link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  transition: color 150ms var(--ease-out);
}

.card__link svg {
  opacity: 0.5;
  transition: opacity 150ms var(--ease-out), transform 150ms var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .card__link:hover {
    color: var(--accent);
  }

  .card__link:hover svg {
    opacity: 1;
    transform: translate(1px, -1px);
  }
}

.card__link:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 3px;
}

/* ── Footer ────────────────────────────────────────────────────────────── */
.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-lg) var(--space-md);
  border-top: 1px solid var(--border);
  max-width: var(--max-width);
  margin: var(--space-xl) auto 0;
  font-family: var(--font-mono);
  font-size: 0.67rem;
  font-weight: 300;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

/* ── Reduced motion overrides ──────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
