/*
Theme Name: Grand Aevein
Theme URI: https://aevein.ru
Author: Елизавета Красильникова
Description: Портфолио-тема «Grand Aevein» — дом с комнатами: вестибюль, коридор, мастерская текстов, гардеробная, витрина, галерея работ и приёмная.
Version: 1.0
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: grand-aevein
Tags: portfolio, blog, editorial
*/

/* ==========================================================================
   1. База
   ========================================================================== */

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: #FBF8F8;
  color: #1C1418;
  font-family: 'Spectral', Georgia, serif;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: #E7B6C2; color: #1C1418; }

a { color: inherit; }

img { max-width: 100%; height: auto; }

/* Доступность: видимый фокус для клавиатуры */
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid #A81F3B;
  outline-offset: 3px;
}

/* Скрыто визуально, доступно скринридерам */
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(1px, 1px, 1px, 1px);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   2. Анимации
   ========================================================================== */

@keyframes swaylamp {
  0%, 100% { transform: rotate(-1.1deg); }
  50%      { transform: rotate(1.1deg); }
}

@keyframes flicker {
  0%, 100% { opacity: 0.92; }
  45%      { opacity: 0.7; }
  70%      { opacity: 1; }
}

@keyframes driftfog {
  from { transform: translateX(-6%); }
  to   { transform: translateX(106%); }
}

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

/* ==========================================================================
   3. Ховеры (перенесены из макета)
   ========================================================================== */

.ga-h1:hover  { color: #A81F3B; }
.ga-h2:hover  { color: #C9788C; }
.ga-h3:hover  { transform: translateY(-4px); filter: drop-shadow(0 12px 24px rgba(168,31,59,0.4)); }
.ga-h4:hover  { background: #A81F3B; transform: translateY(-2px); }
.ga-h5:hover  { transform: translateY(-4px); }
.ga-h6:hover  { background: #A81F3B; }
.ga-h7:hover  { background: #FBF8F8; }
.ga-h8:hover  { transform: translateY(-8px); filter: drop-shadow(0 16px 28px rgba(28,20,24,0.34)); }
.ga-h9:hover  { color: #1C1418; border-color: #1C1418; }
.ga-h10:hover { background: #FBF8F8; transform: translateY(-2px); }
.ga-h11:hover { background: rgba(231,182,194,0.16); }
.ga-h12:hover { transform: translateY(-5px); }
.ga-h13:hover { background: #F3E3E6; }

/* Активный пункт меню */
.ga-nav-current { color: #A81F3B !important; }

/* ==========================================================================
   4. Заглушка изображения (когда картинка ещё не загружена)
   ========================================================================== */

.ga-slot {
  width: 100%;
  height: 100%;
  background: #EBD9DD;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  text-align: center;
  font-family: 'Manrope', sans-serif;
  font-size: 11px;
  line-height: 1.45;
  letter-spacing: 0.04em;
  color: #9A7F86;
}

.ga-slot img,
img.ga-slot-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ==========================================================================
   5. Текст статьи (то, что ты пишешь в редакторе WordPress)
   ========================================================================== */

.ga-content {
  font-family: 'Spectral', Georgia, serif;
  font-size: clamp(17px, 2.1vw, 19px);
  line-height: 1.85;
  color: #3E3237;
}

.ga-content > *:first-child { margin-top: 0; }

.ga-content p { margin: 0 0 26px; }

/* Буквица у первого абзаца — как в макете */
.ga-content > p:first-of-type::first-letter {
  float: left;
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 800;
  font-size: 86px;
  line-height: 0.72;
  padding: 8px 14px 0 0;
  color: #A81F3B;
}

.ga-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(28px, 4vw, 40px);
  line-height: 1.1;
  margin: 48px 0 18px;
  color: #1C1418;
}

.ga-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-weight: 700;
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.15;
  margin: 38px 0 14px;
  color: #1C1418;
}

.ga-content h4 {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  margin: 34px 0 12px;
  color: #A81F3B;
}

.ga-content a {
  color: #A81F3B;
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 31, 59, 0.4);
  transition: border-color .2s;
}

.ga-content a:hover { border-color: #A81F3B; }

.ga-content blockquote {
  margin: 40px 0;
  padding: 6px 0 6px 26px;
  border-left: 3px solid #A81F3B;
}

.ga-content blockquote p {
  font-family: 'Playfair Display', Georgia, serif;
  font-style: italic;
  font-weight: 500;
  font-size: clamp(22px, 3.4vw, 30px);
  line-height: 1.32;
  color: #A81F3B;
  margin: 0;
}

.ga-content ul,
.ga-content ol { margin: 0 0 26px; padding-left: 24px; }

.ga-content li { margin-bottom: 10px; }

.ga-content figure { margin: 40px 0; }

.ga-content img { display: block; border: 2px solid #1C1418; }

.ga-content figcaption {
  font-family: 'Manrope', sans-serif;
  font-weight: 500;
  font-size: 11px;
  color: #9A7F86;
  margin-top: 10px;
  text-align: center;
}

.ga-content hr {
  border: none;
  height: 1px;
  background: #1C1418;
  opacity: 0.25;
  margin: 44px 0;
}

.ga-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 26px;
  font-size: 16px;
}

.ga-content th,
.ga-content td {
  border: 1px solid rgba(28, 20, 24, 0.3);
  padding: 10px 12px;
  text-align: left;
}

.ga-content th { background: #F3E3E6; font-family: 'Manrope', sans-serif; }

/* ==========================================================================
   6. Постраничная навигация
   ========================================================================== */

.ga-pagination,
.navigation.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin-top: clamp(36px, 5vw, 60px);
  font-family: 'Manrope', sans-serif;
  font-weight: 600;
  font-size: 12px;
  letter-spacing: 0.08em;
}

.ga-pagination .page-numbers,
.navigation.pagination .page-numbers {
  display: inline-block;
  padding: 10px 16px;
  border: 1px solid #1C1418;
  color: #1C1418;
  text-decoration: none;
  transition: background .2s, color .2s;
}

.ga-pagination .page-numbers:hover,
.navigation.pagination .page-numbers:hover { background: #F3E3E6; }

.ga-pagination .page-numbers.current,
.navigation.pagination .page-numbers.current {
  background: #1C1418;
  color: #FBF8F8;
}

/* ==========================================================================
   7. Комментарии (минимально, в стиле дома)
   ========================================================================== */

.ga-comments {
  max-width: 720px;
  margin: clamp(48px, 7vw, 80px) auto 0;
  padding: 0 clamp(20px, 5vw, 32px);
  font-family: 'Spectral', Georgia, serif;
}

.ga-comments h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 26px;
  margin: 0 0 20px;
}

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

.ga-comments li { border-top: 1px solid rgba(28, 20, 24, 0.2); padding: 18px 0; }

.ga-comments input[type="text"],
.ga-comments input[type="email"],
.ga-comments input[type="url"],
.ga-comments textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid #1C1418;
  background: #FBF8F8;
  font-family: 'Manrope', sans-serif;
  font-size: 15px;
  margin-bottom: 12px;
}

.ga-comments .submit {
  font-family: 'Cinzel', Georgia, serif;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 13px 26px;
  color: #FBF8F8;
  background: #1C1418;
  border: none;
  cursor: pointer;
  transition: background .25s;
}

.ga-comments .submit:hover { background: #A81F3B; }
