/*
Theme Name: 297 Agency Block Theme
Theme URI: https://297.agency
Description: Блочная Gutenberg FSE тема для digital агентства, основанная на Tailwind CSS.
Author: 297 Agency
Version: 1.0.0
Requires at least: 6.2
Tested up to: 6.5
Tags: full-site-editing, one-column, dark-mode, portfolio
Text Domain: agency297
*/

/* Reset & Global FSE overrides */
body {
    background-color: #050505 !important;
    color: #ffffff !important;
    font-family: "Exo 2", "Inter", sans-serif;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

header,
.wp-block-template-part-header,
header.wp-block-template-part-header {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    height: auto !important;
    background-color: rgba(5, 5, 5, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
    z-index: 999999999 !important;
    transform: translate3d(0, 0, 0) !important;
    overflow: visible !important;
}

.wp-block-template-part {
    position: sticky !important;
    top: 0 !important;
    z-index: 100000 !important;
}

/* Shift the fixed header container down under the WordPress Admin Bar */
body.admin-bar header,
body.admin-bar .wp-block-template-part-header,
body.admin-bar header.wp-block-template-part-header {
    top: 32px !important;
}

@media screen and (max-width: 782px) {
    body.admin-bar header,
    body.admin-bar .wp-block-template-part-header,
    body.admin-bar header.wp-block-template-part-header {
        top: 46px !important;
    }
}

footer {
    background-color: #080808 !important;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

/* Ensure WordPress containers don't override layouts */
.wp-site-blocks {
    background-color: #050505;
}

.wp-block-group {
    max-width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Utility classes required for animations and 3D effects */
.perspective-midrange {
    perspective: 1000px;
}
.transform-style-preserve-3d {
    transform-style: preserve-3d;
}
.mask-gradient-x {
    mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 15%, black 85%, transparent);
}

/* Animations */
@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: .5; }
}

.animate-float {
    animation: float 6s ease-in-out infinite;
}

.animate-pulse {
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Base styles / Helpers */
.interactive-dashboard {
    transition: transform 0.1s ease-out;
}

.blur-sm {
    filter: blur(4px);
}

.translate-y-8 {
    transform: translateY(2rem);
}

.translate-y-0 {
    transform: translateY(0);
}

.opacity-0 {
    opacity: 0;
}

.opacity-100 {
    opacity: 1;
}

.blur-0 {
    filter: blur(0);
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

.duration-1000 {
    transition-duration: 1000ms;
}

.duration-200 {
    transition-duration: 200ms;
}

.delay-100 {
    transition-delay: 100ms;
}

.delay-150 {
    transition-delay: 150ms;
}

.ease-out {
    transition-timing-function: cubic-bezier(0, 0, 0.2, 1);
}

/* Cube Animation */
.cube-wrapper {
  width: 100%;
  height: 100%;
  perspective: 1000px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

.box-card {
  width: 250px;
  height: 250px;
  position: relative;
  transform-style: preserve-3d;
  animation: rotateCube 20s infinite linear;
}

.box-card:hover {
  animation-play-state: paused;
}

.face {
  position: absolute;
  width: 250px;
  height: 250px;
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  display: flex;
  align-items: flex-end;
  padding: 20px;
  text-decoration: none;
  overflow: hidden;
  box-shadow: inset 0 0 60px rgba(0,0,0,0.9), 0 0 20px rgba(0,0,0,0.5);
  transition: all 0.4s ease;
}

.face::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.9) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  z-index: 1;
  transition: opacity 0.4s ease;
}

.face:hover {
  border-color: rgba(16, 185, 129, 0.5);
  box-shadow: inset 0 0 40px rgba(0,0,0,0.7), 0 0 30px rgba(16, 185, 129, 0.2);
}

.face:hover::before {
  opacity: 0.7;
}

.face-title {
  position: relative;
  z-index: 2;
  color: white;
  font-family: 'Orbitron', sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  text-shadow: 0 2px 10px rgba(0,0,0,1);
  transform: translateY(10px);
  opacity: 0.8;
  transition: all 0.4s ease;
}

.face:hover .face-title {
  transform: translateY(0);
  opacity: 1;
  color: #10b981;
}

.face.front  { transform: rotateY(0deg) translateZ(125px); }
.face.back   { transform: rotateY(180deg) translateZ(125px); }
.face.right  { transform: rotateY(90deg) translateZ(125px); }
.face.left   { transform: rotateY(-90deg) translateZ(125px); }
.face.top    { transform: rotateX(90deg) translateZ(125px); }
.face.bottom { transform: rotateX(-90deg) translateZ(125px); }

@keyframes rotateCube {
  0% { transform: rotateX(0deg) rotateY(0deg); }
  100% { transform: rotateX(360deg) rotateY(360deg); }
}

@media (max-width: 768px) {
  .cube-wrapper { min-height: 300px; }
  .box-card { width: 180px; height: 180px; }
  .face { width: 180px; height: 180px; padding: 15px; }
  .face-title { font-size: 1rem; }
  .face.front  { transform: rotateY(0deg) translateZ(90px); }
  .face.back   { transform: rotateY(180deg) translateZ(90px); }
  .face.right  { transform: rotateY(90deg) translateZ(90px); }
  .face.left   { transform: rotateY(-90deg) translateZ(90px); }
  .face.top    { transform: rotateX(90deg) translateZ(90px); }
  .face.bottom { transform: rotateX(-90deg) translateZ(90px); }
}

/* Horizontal scrolling tickers */
@keyframes scroll-left {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

@keyframes scroll-right {
  0% { transform: translateX(-50%); }
  100% { transform: translateX(0); }
}

.animate-scroll-left {
  animation: scroll-left 40s linear infinite;
}

.animate-scroll-right {
  animation: scroll-right 45s linear infinite;
}

/* Diamond Transparency Buttons (Glassmorphism & Shimmer) */
.btn-diamond {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.1rem 2.25rem;
  font-family: 'Exo 2', sans-serif;
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-radius: 9999px; /* Absolute rounded capsule */
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0.08) 100%);
  border: 2px solid rgba(16, 185, 129, 0.45);
  color: #ffffff !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.15), inset 0 0 12px rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px) saturate(130%);
  -webkit-backdrop-filter: blur(14px) saturate(130%);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.btn-diamond::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  );
  transform: skewX(-25deg);
  transition: none;
  animation: shimmer-btn 4.5s infinite ease-in-out;
}

@keyframes shimmer-btn {
  0% { left: -150%; }
  25% { left: 150%; }
  100% { left: 150%; }
}

.btn-diamond:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.38) 0%, rgba(16, 185, 129, 0.15) 100%);
  border-color: rgba(16, 185, 129, 0.85);
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.2);
  transform: translateY(-3px) scale(1.02);
}

.btn-diamond:active {
  transform: translateY(1px) scale(0.98);
  box-shadow: 0 0 15px rgba(16, 185, 129, 0.3), inset 0 0 8px rgba(255, 255, 255, 0.08);
}

/* Secondary Diamond styling (cooler, crisp glass) */
.btn-diamond-secondary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0.95rem 2rem;
  font-family: 'Exo 2', sans-serif;
  font-weight: 500;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9999px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, rgba(255, 255, 255, 0.02) 100%);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: rgba(255, 255, 255, 0.9) !important;
  box-shadow: 0 0 15px rgba(0,0,0,0.2), inset 0 0 8px rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  cursor: pointer;
  text-decoration: none;
}

.btn-diamond-secondary::after {
  content: '';
  position: absolute;
  top: 0;
  left: -150%;
  width: 50%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.18),
    transparent
  );
  transform: skewX(-25deg);
  animation: shimmer-btn 6s infinite ease-in-out;
}

.btn-diamond-secondary:hover {
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.12) 0%, rgba(255, 255, 255, 0.04) 100%);
  border-color: rgba(255, 255, 255, 0.45);
  box-shadow: 0 0 25px rgba(255, 255, 255, 0.1), inset 0 0 10px rgba(255, 255, 255, 0.1);
  transform: translateY(-2px);
  color: #ffffff !important;
}

.btn-diamond-secondary:active {
  transform: translateY(1px);
}

/* AUTOMATIC WORDPRESS BUTTON OVERRIDES FOR PERFECT MATCH */
.wp-block-button {
  background: transparent !important;
  border: none !important;
  padding: 0 !important;
  box-shadow: none !important;
  display: inline-block !important;
  border-radius: 0 !important;
  margin: 0 !important;
  overflow: visible !important;
}

/* Force WordPress buttons to exactly inherit btn-diamond style */
.wp-block-button__link, .wp-element-button {
  position: relative !important;
  overflow: hidden !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  padding: 1.1rem 2.5rem !important;
  font-family: 'Exo 2', sans-serif !important;
  font-weight: 700 !important;
  font-size: 0.85rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  border-radius: 9999px !important;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.22) 0%, rgba(16, 185, 129, 0.08) 100%) !important;
  border: 2px solid rgba(16, 185, 129, 0.45) !important;
  color: #ffffff !important;
  box-shadow: 0 0 25px rgba(16, 185, 129, 0.15), inset 0 0 12px rgba(255, 255, 255, 0.06) !important;
  backdrop-filter: blur(14px) saturate(130%) !important;
  -webkit-backdrop-filter: blur(14px) saturate(130%) !important;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1) !important;
  cursor: pointer !important;
  text-decoration: none !important;
}

.wp-block-button__link::after, .wp-element-button::after {
  content: '' !important;
  position: absolute !important;
  top: 0 !important;
  left: -150% !important;
  width: 60% !important;
  height: 100% !important;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.35),
    transparent
  ) !important;
  transform: skewX(-25deg) !important;
  transition: none !important;
  animation: shimmer-btn 4.5s infinite ease-in-out !important;
}

.wp-block-button__link:hover, .wp-element-button:hover {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.38) 0%, rgba(16, 185, 129, 0.15) 100%) !important;
  border-color: rgba(16, 185, 129, 0.85) !important;
  box-shadow: 0 0 40px rgba(16, 185, 129, 0.5), inset 0 0 15px rgba(255, 255, 255, 0.2) !important;
  transform: translateY(-3px) scale(1.02) !important;
  color: #ffffff !important;
}

/* Secondary outline button for WordPress styling (crisp transparent glass) */
.wp-block-button.is-style-outline .wp-block-button__link,
.wp-block-button.is-style-outline .wp-element-button {
  background: linear-gradient(135deg, rgba(23, 23, 23, 0.8) 0%, rgba(10, 10, 10, 0.9) 100%) !important;
  border: 2px solid rgba(255, 255, 255, 0.1) !important;
  color: rgba(255, 255, 255, 0.95) !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4), inset 0 0 10px rgba(255, 255, 255, 0.02) !important;
}

.wp-block-button.is-style-outline .wp-block-button__link:hover,
.wp-block-button.is-style-outline .wp-element-button:hover {
  background: linear-gradient(135deg, rgba(38, 38, 38, 0.9) 0%, rgba(23, 23, 23, 0.95) 100%) !important;
  border-color: rgba(255, 255, 255, 0.3) !important;
  box-shadow: 0 4px 30px rgba(255, 255, 255, 0.08), inset 0 1px 15px rgba(255, 255, 255, 0.05) !important;
  color: #ffffff !important;
}

/* Footer social links alignment fix */
.footer-social-links {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 12px !important;
}

.footer-social-links a,
.wp-block-group.footer-social-links a {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}

/* WordPress Urban Drips & Graffiti Background */
body, .editor-styles-wrapper {
  background-image: 
    /* noise bg */
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)' opacity='0.05'/%3E%3C/svg%3E"),
    /* green splatter top left */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 400 400'%3E%3Cdefs%3E%3Cfilter id='blur'%3E%3CfeGaussianBlur stdDeviation='5'/%3E%3C/filter%3E%3C/defs%3E%3Cg fill='%2310b981' opacity='0.12'%3E%3Ccircle cx='200' cy='200' r='90' filter='url(%23blur)'/%3E%3Ccircle cx='130' cy='150' r='12'/%3E%3Ccircle cx='290' cy='180' r='8'/%3E%3Ccircle cx='230' cy='290' r='14'/%3E%3Ccircle cx='100' cy='250' r='6'/%3E%3C/g%3E%3C/svg%3E"),
    /* creative tag mid-bottom */
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 120'%3E%3Ctext x='20' y='80' fill='%2310b981' font-family='sans-serif' font-size='64' font-weight='900' letter-spacing='4' opacity='0.08' filter='blur(1.5px)'%3ECREAT%3C/text%3E%3Ctext x='20' y='80' fill='none' stroke='%2310b981' stroke-width='3' font-family='sans-serif' font-size='64' font-weight='900' opacity='0.08' letter-spacing='4'%3ECREAT%3C/text%3E%3Cpath d='M35,90 Q 150,110 265,85' stroke='%2310b981' stroke-width='5' opacity='0.08' fill='none' stroke-linecap='round'/%3E%3C/svg%3E") !important;
  background-repeat: no-repeat, no-repeat, no-repeat !important;
  background-position: top left, 5% 15%, 85% 75% !important;
  background-size: auto, 450px 450px, 320px 180px !important;
  background-attachment: scroll, scroll, scroll !important;
}

/* Premium Urban CSS Drips */
.urban-drip-emerald {
  position: relative !important;
}
.urban-drip-emerald::after {
  content: "" !important;
  position: absolute !important;
  bottom: -18px !important;
  left: 0 !important;
  width: 100% !important;
  height: 20px !important;
  background-repeat: repeat-x !important;
  background-size: 240px 20px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24' fill='%2310b981'%3E%3Cpath d='M0 0h240v6c-5 1-10 3-12 5-1 2-2 5-2 8 0 3-2 5-4 5s-4-2-4-5c0-4-3-8-8-10-2-1-4-1-6 0-3 1-5 5-5 8 0 4-3 7-6 7s-6-3-6-7c0-2-1-6-4-8-2-1-5 0-7 2-3 3-4 8-4 11 0 3-2 5-4 5s-4-2-4-5c0-4-4-9-10-9-4 0-8 3-10 6-1 2-2 4-2 6 0 3-2 5-4 5s-4-2-4-5V0z'/%3E%3C/svg%3E") !important;
  z-index: 10 !important;
  pointer-events: none !important;
  opacity: 0.85 !important;
}

.urban-drip-white {
  position: relative !important;
}
.urban-drip-white::after {
  content: "" !important;
  position: absolute !important;
  bottom: -18px !important;
  left: 0 !important;
  width: 100% !important;
  height: 20px !important;
  background-repeat: repeat-x !important;
  background-size: 240px 20px !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 240 24' fill='%23ffffff'%3E%3Cpath d='M0 0h240v6c-5 1-10 3-12 5-1 2-2 5-2 8 0 3-2 5-4 5s-4-2-4-5c0-4-3-8-8-10-2-1-4-1-6 0-3 1-5 5-5 8 0 4-3 7-6 7s-6-3-6-7c0-2-1-6-4-8-2-1-5 0-7 2-3 3-4 8-4 11 0 3-2 5-4 5s-4-2-4-5c0-4-4-9-10-9-4 0-8 3-10 6-1 2-2 4-2 6 0 3-2 5-4 5s-4-2-4-5V0z'/%3E%3C/svg%3E") !important;
  z-index: 10 !important;
  pointer-events: none !important;
  opacity: 0.15 !important;
}

