/* LensDataBase — «просветление оптики».
   Палитра снята с радужной плёнки на кинолинзах: холодный циан → фиолет → мята.
   Стекло — несущий материал (глубокий blur, радужный отблеск по кромке как на
   покрытии элемента). Данные (фокусное, T-стоп) набраны моноширинным — гравировка
   на оправе. Оранжевого нет. */

:root {
  --bg: #05070e;
  --bg-2: #090d18;
  --glass: rgba(255,255,255,.045);
  --glass-2: rgba(160,190,255,.07);
  --glass-hi: rgba(255,255,255,.10);
  --border: rgba(150,180,255,.14);
  --border-strong: rgba(165,195,255,.26);
  --text: #eef1f8;
  --text-2: #a6adc4;
  --text-3: #6b7290;
  --iri-1: #7cc7ff;   /* циан */
  --iri-2: #b79cff;   /* фиолет */
  --iri-3: #6ff2d4;   /* мята */
  --accent: #8fd0ff;
  --green: #4fe0a0;
  --amber: #ffd166;
  --red: #ff7a9c;
  --radius: 22px;
  --radius-sm: 14px;
  --maxw: 1180px;
  --display: "Space Grotesk", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, sans-serif;
  color-scheme: dark light;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; overflow-x: hidden;
  font: 16px/1.55 var(--body); color: var(--text); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

/* Радужная атмосфера: холодные пятна покрытия, медленно дышат. */
.bg-glow { position: fixed; inset: 0; z-index: -2; overflow: hidden; pointer-events: none; }
.bg-glow::before, .bg-glow::after { content: ""; position: absolute; border-radius: 50%; filter: blur(100px); opacity: .55; }
.bg-glow::before { width: 60vw; height: 60vw; left: -16vw; top: -22vw;
  background: radial-gradient(circle, rgba(124,199,255,.34), transparent 60%);
  animation: drift1 30s ease-in-out infinite alternate; }
.bg-glow::after { width: 54vw; height: 54vw; right: -14vw; bottom: -20vw;
  background: radial-gradient(circle, rgba(183,156,255,.30), transparent 60%);
  animation: drift2 36s ease-in-out infinite alternate; }
.bg-grain { position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .03;
  background-image: radial-gradient(rgba(255,255,255,.7) .5px, transparent .5px); background-size: 3px 3px; }
@keyframes drift1 { to { transform: translate(9vw, 11vh) scale(1.14); } }
@keyframes drift2 { to { transform: translate(-8vw, -9vh) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .bg-glow::before, .bg-glow::after { animation: none; } }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

/* Стеклянная поверхность + радужная кромка сверху — «покрытие поймало свет». */
.glass {
  position: relative;
  background: var(--glass);
  backdrop-filter: blur(30px) saturate(1.7);
  -webkit-backdrop-filter: blur(30px) saturate(1.7);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.glass::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(120deg, var(--iri-1), var(--iri-2) 40%, transparent 60%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude; opacity: .5;
}

/* Навигация */
.nav { position: sticky; top: 0; z-index: 50;
  backdrop-filter: blur(26px) saturate(1.6); -webkit-backdrop-filter: blur(26px) saturate(1.6);
  background: rgba(5,7,14,.6); border-bottom: 1px solid var(--border); }
.nav-inner { max-width: var(--maxw); margin: 0 auto; padding: 13px 22px; display: flex; align-items: center; gap: 20px; }
.brand { display: flex; align-items: center; gap: 11px; font-family: var(--display); font-weight: 700; letter-spacing: -.02em; font-size: 18px; color: var(--text); text-decoration: none; }
.brand .dot { width: 24px; height: 24px; border-radius: 50%; flex: none; position: relative;
  background: radial-gradient(circle at 38% 32%, #eaf4ff, var(--iri-1) 48%, var(--iri-2) 100%);
  box-shadow: 0 0 18px rgba(124,199,255,.5); }
.brand .dot::after { content: ""; position: absolute; inset: 35%; border-radius: 50%; background: var(--bg); }
.nav-links { display: flex; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.nav-links a { color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 600; padding: 8px 15px; border-radius: 999px; transition: .18s; }
.nav-links a:hover { color: var(--text); background: var(--glass-2); }
.nav-links a.active { color: var(--bg); background: linear-gradient(120deg, var(--iri-1), var(--iri-3)); }

/* Герой */
.hero { position: relative; overflow: hidden; padding: 96px 0 56px; text-align: center;
  margin: 0 -22px; }
.hero-bokeh { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-content { position: relative; z-index: 1; padding: 0 22px; }
/* Заголовок убран — подзаголовок стал ведущим элементом, даём ему вес и воздух. */
.hero-lead { font-size: clamp(19px, 3vw, 27px) !important; color: var(--text) !important;
  max-width: 40ch !important; margin: 8px auto 34px !important; letter-spacing: -.01em; line-height: 1.35; font-weight: 500; }
.hero .eyebrow { font-family: var(--mono); display: inline-block; font-size: 12px; letter-spacing: .32em; text-transform: uppercase; color: var(--iri-1); margin-bottom: 20px; }
.hero h1 { font-family: var(--display); font-size: clamp(40px, 8.4vw, 88px); line-height: .96; letter-spacing: -.045em; margin: 0 0 20px; font-weight: 700;
  background: linear-gradient(180deg, #fff 26%, #b7c0dc 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.hero p.lead { font-size: clamp(16px, 2.4vw, 21px); color: var(--text-2); max-width: 58ch; margin: 0 auto 34px; }

.search-wrap { max-width: 660px; margin: 0 auto; position: relative; }
/* Блик медленно обходит рамку поиска — как свет по кромке линзы. */
.search-wrap::before {
  content: ""; position: absolute; inset: -1.5px; border-radius: 999px; padding: 1.5px; pointer-events: none; z-index: 0;
  background: conic-gradient(from var(--glint-a, 0deg), transparent 0deg, transparent 300deg, var(--iri-1) 335deg, var(--iri-3) 350deg, transparent 360deg);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  animation: glint 5.5s linear infinite; opacity: .9;
}
.search-wrap > * { position: relative; z-index: 1; }
@property --glint-a { syntax: '<angle>'; inherits: false; initial-value: 0deg; }
@keyframes glint { to { --glint-a: 360deg; } }
@media (prefers-reduced-motion: reduce) { .search-wrap::before { animation: none; opacity: .35; } }
.search { width: 100%; padding: 17px 22px 17px 52px; font-size: 17px; font-family: var(--body); color: var(--text);
  background: var(--glass-2); border: 1px solid var(--border-strong); border-radius: 999px;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px); outline: none; transition: .2s; }
.search:focus { border-color: var(--iri-1); box-shadow: 0 0 0 4px rgba(124,199,255,.16); }
.search::placeholder { color: var(--text-3); }
.search-ic { position: absolute; left: 21px; top: 50%; transform: translateY(-50%); color: var(--text-3); font-size: 18px; }

.stats { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin: 34px 0 4px; }
.stat { padding: 18px 28px; border-radius: var(--radius-sm); min-width: 118px; }
.stat .num { font-family: var(--mono); font-size: 30px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat .lbl { font-size: 12px; color: var(--text-3); margin-top: 4px; letter-spacing: .02em; }

/* Секции */
.section { padding: 34px 0 60px; }
.section h2 { font-family: var(--mono); font-size: 13px; letter-spacing: .18em; text-transform: uppercase; color: var(--text-3); font-weight: 500; margin: 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.section-head .count { font-family: var(--mono); font-size: 13px; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* Фильтры */
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin: 22px 0; }
.chip { font-size: 13px; font-weight: 600; color: var(--text-2); cursor: pointer; padding: 8px 15px; border-radius: 999px;
  border: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(12px); transition: .16s; white-space: nowrap; user-select: none; }
.chip:hover { color: var(--text); border-color: var(--border-strong); }
.chip.on { color: var(--bg); background: linear-gradient(120deg, var(--iri-1), var(--iri-3)); border-color: transparent; }
select.chip { appearance: none; padding-right: 32px; font-family: var(--body);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23a6adc4' stroke-width='1.6' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 13px center; }
/* Раскрытый список нативного select рисуется системой — задаём тёмный фон явно,
   иначе на светлой системной подложке был белый текст на белом. */
select.chip option { background: #0c1120; color: var(--text); }
@media (prefers-color-scheme: light) { select.chip option { background: #fff; color: #12141c; } }

/* Иконка бренда/ренала — стеклянная плашка, не белый квадрат.
   Лёгкая холодная подложка со стеклом: цветные фавиконы читаются, а тёмные
   логотипы не тонут в чёрном фоне. */
.ico { width: 34px; height: 34px; border-radius: 10px; flex: none; object-fit: contain; padding: 5px;
  background: var(--glass-hi); backdrop-filter: blur(8px);
  border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255,255,255,.12); }
.ico-mono { width: 34px; height: 34px; border-radius: 10px; flex: none; display: grid; place-items: center;
  font-family: var(--display); font-weight: 700; font-size: 13px; color: var(--bg);
  background: linear-gradient(135deg, var(--iri-1), var(--iri-2)); }

/* Аккордеон каталога */
.acc { margin-bottom: 10px; border-radius: var(--radius-sm); overflow: hidden; border: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(22px) saturate(1.5); }
.acc-head { display: flex; align-items: center; gap: 13px; width: 100%; padding: 15px 18px; cursor: pointer; background: none; border: none; color: var(--text); text-align: left; transition: .16s; }
.acc-head:hover { background: var(--glass-2); }
.acc-head .title { font-family: var(--display); font-weight: 600; font-size: 17px; letter-spacing: -.01em; }
.acc-head .sub { font-family: var(--mono); font-size: 12px; color: var(--text-3); margin-top: 1px; }
.acc-head .caret { margin-left: auto; color: var(--text-3); transition: transform .22s ease; font-size: 13px; }
.acc.open > .acc-head .caret { transform: rotate(90deg); }
.acc-body { display: none; padding: 4px 12px 12px; }
.acc.open > .acc-body { display: block; }

/* Серия внутри бренда */
.series { border-radius: var(--radius-sm); overflow: hidden; margin: 6px 0; background: rgba(255,255,255,.02); border: 1px solid var(--border); }
.series-head { display: flex; align-items: center; gap: 10px; width: 100%; padding: 12px 15px; cursor: pointer; background: none; border: none; color: var(--text); text-align: left; }
.series-head:hover { background: var(--glass-2); }
.series-head .s-name { font-weight: 600; font-size: 15px; }
.series-head .s-meta { font-family: var(--mono); font-size: 11.5px; color: var(--text-3); margin-left: auto; display: flex; align-items: center; gap: 8px; }
.series-head .caret { color: var(--text-3); transition: transform .2s; font-size: 12px; }
.series.open .caret { transform: rotate(90deg); }
.series-body { display: none; padding: 2px 8px 10px; }
.series.open .series-body { display: block; }

/* Строка объектива */
.lens-row { display: flex; align-items: center; gap: 12px; width: 100%; padding: 11px 13px; border-radius: 11px; cursor: pointer;
  background: none; border: none; color: var(--text); text-align: left; transition: .14s; }
.lens-row:hover { background: var(--glass-2); }
.lens-row .l-focal { font-family: var(--mono); font-weight: 700; font-size: 15px; min-width: 74px; color: var(--iri-1); }
.lens-row .l-ap { font-family: var(--mono); font-size: 13px; color: var(--text-2); }
.lens-row .l-tags { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.tag { font-family: var(--mono); font-size: 11px; padding: 3px 8px; border-radius: 6px; background: rgba(255,255,255,.06); color: var(--text-3); }
.tag.rent { color: var(--green); background: rgba(79,224,160,.13); }
.tag.ana { color: var(--iri-2); background: rgba(183,156,255,.14); }

/* Сетка (главная — популярное) */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 13px; }
.card { padding: 18px; border-radius: var(--radius-sm); cursor: pointer; transition: .18s; display: flex; flex-direction: column; gap: 9px; text-align: left;
  border: 1px solid var(--border); background: var(--glass); backdrop-filter: blur(20px) saturate(1.5); }
.card:hover { transform: translateY(-3px); border-color: var(--border-strong); background: var(--glass-2); }
.card .c-top { display: flex; align-items: center; gap: 10px; }
.card .mfr { font-family: var(--mono); font-size: 11px; color: var(--iri-3); letter-spacing: .04em; text-transform: uppercase; }
.card .name { font-family: var(--display); font-size: 17px; font-weight: 600; letter-spacing: -.01em; line-height: 1.2; }
.card .spec { display: flex; gap: 7px; flex-wrap: wrap; margin-top: auto; }

/* Покрытие */
.cov { display: inline-flex; align-items: center; gap: 7px; font-family: var(--mono); font-size: 14px; font-weight: 500; }
.cov-full { color: var(--green); } .cov-tight { color: var(--amber); } .cov-vig { color: var(--red); } .cov-none { color: var(--text-3); }

/* Детальная */
.detail { display: grid; grid-template-columns: 1.3fr 1fr; gap: 18px; align-items: start; }
@media (max-width: 820px) { .detail { grid-template-columns: 1fr; } }
.panel { padding: 24px; border-radius: var(--radius); }
.panel h3 { font-family: var(--mono); margin: 0 0 16px; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--text-3); font-weight: 500; }
.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.spec-cell { padding: 14px; border-radius: var(--radius-sm); background: rgba(255,255,255,.03); border: 1px solid var(--border); }
.spec-cell .k { font-size: 12px; color: var(--text-3); }
.spec-cell .v { font-family: var(--mono); font-size: 17px; font-weight: 500; margin-top: 4px; }
.spec-cell .v.empty { color: var(--text-3); }
.detail-head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.detail-title { font-family: var(--display); font-size: clamp(26px, 5vw, 40px); font-weight: 700; letter-spacing: -.03em; line-height: 1.04; margin: 0 0 4px; }
.detail-sub { font-family: var(--mono); color: var(--iri-3); font-size: 13px; margin: 0; }
.back { display: inline-flex; align-items: center; gap: 7px; color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 600; margin-bottom: 20px; padding: 8px 15px; border-radius: 999px; border: 1px solid var(--border); background: var(--glass); }
.back:hover { color: var(--text); }

/* Реналы */
.rental-row { display: flex; align-items: center; gap: 14px; padding: 14px; border-radius: var(--radius-sm); border: 1px solid var(--border); background: rgba(255,255,255,.03); margin-bottom: 10px; }
.rental-row .r-name { font-weight: 600; }
.rental-row .r-meta { font-size: 13px; color: var(--text-3); margin-top: 2px; }
.rental-row .r-actions { margin-left: auto; display: flex; gap: 8px; }
.btn { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; text-decoration: none; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--border-strong); color: var(--text); background: var(--glass); backdrop-filter: blur(12px); transition: .16s; cursor: pointer; }
.btn:hover { background: var(--glass-2); }
.btn.primary { background: linear-gradient(120deg, var(--iri-1), var(--iri-3)); color: var(--bg); border-color: transparent; }

/* Совместимость */
.cov-controls { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.cov-result { padding: 16px; border-radius: var(--radius-sm); background: rgba(255,255,255,.03); border: 1px solid var(--border); }
.cov-viz { width: 100%; max-width: 360px; margin: 4px auto 14px; display: block; border-radius: 12px;
  background: radial-gradient(circle at 50% 45%, rgba(124,199,255,.06), transparent 70%); }
.cov-viz .frame { fill: none; stroke: #fff; stroke-width: 2; }
.cov-viz .frame-fill { fill: rgba(255,255,255,.04); }
.cov-viz .circle-full { fill: rgba(79,224,160,.14); stroke: var(--green); }
.cov-viz .circle-tight { fill: rgba(255,209,102,.14); stroke: var(--amber); }
.cov-viz .circle-vig { fill: rgba(255,122,156,.16); stroke: var(--red); }
.cov-viz .tick { stroke: #fff; stroke-width: 2.4; fill: none; }
.cov-viz .lbl { fill: var(--text-3); font: 500 11px var(--mono); }
.cov-legend { display: flex; gap: 16px; justify-content: center; margin-top: 4px; font-family: var(--mono); font-size: 11.5px; color: var(--text-3); flex-wrap: wrap; }
.cov-legend b { font-weight: 500; }
.cov-bar { height: 8px; border-radius: 6px; background: rgba(255,255,255,.08); overflow: hidden; margin-top: 12px; }
.cov-bar > span { display: block; height: 100%; border-radius: 6px; }

.muted { color: var(--text-3); }
.empty-state { text-align: center; padding: 60px 20px; color: var(--text-3); }
.spinner { width: 34px; height: 34px; border: 3px solid var(--border); border-top-color: var(--iri-1); border-radius: 50%; animation: spin 1s linear infinite; margin: 70px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.load-more { display: block; margin: 22px auto 0; }
.footer { border-top: 1px solid var(--border); margin-top: 44px; padding: 32px 0 54px; color: var(--text-3); font-size: 13.5px; }
.footer a { color: var(--text-2); text-decoration: none; } .footer a:hover { color: var(--text); }

:focus-visible { outline: 2px solid var(--iri-1); outline-offset: 2px; }

/* Светлая тема */
@media (prefers-color-scheme: light) {
  :root {
    --bg: #eef0f6; --bg-2: #fff;
    --glass: rgba(255,255,255,.6); --glass-2: rgba(255,255,255,.82); --glass-hi: rgba(255,255,255,.95);
    --border: rgba(40,60,120,.12); --border-strong: rgba(40,60,120,.22);
    --text: #12141c; --text-2: #454a5e; --text-3: #7a8098;
  }
  .hero h1 { background: linear-gradient(180deg, #12141c, #454a5e); -webkit-background-clip: text; background-clip: text; }
  .nav { background: rgba(238,240,246,.7); }
  .nav-links a.active, .chip.on, .btn.primary { color: #fff; }
  .bg-glow::before, .bg-glow::after { opacity: .38; }
}
