/* biro51 landing — core layout */
:root {
  color-scheme: dark;
  --bg: #0e0e10;
  --ink: #efeff3;
  --muted: #aaaab4;
  --line: #3c3c44;
  --red: #cd3832;
  --tile: #26272c;
  --white: #ffffff;
  --radius: 22px;
  --gap: 12px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

/* Keep centered navigation fixed when the vertical scrollbar appears or disappears. */
@media (hover: hover) and (pointer: fine) {
  html {
    scrollbar-gutter: stable;
  }
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.45 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img {
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(980px, 100%);
  margin: 0 auto;
  padding: 18px 14px 40px;
}

.block {
  margin-top: 16px;
}

.hero-grid,
.grid-3 {
  display: grid;
  gap: var(--gap);
}

.hero-grid {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.tile {
  width: 100%;
}

.square,
.thumb {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  display: block;
  background: var(--tile);
}

.js-lightbox {
  cursor: zoom-in;
}

.js-lightbox:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 4px;
}

.thumb[data-src],
.square[data-src] {
  background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
}

.thumb.is-loaded,
.square.is-loaded {
  background: var(--tile);
}

.hero-text {
  margin-top: 12px;
}

.h1 {
  margin: 14px 0 6px;
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: .01em;
}

.h2 {
  margin: 0 0 10px;
  font-size: 22px;
  letter-spacing: .01em;
}

.subline {
  margin-top: 10px;
  color: var(--muted);
  letter-spacing: .02em;
}

.video-embeds {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 24px;
}

.video-embed {
  min-width: 0;
  overflow: hidden;
  aspect-ratio: 16 / 9;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--tile);
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

@media (max-width: 700px) {
  .video-embeds {
    grid-template-columns: minmax(0, 1fr);
  }
}

.lead {
  margin: 0;
  font-size: 18px;
  color: var(--ink);
}

.price-accent {
  color: var(--red);
  font-weight: 900;
  white-space: nowrap;
}

.text {
  margin: 0;
  color: var(--muted);
}

/* Product page: alternating image and text rows */
.products-list {
  display: grid;
  gap: var(--gap);
}

.product-feature {
  min-width: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--gap);
  align-items: center;
}

.product-feature__media {
  grid-column: 1;
  min-width: 0;
}

.product-feature__image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--tile);
}

.product-feature__image[data-src],
.product-feature__image[data-srcset] {
  background: linear-gradient(135deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02));
}

.product-feature__image.is-loaded {
  background: var(--tile);
}

.product-feature__content {
  grid-column: 2 / -1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}

.product-feature__title,
.product-feature__text {
  margin: 0;
}

.product-feature--image-right .product-feature__media {
  grid-column: 3;
  grid-row: 1;
}

.product-feature--image-right .product-feature__content {
  grid-column: 1 / span 2;
  grid-row: 1;
}

/* Reusable content link with the same appearance as .topbar__brand. */
.brand-link {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
}

.brand-link__badge {
  color: var(--red);
  font-weight: 900;
}

@media (max-width: 700px) {
  .product-feature {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  .product-feature__media,
  .product-feature--image-right .product-feature__media {
    grid-column: 1;
    grid-row: auto;
  }

  .product-feature__content,
  .product-feature--image-right .product-feature__content {
    grid-column: 1;
    grid-row: auto;
    justify-content: flex-start;
  }

  .brand-link {
    max-width: 100%;
    white-space: normal;
  }

  .brand-link__badge {
    overflow-wrap: anywhere;
  }
}


/* Contact buttons */
.contact-actions {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: 16px;
}

.contact-button {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .03);
  color: var(--ink);
  font-weight: 700;
  transition: border-color .18s ease, background-color .18s ease, transform .18s ease;
}

.contact-button svg {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  fill: currentColor;
}

.contact-button:hover {
  border-color: var(--red);
  background: rgba(205, 56, 50, .12);
  text-decoration: none;
  transform: translateY(-2px);
}

.contact-button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.contact-button:active {
  transform: translateY(0);
}

@media (max-width: 700px) {
  .contact-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 380px) {
  .contact-actions {
    grid-template-columns: 1fr;
  }
}

.list {
  display: grid;
  gap: 10px;
}

.list-item {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 12px;
  align-items: start;
}

.mark {
  width: 14px;
  height: 14px;
  margin-top: 4px;
  background: var(--red);
}

.list-text {
  color: var(--muted);
}

.steps {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}

.step {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  align-items: start;
}

.step-no {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: var(--red);
  color: #fff;
  font-weight: 700;
}

.step-text {
  color: var(--muted);
}

.muted {
  margin: 0 0 12px;
  color: var(--muted);
}

.faq {
  display: grid;
  gap: 10px;
}

.faq__item {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, .02);
}

.faq__item summary {
  list-style: none;
  cursor: pointer;
  padding: 14px 16px;
  font-weight: 700;
}

.faq__item summary::-webkit-details-marker {
  display: none;
}

.faq__item summary::after {
  content: "＋";
  float: right;
  color: var(--muted);
  font-weight: 700;
}

.faq__item[open] summary {
  border-bottom: 1px solid var(--line);
}

.faq__item[open] summary::after {
  content: "－";
}

.faq__item summary:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.faq__content {
  padding: 12px 16px 16px;
}

.faq__content p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 20px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.footer-line {
  min-width: 0;
  color: var(--muted);
  font-size: 13px;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
  padding: 18px;
  background: rgba(0, 0, 0, .86);
}

.lightbox.open {
  display: grid;
  place-items: center;
}

.lightbox-close {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 2001;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14, 14, 16, .72);
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
}

.lightbox-close:hover {
  border-color: var(--red);
  background: rgba(205, 56, 50, .18);
}

.lightbox-close:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
}

.lightbox-figure {
  margin: 0;
  width: min(920px, 100%);
}

.lightbox-img {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 78vh;
  margin: 0 auto;
  object-fit: contain;
  border-radius: var(--radius);
  background: var(--tile);
}

.lightbox-cap {
  margin-top: 10px;
  color: var(--muted);
  font-size: 25.2px;
  line-height: 1.3;
}


/* Lightbox sharing controls */
body.is-lightbox-open {
  overflow: hidden;
}

.lightbox-share {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(62px + env(safe-area-inset-right, 0px));
  z-index: 2002;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  padding: 4px;
  border: 0;
  background: transparent;
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.lightbox-share__icon {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
  pointer-events: none;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .8));
}


.lightbox-share[aria-busy="true"] .lightbox-share__icon {
  opacity: .28;
}

.lightbox-share[aria-busy="true"]::after {
  content: "";
  position: absolute;
  top: 14px;
  left: 14px;
  width: 20px;
  height: 20px;
  border: 2px solid rgba(239, 239, 243, .34);
  border-top-color: var(--red);
  border-radius: 50%;
  animation: lightbox-share-spin .7s linear infinite;
}

.lightbox-share:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 4px;
  border-radius: 8px;
}

.lightbox-share-status {
  position: fixed;
  left: 50%;
  bottom: calc(18px + env(safe-area-inset-bottom, 0px));
  z-index: 2003;
  max-width: calc(100vw - 36px);
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(14, 14, 16, .94);
  color: var(--ink);
  font: 600 14px/1.25 system-ui, -apple-system, Segoe UI, Roboto, Inter, Arial, sans-serif;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transform: translate(-50%, 8px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  pointer-events: none;
}

.lightbox-share-status.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translate(-50%, 0);
}

.lightbox-share-status.is-error {
  border-color: var(--red);
}

.clipboard-copy-helper {
  position: fixed;
  left: -9999px;
  opacity: 0;
  pointer-events: none;
}

@keyframes lightbox-share-spin {
  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 767px) {
  .lightbox-share {
    top: calc(8px + env(safe-area-inset-top, 0px));
    right: calc(58px + env(safe-area-inset-right, 0px));
    width: 56px;
    height: 56px;
  }

  .lightbox-share__icon {
    width: 48px;
    height: 48px;
  }

  .lightbox-share[aria-busy="true"]::after {
    top: 16px;
    left: 16px;
  }
}

@media (hover: hover) {
  .lightbox-share:hover .lightbox-share__icon {
    filter: brightness(1.12);
  }
}

@media (prefers-reduced-motion: reduce) {
  .lightbox-share[aria-busy="true"]::after {
    animation-duration: 1.4s;
  }
}

@media (max-width: 420px) {
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ==================================================
   BIRO51 - ARTICLE TEMPLATE STYLES
   ================================================== */

.article {
  margin-top: 24px;
}

.article-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--line);
}

.article-content {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.6;
}

/* Clearfix for floating images */
.article-content::after {
  content: "";
  display: table;
  clear: both;
}

.article-content p {
  margin: 0 0 20px;
}

.article-content h2 {
  color: var(--ink);
  margin: 40px 0 16px;
  font-size: 24px;
  letter-spacing: 0.01em;
  clear: both;
}

.article-content h3 {
  color: var(--ink);
  margin: 32px 0 12px;
  font-size: 20px;
}

/* Base style for article images */
.article-figure {
  margin: 0 0 24px 0;
  width: 100%;
  display: block;
}

.article-figure__cap {
  margin-top: 10px;
  font-size: 14px;
  color: var(--muted);
  text-align: center;
  line-height: 1.4;
}

/* Floats for tablet & desktop: Mimic the 33% width of grid-3 */
@media (min-width: 640px) {
  .article-figure {
    width: calc(33.333% - 16px);
  }
  
  /* Float left: text flows on the right. */
  .article-figure.float-left {
    float: left;
    margin: 6px 24px 16px 0;
  }
  
  /* Float right: text flows on the left. */
  .article-figure.float-right {
    float: right;
    margin: 6px 0 16px 24px;
  }
}

/* Custom Quote Block matching biro51 dark theme */
.article-quote {
  margin: 32px 0;
  padding: 20px 24px;
  border-left: 4px solid var(--red);
  background: linear-gradient(90deg, rgba(205, 56, 50, 0.08) 0%, rgba(255, 255, 255, 0.01) 100%);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 19px;
  font-style: italic;
  color: var(--ink);
  clear: both;
}

.article-quote p {
  margin: 0;
}

.article-quote cite {
  display: block;
  margin-top: 12px;
  font-size: 14px;
  font-style: normal;
  color: var(--muted);
  font-weight: 700;
}

.article-quote cite::before {
  content: "— ";
  color: var(--red);
}

/* Ссылки-кнопки внутри статьи */
.article-link-list .list-item {
  align-items: center;
}

.article-link-list .mark {
  margin-top: 0;
}

.article-link-list .list-text {
  min-width: 0;
  display: flex;
  align-items: center;
}

.article-menu-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  max-width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.03);
  color: var(--ink);
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
  transition:
    border-color 0.18s ease,
    background-color 0.18s ease,
    transform 0.18s ease;
}

.article-menu-link .brand-link__badge {
  color: inherit;
  font-weight: inherit;
}

.article-menu-link:hover {
  border-color: var(--red);
  background: rgba(205, 56, 50, 0.12);
  text-decoration: none;
  transform: translateY(-1px);
}

.article-menu-link:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 3px;
}

.article-menu-link:active {
  transform: translateY(0);
}
