/*
Theme Name: WEWIN WORLD
Theme URI: https://wewinworld.ru
Author: WEWIN
Description: Корпоративная тема WEWIN WORLD — Практические инженерные сессии.
Version: 1.0.0
Text Domain: wewin
License: All rights reserved
*/
:root {
  --radius: 0.875rem;
  --brand-dark: oklch(0.36 0.07 155);
  --brand-accent: oklch(0.74 0.19 140);
  --brand-ink: oklch(0.22 0.03 155);
  --brand-surface: oklch(0.975 0.005 150);
}

html { scroll-behavior: smooth; }

h1, h2, h3, .font-display {
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: -0.02em;
}

.container-x {
  width: 100%;
  max-width: 1240px;
  margin-inline: auto;
  padding-inline: 1.25rem;
}
@media (min-width: 768px) {
  .container-x { padding-inline: 2rem; }
}

.shadow-soft {
  box-shadow: 0 1px 2px oklch(0.2 0.03 155 / 0.04),
              0 8px 24px oklch(0.2 0.03 155 / 0.06);
}
.shadow-elevated {
  box-shadow: 0 2px 4px oklch(0.2 0.03 155 / 0.06),
              0 20px 40px -12px oklch(0.2 0.03 155 / 0.12);
}

.reveal {
  opacity: 0;
  transform: translateY(24px);
}
.reveal.revealed {
  animation: reveal-in 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.reveal-img {
  opacity: 0;
  transform: scale(1.06);
}
.reveal-img.revealed {
  animation: reveal-img-in 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes reveal-in {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes reveal-img-in {
  from { opacity: 0; transform: scale(1.06); }
  to   { opacity: 1; transform: scale(1); }
}

.hover-zoom { overflow: hidden; }
.hover-zoom img {
  transition: transform 1.4s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-zoom:hover img { transform: scale(1.04); }

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
.marquee-track {
  animation: marquee 50s linear infinite;
}

.site-header--internal {
  background-color: oklch(0.18 0.04 155);
}

.entry-content p { margin-bottom: 1.25em; }
.entry-content h2 { margin-top: 2em; margin-bottom: 0.5em; }
.entry-content h3 { margin-top: 1.5em; margin-bottom: 0.5em; }
.entry-content ul, .entry-content ol { padding-left: 1.5em; margin-bottom: 1.25em; }
.entry-content img { max-width: 100%; height: auto; border-radius: 0.75rem; }
.entry-content a { color: var(--brand-accent); text-decoration: underline; }
.entry-content blockquote {
  border-left: 3px solid var(--brand-accent);
  padding-left: 1.25rem;
  margin: 1.5em 0;
  font-style: italic;
  color: oklch(0.5 0.015 155);
}

.pagination a,
.pagination span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  padding: 0 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.2s;
}
.pagination a {
  border: 1px solid oklch(0.92 0.008 155);
  color: oklch(0.36 0.07 155);
}
.pagination a:hover {
  border-color: var(--brand-accent);
  color: var(--brand-accent);
}
.pagination .current {
  background-color: oklch(0.36 0.07 155);
  color: white;
}

.wewin-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s ease;
}
.wewin-modal.is-open {
  pointer-events: auto;
  opacity: 1;
}
.wewin-modal__overlay {
  position: absolute;
  inset: 0;
  background: oklch(0.15 0.04 155 / 0.7);
  backdrop-filter: blur(4px);
}
.wewin-modal__dialog {
  position: relative;
  background: white;
  border-radius: 1.5rem;
  padding: 2.5rem;
  max-width: 560px;
  width: 92%;
  max-height: 90vh;
  overflow-y: auto;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 24px 80px oklch(0.15 0.04 155 / 0.25);
}
.wewin-modal.is-open .wewin-modal__dialog {
  transform: translateY(0) scale(1);
}
.wewin-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  cursor: pointer;
  color: oklch(0.5 0.015 155);
  transition: color 0.2s;
  padding: 0.25rem;
}
.wewin-modal__close:hover { color: oklch(0.22 0.03 155); }
.wewin-modal__title {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.75rem;
  font-weight: 700;
  color: oklch(0.36 0.07 155);
  margin: 0 0 0.5rem;
  text-align: center;
}
.wewin-modal__desc {
  color: oklch(0.5 0.015 155);
  font-size: 0.9375rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
  text-align: center;
}
.wewin-modal__field {
  margin-bottom: 1rem;
  flex: 1;
}
.wewin-modal__field label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: oklch(0.36 0.07 155);
  margin-bottom: 0.375rem;
}
.wewin-modal__field input,
.wewin-modal__field textarea {
  width: 100%;
  padding: 0.75rem 1rem;
  border: 1px solid oklch(0.92 0.008 155);
  border-radius: 0.75rem;
  font-size: 0.9375rem;
  font-family: inherit;
  color: oklch(0.22 0.03 155);
  background: oklch(0.975 0.005 150);
  transition: border-color 0.2s;
  outline: none;
  box-sizing: border-box;
}
.wewin-modal__field input:focus,
.wewin-modal__field textarea:focus {
  border-color: oklch(0.74 0.19 140);
}
.wewin-modal__field input:invalid:not(:placeholder-shown),
.wewin-modal__field textarea:invalid:not(:placeholder-shown) {
  border-color: oklch(0.6 0.2 25);
}
.wewin-modal__row {
  display: flex;
  gap: 1rem;
}
@media (max-width: 520px) {
  .wewin-modal__row { flex-direction: column; gap: 0; }
  .wewin-modal__dialog { padding: 1.5rem; }
}
.wewin-modal__submit {
  display: block;
  width: 100%;
  margin: 1.25rem auto 0;
  padding: 1rem;
  background: oklch(0.74 0.19 140);
  color: oklch(0.18 0.04 155);
  border: none;
  border-radius: 62.5rem;
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.2s;
  text-align: center;
}
.wewin-modal__submit:hover { filter: brightness(0.95); }
.wewin-modal__submit:disabled { opacity: 0.6; cursor: not-allowed; }
.wewin-modal__error {
  margin-top: 0.75rem;
  padding: 0.75rem 1rem;
  background: oklch(0.95 0.05 25);
  color: oklch(0.45 0.15 25);
  border-radius: 0.75rem;
  font-size: 0.875rem;
  text-align: center;
}
.wewin-modal__success {
  text-align: center;
  padding: 2rem 0;
}
.wewin-modal__success-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 5rem;
  height: 5rem;
  border-radius: 50%;
  background: oklch(0.96 0.03 140);
  color: oklch(0.36 0.07 155);
  margin-bottom: 1.5rem;
}
.wewin-modal__success-text {
  font-family: "Playfair Display", Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: oklch(0.36 0.07 155);
  line-height: 1.5;
  max-width: 28ch;
  margin: 0 auto;
}
