/* ParkSesh — сайт в стиле приложения (20 окт): белый фон, тёплые бежевые карточки, почти чёрный текст и кнопки,
   глубокий синий акцент, системный шрифт, заголовки тонкие заглавные с разрядкой. Тёмная тема — почти чёрная. */
:root {
  --bg: #FCFBF8;   /* 20 окт: как приложение — тёплый белый фон, льняные карточки */
  --card: #E3DDD1;
  --frame: #BDB4A4;
  --hairline: #DDD6C9;
  --ink: #2E2B27;
  --muted: #77706A;
  --accent: #34465E;   /* 20 окт: благородный приглушённый синий */
  --caramel: #9A7656;
  --graphite: #26282C;
  --sun: #B5452F;
  --on-ink: #F4F0E8;
  --radius: 6px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", "Segoe UI", sans-serif;
  /* 20 окт: без антиквы и моноширинного — везде системный шрифт, как в приложении */
  --serif: var(--font);
  --mono: var(--font);
  --kanji: "Hiragino Mincho ProN", "Yu Mincho", "Noto Serif JP", serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #000000; --card: #1B1A18; --frame: #3A3632; --hairline: #26241F;
    --ink: #F0EBE2; --muted: #A39C91; --accent: #9EADC2; --caramel: #D2A679; --graphite: #3A2B20; --sun: #D0644A; --on-ink: #000000;
  }
}
:root[data-theme="dark"] {
  --bg: #000000; --card: #1B1A18; --frame: #3A3632; --hairline: #26241F;
  --ink: #F0EBE2; --muted: #A39C91; --accent: #9EADC2; --caramel: #D2A679; --graphite: #3A2B20; --sun: #D0644A; --on-ink: #000000;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
/* Зерно бумаги — очень слабое, поверх фона */
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0; /* зерно выключено: фон белый */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.33 0 0 0 0 0.25 0 0 0 0 0.16 0 0 0 0.22 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }
body > * { position: relative; z-index: 1; }
a { color: var(--ink); }
a:hover { color: var(--accent); }
img, video { display: block; max-width: 100%; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 700px) { .wrap { padding: 0 32px; } }

/* ---------- Шапка ---------- */
.top { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--hairline); }
.top .wrap { display: grid; grid-template-columns: auto 1fr auto auto; grid-template-areas: "brand tabs lang get";
  align-items: center; column-gap: 20px; min-height: 60px; }
.brand { grid-area: brand; display: flex; align-items: center; gap: 10px; text-decoration: none; white-space: nowrap; }
.brand img { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--hairline); }
.brand span { font-size: 15px; letter-spacing: 0.32em; font-weight: 400; }
.lang { grid-area: lang; display: inline-flex; border: 1px solid var(--frame); border-radius: 8px; overflow: hidden; }
.lang button { appearance: none; border: 0; background: transparent; color: var(--muted); font: 600 13px var(--font);
  min-width: 44px; min-height: 36px; cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--on-ink); }

/* ---------- Кнопки ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px;
  border-radius: var(--radius); font: 600 17px var(--font); text-decoration: none; border: 1px solid transparent; }
.btn-ink { background: var(--ink); color: var(--on-ink); }
.btn-ink:hover { color: var(--on-ink); opacity: 0.9; }
.btn-line { background: var(--card); color: var(--ink); border-color: var(--frame); }
.btn svg { width: 20px; height: 20px; flex: none; }
.top .btn { grid-area: get; min-height: 38px; padding: 0 14px; font-size: 15px; }

/* ---------- Типографика как в приложении ---------- */
.eyebrow { font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; }
.display { font-weight: 200; text-transform: uppercase; letter-spacing: -0.01em; line-height: 1.02; margin: 0;
  font-size: clamp(44px, 9vw, 96px); }
.h2 { font-weight: 300; text-transform: uppercase; font-size: clamp(30px, 5vw, 48px); line-height: 1.05; margin: 0 0 16px; }
.lead { font-size: clamp(18px, 2.2vw, 21px); color: var(--muted); margin: 20px 0 0; max-width: 34em; }
.muted { color: var(--muted); }

/* ---------- Блоки главной ---------- */
section { padding: 72px 0; border-bottom: 1px solid var(--hairline); }
.hero { padding: 56px 0 72px; }
.hero .grid { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .hero .grid { grid-template-columns: 1.15fr 0.85fr; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.phone { width: min(320px, 78vw); margin: 0 auto; border-radius: 40px; border: 1px solid var(--frame); padding: 10px;
  background: var(--card); }
.phone img { border-radius: 30px; width: 100%; height: auto; }
.split { display: grid; gap: 40px; align-items: center; }
@media (min-width: 860px) { .split { grid-template-columns: 1fr 1fr; } .split.flip > :first-child { order: 2; } }

.cards { display: grid; gap: 12px; margin-top: 28px; }
@media (min-width: 700px) { .cards.two { grid-template-columns: 1fr 1fr; } .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--card); border: 1px solid var(--frame); border-radius: var(--radius); padding: 20px 22px; }
.card h3 { margin: 0 0 6px; font-size: 19px; font-weight: 600; }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.tag { display: inline-block; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; font-weight: 600;
  padding: 4px 10px; border-radius: 6px; background: var(--ink); color: var(--on-ink); margin-bottom: 12px; }

.say { display: flex; flex-direction: column; gap: 10px; margin-top: 24px; }
.say div { background: var(--card); border: 1px solid var(--frame); border-radius: var(--radius); padding: 14px 18px;
  display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.say q { font-size: 20px; font-weight: 300; quotes: "«" "»" "“" "”"; }
.say span { color: var(--muted); font-size: 15px; }

.leagues { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 28px; }
.league { border: 1px solid var(--frame); border-radius: var(--radius); background: var(--card); padding: 14px 10px 12px;
  text-align: center; font-weight: 600; font-size: 15px; }
.league i { display: block; height: 6px; border-radius: 3px; margin: 0 auto 12px; width: 60%; }
@media (max-width: 520px) { .leagues { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

.line-art { width: 100%; max-width: 520px; height: auto; color: var(--ink); }

.final { text-align: center; border-bottom: 0; }
.final .cta { justify-content: center; }
footer { padding: 32px 0 48px; color: var(--muted); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }
footer a { color: var(--muted); }

/* ---------- Пост и профиль ---------- */
.page { padding: 28px 0 64px; }
.narrow { max-width: 560px; margin: 0 auto; }
.post { background: var(--card); border: 1px solid var(--frame); border-radius: var(--radius); overflow: hidden; }
.author { display: flex; align-items: center; gap: 12px; padding: 14px 16px; text-decoration: none; }
.avatar { width: 40px; height: 40px; border-radius: 50%; background: var(--hairline); flex: none; object-fit: cover;
  display: grid; place-items: center; color: var(--muted); overflow: hidden; }
.avatar svg { width: 60%; height: 60%; }
.nick { font-weight: 600; }
.verified { display: inline-block; width: 15px; height: 15px; vertical-align: -2px; margin-left: 4px; color: #4C8DF6; }
.media { background: #000; position: relative; }
.media img, .media video { width: 100%; height: auto; max-height: 78vh; object-fit: contain; margin: 0 auto; }
.media .count { position: absolute; top: 12px; right: 12px; background: rgba(0,0,0,0.6); color: #fff; font-size: 13px;
  padding: 3px 9px; border-radius: 12px; }
.post-body { padding: 14px 16px 18px; display: flex; flex-direction: column; gap: 8px; }
.stats { display: flex; gap: 18px; color: var(--muted); font-size: 15px; }
.trick { display: inline-block; align-self: flex-start; border: 1px solid var(--frame); border-radius: 6px; padding: 2px 10px;
  font-size: 14px; font-weight: 600; }
.caption { margin: 0; white-space: pre-line; overflow-wrap: anywhere; }
.when { color: var(--muted); font-size: 14px; }
.session { background: var(--bg); padding: 22px 18px; display: grid; gap: 14px; }
.session .big { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.session .big b { display: block; font-size: 34px; font-weight: 200; line-height: 1.1; }
.session .big span { font-size: 13px; color: var(--muted); }
.open-app { margin-top: 16px; display: flex; flex-direction: column; gap: 10px; align-items: stretch; text-align: center; }

.rider-head { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 8px 0 24px; }
.rider-head .avatar { width: 96px; height: 96px; }
.rider-head h1 { margin: 0; font-size: 24px; font-weight: 600; }
.rider-head .name { font-weight: 600; }
.rider-head .bio { margin: 0; color: var(--muted); max-width: 30em; white-space: pre-line; overflow-wrap: anywhere; }
.counts { display: flex; gap: 28px; margin-top: 6px; }
.counts b { display: block; font-size: 24px; font-weight: 300; }
.counts span { font-size: 13px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.tile { aspect-ratio: 3 / 4; background: var(--hairline); position: relative; overflow: hidden; display: block; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile svg { position: absolute; top: 8px; right: 8px; width: 18px; height: 18px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }
.tile .text { position: absolute; inset: 0; display: grid; place-items: center; padding: 10px; text-align: center; font-size: 13px; color: var(--muted); }
.notice { text-align: center; padding: 48px 16px; color: var(--muted); }
.notice h2 { color: var(--ink); font-weight: 300; text-transform: uppercase; font-size: 28px; margin: 0 0 8px; }
.skeleton { background: var(--hairline); border-radius: var(--radius); min-height: 420px; }

/* ---------- Рисунок с иконки ---------- */
.hero .line-art { display: block; max-width: 420px; margin-top: 40px; color: var(--ink); }

/* ---------- Вкладки сайта — как вкладки тренировок в приложении: тонкий текст, полоска под выбранной ---------- */
.tabs { display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a { position: relative; flex: none; display: inline-flex; align-items: center; min-height: 44px; text-decoration: none;
  color: var(--muted); font-size: 17px; font-weight: 400; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); font-weight: 600; }
.tabs a[aria-current="page"]::after { content: ""; position: absolute; left: 50%; bottom: 4px; width: 24px; height: 3px;
  margin-left: -12px; border-radius: 2px; background: var(--accent); }
.top .tabs { grid-area: tabs; min-width: 0; }
/* Телефон: строка 1 — логотип и язык, строка 2 — вкладки во всю ширину; «Скачать» есть на самой странице */
@media (max-width: 760px) {
  .top .wrap { grid-template-columns: 1fr auto; grid-template-areas: "brand lang" "tabs tabs"; row-gap: 0; padding-top: 6px; }
  .top .btn { display: none; }
  .top .tabs { justify-content: space-between; gap: 12px; }
  .tabs a { font-size: 15px; }
}

/* ---------- Карточки-разделы на главной ---------- */
.sections { display: grid; gap: 16px; margin-top: 8px; }
@media (min-width: 760px) { .sections { grid-template-columns: 1fr 1fr; } }
.section-card { display: flex; flex-direction: column; gap: 12px; padding: 28px; border-radius: var(--radius);
  border: 1px solid var(--frame); background: var(--card); text-decoration: none; color: var(--ink); }
.section-card:hover { color: var(--ink); border-color: var(--accent); }
.section-card.dark { background: #15120F; border-color: #3A322A; color: #F3EDE3; }
.section-card.dark:hover { color: #F3EDE3; }
.section-card h2 { margin: 0; font-weight: 200; text-transform: uppercase; font-size: clamp(34px, 5vw, 52px); line-height: 1; }
.section-card p { margin: 0; color: var(--muted); }
.section-card.dark p { color: #B9AC9C; }
.section-card .go { margin-top: auto; font-weight: 600; }
.section-card .glyph-row { display: flex; gap: 18px; color: inherit; }
.section-card .glyph-row svg { width: 72px; height: 32px; }

/* ---------- Parkshot — тёмная полоса, как Главная в приложении ---------- */
.band { background: #15120F; color: #F3EDE3; border-bottom: 0; }
.band .eyebrow, .band .lead { color: #B9AC9C; }
.band .card { background: #211C17; border-color: #3A322A; }
.band .card h3 { color: #F3EDE3; }
.band .card p { color: #B9AC9C; }

/* ---------- Значки разделов, как в приложении ---------- */
.part .glyph { width: 96px; height: 42px; color: var(--ink); margin-bottom: 10px; display: block; }

/* ---------- Текстовые страницы ---------- */
.doc h2 { font-size: 20px; font-weight: 600; margin: 32px 0 8px; }
.doc ul { padding-left: 20px; margin: 8px 0; }
.doc li { margin: 6px 0; }
.doc p, .doc li { overflow-wrap: anywhere; }

/* ---------- Полоска App Store над шапкой — только на телефоне (на компьютере «Скачать» есть в шапке) ---------- */
.appbar { display: none; }
@media (max-width: 760px) {
  .appbar { display: flex; align-items: center; gap: 12px; padding: 8px 16px; background: var(--card);
    border-bottom: 1px solid var(--hairline); }
  .appbar img { width: 36px; height: 36px; border-radius: 9px; border: 1px solid var(--hairline); }
  .appbar div { display: flex; flex-direction: column; line-height: 1.2; margin-right: auto; }
  .appbar b { font-size: 15px; }
  .appbar span { font-size: 13px; color: var(--muted); }
  .appbar .btn { min-height: 34px; padding: 0 16px; font-size: 15px; border-radius: 17px; }
}

/* ---------- «Скачать» + «Поделиться» внизу страниц ---------- */
.share-row { display: flex; flex-wrap: wrap; gap: 12px; padding-top: 40px; padding-bottom: 8px; }
.btn[data-share] { cursor: pointer; }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translateX(-50%); background: var(--ink); color: var(--on-ink);
  padding: 10px 18px; border-radius: 20px; font-size: 15px; z-index: 20; }

/* ---------- «Свиток» (18 окт): антиква, моноширинные подписи; 19 окт — без иероглифов, вместо солнца печать PS ---------- */
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.12em; }
.display { font-family: var(--serif); font-weight: 300; text-transform: none; letter-spacing: -0.01em;
  padding-bottom: 14px; border-bottom: 1px solid var(--ink); display: flex; align-items: center; gap: 0.25em; }
.display::before { content: none; }
.h2 { font-family: var(--serif); font-weight: 300; text-transform: none; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.kanji { font-family: var(--kanji); color: var(--accent); font-size: clamp(20px, 2.6vw, 26px); letter-spacing: 0.25em; margin: 10px 0 0; }
.band .kanji { color: #C9A27A; }
.band .display, .band .h2 { border-bottom-color: #F3EDE3; }
.section-card h2 { font-family: var(--serif); font-weight: 300; text-transform: none; }
.notice h2 { font-family: var(--serif); text-transform: none; }
.tabs a { font-family: var(--mono); font-size: 13px; text-transform: uppercase; letter-spacing: 0.06em; }
.tabs a[aria-current="page"]::after { height: 1.5px; border-radius: 0; background: var(--accent); }
.brand span { font-weight: 300; }
.btn { font-weight: 500; }
.card h3 { font-family: var(--serif); font-weight: 400; font-size: 20px; }
.doc h1 { font-family: var(--serif); font-weight: 300; text-transform: none; padding-bottom: 10px; border-bottom: 1px solid var(--ink); }
.doc h2 { font-family: var(--serif); font-weight: 400; }
.say q { font-family: var(--serif); }
.session .big b, .counts b { font-family: var(--serif); font-weight: 300; }
.hero .line-art { max-width: 460px; margin-top: 28px; }
@media (max-width: 760px) { .tabs a { font-size: 12px; } }

/* Главная: «PARKSESH» тем же шрифтом, что в шапке (18 окт) — тонкий, заглавный, с разрядкой */
.display.brand-title { font-family: var(--font); font-weight: 300; text-transform: uppercase; letter-spacing: 0.3em;
  font-size: clamp(30px, 7.4vw, 70px); }

/* Одна и та же надпись PARKSESH везде (18 окт): как в шапке — тонкая, заглавная, с разрядкой */
.wordmark { font-family: var(--font); font-weight: 300; letter-spacing: 0.3em; text-transform: uppercase; }
.appbar b.wordmark { font-weight: 300; font-size: 14px; }

/* 20 окт (Миша): новый стиль как в приложении — заголовки тонкие заглавные с разрядкой (как PARKSESH), без черты под ними;
   текст и главные кнопки графит, тёмная тема почти чёрная; углы прежние */
.display, .h2, .doc h1, .section-card h2 { font-family: var(--font); font-weight: 300; text-transform: uppercase; letter-spacing: 0.14em; border-bottom: 0; }
.display { letter-spacing: 0.12em; }
.btn-ink { background: var(--ink); color: var(--on-ink); }

/* 20 окт: иконка в шапке и на главной — с мягкой тенью, как в приложении; главный блок — графит с кремовым текстом */
.appbar img, .brand img { border-radius: 22.5%; box-shadow: 0 4px 14px rgba(0,0,0,.12); }
.hero .phone img, .phone img { border-radius: 28px; }
.band { background: var(--graphite); color: #F3ECDF; }
.band .muted, .band p { color: rgba(243,236,223,.75); }
.hero-icon { display: block; width: 132px; height: 132px; border-radius: 30px; margin: 0 0 22px;
  box-shadow: 0 18px 40px rgba(0,0,0,.16); animation: hero-float 4.4s ease-in-out infinite; }
@keyframes hero-float { 50% { transform: translateY(-8px); } }
@media (prefers-reduced-motion: reduce) { .hero-icon { animation: none; } }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .hero-icon { content: url("/assets/favicon-dark-512.png?v=56"); } }
:root[data-theme="dark"] .hero-icon { content: url("/assets/favicon-dark-512.png?v=56"); }

/* 25 окт: пять языков в переключателе — компактнее; пометка о языке политики */
.lang button { min-width: 0; padding-left: 7px; padding-right: 7px; }
.doc-note { color: var(--muted); font-size: 14px; margin-top: 18px; }
