/* =========================================================
   ТаИна — общие стили (токены, reset, шапка, подвал, лайтбокс)
   Подключается на всех страницах перед page-специфичным CSS.
   ========================================================= */

/* ---------- локальный шрифт названия (бренда) ---------- */
@font-face {
  font-family: 'Durik';
  src: url('../fonts/durik.woff') format('woff'),
       url('../fonts/durik.otf') format('opentype');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --espresso: #2B1D14;
  --cream: #F7EFE3;
  --caramel: #B5754B;
  --cocoa: #8A6D4E;
  --latte: #E8C39E;
  --deep: #4A3826;

  --font-body: 'Manrope', system-ui, sans-serif;
  --font-display: 'Fraunces', Georgia, serif;
  --font-brand: 'Durik', cursive, sans-serif;

  --ease-out: cubic-bezier(.2, .8, .2, 1);
  --ease-reveal: cubic-bezier(.2, .7, .2, 1);
  --content-width: 1080px;
  --gutter: 28px;
}

/* ---------- reset / base ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  background: var(--cream);
  color: var(--espresso);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, .display {
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: -0.01em;
}

:focus-visible { outline: 2px solid var(--caramel); outline-offset: 3px; }

/* ---------- символ белорусского рубля ---------- */
.byn {
  display: inline-block;
  vertical-align: -0.08em;
  width: 0.72em;
  height: 0.89em;
  background-color: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 647 800'%3E%3Cpath fill-rule='evenodd' d='M113 0H558V89H202V329H411.5A235.5 235.5 0 0 1 411.5 800H113V609H0V520H113V0ZM202 418H411.5A146.5 146.5 0 0 1 411.5 711H202V609H404V520H202V418Z'/%3E%3C/svg%3E") no-repeat center / contain;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 647 800'%3E%3Cpath fill-rule='evenodd' d='M113 0H558V89H202V329H411.5A235.5 235.5 0 0 1 411.5 800H113V609H0V520H113V0ZM202 418H411.5A146.5 146.5 0 0 1 411.5 711H202V609H404V520H202V418Z'/%3E%3C/svg%3E") no-repeat center / contain;
}

/* grain texture overlay */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  z-index: 9999;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

.wrap {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.eyebrow {
  font-size: 12.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--caramel);
  font-weight: 700;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 12px;
  z-index: 30000;
  background: var(--espresso);
  color: var(--cream);
  padding: 10px 16px;
  border-radius: 8px;
  font-weight: 600;
  transition: top 0.2s;
}
.skip-link:focus { top: 12px; }

/* ---------- nav ---------- */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 239, 227, 0.88);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(43, 29, 20, 0.08);
}
.nav-inner {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 16px var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.brand {
  font-family: var(--font-brand);
  font-size: 28px;
  color: var(--deep);
  font-weight: normal;
  letter-spacing: 0.02em;
}
.nav-links {
  display: flex;
  gap: 28px;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--deep);
}
.nav-links a { opacity: 0.75; transition: opacity 0.2s; }
.nav-links a:hover,
.nav-links a[aria-current] { opacity: 1; }
.nav-cta {
  background: var(--espresso);
  color: var(--cream);
  padding: 9px 18px;
  border-radius: 100px;
  font-size: 13.5px;
  font-weight: 700;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .nav-links { display: none; }
}

/* ---------- scroll progress ---------- */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--caramel), var(--latte));
  transform: scaleX(0);
  transform-origin: 0 50%;
  will-change: transform;
  z-index: 10000;
}

/* ---------- scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-reveal), transform 0.8s var(--ease-reveal);
}
.reveal.in-view { opacity: 1; transform: none; }

/* ---------- footer ---------- */
.site-footer {
  background: var(--espresso);
  color: rgba(247, 239, 227, 0.55);
  padding: 56px 0 28px;
}
.footer-inner {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 48px;
  align-items: start;
  padding-bottom: 40px;
}
@media (max-width: 720px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}
.footer-brand { display: flex; align-items: center; gap: 12px; }
.footer-cup { width: 44px; height: 44px; flex-shrink: 0; }
.footer-cup svg { width: 100%; height: 100%; stroke: var(--cream); }
.footer-brand-name {
  font-family: var(--font-brand);
  font-size: 30px;
  color: var(--cream);
  line-height: 1;
  font-weight: normal;
  letter-spacing: 0.02em;
}
.legal-block { font-size: 14px; line-height: 1.85; max-width: 46ch; }
.image-rights-note {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(247, 239, 227, 0.12);
  font-size: 12px;
  line-height: 1.7;
  opacity: 0.75;
}
.image-rights-note a { color: var(--latte); text-decoration: underline; }
.footer-mid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
  padding: 28px 0;
  border-top: 1px solid rgba(247, 239, 227, 0.1);
}
.footer-social-row { display: flex; gap: 12px; }
.footer-social-row a {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid rgba(247, 239, 227, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.2s, background 0.2s, transform 0.25s;
}
.footer-social-row a:hover {
  border-color: var(--caramel);
  background: rgba(181, 117, 75, 0.15);
  transform: translateY(-3px);
}
.footer-social-row svg { width: 17px; height: 17px; stroke: var(--cream); }
.footer-badge {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(247, 239, 227, 0.7);
  transition: color 0.3s;
}
.footer-badge .dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: #7FBF7F;
  box-shadow: 0 0 0 3px rgba(127, 191, 127, 0.2);
  transition: background 0.3s, box-shadow 0.3s;
}
.footer-badge.is-closed {
  color: rgba(247, 239, 227, 0.45);
}
.footer-badge.is-closed .dot {
  background: #E57373;
  box-shadow: 0 0 0 3px rgba(229, 115, 115, 0.2);
}
.footer-bottom {
  padding-top: 22px;
  border-top: 1px solid rgba(247, 239, 227, 0.1);
  text-align: center;
  font-size: 13px;
}

/* ---------- lightbox (общая основа) ---------- */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(20, 13, 9, 0.88);
  backdrop-filter: blur(4px);
  z-index: 20000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}
.lightbox-overlay.open {
  opacity: 1;
  visibility: visible;
  transition: opacity 0.3s ease, visibility 0s;
}
.lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  transform: scale(0.93);
  transition: transform 0.3s var(--ease-out);
}
.lightbox-overlay.open .lightbox-content { transform: none; }
.lightbox-body {
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
}
.lightbox-close {
  position: absolute;
  top: -46px;
  right: -6px;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(247, 239, 227, 0.16);
  border: 1px solid rgba(247, 239, 227, 0.35);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}
.lightbox-close:hover { background: rgba(247, 239, 227, 0.28); transform: rotate(90deg); }
.lightbox-close svg { width: 18px; height: 18px; stroke: var(--cream); }
@media (max-width: 480px) {
  .lightbox-close { top: -44px; right: 0; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.in-view { opacity: 1; transform: none; transition: none; }
  .lightbox-overlay, .lightbox-content { transition: none; }
}
