/* RICCOM design system — light industrial
   Type: Manrope (1 face) + Geist Mono (numbers/data only)
   Spacing tokens: 0 2 4 8 12 16 24 32 40 48 64 80 96
   Radius: 8 / 12 / 16, nested = outer − gap
   Motion: cubic-bezier(0.22,1,0.36,1), only transform/opacity */

@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-cyr.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: 'Manrope';
  src: url('../fonts/manrope-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/geistmono-cyr.woff2') format('woff2');
  unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
  font-display: swap;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('../fonts/geistmono-lat.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+2000-206F, U+20AC;
  font-display: swap;
}

:root {
  --bg: #FFFFFF;
  --surface: #F7F7F8;
  --surface-2: #F1F1F3;
  --surface-3: #E9E9EC;
  --line: #E4E4E7;
  --text: #18181B;
  --text-2: #52525B;
  --text-3: #71717A;
  --accent: #E8590C;
  --accent-strong: #C94A08;
  --accent-dim: #FDEEE4;
  --steel: #1F2937;
  --good: #15803D;
  --bad: #B91C1C;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --mono: 'Geist Mono', ui-monospace, monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', system-ui, sans-serif;
  font-size: 16px;
  line-height: 24px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; transition: color 300ms var(--ease); }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; display: block; }
table { border-collapse: collapse; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--accent); color: #fff; padding: 8px 16px;
  border-radius: 0 0 var(--r-sm) 0; z-index: 200; font-weight: 600;
}
.skip:focus { left: 0; }

.wrap { max-width: 1200px; margin: 0 auto; padding: 0 24px; }

/* ---------- floating nav ---------- */
.topbar { height: 72px; }
.nav {
  position: fixed; top: 12px; left: 50%; transform: translateX(-50%);
  z-index: 100; display: flex; align-items: center; gap: 8px;
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--line); border-radius: var(--r-lg);
  box-shadow: 0 1px 2px rgba(24, 24, 27, 0.05);
  padding: 8px 16px; max-width: calc(100vw - 24px);
}
.nav__logo {
  display: flex; align-items: center; gap: 8px;
  font-weight: 700; font-size: 18px; letter-spacing: 0.2px;
  padding: 4px 8px 4px 0; margin-right: 8px;
  border-right: 1px solid var(--line);
}
.nav__logo-text { color: var(--text); }
.nav__logo-text .lg { color: var(--accent); }
.nav__logo img { width: 28px; height: 28px; border-radius: 8px; }
.nav__links { display: flex; gap: 4px; list-style: none; }
.nav__links a {
  display: block; padding: 8px 12px; border-radius: var(--r-sm);
  font-size: 14px; font-weight: 600; color: var(--text-2); white-space: nowrap;
  transition: background 300ms var(--ease), color 300ms var(--ease);
}
.nav__links a:hover { color: var(--text); background: var(--surface-2); }
.nav__links a.is-active { color: var(--text); background: var(--surface-3); }
.nav__cta {
  display: inline-block; margin-left: 8px;
  padding: 8px 16px; border-radius: var(--r-sm);
  background: var(--accent); color: #fff !important;
  font-size: 14px; font-weight: 600; white-space: nowrap;
  transition: transform 500ms var(--ease), opacity 300ms var(--ease);
}
.nav__cta:hover { transform: translateY(-1px); opacity: 0.94; }
.nav__cta:active { transform: translateY(1px); }
.nav__burger {
  display: none; background: none; border: 0; cursor: pointer;
  width: 40px; height: 40px; border-radius: var(--r-sm);
  color: var(--text); align-items: center; justify-content: center;
}
.nav__burger svg { transition: transform 500ms var(--ease); }

.mobile-menu {
  position: fixed; inset: 0; z-index: 90; display: none;
  background: rgba(255, 255, 255, 0.97);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
}
.mobile-menu.is-open { display: block; }
.mobile-menu ul { list-style: none; padding: 104px 24px 24px; display: grid; gap: 8px; }
.mobile-menu a {
  display: block; padding: 16px 12px; border-radius: var(--r-md);
  font-size: 20px; line-height: 28px; font-weight: 600; color: var(--text);
  border-bottom: 1px solid var(--line);
  opacity: 0; transform: translateY(24px);
  transition: transform 500ms var(--ease), opacity 300ms var(--ease);
}
.mobile-menu.is-open a { opacity: 1; transform: translateY(0); }
.mobile-menu a.is-active { color: var(--accent); }

/* ---------- price ticker ---------- */
.ticker { background: var(--steel); overflow: hidden; }
.ticker__inner { overflow: hidden; }
.ticker__track {
  display: flex; gap: 48px; padding: 12px 0; width: max-content;
  animation: ticker-scroll 45s linear infinite;
}
.ticker__track:hover { animation-play-state: paused; }
@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
  .ticker__track { animation: none; }
}
.ticker__item { display: flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.ticker__name { font-size: 12px; line-height: 16px; color: #9CA3AF; text-transform: uppercase; letter-spacing: 0.5px; }
.ticker__value { font-family: var(--mono); font-size: 14px; line-height: 20px; color: #FFFFFF; font-weight: 600; }
.ticker__chg { font-family: var(--mono); font-size: 12px; line-height: 16px; }
.ticker__chg--up { color: #4ADE80; }
.ticker__chg--down { color: #F87171; }
.ticker__chg--flat { color: #9CA3AF; }
.ticker__time { font-size: 12px; line-height: 16px; color: #9CA3AF; }
.ticker a { color: var(--accent); }

/* ---------- hero ---------- */
.hero { padding: 48px 0 40px; position: relative; overflow: hidden; background: var(--surface); }
.hero__grid { position: absolute; inset: 0; opacity: 0.7; pointer-events: none; }
.hero__head { max-width: 680px; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12px; line-height: 16px; font-weight: 600; letter-spacing: 0.8px;
  text-transform: uppercase; color: var(--accent-strong);
  background: var(--accent-dim); border-radius: 999px; padding: 4px 12px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.5px;
  background: linear-gradient(90deg, #000000, #666666);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-wrap: balance; margin-bottom: 24px;
}
.hero__sub {
  font-size: 16px; line-height: 24px; color: var(--text-2);
  max-width: 680px; text-wrap: pretty; margin-bottom: 24px;
}
.hero__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 24px; }
.hero__proof {
  display: flex; gap: 32px; flex-wrap: wrap;
  border-top: 1px solid var(--line); padding-top: 16px;
}
.hero__stat { display: grid; gap: 2px; }
.hero__stat b { font-family: var(--mono); font-size: 18px; line-height: 24px; color: var(--text); font-weight: 600; }
.hero__stat span { font-size: 12px; line-height: 16px; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; }

/* hero two columns: text + market card */
.hero__body { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: center; }

.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 16px; border-radius: var(--r-sm);
  font-size: 16px; line-height: 24px; font-weight: 600;
  border: 1px solid transparent; cursor: pointer;
  transition: transform 500ms var(--ease), background 300ms var(--ease), border-color 300ms var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-strong); }
.btn--ghost { border-color: var(--line); color: var(--text); background: transparent; }
.btn--ghost:hover { border-color: var(--text-3); background: var(--surface); }
.btn--sm { font-size: 14px; line-height: 20px; padding: 8px 12px; }

/* ---------- sections ---------- */
.section { padding: 48px 0; }
.section--tight { padding: 32px 0; }
.section__head { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 32px; }
.section__title { font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.5px; text-wrap: balance; }
.section__title span { color: var(--accent); }
.section__link { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.section__link:hover { color: var(--accent); }

/* tagline reveal */
.reveal-block {
  padding: 48px 0;
  background: var(--steel);
}
.reveal-block p {
  font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.5px;
  max-width: 680px; text-wrap: balance; color: #FFFFFF;
}
.reveal-block .w { opacity: 0.28; transition: opacity 600ms var(--ease); }
.reveal-block .w.on { opacity: 1; }
.reveal-block .w.accent { color: var(--accent); }

/* cards */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.cards--4 { grid-template-columns: repeat(4, 1fr); }
.cards--2 { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 24px; display: flex; flex-direction: column; gap: 12px;
  transition: transform 500ms var(--ease), border-color 300ms var(--ease), box-shadow 300ms var(--ease);
}
.card:hover { transform: translateY(-2px); border-color: #D4D4D8; box-shadow: 0 4px 16px rgba(24, 24, 27, 0.06); }
.card__icon {
  width: 40px; height: 40px; border-radius: var(--r-md);
  background: var(--accent-dim); display: flex; align-items: center; justify-content: center;
  color: var(--accent-strong); flex-shrink: 0;
}
.card__icon svg { width: 20px; height: 20px; }
.card__title { font-size: 18px; line-height: 28px; font-weight: 700; }
.card__text { font-size: 14px; line-height: 20px; color: var(--text-2); text-wrap: pretty; }
.card__foot { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-top: 8px; }
.card__meta { font-size: 12px; line-height: 16px; color: var(--text-3); }
.card--news .card__img {
  aspect-ratio: 16/9; border-radius: var(--r-md); overflow: hidden;
  background: var(--surface-2); margin: -8px 0 4px;
}
.card--news .card__img img { width: 100%; height: 100%; object-fit: cover; }
.card--news .card__img.noimg { display: flex; align-items: center; justify-content: center; color: var(--text-3); }

.chip {
  display: inline-block; font-size: 12px; line-height: 16px; font-weight: 600;
  color: var(--accent-strong); background: var(--accent-dim);
  border-radius: 999px; padding: 4px 12px;
}
.chip--muted { color: var(--text-2); background: var(--surface-3); }

/* data table */
.datatable { width: 100%; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.datatable table { width: 100%; }
.datatable th {
  text-align: left; font-size: 12px; line-height: 16px; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-3);
  padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface);
}
.datatable td {
  padding: 12px 16px; font-size: 14px; line-height: 20px;
  border-bottom: 1px solid var(--surface-3); vertical-align: top; color: var(--text-2);
}
.datatable td strong { color: var(--text); font-weight: 600; }
.datatable tr:last-child td { border-bottom: 0; }
.datatable tr:hover td { background: var(--surface); }
.num { font-family: var(--mono); font-size: 13px; color: var(--text); font-weight: 600; white-space: nowrap; }

/* filters */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; align-items: center; }
.filters select, .filters input[type="text"], .filters input[type="search"] {
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--r-sm); padding: 8px 12px; font-size: 14px; line-height: 20px;
  font-family: inherit;
}
.filters select:hover, .filters input:hover { border-color: var(--text-3); }
.filters label { font-size: 14px; line-height: 20px; color: var(--text-2); }

/* breadcrumbs + pager */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; line-height: 20px; color: var(--text-3); padding: 24px 0 0; }
.crumbs a { color: var(--text-2); }
.crumbs a:hover { color: var(--accent); }
.pager { display: flex; gap: 8px; flex-wrap: wrap; padding: 24px 0; }
.pager a, .pager span {
  min-width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); font-size: 14px; font-weight: 600;
  border: 1px solid var(--line); color: var(--text-2); padding: 0 8px;
  background: var(--bg);
}
.pager a:hover { color: var(--text); border-color: var(--text-3); }
.pager span.is-current { background: var(--accent); color: #fff; border-color: var(--accent); }
.pager__note { align-self: center; font-size: 14px; color: var(--text-3); }

/* page + article content */
.prose { max-width: 760px; color: var(--text-2); font-size: 16px; line-height: 24px; text-wrap: pretty; }
.prose h2, .prose h3 { color: var(--text); margin: 32px 0 12px; }
.prose h2 { font-size: 24px; line-height: 32px; }
.prose h3 { font-size: 18px; line-height: 28px; }
.prose p { margin-bottom: 16px; }
.prose a { color: var(--accent-strong); }
.prose img { border-radius: var(--r-md); margin: 16px 0; }
.prose ul, .prose ol { margin: 0 0 16px 24px; }
.prose table { margin: 16px 0; }
.prose td, .prose th { border: 1px solid var(--line); padding: 8px 12px; }
.prose blockquote { border-left: 3px solid var(--accent); padding: 8px 16px; background: var(--surface); border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 16px 0; }
.prose blockquote p { margin-bottom: 0; }

/* share */
.share { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.share__label { font-size: 14px; line-height: 20px; color: var(--text-3); margin-right: 4px; }
.share a {
  width: 40px; height: 40px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--r-sm); background: var(--bg); border: 1px solid var(--line);
  color: var(--text-2); transition: transform 500ms var(--ease), color 300ms var(--ease), border-color 300ms var(--ease);
}
.share a:hover { color: var(--accent-strong); border-color: var(--text-3); transform: translateY(-1px); }
.share a:active { transform: translateY(1px); }
.share svg { width: 18px; height: 18px; fill: currentColor; }
.share svg[stroke] { fill: none; }

/* empty state */
.empty {
  border: 1px dashed var(--line); border-radius: var(--r-lg); padding: 48px 24px;
  text-align: center; color: var(--text-2); display: grid; gap: 12px; justify-items: center;
  background: var(--surface);
}
.empty b { color: var(--text); font-size: 18px; line-height: 28px; }
.empty p { font-size: 14px; line-height: 20px; max-width: 480px; }

/* footer */
.footer { border-top: 1px solid var(--line); background: var(--surface); padding: 48px 0 24px; margin-top: 48px; }
.footer__grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 32px; }
.footer h4 { font-size: 14px; line-height: 20px; font-weight: 600; color: var(--text-3); text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 12px; }
.footer ul { list-style: none; display: grid; gap: 8px; }
.footer ul a { font-size: 14px; line-height: 20px; color: var(--text-2); }
.footer ul a:hover { color: var(--accent); }
.footer__about { font-size: 14px; line-height: 20px; color: var(--text-2); max-width: 360px; text-wrap: pretty; margin-top: 12px; }
.footer__contacts { display: grid; gap: 8px; margin-top: 16px; }
.footer__contacts a { font-family: var(--mono); font-size: 14px; line-height: 20px; color: var(--text); }
.footer__bottom {
  border-top: 1px solid var(--line); padding-top: 24px;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 12px; line-height: 16px; color: var(--text-3);
}

/* admin bar */
.adminbar {
  position: fixed; bottom: 16px; right: 16px; z-index: 120;
  display: flex; gap: 8px; align-items: center;
  background: rgba(255, 255, 255, 0.92); backdrop-filter: blur(16px);
  border: 1px solid var(--accent); border-radius: var(--r-lg); padding: 8px;
  box-shadow: 0 4px 16px rgba(24, 24, 27, 0.08);
}
.adminbar a, .adminbar button {
  padding: 8px 12px; border-radius: var(--r-sm); font-size: 14px; font-weight: 600;
  border: 0; background: none; color: var(--text-2); cursor: pointer;
}
.adminbar a:hover, .adminbar button:hover { color: var(--text); background: var(--surface-2); }
.adminbar a.accent { color: var(--accent-strong); }

/* forms */
.field { display: grid; gap: 8px; margin-bottom: 16px; }
.field label { font-size: 14px; line-height: 20px; font-weight: 600; }
.field input, .field textarea {
  background: var(--bg); border: 1px solid var(--line); color: var(--text);
  border-radius: var(--r-sm); padding: 8px 12px; font-size: 16px; line-height: 24px; font-family: inherit;
}
.field textarea { min-height: 320px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--accent); outline: none; }
.form-error { color: var(--bad); font-size: 14px; line-height: 20px; }

/* reveal on scroll */
.fade-up { opacity: 0; transform: translateY(32px); transition: opacity 700ms var(--ease), transform 800ms var(--ease); }
.fade-up.in { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .fade-up { transition: opacity 300ms var(--ease); transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .nav { gap: 4px; padding: 8px 12px; }
  .nav__logo { margin-right: 4px; padding-right: 4px; }
  .nav__links a { padding: 8px 9px; font-size: 13px; }
}
@media (max-width: 1024px) {
  .cards, .cards--4 { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .hero h1 { font-size: 30px; line-height: 36px; }
  .reveal-block p { font-size: 30px; line-height: 36px; }
  .hero__body { grid-template-columns: 1fr; gap: 24px; }
}
@media (max-width: 720px) {
  .wrap { padding: 0 16px; }
  .nav { left: 16px; right: 16px; transform: none; }
  .nav__links, .nav__cta { display: none; }
  .nav__burger { display: inline-flex; }
  .cards, .cards--4, .cards--2 { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  .hero h1 { font-size: 28px; line-height: 32px; }
  .hero__proof { gap: 24px; }
  .section__title { font-size: 24px; line-height: 32px; }
  .reveal-block p { font-size: 24px; line-height: 32px; }
  .footer__grid { grid-template-columns: 1fr; }
  .datatable { overflow-x: auto; }
  .datatable table { min-width: 640px; }
  .section__head { flex-direction: column; align-items: flex-start; }
}
