/* Shared styles for all pages. No external fonts/CDNs on purpose --
   the site should render identically with zero outbound requests. */

:root {
  --bg: #fff8ef;
  --bg-elevated: #ffffff;
  --border: #f0e4d3;
  --text: #2f2a3d;
  --text-dim: #7a7390;
  --accent: #ff6b6b;
  --accent-text: #ffffff;
  --online: #2ec4b6;
  --offline: #ff6b6b;
  --maintenance: #ffb703;
  --radius: 20px;
  --shadow: 0 10px 25px -12px rgba(47, 42, 61, 0.25);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  /* rotating card-accent palette, cycled per card via nth-child */
  --pop-1: #ff6b6b;
  --pop-2: #2ec4b6;
  --pop-3: #ffb703;
  --pop-4: #a78bfa;
  --pop-5: #ff8fab;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.5;
}

a {
  color: var(--accent);
}

/* ---- Splash page ---- */

.splash {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 2rem;
}

.splash-card {
  max-width: 32rem;
}

.splash-card h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.75rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.splash-card p {
  color: var(--text-dim);
  margin: 0;
}

/* ---- Generic page shell (about / servers) ---- */

.page {
  max-width: 60rem;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.page h1 {
  font-size: 2rem;
  font-weight: 800;
  margin: 0 0 0.5rem;
  letter-spacing: -0.01em;
}

.page .subtitle {
  color: var(--text-dim);
  margin: 0 0 2.5rem;
}

/* ---- About page ---- */

.about-body {
  color: var(--text);
}

.about-body p {
  margin: 0 0 1rem;
}

/* ---- Server cards ---- */

.server-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr));
  gap: 1.5rem;
}

.server-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top: 6px solid var(--pop-1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.15s ease;
}

.server-card:hover {
  transform: translateY(-3px);
}

.server-card:nth-child(5n+2) { border-top-color: var(--pop-2); }
.server-card:nth-child(5n+3) { border-top-color: var(--pop-3); }
.server-card:nth-child(5n+4) { border-top-color: var(--pop-4); }
.server-card:nth-child(5n+5) { border-top-color: var(--pop-5); }

.server-card__image {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  background: #fbf1e2;
  display: block;
}

.server-card__body {
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
  flex: 1;
}

.server-card__name {
  font-size: 1.1rem;
  font-weight: 700;
  margin: 0;
}

.server-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  background: #f7f1e6;
  border-radius: 999px;
  padding: 0.3rem 0.7rem 0.3rem 0.55rem;
}

.status-dot {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  flex: none;
}

.status-dot--online { background: var(--online); }
.status-dot--offline { background: var(--offline); }
.status-dot--maintenance { background: var(--maintenance); }

.server-card__spacer {
  flex: 1;
}

.server-card__button {
  appearance: none;
  border: none;
  border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  padding: 0.65rem 0.9rem;
  cursor: pointer;
  width: 100%;
  transition: transform 0.1s ease, filter 0.1s ease;
}

.server-card__button:hover {
  filter: brightness(1.06);
  transform: scale(1.02);
}

.server-card__button:active {
  transform: scale(0.98);
}

.server-card__button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  filter: none;
  transform: none;
}

/* ---- About page: hero (skyline photo + curved wave divider) ---- */

.about-hero {
  height: 440px;
  position: relative;
  background: var(--bg);
}

.about-hero__photo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.about-hero__wave {
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 90px;
  display: block;
  z-index: 1;
}

.about-hero__wave-path {
  fill: var(--bg);
}

.about-hero__avatar-wrap {
  position: absolute;
  left: 50%;
  bottom: -60px;
  transform: translateX(-50%);
  z-index: 2;
}

.about-hero__avatar {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: var(--bg-elevated);
  border: 6px solid var(--bg-elevated);
  box-shadow: var(--shadow);
}

.page.about-page {
  padding-top: 4.5rem;
}

.about-intro {
  text-align: center;
}

.about-intro .about-body {
  text-align: left;
  max-width: 34rem;
  margin: 0 auto;
}

/* ---- About page: highlights (same card language as server cards) ---- */

.about-highlights__title {
  font-size: 1.25rem;
  font-weight: 800;
  margin: 2.5rem 0 1rem;
}

.about-highlights {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
  gap: 1.25rem;
}

.highlight-card {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-top: 6px solid var(--pop-1);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.1rem 1.2rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  transition: transform 0.15s ease;
}

.highlight-card:hover {
  transform: translateY(-3px);
}

.highlight-card:nth-child(5n+2) { border-top-color: var(--pop-2); }
.highlight-card:nth-child(5n+3) { border-top-color: var(--pop-3); }
.highlight-card:nth-child(5n+4) { border-top-color: var(--pop-4); }
.highlight-card:nth-child(5n+5) { border-top-color: var(--pop-5); }

.highlight-card__tag {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-dim);
  background: #f7f1e6;
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}

.highlight-card__title {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 0;
}

.highlight-card__detail {
  font-size: 0.9rem;
  color: var(--text-dim);
  margin: 0;
}

@media (max-width: 30rem) {
  .about-hero {
    height: 280px;
  }
  .about-hero__avatar-wrap {
    bottom: -50px;
  }
  .about-hero__avatar {
    width: 110px;
    height: 110px;
  }
  .page.about-page {
    padding-top: 3.75rem;
  }
}
