/*
Theme Name: DQIRS Premium
Theme URI: https://dqirs.ru/
Author: DQIRS
Author URI: https://amakarenkov.ru/
Description: Премиальная двуязычная WordPress-тема для Diligentia Quam in Rebus Suis. Индексируемая RU/EN-страница с hreflang, canonical, структурированными данными и чистой legal-luxury эстетикой.
Version: 1.2.1
Requires at least: 6.0
Requires PHP: 7.4
Tested up to: 7.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: dqirs
Domain Path: /languages
*/

:root {
  color-scheme: dark;
  --bg: #05060b;
  --bg-2: #090a12;
  --ink: #f4f0e8;
  --muted: #b9b2ce;
  --soft: rgba(244, 240, 232, .76);
  --line: rgba(167, 142, 255, .28);
  --line-strong: rgba(167, 142, 255, .52);
  --violet: #8b72ff;
  --violet-2: #5b4cff;
  --blue: #5a78ff;
  --gold: #d8c18a;
  --gold-2: #f2e4b8;
  --glass: rgba(16, 17, 31, .68);
  --glass-2: rgba(14, 15, 28, .84);
  --shadow: 0 30px 90px rgba(0, 0, 0, .48);
  --radius: 28px;
  --max: 1180px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body::selection {
  background: rgba(216, 193, 138, .28);
  color: #fff;
}

h1, h2, p, a { overflow-wrap: break-word; }

a {
  color: #aaa0ff;
  text-decoration: none;
  transition: color .25s ease, opacity .25s ease;
}

a:hover,
a:focus-visible { color: var(--gold-2); }

.skip-link {
  position: fixed;
  left: 16px;
  top: 16px;
  z-index: 50;
  padding: 10px 14px;
  border-radius: 999px;
  background: #fff;
  color: #090a12;
  transform: translateY(-140%);
  transition: transform .2s ease;
}

.skip-link:focus { transform: translateY(0); }

.language-switch {
  position: fixed;
  top: 18px;
  right: 18px;
  z-index: 20;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border: 1px solid rgba(167, 142, 255, .28);
  border-radius: 999px;
  background: rgba(8, 9, 18, .62);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .28), inset 0 0 0 1px rgba(255, 255, 255, .035);
  -webkit-backdrop-filter: blur(16px) saturate(128%);
  backdrop-filter: blur(16px) saturate(128%);
  color: rgba(244, 240, 232, .46);
  font-size: 12px;
  line-height: 1;
  letter-spacing: .12em;
  text-transform: uppercase;
}

body.admin-bar .language-switch { top: 50px; }

.language-switch a {
  color: rgba(244, 240, 232, .64);
  font-weight: 700;
}

.language-switch a:hover,
.language-switch a:focus-visible,
.language-switch a.is-active {
  color: var(--gold-2);
}

.language-switch a.is-active {
  text-shadow: 0 0 18px rgba(216, 193, 138, .42);
}

@supports not ((backdrop-filter: blur(16px)) or (-webkit-backdrop-filter: blur(16px))) {
  .language-switch { background: rgba(8, 9, 18, .92); }
}

.dqirs-bg {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 12%, rgba(111, 92, 255, .35), transparent 34%),
    radial-gradient(circle at 50% 62%, rgba(70, 80, 255, .23), transparent 36%),
    linear-gradient(180deg, #05060b 0%, #080914 43%, #05060b 100%);
}

.dqirs-bg::before,
.dqirs-bg::after {
  content: "";
  position: absolute;
  pointer-events: none;
}

.dqirs-bg::before {
  inset: 0;
  background:
    linear-gradient(rgba(255,255,255,.027) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.022) 1px, transparent 1px);
  background-size: 80px 80px;
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 0, transparent 68%);
  mask-image: radial-gradient(circle at 50% 42%, #000 0, transparent 68%);
  opacity: .42;
}

.dqirs-bg::after {
  left: 50%;
  top: -8vh;
  width: 1px;
  height: 58vh;
  background: linear-gradient(180deg, rgba(255,255,255,0), rgba(165,150,255,.86), rgba(255,255,255,0));
  box-shadow: 0 0 34px rgba(139,114,255,.95), 0 0 90px rgba(92,77,255,.55);
  transform: translateX(-50%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  opacity: .76;
  animation: dqirs-float 12s ease-in-out infinite;
}

.orb-one {
  width: 56vw;
  height: 56vw;
  left: -26vw;
  bottom: -28vw;
  border: 1px solid rgba(139,114,255,.34);
  box-shadow: inset 0 0 90px rgba(80,68,235,.25), 0 0 90px rgba(80,68,235,.18);
}

.orb-two {
  width: 48vw;
  height: 48vw;
  right: -22vw;
  bottom: -22vw;
  border: 1px solid rgba(139,114,255,.32);
  box-shadow: inset 0 0 80px rgba(80,68,235,.2), 0 0 80px rgba(80,68,235,.14);
  animation-delay: -4s;
}

.orb-three {
  width: 12vw;
  height: 12vw;
  left: 50%;
  top: 7vh;
  transform: translateX(-50%);
  background: radial-gradient(circle, rgba(216,193,138,.16), transparent 68%);
  box-shadow: 0 0 80px rgba(216,193,138,.16);
  animation-delay: -7s;
}

.horizon {
  position: absolute;
  left: 5vw;
  right: 5vw;
  top: 64%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139,114,255,.74), rgba(216,193,138,.34), rgba(139,114,255,.74), transparent);
  box-shadow: 0 0 28px rgba(139,114,255,.8);
}

.stage {
  width: min(1320px, calc(100% - 32px));
  min-height: calc(100vh - 106px);
  min-height: calc(100svh - 106px);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 78px) 0 clamp(28px, 4vw, 54px);
  display: grid;
  place-items: center;
}

@supports (height: 100dvh) {
  .stage { min-height: calc(100dvh - 106px); }
}

body.admin-bar .stage {
  min-height: calc(100vh - 138px);
  min-height: calc(100svh - 138px);
}

@supports (height: 100dvh) {
  body.admin-bar .stage { min-height: calc(100dvh - 138px); }
}

@media screen and (max-width: 782px) {
  body.admin-bar .stage {
    min-height: calc(100vh - 152px);
    min-height: calc(100svh - 152px);
  }

  @supports (height: 100dvh) {
    body.admin-bar .stage { min-height: calc(100dvh - 152px); }
  }
}

.hero {
  width: min(var(--max), 100%);
  text-align: center;
}

.crest {
  width: 60px;
  height: 60px;
  margin: 0 auto 24px;
  display: grid;
  place-items: center;
  opacity: .92;
  filter: drop-shadow(0 0 24px rgba(139, 114, 255, .85));
}

.crest img {
  width: 100%;
  height: 100%;
}


h1, .entry-title {
  max-width: min(100%, 1280px);
  margin: 0 auto;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(46px, 7.4vw, 112px);
  line-height: .92;
  letter-spacing: -.058em;
  font-weight: 500;
  color: #fff;
  text-wrap: balance;
  overflow-wrap: normal;
  text-shadow:
    0 1px 0 rgba(255,255,255,.55),
    0 18px 60px rgba(139, 114, 255, .42),
    0 2px 18px rgba(0,0,0,.45);
}

.hero-title {
  display: block;
}

.subtitle {
  margin: clamp(20px, 3vw, 28px) auto 0;
  max-width: min(100%, 1120px);
  color: rgba(218, 213, 255, .92);
  font-size: clamp(17px, 1.55vw, 23px);
  line-height: 1.42;
  text-wrap: balance;
  text-shadow: 0 0 34px rgba(139, 114, 255, .55);
}

@media (min-width: 1280px) {
  .hero {
    width: min(1420px, 100%);
  }

  .hero-title {
    max-width: none;
    white-space: nowrap;
    font-size: clamp(68px, 5.35vw, 90px);
    line-height: .96;
    letter-spacing: -.056em;
  }

  .subtitle {
    white-space: nowrap;
  }
}

.cards {
  margin: clamp(52px, 7vw, 78px) auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(22px, 3vw, 36px);
  text-align: left;
}

.card {
  position: relative;
  min-height: 296px;
  padding: clamp(28px, 4vw, 38px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, .055), transparent 34%),
    linear-gradient(180deg, var(--glass), var(--glass-2));
  box-shadow: var(--shadow), inset 0 0 0 1px rgba(255,255,255,.035);
  overflow: hidden;
  transform: translateZ(0);
}

@supports ((backdrop-filter: blur(20px)) or (-webkit-backdrop-filter: blur(20px))) {
  .card {
    background:
      linear-gradient(135deg, rgba(255, 255, 255, .055), transparent 34%),
      linear-gradient(180deg, rgba(16, 17, 31, .68), rgba(14, 15, 28, .84));
    -webkit-backdrop-filter: blur(20px) saturate(132%);
    backdrop-filter: blur(20px) saturate(132%);
  }
}

.card::before {
  content: "";
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(216, 193, 138, .56), rgba(139,114,255,.62), transparent 58%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  mask-composite: exclude;
  opacity: .6;
  pointer-events: none;
}

.card::after {
  content: "";
  position: absolute;
  inset: auto 8% -40% 8%;
  height: 72%;
  background: radial-gradient(circle, rgba(139,114,255,.22), transparent 72%);
  pointer-events: none;
}

.card-top {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 24px;
}

.icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 18px;
  color: var(--gold-2);
  background: radial-gradient(circle at 30% 20%, rgba(255,255,255,.18), rgba(139,114,255,.24) 44%, rgba(10,10,20,.68));
  border: 1px solid rgba(167, 142, 255, .28);
  box-shadow: 0 18px 44px rgba(79, 66, 220, .28), inset 0 0 22px rgba(139,114,255,.22);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
}

h2 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(28px, 3.3vw, 40px);
  line-height: 1;
  font-weight: 500;
  color: var(--ink);
  letter-spacing: -.03em;
}

.card p {
  position: relative;
  z-index: 1;
  max-width: 600px;
  margin: 0 0 10px;
  color: var(--soft);
  font-size: clamp(16px, 1.62vw, 20px);
  line-height: 1.55;
}

.card .latin {
  margin-bottom: 14px;
  color: #bdb4ff;
  font-family: Georgia, "Times New Roman", serif;
}

.footer {
  width: min(1240px, calc(100% - 36px));
  margin: 0 auto;
  padding: 20px 0 34px;
  color: rgba(246, 242, 235, .54);
  text-align: center;
}

.footer-line {
  height: 1px;
  margin-bottom: 20px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
}

.footer p { margin: 6px 0; }

.footer a:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold-2);
  outline-offset: 5px;
  border-radius: 8px;
}


.content-page {
  width: min(920px, calc(100% - 32px));
  min-height: calc(100vh - 150px);
  min-height: calc(100svh - 150px);
  margin: 0 auto;
  padding: clamp(48px, 8vw, 92px) 0;
}

@supports (height: 100dvh) {
  .content-page { min-height: calc(100dvh - 150px); }
}

.content-page h1 {
  font-size: clamp(42px, 7vw, 76px);
  line-height: 1;
  margin-bottom: 32px;
}

.content-card {
  padding: clamp(28px, 5vw, 48px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: linear-gradient(180deg, var(--glass), var(--glass-2));
  box-shadow: var(--shadow);
}

.content-card p,
.content-card li {
  color: var(--soft);
  font-size: 18px;
  line-height: 1.65;
}

.content-card h2,
.content-card h3 {
  margin: 34px 0 14px;
}

.content-card ul { padding-left: 22px; }

@keyframes dqirs-float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -18px, 0); }
}

@media (hover: hover) {
  .card { transition: transform .35s ease, border-color .35s ease, box-shadow .35s ease; }
  .card:hover {
    transform: translateY(-6px);
    border-color: var(--line-strong);
    box-shadow: 0 42px 110px rgba(0,0,0,.54), 0 0 70px rgba(110, 90, 255, .18);
  }
}

@media (max-width: 860px) {
  .stage { min-height: auto; padding-top: 38px; }
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
}

@media (max-width: 560px) {
  .stage { padding-inline: 14px; }
  .crest { width: 46px; height: 46px; margin-bottom: 16px; }
  h1, .entry-title {
    font-size: clamp(42px, 14.4vw, 66px);
    line-height: .94;
    letter-spacing: -.052em;
  }
  .subtitle {
    max-width: 92vw;
    font-size: 17px;
    line-height: 1.45;
  }
  .cards { margin-top: 40px; }
  .card { padding: 23px; border-radius: 22px; }
  .card-top { gap: 14px; margin-bottom: 18px; }
  .icon { width: 46px; height: 46px; border-radius: 15px; }
  .card p { font-size: 16px; }
}

@media (max-width: 560px) {
  .dqirs-bg {
    background:
      radial-gradient(circle at 50% 10%, rgba(111, 92, 255, .22), transparent 36%),
      radial-gradient(circle at 50% 64%, rgba(70, 80, 255, .14), transparent 38%),
      linear-gradient(180deg, #05060b 0%, #080914 43%, #05060b 100%);
  }

  .dqirs-bg::before { opacity: .26; }
  .dqirs-bg::after {
    height: 44svh;
    box-shadow: 0 0 22px rgba(139,114,255,.58), 0 0 54px rgba(92,77,255,.34);
  }

  .orb { opacity: .42; filter: blur(16px); }
  .horizon { opacity: .66; top: 62%; }
}


@media (max-width: 782px) {
  body.admin-bar .language-switch { top: 60px; }
}

@media (max-width: 560px) {
  .language-switch {
    top: 12px;
    right: 12px;
    padding: 8px 10px;
    font-size: 11px;
  }

  body.admin-bar .language-switch { top: 58px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
  }
}
