:root {
  --bg: #08080c;
  --bg-soft: #0e0e14;
  --panel: rgba(255, 255, 255, 0.035);
  --panel-strong: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.16);
  --text: #f2f2f7;
  --muted: #9b9baa;
  --muted-dim: #6e6e7e;
  --accent: #7c6cff;
  --accent-2: #22d3ee;
  --radius: 18px;
  --radius-sm: 12px;
  --maxw: 1240px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 90px;
  /* The aurora blobs reach past the edges; they must not make the page
     scroll sideways. */
  overflow-x: hidden;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* ---------------------------------------------------------- background */

.aurora {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}

.aurora-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.5;
  animation: drift 26s ease-in-out infinite;
}

.aurora-1 {
  width: 620px;
  height: 620px;
  top: -260px;
  left: -160px;
  background: radial-gradient(circle, #6d5cff 0%, transparent 70%);
}

.aurora-2 {
  width: 560px;
  height: 560px;
  top: 180px;
  right: -220px;
  background: radial-gradient(circle, #0ea5e9 0%, transparent 70%);
  animation-delay: -9s;
}

.aurora-3 {
  width: 520px;
  height: 520px;
  bottom: -260px;
  left: 32%;
  background: radial-gradient(circle, #ec4899 0%, transparent 70%);
  animation-delay: -17s;
}

@keyframes drift {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(70px, 50px, 0) scale(1.12); }
  66% { transform: translate3d(-50px, 30px, 0) scale(0.94); }
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.028) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 90% 60% at 50% 0%, #000 40%, transparent 100%);
}

/* ------------------------------------------------------------- topbar */

.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 24px;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 16px 24px;
}

.topbar::before {
  content: '';
  position: absolute;
  inset: 0 -50vw;
  z-index: -1;
  background: rgba(8, 8, 12, 0.72);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 800;
  font-size: 16px;
  box-shadow: 0 4px 16px rgba(124, 108, 255, 0.4);
}

.brand-mark.small {
  width: 28px;
  height: 28px;
  font-size: 14px;
  border-radius: 8px;
}

.topnav {
  display: flex;
  gap: 4px;
  margin-left: auto;
}

.topnav a {
  padding: 8px 14px;
  border-radius: 9px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.18s, background 0.18s;
}

.topnav a:hover {
  color: var(--text);
  background: var(--panel);
}

/*
 * The two buttons of the corner (the language and the switcher) live in
 * the bar itself. They are placed here by the scripts that own them.
 */
.topbar-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-right: 12px;
  flex: none;
}

/* The same box, made by the script that owns the buttons. */
.tsite-tools {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: none;
  margin-left: auto;
}

.tsite-tools:empty {
  display: none;
}

/* The bar of the landing page is dark; the buttons are drawn for it. */
.topbar-tools .tsite-lang-btn,
.topbar-tools .tswitch-btn,
.tsite-tools .tsite-lang-btn,
.tsite-tools .tswitch-btn {
  color: var(--muted);
  border-color: var(--line-strong);
}

.topbar-tools .tsite-lang-btn:hover,
.topbar-tools .tswitch-btn:hover,
.tsite-tools .tsite-lang-btn:hover,
.tsite-tools .tswitch-btn:hover {
  color: var(--text);
  background: var(--panel-strong);
}

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

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

main {
  position: relative;
  z-index: 1;
}

.hero {
  max-width: 900px;
  margin: 0 auto;
  padding: 96px 24px 72px;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 18px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: var(--panel);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 28px;
}

.hero-badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
}

.hero-title {
  margin: 0 0 24px;
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1.05;
  font-weight: 800;
  letter-spacing: -0.035em;
}

.gradient-text {
  background: linear-gradient(100deg, #a78bfa 0%, #22d3ee 50%, #f472b6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  margin: 0 auto 36px;
  max-width: 640px;
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
}

.hero-actions {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 56px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 13px 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: transform 0.16s, box-shadow 0.16s, background 0.16s, border-color 0.16s;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6366f1);
  color: #fff;
  box-shadow: 0 10px 32px rgba(124, 108, 255, 0.34);
}

.btn-primary:hover {
  box-shadow: 0 14px 40px rgba(124, 108, 255, 0.48);
  transform: translateY(-2px);
}

.btn-ghost {
  background: var(--panel);
  border-color: var(--line-strong);
  color: var(--text);
}

.btn-ghost:hover {
  background: var(--panel-strong);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  min-width: 148px;
  padding: 18px 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}

.stat strong {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, #fff, #b9b9cc);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat span {
  font-size: 12.5px;
  color: var(--muted-dim);
  text-transform: uppercase;
  letter-spacing: 0.07em;
}

/* ----------------------------------------------------------- sections */

.apps-section,
.how,
.faq {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 64px 24px;
}

.section-head {
  margin-bottom: 36px;
}

.section-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-sub {
  margin: 0;
  max-width: 560px;
  color: var(--muted);
  font-size: 16px;
}

/* ------------------------------------------------------------ toolbar */

.toolbar {
  display: flex;
  gap: 16px;
  align-items: center;
  flex-wrap: wrap;
  margin-bottom: 28px;
}

.search-box {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 280px;
  padding: 0 14px;
  height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel);
  color: var(--muted);
  transition: border-color 0.18s, background 0.18s;
}

.search-box:focus-within {
  border-color: var(--accent);
  background: var(--panel-strong);
}

.search-box input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 15px;
}

.search-box input::placeholder {
  color: var(--muted-dim);
}

.search-box kbd {
  font-family: 'JetBrains Mono', monospace;
  font-size: 11px;
  padding: 3px 7px;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  color: var(--muted-dim);
}

.filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter {
  padding: 8px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  font-size: 13.5px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.18s;
}

.filter:hover {
  color: var(--text);
  border-color: var(--line-strong);
}

.filter[aria-selected='true'] {
  background: var(--text);
  border-color: var(--text);
  color: var(--bg);
  font-weight: 600;
}

/* --------------------------------------------------------------- grid */

/* The columns are as wide as they can be, but never wider than the
   screen: min() keeps the card from pushing the page sideways on a
   narrow phone (320px and less). */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(310px, 100%), 1fr));
  gap: 18px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.018));
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.22s cubic-bezier(0.2, 0.7, 0.3, 1), border-color 0.22s, box-shadow 0.22s;
}

.card::before {
  content: '';
  position: absolute;
  inset: -1px -1px auto;
  height: 160px;
  background: radial-gradient(120% 100% at 50% 0%, var(--app-accent, #7c6cff) 0%, transparent 68%);
  opacity: 0.16;
  transition: opacity 0.22s;
  pointer-events: none;
}

.card:hover {
  transform: translateY(-4px);
  border-color: var(--line-strong);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.card:hover::before {
  opacity: 0.3;
}

.card-top {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  position: relative;
}

.card-icon {
  display: grid;
  place-items: center;
  flex: none;
  width: 48px;
  height: 48px;
  border-radius: 13px;
  background: linear-gradient(145deg, var(--app-accent, #7c6cff), rgba(0, 0, 0, 0.35));
  color: #fff;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);
}

.card-icon svg {
  width: 26px;
  height: 26px;
}

.card-heading {
  min-width: 0;
}

.card-name {
  margin: 0 0 3px;
  font-size: 17.5px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.card-name a {
  color: inherit;
  text-decoration: none;
}

.card-name a:hover {
  color: var(--app-accent, var(--accent));
}

.card-name a:focus-visible {
  outline: 2px solid var(--app-accent, var(--accent));
  outline-offset: 3px;
  border-radius: 4px;
}

.card-tagline {
  margin: 0;
  font-size: 13.5px;
  color: var(--muted);
  line-height: 1.45;
}

.card-desc {
  margin: 0;
  font-size: 14px;
  color: var(--muted-dim);
  line-height: 1.6;
  position: relative;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  position: relative;
}

.card-tags {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.tag {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 11.5px;
  font-weight: 500;
  color: var(--mututed);
  white-space: nowrap;
}

.tag.guest {
  color: #34d399;
  background: rgba(52, 211, 153, 0.12);
}

/*
 * The two ways out of the card.
 *
 * The first one opens the app itself. It is the button the visitor is
 * here for, so it is the loud one: it is filled with the colour of the
 * app, and it stands out from the button next to it.
 *
 * The second one opens the page that describes the app: what it can do,
 * how to use it and what people ask about it. That page is the one a
 * search engine reads, so it is worth a button of its own, but it stays
 * quiet: it is an outline, not a block of colour.
 */
.card-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.card-go {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 15px;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--app-accent, var(--accent));
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: 0 3px 12px color-mix(in srgb, var(--app-accent, var(--accent)) 34%, transparent);
  transition: filter 0.16s, box-shadow 0.16s, transform 0.16s;
}

.card-go:hover {
  filter: brightness(1.1);
  box-shadow: 0 6px 20px color-mix(in srgb, var(--app-accent, var(--accent)) 48%, transparent);
  transform: translateY(-1px);
}

.card-go:focus-visible {
  outline: 2px solid var(--app-accent, var(--accent));
  outline-offset: 3px;
}

.card-go svg {
  transition: transform 0.2s;
}

.card:hover .card-go svg {
  transform: translateX(3px);
}

.card-detail {
  display: inline-flex;
  align-items: center;
  padding: 8px 13px;
  border: 1px solid color-mix(in srgb, var(--app-accent, var(--accent)) 34%, transparent);
  border-radius: 999px;
  background: transparent;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--app-accent, var(--accent));
  white-space: nowrap;
  text-decoration: none;
  transition: background 0.16s, border-color 0.16s;
}

.card-detail:hover {
  background: color-mix(in srgb, var(--app-accent, var(--accent)) 14%, transparent);
  border-color: color-mix(in srgb, var(--app-accent, var(--accent)) 62%, transparent);
}

.card-detail:focus-visible {
  outline: 2px solid var(--app-accent, var(--accent));
  outline-offset: 2px;
}

.empty {
  padding: 48px;
  text-align: center;
  color: var(--muted);
}

/* -------------------------------------------------------------- steps */

.steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
  gap: 18px;
}

.step {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  position: relative;
  overflow: hidden;
}

.step-num {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: 14px;
  letter-spacing: 0.08em;
}

.step h3 {
  margin: 0 0 10px;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.015em;
}

.step p {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.65;
}

/* ---------------------------------------------------------------- faq */

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 780px;
}

.faq-list details {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  overflow: hidden;
  transition: border-color 0.18s;
}

.faq-list details[open] {
  border-color: var(--line-strong);
}

.faq-list summary {
  padding: 16px 20px;
  cursor: pointer;
  font-weight: 600;
  font-size: 15px;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.faq-list summary::-webkit-details-marker {
  display: none;
}

.faq-list summary::after {
  content: '+';
  font-size: 20px;
  font-weight: 400;
  color: var(--muted);
  transition: transform 0.2s;
}

.faq-list details[open] summary::after {
  transform: rotate(45deg);
}

.faq-list details p {
  margin: 0;
  padding: 0 20px 18px;
  font-size: 14.5px;
  color: var(--muted);
  line-height: 1.7;
}

.faq-list code {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
}

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

.footer {
  position: relative;
  z-index: 1;
  border-top: 1px solid var(--line);
  margin-top: 40px;
}

.footer-inner {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 34px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

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

.footer-brand div {
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.footer-brand strong {
  font-size: 15px;
  letter-spacing: -0.015em;
}

.footer-brand span {
  font-size: 12.5px;
  color: var(--muted-dim);
}

.footer-note {
  margin: 0;
  font-size: 13px;
  color: var(--muted-dim);
}

/* The three quiet pages of the site: privacy, terms, contact. */
.footer-legal {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-legal a {
  color: var(--muted-dim);
  text-decoration: none;
  font-size: 13px;
  transition: color 0.15s;
}

.footer-legal a:hover {
  color: var(--text);
  text-decoration: underline;
}

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

@media (max-width: 720px) {
  .topnav { display: none; }
  .topbar { padding: 14px 18px; }
  .hero { padding: 64px 18px 48px; }
  .apps-section, .how, .faq { padding: 44px 18px; }
  .grid { grid-template-columns: 1fr; }
  .stat { min-width: 0; flex: 1 1 100px; }
}

/* A small phone: the padding shrinks and the buttons go full width, so
   nothing has to be scrolled sideways to be tapped. */
@media (max-width: 400px) {
  .hero { padding: 48px 14px 36px; }
  .apps-section, .how, .faq { padding: 36px 14px; }
  .hero-badge { font-size: 12px; padding: 7px 14px; }
  .hero-sub { font-size: 15.5px; }
  .hero-actions { gap: 10px; }
  .hero-actions .btn { width: 100%; justify-content: center; }
  .toolbar { gap: 12px; }
  .search-box { flex: 1 1 100%; height: 44px; }
  .filters { width: 100%; overflow-x: auto; flex-wrap: nowrap; padding-bottom: 4px; }
  .filter { flex: none; }
  .card { padding: 18px; gap: 12px; }
  .card-icon { width: 42px; height: 42px; border-radius: 12px; }
  .card-icon svg { width: 23px; height: 23px; }
  .card-name { font-size: 16.5px; }
  .footer-inner { padding: 26px 14px; }
  .footer-note { font-size: 12.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
