/*
 * The landing page.
 *
 * Shares its tokens with styles.css; everything here is layout and texture that only
 * the home page uses.
 */

/* ---------------------------------------------------------------- backdrop */

.glow {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
  z-index: 0;
}
.glow::before,
.glow::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.5;
}
.glow::before {
  width: 640px; height: 640px;
  top: -280px; left: -140px;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 34%, transparent), transparent 68%);
}
.glow::after {
  width: 520px; height: 520px;
  top: -180px; right: -120px;
  background: radial-gradient(circle, color-mix(in srgb, #3b82f6 26%, transparent), transparent 68%);
}
@media (prefers-reduced-motion: no-preference) {
  .glow::before { animation: drift 24s ease-in-out infinite alternate; }
  .glow::after { animation: drift 30s ease-in-out infinite alternate-reverse; }
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(40px, 30px, 0); }
}

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

.hero2 { position: relative; padding: 4.5rem 0 3rem; }
.hero2 > .wrap { position: relative; z-index: 1; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 2.5rem; }
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 11%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 26%, transparent);
  border-radius: 999px;
  padding: 0.3rem 0.8rem;
  margin-bottom: 1.5rem;
}
.eyebrow .pip {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}

h1.display {
  max-width: 13ch;
  font-size: clamp(2.3rem, 5.4vw, 3.9rem);
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.04;
  margin-bottom: 1.2rem;
}
h1.display .hl {
  background: linear-gradient(104deg, var(--accent) 8%, #67e8f9 92%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------------------------------------------------------------- window */

.window {
  position: relative;
  border-radius: 14px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  box-shadow:
    0 1px 0 color-mix(in srgb, #fff 6%, transparent) inset,
    0 30px 70px -30px rgba(0, 0, 0, 0.65);
  overflow: hidden;
}
.window-bar {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.6rem 0.85rem;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--border);
}
.window-bar i {
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--border-strong);
  display: block;
}
.window-bar .label {
  margin-left: 0.5rem;
  font-size: 0.74rem;
  color: var(--text-faint);
  font-family: var(--mono);
}
.window img { display: block; width: 100%; height: auto; }

.hero-visual { position: relative; }
.hero-visual .float {
  position: absolute;
  right: -14px;
  bottom: -26px;
  width: 190px;
  border-radius: 12px;
  border: 1px solid var(--border-strong);
  background: var(--bg-raised);
  box-shadow: 0 22px 50px -22px rgba(0, 0, 0, 0.7);
  overflow: hidden;
}
.hero-visual .float img { display: block; width: 100%; height: auto; }
@media (max-width: 560px) { .hero-visual .float { display: none; } }

/* ---------------------------------------------------------------- stats */

.stat-strip {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  margin: 3.5rem 0 0;
}
.stat-strip .stat { background: var(--bg-raised); padding: 1.3rem 1.2rem; }
.stat-strip b {
  display: block;
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.stat-strip span { font-size: 0.82rem; color: var(--text-faint); }
.stat-strip .live {
  display: inline-flex; align-items: center; gap: 0.35rem;
  font-size: 0.68rem; color: var(--accent);
  text-transform: uppercase; letter-spacing: 0.07em;
}
.stat-strip .live i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 22%, transparent);
}

/* ---------------------------------------------------------------- bento */

.bento {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 1.1rem;
}
.bento .card { grid-column: span 2; }
.bento .card.wide { grid-column: span 3; }
/* A card with two paragraphs ran them together into one block of text. */
.bento .card p + p { margin-top: 0.7rem; }
@media (max-width: 1000px) { .bento .card, .bento .card.wide { grid-column: span 3; } }
@media (max-width: 680px) { .bento .card, .bento .card.wide { grid-column: span 6; } }

.card {
  position: relative;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: border-color 0.16s ease, transform 0.16s ease;
}
.card:hover { border-color: var(--border-strong); transform: translateY(-2px); }
.card h3 { font-size: 1.02rem; margin-bottom: 0.5rem; }
.card p { color: var(--text-dim); font-size: 0.93rem; margin: 0; }
.card .icon {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  border-radius: 9px;
  background: color-mix(in srgb, var(--accent) 13%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, transparent);
  color: var(--accent);
  margin-bottom: 1rem;
}
.card .icon svg { width: 18px; height: 18px; }

/* ---------------------------------------------------------------- try box */

.try {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  gap: 2.5rem;
  align-items: start;
}
@media (max-width: 900px) { .try { grid-template-columns: 1fr; gap: 1.8rem; } }

.term {
  border-radius: var(--radius);
  border: 1px solid var(--border-strong);
  background: var(--bg-sunken);
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0, 0, 0, 0.6);
}
.term-bar {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 0.6rem 0.85rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-raised);
}
.term-bar .method {
  font-family: var(--mono); font-size: 0.62rem; font-weight: 700;
  padding: 0.14rem 0.36rem; border-radius: 4px;
  background: color-mix(in srgb, #38bdf8 20%, transparent); color: #7dd3fc;
}
.term-bar code { background: none; border: none; padding: 0; font-size: 0.76rem; color: var(--text-dim); }

.searchrow { display: flex; gap: 0.5rem; padding: 0.85rem; border-bottom: 1px solid var(--border); }
.searchrow input {
  flex: 1; min-width: 0;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: 7px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 0.86rem;
  padding: 0.5rem 0.7rem;
}
.searchrow input:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent);
}
.searchrow button {
  background: var(--accent); color: #04120d; border: none;
  border-radius: 7px; padding: 0.5rem 1.05rem;
  font-weight: 650; font-size: 0.86rem; font-family: inherit; cursor: pointer;
}
.searchrow button:hover { background: var(--accent-strong); }

.hits { padding: 0.35rem 0; max-height: 320px; overflow-y: auto; }
.hit {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.8rem;
  padding: 0.6rem 0.9rem;
  border-bottom: 1px solid var(--border);
}
.hit:last-child { border-bottom: none; }
.hit .n { font-size: 0.88rem; color: var(--text); font-weight: 550; }
.hit .m { font-size: 0.76rem; color: var(--text-faint); }
.hit .k {
  font-family: var(--mono); font-size: 0.73rem; color: var(--accent);
  align-self: center; white-space: nowrap;
}
.hits .empty { padding: 1.2rem 0.9rem; color: var(--text-faint); font-size: 0.88rem; }

.chips { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1rem; }
.chip {
  background: none; border: 1px solid var(--border);
  color: var(--text-dim); border-radius: 999px;
  padding: 0.25rem 0.75rem; font-size: 0.79rem;
  font-family: inherit; cursor: pointer;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }

/* ---------------------------------------------------------------- flow */

/*
 * Three steps, stacked. An auto-fit grid put them in two columns beside the console and
 * left a fourth cell visibly empty, which read as a missing step rather than a layout.
 */
.flow {
  display: grid;
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.step {
  background: var(--bg-raised);
  padding: 1.15rem 1.25rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.15rem 0.9rem;
  align-items: baseline;
}
.step .num {
  grid-row: 1 / span 2;
  font-family: var(--mono); font-size: 0.72rem; font-weight: 700;
  color: var(--accent); letter-spacing: 0.08em;
  padding-top: 0.15rem;
}
.step h4 { font-size: 0.97rem; margin: 0 0 0.4rem; }
.step p { font-size: 0.87rem; color: var(--text-dim); margin: 0; }

/* ---------------------------------------------------------------- shots */

.showcase { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.25rem; }
@media (max-width: 900px) { .showcase { grid-template-columns: 1fr; } }
.showcase .side { display: grid; gap: 1.25rem; align-content: start; }

figure.shot { margin: 0; }
figure.shot img {
  display: block; width: 100%; height: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-sunken);
}
figure.shot figcaption { margin-top: 0.55rem; font-size: 0.82rem; color: var(--text-faint); }

/* ---------------------------------------------------------------- download */

.download {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: center;
  background: var(--bg-raised);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 2rem;
}
@media (max-width: 860px) { .download { grid-template-columns: 1fr; gap: 1.5rem; padding: 1.5rem; } }

.download h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
.download p { color: var(--text-dim); font-size: 0.95rem; }

.dl-meta {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.5rem 1.1rem;
  font-size: 0.88rem;
  margin: 0 0 1.4rem;
}
.dl-meta dt { color: var(--text-faint); }
.dl-meta dd { margin: 0; color: var(--text-dim); }
.dl-meta code {
  font-size: 0.76rem;
  word-break: break-all;
  background: none;
  border: none;
  padding: 0;
  color: var(--text-dim);
}

.dl-actions { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: center; }
.btn-lg { padding: 0.85rem 1.5rem; font-size: 1rem; }

.dl-steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
}
/*
 * Positioned rather than laid out as a grid: in a grid every child becomes an item, so
 * an inline <code> inside the step text was breaking onto a line of its own.
 */
.dl-steps li {
  counter-increment: step;
  position: relative;
  padding-left: 2.2rem;
  font-size: 0.92rem;
  line-height: 1.6;
  color: var(--text-dim);
}
.dl-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.12em;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--accent);
  background: color-mix(in srgb, var(--accent) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 24%, transparent);
  border-radius: 50%;
  width: 22px; height: 22px;
  display: grid; place-items: center;
}
