/* vib3hub — light, calm, professional directory */

:root {
  --bg: #f7f8fa;
  --surface: #ffffff;
  --ink: #0b1f33;
  --ink-soft: rgba(11, 31, 51, 0.72);
  --ink-muted: rgba(11, 31, 51, 0.55);
  --line: rgba(11, 31, 51, 0.1);
  --line-strong: rgba(11, 31, 51, 0.16);
  --accent: #3b82f6;
  --accent-soft: rgba(59, 130, 246, 0.1);
  --accent-ink: #1d4ed8;
  --ok: #0f766e;
  --ok-bg: rgba(15, 118, 110, 0.08);
  --err: #b42318;
  --err-bg: rgba(180, 35, 24, 0.07);
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(11, 31, 51, 0.04), 0 8px 24px rgba(11, 31, 51, 0.04);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --measure: 40rem;
  --wide: 66rem;
  --gutter: clamp(1.1rem, 3.5vw, 2rem);
  --header-h: 3.75rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 1.05rem;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img,
svg {
  display: block;
  max-width: 100%;
}

a {
  color: var(--accent-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

a:hover {
  color: var(--ink);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--ink);
  color: #fff;
}

.skip-link:focus {
  left: var(--gutter);
  top: 0.5rem;
}

.wrap {
  width: min(100% - (var(--gutter) * 2), var(--wide));
  margin-inline: auto;
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(247, 248, 250, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-h);
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 650;
  letter-spacing: -0.02em;
}

.brand:hover {
  color: var(--ink);
}

.brand-mark {
  flex-shrink: 0;
}

.brand-name {
  font-size: 1.1rem;
}

.nav {
  display: flex;
  gap: 1.1rem;
}

.nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--ink);
}

/* Featured strip */

.featured {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}

.featured-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.55rem 1rem;
  padding: 0.85rem 0;
}

.featured-label {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-ink);
  font-size: 0.75rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.featured-copy {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.featured-copy strong {
  color: var(--ink);
  font-weight: 650;
}

.dot {
  margin: 0 0.15rem;
  color: var(--ink-muted);
}

/* Intro */

.intro {
  padding: 2.5rem 0 1.5rem;
}

.intro h1 {
  margin: 0 0 0.75rem;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 700;
}

.lede {
  margin: 0;
  max-width: var(--measure);
  color: var(--ink-soft);
  font-size: 1.08rem;
}

/* Sections */

.section-head {
  margin-bottom: 1.25rem;
}

.section-head h2 {
  margin: 0 0 0.35rem;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.section-note {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.95rem;
}

.apps {
  padding: 1rem 0 2.5rem;
}

.submit {
  padding: 0 0 3.5rem;
}

/* App cards */

.app-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 1rem;
}

.app-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.25rem 1.35rem;
  box-shadow: var(--shadow);
}

.app-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.55rem;
}

.app-name {
  margin: 0;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.app-name a {
  color: var(--ink);
  text-decoration: none;
}

.app-name a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
}

.app-maker {
  color: var(--ink-muted);
  font-size: 0.88rem;
}

.app-blurb {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  max-width: 38rem;
}

.app-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  color: var(--accent-ink);
}

.app-link:hover {
  text-decoration: underline;
}

.empty-state {
  margin: 1.25rem 0 0;
  padding: 1rem 1.15rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 0.95rem;
  background: transparent;
}

/* Form */

.submit-form {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.35rem 1.5rem;
  box-shadow: var(--shadow);
}

.hp {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.field {
  margin-bottom: 1.1rem;
}

.field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink);
}

.field input {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 1rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field input::placeholder {
  color: rgba(11, 31, 51, 0.35);
}

.field input:hover {
  border-color: rgba(11, 31, 51, 0.28);
}

.field input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.field input.is-invalid {
  border-color: var(--err);
  box-shadow: 0 0 0 3px var(--err-bg);
}

.hint {
  margin: 0.35rem 0 0;
  color: var(--ink-muted);
  font-size: 0.85rem;
}

.field-error {
  margin: 0.4rem 0 0;
  color: var(--err);
  font-size: 0.88rem;
}

.form-actions {
  margin-top: 1.35rem;
}

.btn-primary {
  appearance: none;
  border: none;
  border-radius: 999px;
  padding: 0.75rem 1.35rem;
  background: var(--ink);
  color: #fff;
  font: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}

.btn-primary:hover {
  background: #16324c;
}

.btn-primary:active {
  transform: translateY(1px);
}

.btn-primary:disabled {
  opacity: 0.55;
  cursor: wait;
}

.form-status {
  margin: 1rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
}

.form-status.is-ok {
  background: var(--ok-bg);
  color: var(--ok);
}

.form-status.is-err {
  background: var(--err-bg);
  color: var(--err);
}

.form-status a {
  color: inherit;
  font-weight: 650;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.75rem 0 2.25rem;
}

.footer-inner p {
  margin: 0;
  max-width: 36rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.footer-meta {
  margin-top: 0.75rem !important;
  color: var(--ink-muted) !important;
  font-size: 0.85rem !important;
}

@media (max-width: 520px) {
  .intro {
    padding-top: 1.75rem;
  }

  .app-card,
  .submit-form,
  .room-card {
    padding: 1.1rem;
  }

  .featured-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.4rem;
  }
}


/* Room — right column on wide screens, under the apps when narrow */

.stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
}

.room {
  padding: 0 0 2rem;
}

.room-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.15rem 1.15rem 1.2rem;
  box-shadow: var(--shadow);
}

.room .section-head {
  margin-bottom: 0.9rem;
}

.room-locked p {
  margin: 0 0 0.75rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.room-unlock-link {
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
}

.room-unlock-link:hover {
  text-decoration: underline;
}

.room-form .field textarea {
  width: 100%;
  padding: 0.7rem 0.8rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  line-height: 1.45;
  resize: vertical;
  min-height: 5.2rem;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.room-form .field textarea::placeholder {
  color: rgba(11, 31, 51, 0.35);
}

.room-form .field textarea:hover {
  border-color: rgba(11, 31, 51, 0.28);
}

.room-form .field textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.room-form .form-actions {
  margin-top: 0.35rem;
}

.btn-small {
  padding: 0.55rem 1.1rem;
  font-size: 0.92rem;
}

.room-status:not(:empty) {
  margin: 0.75rem 0 0;
  font-size: 0.88rem;
  color: var(--ink-muted);
}

.room-status.is-err {
  color: var(--err);
}

.room-empty {
  margin: 0.9rem 0 0;
  color: var(--ink-muted);
  font-size: 0.9rem;
}

.room-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
  max-height: 24rem;
  overflow-y: auto;
}

.room-post {
  padding: 0.75rem 0;
  border-top: 1px solid var(--line);
}

.room-post-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  font-size: 0.82rem;
}

.room-post-name {
  font-weight: 650;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.room-post-time {
  flex-shrink: 0;
  color: var(--ink-muted);
}

.room-post-body {
  margin: 0.28rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

@media (min-width: 980px) {
  .stage {
    grid-template-columns: minmax(0, 1fr) 19rem;
    column-gap: 1.5rem;
  }

  .apps {
    grid-column: 1;
    grid-row: 1;
  }

  .submit {
    grid-column: 1;
    grid-row: 2;
  }

  .room {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: start;
    position: sticky;
    top: calc(var(--header-h) + 0.75rem);
    max-height: calc(100vh - var(--header-h) - 1.5rem);
    overflow: auto;
    padding: 1rem 0 0;
  }

  .room-list {
    max-height: none;
    overflow: visible;
  }
}

@media (max-width: 520px) {
  .room-card {
    padding: 1.1rem;
  }
}
