/* =============================================================================
   Xide — landing page
   Same tokens as the app (theme.css): black and graphite, one signal orange.
   Orange is kept for the mark, buttons and your own messages only.
   ========================================================================== */

:root,
html[data-theme="dark"] {
  --page: #000000;
  --band: #0d0d0d;
  --surface: #161616;
  --surface-2: #1c1c1c;
  --ink: #f2f2f2;
  --ink-soft: #a3a3a3;
  --ink-faint: #707070;
  --line: #2a2a2a;
  --accent: #ff6600;
  --accent-deep: #ff7f2a;
  --on-accent: #000000;
  --code-key: #8a8a8a;
  --code-val: #f2f2f2;
  color-scheme: dark;
}
html[data-theme="light"] {
  --page: #ededed;
  --band: #e3e3e3;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --ink: #121212;
  --ink-soft: #4d4d4d;
  --ink-faint: #7a7a7a;
  --line: #d4d4d4;
  --accent: #f26822;
  --accent-deep: #d9530d;
  --on-accent: #000000;
  --code-key: #777777;
  --code-val: #121212;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body.landing {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
img { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* ---- Shared ------------------------------------------------------------------ */
.top, .hero, .features, .start, .foot, .visibility__inner {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}
h2 {
  margin: 0 0 32px;
  font-size: clamp(30px, 4.2vw, 44px);
  line-height: 1.08;
  font-weight: 750;
  letter-spacing: -0.035em;
  max-width: 20ch;
  text-wrap: balance;
}
h3 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 700; letter-spacing: -0.01em; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 52px;
  padding: 0 26px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  border: 1px solid transparent;
  transition: background-color 120ms, border-color 120ms;
  white-space: nowrap;
}
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: var(--accent-deep); }
.btn--ghost { color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--ink-faint); }
.btn--small { height: 40px; padding: 0 16px; font-size: 15px; border-radius: 10px; }

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -0.04em;
}
.wordmark img { border-radius: 9px; }
.wordmark--small { font-size: 17px; gap: 8px; }
.wordmark--small img { border-radius: 6px; }

/* ---- Top bar ----------------------------------------------------------------- */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
}

/* ---- Hero -------------------------------------------------------------------- */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 64px;
  align-items: center;
  padding-top: clamp(40px, 9vh, 104px);
  padding-bottom: clamp(64px, 12vh, 128px);
}
.hero__title {
  margin: 0;
  font-size: clamp(54px, 8.4vw, 108px);
  line-height: 0.92;
  font-weight: 800;
  letter-spacing: -0.055em;
  max-width: 10ch;
  text-wrap: balance;
}
.hero__lede {
  margin: 28px 0 0;
  max-width: 34ch;
  font-size: clamp(19px, 1.6vw, 21px);
  color: var(--ink-soft);
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero__note { margin: 18px 0 0; font-size: 15px; color: var(--ink-faint); }

/* ---- The "plain sight" panel -------------------------------------------------- */
.sight { margin: 0; }
.sight__tabs {
  display: inline-flex;
  padding: 4px;
  gap: 4px;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  margin-bottom: 14px;
  max-width: 100%;
}
.sight__tabs [role="tab"] {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 15px;
  font-weight: 650;
  padding: 9px 14px;
  border-radius: 9px;
  cursor: pointer;
  white-space: nowrap;
}
.sight__tabs [role="tab"]:hover { color: var(--ink); }
.sight__tabs [role="tab"][aria-selected="true"] {
  background: var(--surface-2);
  color: var(--ink);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.sight__view {
  min-height: 340px;
  border-radius: 20px;
  background: var(--surface);
  border: 1px solid var(--line);
  overflow: hidden;
  animation: view-in 160ms ease-out;
}
.sight__view[hidden] { display: none; }
@keyframes view-in { from { opacity: 0; } to { opacity: 1; } }

.chat { padding: 20px 20px 24px; display: flex; flex-direction: column; gap: 10px; }
.chat__head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 14px;
  margin-bottom: 6px;
  border-bottom: 1px solid var(--line);
}
.avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #3a3a3a; color: #f2f2f2;
  font-weight: 700; font-size: 15px;
}
.chat__name { font-weight: 700; }
.chat__lock { margin-left: auto; font-size: 13px; color: var(--ink-faint); }
.chat__lock::before {
  content: "";
  display: inline-block;
  width: 9px; height: 11px;
  margin-right: 6px;
  vertical-align: -1px;
  background: var(--accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 11'%3E%3Cpath d='M2 4V3a2.5 2.5 0 0 1 5 0v1h.5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm1 0h3V3a1.5 1.5 0 0 0-3 0z'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 9 11'%3E%3Cpath d='M2 4V3a2.5 2.5 0 0 1 5 0v1h.5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1h-6a1 1 0 0 1-1-1V5a1 1 0 0 1 1-1zm1 0h3V3a1.5 1.5 0 0 0-3 0z'/%3E%3C/svg%3E") center / contain no-repeat;
}

.bubble {
  margin: 0;
  max-width: 82%;
  width: fit-content;
  padding: 10px 14px;
  border-radius: 18px 18px 18px 6px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.45;
  overflow-wrap: anywhere;
}
.bubble--me {
  align-self: flex-end;
  background: var(--accent);
  border-color: transparent;
  color: var(--on-accent);
  border-radius: 18px 18px 6px 18px;
}
.bubble.is-scrambling { color: var(--ink-faint); }

.cipher {
  margin: 0;
  padding: 22px 22px 24px;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.7;
  color: var(--code-key);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.cipher .v { color: var(--code-val); }

.sight figcaption { margin-top: 14px; font-size: 15px; color: var(--ink-faint); }

/* ---- Features ----------------------------------------------------------------- */
.features { padding-top: 24px; padding-bottom: clamp(72px, 12vh, 120px); }
.features__list {
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;
  row-gap: 40px;
}
.features__list > div { padding-top: 18px; border-top: 1px solid var(--line); }
.features__list dt { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.features__list dd { margin: 8px 0 0; color: var(--ink-soft); font-size: 17px; max-width: 32ch; }

/* ---- What we can see ---------------------------------------------------------- */
.visibility { background: var(--band); padding: clamp(72px, 12vh, 120px) 0; }
.visibility__lede { margin: -12px 0 40px; max-width: 52ch; color: var(--ink-soft); }
.visibility__cols { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.col {
  padding: 26px 28px 28px;
  border-radius: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
}
.col h3 { font-size: 20px; margin-bottom: 14px; }
.col ul { margin: 0; padding: 0; list-style: none; }
.col li { padding: 10px 0; border-top: 1px solid var(--line); font-size: 17px; }
.col li:first-child { border-top: 0; padding-top: 0; }
.col--cant { border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.col--cant h3 { color: var(--accent); }
.col--can h3 { color: var(--ink-soft); }

/* ---- Start ----------------------------------------------------------------------- */
.start { padding-top: clamp(72px, 12vh, 120px); padding-bottom: clamp(72px, 12vh, 120px); }
.steps {
  margin: 0 0 40px;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 40px;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: block;
  margin-bottom: 14px;
  font-size: 44px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.04em;
  color: var(--ink-faint);
}
.steps p { margin: 8px 0 0; color: var(--ink-soft); font-size: 17px; }
.addr { color: var(--ink); font-weight: 650; overflow-wrap: anywhere; }

/* ---- Footer ------------------------------------------------------------------- */
.foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 28px;
  padding-bottom: 40px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  color: var(--ink-faint);
}
.foot p { margin: 0; }
.foot a[data-abuse] { color: var(--ink-soft); }

/* ---- Responsive ------------------------------------------------------------- */
@media (max-width: 960px) {
  .hero { grid-template-columns: 1fr; gap: 48px; }
  .features__list { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body.landing { font-size: 17px; }
  .top, .hero, .features, .start, .foot, .visibility__inner { padding-left: 16px; padding-right: 16px; }
  .top { padding-top: 16px; padding-bottom: 16px; }
  .hero { padding-top: 32px; }
  .hero__actions .btn { flex: 1 1 100%; }
  .features__list, .visibility__cols, .steps { grid-template-columns: 1fr; }
  .steps { gap: 28px; }
  .sight__tabs { display: flex; width: 100%; }
  .sight__tabs [role="tab"] { flex: 1 1 0; padding: 9px 8px; font-size: 14px; white-space: normal; }
  .sight__view { min-height: 0; }
  .cipher { font-size: 12px; padding: 18px; }
  .start > .btn { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sight__view { animation: none; }
  .btn { transition: none; }
}
