/* ============================================================
   OBSIDIAN - Minecraft server website template
   Design system: see DESIGN.md (identity, palette, motif, dials)
   ============================================================ */

:root {
  --bg: #0D0D0F;
  --bg-elev: #16161A;
  --bg-raise: #1E1E24;
  --ink: #F4F1EA;
  --ink-mut: #A8A29A;
  --amber: #F0A428;
  --amber-ink: #1A1400;
  --amber-hover: #F5B44E;
  --ok: #4ADE80;
  --line: #26262D;
  --chamfer: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
  --chamfer-sm: polygon(6px 0, 100% 0, 100% calc(100% - 6px), calc(100% - 6px) 100%, 0 100%, 0 6px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Inter", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Focus: always visible, amber, never removed (R-32) */
:focus-visible {
  outline: 3px solid var(--amber);
  outline-offset: 2px;
}

.skip {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--amber);
  color: var(--amber-ink);
  padding: 10px 16px;
  font-weight: 600;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.wrap-narrow { max-width: 760px; }

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  min-height: 44px;                 /* tap target (R-03) */
  padding: 10px 22px;
  font: 600 15px/1 "Inter", system-ui, sans-serif;
  text-decoration: none;
  border: none;
  cursor: pointer;
  clip-path: var(--chamfer-sm);
  transition: background-color .15s ease, color .15s ease, transform .15s ease;
}
.btn-amber { background: var(--amber); color: var(--amber-ink); }
.btn-amber:hover { background: var(--amber-hover); transform: translateY(-1px); }
.btn-ghost {
  background: var(--bg-raise);
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn-ghost:hover { box-shadow: inset 0 0 0 1px var(--amber); color: var(--amber); }
.btn-small { min-height: 38px; padding: 8px 16px; font-size: 14px; }

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 24px;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--ink);
}
.glyph {
  width: 22px;
  height: 22px;
  background: var(--amber);
  clip-path: polygon(0 0, 100% 0, 100% 65%, 65% 65%, 65% 100%, 0 100%);
}
.wordmark-name {
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 20px;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 26px; }
.nav a {
  color: var(--ink-mut);
  text-decoration: none;
  font-weight: 500;
  font-size: 15px;
}
.nav a:hover { color: var(--amber); }
.nav .btn { color: var(--ink); align-self: center; }

.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 10px;
  cursor: pointer;
}
.burger span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  transition: transform .2s ease, opacity .2s ease;
}
.burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- hero ---------- */

.hero { padding: 72px 0 64px; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 48px;
  align-items: center;
}

.hero-title {
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: clamp(52px, 9vw, 96px);
  line-height: .95;
  letter-spacing: .03em;
  text-transform: uppercase;
}
/* Lamp highlight: the only glow-adjacent text treatment on the page (R-13 dose cap) */
.hero-title span {
  color: var(--amber);
  text-shadow: 0 0 34px rgba(240, 164, 40, .35);
}

.hero-tag {
  color: var(--ink-mut);
  font-size: 18px;
  max-width: 46ch;
  margin: 18px 0 26px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--bg-elev);
  box-shadow: inset 0 0 0 1px var(--line);
  clip-path: var(--chamfer-sm);
  padding: 8px 14px;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 22px;
}
.dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--ink-mut);
}
.status-pill[data-state="checking"] .dot { background: var(--ink-mut); animation: blink 1.2s ease infinite; }
.status-pill[data-state="online"] .dot { background: var(--ok); }
.status-pill[data-state="offline"] .dot,
.status-pill[data-state="error"] .dot { background: var(--amber); }

@keyframes blink { 50% { opacity: .35; } }

.ip-bar {
  display: flex;
  align-items: stretch;
  max-width: 420px;
  margin-bottom: 8px;
}
.ip {
  flex: 1;
  display: flex;
  align-items: center;
  min-height: 46px;
  padding: 0 16px;
  background: var(--bg-elev);
  box-shadow: inset 0 0 0 1px var(--line);
  font: 500 15px "JetBrains Mono", ui-monospace, monospace;
  color: var(--ink);
  white-space: nowrap;
  overflow-x: auto;
}
.ip-bar .btn { border-left: 0; }

.ip-feedback { min-height: 22px; font-size: 13.5px; color: var(--ok); margin-bottom: 12px; }
.ip-feedback:empty { margin: 0; }

/* hero visual: the block stack (identity motif, pure CSS, no fake product shot) */
.hero-stack {
  position: relative;
  height: 320px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 14px;
}
.glow {
  position: absolute;
  width: 230px;
  height: 230px;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(240,164,40,.24) 0%, rgba(240,164,40,0) 66%);
  /* Purpose (R-01): this IS the identity, the glowstone lamp above the stack. One instance only. */
  animation: lamp-breathe 5s ease-in-out infinite;
}
/* Purpose (R-19): the lamp's light breathes, the blocks stay solid. The one hero motion. */
@keyframes lamp-breathe { 0%,100% { opacity: .75; } 50% { opacity: 1; } }
.block { clip-path: var(--chamfer); }
.b1 {
  width: 150px;
  height: 74px;
  /* lit block: light hits the top-left facet, base is deeper gold */
  background: linear-gradient(135deg, #F7BC5B 0%, #F0A428 48%, #C9861D 100%);
}
.b2 { width: 220px; height: 84px; background: var(--bg-raise); box-shadow: inset 0 0 0 1px var(--line); }
.b3 { width: 290px; height: 96px; background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--line); }

/* seam: offset block row divider (identity motif) */
.seam {
  height: 12px;
  background: repeating-linear-gradient(90deg,
      #2A2A33 0 34px,
      transparent 34px 52px);
}

/* ---------- live strip ---------- */

.live { background: var(--bg-elev); border-bottom: 1px solid var(--line); }
.live-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 0;
  padding-top: 22px;
  padding-bottom: 22px;
}
.live-cell { padding: 6px 26px 6px 0; }
.live-cell + .live-cell { padding-left: 26px; border-left: 1px solid var(--line); }
.live-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-mut);
  margin-bottom: 4px;
}
.live-value {
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 26px;
  letter-spacing: .02em;
}
.live-value[data-state="checking"] { color: var(--ink-mut); animation: blink 1.2s ease infinite; }
.live-value[data-state="live"] { color: var(--amber); }
#livePlayers[data-state="live"] { animation: pulse 4s ease infinite; }
@keyframes pulse { 0%,100% { text-shadow: 0 0 0 rgba(255,178,36,0); } 50% { text-shadow: 0 0 22px rgba(255,178,36,.45); } }
/* Purpose (R-19): the one attention pulse on the page, on the number server owners care most about. */
.live-value[data-state="fallback"] { font-size: 17px; line-height: 1.45; }
.live-motd .live-value { font-size: 18px; line-height: 1.45; font-family: "Inter", system-ui, sans-serif; font-weight: 500; }

/* ---------- sections ---------- */

section { padding: 76px 0; }
.features { background: var(--bg); }
.gallery { background: var(--bg-elev); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.staff { background: var(--bg); }
.faq { background: var(--bg-elev); border-top: 1px solid var(--line); }

/* section titles: amber block glyph extends the wordmark motif, one accent per title (dose-capped) */
.sec-title {
  display: flex;
  align-items: center;
  gap: 14px;
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: clamp(30px, 4.5vw, 44px);
  letter-spacing: .04em;
  text-transform: uppercase;
  margin-bottom: 44px;
}
.sec-title::before {
  content: "";
  width: 18px;
  height: 18px;
  flex: none;
  background: var(--amber);
  clip-path: polygon(0 0, 100% 0, 100% 65%, 65% 65%, 65% 100%, 0 100%);
}

/* features: alternating ledger rows, not identical cards (R-14, R-05) */
.ledger { list-style: none; counter-reset: feat; }
.ledger li {
  counter-increment: feat;
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 26px;
  padding: 30px 0;
  border-top: 1px solid var(--line);
}
.ledger li:last-child { border-bottom: 1px solid var(--line); }
.ledger li:nth-child(even) { grid-template-columns: 1fr 120px; }
.ledger li:nth-child(even) .feat-num { order: 2; text-align: right; }
.feat-num {
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 52px;
  line-height: 1;
  color: var(--amber);
}
.feat-num::before { content: counter(feat, decimal-leading-zero); }
.feat-body h3 { font-size: 19px; font-weight: 600; margin-bottom: 6px; }
.feat-body p { color: var(--ink-mut); max-width: 60ch; }

/* gallery: horizontal snap strip */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(300px, 1fr);
  gap: 18px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  padding-bottom: 14px;
}
.shot {
  scroll-snap-align: start;
  aspect-ratio: 16 / 9;
  clip-path: var(--chamfer);
  background: var(--bg-raise);
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  color: var(--ink-mut);
  text-decoration: none;
}
.shot img { width: 100%; height: 100%; object-fit: cover; }
.shot .ph-label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; }
.shot .ph-sub { font-size: 13px; }
/* placeholder motif: a tiny crafted block stack so the frame reads as designed, not broken (R-23: still labeled a placeholder) */
.ph-stack { display: flex; flex-direction: column; align-items: center; gap: 4px; margin-bottom: 6px; }
.ph-stack i { display: block; clip-path: var(--chamfer-sm); }
.ph-stack i:nth-child(1) { width: 34px; height: 16px; background: var(--amber); }
.ph-stack i:nth-child(2) { width: 52px; height: 18px; background: var(--bg-elev); box-shadow: inset 0 0 0 1px var(--line); }

/* staff: initial avatars, never fake photos (R-23) */
.crew {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 18px;
}
.crew li {
  background: var(--bg-elev);
  clip-path: var(--chamfer-sm);
  box-shadow: inset 0 0 0 1px var(--line);
  padding: 22px;
  display: flex;
  align-items: center;
  gap: 14px;
  transition: box-shadow .15s ease, transform .15s ease;
}
.crew li:hover {
  box-shadow: inset 0 0 0 1px var(--amber);
  transform: translateY(-2px);
}
.avatar {
  width: 46px;
  height: 46px;
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--amber);
  color: var(--amber-ink);
  font-weight: 600;
  font-size: 16px;
  clip-path: var(--chamfer-sm);
}
.crew .who b { display: block; font-size: 15.5px; }
.crew .who span { color: #B8B2A9; font-size: 14px; }

/* faq accordion */
.faq-item { border-top: 1px solid var(--line); }
.faq-item:last-child { border-bottom: 1px solid var(--line); }
.faq-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 52px;
  padding: 16px 2px;
  background: none;
  border: none;
  color: var(--ink);
  font: 600 16px/1.4 "Inter", system-ui, sans-serif;
  text-align: left;
  cursor: pointer;
}
.faq-q:hover { color: var(--amber); }
.faq-q .chev {
  flex: none;
  width: 12px;
  height: 12px;
  border-right: 2px solid var(--amber);
  border-bottom: 2px solid var(--amber);
  transform: rotate(45deg);
  transition: transform .2s ease;
}
.faq-q[aria-expanded="true"] .chev { transform: rotate(-135deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .25s ease;
}
.faq-a > div { padding: 0 2px 20px; color: var(--ink-mut); max-width: 64ch; }

/* ---------- footer ---------- */

.foot { background: var(--bg); }
.foot-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  flex-wrap: wrap;
  padding-top: 34px;
  padding-bottom: 34px;
}
.foot-nav { display: flex; gap: 22px; }
.foot-nav a { color: var(--ink-mut); text-decoration: none; font-size: 14.5px; }
.foot-nav a:hover { color: var(--amber); }
.foot-note { color: var(--ink-mut); font-size: 13px; }

/* ---------- scroll reveal (MOTION 2, one per section) ---------- */

.reveal { opacity: 0; transform: translateY(12px); transition: opacity .5s ease, transform .5s ease; }
.reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .status-pill[data-state="checking"] .dot,
  .live-value[data-state="checking"],
  #livePlayers[data-state="live"],
  .glow { animation: none; }
  .btn, .faq-q .chev, .faq-a, .burger span { transition: none; }
}

/* ---------- mobile (R-03) ---------- */

@media (max-width: 900px) {
  .hero { padding-top: 48px; }
  .hero-grid { grid-template-columns: 1fr; gap: 36px; }
  .hero-stack { height: 220px; order: -1; }
  .block.b1 { width: 110px; height: 56px; }
  .block.b2 { width: 160px; height: 64px; }
  .block.b3 { width: 210px; height: 72px; }

  .live-grid { grid-template-columns: 1fr 1fr; }
  .live-motd { grid-column: 1 / -1; border-top: 1px solid var(--line); margin-top: 14px; padding-top: 16px; padding-left: 0; border-left: none; }
  .live-cell + .live-cell { padding-left: 0; border-left: none; }
  .live-cell:nth-child(2) { padding-left: 26px; border-left: 1px solid var(--line); }
}

@media (max-width: 720px) {
  .burger { display: flex; }
  .nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    padding: 10px 24px 18px;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 0; font-size: 16px; }
  .nav .btn { margin-top: 10px; }

  .ledger li, .ledger li:nth-child(even) { grid-template-columns: 1fr; gap: 8px; }
  .ledger li:nth-child(even) .feat-num { order: 0; text-align: left; }
  .feat-num { font-size: 38px; }
  .ip-bar { flex-direction: row; }
  section { padding: 56px 0; }
  .topbar { padding: 10px 18px; }
  .wrap { padding: 0 18px; }
  .hero-title { word-break: break-word; }
}

/* BUY BADGE (demo overlay) */
.buy-badge {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 90;
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 18px;
  background: var(--bg-elev);
  border: 1px solid var(--amber);
  clip-path: var(--chamfer-sm);
  text-decoration: none;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
  transition: transform 0.15s ease, background 0.15s ease;
}
.buy-badge:hover { transform: translateY(-2px); background: var(--bg-raise); }
.buy-badge-kicker {
  font-family: "Inter", system-ui, sans-serif;
  font-size: 10px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-mut);
}
.buy-badge-cta {
  font-family: "Anton", "Arial Narrow", sans-serif;
  font-size: 15px;
  letter-spacing: 0.04em;
  color: var(--amber);
}
@media (max-width: 640px) {
  .buy-badge { right: 12px; bottom: 12px; padding: 10px 14px; }
  .buy-badge-cta { font-size: 13px; }
}
