/* Shared styles of every page: tokens, font, base elements, layout, buttons, store badges,
   placeholders, header, footer, the 404 page. Page-specific styles live in landing.css and
   legal.css. Breakpoints cannot be custom properties, so the two of them are literals:
   860px (header) and 720px (footer). */

/* ==========================================================================
   1. Font
   ========================================================================== */

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("fonts/golos-text-cyrillic-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("fonts/golos-text-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: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("fonts/golos-text-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308,
    U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113,
    U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: "Golos Text";
  font-style: normal;
  font-display: swap;
  font-weight: 400 900;
  src: url("fonts/golos-text-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;
}

/* ==========================================================================
   2. Tokens
   The light theme is the default. The dark one is switched on only by
   data-theme="dark" on <html> (boot.js sets it from ?theme=dark); the system
   colour scheme is not followed.
   ========================================================================== */

:root {
  color-scheme: light;

  /* Colours that change with the theme */
  --color-bg: #fff;
  --color-text: #171717;
  --color-muted: #6B7280;
  --color-muted-light: #9CA3AF;
  --color-footer-muted: #9CA3AF;
  --color-accent: #F5C044;
  --color-accent-soft: #FEF3D6;
  --color-accent-text: #8A6D14;
  --color-icon-tint: #B4881A;
  --color-surface-1: #F7F7F8;
  --color-surface-2: #F1F1F3;
  --color-border: #ECECEE;
  --color-border-soft: #F0F0F2;
  --color-phone-border: #E6E6EA;
  --color-screen-bg: #fff;
  --color-masters-bg: #171717;
  --color-reject-bg: #F1F1F3;
  --color-accept-bg: #171717;
  --color-accept-text: #fff;
  --shadow-card: 0 24px 60px rgba(30, 30, 50, .14);
  --shadow-card-2: 0 20px 50px rgba(30, 30, 50, .12);
  --shadow-inner: 0 3px 12px rgba(30, 30, 50, .04);
  --focus-ring: 0 0 0 3px rgba(245, 192, 68, .5);
  --color-store-bg: #171717;
  --color-store-bg-hover: #303036;
  --color-store-border: transparent;
  --color-store-ring: var(--color-text);
  --shadow-store-hover: 0 12px 26px rgba(30, 30, 50, .24);

  /* Colours that stay the same in both themes */
  --color-on-accent: #171717;
  --color-store-text: #fff;
  --color-store-label: #C7C7CE;
  --color-masters-text: #E6E6EA;
  --color-masters-divider: rgba(255, 255, 255, .14);

  /* Visible placeholders of the service pages */
  --color-todo-bg: var(--color-accent-soft);
  --color-todo-border: var(--color-accent);
  --color-todo-text: var(--color-text);

  /* Type and sizes */
  --font-family: "Golos Text", -apple-system, "SF Pro Display", Roboto, sans-serif;
  --container-max: 1200px;
  --column-max: 720px;
  --gutter: clamp(20px, 5vw, 40px);
  --section-pad: clamp(72px, 10vw, 120px);
  --radius-phone: 30px;
  --radius-card: 24px;
  --radius-btn: 14px;
  --radius-badge: 20px;
  --store-badge-min: 200px;
  --store-pair-max: 440px;
  --store-text-min: 96px;
  --store-lift: -2px;
  --store-transition: .2s ease;

  /* Header */
  --header-pad: 22px;
  --header-pad-scrolled: 12px;
  --header-transition: .2s ease;
  /* Room left above an anchor so the sticky header does not cover it */
  --anchor-offset: 84px;
}

html[data-theme="dark"] {
  color-scheme: dark;

  --color-bg: #16161A;
  --color-text: #F3F3F5;
  --color-muted: #9A9AA3;
  --color-muted-light: #6E6E78;
  --color-footer-muted: #9A9AA3;
  --color-accent: #EBC15A;
  --color-accent-soft: #2A2518;
  --color-accent-text: #EBC15A;
  --color-icon-tint: #EBC15A;
  --color-surface-1: #1F1F23;
  --color-surface-2: #26262B;
  --color-border: rgba(255, 255, 255, .12);
  --color-border-soft: rgba(255, 255, 255, .08);
  --color-phone-border: rgba(255, 255, 255, .12);
  --color-screen-bg: #1F1F23;
  --color-masters-bg: #1F1F23;
  --color-reject-bg: #26262B;
  --color-accept-bg: #0F0F12;
  --color-accept-text: #F3F3F5;
  --shadow-card: 0 24px 60px rgba(0, 0, 0, .5);
  --shadow-card-2: 0 20px 50px rgba(0, 0, 0, .45);
  --shadow-inner: 0 3px 12px rgba(0, 0, 0, .3);
  --focus-ring: 0 0 0 3px rgba(235, 193, 90, .45);
  --color-store-bg: #2B2B31;
  --color-store-bg-hover: #3A3A42;
  --color-store-border: #6E6E78;
  --shadow-store-hover: 0 12px 26px rgba(0, 0, 0, .5);
}

/* ==========================================================================
   3. Base
   ========================================================================== */

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

/* A component's own display must not beat the attribute: steps, the menu and
   the store variants are switched with it. */
[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-family);
  color: var(--color-text);
  background: var(--color-bg);
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1 0 auto;
}

h1,
h2,
h3,
h4,
p {
  margin: 0;
}

button {
  font-family: inherit;
}

/* Sticky header: an anchor target stops below it */
[id] {
  scroll-margin-top: var(--anchor-offset);
}

:focus-visible {
  outline: 2px solid transparent;
  outline-offset: 2px;
  box-shadow: var(--focus-ring);
}

/* "Skip to content": out of sight until it takes keyboard focus */
.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 100;
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-on-accent);
  background: var(--color-accent);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* ==========================================================================
   4. Layout
   ========================================================================== */

.container {
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

/* ==========================================================================
   5. Typography
   ========================================================================== */

.title-hero {
  font-size: clamp(38px, 5.2vw, 60px);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.05;
}

.title-section {
  font-size: clamp(30px, 4vw, 42px);
  font-weight: 800;
  letter-spacing: -1px;
}

.lead {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  color: var(--color-muted);
}

/* ==========================================================================
   6. Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: var(--radius-btn);
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
}

.btn--accent {
  color: var(--color-on-accent);
  background: var(--color-accent);
}

.btn--lg {
  min-height: 44px;
  padding: 15px 30px;
  font-size: 16px;
  font-weight: 800;
}

/* ==========================================================================
   7. Store badges
   One look for both states and both places: a dark plaque, an icon and two
   lines of text. "Soon" is a div, "available" is a link. The pair is two equal
   columns; when --store-badge-min for each does not fit, the badges stack and
   take the whole width. A surface of another colour (the closing call)
   repaints the plaque through the --color-store-* properties.
   ========================================================================== */

.store-badges {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--store-badge-min)), 1fr));
  gap: 12px;
  max-width: var(--store-pair-max);
}

.store-badges--center {
  margin-left: auto;
  margin-right: auto;
}

.store-badge {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 60px;
  padding: 10px 18px;
  border: 1px solid var(--color-store-border);
  border-radius: var(--radius-btn);
  text-align: left;
  text-decoration: none;
  white-space: nowrap;
  color: var(--color-store-text);
  background: var(--color-store-bg);
  transition:
    transform var(--store-transition),
    background-color var(--store-transition),
    box-shadow var(--store-transition);
}

.store-badge:hover {
  background: var(--color-store-bg-hover);
  box-shadow: var(--shadow-store-hover);
  transform: translateY(var(--store-lift));
}

/* Only the link takes the focus. The yellow ring of the page would be lost on
   the accent card, so the ring takes the text colour of the surface. */
.store-badge:focus-visible {
  outline: 3px solid var(--color-store-ring);
  outline-offset: 2px;
  box-shadow: none;
}

.store-badge__icon {
  flex: none;
}

/* The same width in both badges: the icons of a stacked pair stand one under
   the other. */
.store-badge__text {
  min-width: var(--store-text-min);
}

.store-badge__label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-store-label);
}

.store-badge__name {
  display: block;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
}

/* ==========================================================================
   8. Placeholders
   [data-todo] is visible by default: a soft yellow backing. A placeholder
   that keeps the look of the design (the store badge of the home page) opts
   out with .todo-plain.
   ========================================================================== */

[data-todo]:not(.todo-plain) {
  padding: 1px 6px;
  border-radius: 6px;
  color: var(--color-todo-text);
  background: var(--color-todo-bg);
  box-shadow: inset 0 0 0 1px var(--color-todo-border);
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

[data-todo].todo-block {
  display: block;
  padding: 14px 18px;
  border-radius: var(--radius-btn);
}

/* ==========================================================================
   9. Header
   Up to 860px the links move into the menu under the bar. Without scripts the
   menu stays open and the toggle is not shown.
   ========================================================================== */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: var(--header-pad) 0;
  background: var(--color-bg);
  transition: padding var(--header-transition), box-shadow var(--header-transition);
}

.site-header.is-scrolled {
  padding: var(--header-pad-scrolled) 0;
  box-shadow: 0 1px 0 var(--color-border);
}

.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.site-header__logo {
  position: relative;
  border-radius: 8px;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.5px;
  text-decoration: none;
  color: var(--color-accent);
}

.site-header__actions,
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(16px, 3vw, 36px);
}

.site-nav__link {
  position: relative;
  padding: 2px 4px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
}

.site-nav__link:hover,
.site-menu__link:hover {
  color: var(--color-accent-text);
}

.site-header__cta {
  position: relative;
  padding: 11px 22px;
}

.site-header__cta:hover {
  filter: brightness(.95);
}

/* The design keeps these targets lower than 44px; the tap area is extended
   without moving anything. */
.site-header__logo::after,
.site-nav__link::after,
.site-header__cta::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  height: 44px;
  transform: translateY(-50%);
}

.menu-toggle {
  display: none;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  color: var(--color-text);
  background: none;
  cursor: pointer;
}

.menu-toggle__cross,
.menu-toggle[aria-expanded="true"] .menu-toggle__bars {
  display: none;
}

.menu-toggle[aria-expanded="true"] .menu-toggle__cross {
  display: inline;
}

.site-menu {
  display: none;
  flex-direction: column;
  padding: 8px var(--gutter) 18px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.site-menu__link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: 13px 4px;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  text-decoration: none;
  color: var(--color-text);
}

@media (max-width: 860px) {
  .site-nav {
    display: none;
  }

  .site-header__actions {
    gap: 10px;
  }

  .site-header__cta {
    min-height: 44px;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 14px;
  }

  .js .menu-toggle {
    display: flex;
  }

  .site-menu {
    display: flex;
  }

  /* Scripts are on but shell.js has not collapsed the menu yet: keep it from flashing open */
  .js .site-header:not(.is-ready) .site-menu {
    display: none;
  }
}

/* ==========================================================================
   10. Footer
   Three columns on a grid, all aligned to the left; up to 720px they stack.
   ========================================================================== */

.site-footer {
  padding: 48px 0 32px;
  border-top: 1px solid var(--color-border);
  background: var(--color-bg);
}

.site-footer__cols {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(min-content, 1fr) minmax(min-content, 1fr);
  gap: 32px;
  align-items: start;
}

.site-footer__about {
  min-width: 0;
}

.site-footer__logo {
  margin-bottom: 10px;
  font-size: 22px;
  font-weight: 900;
  color: var(--color-accent);
}

.site-footer__requisites {
  max-width: 320px;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  color: var(--color-footer-muted);
}

.site-footer__links,
.site-footer__contacts {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0;
  text-align: left;
}

.site-footer__heading {
  /* The top margin lines the caps of the caption with the letters of the logo. */
  margin-top: 5px;
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-footer-muted);
}

/* A contact that is a link looks like the links of the documents; one that is
   still a placeholder keeps the muted line below. */
.site-footer__link,
a.site-footer__contact {
  display: flex;
  align-items: center;
  min-height: 32px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  color: var(--color-text);
}

.site-footer__link:hover,
a.site-footer__contact:hover {
  color: var(--color-accent-text);
}

/* A touch screen needs the full 44px target; the dense 32px step is for a pointer. */
@media (pointer: coarse) {
  .site-footer__link,
  a.site-footer__contact {
    min-height: 44px;
  }
}

.site-footer__contact {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-footer-muted);
}

.site-footer__copyright {
  max-width: var(--container-max);
  margin: 32px auto 0;
  padding: 20px var(--gutter) 0;
  border-top: 1px solid var(--color-border);
  font-size: 12.5px;
  font-weight: 500;
  text-align: center;
  color: var(--color-footer-muted);
}

@media (max-width: 720px) {
  .site-footer__cols {
    grid-template-columns: 1fr;
    gap: 24px;
  }
}

/* ==========================================================================
   11. Page 404
   No header and no footer, as in the design.
   ========================================================================== */

.not-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 40px;
  text-align: center;
}

.not-found__logo {
  font-size: 30px;
  font-weight: 900;
  letter-spacing: -.5px;
  color: var(--color-accent);
}

.not-found__title {
  font-size: clamp(22px, 3vw, 28px);
  font-weight: 700;
}

/* ==========================================================================
   12. Reduced motion
   One switch for every page: no animations and no transitions. Scripts check
   the same media query and do not start their timers.
   ========================================================================== */

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