/* Reality Unfolded · site styles (phone first) */
@font-face { font-family: 'Archivo'; src: url('../fonts/archivo.woff2') format('woff2'); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('../fonts/jetbrains-mono.woff2') format('woff2'); font-weight: 100 800; font-display: swap; }

:root {
  --ink: #06080C;          /* page black */
  --panel: #0D1117;
  --panel-2: #121821;
  --line: rgba(255, 255, 255, .09);
  --line-2: rgba(255, 255, 255, .16);
  --text: #F5F7FA;         /* white */
  --muted: #A3ADBB;
  --dim: #6F7987;
  --ice: #00F6FF;          /* ice-cyan of the banner and the RU mark: change here to match exactly */
  --ice-soft: rgba(0, 246, 255, .14);
  --radius: 14px;
  --wrap: 1160px;
  --pad: 20px;
  --display: 'Archivo', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --body: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 76px; }
body { margin: 0; background: var(--ink); color: var(--text); font-family: var(--body); font-size: 17px; line-height: 1.55; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--pad); }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--ice); color: var(--ink); padding: 8px 14px; border-radius: 8px; font-weight: 700; }
.skip:focus { left: 8px; }

/* ---------- type ---------- */
.display { font-family: var(--display); font-weight: 900; font-stretch: 62%; text-transform: uppercase; line-height: .9; letter-spacing: .004em; margin: 0; }
.eyebrow, .kicker, .label { font-family: var(--mono); font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0; }
h2.display { font-size: clamp(40px, 9vw, 64px); }
h3.display { font-size: clamp(28px, 6vw, 38px); }
.lede { color: var(--muted); font-size: 17px; margin: 10px 0 0; max-width: 46ch; }

/* ---------- brand mark ---------- */
.ru { display: inline-flex; flex-direction: column; align-items: stretch; font-family: var(--display); font-weight: 900; font-stretch: 62%; color: var(--ice); line-height: .82; letter-spacing: .01em; }
.ru::after { content: ''; height: .12em; background: var(--text); margin-top: .1em; border-radius: 1px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.brand .ru { font-size: 30px; }
.brand-word { font-family: var(--display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: .06em; font-size: 15px; line-height: 1.05; }
.brand-word span { display: block; color: var(--muted); font-weight: 600; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 999px; font-family: var(--body); font-weight: 700; font-size: 16px; text-decoration: none; border: 1px solid transparent; cursor: pointer; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.btn:active { transform: translateY(1px); }
.btn-ice { background: var(--ice); color: #00161A; }
.btn-ice:hover { background: #7FFBFF; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ice); color: var(--ice); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-sm { min-height: 40px; padding: 0 16px; font-size: 14px; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(6, 8, 12, .86); backdrop-filter: saturate(140%) blur(12px); -webkit-backdrop-filter: saturate(140%) blur(12px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.nav { display: none; gap: 26px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 15px; font-weight: 600; }
.nav a:hover { color: var(--text); }
.subnav { display: flex; gap: 8px; overflow-x: auto; padding: 10px var(--pad) 12px; scrollbar-width: none; border-top: 1px solid var(--line); }
.subnav::-webkit-scrollbar { display: none; }
.subnav a { flex: none; text-decoration: none; color: var(--muted); font-size: 14px; font-weight: 600; padding: 7px 13px; border: 1px solid var(--line); border-radius: 999px; }
.subnav a:hover { color: var(--text); border-color: var(--line-2); }
.hide-sm { display: none; }

/* ---------- hero ---------- */
.hero { padding: 26px 0 44px; position: relative; overflow: hidden; }
.hero::before { content: ''; position: absolute; inset: -40% -30% auto auto; width: 900px; height: 900px; border-radius: 50%; border: 1px dashed rgba(0, 246, 255, .14); pointer-events: none; }
.hero-grid { display: grid; gap: 20px; position: relative; }
.hero-head, .hero-side { display: grid; gap: 14px; align-content: start; }
.hero-side > p { margin: 0; }
.hero h1 { font-size: clamp(52px, 14vw, 104px); }
.hero h1 em { font-style: normal; color: var(--ice); }
.tagline { font-size: 18px; color: var(--text); margin: 0; max-width: 34ch; }
.tagline span { color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 4px; }
.badge { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--ice); background: var(--ice-soft); border: 1px solid rgba(0, 246, 255, .3); border-radius: 999px; padding: 5px 12px; }
.badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 10px var(--ice); }

/* ---------- video player (click to load) ---------- */
.player { position: relative; aspect-ratio: 16 / 9; border-radius: var(--radius); overflow: hidden; background: var(--panel); border: 1px solid var(--line); box-shadow: 0 30px 80px -30px rgba(0, 246, 255, .25); }
.player iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-btn { position: absolute; inset: 0; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer; color: inherit; }
.player-btn img, .thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play { position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; transform: translate(-50%, -50%); border-radius: 50%; background: var(--ice); display: grid; place-items: center; box-shadow: 0 0 0 10px rgba(0, 246, 255, .18), 0 12px 40px rgba(0, 0, 0, .5); transition: transform .2s ease; }
.play::after { content: ''; margin-left: 6px; border-style: solid; border-width: 13px 0 13px 22px; border-color: transparent transparent transparent #00161A; }
.player-btn:hover .play { transform: translate(-50%, -50%) scale(1.06); }
/* shown when YouTube's thumbnail can't load */
.fallback { position: absolute; inset: 0; display: none; padding: 7%; background:
  radial-gradient(circle at 78% 70%, rgba(0, 246, 255, .2), transparent 42%),
  radial-gradient(circle at 20% 10%, rgba(255, 255, 255, .06), transparent 40%), var(--panel-2); }
.fallback::before { content: ''; position: absolute; width: 150%; aspect-ratio: 1; left: -95%; top: -30%; border-radius: 50%; border: 2px dotted rgba(234, 251, 255, .5); }
.fallback b { position: relative; display: block; max-width: 60%; font-family: var(--display); font-weight: 900; font-stretch: 62%; text-transform: uppercase; line-height: .9; font-size: clamp(22px, 5.4vw, 46px); color: var(--text); }
.noimg .fallback { display: flex; align-items: flex-end; }
.noimg img { display: none; }
.card .fallback b { font-size: clamp(20px, 5vw, 30px); }
.player .fallback b { font-size: clamp(18px, 4.2vw, 40px); max-width: 52%; }

/* ---------- sections ---------- */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section-head { display: grid; gap: 10px; margin-bottom: 28px; }
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; }
.card[hidden] { display: none; }

/* ---------- topic tabs above the video grid (scroll sideways on a phone if they don't fit) ---------- */
.topic-tabs { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: -6px calc(-1 * var(--pad)) 22px; padding: 6px var(--pad); }
.topic-tabs::-webkit-scrollbar { display: none; }
.topic-tab { flex: none; min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line-2); background: transparent; color: var(--muted); font-family: var(--mono); font-size: 13px; letter-spacing: .12em; text-transform: uppercase; cursor: pointer; transition: color .15s ease, border-color .15s ease, background .15s ease; }
.topic-tab:hover { color: var(--text); border-color: rgba(255, 255, 255, .3); }
.topic-tab[aria-pressed="true"] { color: var(--ice); background: var(--ice-soft); border-color: rgba(0, 246, 255, .55); }

/* ---------- video cards ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; transition: border-color .2s ease, transform .2s ease; }
.card:hover { border-color: var(--line-2); }
.thumb { position: relative; display: block; aspect-ratio: 16 / 9; background: var(--panel-2); overflow: hidden; }
.thumb .play { width: 56px; height: 56px; opacity: 0; transition: opacity .2s ease; }
.thumb .play::after { border-width: 10px 0 10px 17px; margin-left: 5px; }
a.thumb:hover .play, a.thumb:focus-visible .play { opacity: 1; }
.card-body { padding: 16px 18px 18px; display: grid; gap: 8px; flex: 1; }
.card h3 { margin: 0; font-size: 19px; line-height: 1.25; font-weight: 700; }
.card-links { display: flex; gap: 18px; margin-top: auto; padding-top: 6px; font-size: 15px; font-weight: 700; }
.card-links a { text-decoration: none; color: var(--ice); }
.card-links a:hover { text-decoration: underline; text-underline-offset: 3px; }
.card-links .off { color: var(--dim); font-weight: 600; }
.soon .thumb { background:
  repeating-linear-gradient(135deg, rgba(255, 255, 255, .035) 0 14px, transparent 14px 28px),
  radial-gradient(circle at 70% 40%, rgba(0, 246, 255, .14), transparent 55%), var(--panel-2); display: grid; place-items: center; }
.stamp { font-family: var(--mono); font-size: 13px; letter-spacing: .2em; text-transform: uppercase; color: var(--ice); border: 1px solid rgba(0, 246, 255, .45); border-radius: 6px; padding: 8px 14px; background: rgba(6, 8, 12, .6); }

/* ---------- forms ---------- */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: calc(var(--radius) + 4px); padding: 26px 20px; }
.two-up { display: grid; gap: 18px; }
.form { display: grid; gap: 12px; margin-top: 18px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--muted); }
.input, .textarea { width: 100%; font: inherit; font-size: 16px; color: var(--text); background: var(--ink); border: 1px solid var(--line-2); border-radius: 12px; padding: 13px 15px; min-height: 50px; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.45; }
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:focus, .textarea:focus { outline: none; border-color: var(--ice); box-shadow: 0 0 0 3px var(--ice-soft); }
.inline { display: grid; gap: 10px; }
.form-msg { min-height: 1.4em; margin: 2px 0 0; font-size: 15px; color: var(--ice); }
.form-msg.err { color: #FF9B8A; }
.fine { font-size: 13px; color: var(--dim); margin: 6px 0 0; }

/* ---------- contact ---------- */
.contact { display: grid; gap: 18px; align-items: center; }
.contact h2 { font-size: clamp(36px, 8vw, 56px); }
.email-slot { display: inline-flex; align-items: center; gap: 10px; font-family: var(--mono); font-size: 15px; padding: 14px 18px; border: 1px dashed var(--line-2); border-radius: 12px; color: var(--muted); }
.email-slot::before { content: '@'; color: var(--ice); font-weight: 700; }
.email-live { color: var(--text); text-decoration: none; border-style: solid; border-color: rgba(0, 246, 255, .4); font-size: 16px; word-break: break-all; }
.email-live::before { content: none; }
.email-live:hover { border-color: var(--ice); color: var(--ice); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 40px 0 48px; color: var(--muted); font-size: 15px; }
.site-footer .wrap { display: grid; gap: 22px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 10px 22px; }
.foot-links a { text-decoration: none; color: var(--text); font-weight: 600; }
.foot-links a:hover { color: var(--ice); }
.copy { font-size: 13px; color: var(--dim); margin: 0; }

/* ---------- sources pages ---------- */
.crumb { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; color: var(--muted); font-weight: 600; font-size: 15px; }
.crumb:hover { color: var(--ice); }
.src-hero { padding: 28px 0 32px; display: grid; gap: 16px; }
.src-hero h1 { font-size: clamp(44px, 11vw, 84px); }
.src-hero .lede { max-width: 58ch; }
.watch-row { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; max-width: 560px; text-decoration: none; }
.watch-row .thumb { border-radius: 9px; }
.watch-row strong { display: block; font-size: 16px; line-height: 1.25; color: var(--text); }
.watch-row span { color: var(--ice); font-weight: 700; font-size: 14px; }
.src-group { padding: 30px 0; border-top: 1px solid var(--line); display: grid; gap: 16px; }
.src-group h2 { font-family: var(--display); font-weight: 800; font-stretch: 75%; text-transform: uppercase; letter-spacing: .02em; font-size: 26px; margin: 0; line-height: 1; }
.src-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.src { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px; display: grid; gap: 6px; }
.src a { text-decoration: none; display: grid; gap: 2px; }
.src a:hover .src-title { color: var(--ice); }
.src-org { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--ice); }
.src-title { font-weight: 700; font-size: 17px; line-height: 1.3; }
.src-title::after { content: ' ↗'; color: var(--dim); font-weight: 400; }
.src-url { font-family: var(--mono); font-size: 13px; color: var(--dim); word-break: break-all; }
.src p { margin: 4px 0 0; color: var(--muted); font-size: 15px; line-height: 1.5; }
.figures { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.figures span { font-family: var(--mono); font-size: 12.5px; color: var(--text); background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 5px 9px; }
.empty-state { padding: 40px 22px; border: 1px dashed var(--line-2); border-radius: var(--radius); text-align: center; color: var(--muted); }
.empty-state .stamp { display: inline-block; margin-bottom: 14px; }

/* ---------- larger screens ---------- */
@media (min-width: 640px) {
  :root { --pad: 28px; }
  .cards { grid-template-columns: repeat(2, 1fr); }
  .inline { grid-template-columns: 1fr auto; }
  .panel { padding: 32px; }
}
@media (min-width: 900px) {
  body { font-size: 18px; }
  .nav { display: flex; }
  .subnav { display: none; }
  .hide-sm { display: inline-flex; }
  .site-header .wrap { min-height: 72px; }
  .brand .ru { font-size: 34px; }
  .hero { padding: 56px 0 72px; }
  .hero-grid { grid-template-columns: 8fr 4fr; grid-template-areas: 'head head' 'player side'; column-gap: 40px; row-gap: 30px; }
  .hero-head { grid-area: head; }
  .player { grid-area: player; }
  .hero-side { grid-area: side; align-self: end; gap: 18px; }
  .hero h1 { font-size: clamp(64px, 6.6vw, 100px); }
  .video-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; }
  .topic-tabs { margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; flex-wrap: wrap; }
  .section { padding: 84px 0; }
  .two-up { grid-template-columns: 1fr 1fr; gap: 22px; align-items: start; }
  .contact { grid-template-columns: 1.1fr 1fr; gap: 40px; }
  .site-footer .wrap { grid-template-columns: 1fr auto; align-items: end; }
  .src-hero { padding: 48px 0 40px; }
  .src-group { grid-template-columns: 260px 1fr; gap: 32px; align-items: start; }
}
