/*
Theme Name: Coming Soon
Author: Nikita
Version: 1.0.1
*/

html, body { height: 100%; }

body{
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--cs-font-family, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif);
}

/* Нормальная высота на мобилках (iOS/Android address bar) */
.cs-wrap{
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
@supports (min-height: 100dvh){
  .cs-wrap{ min-height: 100dvh; }
}

.cs-main{
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;

  /* адаптивные паддинги + safe area сверху */
  padding: clamp(12px, 3vw, 24px);
  padding-top: calc(clamp(12px, 3vw, 24px) + env(safe-area-inset-top));

  text-align: center;
}

/* Логотип широкий: ограничиваем по ширине и по высоте */
.cs-logo{
  width: 100%;
  display: flex;
  justify-content: center;
}

.cs-logo img{
  display: block;
  width: auto;
  height: auto;

  max-width: min(680px, 88vw);
  max-height: 45svh;

  object-fit: contain;
}

/* Футер + safe area снизу (iPhone жесты) */
.cs-footer{
  padding-left: clamp(16px, 4vw, 24px);
  padding-right: clamp(16px, 4vw, 24px);
  padding-top: 14px;
  padding-bottom: calc(18px + env(safe-area-inset-bottom));

  text-align: center;
  font-weight: 600;
  letter-spacing: .06em;
  color: var(--muted);
}

/* Соцсети */
.cs-socials{
  margin: 0 0 10px;
  padding: 0;
  list-style: none;

  display: flex;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;

  gap: clamp(10px, 4vw, 18px);
}

.cs-socials a{
  border: 0;
  background: transparent;
  border-radius: 0;

  padding: 12px;
  touch-action: manipulation;
  display: inline-flex;
  align-items: center;
  justify-content: center;

  color: var(--fg);
  -webkit-tap-highlight-color: transparent;

  transition: transform .12s ease, opacity .12s ease;
}

.cs-socials a:hover{
  transform: translateY(-1px);
  opacity: .8;
}

.cs-socials svg{
  width: clamp(20px, 6vw, 28px);
  height: clamp(20px, 6vw, 28px);
  fill: currentColor;
}

.cs-footer-label{
  display: block;
  color: var(--muted);

  font-size: 12px;      /* меньше */
  line-height: 1;       /* более сбитый */
  letter-spacing: .02em;/* меньше разрядка */
  font-weight: 600;
  text-transform: uppercase;
}

/* Очень низкая высота (ландшафт на телефоне) — ужимаем логотип */
@media (max-height: 520px){
  .cs-logo img{ max-height: 34svh; }
  .cs-main{
    padding: 10px;
    padding-top: calc(10px + env(safe-area-inset-top));
  }
  .cs-footer{
    padding-top: 10px;
    padding-bottom: calc(14px + env(safe-area-inset-bottom));
  }
}

/* Сверхмалые экраны — чуть меньше ширина логотипа */
@media (max-width: 360px){
  .cs-logo img{ max-width: 86vw; }
}

/* ===== Анимация подписи под логотипом ===== */

.cs-logo-inner{
  display: inline-block;
  outline: none;
}

.cs-logo-inner:focus-visible{
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: 8px;
  border-radius: 16px;
}

/* Маска: текст прячем "за" логотипом */
.cs-logo-mask{
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  padding-bottom: 0;
}

/* Лого */
.cs-logo-mask img{
  display: block;
}

/* Подпись */
.cs-tagline{
  margin-top: 8px;

  color: var(--muted);
  font-weight: 700;
  letter-spacing: .10em;
  text-transform: uppercase;
  font-size: clamp(12px, 1.6vw, 16px);
  text-shadow: 0 2px 14px rgba(0,0,0,.55);

  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;

  transform: translateY(-120%);
  opacity: 0;
  transition: transform .22s ease, opacity .22s ease;
  will-change: transform, opacity;
}

/* Показ по hover/focus — только устройства с мышью */
@media (hover: hover) and (pointer: fine){
  .cs-logo-inner:hover .cs-tagline,
  .cs-logo-inner:focus-visible .cs-tagline{
    transform: translateY(0);
    opacity: 1;
  }
}

/* Показ по тапу — классом (мобилки) */
.cs-logo-inner.is-tagline-open .cs-tagline{
  transform: translateY(0);
  opacity: 1;
}

/* Уважение настройки "без анимаций" */
@media (prefers-reduced-motion: reduce){
  .cs-socials a{ transition: none; }
  .cs-socials a:hover{ transform: none; }
  .cs-tagline{ transition: none; }
}

/* ===== Off-canvas меню ===== */

.cs-menu-btn{
  position: fixed;
  left: 14px;
  top: 14px;
  z-index: 10010;

  width: 46px;
  height: 46px;

  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.06);
  color: var(--fg);
  backdrop-filter: blur(6px);

  display: inline-flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
  padding: 0 12px;

  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.cs-menu-btn span{
  display: block;
  height: 2px;
  width: 100%;
  background: currentColor;
  border-radius: 2px;
  opacity: .9;
  transition: transform .18s ease, opacity .18s ease;
}

/* Чтоб кнопка не залезала под admin-bar */
.admin-bar .cs-menu-btn{ top: calc(14px + 32px); }
@media (max-width: 782px){
  .admin-bar .cs-menu-btn{ top: calc(14px + 46px); }
}

/* overlay */
.cs-menu-overlay{
  position: fixed;
  inset: 0;
  z-index: 10000;
  background: rgba(0,0,0,.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}

/* drawer */
.cs-menu-drawer{
  position: fixed;
  top: 0;
  left: 0;
  height: 100dvh;
  width: min(86vw, 360px);
  z-index: 10020;

  background: rgba(18,18,18,.92);
  border-right: 1px solid rgba(255,255,255,.12);
  backdrop-filter: blur(10px);

  transform: translateX(-102%);
  transition: transform .22s ease;

  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;

  outline: none;
}

.cs-menu-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.cs-menu-title{
  color: var(--fg);
  font-weight: 800;
  letter-spacing: .04em;
}

.cs-menu-close{
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  color: var(--fg);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.cs-menu-head--right{
  justify-content: flex-end;
}

.cs-menu-nav{
  overflow: auto;
  padding-right: 4px; /* чтобы скроллбар не резал */
}

.cs-menu-list{
  list-style: none;
  margin: 0;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cs-menu-list a{
  display: block;
  padding: 12px 12px;
  border-radius: 12px;
  text-decoration: none;
  color: rgba(255,255,255,.88);
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
}

.cs-menu-list a:hover{
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.16);
}

/* открыто */
body.cs-menu-open .cs-menu-overlay{
  opacity: 1;
  pointer-events: auto;
}

body.cs-menu-open .cs-menu-drawer{
  transform: translateX(0);
}

/* блокируем прокрутку страницы, пока меню открыто */
body.cs-menu-open{
  overflow: hidden;
}

/* уважение к отключенным анимациям */
@media (prefers-reduced-motion: reduce){
  .cs-menu-overlay, .cs-menu-drawer, .cs-menu-btn span{
    transition: none !important;
  }
}

/* ===== Контентные страницы (page/single/search/404) ===== */

.cs-main--content{
  align-items: flex-start;
  justify-content: flex-start;
  text-align: left;
  padding-top: calc(clamp(16px, 3vw, 28px) + env(safe-area-inset-top) + 42px);
}

.cs-container{
  width: min(960px, 92vw);
  margin: 0 auto;
}

.cs-article-header{
  margin-bottom: 16px;
}

.cs-article-title{
  margin: 0 0 10px;
  font-size: clamp(26px, 3vw, 38px);
  line-height: 1.15;
  letter-spacing: .01em;
}

.cs-meta{
  color: var(--muted);
  font-size: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cs-meta a{ color: var(--muted); text-decoration: none; }
.cs-meta a:hover{ color: var(--fg); }

.cs-featured img{
  width: 100%;
  height: auto;
  border-radius: 18px;
  display: block;
  margin: 0 0 18px;
}

.cs-entry{
  color: rgba(255,255,255,.88);
  line-height: 1.75;
  font-size: 16px;
}
.cs-entry p{ margin: 0 0 14px; }
.cs-entry h2, .cs-entry h3{
  margin: 22px 0 10px;
  line-height: 1.2;
}
.cs-entry a{
  color: var(--fg);
  text-decoration: underline;
  text-decoration-color: rgba(255,255,255,.35);
}
.cs-entry a:hover{
  text-decoration-color: rgba(255,255,255,.8);
}

.cs-tags{
  margin-top: 18px;
  color: var(--muted);
}
.cs-tags a{ color: var(--muted); text-decoration: none; }
.cs-tags a:hover{ color: var(--fg); }

.cs-post-nav{
  margin-top: 26px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.10);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.cs-post-nav a{
  color: rgba(255,255,255,.88);
  text-decoration: none;
}
.cs-post-nav a:hover{ color: var(--fg); }

.cs-lead{
  color: var(--muted);
  margin: 0 0 14px;
}

.cs-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255,255,255,.10);
  border: 1px solid rgba(255,255,255,.14);
  color: var(--fg);
  text-decoration: none;
}
.cs-btn:hover{
  background: rgba(255,255,255,.14);
  border-color: rgba(255,255,255,.20);
}

.cs-list{
  display: grid;
  gap: 12px;
  margin-top: 14px;
}

.cs-card{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 14px 16px;
}
.cs-card-title{
  margin: 0 0 8px;
  font-size: 18px;
}
.cs-card-title a{
  color: var(--fg);
  text-decoration: none;
}
.cs-card-title a:hover{ text-decoration: underline; }
.cs-card-excerpt{
  color: var(--muted);
}

.cs-pagination{
  margin-top: 18px;
}
.cs-pagination .page-numbers{
  display: inline-block;
  margin-right: 6px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12);
  color: var(--muted);
  text-decoration: none;
}
.cs-pagination .page-numbers.current{
  color: var(--fg);
  border-color: rgba(255,255,255,.22);
}

/* ===== Комментарии ===== */

.cs-comments{
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,.10);
}

.cs-comments-title{
  margin: 0 0 14px;
  font-size: 18px;
  color: var(--fg);
}

.cs-comment-list{
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.cs-comment-list .comment{
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  padding: 14px 16px;
}

.cs-comment-list .comment .comment-body{
  margin: 0;
}

.cs-comment-list .comment .comment-meta{
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 13px;
}

.cs-comment-list .comment .comment-meta a{
  color: var(--muted);
  text-decoration: none;
}
.cs-comment-list .comment .comment-meta a:hover{ color: var(--fg); }

.cs-comment-list .comment .avatar{
  border-radius: 999px;
}

.cs-comment-list .comment .comment-content{
  color: rgba(255,255,255,.88);
  line-height: 1.65;
}

.cs-comment-list .comment .reply a{
  display: inline-block;
  margin-top: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.12);
  color: var(--fg);
  text-decoration: none;
  font-size: 13px;
}
.cs-comment-list .comment .reply a:hover{
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.18);
}

.cs-comments-nav{
  display: flex;
  justify-content: space-between;
  margin-top: 12px;
}
.cs-comments-nav a{
  color: var(--muted);
  text-decoration: none;
}
.cs-comments-nav a:hover{ color: var(--fg); }

.cs-comments-closed{
  color: var(--muted);
  margin-top: 12px;
}

/* Форма */
.cs-reply-title{
  margin: 22px 0 10px;
  font-size: 18px;
}

.cs-comment-notes{
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 13px;
}

.cs-comment-form p{
  margin: 0 0 12px;
}

.cs-comment-form label{
  display: block;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 13px;
}

.cs-comment-form input[type="text"],
.cs-comment-form input[type="email"],
.cs-comment-form input[type="url"],
.cs-comment-form textarea{
  width: 100%;
  background: rgba(255,255,255,.04);
  color: var(--fg);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 12px;
  box-sizing: border-box;
}

.cs-comment-form textarea{
  resize: vertical;
  min-height: 120px;
}

.cs-comment-form input:focus,
.cs-comment-form textarea:focus{
  border-color: rgba(255,255,255,.22);
  outline: 2px solid rgba(255,255,255,.25);
  outline-offset: 1px;
}

.cs-comment-form .required{
  color: rgba(255,255,255,.75);
}

.cs-comment-form .form-submit{
  margin-top: 6px;
}

.cs-comment-form .submit{
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  min-height: 42px;
  background: #fff;
  color: #0b0b0b;
  font-weight: 700;
  cursor: pointer;
}

.cs-comment-form .submit:hover{
  background: rgba(255,255,255,.88);
}

/* ===== Поисковая форма ===== */

.cs-searchform{
  display: flex;
  gap: 10px;
  align-items: center;
  width: 100%;
  max-width: 560px;
}

.cs-searchform__input{
  flex: 1;
  background: rgba(255,255,255,.04);
  color: var(--fg);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 12px;
  padding: 10px 12px;
  min-height: 42px;
  box-sizing: border-box;
}

.cs-searchform__input::placeholder{
  color: rgba(255,255,255,.45);
}

.cs-searchform__input:focus{
  border-color: rgba(255,255,255,.22);
  outline: 2px solid rgba(255,255,255,.25);
  outline-offset: 1px;
}

.cs-searchform__btn{
  appearance: none;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  min-height: 42px;
  background: #fff;
  color: #0b0b0b;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.cs-searchform__btn:hover{
  background: rgba(255,255,255,.88);
}

@media (max-width: 520px){
  .cs-searchform{
    flex-direction: column;
    align-items: stretch;
  }
}

/* Theme toggle button (справа сверху) */
.cs-theme-toggle{
  position: fixed;
  top: 16px;
  right: 16px;
  z-index: 9999;

  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--fg);

  display: inline-flex;
  align-items: center;
  justify-content: center;

  border-radius: 12px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;

  transition: transform .12s ease, opacity .12s ease;
}

.cs-theme-toggle:hover{ transform: translateY(-1px); opacity: .9; }

.cs-theme-toggle:focus-visible{
  outline: 2px solid rgba(255,255,255,.35);
  outline-offset: 3px;
}

html[data-theme="light"] .cs-theme-toggle:focus-visible{
  outline-color: rgba(0,0,0,.35);
}

.cs-theme-toggle svg{
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* показываем нужную иконку */
.cs-icon--sun{ display: none; }
html[data-theme="light"] .cs-icon--sun{ display: inline; }
html[data-theme="light"] .cs-icon--moon{ display: none; }

/* если на телефонах нужно чуть ближе к краю */
@media (max-width: 480px){
  .cs-theme-toggle{ top: 12px; right: 12px; }
}

/* --- Admin bar: чтобы фикс-кнопки не прятались --- */
.cs-theme-toggle{
  z-index: 100001; /* выше wpadminbar (обычно 99999) */
}

/* Сдвигаем кнопку вниз, когда есть админбар */
body.admin-bar .cs-theme-toggle{
  top: calc(16px + 32px);
}

/* На мобилках админбар выше */
@media (max-width: 782px){
  body.admin-bar .cs-theme-toggle{
    top: calc(16px + 46px);
  }
}

.cs-menu-btn{ z-index: 100001; }

body.admin-bar .cs-menu-btn{
  top: calc(16px + 32px);
}
@media (max-width: 782px){
  body.admin-bar .cs-menu-btn{
    top: calc(16px + 46px);
  }
}
