
@font-face {
  font-family: 'Kelly Slab';
  src: url('../assets/fonts/KellySlab-Regular.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
*{margin:0;padding:0;box-sizing:border-box;}
html,body{max-width:100%;overflow-x:clip;}
body{
  background:#080d13;
  min-height:100vh;
  font-family:'PT Mono',monospace;
  color:#a0a890;
}
.bg{position:fixed;inset:0;z-index:0;background:radial-gradient(ellipse 100% 80% at 50% 20%, #0c1822 0%, #04122e 70%);} 
.bg-noise{position:fixed;inset:0;z-index:1;opacity:.45;pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.75' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size:256px;
}
.bg-vignette{position:fixed;inset:0;z-index:2;pointer-events:none;background:radial-gradient(ellipse 85% 75% at 50% 50%, transparent 30%, rgba(0,0,0,.92) 100%);} 
.bg-lines{position:fixed;inset:0;z-index:3;pointer-events:none;background:repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(0,0,0,.06) 3px, rgba(0,0,0,.06) 4px);} 

.page{
  position:relative;
  z-index:10;
  max-width:980px;
  margin:0 auto;
  padding:34px 18px 80px;
}
.back-btn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-family:'PT Mono',monospace;
  font-size:10px;
  letter-spacing:3px;
  color:rgba(80,120,160,.7);
  text-decoration:none;
  text-transform:uppercase;
  border:1px solid rgba(40,80,130,.3);
  padding:6px 14px;
  transition:all .2s ease;
  margin-bottom:24px;
}
.back-btn:hover{color:rgba(120,170,220,.9);border-color:rgba(80,140,200,.5);}

/* ── PRELOADER ── */
#preloader {
  position: fixed; inset: 0; z-index: 99999;
  background: #080d13;
  display: flex; align-items: center; justify-content: center;
  transition: opacity 0.7s ease;
}
#preloader.fade-out { opacity: 0; pointer-events: none; }
.pre-inner { text-align: center; width: 300px; }
.pre-title {
  font-family: 'PT Mono', monospace; font-size: 9px;
  letter-spacing: 5px; color: rgba(80,120,160,0.8);
  text-transform: uppercase; margin-bottom: 8px;
}
.pre-sub {
  font-family: 'PT Mono', monospace; font-size: 7px;
  letter-spacing: 2px; color: rgba(50,80,110,0.5);
  margin-bottom: 32px;
}
.pre-bar-wrap {
  width: 100%; height: 1px;
  background: rgba(40,70,120,0.2); margin-bottom: 14px;
}
.pre-bar {
  height: 100%; width: 0%;
  background: linear-gradient(90deg, rgba(30,90,180,0.6), rgba(80,160,220,1));
  box-shadow: 0 0 10px rgba(80,160,220,0.6);
  transition: width 0.12s linear;
}
.pre-pct {
  font-family: 'PT Mono', monospace; font-size: 10px;
  letter-spacing: 3px; color: rgba(70,110,150,0.7);
}

/* ── PAGE FADE-IN ── */
.page { opacity: 0; }
body.loaded .page { animation: pageFadeIn 0.9s ease 0.1s forwards; }
@keyframes pageFadeIn {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}

.page-header {
  text-align: center;
  margin-bottom: 80px;
}
.top-meta {
  font-size: 10px;
  letter-spacing: 4px;
  color: rgba(100,120,140,0.6);
  margin-bottom: 14px;
  text-transform: uppercase;
}
.title-board {
  position: relative;
  display: inline-block;
  background: linear-gradient(180deg, #151c24 0%, #0f1620 100%);
  border: 1px solid #253040;
  padding: 18px 64px;
  box-shadow:
    0 0 60px rgba(20,60,120,0.2),
    0 4px 30px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(60,100,160,0.15);
}
.title-board::before {
  content:'';
  position: absolute; inset: 4px;
  border: 1px solid rgba(40,70,120,0.2);
  pointer-events: none;
}
.page-title {
  font-family: 'Special Elite', Times, serif;
  font-size: clamp(36px, 6vw, 68px);
  letter-spacing: clamp(4px, 1.2vw, 10px);
  color: #3a9acc;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 0 40px rgba(58,154,204,0.45), 0 0 80px rgba(58,154,204,0.15);
}
.tape {
  position: absolute;
  pointer-events: none;
  overflow: hidden;
}
.tape img {
  width: 100%; height: 100%;
  object-fit: fill; display: block;
  opacity: 0.3;
  mix-blend-mode: multiply;
  filter: saturate(0.3) brightness(1.1);
}
.tape-tl { top:-14px; left:24px;  width:90px; height:26px; transform:rotate(-3deg); }
.tape-tr { top:-12px; right:28px; width:75px; height:24px; transform:rotate(2.5deg); }
.bottom-meta {
  text-align: center;
  font-size: clamp(12px, 1.4vw, 15px);
  line-height: 1.55;
  letter-spacing: 1.4px;
  color: rgba(174,198,210,0.88);
  margin: 16px auto 0;
  max-width: 520px;
  text-transform: uppercase;
  text-shadow: 0 0 18px rgba(58,154,204,0.22);
}
.bottom-meta span {
  display: block;
}
.bottom-meta span + span {
  margin-top: 4px;
}

.articles {
  display: flex;
  flex-direction: column;
  gap: 64px;
}
.article {
  position: relative;
  max-width: 860px;
  margin: 0 auto;
  width: 100%;
  min-width: 0;
}
.article-paper {
  position: relative;
  width: 100%;
  background-color: transparent;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 100% 100%;
  min-height: 620px;
  padding: 44px 52px 78px;
  box-shadow: none;
  filter: contrast(1.02);
}
.article:nth-child(6n+1) .article-paper { background-image: url('../assets/paper_1_transparent.webp'); }
.article:nth-child(6n+2) .article-paper { background-image: url('../assets/paper_2_transparent.webp'); }
.article:nth-child(6n+3) .article-paper { background-image: url('../assets/paper_3_transparent.webp'); }
.article:nth-child(6n+4) .article-paper { background-image: url('../assets/paper_4_transparent.webp'); }
.article:nth-child(6n+5) .article-paper { background-image: url('../assets/paper_5_transparent.webp'); }
.article:nth-child(6n+6) .article-paper { background-image: url('../assets/paper_6_transparent.webp'); }
.article:nth-child(1)  .article-paper { transform: rotate(-0.8deg); }
.article:nth-child(2)  .article-paper { transform: rotate(0.6deg); }
.article:nth-child(3)  .article-paper { transform: rotate(-0.4deg); }
.article:nth-child(4)  .article-paper { transform: rotate(0.9deg); }
.article:nth-child(5)  .article-paper { transform: rotate(-0.7deg); }
.article:nth-child(6)  .article-paper { transform: rotate(0.5deg); }
.article:nth-child(7)  .article-paper { transform: rotate(-0.6deg); }
.article:nth-child(8)  .article-paper { transform: rotate(0.8deg); }
.article:nth-child(9)  .article-paper { transform: rotate(-0.5deg); }
.article:nth-child(10) .article-paper { transform: rotate(0.7deg); }
.article-paper::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 200% 180% at 15% 20%, rgba(0,0,0,0.018) 0%, transparent 42%),
    radial-gradient(ellipse 180% 200% at 85% 75%, rgba(0,0,0,0.015) 0%, transparent 38%);
  pointer-events: none;
  z-index: 1;
  opacity: .55;
}
.article-paper::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle at 16% 22%, rgba(0,0,0,0.018) 0%, transparent 4%),
    radial-gradient(circle at 84% 78%, rgba(0,0,0,0.015) 0%, transparent 4%);
  pointer-events: none;
  z-index: 1;
  opacity: .35;
}
.article-content { position: relative; z-index: 2; }
.article-title {
  font-family: 'Special Elite', 'Kelly Slab', serif;
  font-size: clamp(22px, 3.2vw, 32px);
  line-height: 1.3;
  color: rgba(28,24,17,0.95);
  margin-bottom: 24px;
  text-shadow: 0 1px 0 rgba(255,255,255,0.4);
}
.article-body {
  font-family: 'PT Mono', monospace;
  font-size: clamp(14px, 1.32vw, 17px);
  line-height: 1.75;
  color: rgba(32,28,20,0.92);
  text-shadow: 0 1px 0 rgba(255,255,255,0.35);
  margin-bottom: 32px;
  overflow-wrap: break-word;
}
.article-body p { margin-bottom: 18px; }
.article-body p:last-child { margin-bottom: 0; }
.article-body .article-quote,
.article-body .article-aside {
  position: relative;
  margin: 26px 0 28px;
  padding: 17px 20px 17px 24px;
  border-left: 3px solid rgba(43,110,150,0.58);
  background:
    linear-gradient(90deg, rgba(58,154,204,0.10), rgba(58,154,204,0.03) 64%, transparent),
    rgba(255,255,255,0.11);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.28),
    0 10px 24px rgba(54,42,18,0.10);
  font-style: italic;
  color: rgba(18,24,28,0.94);
}
.article-body .article-quote::before,
.article-body .article-aside::before {
  display: block;
  margin-bottom: 8px;
  font-style: normal;
  font-size: 9px;
  line-height: 1;
  letter-spacing: 2.2px;
  color: rgba(31,88,124,0.72);
  text-transform: uppercase;
}
.article-body .article-quote::before {
  content: none;
}
.article-body .article-quote + .article-quote {
  margin-top: -22px;
  padding-top: 0;
  border-top: 0;
}
.article-body .article-quote + .article-quote::before {
  content: none;
}
.article-body .article-aside {
  border-left-color: rgba(43,110,150,0.58);
  background:
    linear-gradient(90deg, rgba(58,154,204,0.10), rgba(58,154,204,0.03) 64%, transparent),
    rgba(255,255,255,0.12);
}
.article-body .article-aside::before {
  content: none;
  color: rgba(31,88,124,0.72);
}
.hand-redact {
  display: inline-block;
  background: url('../assets/brushstroke.png') no-repeat center / 100% 100%;
  color: transparent;
  user-select: none;
  vertical-align: middle;
  height: 1.75em;
  margin: 0 2px;
  position: relative;
  bottom: 0.08em;
}
.article-media {
  display: block;
  margin: 24px auto 26px;
  padding: 8px;
  max-width: 94%;
  background: rgba(245,236,198,0.68);
  border: 1px solid rgba(78,64,34,0.24);
  box-shadow:
    0 10px 24px rgba(56,42,18,0.18),
    inset 0 0 0 1px rgba(255,255,255,0.28);
  transform: rotate(-0.35deg);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
  text-decoration: none;
}
.article-media:nth-of-type(even) { transform: rotate(0.42deg); }
.article-media:hover,
.article-media:focus-visible {
  transform: rotate(0deg) translateY(-2px);
  filter: contrast(1.03);
  box-shadow:
    0 16px 32px rgba(36,27,12,0.24),
    0 0 0 2px rgba(58,154,204,0.22),
    inset 0 0 0 1px rgba(255,255,255,0.34);
}
.article-media picture {
  display: block;
}
.article-media img {
  display: block;
  width: 100%;
  height: auto;
  max-height: min(72vh, 760px);
  object-fit: contain;
}
.article-media::after {
  content: "Нажми на фото";
  display: block;
  margin-top: 7px;
  font-family: 'PT Mono', monospace;
  font-size: 10px;
  line-height: 1.2;
  letter-spacing: 1.5px;
  color: rgba(62,52,34,0.62);
  text-align: center;
  text-transform: uppercase;
  text-decoration: none;
}
.image-viewer {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: clamp(16px, 3vw, 42px);
  background:
    radial-gradient(ellipse 80% 70% at 50% 42%, rgba(21,35,47,0.86), rgba(4,8,12,0.98) 72%),
    rgba(2,5,8,0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .2s ease, visibility .2s ease;
}
.image-viewer.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.image-viewer::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 3px, rgba(255,255,255,.025) 3px, rgba(255,255,255,.025) 4px),
    url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: auto, 220px;
  opacity: .24;
  pointer-events: none;
}
.image-viewer__frame {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: min(100%, 1180px);
  max-height: calc(100vh - clamp(32px, 6vw, 84px));
}
.image-viewer__image {
  display: block;
  max-width: 100%;
  max-height: calc(100vh - clamp(92px, 12vw, 150px));
  width: auto;
  height: auto;
  object-fit: contain;
  background: rgba(10,12,14,.62);
  border: 1px solid rgba(174,198,210,.28);
  box-shadow:
    0 26px 90px rgba(0,0,0,.72),
    0 0 0 1px rgba(255,255,255,.08);
}
.image-viewer__close {
  position: fixed;
  top: clamp(14px, 2vw, 26px);
  right: clamp(14px, 2vw, 28px);
  z-index: 2;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(80,140,200,.52);
  background: rgba(8,13,19,.82);
  color: #9dd6ee;
  font-family: 'PT Mono', monospace;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(0,0,0,.45);
  transition: border-color .18s ease, color .18s ease, transform .18s ease;
}
.image-viewer__close:hover,
.image-viewer__close:focus-visible {
  border-color: rgba(157,214,238,.9);
  color: #d8f6ff;
  transform: translateY(-1px);
  outline: none;
}
html.viewer-open,
body.viewer-open {
  overflow: hidden;
  overscroll-behavior: none;
}
body.viewer-open {
  position: fixed;
  width: 100%;
}
.image-viewer.is-open {
  touch-action: none;
}
.article-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(60,50,30,0.35) 20%, rgba(60,50,30,0.35) 80%, transparent);
  margin-bottom: 16px;
}
.article-author {
  font-family: 'PT Mono', monospace;
  font-size: 11px;
  letter-spacing: 2px;
  color: rgba(60,52,40,0.75);
  text-transform: uppercase;
  text-align: right;
}

.petal {
  position: absolute;
  pointer-events: none;
  z-index: 5;
  background: url('../assets/petals.png') no-repeat center / contain;
}

.site-footer {
  position: relative;
  z-index: 12;
  max-width: 920px;
  margin: 78px auto 0;
  padding: 0 24px 10px;
  isolation: isolate;
}
.footer-board {
  position: relative;
  background: linear-gradient(180deg,#151c24 0%,#0f1620 100%);
  border: 1px solid #253040;
  box-shadow:
    0 0 60px rgba(20,60,120,0.2),
    0 4px 30px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(60,100,160,0.15);
  padding: 28px 32px 18px;
  isolation: isolate;
}
.footer-board::before {
  content: "";
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(40,70,120,0.2);
  pointer-events: none;
}
.footer-tape { z-index: 2; }
.footer-tape img { mix-blend-mode: normal; filter: none; }
.footer-main {
  position: relative;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
}
.footer-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.footer-kicker {
  font-family: 'Oswald', sans-serif;
  font-size: 12px;
  letter-spacing: 9px;
  color: #4a6a8a;
  text-transform: uppercase;
  margin-bottom: 3px;
}
.footer-brand-name {
  display: block;
  font-family: 'Special Elite', serif;
  font-size: clamp(32px,5vw,56px);
  letter-spacing: 8px;
  color: #3a9acc;
  text-transform: uppercase;
  line-height: 1;
  text-shadow: 0 0 40px rgba(58,154,204,0.45),0 0 80px rgba(58,154,204,0.15);
}
.footer-socials {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}
.social-link {
  display: flex;
  align-items: center;
  gap: 7px;
  color: #3a9acc;
  text-decoration: none;
  transition: transform 0.2s ease, color 0.2s ease, text-shadow 0.2s ease;
}
.social-link:hover {
  transform: translateY(-2px);
  color: #3a9acc;
  text-shadow: 0 0 40px rgba(58,154,204,0.45),0 0 80px rgba(58,154,204,0.15);
}
.social-icon { width: 22px; height: 22px; }
.social-icon--max {
  width: 14px;
  height: 14px;
  transform: translateY(1px);
}
.social-icon path,
.social-icon text { fill: currentColor; }
.social-label {
  display: block;
  font-family: 'Oswald', sans-serif;
  font-size: 10px;
  letter-spacing: 4px;
  color: currentColor;
  text-transform: uppercase;
  white-space: nowrap;
}
.footer-meta {
  position: relative;
  z-index: 3;
  width: 100%;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid rgba(40,70,120,0.5);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  font-family: 'PT Mono', monospace;
  font-size: 9px;
  letter-spacing: 3px;
  color: #3d5a72;
  text-transform: uppercase;
}

@media (max-width: 980px){
  .page{width:100%; max-width:100vw; padding:16px 20px 56px;}
  .page-header { margin-bottom: 48px; }
  .top-meta { font-size: 8px; letter-spacing: 2px; }
  .bottom-meta { font-size: 11px; letter-spacing: 1px; max-width: min(300px, 100%); }
  .page,
  .articles,
  .article,
  .article-paper,
  .article-content {
    min-width: 0;
  }
  .bottom-meta,
  .article-title,
  .article-body {
    overflow-wrap: anywhere;
  }
  .title-board { padding: 12px 20px; width: 100%; }
  .page-title { font-size: clamp(30px, 8vw, 36px); letter-spacing: 2px; white-space: normal; overflow-wrap: anywhere; }
  .articles { gap: 42px; }
  .article { width: 100%; max-width: calc(100vw - 40px); }
  .article-paper { min-height: 0; max-width: 100%; padding: 28px 20px 58px; transform: none !important; }
  .article-body { margin-bottom: 24px; font-size: 13px !important; line-height: 1.65; word-break: break-word; }
  .image-viewer { padding: 14px; }
  .image-viewer__image { max-height: calc(100vh - 112px); }
  .image-viewer__close { width: 40px; height: 40px; font-size: 25px; }
  .article-author { font-size: 9px; letter-spacing: 1.5px; }
  .petal { display: none; }
  .site-footer { margin-top: 52px; padding: 0 4px; }
  .footer-board { padding: 22px 16px 14px; }
  .footer-main,
  .footer-meta {
    flex-direction: column;
    text-align: center;
  }
  .footer-main { gap: 18px; }
  .footer-copy { align-items: center; }
  .footer-brand-name { letter-spacing: 4px; }
  .footer-socials {
    justify-content: center;
    gap: 10px;
  }
}
