/* RayMate — landing page
   Colour comes from the app icon's violet. It is used flat, and only where it
   means something: the primary action, a selection, a live signal. The rest is
   carried by type, spacing and hairlines. */

:root {
  --ink: #08080c;
  --ink-sunken: #050508;
  --surface: #0f0f16;
  --surface-raised: #15151e;

  --line: rgba(255, 255, 255, 0.09);
  --line-strong: rgba(255, 255, 255, 0.17);

  --text: #f4f4f8;
  --dim: #a0a0b2;
  --faint: #6d6d82;

  --accent: #8b6bff;
  --on-accent: #08080c;
  --hover-neutral: rgba(255, 255, 255, 0.06);

  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --display: "Inter Tight", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --gutter: 24px;
  --measure: 1120px;

  /* Radius follows element scale: controls tighter than panels. */
  --r-control: 8px;
  --r-panel: 14px;
  --r-pill: 999px;
}

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

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  overflow-x: clip;
}

a {
  color: inherit;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 3px;
}

.shell {
  width: 100%;
  max-width: var(--measure);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.skip {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip:focus {
  width: auto;
  height: auto;
  clip-path: none;
  left: 16px;
  top: 16px;
  z-index: 100;
  background: var(--surface-raised);
  border: 1px solid var(--line-strong);
  padding: 10px 16px;
  border-radius: var(--r-control);
}

/* ---------- Navigation ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(8, 8, 12, 0.76);
  backdrop-filter: saturate(160%) blur(16px);
  -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease;
}
.nav[data-scrolled="true"] {
  border-bottom-color: var(--line);
}
.nav__inner {
  display: flex;
  align-items: center;
  gap: 28px;
  height: 64px;
}
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--display);
  font-weight: 650;
  font-size: 18px;
  letter-spacing: -0.02em;
  text-decoration: none;
}
.wordmark img {
  width: 26px;
  height: 26px;
  border-radius: 6px;
}
.nav__links {
  display: flex;
  gap: 26px;
  margin-left: auto;
  font-size: 15px;
  color: var(--dim);
}
.nav__links a {
  text-decoration: none;
  transition: color 0.15s ease;
}
.nav__links a:hover {
  color: var(--text);
}

/* ---------- Buttons ----------
   Each button tints exactly one channel: the primary fills, the secondary
   draws a border. No gradients, no glows. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: inherit;
  font-size: 15px;
  font-weight: 560;
  line-height: 1;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--r-control);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn--primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 640;
}
.btn--primary:hover {
  background: #9a7dff;
  border-color: #9a7dff;
}
.btn--ghost {
  background: none;
  border-color: var(--line-strong);
  color: var(--text);
}
.btn--ghost:hover {
  background: var(--hover-neutral);
}
.btn--sm {
  min-height: 34px;
  padding: 0 16px;
  font-size: 14px;
}

/* ---------- Keycaps ---------- */

kbd {
  font-family: var(--mono);
  font-size: 0.82em;
  font-weight: 500;
  line-height: 1;
  display: inline-block;
  padding: 0.34em 0.5em;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line-strong);
  color: var(--text);
  vertical-align: 0.06em;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  padding-top: 32px;
  padding-bottom: 64px;
  text-align: center;
  isolation: isolate;
  overflow-x: hidden;
  overflow-x: clip;
}
.hero__bloom {
  position: absolute;
  z-index: -1;
  top: -300px;
  left: 50%;
  translate: -50% 0;
  width: min(900px, 120vw);
  aspect-ratio: 1;
  background: radial-gradient(circle at 50% 50%, rgba(139, 107, 255, 0.16) 0%, transparent 62%);
  pointer-events: none;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 6px 14px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  font-size: 14px;
  color: var(--dim);
}
.badge b {
  color: var(--text);
  font-weight: 600;
}

.hero h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.5rem, 5vw, 4.4rem);
  line-height: 0.98;
  letter-spacing: -0.048em;
  margin: 20px auto 0;
  max-width: 15ch;
  text-wrap: balance;
}
.hero h1 kbd {
  font-size: 0.38em;
  font-weight: 500;
  vertical-align: 0.46em;
  margin-inline: 0;
  border-radius: 0.28em;
}
.hero h1 kbd + kbd {
  margin-left: 0.14em;
}
.hero h1 .punct {
  margin-left: -0.1em;
}

.hero__sub {
  max-width: 60ch;
  margin: 16px auto 0;
  color: var(--dim);
  font-size: clamp(1.02rem, 1.9vw, 1.2rem);
  text-wrap: pretty;
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 26px;
}
.hero__meta {
  margin-top: 12px;
  font-size: 14px;
  color: var(--faint);
}

/* ---------- The app, on a desktop ----------
   A copy of the launcher's Home view (src/app/panel/HomeView.tsx). Every size is
   the app's own px value expressed against the panel's 750px width, so the
   replica keeps its exact proportions at any scale. 1px = 0.13333cqw. */

.mac {
  position: relative;
  width: 100%;
  max-width: 1100px;
  margin: 28px auto 0;
  aspect-ratio: 16 / 7.6;
  border-radius: 18px;
  overflow: hidden;
  display: grid;
  place-items: center;
  container-type: inline-size;
  box-shadow: 0 50px 100px -40px rgba(0, 0, 0, 0.9);
}
.mac__wall {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}

/* The app's own palette, copied from src/styles.css (dark theme). */
.panel {
  position: relative;
  z-index: 1;
  width: 68.18cqw;
  aspect-ratio: 750 / 475;
  border-radius: 2.364cqw;
  overflow: hidden;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  text-align: left;
  font-family: -apple-system, "SF Pro Text", "Inter", system-ui, sans-serif;
  color: #ececec;
  background: rgba(6, 6, 8, 0.42);
  border: 1px solid rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(30px) saturate(180%);
  -webkit-backdrop-filter: blur(30px) saturate(180%);
  box-shadow: 0 2.36cqw 4.55cqw rgba(0, 0, 0, 0.6), 0 0.73cqw 1.64cqw rgba(0, 0, 0, 0.4);
  --rm-muted: rgba(235, 235, 245, 0.5);
}

/* search bar — h-[62px], px-5, gap-3 */
.pl-search {
  display: flex;
  align-items: center;
  flex: none;
  height: 8.267cqw;
  padding: 0 2.667cqw;
  gap: 1.6cqw;
}
.pl-mark {
  width: 2.933cqw;
  height: 2.933cqw;
  flex: none;
  color: var(--rm-muted);
}
.pl-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  font: inherit;
  font-size: 2.533cqw;
  color: #ececec;
  background: none;
  border: 0;
  padding: 0;
}
.pl-input::placeholder {
  color: var(--rm-muted);
}
.pl-input:focus {
  outline: none;
}
.pl-quickai {
  display: flex;
  align-items: center;
  gap: 1.067cqw;
  flex: none;
  font-size: 1.867cqw;
  color: var(--rm-muted);
}

/* Kbd — h-[22px], rounded-[6px], 12px */
.pl-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 2.933cqw;
  min-width: 2.933cqw;
  padding: 0 0.8cqw;
  border-radius: 0.8cqw;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.1);
  font-family: inherit;
  font-size: 1.6cqw;
  color: #ececec;
}

/* list — px-2, pb-16 */
.pl-list {
  flex: 1;
  min-height: 0;
  overflow: hidden;
  padding: 0 1.067cqw 8.533cqw;
}
.pl-section {
  padding: 1.6cqw 1.6cqw 0.8cqw;
  font-size: 1.6cqw;
  font-weight: 500;
  color: var(--rm-muted);
}
/* row — h-[38px], gap-3, rounded-[10px], px-3, 14px */
.pl-item {
  display: flex;
  align-items: center;
  height: 5.067cqw;
  gap: 1.6cqw;
  padding: 0 1.6cqw;
  border-radius: 1.333cqw;
  font-size: 1.867cqw;
  cursor: default;
}
.pl-item.is-sel {
  background: rgba(255, 255, 255, 0.09);
}
.pl-title {
  color: #ececec;
  white-space: nowrap;
}
.pl-sub,
.pl-acc {
  color: var(--rm-muted);
  white-space: nowrap;
}
.pl-acc {
  margin-left: auto;
  flex: none;
}
.pl-empty {
  margin: 0;
  padding: 2.5cqw 1.6cqw;
  font-size: 1.867cqw;
  color: var(--rm-muted);
}

/* prompt / app icon — 22px box, 6px radius, 14px glyph */
.pi {
  display: grid;
  place-items: center;
  flex: none;
  width: 2.933cqw;
  height: 2.933cqw;
  border-radius: 0.8cqw;
  background: var(--c);
  color: #fff;
}
.pi svg {
  width: 1.867cqw;
  height: 1.867cqw;
}
.pi--c0a84ff { --c: #0a84ff; }
.pi--c0ea5e9 { --c: #0ea5e9; }
.pi--c14b8a6 { --c: #14b8a6; }
.pi--c30b0c7 { --c: #30b0c7; }
.pi--c30d158 { --c: #30d158; }
.pi--c34c759 { --c: #34c759; }
.pi--c3b82f6 { --c: #3b82f6; }
.pi--c5e5ce6 { --c: #5e5ce6; }
.pi--c64748b { --c: #64748b; }
.pi--c8b5cf6 { --c: #8b5cf6; }
.pi--c8e8e93 { --c: #8e8e93; }
.pi--cec4899 { --c: #ec4899; }
.pi--cf59e0b { --c: #f59e0b; }

/* footer — absolute, px-3 pb-3, h-9 pill */
.pl-footer {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  padding: 0 1.6cqw 1.6cqw;
}
.pl-fbtn,
.pl-pill {
  display: flex;
  align-items: center;
  height: 4.8cqw;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.pl-fbtn {
  width: 4.8cqw;
  justify-content: center;
  color: var(--rm-muted);
}
.pl-fbtn svg {
  width: 2.133cqw;
  height: 2.133cqw;
}
.pl-pill {
  gap: 1.6cqw;
  padding: 0 2.133cqw;
  font-size: 1.733cqw;
}
.pl-action {
  color: #ececec;
}

.demo__caption {
  margin: 18px 0 0;
  text-align: center;
  font-size: 13.5px;
  color: var(--faint);
}

/* ---------- Free ---------- */

.free {
  position: relative;
  overflow-x: clip;
  padding: 110px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-sunken);
}
.free__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 60px;
  align-items: start;
}
.free h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 4rem);
  line-height: 1.01;
  letter-spacing: -0.045em;
  margin: 0;
}
.free p {
  margin: 0 0 22px;
  color: var(--dim);
  max-width: 60ch;
}
.free p:last-of-type {
  margin-bottom: 0;
}

/* A table of facts, set as rules rather than boxes. */
.ledger {
  list-style: none;
  margin: 34px 0 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.ledger li {
  display: flex;
  align-items: baseline;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--dim);
}
.ledger b {
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.05rem;
  letter-spacing: -0.02em;
  width: 7rem;
  flex: none;
  color: var(--text);
}
.ledger .price {
  font-size: 1.6rem;
  color: var(--accent);
}

/* ---------- Sections ---------- */

.section {
  padding: 110px 0;
}
.section--tight {
  padding-top: 0;
}
.section__head {
  margin-bottom: 52px;
}
.section__head h2 {
  max-width: 19ch;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.2rem, 4.8vw, 3.4rem);
  line-height: 1.03;
  letter-spacing: -0.042em;
  margin: 0;
}
.section__head p {
  margin: 18px 0 0;
  color: var(--dim);
  max-width: 46ch;
}

/* ---------- Features ----------
   Grouped by hairline rules, not five identical boxes. */

.bento {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid var(--line);
}
.card {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 34px 32px 36px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}
/* Column 1 and column 3 sit against the page gutter, so they lose that padding. */
.card:nth-child(1),
.card:nth-child(3) {
  padding-left: 0;
}
.card:nth-child(2),
.card:nth-child(5) {
  border-right: 0;
  padding-right: 0;
}
.card--wide {
  grid-column: span 2;
}
.card h3 {
  font-family: var(--display);
  font-weight: 640;
  font-size: 1.32rem;
  letter-spacing: -0.026em;
  margin: 0 0 10px;
}
.card p {
  margin: 0;
  color: var(--dim);
  font-size: 15.5px;
  max-width: 46ch;
}
.card__body {
  margin-top: auto;
}

/* provider chips */
.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.chip {
  font-size: 13.5px;
  padding: 6px 12px;
  border-radius: var(--r-pill);
  border: 1px solid var(--line);
  color: var(--dim);
}
/* One channel: a solid fill whose border matches it. */
.chip--accent {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
  font-weight: 550;
}

/* rewrite before/after */
.rewrite {
  font-size: 15.5px;
  line-height: 1.75;
  color: var(--text);
}
.rewrite del {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
  color: var(--faint);
}
.rewrite ins {
  text-decoration: none;
  color: var(--accent);
}

/* waveform — accent encodes a live signal */
.wave {
  display: flex;
  align-items: center;
  gap: 4px;
  height: 44px;
}
.wave i {
  display: block;
  width: 4px;
  border-radius: 2px;
  background: var(--accent);
  height: 30%;
}
.wave i:nth-child(1) { height: 22%; }
.wave i:nth-child(2) { height: 48%; }
.wave i:nth-child(3) { height: 74%; }
.wave i:nth-child(4) { height: 96%; }
.wave i:nth-child(5) { height: 62%; }
.wave i:nth-child(6) { height: 34%; }
.wave i:nth-child(7) { height: 58%; }
.wave i:nth-child(8) { height: 88%; }
.wave i:nth-child(9) { height: 46%; }
.wave i:nth-child(10) { height: 26%; }
.wave i:nth-child(11) { height: 54%; }
.wave i:nth-child(12) { height: 80%; }
.wave i:nth-child(13) { height: 66%; }
.wave i:nth-child(14) { height: 38%; }
.wave i:nth-child(15) { height: 20%; }
.wave i:nth-child(16) { height: 44%; }
.wave i:nth-child(17) { height: 70%; }
.wave i:nth-child(18) { height: 30%; }

/* selection quote */
.quote {
  border-left: 2px solid var(--line-strong);
  padding: 2px 0 2px 16px;
  color: var(--dim);
  font-size: 15px;
  line-height: 1.6;
}
.quote__ask {
  color: var(--text);
}

/* key rows */
.rows {
  display: grid;
  font-size: 14.5px;
  border-top: 1px solid var(--line);
}
.rows div {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line);
  color: var(--dim);
}
.rows b {
  font-weight: 550;
  color: var(--text);
  width: 9ch;
  flex: none;
}

/* ---------- Steps ---------- */

.steps {
  counter-reset: step;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 38px;
}
.steps li {
  counter-increment: step;
  border-top: 1px solid var(--line-strong);
  padding-top: 22px;
}
.steps li::before {
  content: counter(step);
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--faint);
}
.steps h3 {
  font-family: var(--display);
  font-size: 1.18rem;
  font-weight: 640;
  letter-spacing: -0.022em;
  margin: 12px 0 8px;
}
.steps p {
  margin: 0;
  color: var(--dim);
  font-size: 15px;
}

/* ---------- Download ---------- */

.download {
  position: relative;
  overflow-x: clip;
  padding: 120px 0;
  text-align: center;
  border-top: 1px solid var(--line);
}
.download h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 3.8rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin: 0 auto;
  max-width: 16ch;
}
.download p {
  margin: 20px auto 0;
  max-width: 48ch;
  color: var(--dim);
}

/* ---------- Footer ---------- */

.footer {
  border-top: 1px solid var(--line);
  padding: 36px 0;
  font-size: 14.5px;
  color: var(--faint);
}
.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 26px;
}
.footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-left: auto;
}
.footer a {
  text-decoration: none;
}
.footer a:hover {
  color: var(--text);
}

/* ---------- Legal pages ---------- */

.legal {
  padding: 72px 0 104px;
}
.legal .shell {
  max-width: 820px;
}
.legal__head {
  margin-bottom: 56px;
}
.legal__head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2.4rem, 5.4vw, 3.6rem);
  letter-spacing: -0.045em;
  line-height: 1.02;
  margin: 0;
}
.legal__head p {
  color: var(--dim);
  margin: 20px 0 0;
  max-width: 62ch;
}
.legal__date {
  font-size: 14px;
  color: var(--faint);
  margin-top: 16px;
}
.legal__body {
  max-width: 68ch;
}
.legal__body h2 {
  font-family: var(--display);
  font-weight: 650;
  font-size: 1.55rem;
  letter-spacing: -0.028em;
  margin: 60px 0 16px;
  padding-top: 26px;
  border-top: 1px solid var(--line);
}
/* The contents list already closes with a rule; don't draw a second one. */
.legal__body h2:first-of-type {
  border-top: 0;
  padding-top: 0;
  margin-top: 44px;
}
.legal__body h3 {
  font-family: var(--display);
  font-weight: 600;
  font-size: 1.1rem;
  letter-spacing: -0.015em;
  margin: 32px 0 10px;
}
.legal__body p,
.legal__body li {
  color: #c8c8d6;
  font-size: 16.5px;
}
.legal__body ul {
  padding-left: 20px;
}
.legal__body li {
  margin-bottom: 10px;
}
.legal__body li::marker {
  color: var(--faint);
}
.legal__body a {
  color: var(--text);
  text-decoration-color: var(--line-strong);
  text-underline-offset: 3px;
}
.legal__body a:hover {
  text-decoration-color: var(--accent);
}
.legal__body strong {
  color: var(--text);
  font-weight: 600;
}
/* The claim that matters most, stated without a box around it. */
.callout {
  border-left: 2px solid var(--accent);
  padding: 4px 0 4px 20px;
  margin: 28px 0;
}
.callout p {
  margin: 0;
}
.legal__toc {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  margin: 0;
}
.legal__toc ol {
  margin: 0;
  padding-left: 18px;
  columns: 2;
  column-gap: 40px;
}
.legal__toc li {
  margin-bottom: 8px;
  font-size: 15px;
  color: var(--faint);
}
.legal__toc a {
  color: var(--dim);
  text-decoration: none;
}
.legal__toc a:hover {
  color: var(--text);
}

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .free__inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .bento,
  .steps {
    grid-template-columns: 1fr;
  }
  .card,
  .card--wide {
    grid-column: span 1;
    border-right: 0;
    padding-inline: 0;
  }
  .steps {
    gap: 30px;
  }
  .legal__toc ol {
    columns: 1;
  }
}

@media (max-width: 620px) {
  :root {
    --gutter: 20px;
  }
  body {
    font-size: 16px;
  }
  .nav__links {
    gap: 18px;
    font-size: 14px;
  }
  .nav__links a[data-optional] {
    display: none;
  }
  .hero {
    padding-top: 60px;
    padding-bottom: 76px;
  }
  .section,
  .free,
  .download {
    padding: 76px 0;
  }
  .section--tight {
    padding-top: 0;
  }
  .hero__cta .btn {
    width: 100%;
  }
  .mac {
    width: 100vw;
    max-width: none;
    margin-inline: calc(50% - 50vw);
    border-radius: 0;
    aspect-ratio: 4 / 5;
  }
  .panel {
    width: 94cqw;
  }
}

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