/* Hearth landing page. A night-blue hero and closer bracketing warm paper and
   white feature bands; the product slices use the app's own dark surfaces. */

:root {
  --night: #13142a;
  --night-deep: #0d0e1f;
  --paper: #f6f3ed;
  --white: #ffffff;
  --ink: #17182c;
  --ink-soft: #4b4e66;
  --line: rgba(23, 24, 44, 0.09);

  --blurple: #5865f2;
  --ember: #ff7a3d;
  --ember-core: #ffc15e;

  /* the app's surfaces, for the product slices */
  --app-rail: #1e1f22;
  --app-side: #2b2d31;
  --app-chat: #313338;
  --app-raise: #383a40;
  --app-text: #dbdee1;
  --app-muted: #949ba4;
  --app-green: #23a55a;

  --font: "Archivo", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gutter: 24px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

p,
h1,
h2,
h3 {
  margin: 0;
}

a {
  color: inherit;
}

[hidden] {
  display: none !important;
}

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------------------------------------------------------------- type */

.display {
  font-family: var(--font);
  font-stretch: 125%;
  font-variation-settings: "wdth" 125;
  font-weight: 850;
  text-transform: uppercase;
  line-height: 0.98;
  letter-spacing: -0.01em;
  font-size: clamp(38px, 5.2vw, 68px);
}

h2 {
  font-stretch: 112%;
  font-variation-settings: "wdth" 112;
  font-weight: 800;
  font-size: clamp(28px, 3.3vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

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

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 16px 30px;
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition: color 0.15s, background 0.15s, box-shadow 0.15s, transform 0.15s;
}

.pill.light {
  background: var(--white);
  color: var(--ink);
}

.pill.light:hover {
  color: var(--blurple);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.pill.dark {
  background: #23253f;
  color: var(--white);
}

.pill.dark:hover {
  background: #2e3152;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.22);
}

.pill.small {
  padding: 8px 18px;
  font-size: 15px;
}

.pill:focus-visible,
.me:focus-visible,
.menu-item:focus-visible,
.nav-links a:focus-visible,
.foot a:focus-visible {
  outline: 3px solid var(--ember-core);
  outline-offset: 3px;
}

/* ------------------------------------------------------------------ nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  color: var(--white);
  background: transparent;
  border-bottom: 1px solid transparent;
  transition: background 0.2s, border-color 0.2s;
}

.nav.stuck {
  background: rgba(19, 20, 42, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.07);
}

.nav-row {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-stretch: 118%;
  font-variation-settings: "wdth" 118;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.flame {
  width: 28px;
  height: 28px;
  fill: var(--ember);
}

.flame .flame-core {
  fill: var(--ember-core);
}

.nav-links {
  flex: 1;
  display: flex;
  justify-content: center;
  gap: 32px;
}

.nav-links a {
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  opacity: 0.9;
}

.nav-links a:hover {
  opacity: 1;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
}

.auth {
  min-width: 96px;
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* signed-in chip + menu */

.me-wrap {
  position: relative;
}

.me {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: var(--white);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
}

.me:hover,
.me[aria-expanded="true"] {
  background: rgba(255, 255, 255, 0.16);
}

.me-av {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  flex: none;
  object-fit: cover;
}

.me-name {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chev {
  width: 0;
  height: 0;
  border-left: 4px solid transparent;
  border-right: 4px solid transparent;
  border-top: 5px solid currentColor;
  opacity: 0.8;
}

.menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 272px;
  padding: 8px;
  border-radius: 14px;
  background: var(--white);
  color: var(--ink);
  box-shadow: 0 18px 40px rgba(8, 9, 24, 0.35);
}

.menu-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 10px 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}

.menu-head .me-av {
  width: 40px;
  height: 40px;
  font-size: 16px;
}

.menu-id {
  min-width: 0;
  line-height: 1.35;
}

.menu-name {
  font-weight: 700;
  font-size: 16px;
}

.menu-mail,
.menu-tier {
  font-size: 13px;
  color: var(--ink-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-tier {
  color: var(--blurple);
  font-weight: 600;
}

.menu-item {
  display: block;
  padding: 9px 10px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
}

.menu-item:hover {
  background: var(--paper);
}

.menu-item.quiet {
  color: #b4362a;
}

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

.hero {
  color: var(--white);
  margin-top: -76px;
  padding: 136px 0 120px;
  /* a sparse field of small stars, not a glow */
  background-color: var(--night);
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1px 1px at 28% 62%, rgba(255, 255, 255, 0.35), transparent),
    radial-gradient(1.5px 1.5px at 46% 12%, rgba(255, 255, 255, 0.4), transparent),
    radial-gradient(1px 1px at 64% 38%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1.5px 1.5px at 82% 14%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1px 1px at 92% 72%, rgba(255, 255, 255, 0.3), transparent),
    radial-gradient(1px 1px at 6% 84%, rgba(255, 255, 255, 0.3), transparent);
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
}

.greet {
  color: var(--ember-core);
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 18px;
}

.lede {
  margin-top: 26px;
  max-width: 34em;
  font-size: 20px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.82);
}

.cta-row {
  margin-top: 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

/* the product slice */

.shot {
  margin: 0;
  display: grid;
  grid-template-columns: 58px 158px minmax(0, 1fr);
  height: 404px;
  border-radius: 14px;
  overflow: hidden;
  background: var(--app-chat);
  color: var(--app-text);
  font-size: 14px;
  line-height: 1.4;
  box-shadow: 0 34px 70px -24px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.shot-rail {
  background: var(--app-rail);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 12px 0;
}

.srv {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: var(--white);
  background: var(--app-chat);
}

.srv.on {
  border-radius: 14px;
  background: var(--blurple);
  position: relative;
}

.srv.on::before {
  content: "";
  position: absolute;
  left: -9px;
  width: 4px;
  height: 32px;
  border-radius: 0 4px 4px 0;
  background: var(--white);
}

.srv.add {
  color: var(--app-green);
  font-size: 20px;
  font-weight: 400;
}

.shot-side {
  background: var(--app-side);
  padding: 0 8px;
}

.shot-server {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  margin: 0 -8px 10px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  font-weight: 700;
  color: #f2f3f5;
  font-size: 14px;
  padding-left: 16px;
}

.shot-cat,
.side-cat {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--app-muted);
  padding: 4px 8px 6px;
}

.ch {
  padding: 5px 8px;
  border-radius: 5px;
  color: var(--app-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}

.ch b {
  font-weight: 400;
  font-size: 1.15em;
  margin-right: 4px;
  opacity: 0.7;
}

.ch.on {
  background: rgba(78, 80, 88, 0.6);
  color: #f2f3f5;
}

.shot-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.shot-top {
  height: 48px;
  flex: none;
  display: flex;
  align-items: center;
  padding: 0 16px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  font-weight: 700;
  color: #f2f3f5;
}

.shot-top b {
  color: var(--app-muted);
  font-weight: 400;
  font-size: 1.3em;
  margin-right: 6px;
}

.msgs {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 16px;
  padding: 16px;
  overflow: hidden;
}

.msg {
  display: flex;
  gap: 12px;
}

.msg p {
  overflow-wrap: anywhere;
}

.who {
  font-weight: 600;
  color: #f2f3f5;
}

.who time {
  font-size: 11px;
  font-weight: 400;
  color: var(--app-muted);
  margin-left: 6px;
}

.av {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex: none;
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--white);
}

.c0 { background: #5865f2; }
.c1 { background: #23a55a; }
.c2 { background: #eb459e; }
.c3 { background: #f0b232; }
.c4 { background: #ed4245; }
.c5 { background: #9b59b6; }
.c6 { background: #1abc9c; }
.c7 { background: #e67e22; }

.typing {
  padding: 0 16px 6px;
  font-size: 12px;
  color: var(--app-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.dots {
  display: inline-flex;
  gap: 3px;
}

.dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--app-text);
  animation: blink 1.2s infinite ease-in-out;
}

.dots i:nth-child(2) { animation-delay: 0.15s; }
.dots i:nth-child(3) { animation-delay: 0.3s; }

@keyframes blink {
  0%, 60%, 100% { opacity: 0.25; transform: translateY(0); }
  30% { opacity: 1; transform: translateY(-2px); }
}

.composer {
  margin: 0 16px 16px;
  padding: 11px 14px;
  border-radius: 8px;
  background: var(--app-raise);
  color: var(--app-muted);
}

/* ------------------------------------------------------------ features */

.band {
  background: var(--white);
  padding: 120px 0;
}

.band.paper {
  background: var(--paper);
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 72px;
  align-items: center;
}

.split.flip .visual {
  order: 2;
}

.split.flip {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
}

.copy p {
  margin-top: 22px;
  font-size: 19px;
  line-height: 1.65;
  color: var(--ink-soft);
  max-width: 30em;
}

.copy code {
  font-family: var(--mono);
  font-size: 0.92em;
  font-weight: 600;
  color: var(--blurple);
  background: rgba(88, 101, 242, 0.1);
  padding: 2px 6px;
  border-radius: 5px;
}

.visual {
  display: flex;
  justify-content: center;
}

.card {
  width: 100%;
  max-width: 440px;
  border-radius: 16px;
  background: var(--app-side);
  color: var(--app-text);
  font-size: 15px;
  line-height: 1.4;
  box-shadow: 0 24px 48px -24px rgba(23, 24, 44, 0.45);
}

/* servers: the join code */

.join {
  padding: 28px;
  background: var(--app-chat);
}

.card-label {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--app-muted);
}

.code {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}

.code span {
  aspect-ratio: 4 / 5;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--app-rail);
  font-family: var(--mono);
  font-size: clamp(22px, 3vw, 32px);
  font-weight: 700;
  color: var(--white);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, 0.35);
}

.link-row {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.link-field {
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--app-rail);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--app-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-field b {
  color: var(--white);
  font-weight: 700;
}

.card-label.or {
  margin-top: 24px;
}

.join-note {
  margin-top: 14px;
  font-size: 13px;
  color: var(--app-muted);
}

.mini-btn {
  flex: none;
  padding: 9px 22px;
  border-radius: 6px;
  background: var(--blurple);
  color: var(--white);
  font-weight: 600;
  font-size: 14px;
}

/* channels: a sidebar slice */

.side-card {
  max-width: 320px;
  padding: 0 10px 14px;
}

.side-head {
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 10px;
  margin: 0 -10px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.25);
  font-weight: 700;
  color: #f2f3f5;
  padding-left: 20px;
  padding-right: 20px;
}

.side-cat {
  display: flex;
  justify-content: space-between;
}

.side-cat .plus {
  font-size: 16px;
  line-height: 1;
}

.side-card .ch {
  padding: 7px 10px;
  font-size: 15px;
}

.ch.new {
  color: #f2f3f5;
  box-shadow: inset 0 0 0 2px var(--blurple);
}

.caret::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: 1em;
  margin-left: 2px;
  vertical-align: -2px;
  background: #f2f3f5;
  animation: caret 1s steps(1) infinite;
}

@keyframes caret {
  50% { opacity: 0; }
}

/* presence: the member list */

.members-card {
  max-width: 300px;
  padding: 18px 12px;
}

.grp {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: var(--app-muted);
  padding: 4px 8px 8px;
}

.mem + .grp {
  margin-top: 14px;
}

.mem {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 6px 8px;
  border-radius: 6px;
  color: var(--app-muted);
  opacity: 0.55;
}

.mem.here {
  color: #f2f3f5;
  opacity: 1;
}

.mem .av {
  width: 32px;
  height: 32px;
  font-size: 13px;
}

.dot {
  margin-left: auto;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--app-green);
}

/* roles */

.roles-card {
  padding: 10px;
  background: var(--app-chat);
}

.role-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 10px;
  border-radius: 8px;
}

.role-row + .role-row {
  border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.role-row .nm {
  font-weight: 600;
  color: #f2f3f5;
}

.badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--blurple);
  color: var(--white);
}

.tag {
  margin-left: auto;
  font-size: 13px;
  color: var(--app-muted);
}

.ghost-btn {
  margin-left: auto;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 12px;
  border-radius: 6px;
  background: var(--app-raise);
  color: #f2f3f5;
  white-space: nowrap;
}

.ghost-btn.solid {
  background: var(--blurple);
}

/* ---------------------------------------------------------------- close */

.closer {
  background: var(--night);
  color: var(--white);
  padding: 128px 0 136px;
  text-align: center;
}

.closer-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.closer p {
  margin: 18px 0 36px;
  font-size: 20px;
  color: rgba(255, 255, 255, 0.8);
}

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

.foot {
  background: var(--night-deep);
  color: var(--white);
  padding: 72px 0 36px;
  font-size: 15px;
}

.foot-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 40px;
}

.foot-brand p {
  margin-top: 12px;
  color: rgba(255, 255, 255, 0.6);
}

.foot-col {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.foot-col h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--ember);
  margin-bottom: 4px;
}

.foot-col a,
.foot-base a {
  text-decoration: none;
  color: rgba(255, 255, 255, 0.82);
}

.foot-col a:hover,
.foot-base a:hover {
  color: var(--white);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.foot-base {
  margin-top: 56px;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* ----------------------------------------------------------- responsive */

@media (max-width: 1180px) and (min-width: 981px) {
  .shot {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .shot-side {
    display: none;
  }
}

@media (max-width: 980px) {
  .nav-links {
    display: none;
  }

  .nav-row {
    justify-content: space-between;
  }

  .hero-grid,
  .split,
  .split.flip {
    grid-template-columns: minmax(0, 1fr);
    gap: 48px;
  }

  .split .visual,
  .split.flip .visual {
    order: 2;
  }

  .band {
    padding: 88px 0;
  }
}

@media (max-width: 600px) {
  :root {
    --gutter: 16px;
  }

  body {
    font-size: 17px;
  }

  .nav-row {
    height: 64px;
  }

  .hero {
    margin-top: -64px;
    padding-top: 104px;
    padding-bottom: 80px;
  }

  .lede {
    font-size: 18px;
  }

  .pill {
    padding: 14px 24px;
    font-size: 16px;
  }

  .cta-row .pill {
    width: 100%;
  }

  .shot {
    grid-template-columns: 52px minmax(0, 1fr);
    height: 360px;
  }

  .shot-side {
    display: none;
  }

  .auth .open,
  .me-name,
  .me .chev {
    display: none;
  }

  .me {
    padding: 4px;
  }

  .band {
    padding: 72px 0;
  }

  .copy p {
    font-size: 17px;
  }

  .join {
    padding: 20px;
  }

  .closer {
    padding: 96px 0;
  }

  .foot-grid {
    grid-template-columns: 1fr 1fr;
  }

  .foot-brand {
    grid-column: 1 / -1;
  }
}

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

  .dots i,
  .caret::after {
    animation: none;
  }

  .pill {
    transition: none;
  }
}
