/*
 * typical.wtf site base: the desktop app's tokens and components (buttons,
 * chips, header, footer) shared by every page. Page styles live in their own
 * files: typical-site.css (landing, new.html) and typical-buy.css (buy.html).
 */

/* self-hosted Inter and JetBrains Mono (variable, latin + cyrillic); no third-party font request */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/static/fonts/inter-latin.woff2) format('woff2');
  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: 'Inter';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url(/static/fonts/inter-cyrillic.woff2) format('woff2');
  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-weight: 400 700;
  font-display: swap;
  src: url(/static/fonts/jetbrains-mono-latin.woff2) format('woff2');
  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-weight: 400 700;
  font-display: swap;
  src: url(/static/fonts/jetbrains-mono-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ===================== tokens ===================== */
:root {
  --bg-app: #0a0a0a;
  --bg-editor: #0f0f0f;
  --bg-raised: #121212;
  --bg-panel: #161616;
  --bg-elevated: #1f1f1f;
  --bg-track: #2a2a2a;

  --border-subtle: #1f1f1f;
  --border-quiet: #222222;
  --border: #2a2a2a;
  --border-strong: #3a3a3a;
  --border-active: #4a4a4a;

  --text: #ffffff;
  --text-strong: #d0d0d0;
  --text-muted: #a3a3a3;
  --text-dim: #8a8a8a; /* 4.5:1 on the darkest panels (#1f1f1f) */
  --text-faint: #4a4a4a;
  --text-inverse: #000000;
  /* the one accent: the app's "running" dot. Used for live status, the chosen
     plan and what our own column includes. Nowhere else. */
  --live: #9eed9e;
  --live-soft: rgb(158 237 158 / 0.14);

  --font-ui: 'Inter', 'Segoe UI Variable Text', 'Segoe UI', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', 'Cascadia Mono', Consolas, monospace;

  --r-xs: 3px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-window: 16px;
  --r-pill: 999px;

  --control-h: 32px;
  --control-h-lg: 44px;
  --header-height: 56px;

  --dur: 140ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --shadow: 0 24px 64px rgb(0 0 0 / 0.55), 0 2px 8px rgb(0 0 0 / 0.4);

  --page-pad: clamp(20px, 6vw, 96px);
  --page-max: 1180px;
  --section-gap: clamp(88px, 11vw, 136px);
}

/* ===================== base ===================== */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  color-scheme: dark;
}

body {
  margin: 0;
  overflow-x: hidden;
  background: var(--bg-app);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}

p {
  margin: 0;
  text-wrap: pretty;
}

:focus-visible {
  outline: 1px solid var(--text);
  outline-offset: 2px;
}

::selection {
  background: #ffffff;
  color: #000000;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

.workspace {
  width: 100%;
}

/* ===================== buttons & chips (app components) ===================== */
.btn,
.header-cta,
.pot-button,
.plan-buy,
.closing a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: var(--control-h-lg);
  padding: 0 16px;
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--bg-panel);
  color: var(--text);
  font: 500 13px/1 var(--font-ui);
  text-decoration: none;
  text-transform: lowercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), color var(--dur) var(--ease);
}

.btn:hover,
.pot-button:hover,
.plan-buy:hover {
  background: var(--bg-elevated);
  border-color: var(--border-strong);
}

.btn i,
.header-cta i,
.pot-button i,
.closing a i {
  font-size: 11px;
}

/* primary = white surface, as in the app's action buttons */
.btn--primary,
.header-cta,
.closing a,
.plan.is-active .plan-buy {
  border-color: #ededed;
  background: #ededed;
  color: var(--text-inverse);
  font-weight: 600;
}

.btn--primary:hover,
.header-cta:hover,
.closing a:hover,
.plan.is-active .plan-buy:hover {
  border-color: #d8d8d8;
  background: #d8d8d8;
  color: var(--text-inverse);
}

/* mono "group label", used for section numbers and captions */
.section-label,
.closing-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 20px;
  color: var(--text-muted);
  font: 11px/1 var(--font-mono);
  letter-spacing: 0.02em;
  text-transform: lowercase;
}

.section-label::before,
.closing-kicker::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--text-faint);
}

.dot {
  width: 8px;
  height: 8px;
  flex: none;
  border-radius: var(--r-pill);
  background: var(--live);
  box-shadow: 0 0 0 3px rgb(158 237 158 / 0.12);
}

/* ===================== header (= app title bar) ===================== */
.site-header {
  position: sticky;
  z-index: 50;
  top: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  gap: 24px;
  height: var(--header-height);
  padding: 0 max(var(--page-pad), calc((100% - var(--page-max)) / 2));
  border-bottom: 1px solid var(--border-subtle);
  background: rgb(10 10 10 / 0.86);
  backdrop-filter: blur(14px);
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-decoration: none;
}

.site-brand svg {
  width: 32px;
  height: 24px;
}

.brand-dot {
  color: var(--text-muted);
}

/* nav = the app's tab strip */
.site-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-raised);
}

.site-nav a {
  height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 500;
  text-decoration: none;
  text-transform: lowercase;
  white-space: nowrap;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.site-nav a:hover {
  color: var(--text);
}

.site-nav a.is-current {
  border-color: var(--border);
  background: var(--bg-elevated);
  color: var(--text);
}

.header-cta {
  justify-self: end;
  height: var(--control-h);
  padding: 0 12px;
  font-size: 12.5px;
}

.menu-toggle {
  display: none;
}

/* right side of the header on pages with an account: language + log in */
.site-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  justify-self: end;
}

.header-link {
  display: inline-flex;
  align-items: center;
  height: var(--control-h);
  padding: 0 12px;
  border-radius: var(--r-md);
  border: 1px solid transparent;
  background: transparent;
  color: var(--text-muted);
  font: 500 12.5px/1 var(--font-ui);
  text-decoration: none;
  text-transform: lowercase;
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.header-link:hover {
  background: var(--bg-raised);
  color: var(--text);
}



/* ===================== footer ===================== */
.site-footer {
  padding: 48px var(--page-pad) 32px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-dim);
  font-size: 12px;
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--dur) var(--ease);
}

.site-footer a:hover {
  color: var(--text);
}

.site-footer i {
  margin-left: 4px;
  font-size: 10px;
}

.footer-main {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 32px;
  max-width: var(--page-max);
  margin: 0 auto;
}

.footer-brand p {
  max-width: 260px;
  margin-top: 12px;
  color: var(--text-dim);
  font-size: 13px;
  line-height: 1.55;
}

.footer-column {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.footer-column h2 {
  margin-bottom: 4px;
  color: var(--text-dim);
  font: 400 12px/16px var(--font-mono);
  text-transform: lowercase;
}

.footer-column a {
  color: var(--text-muted);
  font-size: 13px;
  text-transform: none;
}

.footer-column a span {
  color: var(--text-faint);
  font-size: 12px;
}

.site-footer .site-brand {
  color: var(--text);
  text-transform: none;
}

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--page-max);
  margin: 40px auto 0;
  padding-top: 20px;
  border-top: 1px solid var(--border-subtle);
}

.footer-bottom p {
  margin: 0;
  line-height: 1.6;
}

.footer-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

/* language = a segmented control (buy.html; pages with translations) */
.lang-switch {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: var(--r-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-raised);
}

.lang-switch button {
  height: 24px;
  padding: 0 8px;
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--text-dim);
  font: 400 11px/1 var(--font-mono);
  cursor: pointer;
  transition: color var(--dur) var(--ease), background var(--dur) var(--ease);
}

.lang-switch button:hover {
  color: var(--text);
}

html[lang='en'] .lang-switch [data-lang='en'],
html[lang='ru'] .lang-switch [data-lang='ru'] {
  background: var(--bg-elevated);
  color: var(--text);
}

/* ===================== responsive ===================== */
@media (max-width: 1000px) {
  .footer-main {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-brand {
    grid-column: 1 / -1;
  }
}

@media (max-width: 560px) {
  .footer-main {
    grid-template-columns: 1fr 1fr;
  }
}

/* narrow phones: brand + get access + menu only; signing in stays one tap
   away via "Your account" in the footer */
@media (max-width: 420px) {
  .site-actions .header-link {
    display: none !important;
  }
}

@media (max-width: 850px) {
  .site-header {
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    padding: 0 16px;
  }

  .menu-toggle {
    display: inline-grid;
    place-items: center;
    width: var(--control-h);
    height: var(--control-h);
    padding: 0;
    border-radius: var(--r-md);
    border: 1px solid var(--border);
    background: var(--bg-panel);
    color: var(--text);
    cursor: pointer;
  }

  /* menu opens like the app's drawer */
  .site-nav {
    position: absolute;
    top: calc(100% + 8px);
    right: 16px;
    left: 16px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    padding: 8px;
    border-color: var(--border);
    background: var(--bg-panel);
    box-shadow: var(--shadow);
  }

  .site-nav.is-open {
    display: flex;
  }

  .site-nav a {
    height: 36px;
    font-size: 13px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

/* links and buttons: no stray underlines on anything shaped like a button */
a.btn, a.sp-btn, a.pill-btn, a.header-cta, a.header-link, a[class*="-btn"] { text-decoration: none; }
