/* ENCHAT website. Dark navy ground, brand blue for actions, monospace for "what the server sees". */

@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("fonts/sora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }

:root {
  --bg: #0B1020;
  --bg-2: #0F1630;
  --line: #1E2847;
  --text: #E8ECF6;
  --muted: #9AA5C2;
  --blue: #0B5BD3;
  --blue-hi: #3D86F5;
  --grad: linear-gradient(135deg, #1263E2, #00337F);
  --ok: #3FCF8E;

  --display: "Sora", "Segoe UI", system-ui, sans-serif;
  --body: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, Consolas, monospace;

  --wrap: 1120px;
  --gutter-l: max(20px, env(safe-area-inset-left, 0px));
  --gutter-r: max(20px, env(safe-area-inset-right, 0px));
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-hi); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--blue-hi); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(30px, 4vw, 44px); }
h3 { font-size: 19px; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter-l); padding-right: var(--gutter-r); }
.eyebrow { font: 600 13px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--blue-hi); }
.lead { font-size: clamp(18px, 1.6vw, 20px); color: var(--muted); max-width: 34em; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(11, 16, 32, 0.82);
  backdrop-filter: saturate(150%) blur(14px);
  -webkit-backdrop-filter: saturate(150%) blur(14px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top, 0px);
}
.top .wrap { display: flex; align-items: center; gap: 28px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); font: 700 18px/1 var(--display); letter-spacing: 0.04em; }
.brand:hover { text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.nav { display: flex; gap: 24px; margin-left: auto; }
.nav a { color: var(--muted); font-size: 15px; font-weight: 500; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); text-decoration: none; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 48px; padding: 0 22px; border-radius: 12px;
  font: 600 16px/1 var(--body); color: #fff; background: var(--blue);
  border: 1px solid transparent; transition: background .15s ease, transform .15s ease;
}
.btn:hover { background: #0A50BB; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.ghost:hover { background: var(--bg-2); }
.btn.small { height: 38px; padding: 0 16px; font-size: 14px; border-radius: 10px; }

/* Hero */
.hero { position: relative; overflow: hidden; border-bottom: 1px solid var(--line); }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto 35%; height: 140%;
  background: radial-gradient(closest-side, rgba(18, 99, 226, 0.35), transparent 70%);
  pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-block: 72px 0; }
.hero h1 { font-size: clamp(40px, 6vw, 68px); }
.hero h1 span { background: linear-gradient(90deg, #6FA8FF, #3D86F5); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-copy { display: grid; gap: 24px; padding-bottom: 72px; min-width: 0; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.platforms { display: flex; flex-wrap: wrap; gap: 8px 18px; color: var(--muted); font-size: 14px; }
.platforms span { display: inline-flex; align-items: center; gap: 7px; }
.platforms svg { width: 16px; height: 16px; fill: currentColor; }

.phones { position: relative; height: 560px; min-width: 0; }
.phones img {
  position: absolute; width: 270px; bottom: -60px;
  filter: drop-shadow(0 30px 60px rgba(0, 0, 0, 0.55));
}
.phones .p1 { left: 8%; z-index: 2; }
.phones .p2 { left: 46%; bottom: -120px; transform: rotate(4deg); opacity: .96; }

/* Server view */
.section { padding-block: 96px; }
.section + .section { border-top: 1px solid var(--line); }
.split { display: grid; grid-template-columns: 1fr 1.1fr; gap: 56px; align-items: center; }
.split > * { min-width: 0; }
.stack { display: grid; gap: 20px; }

.record {
  background: #070B17; border: 1px solid var(--line); border-radius: 16px;
  font: 14px/1.75 var(--mono); color: #C9D3EA; overflow: hidden;
}
.record-bar { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.record-bar i { width: 10px; height: 10px; border-radius: 50%; background: var(--line); display: block; }
.record-bar b { margin-left: 8px; font-weight: 500; }
.record pre { margin: 0; padding: 18px 20px 22px; overflow-x: auto; font: inherit; }
.record .k { color: #6E7BA0; }
.record .v-ok { color: var(--ok); }
.record .v-enc { color: #7FB0FF; }

.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; color: var(--muted); }
.checks li strong { color: var(--text); font-weight: 600; }
.checks svg { width: 22px; height: 22px; margin-top: 2px; stroke: var(--ok); fill: none; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }

/* Features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; margin-top: 48px; border-top: 1px solid var(--line); }
.feature { padding: 32px 28px 32px 0; border-bottom: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.feature:not(:nth-child(3n+1)) { padding-left: 28px; border-left: 1px solid var(--line); }
.feature svg { width: 28px; height: 28px; stroke: var(--blue-hi); fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; margin-bottom: 6px; }
.feature p { color: var(--muted); font-size: 16px; }

/* Screens */
.screens { margin-top: 48px; display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 28px; overflow-x: auto; padding-bottom: 12px; scroll-snap-type: x mandatory; }
.screens figure { margin: 0; scroll-snap-align: start; display: grid; gap: 14px; }
.screens img { filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5)); }
.screens figcaption { font-size: 14px; color: var(--muted); text-align: center; }

/* Account */
.account { background: var(--bg-2); }
.steps { list-style: none; margin: 40px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; padding: 26px; border: 1px solid var(--line); border-radius: 16px; background: var(--bg); display: grid; gap: 8px; align-content: start; }
.steps li::before { content: counter(step); font: 700 15px/1 var(--display); color: #fff; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: var(--grad); margin-bottom: 8px; }
.steps p { color: var(--muted); font-size: 16px; }

.contact {
  margin-top: 28px; padding: 30px; border-radius: 18px; background: var(--grad);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
}
.contact h3 { font-size: 24px; }
.contact p { color: #D6E4FF; }
.contact .btn { background: #fff; color: #0B3E9E; }
.contact .btn:hover { background: #E8F0FF; }
.mail { font: 500 15px var(--mono); color: #fff; user-select: all; }

/* FAQ */
.faq { margin-top: 40px; border-top: 1px solid var(--line); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 22px 40px 22px 0; position: relative; font: 600 18px/1.4 var(--body); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 18px; font: 400 26px/1 var(--body); color: var(--muted); transition: transform .2s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { padding: 0 0 22px; color: var(--muted); max-width: 40em; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding-block: 40px calc(40px + env(safe-area-inset-bottom, 0px)); color: var(--muted); font-size: 14px; }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.foot nav { display: flex; flex-wrap: wrap; gap: 24px; }
.foot a { color: var(--muted); }
.foot a:hover { color: var(--text); }

/* Text pages (privacy, support) */
.doc { padding-block: 64px 96px; }
.doc .wrap { max-width: 800px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 10px; }
.doc .updated { color: var(--muted); font-size: 15px; margin-bottom: 40px; }
.doc h2 { font-size: 24px; margin: 44px 0 14px; }
.doc p, .doc li { color: #C3CBE0; }
.doc p + p { margin-top: 14px; }
.doc ul { padding-left: 22px; margin: 0; display: grid; gap: 10px; }
.doc strong { color: var(--text); }
.table-scroll { overflow-x: auto; margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 15px; min-width: 560px; }
.doc th, .doc td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: #C3CBE0; }
.doc th { color: var(--text); font-weight: 600; background: var(--bg-2); }
.doc tr:last-child td { border-bottom: 0; }
.doc .alt { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); }
.qa { display: grid; gap: 28px; margin-top: 8px; }
.qa h2 { margin: 0 0 8px; font-size: 20px; }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 56px; }
  .hero-copy { padding-bottom: 0; }
  .phones { height: 430px; max-width: 520px; width: 100%; margin: 0 auto; }
  .phones img { width: 220px; }
  .split { grid-template-columns: 1fr; gap: 40px; }
  .features { grid-template-columns: repeat(2, 1fr); }
  .feature:not(:nth-child(3n+1)) { padding-left: 0; border-left: 0; }
  .feature:nth-child(2n) { padding-left: 24px; border-left: 1px solid var(--line); }
  .feature { padding-right: 24px; }
  .steps { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .nav { display: none; }
  .top .btn { margin-left: auto; }
  .section { padding-block: 72px; }
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .features { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(2n) { padding: 26px 0; border-left: 0; }
  .phones { height: 380px; }
  .phones img { width: 190px; }
  .phones .p1 { left: 2%; }
  .phones .p2 { left: 42%; }
  .contact { padding: 24px; }
  .btn { width: 100%; }
  .top .btn, .contact .btn { width: auto; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
.platforms { align-items: center; }
.store { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border: 1px solid var(--line); border-radius: 10px; color: var(--text); font-weight: 600; font-size: 14px; background: var(--bg-2); }
.store:hover { text-decoration: none; border-color: var(--blue-hi); }
.store svg { width: 16px; height: 16px; fill: currentColor; }

/* Language switch */
.lang { display: inline-flex; align-items: center; justify-content: center; height: 32px; min-width: 40px; padding: 0 10px; border: 1px solid var(--line); border-radius: 8px; color: var(--muted); font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.lang:hover { color: var(--text); border-color: var(--muted); text-decoration: none; }
@media (max-width: 720px) {
  .top .wrap { gap: 12px; }
  .top .lang { margin-left: auto; }
  .top .lang + .btn { margin-left: 0; }
}
