html { scroll-behavior: smooth; }
body { margin: 0; background: #040608; color: #fff; font-family: Manrope, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: #FFA32E; text-decoration: none; }
a:hover { color: #FFC272; }
::selection { background: #FFA32E; color: #040608; }
* { box-sizing: border-box; }
button { font: inherit; }

@keyframes reveal { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: none; } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
@keyframes float1 { 0%, 100% { transform: translate3d(0,0,0) rotate(0deg); } 50% { transform: translate3d(0,-18px,0) rotate(6deg); } }
@keyframes float2 { 0%, 100% { transform: translate3d(0,0,0) rotate(0deg); } 50% { transform: translate3d(10px,14px,0) rotate(-8deg); } }
@keyframes drift1 { 0%, 100% { transform: translate3d(0,0,0) rotate(0deg); } 25% { transform: translate3d(110px,-70px,0) rotate(18deg); } 50% { transform: translate3d(40px,-150px,0) rotate(36deg); } 75% { transform: translate3d(-90px,-60px,0) rotate(14deg); } }
@keyframes drift2 { 0%, 100% { transform: translate3d(0,0,0) rotate(0deg); } 30% { transform: translate3d(-120px,60px,0) rotate(-22deg); } 60% { transform: translate3d(-40px,150px,0) rotate(-40deg); } 80% { transform: translate3d(90px,70px,0) rotate(-14deg); } }
@keyframes drift3 { 0%, 100% { transform: translate3d(0,0,0) rotate(0deg); } 35% { transform: translate3d(100px,90px,0) rotate(26deg); } 70% { transform: translate3d(-110px,-90px,0) rotate(-20deg); } }
@keyframes glow { 0%, 100% { opacity: .55; } 50% { opacity: .9; } }

[data-reveal] { opacity: 0; }
[data-reveal].is-visible { animation: reveal .8s cubic-bezier(.2,.7,.2,1) both; }

.hover-orange:hover { border-color: #FFA32E !important; color: #FFA32E !important; }
.hover-orange-bg:hover { background: #FFC272 !important; }
.niche-chip { transition: transform .2s ease, border-color .2s ease, background-color .2s ease, color .2s ease, box-shadow .2s ease; cursor: default; }
.niche-chip:hover { transform: translateY(-2px); border-color: #FFA32E !important; background: rgba(255,163,46,0.14) !important; color: #fff !important; box-shadow: 0 6px 18px rgba(255,163,46,0.15); }
@media (prefers-reduced-motion: reduce) { .niche-chip { transition: none; } .niche-chip:hover { transform: none; } }

a[href]:focus-visible, button:focus-visible, [tabindex]:focus-visible { outline: 2px solid #FFA32E; outline-offset: 2px; }

[hidden] { display: none !important; }

.photo-slot { position: relative; width: 100%; height: 100%; overflow: hidden; background: rgba(255,255,255,0.03); }
.photo-slot img { width: 100%; height: 100%; object-fit: cover; display: block; }
.photo-slot .placeholder { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px; font-size: 13px; line-height: 1.4; color: rgba(255,255,255,0.35); border: 1px dashed rgba(255,255,255,0.16); }

/* why-brands: the girl stands on the bottom edge of the section, right on top of the next block */
@media (min-width: 761px) {
  .brands-right { padding-bottom: 40px; }
}
@media (max-width: 760px) {
  #why-brands { padding-bottom: 80px !important; }
  /* the girl stands right on top of the first cards, no gap */
  #why-brands [data-two] { row-gap: 0 !important; }
  #why-brands .brands-girl { padding-top: 0; }
  #why-brands .brands-girl img { margin-bottom: -1px; }
}

/* local preview only: section is switched off in the admin and hidden on the live site */
[data-preview-hidden] { outline: 2px dashed #ff6b6b; outline-offset: -2px; position: relative; }
[data-preview-hidden]::before { content: 'Скрыт на сайте (виден только локально)'; position: absolute; top: 10px; left: 10px; z-index: 50; padding: 5px 10px; background: #ff6b6b; color: #0b0d10; font: 700 12px/1.2 sans-serif; letter-spacing: 0.04em; pointer-events: none; }

@media (max-width: 1320px) {
  [data-nav-links] { gap: 16px !important; font-size: 13px !important; }
}
@media (max-width: 1180px) {
  [data-nav-links] { display: none !important; }
}
@media (max-width: 1100px) {
  [data-hero-side] { display: none !important; }
  [data-hero-robot] { width: 92vw !important; margin-left: -46vw !important; opacity: 0.55; }
  [data-hero-planet] { width: 96vw !important; margin-left: -48vw !important; bottom: -30vw !important; opacity: 0.55; }
}
@media (max-width: 1000px) {
  [data-format-grid] { grid-template-columns: repeat(2, minmax(0,1fr)) !important; }
}
@media (max-width: 760px) {
  [data-pad] { padding-left: 20px !important; padding-right: 20px !important; }
  [data-two] { grid-template-columns: 1fr !important; }
  [data-nav-cta2] { display: none !important; }
}

/* ---- anchors, reduced motion ---- */
html { scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; scroll-behavior: auto !important; }
  [data-reveal] { opacity: 1 !important; }
}
[data-two] > * { min-width: 0; }

/* ---- tablet / phone ---- */
@media (max-width: 1000px) {
  [data-sticky] { position: static !important; }
}
@media (max-width: 760px) {
  header[data-pad] { padding-top: 12px !important; padding-bottom: 12px !important; gap: 12px !important; }
  [data-brand] { font-size: 15px !important; }
  header a[data-coop] { padding: 10px 12px !important; font-size: 12px !important; }

  section[data-pad]:not(#hero) { padding-top: 64px !important; padding-bottom: 64px !important; }
  #guests { padding-top: 16px !important; }
  #hero { padding-top: 72px !important; }
  [data-hero-logo] { margin-top: 0 !important; }
  [data-hero-col] { max-width: 100% !important; min-width: 0 !important; }
  [data-hero-cta] > a { flex: 1 1 100%; justify-content: center; padding: 16px 20px !important; }

  [data-quote] { min-height: 52vh !important; padding: 64px 20px !important; }
  [data-box] { padding: 24px !important; }
  [data-goal-row] { grid-template-columns: 52px 1fr !important; gap: 14px !important; padding: 20px 0 !important; }
  #jury-grid, #guests-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; gap: 12px !important; }
  [data-format-grid] > div { padding: 20px !important; min-height: 130px !important; }
  [data-format-grid] > div > div:first-child { font-size: 30px !important; }
  #results-stats > :last-child:nth-child(odd) { grid-column: 1 / -1; }
  #results-works-list { max-height: 380px !important; }
  #cookie-banner { left: 12px !important; right: 12px !important; bottom: 12px !important; max-width: none !important; padding: 14px !important; }
  a, button { -webkit-tap-highlight-color: transparent; }
}
@media (max-width: 760px) {
  [data-card-title] { font-size: 27px !important; }
}
@media (max-width: 760px) {
  [data-stats] > div { padding: 12px 10px !important; }
  [data-stats] > div > div:first-child { font-size: 22px !important; }
  [data-stats] > div > div:last-child { font-size: 10px !important; letter-spacing: 0.06em !important; overflow-wrap: anywhere; }
}
.br-m { display: none; }
@media (max-width: 760px) {
  .br-m { display: inline; }
  [data-hero-robot] { bottom: auto !important; top: 150px !important; opacity: 0.92 !important; }
  /* the green cloud follows the figure: same centre as the robot (top 150px, 92vw square) */
  [data-hero-smoke] { bottom: auto !important; top: calc(150px - 9vw) !important; width: 110vw !important; margin-left: -55vw !important; }
}
@media (max-width: 760px) {
  [data-hero-robot] img { -webkit-mask-image: linear-gradient(180deg, #000 68%, transparent 100%); mask-image: linear-gradient(180deg, #000 68%, transparent 100%); }
}

/* ---- lead form modal ---- */
.lead-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.lead-modal[hidden] { display: none; }
.lead-backdrop { position: absolute; inset: 0; background: rgba(0,0,0,0.72); backdrop-filter: blur(4px); }
.lead-dialog { position: relative; width: 100%; max-width: 620px; max-height: calc(100svh - 32px); overflow-y: auto; background: #0D0D0D; border: 1px solid rgba(255,163,46,0.45); padding: 34px; animation: reveal .3s ease both; }
.lead-x { all: unset; position: absolute; top: 10px; right: 14px; font-size: 30px; line-height: 1; color: rgba(255,255,255,0.6); cursor: pointer; padding: 6px; }
.lead-x:hover { color: #FFA32E; }
.lead-dialog h3 { margin: 0 0 6px; font-family: Tektur, sans-serif; font-weight: 800; font-size: 28px; line-height: 1.1; text-transform: uppercase; }
.lead-sub { margin: 0 0 18px; color: rgba(255,255,255,0.65); font-size: 15px; line-height: 1.5; }
.lead-dialog label { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.lead-dialog input[type=text], .lead-dialog input[type=email], .lead-dialog select, .lead-dialog textarea { font: 400 16px Manrope, sans-serif; letter-spacing: 0; text-transform: none; color: #fff; background: #040608; border: 1px solid rgba(255,255,255,0.18); border-radius: 2px; padding: 12px 14px; width: 100%; box-sizing: border-box; }
.lead-dialog textarea { resize: vertical; }
.lead-dialog input:focus, .lead-dialog select:focus, .lead-dialog textarea:focus { outline: none; border-color: #FFA32E; }
.lead-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lead-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.lead-dialog .lead-consent { flex-direction: row; align-items: flex-start; gap: 10px; font-size: 13px; font-weight: 400; letter-spacing: 0; text-transform: none; line-height: 1.45; color: rgba(255,255,255,0.7); }
.lead-consent input { margin-top: 3px; accent-color: #FFA32E; width: 18px; height: 18px; flex: none; }
.lead-error { margin: 0 0 14px; color: #ff6b6b; font-size: 14px; }
.lead-submit { all: unset; box-sizing: border-box; cursor: pointer; display: inline-flex; background: #FFA32E; color: #040608; font-family: Tektur, sans-serif; font-weight: 800; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; padding: 18px 28px; border-radius: 2px; }
.lead-submit[disabled] { opacity: 0.6; cursor: default; }
@media (max-width: 560px) {
  .lead-dialog { padding: 26px 18px; }
  .lead-row { grid-template-columns: 1fr; gap: 0; }
  .lead-submit { width: 100%; justify-content: center; }
}

/* ---- tester gate stub ---- */
#gate { position: fixed; inset: 0; z-index: 9999; display: flex; align-items: center; justify-content: center; padding: 24px; background: #040608 url(../assets/hero-bg.png) center/cover no-repeat; }
#gate[hidden] { display: none; }
#gate::before { content: ''; position: absolute; inset: 0; background: rgba(4,6,8,0.78); }
#gate-form { position: relative; width: 100%; max-width: 520px; display: flex; flex-direction: column; align-items: center; gap: 18px; text-align: center; }
.gate-logo { width: min(440px, 80vw); height: auto; display: block; }
#gate-title { margin: 0; font-family: Tektur, sans-serif; font-weight: 800; font-size: clamp(26px, 4vw, 38px); line-height: 1.1; text-transform: uppercase; color: #FFA32E; }
#gate-text { margin: 0; font-size: 17px; line-height: 1.5; color: rgba(255,255,255,0.75); }
.gate-row { display: flex; gap: 10px; width: 100%; }
#gate-pass { flex: 1; min-width: 0; font: 400 17px Manrope, sans-serif; color: #fff; background: rgba(4,6,8,0.85); border: 1px solid rgba(255,255,255,0.25); border-radius: 2px; padding: 15px 16px; }
#gate-pass:focus { outline: none; border-color: #FFA32E; }
#gate-btn { all: unset; box-sizing: border-box; cursor: pointer; background: #FFA32E; color: #040608; font-family: Tektur, sans-serif; font-weight: 800; font-size: 16px; letter-spacing: 0.06em; text-transform: uppercase; padding: 15px 24px; border-radius: 2px; }
#gate-btn:hover { background: #FFC272; }
#gate-error { color: #ff6b6b; font-size: 14px; }
