/* kr1o landing - built on the Orion design system tokens (design-system.md canon) */

:root {
  /* surfaces */
  --canvas: #000000;
  --card: #0c0c0c;
  --panel: #0b0b0b;
  --surface-hover: #171717;
  /* text */
  --text-primary: #ffffff;
  --text-secondary: #8d8d8e;
  --text-muted: #868687;
  /* borders */
  --border-card: #111111;
  --border-subtle: #141414;
  --border-default: #1f1f1f;
  --border-input: #1a1a1a;
  /* accent - live green, only as tiny dots / hairline */
  --accent-live: #00ff41;
  /* keycap depth */
  --keycap-light: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  --keycap-shade: inset 0 -1px 0 rgba(0, 0, 0, 0.45);
  --card-top-light: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  --well-recess: inset 0 1px 6px rgba(0, 0, 0, 0.38);
  /* radius */
  --r-pill: 9999px;
  --r-card: 10px;
  --r-lg: 16px;
  --r-sm: 8px;
  /* type */
  --font-sans: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", monospace;
  /* focus */
  --focus-ring: 0 0 0 2px rgba(255, 255, 255, 0.55);
}

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

html,
body {
  height: 100%;
}

body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--canvas);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: 14px;
  line-height: 1.4;
  letter-spacing: -0.01em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  position: relative;
  overflow-x: hidden;
}

/* faint dotted backdrop - depth without color */
.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image: radial-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}

/* ---------- header ---------- */
.header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border-subtle);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-tile {
  width: 32px;
  height: 32px;
  border-radius: var(--r-sm);
  background: var(--card);
  border: 1px solid var(--border-default);
  box-shadow: var(--keycap-light), var(--keycap-shade);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-sub {
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

/* live badge - white pulsing dot (owner taste: live dots are white) */
.live-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 11px;
  border-radius: var(--r-pill);
  background: var(--card);
  border: 1px solid var(--border-default);
  box-shadow: var(--keycap-light), var(--keycap-shade);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.6);
  animation: pulse 2.4s ease-in-out infinite;
}

.live-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
}

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

/* ---------- main ---------- */
.main {
  position: relative;
  z-index: 1;
  flex: 1;
  width: 100%;
  max-width: 940px;
  margin: 0 auto;
  padding: clamp(48px, 12vh, 120px) 20px 56px;
}

.hero {
  max-width: 620px;
}

.eyebrow {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.hero-title {
  font-size: clamp(30px, 6vw, 46px);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.hero-lead {
  margin-top: 18px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-secondary);
  max-width: 500px;
}

/* ---------- tiles ---------- */
.tiles {
  margin-top: clamp(44px, 8vh, 72px);
}

.section-label {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.tile {
  background: var(--card);
  border: 1px solid var(--border-card);
  border-radius: var(--r-card);
  box-shadow: var(--card-top-light);
  padding: 18px 16px 20px;
  min-height: 148px;
  display: flex;
  flex-direction: column;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.tile:hover {
  border-color: var(--border-default);
  background: #0e0e0e;
  transform: translateY(-1px);
}

.tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
}

.tile-index {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.chip {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-default);
  color: var(--text-secondary);
  background: var(--panel);
  box-shadow: var(--well-recess);
}

.chip-locked {
  color: var(--text-muted);
}

.tile-title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin-top: auto;
}

.tile-desc {
  margin-top: 6px;
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--text-secondary);
  min-height: 38px;
}

/* ---------- footer ---------- */
.footer {
  position: relative;
  z-index: 2;
  display: flex;
  gap: 28px;
  align-items: center;
  padding: 12px 20px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.foot-cell {
  display: flex;
  align-items: baseline;
  gap: 8px;
}

.foot-clock {
  margin-left: auto;
}

.foot-key {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.foot-val {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* ---------- a11y ---------- */
:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: var(--r-sm);
}

@media (prefers-reduced-motion: reduce) {
  .live-dot {
    animation: none;
  }
}

/* ---------- responsive ---------- */
@media (max-width: 720px) {
  .tile-grid {
    grid-template-columns: 1fr;
  }
  .footer {
    gap: 18px;
    flex-wrap: wrap;
  }
}
