/* ==========================================================================
   ReMed — landing + terms  ·  light, editorial (Medium-style)
   black & white only — color reserved for CTAs (Telegram blue, WhatsApp green)
   ========================================================================== */

:root {
  --bg: #ffffff;
  --bg-2: #fafafa;
  --surface: #fafafa;
  --surface-2: #f4f4f5;
  --border: #e9e9ea;
  --border-2: #dcdcdd;
  --ink: #111112;            /* primary text / near-black */
  --ink-2: #2a2a2c;
  --muted: #5f6065;
  --dim: #9b9ca1;
  --tg: #229ed9;             /* Telegram blue */
  --wa: #25d366;             /* WhatsApp green */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 14px;
  --shadow-lg: 0 24px 70px rgba(17, 17, 18, 0.10), 0 2px 10px rgba(17, 17, 18, 0.05);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.container { width: min(1080px, calc(100% - 48px)); margin-inline: auto; }

a { color: inherit; text-decoration: none; }
code {
  font-family: var(--mono);
  font-size: 0.85em;
  background: var(--surface-2);
  color: var(--ink);
  padding: 2px 7px;
  border-radius: 6px;
  white-space: nowrap;
  border: 1px solid var(--border);
}

::selection { background: #111112; color: #fff; }

/* ---------- type ---------- */
.h2 {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 3.8vw, 2.7rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1.18;
}
.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--ink);
  margin-bottom: 16px;
}
.eyebrow .tick {
  display: inline-block;
  width: 22px; height: 1px;
  background: var(--ink);
  vertical-align: middle;
  margin-right: 10px;
  transform: translateY(-3px);
}
.grad-ink {
  background: linear-gradient(180deg, #111112 30%, #6f7075 130%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.micro-trust {
  font-size: 0.85rem;
  color: var(--dim);
  margin-top: 18px;
}

/* ---------- buttons (the only color on the page) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  padding: 10px 22px;           /* sane default — .btn-sm/.btn-lg override */
  font-size: 0.92rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s;
}
.btn-sm { padding: 8px 16px; font-size: 0.85rem; }
.btn-lg { padding: 15px 30px; font-size: 1rem; }

.btn-telegram {
  background: linear-gradient(180deg, #35aae0, #229ed9);
  color: #fff;
  box-shadow: 0 10px 26px rgba(34, 158, 217, 0.34), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-telegram:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(34, 158, 217, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.28); }

.btn-ghost {
  background: var(--bg);
  border-color: var(--border-2);
  color: var(--ink);
}
.btn-ghost:hover { background: var(--bg-2); border-color: var(--ink); transform: translateY(-2px); }

/* future WhatsApp button — same shape as Telegram, WhatsApp green, two states */
.btn-wa {
  background: linear-gradient(180deg, #3cdf79, #25d366);
  color: #fff;
  box-shadow: 0 10px 26px rgba(37, 211, 102, 0.30), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.btn-wa.soon {
  background: var(--bg);
  border: 1px dashed var(--border-2);
  color: var(--dim);
  box-shadow: none;
  cursor: default;
}
.btn-wa.soon:hover { transform: none; }

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(255, 255, 255, 0.82);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;          /* logo, name and nav share one vertical center */
  justify-content: space-between;
  height: 72px;
}
.brand {
  display: inline-flex;
  align-items: center;          /* mark and wordmark mutually center-aligned */
  gap: 8px;
}
.logo-mark {
  color: var(--ink);
  flex: none;
  display: block;
  transform: translateY(-1px);  /* optical vertical centering of the tilted capsule */
}
.brand-name {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: -0.01em;
  font-size: 1.25rem;
  line-height: 1;
}
.header-nav { justify-self: end; display: flex; align-items: center; gap: 26px; }
.header-nav > a:not(.btn) { font-size: 0.9rem; color: var(--muted); transition: color 0.15s; }
.header-nav > a:not(.btn):hover { color: var(--ink); }

/* ---------- hero ---------- */
.hero { padding: 96px 0 48px; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  gap: 56px;
  align-items: center;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(2.6rem, 5.6vw, 4.2rem);
  font-weight: 500;
  letter-spacing: -0.015em;
  line-height: 1.05;
  margin: 26px 0 22px;
}
.hero-sub {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 32em;
  line-height: 1.65;
}
.hero-sub strong { color: var(--ink); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  background: var(--bg);
  border: 1px solid var(--border-2);
  padding: 7px 14px;
  border-radius: 999px;
  transition: border-color 0.15s, color 0.15s;
}
.pill:hover { border-color: var(--ink); color: var(--ink); }
.pill-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink);
  flex: none;
  box-shadow: 0 0 0 0 rgba(17, 17, 18, 0.25);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(17, 17, 18, 0.25); }
  70% { box-shadow: 0 0 0 8px rgba(17, 17, 18, 0); }
  100% { box-shadow: 0 0 0 0 rgba(17, 17, 18, 0); }
}
.pill-arrow { color: var(--ink); }

/* ---------- chat mockup (an "image" — allowed to carry Telegram's colors) ---------- */
.chat-wrap { display: flex; justify-content: center; }
.phone {
  width: min(380px, 100%);
  background: #fff;
  border: 1px solid var(--border-2);
  border-radius: 26px;
  padding: 14px 14px 20px;
  box-shadow: var(--shadow-lg);
}
.phone-top { display: flex; gap: 5px; padding: 2px 6px 10px; }
.phone-dot { width: 5px; height: 5px; border-radius: 50%; background: var(--border-2); }
.chat-head {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px 14px;
  border-bottom: 1px solid var(--border);
}
.chat-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: var(--serif);
  font-weight: 600; font-size: 1rem; color: #fff;
  background: var(--ink);
}
.chat-head strong { font-size: 0.92rem; display: block; line-height: 1.2; }
.chat-head small { color: var(--dim); font-size: 0.75rem; }
.chat-body { padding-top: 14px; display: flex; flex-direction: column; gap: 10px; max-height: 480px; overflow: hidden; }
.msg {
  max-width: 92%;
  padding: 10px 13px;
  border-radius: 16px;
  font-size: 0.84rem;
  line-height: 1.45;
  opacity: 0;
  transform: translateY(10px);
}
.msg.bot { background: var(--surface-2); border-bottom-left-radius: 6px; align-self: flex-start; }
.msg.user {
  background: linear-gradient(180deg, #37aae2, #229ed9);
  border-bottom-right-radius: 6px;
  align-self: flex-end;
  display: flex; align-items: center; gap: 8px;
  color: #fff;
}
.msg .thumb { font-size: 1rem; }
.msg p + p { margin-top: 8px; }
.msg.bot .rx-card {
  display: flex; flex-direction: column; gap: 6px;
  margin: 9px 0;
  padding: 10px 12px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--ink-2);
}
.rx-line { display: block; }
.kb { display: flex; gap: 8px; margin-top: 10px; }
.kb-btn {
  flex: 1;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 7px 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid var(--border-2);
  color: var(--muted);
}
.kb-btn.ok { background: #eafaf0; border-color: #b6eccb; color: #157a3e; }
.in .msg { animation: rise 0.5s ease forwards; }
.in .msg:nth-child(1) { animation-delay: 0.15s; }
.in .msg:nth-child(2) { animation-delay: 0.75s; }
.in .msg:nth-child(3) { animation-delay: 1.35s; }
.in .msg:nth-child(4) { animation-delay: 2.6s; }
.in .msg:nth-child(5) { animation-delay: 3.2s; }
@keyframes rise { to { opacity: 1; transform: none; } }

/* ---------- strip ---------- */
.strip { border-block: 1px solid var(--border); background: var(--bg-2); margin-top: 56px; }
.strip-inner {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: baseline;
  gap: 10px 26px;
  padding: 22px 0;
  font-weight: 600;
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
.strip-sep { color: var(--dim); font-size: 0.7rem; }
.strip em { font-style: italic; font-family: var(--serif); font-weight: 500; }

/* ---------- sections ---------- */
.section { padding: 100px 0 24px; position: relative; }
.section > .container > .h2 { margin-bottom: 50px; }

/* steps */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step {
  padding: 30px 26px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.step:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 36px rgba(17, 17, 18, 0.07); }
.step-num {
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--dim);
  letter-spacing: 0.1em;
}
.step:hover .step-num { color: var(--ink); }
.step h3 { font-family: var(--serif); font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; margin: 14px 0 8px; }
.step p { color: var(--muted); font-size: 0.93rem; }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  padding: 28px 26px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
.card:hover { border-color: var(--ink); transform: translateY(-3px); box-shadow: 0 14px 36px rgba(17, 17, 18, 0.07); }
.card-ico {
  font-size: 1.35rem;
  display: inline-grid;
  place-items: center;
  width: 44px; height: 44px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg-2);
  margin-bottom: 16px;
}
.card h3 { font-family: var(--serif); font-size: 1.18rem; font-weight: 600; letter-spacing: -0.01em; margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 0.92rem; }

/* privacy */
.privacy-box {
  display: flex; flex-direction: column; align-items: flex-start;
  padding: clamp(32px, 5vw, 60px);
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--bg-2);
}
.privacy-sub { color: var(--muted); max-width: 44em; margin-top: 14px; }
.privacy-points {
  display: flex; flex-wrap: wrap; gap: 12px;
  margin: 30px 0 34px;
  width: 100%;
}
.p-point {
  flex: 1 1 220px;
  padding: 16px 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #fff;
  font-size: 0.85rem;
  color: var(--dim);
}
.p-point span {
  display: block;
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  font-size: 1.02rem;
  margin-bottom: 4px;
}

/* final cta */
.final { text-align: center; padding-bottom: 120px; overflow: hidden; }
.final .h2 { margin-bottom: 8px; font-size: clamp(2rem, 4.6vw, 3.2rem); }
.cta-row.center { justify-content: center; }
.final .micro-trust { margin-top: 20px; }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--bg-2); }
.footer-inner { padding: 40px 0 34px; display: flex; flex-direction: column; gap: 18px; }
.footer-brand { display: flex; align-items: baseline; gap: 12px; }
.footer-brand .brand-name { font-size: 1.05rem; }
.footer-tag { color: var(--dim); font-size: 0.85rem; font-family: var(--serif); font-style: italic; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; font-size: 0.88rem; }
.footer-nav a { color: var(--muted); transition: color 0.15s; }
.footer-nav a:hover { color: var(--ink); }
.footer-note { color: var(--dim); font-size: 0.8rem; max-width: 60em; }

/* ---------------------------------------------------------------- terms */
.doc { max-width: 720px; margin-inline: auto; }
.doc h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4.6vw, 3rem);
  font-weight: 500;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}
.doc .updated { color: var(--dim); font-size: 0.85rem; font-family: var(--mono); margin-bottom: 44px; }
.doc h2 {
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 44px 0 12px;
  text-transform: none;
  display: flex;
  align-items: baseline;
  gap: 12px;
}
.doc h2 .n { font-family: var(--mono); font-size: 0.75rem; color: var(--dim); }
.doc p, .doc li {
  font-family: var(--serif);
  color: var(--ink-2);
  font-size: 1.05rem;
  line-height: 1.75;
  margin-bottom: 14px;
}
.doc ul { padding-left: 24px; margin-bottom: 18px; }
.doc li { margin-bottom: 8px; }
.doc strong { color: var(--ink); font-weight: 600; }
.doc a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.doc .notice {
  border: 1px solid var(--border-2);
  background: var(--bg-2);
  border-radius: 14px;
  padding: 18px 20px;
  margin: 26px 0;
}
.doc .notice p { margin: 0; color: var(--muted); font-size: 1rem; }
.doc .notice strong { color: var(--ink); }
.doc code { font-family: var(--mono); }

/* ---------- reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .in .msg { opacity: 1; transform: none; animation: none; }
  .pill-dot { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
.br-md { display: inline; }
.br-sm { display: inline; }

@media (max-width: 960px) {
  .hero { padding-top: 64px; }
  .hero-inner { grid-template-columns: 1fr; gap: 44px; }
  .hero-copy { text-align: center; display: flex; flex-direction: column; align-items: center; }
  .steps, .features { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .container { width: calc(100% - 36px); }
  .header-nav > a:not(.btn) { display: none; }   /* keep just the CTA on small screens */
  .hero { padding-top: 48px; }
  .hero h1 { font-size: clamp(2.3rem, 10.5vw, 3rem); }
  .btn-lg { width: 100%; justify-content: center; }
  .cta-row { flex-direction: column; }
  .br-md { display: none; }
  .br-sm { display: inline; }
  .steps, .features { grid-template-columns: 1fr; }
  .section { padding: 76px 0 12px; }
  .chat-body { max-height: none; }
  .strip-inner { gap: 8px 16px; font-size: 0.84rem; }
  .footer-inner { padding: 32px 0; }
}
