/* ==========================================================================
   BREAKING BAD — CINEMATIC CUSTOM CSS
   Фон: локальный image asset, сгенерированный специально под дизайн
   ========================================================================== */

:root {
  --bb-black: #050704;
  --bb-bg: #0a0e08;
  --bb-panel: rgba(8, 13, 7, .80);

  --bb-green: #91c11e;
  --bb-acid: #c7ff27;
  --bb-green-dark: #375815;

  --bb-yellow: #e3c52e;
  --bb-gold: #f4d85b;

  --bb-text: #ecebdc;
  --bb-muted: #a7aa91;

  --bb-border: rgba(145, 193, 30, .32);

  --bb-glow-green: 0 0 12px rgba(145,193,30,.35),
                   0 0 35px rgba(145,193,30,.12);

  --bb-glow-yellow: 0 0 12px rgba(227,197,46,.35),
                    0 0 35px rgba(227,197,46,.10);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  min-height: 100vh;
  margin: 0;

  color: var(--bb-text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system,
    BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;

  background:
    linear-gradient(
      90deg,
      rgba(3, 5, 3, .84) 0%,
      rgba(3, 5, 3, .56) 34%,
      rgba(3, 5, 3, .78) 100%
    ),
    url("breaking-bad-bg.png") center / cover fixed no-repeat;

  overflow-x: hidden;
}

/* Затемнение + лабораторный туман */
body::before {
  content: "";
  position: fixed;
  inset: -15%;
  z-index: -1;
  pointer-events: none;

  background:
    radial-gradient(circle at 18% 45%, rgba(183,255,31,.14), transparent 22%),
    radial-gradient(circle at 72% 28%, rgba(94,150,19,.12), transparent 26%),
    radial-gradient(circle at 78% 88%, rgba(0,255,120,.10), transparent 20%);

  filter: blur(20px);
  animation: ambientPulse 7s ease-in-out infinite alternate;
}

/* Плёнка / скан-линии */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 100;
  pointer-events: none;
  opacity: .045;

  background:
    repeating-linear-gradient(
      0deg,
      rgba(255,255,255,.06) 0,
      rgba(255,255,255,.06) 1px,
      transparent 1px,
      transparent 4px
    );

  mix-blend-mode: overlay;
}

/* --------------------------------------------------------------------------
   ШАПКА
   -------------------------------------------------------------------------- */

.site-header {
  position: relative;
  z-index: 20;

  padding: .85rem 1.35rem;

  background: rgba(4, 7, 4, .68);
  backdrop-filter: blur(16px) saturate(125%);

  border-bottom: 1px solid rgba(145,193,30,.22);

  box-shadow:
    0 8px 35px rgba(0,0,0,.42),
    inset 0 -1px 0 rgba(227,197,46,.08);

  animation: headerIn .8s ease both;
}

.site-header::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 100%;
  height: 2px;

  background:
    linear-gradient(
      90deg,
      transparent,
      var(--bb-green),
      var(--bb-yellow),
      var(--bb-green),
      transparent
    );

  box-shadow: var(--bb-glow-green);
  animation: energyLine 4s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   ОСНОВНАЯ КАРТОЧКА
   -------------------------------------------------------------------------- */

.container {
  position: relative;
  isolation: isolate;

  max-width: 720px;
  margin: 2.5rem auto;
  padding: 2.25rem 1.9rem;

  background:
    linear-gradient(
      145deg,
      rgba(11,16,9,.86),
      rgba(4,7,4,.74)
    );

  backdrop-filter: blur(17px) saturate(120%);

  border: 1px solid var(--bb-border);
  border-radius: 7px;

  box-shadow:
    0 25px 70px rgba(0,0,0,.62),
    0 0 60px rgba(90,140,20,.08),
    inset 0 0 50px rgba(145,193,30,.025);

  overflow: hidden;

  animation: cardEnter .9s cubic-bezier(.16,1,.3,1) both;
}

.container::before {
  content: "";
  position: absolute;
  inset: -1px;
  z-index: -1;
  pointer-events: none;

  background:
    radial-gradient(circle at 15% 0%, rgba(199,255,39,.10), transparent 28%),
    radial-gradient(circle at 100% 100%, rgba(0,255,125,.08), transparent 24%);

  animation: panelBreath 5s ease-in-out infinite;
}

.container::after {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 3px;

  background:
    linear-gradient(
      90deg,
      var(--bb-green-dark),
      var(--bb-acid),
      var(--bb-yellow),
      var(--bb-acid),
      var(--bb-green-dark)
    );

  box-shadow:
    0 0 16px rgba(199,255,39,.28);

  animation: energyLine 3.5s ease-in-out infinite;
}

/* --------------------------------------------------------------------------
   ТЕКСТ
   -------------------------------------------------------------------------- */

.site-title {
  margin: 0;

  color: var(--bb-acid);

  font-size: clamp(1.65rem, 4vw, 2.15rem);
  font-weight: 900;
  line-height: 1.05;
  letter-spacing: -.035em;
  text-transform: uppercase;

  text-shadow:
    0 2px 0 rgba(0,0,0,.70),
    0 0 8px rgba(199,255,39,.16);

  animation: titleFlicker 6s infinite;
}

.site-title::after {
  content: "";
  display: block;

  width: 90px;
  height: 3px;
  margin-top: 11px;

  background:
    linear-gradient(
      90deg,
      var(--bb-acid),
      var(--bb-yellow)
    );

  box-shadow: var(--bb-glow-green);
  transform-origin: left;
  animation: titleUnderline 3s ease-in-out infinite;
}

.site-description {
  margin-top: .85rem;
  color: var(--bb-muted);

  font-size: 1.03rem;
  line-height: 1.65;
}

.content {
  color: #dedfce;
  font-size: 1rem;
  line-height: 1.58;
}

.content p {
  margin: .45em 0;
}

.content a {
  color: var(--bb-acid);
  text-decoration: none;

  border-bottom: 1px solid rgba(199,255,39,.34);

  transition:
    color .2s ease,
    border-color .2s ease,
    text-shadow .2s ease;
}

.content a:hover {
  color: var(--bb-gold);
  border-color: var(--bb-gold);
  text-shadow: 0 0 10px rgba(244,216,91,.28);
}

.content h1,
.content h2,
.content h3 {
  color: var(--bb-gold);
  text-transform: uppercase;
  letter-spacing: .025em;
}

.content h2 {
  padding-left: .75rem;
  border-left: 3px solid var(--bb-green);
  box-shadow: -6px 0 18px rgba(145,193,30,.06);
}

/* --------------------------------------------------------------------------
   КНОПКИ
   -------------------------------------------------------------------------- */

.contact-btn {
  position: relative;
  isolation: isolate;

  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;

  padding: .75rem 1.3rem;

  color: #0a0c07 !important;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .035em;

  background:
    linear-gradient(
      135deg,
      #78a51c 0%,
      #c2dc2f 48%,
      #76921d 100%
    );

  border: 1px solid rgba(244,216,91,.42);
  border-radius: 5px;

  box-shadow:
    0 8px 22px rgba(0,0,0,.42),
    0 0 20px rgba(145,193,30,.16);

  overflow: hidden;

  transform: translateZ(0);

  transition:
    transform .22s cubic-bezier(.2,.8,.2,1),
    filter .22s ease,
    box-shadow .22s ease;
}

.contact-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background:
    linear-gradient(
      115deg,
      transparent 20%,
      rgba(255,255,255,.42) 45%,
      transparent 65%
    );

  transform: translateX(-140%);
  transition: transform .55s ease;
}

.contact-btn:hover {
  transform: translateY(-3px) scale(1.025);
  filter: brightness(1.07);

  box-shadow:
    0 12px 30px rgba(0,0,0,.52),
    0 0 28px rgba(199,255,39,.24);
}

.contact-btn:hover::before {
  transform: translateX(140%);
}

.contact-btn:active {
  transform: translateY(0) scale(.985);
}

/* --------------------------------------------------------------------------
   КАРТОЧКИ
   -------------------------------------------------------------------------- */

.card,
.info-card,
.block {
  background:
    linear-gradient(
      145deg,
      rgba(22,30,15,.74),
      rgba(6,9,5,.76)
    );

  border: 1px solid rgba(145,193,30,.18);
  border-radius: 5px;

  box-shadow:
    0 15px 30px rgba(0,0,0,.28),
    inset 0 1px 0 rgba(255,255,255,.025);

  transition:
    border-color .25s ease,
    transform .25s ease,
    box-shadow .25s ease;
}

.card:hover,
.info-card:hover,
.block:hover {
  transform: translateY(-2px);
  border-color: rgba(199,255,39,.36);

  box-shadow:
    0 18px 38px rgba(0,0,0,.38),
    0 0 24px rgba(145,193,30,.09);
}

/* --------------------------------------------------------------------------
   КАЛЬКУЛЯТОР
   -------------------------------------------------------------------------- */

.calculator-card {
  position: relative;
  overflow: hidden;

  margin-top: 1.5rem;
  padding: 1.2rem;

  background:
    linear-gradient(
      145deg,
      rgba(11,16,8,.92),
      rgba(4,7,4,.86)
    );

  border: 1px solid rgba(145,193,30,.25);
  border-radius: 6px;

  box-shadow:
    0 15px 35px rgba(0,0,0,.48),
    inset 0 0 30px rgba(145,193,30,.025);
}

.calculator-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;

  background:
    repeating-linear-gradient(
      135deg,
      var(--bb-yellow) 0 11px,
      #10130b 11px 22px
    );

  opacity: .78;
}

.calculator-card::after {
  content: "";
  position: absolute;
  width: 170px;
  height: 170px;
  right: -60px;
  bottom: -80px;

  background: radial-gradient(
    circle,
    rgba(0,255,120,.16),
    transparent 68%
  );

  filter: blur(10px);
  animation: calcGlow 4s ease-in-out infinite;
}

.calc-card-title {
  color: var(--bb-acid);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;

  text-shadow:
    0 0 10px rgba(199,255,39,.15);
}

.calc-result-sum {
  color: var(--bb-gold);
  font-weight: 900;

  text-shadow:
    0 0 11px rgba(244,216,91,.18);
}

/* --------------------------------------------------------------------------
   ПОЛЯ
   -------------------------------------------------------------------------- */

input,
textarea,
select {
  color: var(--bb-text);

  background: rgba(4,7,4,.88);

  border: 1px solid rgba(145,193,30,.18);
  border-radius: 4px;

  outline: none;

  transition:
    border-color .2s ease,
    box-shadow .2s ease,
    background .2s ease;
}

input:hover,
textarea:hover,
select:hover {
  border-color: rgba(145,193,30,.34);
}

input:focus,
textarea:focus,
select:focus {
  background: rgba(8,12,7,.94);

  border-color: rgba(199,255,39,.58);

  box-shadow:
    0 0 0 3px rgba(199,255,39,.07),
    0 0 18px rgba(145,193,30,.12);
}

/* --------------------------------------------------------------------------
   СКРОЛЛБАР
   -------------------------------------------------------------------------- */

::-webkit-scrollbar {
  width: 10px;
}

::-webkit-scrollbar-track {
  background: #050704;
}

::-webkit-scrollbar-thumb {
  border: 2px solid #050704;
  border-radius: 20px;

  background:
    linear-gradient(
      180deg,
      #45651a,
      #90b82a,
      #45651a
    );

  box-shadow:
    0 0 10px rgba(145,193,30,.18);
}

::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(
      180deg,
      #8baa28,
      #c7ff27,
      #8baa28
    );
}

/* --------------------------------------------------------------------------
   SELECTION
   -------------------------------------------------------------------------- */

::selection {
  color: #050704;
  background: var(--bb-gold);
}

/* --------------------------------------------------------------------------
   АНИМАЦИИ
   -------------------------------------------------------------------------- */

@keyframes headerIn {
  from {
    opacity: 0;
    transform: translateY(-14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes cardEnter {
  from {
    opacity: 0;
    transform: translateY(24px) scale(.985);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes ambientPulse {
  0% {
    transform: scale(1);
    opacity: .65;
  }
  100% {
    transform: scale(1.07);
    opacity: 1;
  }
}

@keyframes panelBreath {
  0%, 100% {
    opacity: .65;
  }
  50% {
    opacity: 1;
  }
}

@keyframes energyLine {
  0%, 100% {
    filter: brightness(.8);
    opacity: .65;
  }
  50% {
    filter: brightness(1.5);
    opacity: 1;
  }
}

@keyframes titleUnderline {
  0%, 100% {
    transform: scaleX(.65);
    opacity: .65;
  }
  50% {
    transform: scaleX(1);
    opacity: 1;
  }
}

@keyframes titleFlicker {
  0%, 92%, 100% {
    opacity: 1;
  }
  93% {
    opacity: .86;
  }
  94% {
    opacity: .98;
  }
  96% {
    opacity: .91;
  }
}

@keyframes calcGlow {
  0%, 100% {
    transform: scale(.85);
    opacity: .55;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

/* --------------------------------------------------------------------------
   REDUCED MOTION
   -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: .01ms !important;
  }
}

/* --------------------------------------------------------------------------
   МОБИЛЬНАЯ ВЕРСИЯ
   -------------------------------------------------------------------------- */

@media (max-width: 700px) {
  body {
    background-attachment: scroll;
  }

  .site-header {
    padding: .7rem 1rem;
  }

  .container {
    margin: 1rem;
    padding: 1.5rem 1.1rem;
  }

  .site-title {
    font-size: 1.55rem;
  }

  .site-description,
  .content {
    font-size: .95rem;
  }

  .contact-btn {
    width: 100%;
    text-align: center;
  }
}
