/* The /ru and /en pages: what ER Studio is, why DBML, examples, and a way in.
   Styled after the getanalyst.ru home page, in solid colours only.
   Motion follows Emil Kowalski's rules: short ease-out transitions, a slight press on buttons, hover only on real pointers. */
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/montserrat-cyrillic-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-display: swap; font-weight: 100 900; src: url(/fonts/montserrat-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800; src: url(/fonts/jetbrains-mono-cyrillic-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 100 800; src: url(/fonts/jetbrains-mono-latin-wght-normal.woff2) format("woff2-variations"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --night: #04080B;
  --night-3: #12191E;
  --mint: #17F3CB;
  --mint-press: #0FDDB8;
  --mint-ink: #0A7471;
  --lilac: #C4B0FB;
  --sun: #FFD54A;
  --sky: #8FD0FF;
  --paper: #F4FAF9;
  --white: #FFFFFF;
  --ink: #12191E;
  --text: #434F57;
  --line: #DCE7E8;
  --on-dark: #FFFFFF;
  --on-dark-soft: #B8C7CD;
  --on-dark-line: rgba(255, 255, 255, .12);
  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-code: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1120px;
  --gutter: 24px;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  /* DBML highlighting, same colours as the editor */
  --syn-kw: #0A7471; --syn-type: #2F64AE; --syn-attr: #6A5A92; --syn-op: #BF3B26; --syn-ident: #11272D;
  /* the dotted canvas behind the diagram, drawn as a small SVG pattern */
  --dots: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18'%3E%3Ccircle cx='2' cy='2' r='1.2' fill='%23D3DFE0'/%3E%3C/svg%3E");
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--white); color: var(--text);
  font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-family: var(--font); font-weight: 800; color: var(--ink); }
h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.1; letter-spacing: -.02em; }
h3 { font-size: 20px; line-height: 1.25; letter-spacing: -.01em; }
p { margin: 0; }
.wrap { width: 100%; max-width: calc(var(--wrap) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
:focus-visible { outline: 2px solid var(--mint-ink); outline-offset: 3px; border-radius: 6px; }
section[id], #join { scroll-margin-top: 84px; }

/* Signed-in visitors see "Open the studio" in place of sign-in and sign-up. */
.user-only { display: none !important; }
.signed-in .user-only { display: inline-flex !important; }
.signed-in .guest-only { display: none !important; }

/* Buttons: pills like on getanalyst.ru. A press shrinks them a little. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 20px; border: 1.5px solid transparent; border-radius: 999px;
  font: 700 15px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, border-color 150ms ease, color 150ms ease;
}
.btn:active { transform: scale(.97); }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 16px; }
.btn-mint { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.btn-line { background: var(--white); border-color: var(--ink); color: var(--ink); }
.btn-ghost { background: transparent; border-color: rgba(255, 255, 255, .55); color: var(--on-dark); }

/* Header: a white bar, as on the main site */
.nav { position: sticky; top: 0; z-index: 20; background: var(--white); border-bottom: 1px solid var(--line); }
.nav-in { display: flex; align-items: center; gap: 32px; height: 68px; }
.nav-logo { display: block; flex: none; border-radius: 6px; }
.nav-logo img { width: auto; height: 30px; }
.nav-links { display: flex; gap: 26px; }
.nav-links a { color: var(--ink); font-weight: 500; font-size: 15px; text-decoration: none; transition: color 150ms ease; }
.nav-end { display: flex; align-items: center; gap: 10px; margin-left: auto; }
.lang { display: inline-flex; padding: 3px; margin-right: 6px; border: 1px solid var(--line); border-radius: 999px; }
.lang a {
  padding: 5px 10px; border-radius: 999px; color: var(--text);
  font-weight: 700; font-size: 13px; line-height: 1; text-decoration: none; transition: background-color 150ms ease, color 150ms ease;
}
.lang a[aria-current="page"] { background: var(--ink); color: var(--white); }

/* Hero: solid night background, no glow */
.hero { background: var(--night); color: var(--on-dark); padding: 80px 0 64px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); gap: 56px; align-items: center; }
.eyebrow {
  display: inline-flex; align-items: center; margin-bottom: 26px; padding: 8px 16px;
  border: 1px solid rgba(255, 255, 255, .2); border-radius: 999px;
  font-weight: 600; font-size: 13px; line-height: 1.2; color: rgba(255, 255, 255, .86);
}
h1 { font-size: clamp(38px, 4.7vw, 54px); line-height: 1.07; letter-spacing: -.03em; color: var(--on-dark); }
h1 em { display: block; font-style: normal; color: var(--mint); }
.lead { margin-top: 24px; max-width: 32em; font-weight: 500; font-size: 19px; line-height: 1.5; color: rgba(255, 255, 255, .86); }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

/* The app window with the diagram, and the DBML card over its corner */
.shot { position: relative; margin: 0; padding-bottom: 88px; }
.shot-win { overflow: hidden; background: var(--white); border-radius: 14px; box-shadow: 0 24px 60px rgba(0, 0, 0, .45); }
.shot-bar { display: flex; align-items: center; gap: 14px; height: 40px; padding: 0 14px; background: var(--paper); border-bottom: 1px solid var(--line); }
.dots { display: inline-flex; gap: 6px; }
.dots i { width: 10px; height: 10px; border-radius: 50%; background: #CFDADB; }
.shot-url { padding: 4px 14px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-weight: 500; font-size: 12px; color: var(--text); }
.shot-canvas { padding: 24px 20px; background: var(--white) var(--dots); }
.shot-canvas img { width: 100%; }
.shot-code {
  position: absolute; left: -18px; bottom: 0; width: min(360px, 80%); padding: 14px 18px;
  background: var(--night-3); border: 1px solid var(--on-dark-line); border-radius: 12px; box-shadow: 0 16px 40px rgba(0, 0, 0, .5);
  font: 400 12.5px/1.7 var(--font-code); color: #DCE7E8;
}
.shot-code .l { white-space: pre; }
.shot-code .k { color: var(--mint); }
.shot-code .n { color: var(--white); font-weight: 600; }
.shot-code .t { color: var(--sky); }
.shot-code .a { color: var(--lilac); }
.shot-code .o { color: #FF9C85; }

/* The four-cell strip under the hero, like the one on the main site */
.strip {
  display: grid; grid-template-columns: repeat(4, 1fr); margin: 60px 0 0; padding: 0; list-style: none;
  background: var(--night-3); border: 1px solid var(--on-dark-line); border-radius: 16px;
}
.strip li { display: flex; align-items: center; gap: 14px; padding: 20px 22px; font-weight: 700; font-size: 15px; line-height: 1.35; color: var(--on-dark); }
.strip li + li { border-left: 1px solid var(--on-dark-line); }
.strip-ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--mint); }
.strip-ico svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* Sections */
.sec { padding: 96px 0; }
.sec-paper { background: var(--paper); }
.sec-white { background: var(--white); }
.sec-mint { background: var(--mint); }

/* Why DBML */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: 48px; align-items: start; margin-bottom: 48px; }
.split-lead { margin-bottom: 12px; font-weight: 700; font-size: 20px; line-height: 1.45; color: var(--ink); }
.split-text p:not(.split-lead) { font-size: 17px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.card { padding: 26px 24px 28px; background: var(--white); border: 1px solid var(--line); border-radius: 16px; }
.card h3 { margin: 22px 0 10px; }
.card p { font-size: 15px; }
.ico { display: grid; place-items: center; width: 54px; height: 54px; border: 1.5px solid var(--ink); border-radius: 14px; }
.ico svg { width: 24px; height: 24px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.ico-mint { background: var(--mint); }
.ico-lilac { background: var(--lilac); }
.ico-sun { background: var(--sun); }
.ico-sky { background: var(--sky); }

/* DBML in a minute */
#how h2 { margin-bottom: 44px; }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 0; padding: 0; list-style: none; }
.step { display: flex; flex-direction: column; padding: 28px 24px; background: var(--paper); border-radius: 16px; }
.num { display: grid; place-items: center; width: 42px; height: 42px; margin-bottom: 20px; border-radius: 50%; background: var(--ink); color: var(--mint); font-weight: 800; font-size: 17px; }
.step h3 { margin-bottom: 8px; }
.step p { margin-bottom: 16px; font-size: 15px; }
.snip {
  margin: 0; padding: 14px 16px; overflow-x: auto; background: var(--white); border: 1px solid var(--line); border-radius: 12px;
  font: 400 13px/1.7 var(--font-code); color: var(--syn-ident);
}
.snip code { font: inherit; }
.snip .k { color: var(--syn-kw); font-weight: 600; }
.snip .n { color: var(--syn-ident); font-weight: 600; }
.snip .t { color: var(--syn-type); }
.snip .a { color: var(--syn-attr); }
.snip .o { color: var(--syn-op); font-weight: 700; }
.rels { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; margin: 14px 0 0; }
.rels div { display: flex; align-items: center; gap: 8px; }
.rels dt { min-width: 36px; padding: 3px 6px; background: var(--white); border: 1px solid var(--line); border-radius: 8px; text-align: center; font: 700 13px/1.4 var(--font-code); color: var(--syn-op); }
.rels dd { margin: 0; font-size: 14px; }
.exports { display: flex; flex-wrap: wrap; gap: 8px; }
.exports span { padding: 8px 16px; background: var(--white); border: 1px solid var(--line); border-radius: 999px; font-weight: 700; font-size: 13px; color: var(--ink); }
.exports span:first-child { background: var(--ink); border-color: var(--ink); color: var(--white); }
.aside { margin-top: 28px; font-weight: 500; font-size: 15px; }

/* Examples on mint */
.sec-mint h2 { color: var(--ink); }
.ex-head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: end; margin-bottom: 32px; }
.sec-lead { font-weight: 500; font-size: 18px; line-height: 1.5; color: var(--ink); }
/* Fixed, so that focusing a radio (a click on its label) never scrolls the page. */
.tabs input { position: fixed; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.tab-labels { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.tab-labels label {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 22px;
  background: var(--white); border: 1.5px solid var(--ink); border-radius: 999px;
  font-weight: 700; font-size: 15px; color: var(--ink); cursor: pointer; user-select: none; -webkit-user-select: none;
  transition: transform 160ms var(--ease-out), background-color 150ms ease, color 150ms ease;
}
.tab-labels label:active { transform: scale(.97); }
#ex-shop:checked ~ .tab-labels label[for="ex-shop"],
#ex-school:checked ~ .tab-labels label[for="ex-school"],
#ex-delivery:checked ~ .tab-labels label[for="ex-delivery"] { background: var(--ink); color: var(--white); }
#ex-shop:focus-visible ~ .tab-labels label[for="ex-shop"],
#ex-school:focus-visible ~ .tab-labels label[for="ex-school"],
#ex-delivery:focus-visible ~ .tab-labels label[for="ex-delivery"] { outline: 2px solid var(--ink); outline-offset: 3px; }
.panes { padding: 20px; background: var(--white); border-radius: 16px; box-shadow: 0 18px 44px rgba(18, 25, 30, .16); }
.pane { display: none; margin: 0; opacity: 1; transition: opacity 220ms var(--ease-out); }
#ex-shop:checked ~ .panes .pane-shop,
#ex-school:checked ~ .panes .pane-school,
#ex-delivery:checked ~ .panes .pane-delivery { display: block; }
@starting-style { .pane { opacity: 0; } }
.pane img { width: 100%; border-radius: 8px; }
.pane figcaption { margin-top: 14px; font-size: 15px; }
.pane figcaption span:first-child { font-weight: 700; color: var(--ink); }

/* Join banner: black on mint, like the main site's call to action */
.join {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px; align-items: center;
  margin-top: 48px; padding: 44px 48px; background: var(--ink); border-radius: 20px; color: var(--on-dark);
}
.join h2 { color: var(--on-dark); }
.join p { max-width: 34em; margin-top: 12px; font-size: 17px; color: var(--on-dark-soft); }
.join-cta { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }

/* Footer */
.foot { padding: 44px 0 48px; background: var(--ink); color: var(--on-dark-soft); }
.foot-in { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 18px 32px; align-items: center; }
.foot-logo { display: block; border-radius: 4px; }
.foot-logo img { width: auto; height: 18px; }
.foot-about { font-size: 14px; }
.foot-about a { color: var(--mint); text-decoration: none; }
.foot-links { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 10px 22px; font-weight: 500; font-size: 14px; }
.foot-links a, .foot-about a { color: var(--mint); text-decoration: underline; text-decoration-color: rgba(23, 243, 203, .4); text-underline-offset: 3px; transition: text-decoration-color 150ms ease; }
/* Like the line under the logo on getanalyst.ru; the server fills in the current year. */
.foot-since { grid-column: 1 / -1; margin-top: 10px; padding-top: 22px; border-top: 1px solid var(--on-dark-line); font-size: 16px; line-height: 1.6; color: var(--on-dark); }
.foot :focus-visible, .hero :focus-visible, .join :focus-visible { outline-color: var(--mint); }

/* Hover only where there is a real pointer, so taps on phones don't leave buttons stuck. */
@media (hover: hover) and (pointer: fine) {
  .nav-links a:hover { color: var(--mint-ink); }
  .lang a:not([aria-current="page"]):hover { background: var(--paper); color: var(--ink); }
  .btn-mint:hover { background: var(--mint-press); border-color: var(--mint-press); }
  .btn-line:hover { background: var(--ink); color: var(--white); }
  .btn-ghost:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
  .tab-labels label:hover { background: var(--paper); }
  .foot-links a:hover, .foot-about a:hover { text-decoration-color: currentColor; }
}

/* Layout steps */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .strip { grid-template-columns: repeat(2, 1fr); }
  .strip li:nth-child(3) { border-left: 0; }
  .strip li:nth-child(n+3) { border-top: 1px solid var(--on-dark-line); }
}
@media (max-width: 960px) {
  .hero { padding-top: 56px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 44px; }
  .shot-code { left: 16px; }
  .split, .ex-head { grid-template-columns: minmax(0, 1fr); gap: 16px; }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .join { grid-template-columns: minmax(0, 1fr); padding: 36px 32px; }
  .join-cta { justify-content: flex-start; }
}
@media (max-width: 780px) {
  .nav-links { display: none; }
}
@media (max-width: 600px) {
  :root { --gutter: 16px; }
  .nav-in { gap: 12px; height: 60px; }
  .nav-logo img { height: 26px; }
  .nav-end { gap: 8px; }
  .lang { margin-right: 0; }
  .lang a { padding: 5px 8px; }
  .nav-signup { display: none; }
  .hero { padding: 44px 0 44px; }
  .lead { font-size: 17px; }
  .cta .btn-lg { flex: 1 1 auto; }
  .shot { padding-bottom: 0; }
  .shot-canvas { padding: 14px 10px; }
  .shot-code { position: relative; left: auto; bottom: auto; width: auto; margin: -28px 12px 0; overflow-x: auto; font-size: 11.5px; }
  .strip { grid-template-columns: minmax(0, 1fr); margin-top: 40px; }
  .strip li { padding: 16px 18px; }
  .strip li + li { border-left: 0; border-top: 1px solid var(--on-dark-line); }
  .sec { padding: 64px 0; }
  .split { margin-bottom: 32px; }
  .cards { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  #how h2 { margin-bottom: 28px; }
  .panes { padding: 10px; border-radius: 12px; }
  .join { margin-top: 36px; padding: 30px 22px; border-radius: 16px; }
  .join-cta .btn-lg { flex: 1 1 auto; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
}

/* Less motion: keep the fades, drop the press. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .btn, .tab-labels label { transition: background-color 150ms ease, border-color 150ms ease, color 150ms ease; }
  .btn:active, .tab-labels label:active { transform: none; }
}
