/*
 * onmesh.chat. The app is the material: real screenshots, large and cropped,
 * in their own window and phone frames; type does the rest.
 * Colours: Mesh's own theme (app/src/theme/tokens.css), Mesh Dark and a cool
 * light counterpart, chosen by the system. Cyan only where something acts
 * or matters: the Beta mark, the download button, links, the visitor's row.
 * Radii: 8px for controls, 6px for marks, frames keep the app's own corners.
 */

@font-face {
  font-family: "Bricolage Grotesque";
  src: url("/fonts/BricolageGrotesque.woff2") format("woff2");
  font-weight: 200 800;
  font-stretch: 75% 100%;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("/fonts/JetBrainsMono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

:root {
  --bg: #f3f5f7;
  --surface: #ffffff;
  --line: #d9dee4;
  --text-1: #0c0f13;
  --text-2: #4b5462;
  --accent: #22d3ee;
  --accent-text: #0b6f84;
  --accent-soft: rgb(34 211 238 / 0.13);
  --on-accent: #04161a;
  --bezel: #0d0e11;
  --shadow: 0 40px 90px -40px rgb(12 40 56 / 0.45), 0 2px 8px rgb(12 40 56 / 0.08);
  --display: "Bricolage Grotesque", ui-sans-serif, system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --wrap: 1320px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0b0c0f;
    --surface: #121419;
    --line: #23272f;
    --text-1: #eef1f5;
    --text-2: #9aa3b0;
    --accent-text: #5be0f1;
    --accent-soft: rgb(34 211 238 / 0.1);
    --shadow: 0 40px 100px -30px rgb(0 0 0 / 0.75), 0 0 0 1px rgb(255 255 255 / 0.04);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text-1);
  font: 400 18px/1.55 var(--display);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
figure { margin: 0; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--display); text-wrap: balance; }
p, dl, dd { margin: 0; }
svg { flex: none; }
.mono { font-family: var(--mono); font-size: 0.82em; letter-spacing: -0.01em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
@media (max-width: 640px) {
  .wrap { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
}

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 30;
  background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px;
}
.skip:focus { top: 12px; }

/* Controls */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  height: 52px; padding: 0 22px; border-radius: 8px;
  background: var(--accent); color: var(--on-accent);
  font: 650 17px/1 var(--display); text-decoration: none; white-space: nowrap;
  transition: transform .2s var(--ease), background-color .2s var(--ease);
}
.btn svg { width: 18px; height: 18px; }
.btn:hover { background: #5be0f1; }
.btn:active { transform: translateY(1px); }
.btn-sm { height: 40px; padding: 0 14px; font-size: 15px; gap: 8px; }
.btn-quiet { background: transparent; color: var(--text-1); box-shadow: inset 0 0 0 1px var(--line); }
.btn-quiet:hover { background: var(--accent-soft); }
.arrow-link {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--text-1); font-weight: 550; text-decoration: underline;
  text-decoration-color: var(--line); text-underline-offset: 5px; text-decoration-thickness: 1.5px;
  transition: text-decoration-color .2s var(--ease);
}
.arrow-link:hover { text-decoration-color: var(--accent); }
.arrow-link svg { width: 16px; height: 16px; }

/* Header */
.top { border-bottom: 1px solid var(--line); background: var(--bg); }
.top-row { display: flex; align-items: center; gap: 40px; height: 68px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text-1); }
.brand img { width: 28px; height: 28px; border-radius: 7px; }
.brand span { font: 750 23px/1 var(--display); font-stretch: 90%; letter-spacing: -0.02em; }
.top-links { display: flex; gap: 28px; list-style: none; margin: 0; padding: 0; }
.top-links a, .lang { color: var(--text-2); text-decoration: none; font-size: 16px; font-weight: 500; }
.top-links a:hover, .lang:hover { color: var(--text-1); }
.top-end { margin-left: auto; display: flex; align-items: center; gap: 24px; font-size: 16px; }
@media (max-width: 860px) { .top nav { display: none; } }
@media (max-width: 520px) { .top-end .arrow-link { display: none; } }

/* Hero */
.hero { padding-top: 64px; overflow: hidden; }
.hero-head {
  display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  column-gap: 56px; row-gap: 36px; align-items: end;
}
.beta { grid-column: 1 / -1; display: flex; align-items: center; gap: 20px; }
.beta-mark {
  display: inline-block;
  font: 800 clamp(40px, 5vw, 68px)/1 var(--display); font-stretch: 78%;
  letter-spacing: 0.01em; text-transform: uppercase;
  background: var(--accent); color: var(--on-accent);
  padding: 0.1em 0.26em 0.12em; border-radius: 6px;
}
.beta-meta { display: flex; flex-direction: column; gap: 2px; color: var(--text-2); font-size: 15px; line-height: 1.4; max-width: 30ch; }
.beta-meta .mono { color: var(--text-1); font-size: 13px; }
.hero h1 {
  font-size: clamp(54px, 8.6vw, 128px); font-weight: 800; font-stretch: 80%;
  line-height: 0.92; letter-spacing: -0.035em;
}
.hero-side { display: flex; flex-direction: column; gap: 28px; padding-bottom: 10px; }
.lead { font-size: 21px; line-height: 1.45; color: var(--text-2); max-width: 32ch; }
.cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 26px; }

.hero-stage { position: relative; margin-top: 72px; padding-bottom: 96px; }
.window {
  width: min(1200px, 90vw);
  margin-left: max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
}
.window img, .crop img { filter: drop-shadow(0 30px 50px rgb(0 0 0 / 0.28)); }
.hero-phone {
  position: absolute; bottom: 24px;
  right: max(24px, calc((100vw - var(--wrap)) / 2 + 24px));
  width: clamp(130px, 16vw, 236px);
}

/* A phone in its frame: the screenshot behind a bezel */
.phone {
  padding: 7px; border-radius: 44px; background: var(--bezel);
  box-shadow: inset 0 0 0 1.5px #2b2f37, var(--shadow);
}
.phone img { border-radius: 37px; }
@media (max-width: 640px) { .phone { padding: 4px; border-radius: 26px; } .phone img { border-radius: 22px; } }

@media (max-width: 900px) {
  .hero { padding-top: 40px; }
  .hero-head { grid-template-columns: 1fr; }
  .hero-stage { margin-top: 48px; padding-bottom: 64px; }
  .window { width: 118vw; margin-left: 16px; }
}

/* The networks, as a sentence */
.networks { padding: 120px 0 112px; }
.networks-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); row-gap: 32px; }
.net-lead {
  grid-column: 1 / span 10;
  font-size: clamp(30px, 3.7vw, 54px); font-weight: 600; font-stretch: 92%;
  line-height: 1.14; letter-spacing: -0.02em; color: var(--text-2); text-wrap: pretty;
}
.net { color: var(--text-1); white-space: nowrap; }
.net svg { width: 0.78em; height: 0.78em; margin: 0 0.18em 0 0.04em; vertical-align: -0.04em; fill: currentColor; }
.net-side { grid-column: 7 / span 5; display: flex; flex-direction: column; gap: 18px; }
.net-text { font-size: 19px; color: var(--text-2); max-width: 44ch; }
.net-plan { display: flex; align-items: baseline; gap: 12px; font-size: 16px; color: var(--text-2); max-width: 46ch; }
.net-plan .stamp { flex: none; }
@media (max-width: 900px) { .net-lead, .net-side { grid-column: 1 / -1; } .networks { padding: 80px 0; } }

/* Features: copy beside a cropped window that runs off the page */
.feature { padding: 56px 0; overflow: hidden; }
.feature-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: center; }
.feature h2, .server h2, .phones h2, .download h2, .faq h2 {
  font-size: clamp(34px, 4.4vw, 60px); font-weight: 750; font-stretch: 84%;
  line-height: 1; letter-spacing: -0.03em;
}
.feature-copy p, .server-copy p, .phones-copy p { margin-top: 20px; color: var(--text-2); max-width: 36ch; font-size: 19px; }
.feature-spaces .feature-copy { grid-column: 1 / span 4; grid-row: 1; }
.feature-spaces .crop { grid-column: 5 / -1; grid-row: 1; margin-right: calc(-1 * max(24px, (100vw - var(--wrap)) / 2 + 24px)); }
.feature-spaces .crop img { width: 100%; max-width: none; }
.feature-voice .feature-copy { grid-column: 9 / -1; grid-row: 1; }
.feature-voice .crop { grid-column: 1 / span 8; grid-row: 1; }
.feature-voice .crop img { -webkit-mask-image: linear-gradient(to right, #000 78%, transparent); mask-image: linear-gradient(to right, #000 78%, transparent); }
@media (max-width: 900px) {
  .feature-spaces .feature-copy, .feature-voice .feature-copy, .feature-spaces .crop, .feature-voice .crop { grid-column: 1 / -1; grid-row: auto; }
  .feature-grid { row-gap: 32px; }
  .feature-spaces .crop, .feature-voice .crop { margin-right: -24px; }
  .feature-voice .crop img { width: 130%; max-width: none; }
}

/* Facts in a row, set as a spec sheet */
.specs { padding: 64px 0 40px; }
.spec-list { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.spec-list > div { padding: 26px 24px 30px; border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.spec-list > div:first-child { border-left: 0; padding-left: 0; }
.spec-list dt { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.spec-list dd { font-size: 24px; font-weight: 650; font-stretch: 90%; line-height: 1.2; letter-spacing: -0.01em; }
.spec-note { margin-top: 14px; font-size: 14px; color: var(--text-2); }
@media (max-width: 900px) {
  .spec-list { grid-template-columns: 1fr 1fr; }
  .spec-list > div:nth-child(3) { border-left: 0; padding-left: 0; }
  .spec-list > div:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 520px) {
  .spec-list { grid-template-columns: 1fr; }
  .spec-list > div { border-left: 0; padding-left: 0; }
  .spec-list > div + div { border-top: 1px solid var(--line); }
}

/* Your own server */
.server { padding: 96px 0; }
.server-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: center; }
.login { grid-column: 1 / span 6; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); outline: 1px solid var(--line); }
.server-copy { grid-column: 8 / -1; }
@media (max-width: 900px) { .login, .server-copy { grid-column: 1 / -1; } .server-grid { row-gap: 36px; } .server { padding: 64px 0; } }

/* Phones */
.phones { padding: 96px 0 120px; border-top: 1px solid var(--line); overflow: hidden; }
.phones-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: 32px; align-items: center; }
.phones-copy { grid-column: 1 / span 5; }
.phones-pair { grid-column: 7 / -1; display: flex; justify-content: center; align-items: flex-start; }
.phones-pair .phone { width: 46%; max-width: 270px; position: relative; z-index: 1; }
.phones-pair .phone-back { margin-left: -9%; margin-top: 18%; z-index: 0; }
.stamp {
  display: inline-block; margin-bottom: 22px;
  font: 600 13px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--accent-text); padding: 8px 10px; border: 1.5px solid currentColor; border-radius: 6px;
}
.stamp-sm { margin: 0; font-size: 12px; padding: 6px 8px; }
@media (max-width: 900px) { .phones-copy, .phones-pair { grid-column: 1 / -1; } .phones-grid { row-gap: 48px; } .phones { padding: 72px 0 88px; } }

/* Pricing: two plans side by side, Plus marked in the accent */
.pricing { padding: 96px 0 72px; border-top: 1px solid var(--line); }
.pricing h2 { font-size: clamp(34px, 4.4vw, 60px); font-weight: 750; font-stretch: 84%; line-height: 1; letter-spacing: -0.03em; }
.plan-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.plan-table thead td { width: 34%; }
.plan-table thead th { text-align: left; vertical-align: bottom; padding: 0 20px 22px; }
.plan-name { display: block; font: 600 14px/1.2 var(--mono); color: var(--text-2); }
.plan-price { display: block; margin-top: 10px; font-size: clamp(40px, 4.6vw, 64px); font-weight: 800; font-stretch: 80%; letter-spacing: -0.03em; line-height: 1; }
.plan-sub { display: block; margin-top: 8px; font-size: 15px; font-weight: 400; color: var(--text-2); }
.plan-table tbody th, .plan-table tbody td { text-align: left; vertical-align: top; padding: 16px 20px; border-top: 1px solid var(--line); }
.plan-table tbody th { padding-left: 0; font-weight: 550; font-size: 17px; }
.plan-table tbody td { color: var(--text-2); font-size: 17px; }
.plan-table .plus { background: var(--accent-soft); color: var(--text-1); }
.plan-table thead .plus { border-radius: 10px 10px 0 0; padding-top: 22px; }
.plan-table thead .plus .plan-name { color: var(--accent-text); }
.plan-table tbody tr:last-child .plus { border-radius: 0 0 10px 10px; }
.biz { margin-top: 48px; display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); column-gap: 32px; padding-top: 28px; border-top: 1px solid var(--line); }
.biz h3 { font-size: 22px; font-weight: 700; font-stretch: 90%; }
.biz p { color: var(--text-2); max-width: 60ch; }
.biz a { color: var(--accent-text); }
@media (max-width: 760px) {
  .plan-table thead td { display: none; }
  .plan-table, .plan-table thead, .plan-table tbody { display: block; }
  .plan-table tr { display: grid; grid-template-columns: 1fr 1fr; }
  .plan-table thead th { padding: 16px 12px; }
  .plan-table tbody th { grid-column: 1 / -1; padding: 14px 0 6px; font-size: 15px; }
  .plan-table tbody td { padding: 6px 12px 14px; border-top: 0; font-size: 15px; }
  .plan-table tbody tr:last-child .plus { border-radius: 0 0 10px 10px; }
  .biz { grid-template-columns: 1fr; row-gap: 10px; }
}

/* Download: a table, as the files are a list */
.download { padding: 96px 0 72px; border-top: 1px solid var(--line); }
.dl-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 12px 32px; margin-bottom: 36px; }
.dl-meta { color: var(--text-2); font-size: 16px; }
.dl-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.dl-table thead th { text-align: left; font: 500 13px/1 var(--mono); color: var(--text-2); padding: 0 16px 14px 0; }
.dl-table thead th:first-child { padding-left: 16px; }
.dl-table td, .dl-table tbody th { padding: 18px 16px 18px 0; border-top: 1px solid var(--line); text-align: left; vertical-align: middle; }
.dl-table tbody th { font-weight: 650; font-size: 19px; }
.sys { display: flex; align-items: center; gap: 14px; }
.sys svg { width: 22px; height: 22px; color: var(--text-2); }
.sys small { display: block; font-weight: 400; font-size: 14px; color: var(--text-2); margin-top: 2px; }
.dl-table .file { color: var(--text-2); }
.dl-table .file a { color: var(--text-1); margin-right: 14px; text-underline-offset: 4px; text-decoration-color: var(--line); }
.dl-table .file a:hover { text-decoration-color: var(--accent); }
.dl-table .num { text-align: right; padding-right: 32px; white-space: nowrap; }
/* Every row has the same inner edges, so the buttons line up; the
   visitor's row is tinted, and only its button is in the accent */
.dl-table tbody th { padding-left: 16px; }
.dl-table .act { text-align: right; padding-right: 16px; width: 1%; white-space: nowrap; }
.dl-table .act .btn { background: transparent; color: var(--text-1); box-shadow: inset 0 0 0 1px var(--line); }
.dl-table .act .btn:hover { background: var(--accent-soft); }
.dl-table tr.is-yours .act .btn { background: var(--accent); color: var(--on-accent); box-shadow: none; }
.dl-table tr.is-yours .act .btn:hover { background: #5be0f1; }
.yours-tag { display: block; margin-top: 6px; font: 600 11px/1 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-text); }
.dl-table tr.is-yours > * { background: var(--accent-soft); }
.dl-table tr.is-yours > :first-child { box-shadow: inset 3px 0 0 var(--accent); }
.dl-table tr.soon .sys, .dl-table tr.soon .sys svg { color: var(--text-2); }
.dl-all { margin-top: 24px; font-size: 16px; }
@media (max-width: 760px) {
  .dl-table thead { display: none; }
  .dl-table, .dl-table tbody { display: block; }
  .dl-table tr { display: grid; grid-template-columns: 1fr auto; column-gap: 12px; border-top: 1px solid var(--line); padding: 16px 0; }
  .dl-table td, .dl-table tbody th { border: 0; padding: 0; }
  .dl-table tbody th { grid-column: 1; }
  .dl-table .act { grid-column: 2; grid-row: 1 / span 2; align-self: center; }
  .dl-table .file { grid-column: 1; margin-top: 8px; font-size: 12px; overflow-wrap: anywhere; }
  .dl-table .num { display: none; }
  .dl-table tr.soon td { grid-column: 2; grid-row: 1; align-self: center; }
  .dl-table tr.is-yours { padding-left: 12px; padding-right: 12px; box-shadow: inset 3px 0 0 var(--accent); background: var(--accent-soft); }
  .dl-table tr.is-yours > *, .dl-table tr.is-yours > :first-child, .dl-table tr.is-yours > :last-child { background: none; box-shadow: none; padding-left: 0; padding-right: 0; }
}

/* Questions: answered side by side, nothing to open */
.faq { padding: 72px 0 112px; }
.faq h2 { margin-bottom: 48px; }
.faq-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px 72px; }
.faq-grid dt { font-weight: 650; font-size: 20px; line-height: 1.3; }
.faq-grid dd { margin-top: 10px; color: var(--text-2); max-width: 54ch; }
@media (max-width: 760px) { .faq-grid { grid-template-columns: 1fr; gap: 32px; } }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 32px 0 40px; color: var(--text-2); font-size: 15px; }
.foot-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 32px; }
.foot .brand span { font-size: 19px; }
.foot .brand img { width: 24px; height: 24px; border-radius: 6px; }
.foot a { color: var(--text-2); }
.foot a:hover { color: var(--text-1); }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 24px; list-style: none; padding: 0; margin: 0 0 0 auto; }
@media (max-width: 640px) { .foot-links { margin-left: 0; } }

/* Imprint and privacy */
.legal { max-width: 760px; padding-top: 56px; padding-bottom: 96px; }
.legal h1 { font-size: clamp(40px, 6vw, 64px); font-weight: 800; font-stretch: 82%; letter-spacing: -0.03em; line-height: 1; margin-bottom: 24px; }
.legal h2 { font-size: 22px; font-weight: 650; margin: 40px 0 12px; }
.legal h3 { font-size: 18px; font-weight: 650; margin: 28px 0 8px; }
.legal strong { color: var(--text-1); }
.legal p, .legal li { color: var(--text-2); }
.legal p + p { margin-top: 12px; }
.legal ul { padding-left: 20px; margin: 12px 0 0; }
.legal li + li { margin-top: 6px; }
.legal a { color: var(--accent-text); }
.legal code { font-family: var(--mono); font-size: .86em; }
.draft { display: inline-block; padding: 8px 12px; border-radius: 6px; border: 1.5px solid var(--accent-text); color: var(--text-1) !important; font-weight: 550; }
.updated { margin-top: 40px !important; font-size: 15px; }

/* One moment of motion: the hero comes in */
@media (prefers-reduced-motion: no-preference) {
  .hero-head > *, .hero-stage { animation: rise .9s var(--ease) both; }
  .hero-head > :nth-child(2) { animation-delay: .06s; }
  .hero-head > :nth-child(3) { animation-delay: .12s; }
  .hero-stage { animation-delay: .18s; }
}
@keyframes rise { from { transform: translateY(18px); opacity: .001; } to { transform: none; opacity: 1; } }
