/*
Theme Name: Universe Cosmos
Template: pressroom
Description: Cosmic astronomy magazine skin for universetoday-rus.
Version: 1.0
*/

/* ============================================================================
   Verbatim design system from the approved mockup (utr_theme_mockup.html).
   Colours, type scale, spacing, hairlines, borders and hover states are kept
   exactly; only class names that WP markup forces are added below in the
   "WordPress additions" block — the tokens and look are unchanged.
   ========================================================================== */
:root{
  --star:#eaf0fb; --dust:#9aa6cc; --faint:#65708f;
  --gold:#f0c24d; --gold-soft:#f6d78a; --ion:#6cc0e6;
  --hair:rgba(170,186,234,.20); --hair-strong:rgba(170,186,234,.34);
  --glass:rgba(20,28,58,.52); --glass-2:rgba(30,40,78,.62);
  --maxw:1180px;
}
*{box-sizing:border-box}
html,body{margin:0}
body{
  color:var(--star);
  font-family:"Manrope",system-ui,sans-serif; font-size:17px; line-height:1.62;
  -webkit-font-smoothing:antialiased; background:#04050d;
}
/* ---- cosmic background "picture": layered nebula + starfield canvas ---- */
.space{position:fixed;inset:0;z-index:-2;
  background:
    radial-gradient(1100px 780px at 82% -6%, rgba(132,72,196,.30), transparent 60%),
    radial-gradient(900px 700px at 8% 12%, rgba(38,132,168,.22), transparent 58%),
    radial-gradient(1400px 900px at 55% 118%, rgba(196,86,120,.16), transparent 60%),
    radial-gradient(700px 900px at 50% 40%, rgba(36,52,128,.20), transparent 65%),
    #05060f;}
.space::after{content:"";position:absolute;inset:0;opacity:.5;
  background:radial-gradient(60% 120% at 68% 30%, rgba(210,224,255,.10), transparent 55%);
  transform:rotate(-18deg) scale(1.4);transform-origin:center;}
#sky{position:fixed;inset:0;z-index:-1;width:100%;height:100%;display:block}
a{color:inherit;text-decoration:none}
.wrap{max-width:var(--maxw);margin:0 auto;padding:0 28px}
.eyebrow{font-family:"Manrope",sans-serif;font-size:11.5px;font-weight:600;
  letter-spacing:.02em;text-transform:none;color:var(--gold)}
.eyebrow .tick{margin-right:.5em}

/* ---- masthead ---- */
.top{border-bottom:1px solid var(--hair);position:relative;backdrop-filter:blur(3px)}
.top::after{content:"";position:absolute;left:0;right:0;bottom:-1px;height:1px;
  background:linear-gradient(90deg,transparent,var(--gold) 32%,var(--gold) 68%,transparent);opacity:.55}
.masthead{display:flex;align-items:center;justify-content:space-between;gap:24px;padding:24px 0 16px}
.brand{font-family:"Unbounded",sans-serif;font-weight:600;font-size:clamp(24px,4.2vw,40px);
  line-height:1;letter-spacing:-.01em}
.brand small{display:block;font-family:"IBM Plex Mono",monospace;font-size:10.5px;font-weight:500;
  letter-spacing:.3em;text-transform:uppercase;color:var(--faint);margin-top:11px}
.readout{text-align:right;line-height:1.5}
.readout .rday{display:block;font-family:"Manrope";font-weight:600;font-size:14px;color:var(--gold-soft);letter-spacing:.01em}
.readout .rsky{display:block;font-family:"IBM Plex Mono",monospace;font-size:11.5px;color:var(--dust);margin-top:4px;letter-spacing:.04em}
nav{display:flex;gap:28px;flex-wrap:wrap;padding:14px 0 16px;font-size:13.5px;font-weight:500;color:var(--dust)}
nav a{position:relative;padding-bottom:4px;transition:color .2s}
nav a:hover{color:var(--star)}
nav a::after{content:"";position:absolute;left:0;bottom:0;width:0;height:1px;background:var(--gold);transition:width .22s}
nav a:hover::after{width:100%}

/* ---- hero ---- */
.hero{position:relative;margin:22px 0 6px;border:1px solid var(--hair);overflow:hidden;border-radius:2px;
  background:linear-gradient(90deg, rgba(5,7,16,.72) 0%, rgba(5,7,16,.5) 46%, transparent 100%)}
.grid-ov{position:absolute;inset:0;pointer-events:none;
  background-image:linear-gradient(var(--hair) 1px,transparent 1px),linear-gradient(90deg,var(--hair) 1px,transparent 1px);
  background-size:66px 66px;mask-image:radial-gradient(130% 96% at 74% 16%,#000 38%,transparent 80%);opacity:.55}
.hero-inner{position:relative;padding:clamp(34px,6vw,78px) clamp(24px,5vw,64px);max-width:720px}
.hero .eyebrow{margin-bottom:18px;display:inline-block}
.hero h1{font-family:"Unbounded",sans-serif;font-weight:500;
  font-size:clamp(30px,5.3vw,58px);line-height:1.06;margin:0 0 20px;letter-spacing:-.015em;text-wrap:balance}
.hero p{color:var(--dust);font-size:clamp(15px,1.5vw,18px);max-width:54ch;margin:0 0 28px;font-weight:400}
.readmore{display:inline-flex;align-items:center;gap:12px;font-family:"IBM Plex Mono",monospace;
  font-size:12px;letter-spacing:.14em;text-transform:uppercase;color:var(--gold);border:1px solid var(--hair-strong);
  padding:11px 20px;border-radius:2px;transition:.2s}
.readmore:hover{border-color:var(--gold);background:rgba(240,194,77,.08)}

/* ---- section head ---- */
.sec{margin:58px 0 26px;display:flex;align-items:baseline;gap:18px}
.sec h2{font-family:"Unbounded",sans-serif;font-weight:500;font-size:22px;margin:0;letter-spacing:-.01em}
.sec .rule{flex:1;height:1px;background:var(--hair)}
.sec .count{font-family:"IBM Plex Mono",monospace;font-size:11.5px;color:var(--faint);letter-spacing:.1em}

/* ---- cards (glass over the space picture) ---- */
.grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}
.feature{display:grid;grid-template-columns:1.5fr 1fr;gap:14px;margin-bottom:14px}
.card{background:var(--glass);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px);
  border:1px solid var(--hair);border-radius:3px;padding:26px 24px 22px;display:flex;flex-direction:column;gap:12px;
  position:relative;overflow:hidden;transition:border-color .22s,transform .22s,background .22s}
.card::before{content:"";position:absolute;top:0;left:0;width:0;height:2px;background:var(--gold);transition:width .3s}
.card:hover{background:var(--glass-2);border-color:var(--hair-strong);transform:translateY(-2px)}
.card:hover::before{width:100%}
.card .eyebrow{font-size:11px;letter-spacing:.02em}
.card h3{font-family:"Unbounded",sans-serif;font-weight:400;font-size:19px;line-height:1.22;margin:2px 0 0;letter-spacing:-.01em}
.feature .card h3{font-size:23px}
.card p{color:var(--dust);font-size:14px;line-height:1.55;margin:0;flex:1;font-weight:400}
.card .meta{font-family:"IBM Plex Mono",monospace;font-size:10.5px;color:var(--faint);letter-spacing:.05em;
  padding-top:13px;border-top:1px solid var(--hair);display:flex;justify-content:space-between}
.card .meta .star{color:var(--gold);opacity:.75}
@media(max-width:900px){.grid{grid-template-columns:1fr 1fr}.feature{grid-template-columns:1fr}}
@media(max-width:620px){.grid{grid-template-columns:1fr}.masthead{flex-direction:column;align-items:flex-start;gap:14px}.readout{text-align:left}}

/* footer */
footer{margin-top:72px;border-top:1px solid var(--hair);position:relative}
footer::before{content:"✦";position:absolute;top:-11px;left:50%;transform:translateX(-50%);
  background:#05060f;padding:0 14px;color:var(--gold);font-size:14px}
.foot-in{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:34px 0 50px;flex-wrap:wrap}
.foot-in .brand{font-size:22px}
.foot-in .fp{color:var(--faint);font-size:12.5px;text-align:right;line-height:1.7}
@media(prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}

/* ============================================================================
   WordPress additions — markup WP forces that the static mockup did not have.
   Same tokens, type and colours as above; nothing here alters the design.
   ========================================================================== */

/* Keyboard focus — visible gold ring on every interactive element. */
a:focus-visible,.readmore:focus-visible,.card:focus-visible,
button:focus-visible,input:focus-visible,.page-numbers:focus-visible{
  outline:2px solid var(--gold);outline-offset:3px}

/* The whole card is a link on the live site (mockup cards were inert). */
a.card{color:inherit}
a.card h3{transition:color .22s}
a.card:hover h3{color:var(--gold-soft)}

/* Hero as an image-backed header keeps the nebula scrim readable — the inline
   background-image (set per-post in the template) is layered UNDER this. */
.hero--single{margin-top:26px}

/* ---- single article ---- */
.article{margin:0 auto}
.article__byline{margin-top:22px;font-family:"IBM Plex Mono",monospace;font-size:11.5px;
  letter-spacing:.06em;color:var(--dust)}
.article__byline .star{color:var(--gold);opacity:.8;margin-right:.4em}
.article__byline a{color:var(--gold-soft)}
.article__byline a:hover{color:var(--gold)}
.article__img{margin:26px 0 34px;border:1px solid var(--hair);border-radius:3px;overflow:hidden}
.article__img img{display:block;width:100%;height:auto}
.article__body{max-width:68ch;margin:0 auto;color:#dbe2f4;font-size:18px;line-height:1.75}
.article__body>*{margin:0 0 1.15em}
.article__body h2{font-family:"Unbounded",sans-serif;font-weight:500;font-size:26px;line-height:1.15;
  letter-spacing:-.01em;color:var(--star);margin:1.6em 0 .55em}
.article__body h3{font-family:"Unbounded",sans-serif;font-weight:400;font-size:21px;line-height:1.2;
  color:var(--star);margin:1.4em 0 .5em}
.article__body a{color:var(--gold);text-decoration:underline;text-underline-offset:3px;
  text-decoration-color:var(--hair-strong)}
.article__body a:hover{text-decoration-color:var(--gold)}
.article__body strong{color:var(--star)}
.article__body blockquote{margin:1.4em 0;padding:.2em 0 .2em 22px;border-left:2px solid var(--gold);
  color:var(--dust);font-style:italic}
.article__body img{max-width:100%;height:auto;border-radius:3px;border:1px solid var(--hair)}
.article__body ul,.article__body ol{padding-left:1.3em}
.article__body li{margin:.4em 0}
.article__body code{font-family:"IBM Plex Mono",monospace;font-size:.9em;background:var(--glass);
  border:1px solid var(--hair);border-radius:3px;padding:.1em .4em}
.article__body pre{font-family:"IBM Plex Mono",monospace;font-size:14px;background:var(--glass);
  border:1px solid var(--hair);border-radius:4px;padding:18px 20px;overflow-x:auto}
.article__body pre code{background:none;border:0;padding:0}

/* ---- archive / section head ---- */
.section-head{font-family:"Unbounded",sans-serif;font-weight:500;font-size:clamp(24px,4vw,38px);
  line-height:1.08;letter-spacing:-.015em;margin:34px 0 8px;text-wrap:balance}
.section-lede{color:var(--dust);font-size:15px;max-width:60ch;margin:0 0 6px}

/* ---- pagination ---- */
.pagination{margin:44px 0 8px;display:flex;justify-content:center}
.pagination .nav-links,.pagination>*{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.page-numbers{font-family:"IBM Plex Mono",monospace;font-size:12px;letter-spacing:.08em;
  color:var(--dust);border:1px solid var(--hair);border-radius:2px;padding:9px 13px;transition:.2s}
.page-numbers:hover{border-color:var(--gold);color:var(--star)}
.page-numbers.current{color:#05060f;background:var(--gold);border-color:var(--gold);font-weight:500}
.page-numbers.dots{border-color:transparent}

/* ============================================================================
   Refinements — readability + language switch (appended 2026-08-30).
   ==========================================================================*/

/* Article readability: a solid reading panel so the starfield never sits behind
   body text; the cosmic background is dimmed on single articles. */
body.single .space{opacity:.5}
body.single #sky{opacity:.3}
.article__body{
  max-width:none;               /* as wide as the hero picture (was 68ch) */
  background:rgba(9,12,26,.93);
  border:1px solid var(--hair);
  border-radius:4px;
  padding:clamp(24px,4vw,48px);
  backdrop-filter:blur(3px);-webkit-backdrop-filter:blur(3px);
  margin:22px auto 0;
}
.hero--single{background:linear-gradient(90deg,rgba(5,7,16,.86),rgba(5,7,16,.6) 60%,rgba(5,7,16,.38))}

/* Language switch — a small gold pill toggle in the masthead (replaces readout). */
.lang-switch{display:inline-flex;border:1px solid var(--hair-strong);border-radius:999px;overflow:hidden;height:max-content}
.lang-switch__opt{font-family:"IBM Plex Mono",monospace;font-size:12px;font-weight:500;letter-spacing:.08em;
  padding:6px 15px;color:var(--dust);transition:.18s;line-height:1.5}
.lang-switch__opt:hover{color:var(--star)}
.lang-switch__opt.is-active{background:var(--gold);color:#0a0e20}

/* ============================================================================
   Masthead right — moon-phase readout + refined RU|EN switch (2026-08-30).
   ==========================================================================*/
/* Lunar badge — rounded pill (moon + phase name + illumination·age). The
   masthead is space-between with 3 children (brand · badge · switch), so the
   badge sits in the middle, filling the space between them. */
.lunar-badge{display:inline-flex;align-items:center;gap:11px;
  background:rgba(18,24,46,.55);border:1px solid var(--hair);border-radius:999px;
  padding:6px 18px 6px 7px;backdrop-filter:blur(6px);-webkit-backdrop-filter:blur(6px)}
.lunar-badge .moon-ico{width:38px;height:38px;display:block;flex:none;
  filter:drop-shadow(0 0 9px rgba(198,214,255,.22))}
.lunar-badge__txt{display:flex;flex-direction:column;line-height:1.28;gap:1px}
.rmoon{font-family:"Unbounded",sans-serif;font-weight:400;font-size:12.5px;color:var(--star);letter-spacing:.005em;white-space:nowrap}
.rmeta{font-family:"Unbounded",sans-serif;font-weight:300;font-size:9.5px;color:var(--dust);letter-spacing:.02em;white-space:nowrap}

/* Small segmented RU|EN toggle. Reset the styles the generic `nav` rule leaks
   in (gap:28px, padding, flex-wrap, the underline ::after) — that leak is why
   it looked wrong. */
.lang-switch{display:inline-flex;flex-wrap:nowrap;gap:0;padding:0;
  border:1px solid var(--hair-strong);border-radius:6px;overflow:hidden;height:max-content;flex:none}
.lang-switch__opt{font-family:"Unbounded",sans-serif;font-size:9px;font-weight:500;letter-spacing:.02em;
  padding:3px 7px;color:var(--dust);transition:.16s;line-height:1.6}
.lang-switch__opt::after{display:none}
.lang-switch__opt+.lang-switch__opt{border-left:1px solid var(--hair)}
.lang-switch__opt:hover{color:var(--star);background:rgba(170,186,234,.07)}
.lang-switch__opt.is-active{background:var(--gold);color:#0a0e20}
@media(max-width:620px){.mast-right{gap:11px}.readout{text-align:left}}

/* badge + switch grouped on the right of the masthead */
.mast-right{display:flex;align-items:center;gap:13px}
