/* The landing page at /: the SPA's tokens (frontend/src/styles/app.css, docs/service/11-design.md), light only.
   No build step, so Inter is the same Fontsource woff2 files copied into fonts/ and served at /fonts/. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-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: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/fonts/inter-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;
}

/* Arial (Roboto on Android) scaled to Inter's metrics, as in frontend/src/styles/font-fallbacks.css. */
@font-face {
  font-family: "Inter Fallback";
  src: local("Arial"), local("ArialMT"), local("Roboto"), local("Roboto-Regular");
  size-adjust: 106.46%;
  ascent-override: 91.02%;
  descent-override: 22.64%;
  line-gap-override: 0%;
}

:root {
  --bg: #f7f7f4;
  --card: #f2f1ed;
  --raised: #e6e5e0;
  --border: color-mix(in oklab, #26251e 10%, transparent);
  --line: #cdcdc9;
  --fg: #26251e;
  --muted: #66655f;
  --link: #b83a00;
  --primary: #26251e;
  --primary-fg: #f7f7f4;
  --font-sans:
    "Inter Variable", "Inter Fallback", Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  --ease: 150ms cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

html {
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  /* no italic anywhere: Inter has no italic and no slant is synthesized */
  font-synthesis: none;
}

/* emphasis is upright and heavier, never italic */
em,
i,
cite,
dfn,
var,
address {
  font-style: normal;
}

em,
i {
  font-weight: 600;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
}

h1,
h2,
h3 {
  margin: 0;
  font-weight: 400;
}

p {
  margin: 0;
}

ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

a {
  color: var(--link);
  text-decoration: none;
  transition:
    color var(--ease),
    background-color var(--ease);
}

a:hover {
  text-decoration: underline;
}

/* the landing's links are controls: holding one and moving starts no text selection (draggable="false" stops the drag) */
.skip,
.button,
.brand,
nav a {
  -webkit-user-select: none;
  user-select: none;
}

::selection {
  background: #8bc4f8;
  color: var(--fg);
}

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

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

.skip {
  position: absolute;
  left: 16px;
  top: -64px;
  padding: 8px 12px;
  border-radius: 4px;
  background: var(--primary);
  color: var(--primary-fg);
}

.skip:focus {
  top: 8px;
}

/* header */

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 56px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: var(--fg);
  font-size: 15px;
  font-weight: 500;
}

.brand img {
  border-radius: 2px;
}

/* buttons: ink primary, linen secondary, quiet ghost; 44 px, 4 px corners */

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.button:hover {
  text-decoration: none;
}

.primary {
  background: var(--primary);
  color: var(--primary-fg);
}

.primary:hover {
  background: color-mix(in oklab, var(--primary) 85%, var(--bg));
}

.primary:active {
  background: color-mix(in oklab, var(--primary) 75%, var(--bg));
}

.secondary {
  background: var(--raised);
  color: var(--fg);
}

.secondary:hover {
  background: color-mix(in oklab, var(--line) 70%, var(--raised));
}

.secondary:active {
  background: var(--line);
}

.ghost {
  padding: 0 12px;
  color: var(--muted);
}

.ghost:hover {
  color: var(--fg);
  text-decoration: underline;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

/* type */

.eyebrow,
.meta {
  font-family: var(--font-mono);
  font-size: 12px;
  line-height: 1.63;
  color: var(--muted);
}

.prose {
  font-size: 17px;
  line-height: 1.6;
}

/* hero: heading-lg on a phone, display from 1024 px */

.hero {
  display: grid;
  gap: 20px;
  padding-top: 48px;
  padding-bottom: 64px;
}

.hero h1 {
  max-width: 18ch;
  font-size: 36px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.lead {
  max-width: 34em;
  font-size: 19px;
  line-height: 1.5;
  color: var(--muted);
}

/* keeps a hyphenated word such as «ИИ-тренером» from breaking at its hyphen on a phone */
.nowrap {
  white-space: nowrap;
}

.hero .actions {
  margin-top: 8px;
}

/* sections */

.block {
  padding-top: 48px;
  padding-bottom: 48px;
}

.block-head {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}

.block h2 {
  font-size: 26px;
  line-height: 1.25;
  letter-spacing: -0.012em;
}

.block-lead {
  color: var(--muted);
}

.grid {
  display: grid;
  gap: 16px;
}

.card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
}

.card h3 {
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.005em;
}

.card .meta {
  margin-top: auto;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

/* the simulator is the standout feature: an ink card with parchment text (14.33:1; the 75 % tone stays above 7:1) */
.feature {
  border-color: var(--primary);
  background: var(--primary);
  color: var(--primary-fg);
}

.feature .eyebrow,
.feature .meta {
  color: color-mix(in oklab, var(--primary-fg) 75%, var(--primary));
}

.feature .meta {
  border-top-color: color-mix(in oklab, var(--primary-fg) 20%, var(--primary));
}

.cta {
  display: grid;
  gap: 12px;
  padding: 24px 16px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--card);
}

.cta .actions {
  margin-top: 8px;
}

/* footer */

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 24px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--muted);
}

.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 16px;
}

.foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

/* wider screens */

@media (min-width: 640px) {
  .card {
    padding: 24px;
  }

  .cta {
    padding: 32px;
  }
}

@media (min-width: 768px) {
  .wrap {
    padding-left: 24px;
    padding-right: 24px;
  }

  .hero {
    padding-top: 80px;
    padding-bottom: 96px;
  }

  .block {
    padding-top: 64px;
    padding-bottom: 64px;
  }

  .block h2 {
    font-size: 36px;
    line-height: 1.2;
    letter-spacing: -0.02em;
  }
}

@media (min-width: 1024px) {
  .hero h1 {
    max-width: 22ch;
    font-size: 72px;
    line-height: 1.1;
    letter-spacing: -0.03em;
  }

  .grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .cta {
    grid-template-columns: 1fr auto;
    align-items: center;
    column-gap: 48px;
    padding: 48px;
  }

  .cta h2,
  .cta .block-lead {
    grid-column: 1;
  }

  .cta .actions {
    grid-column: 2;
    grid-row: 1 / span 2;
    margin-top: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none;
    animation: none;
  }
}
