/* lair.so: landing page. Built on /ui/tokens.css + /ui/base.css (packages/ui). Mobile first; wider layouts at the bottom. */

/* ---------- frame ---------- */
.top,
.page,
.foot {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding-left: max(20px, env(safe-area-inset-left));
  padding-right: max(20px, env(safe-area-inset-right));
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: max(18px, env(safe-area-inset-top));
  padding-bottom: 18px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
}
.brand:hover {
  text-decoration: none;
}
.brand-mark {
  width: 30px;
  height: 30px;
  transition: transform 0.5s var(--spring);
}
.brand:hover .brand-mark {
  transform: rotate(-8deg) scale(1.06);
}
.m-base {
  fill: var(--ink);
}
.m-accent {
  fill: var(--accent);
}
.m-card {
  fill: var(--bg);
}
.brand-name {
  font-family: var(--display);
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.03em;
}
.pill {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-text);
  padding: 5px 11px;
  border-radius: 999px;
  border: 1px solid var(--accent-line);
  background: var(--accent-soft);
}
.foot {
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  /* Margins instead of padding, so the rule lines up with the page content above it. */
  width: auto;
  max-width: none;
  margin-inline: max(20px, calc((100% - var(--page-max)) / 2 + 20px));
  padding-inline: 0;
  padding-top: 28px;
  padding-bottom: max(28px, env(safe-area-inset-bottom));
  font-size: 14px;
  border-top: 1px solid var(--line);
}

/* ---------- hero ---------- */
.hero {
  padding: 36px 0 28px;
  max-width: 920px;
}
.hero h1 {
  font-size: clamp(40px, 10.5vw, 78px);
  font-weight: 620;
  line-height: 1;
  letter-spacing: -0.045em;
  text-wrap: balance;
  animation: rise 0.8s var(--ease) both;
}
.hero h1 .soft {
  display: block;
  color: var(--text-3);
}
.lede {
  margin-top: 20px;
  max-width: 560px;
  font-size: 17px;
  color: var(--text-2);
  text-wrap: pretty;
  animation: rise 0.8s 0.08s var(--ease) both;
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* ---------- invite ---------- */
.invite {
  margin-top: 30px;
  max-width: 520px;
  display: grid;
  gap: 10px;
  animation: rise 0.8s 0.16s var(--ease) both;
}
.invite-label {
  font-weight: 650;
  font-size: 15px;
}
.invite-row {
  display: grid;
  gap: 10px;
}
.invite-row .btn {
  height: 48px;
}
.code-input {
  font-family: var(--mono);
  font-size: 18px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.code-input::placeholder {
  letter-spacing: 0.12em;
}
.form-error {
  color: var(--critical-ink);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: var(--r-sm);
  background: var(--critical-soft);
}
.form-error.ok {
  color: var(--good-ink);
  background: var(--good-soft);
}
.form-error:empty {
  display: none;
}
.fine {
  font-size: 13px;
  color: var(--text-3);
}
.center {
  text-align: center;
}

/* ---------- board preview (decorative) ---------- */
.preview {
  padding: 12px 0 44px;
}
.board {
  grid-auto-flow: dense;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border-radius: var(--r-xl);
  background: color-mix(in srgb, var(--surface) 55%, transparent);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-pop);
  animation: rise 0.9s 0.24s var(--ease) both;
}
.tile {
  display: grid;
  align-content: start;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 13px;
  color: var(--text-2);
}
.tile p {
  overflow: hidden;
  text-overflow: ellipsis;
}
.tile-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.tile[data-tile='today'],
.tile[data-tile='room'],
.tile[data-tile='inbox'],
.tile[data-tile='next'] {
  grid-column: span 2;
}
/* Only the lines for the current time of day show; they fade in as the board moves on. */
.board[data-time='morning'] [data-at]:not([data-at~='morning']),
.board[data-time='afternoon'] [data-at]:not([data-at~='afternoon']),
.board[data-time='night'] [data-at]:not([data-at~='night']) {
  display: none;
}
.board [data-at] {
  animation: fade 0.6s var(--ease) both;
}
@keyframes fade {
  from {
    opacity: 0;
  }
}
.small {
  font-size: 12px;
}
.day-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 12px;
  font-size: 14px;
}
.day-time {
  font-family: var(--display);
  font-weight: 650;
  font-size: 22px;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  min-width: 64px;
}
.day-label {
  color: var(--text-2);
  min-width: 80px;
}
.day-track {
  position: relative;
  flex: 1;
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, #f5b041, var(--accent), #6b5cff);
  opacity: 0.55;
}
.day-track i {
  position: absolute;
  top: 50%;
  left: 12%;
  width: 14px;
  height: 14px;
  margin: -7px 0 0 -7px;
  border-radius: 99px;
  background: var(--text);
  box-shadow: 0 0 0 4px var(--bg);
  transition: left 0.9s var(--ease);
}
.day-track i[data-time='afternoon'] {
  left: 50%;
}
.day-track i[data-time='night'] {
  left: 88%;
}
.task {
  display: flex;
  gap: 9px;
  align-items: center;
  white-space: nowrap;
}
.task s {
  color: var(--text-3);
}
.tick {
  flex: none;
  width: 15px;
  height: 15px;
  border-radius: 999px;
  border: 1.5px solid var(--line-strong);
}
.tick.done {
  background: var(--good);
  border-color: var(--good);
}
.event,
.mail {
  display: flex;
  gap: 8px;
  white-space: nowrap;
}
.event b {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}
.mail::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--accent);
}
.big {
  font-size: 26px;
  font-weight: 650;
  color: var(--text);
  letter-spacing: -0.04em;
}
.bars {
  display: flex;
  align-items: flex-end;
  gap: 4px;
  height: 34px;
}
.bars i {
  flex: 1;
  border-radius: 4px;
  background: color-mix(in srgb, var(--accent) 70%, var(--surface-3));
}
.bars i:nth-child(1) {
  height: 40%;
}
.bars i:nth-child(2) {
  height: 70%;
}
.bars i:nth-child(3) {
  height: 55%;
}
.bars i:nth-child(4) {
  height: 85%;
}
.bars i:nth-child(5) {
  height: 65%;
}
.bars i:nth-child(6) {
  height: 90%;
}
.bars i:nth-child(7) {
  height: 75%;
}
.msg {
  display: grid;
  gap: 1px;
  padding: 8px 11px;
  border-radius: var(--r-sm);
  background: var(--surface-2);
}
.msg b {
  font-size: 12px;
  color: var(--accent-text);
}

/* ---------- features ---------- */
.features {
  display: grid;
  gap: 22px;
  padding: 8px 0 52px;
}
.feature h2 {
  font-family: var(--display);
  font-size: 19px;
  letter-spacing: -0.025em;
  margin-bottom: 6px;
}
.feature p {
  font-size: 15px;
}

/* ---------- simple pages (confirm, privacy, 404) ---------- */
.narrow {
  max-width: 640px;
  padding-top: 28px;
  padding-bottom: 56px;
}
.prose {
  display: grid;
  gap: 14px;
}
.prose h1 {
  font-size: clamp(34px, 8vw, 48px);
  letter-spacing: -0.04em;
}
.prose h2 {
  font-size: 19px;
  margin-top: 12px;
}
.prose p,
.prose li {
  color: var(--text-2);
}
.prose ul {
  margin: 0;
  padding-left: 20px;
  display: grid;
  gap: 6px;
}
.note {
  font-size: 14px;
  padding: 12px 14px;
  border-radius: var(--r-sm);
  background: var(--warn-soft);
  color: var(--warn);
}
.loading {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-2);
}
.loading::before {
  content: '';
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---------- flows (signup, login) ---------- */
.card {
  display: grid;
  gap: 14px;
  padding: 26px 22px;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  animation: rise 0.5s var(--ease) both;
}
.card h1 {
  font-size: clamp(30px, 8vw, 40px);
  letter-spacing: -0.04em;
}
.narrow-card {
  max-width: 480px;
  margin: 0 auto;
}
.eyebrow {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
}
.stack {
  display: grid;
  gap: 10px;
}
.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}
.or {
  font-size: 13px;
  color: var(--text-3);
  text-align: center;
  display: flex;
  align-items: center;
  gap: 12px;
}
.or::before,
.or::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--line);
}
.link {
  border: 0;
  padding: 0;
  background: none;
  color: var(--accent-text);
  cursor: pointer;
  font-size: inherit;
}
.link:hover {
  text-decoration: underline;
}
.btn.google {
  background: #fff;
  border-color: #fff;
  color: #1f1f1f;
}
.g-mark {
  width: 18px;
  height: 18px;
}
.steps {
  display: flex;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 12px;
  color: var(--text-3);
}
.steps li {
  padding: 4px 10px;
  border-radius: 99px;
  border: 1px solid var(--line);
}
.steps li.active {
  color: var(--text);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.name-field {
  display: flex;
  align-items: center;
  min-height: 56px;
  padding: 0 16px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  font-size: 20px;
  cursor: text;
  transition:
    border-color 0.2s,
    box-shadow 0.25s var(--ease);
}
.name-field:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 16%, transparent);
}
.name-input {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  outline: none;
  background: none;
  font-weight: 650;
  text-align: right;
}
.name-input::placeholder {
  color: var(--text-3);
}
.name-suffix {
  color: var(--text-3);
  white-space: nowrap;
}
.name-status {
  font-size: 14px;
  color: var(--text-3);
  min-height: 20px;
}
.name-status.ok {
  color: var(--good-ink);
}
.name-status.bad {
  color: var(--critical-ink);
}
.claimed {
  text-align: center;
  padding: 44px 22px;
}
.claimed-host {
  font-size: clamp(30px, 9vw, 54px);
  font-weight: 650;
  letter-spacing: -0.045em;
  word-break: break-all;
  color: var(--text-3);
  animation: rise 0.7s var(--spring) both;
}
.claimed-name {
  color: var(--text);
}
.claimed-yours {
  font-size: clamp(24px, 6vw, 34px);
  color: var(--accent-text);
  animation: rise 0.7s 0.25s var(--spring) both;
}
.claimed .actions {
  justify-content: center;
}
.otp {
  font-family: var(--mono);
  font-size: 22px;
  letter-spacing: 0.3em;
}
.field {
  display: grid;
  gap: 6px;
  font-size: 14px;
  color: var(--text-2);
}
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
}
.chips legend {
  width: 100%;
  margin-bottom: 8px;
  font-size: 14px;
  color: var(--text-2);
}
.chip {
  padding: 7px 13px;
  border-radius: 99px;
  border: 1px solid var(--line-strong);
  background: var(--surface-2);
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  transition:
    background-color 0.2s,
    color 0.2s,
    border-color 0.2s,
    transform 0.2s var(--spring);
}
.chip:active {
  transform: scale(0.95);
}
.chip.on {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  color: var(--text);
}
.foot-links {
  display: flex;
  gap: 18px;
}

/* ---------- admin console ---------- */
.wide {
  max-width: 1120px;
  padding-top: 20px;
  padding-bottom: 56px;
}
.console {
  display: grid;
  gap: 22px;
}
.console-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}
.console-head h1 {
  font-size: 30px;
  margin-right: auto;
}
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
}
.stat {
  padding: 16px;
  border-radius: var(--r);
  background: var(--surface);
  border: 1px solid var(--line);
}
.stat-n {
  font-size: 30px;
  font-weight: 650;
}
.mint-row {
  display: grid;
  gap: 10px;
}
.codes {
  font-family: var(--mono);
  font-size: 13px;
  resize: vertical;
}
.admin-section {
  display: grid;
  gap: 12px;
}
.admin-section h2 {
  font-size: 20px;
}
.filters {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
th,
td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
th {
  font-size: 12px;
  color: var(--text-3);
  font-weight: 600;
  background: var(--surface);
}
tr.banned td {
  opacity: 0.5;
}
.mono {
  font-family: var(--mono);
}
.row-actions {
  text-align: right;
}
.btn.danger {
  color: var(--critical-ink);
}

/* ---------- wider screens ---------- */
@media (min-width: 560px) {
  .invite-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
  .mint-row {
    grid-template-columns: 90px 1fr 1fr auto;
  }
  .card {
    padding: 34px;
  }
  .board {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    padding: 12px;
  }
}
@media (min-width: 900px) {
  .hero {
    padding: 72px 0 40px;
  }
  .lede {
    font-size: 19px;
  }
  .board {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    grid-auto-flow: dense;
  }
  .tile[data-tile='sleep'],
  .tile[data-tile='focus'],
  .tile[data-tile='next'] {
    grid-column: span 2;
  }
  .tile[data-tile='today'],
  .tile[data-tile='room'],
  .tile[data-tile='inbox'] {
    grid-column: span 3;
  }
  .features {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 28px;
  }
}
