/* Allena site: one stylesheet for every page. Light and dark follow the system. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f5f4fb;
  --card: #f0f0f3;
  --text: #0b0b0f;
  --text-2: #60646c;
  --line: rgba(0, 0, 0, 0.08);
  --brand: #5636d6;
  --brand-2: #9483ff;
  --link: #4f46e5;
  --hero-from: #efeaff;
  --hero-to: #ffffff;
  --radius: 20px;
  --max: 1040px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", system-ui, "Segoe UI", Roboto, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --bg-soft: #0d0d0f;
    --card: #1c1c1f;
    --text: #f5f5f7;
    --text-2: #b0b4ba;
    --line: rgba(255, 255, 255, 0.1);
    --brand: #b9aeff;
    --brand-2: #8c7cf0;
    --link: #a99dff;
    --hero-from: #1a1530;
    --hero-to: #000000;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--link);
  text-decoration: none;
}
a:hover {
  text-decoration: underline;
}

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

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 max(20px, env(safe-area-inset-left)) 0 max(20px, env(safe-area-inset-right));
}

/* Header */

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 80%, transparent);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--line);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 56px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-weight: 600;
  font-size: 19px;
  letter-spacing: -0.01em;
}
.brand:hover {
  text-decoration: none;
}
.brand img {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}
.site-nav {
  display: flex;
  gap: 20px;
  font-size: 15px;
}
.site-nav a {
  color: var(--text-2);
}
.site-nav a:hover,
.site-nav a[aria-current="page"] {
  color: var(--text);
  text-decoration: none;
}

/* Hero */

.hero {
  background: linear-gradient(180deg, var(--hero-from), var(--hero-to));
  padding: 72px 0 56px;
  text-align: center;
}
.hero-icon {
  width: 112px;
  height: 112px;
  margin: 0 auto 28px;
  border-radius: 25px;
  box-shadow: 0 18px 40px -12px rgba(86, 54, 214, 0.55);
}
h1 {
  font-family: var(--font-display);
  text-wrap: balance;
  font-size: clamp(36px, 7vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.03em;
  margin: 0 0 16px;
}
.lead {
  text-wrap: pretty;
  font-size: clamp(18px, 2.4vw, 22px);
  color: var(--text-2);
  max-width: 34em;
  margin: 0 auto 32px;
}

/* App Store badge (placeholder until the official artwork is dropped in) */

.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 22px 0 18px;
  border-radius: 12px;
  background: #000;
  color: #fff;
  border: 1px solid #a6a6a6;
  text-align: left;
  line-height: 1.05;
}
.store-badge:hover {
  text-decoration: none;
  opacity: 0.88;
}
.store-badge svg {
  width: 26px;
  height: 26px;
  fill: #fff;
}
.store-badge small {
  display: block;
  font-size: 11px;
  letter-spacing: 0.02em;
}
.store-badge strong {
  display: block;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 54px;
  padding: 0 28px;
  border-radius: 999px;
  background: linear-gradient(180deg, #9483ff, #5636d6);
  color: #fff;
  font-weight: 600;
  font-size: 18px;
}
.button:hover {
  text-decoration: none;
  filter: brightness(1.06);
}

/* Features */

.section {
  padding: 56px 0;
}
.section h2 {
  font-family: var(--font-display);
  font-size: clamp(26px, 4vw, 36px);
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 8px;
  text-align: center;
}
.section .sub {
  text-align: center;
  color: var(--text-2);
  margin: 0 auto 36px;
  max-width: 36em;
}
.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 22px 22px 20px;
}
.card h3 {
  margin: 0 0 6px;
  font-size: 18px;
  letter-spacing: -0.01em;
}
.card p {
  margin: 0;
  color: var(--text-2);
  font-size: 15.5px;
}
.card .ask {
  display: inline-block;
  margin-top: 12px;
  padding: 8px 12px;
  border-radius: 16px 16px 16px 4px;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
}

.promise {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}
.promise .card {
  background: transparent;
  border: 1px solid var(--line);
}

/* Prose pages */

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 48px 0 72px;
}
.doc h1 {
  font-size: clamp(32px, 5vw, 44px);
}
.doc h2 {
  font-size: 22px;
  letter-spacing: -0.01em;
  margin: 40px 0 8px;
}
.doc h3 {
  font-size: 18px;
  margin: 24px 0 6px;
}
.doc p,
.doc li {
  color: var(--text);
}
.doc ul {
  padding-left: 1.2em;
}
.doc li {
  margin: 4px 0;
}
.meta {
  color: var(--text-2);
  font-size: 15px;
  margin: 0 0 24px;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  margin: 12px 0;
  display: block;
  overflow-x: auto;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--line);
}
th {
  color: var(--text-2);
  font-weight: 600;
}

/* Centered single-purpose pages (join, 404) */

.center {
  min-height: calc(100vh - 56px - 120px);
  min-height: calc(100dvh - 56px - 120px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 0;
}
.center h1 {
  font-size: clamp(30px, 6vw, 42px);
}
.center .lead {
  margin-bottom: 28px;
}
.actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.code-chip {
  display: inline-block;
  margin-top: 28px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--card);
  color: var(--text-2);
  font: 14px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all;
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 calc(28px + env(safe-area-inset-bottom));
  color: var(--text-2);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 24px;
  justify-content: space-between;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
}
.site-footer a {
  color: var(--text-2);
}

@media (max-width: 520px) {
  body {
    font-size: 16px;
  }
  .site-nav {
    gap: 14px;
    font-size: 14px;
  }
  .site-nav .hide-sm {
    display: none;
  }
  .hero {
    padding: 48px 0 40px;
  }
  .hero-icon {
    width: 92px;
    height: 92px;
    border-radius: 21px;
  }
}

/* Cards inside prose pages keep their own spacing. */
.doc .card h3 {
  margin-top: 0;
}
.doc .grid {
  margin-bottom: 8px;
}
