/* Шрифты лежат рядом со страницей, чтобы первый показ не ходил на чужие адреса. */
@font-face {
  font-family: "Montserrat";
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Montserrat-Regular.ttf") format("truetype");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 600;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Montserrat-SemiBold.ttf") format("truetype");
}
@font-face {
  font-family: "Montserrat";
  font-weight: 700;
  font-style: normal;
  font-display: swap;
  src: url("fonts/Montserrat-Bold.ttf") format("truetype");
}

:root {
  --bg: #EEF3F0;
  --surface: #FFFFFF;
  --text: #1C1C1E;
  --text-sec: #6E6E73;
  --border: #E5E9E7;
  --primary: #059669;
  --on-primary: #FFFFFF;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141416;
    --surface: #1F1F22;
    --text: #F2F2F3;
    --text-sec: #ABABB0;
    --border: #333338;
    --primary: #34D399;
    --on-primary: #04231A;
  }
}

/* Режим запуска: одно значение data-launch на <html> переключает все места сразу. */
[data-launch="pre"] .when-open { display: none; }
[data-launch="open"] .when-pre { display: none; }

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: break-word;
}

.page {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 16px 32px;
}

a { color: var(--primary); }

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand {
  font-weight: 700;
  font-size: 20px;
  color: var(--primary);
}

.lang {
  display: flex;
  align-items: center;
  gap: 4px;
  color: var(--text-sec);
  font-size: 14px;
}

.lang a,
.lang span[aria-current] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 48px;
}

.lang a { text-decoration: none; font-weight: 600; }
.lang span[aria-current] { color: var(--text); font-weight: 700; }

section {
  margin-top: 16px;
  padding: 24px 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
}

h1, h2 { font-weight: 700; margin: 0 0 12px; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 22px; line-height: 1.25; }

p { margin: 0 0 16px; }
section > :last-child { margin-bottom: 0; }

.doors {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.door {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid var(--primary);
  border-radius: 12px;
  background: var(--primary);
  color: var(--on-primary);
  font-family: inherit;
  font-weight: 600;
  font-size: 16px;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;
}

/* Когда клиентская дверь открыта, в первом экране мастер уступает ей главное место. */
[data-launch="open"] .hero .door-master {
  background: transparent;
  color: var(--primary);
}

@media (max-width: 480px) {
  .door { width: 100%; }
}

.soon {
  margin: 0;
  font-weight: 600;
  color: var(--primary);
}

.hero .soon { margin-top: 24px; }
.hero .doors { margin-top: 16px; }

.note {
  margin: 12px 0 0;
  font-size: 14px;
  color: var(--text-sec);
}

section > .soon,
section > .door { margin-top: 24px; }

.how {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
}

.how li {
  position: relative;
  padding: 0 0 16px 44px;
  counter-increment: step;
}

.how li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--primary);
  color: var(--on-primary);
  font-weight: 700;
  line-height: 32px;
  text-align: center;
}

.how strong { display: block; font-weight: 700; }
.how span { display: block; color: var(--text-sec); }

.niches {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.niches li {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 12px 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  font-weight: 600;
}

.perks {
  margin: 0 0 16px;
  padding-left: 20px;
}

.perks li { margin-bottom: 8px; }

details {
  border-bottom: 1px solid var(--border);
}

details:last-of-type { border-bottom: 0; }

summary {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: 8px 0;
  font-weight: 600;
  cursor: pointer;
}

details p { margin: 0 0 16px; color: var(--text-sec); }

footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 24px;
  color: var(--text-sec);
  font-size: 14px;
}

@media (min-width: 720px) {
  h1 { font-size: 40px; }
  h2 { font-size: 26px; }
  section { padding: 32px; }
}
