/* ============================================================
   candles.css — стили страницы «Программные свечи»
   Путь на сервере: /wp-content/themes/blocksy-child/css/candles.css
   ============================================================ */

/* Reset Blocksy styles that might interfere */
#wpadminbar { position: fixed !important; }
body.ct-no-header .site-header,
body.ct-no-header header { display: none !important; }
body.ct-no-footer .site-footer,
body.ct-no-footer footer.site-footer { display: none !important; }
.site-main, main#main, .ct-main-area { padding: 0 !important; margin: 0 !important; max-width: 100% !important; }
.ct-container, .ct-container-narrow { max-width: 100% !important; padding: 0 !important; }

  :root {
    --bg-deep:    #0d0b0e;
    --bg-mid:     #141019;
    --bg-card:    #1b1623;
    --gold:       #c9a96e;
    --gold-light: #e8cfaa;
    --gold-dim:   #8a6e44;
    --cream:      #f5ede0;
    --muted:      #9e90a0;
    --accent:     #7b4f8a;
    --flame:      #e8703a;
  }

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

  html { scroll-behavior: smooth; }

  body {
    background: var(--bg-deep);
    color: var(--cream);
    font-family: 'Jost', sans-serif;
    font-weight: 300;
    overflow-x: hidden;
  }

  /* ── NOISE TEXTURE OVERLAY ── */
  body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='1'/%3E%3C/svg%3E");
    opacity: 0.025;
    pointer-events: none;
    z-index: 9999;
  }
  img { max-width: 100%; display: block; }
a  { text-decoration: none; color: inherit; }

  /* ── NAVBAR ── */
  nav#navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 5vw;
  background: linear-gradient(to bottom, rgba(13,11,14,0.97), transparent);
  backdrop-filter: blur(6px);
  transition: background 0.4s, padding 0.3s;
}
nav#navbar.scrolled {
  background: rgba(13,11,14,0.98);
  padding: 0.8rem 5vw;
  box-shadow: 0 1px 0 var(--border);
}

.nav-logo img { height: 50px; }

.nav-links {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.nav-links > li { position: relative; }

.nav-links a {
  color: #eae7eb;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.5rem 0.8rem;
  transition: color 0.3s;
  display: block;
}
.nav-links a:hover,
.nav-links a.active { color: var(--gold); }

/* Dropdown */
.nav-dropdown {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(20,16,25,0.98);
  border: 1px solid var(--border);
  border-top: 2px solid var(--gold);
  min-width: 200px;
  padding: 0.5rem 0;
  list-style: none;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(8px);
  transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
  backdrop-filter: blur(10px);
}
.nav-links > li:hover .nav-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
.nav-dropdown a {
  padding: 0.6rem 1.4rem;
  font-size: 0.78rem;
  color: rgba(245,237,224,0.7);
  letter-spacing: 0.06em;
  text-transform: none;
}
.nav-dropdown a:hover { color: var(--gold); background: rgba(201,169,110,0.06); }

.nav-cta {
  border: 1px solid var(--gold-dim) !important;
  color: var(--gold) !important;
  border-radius: 2px;
  padding: 0.45rem 1.2rem !important;
  transition: background 0.3s, color 0.3s !important;
}
.nav-cta:hover { background: var(--gold) !important; color: var(--bg-deep) !important; }

.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  padding: 4px;
  background: none;
  border: none;
}
.nav-hamburger span {
  display: block;
  width: 24px;
  height: 1px;
  background: var(--gold);
  transition: transform 0.3s, opacity 0.3s;
}

/* Mobile nav */
.nav-mobile {
  display: none;
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(320px, 90vw);
  background: rgba(13,11,14,0.99);
  border-left: 1px solid var(--border);
  z-index: 300;
  padding: 5rem 2rem 2rem;
  flex-direction: column;
  gap: 0.3rem;
  transform: translateX(100%);
  transition: transform 0.4s ease;
  overflow-y: auto;
}
.nav-mobile.open { transform: translateX(0); display: flex; }
.nav-mobile a {
  color: var(--muted);
  font-size: 0.9rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.7rem 0;
  border-bottom: 1px solid rgba(255,255,255,0.04);
  display: block;
  transition: color 0.3s;
}
.nav-mobile a:hover { color: var(--gold); }
.nav-mobile-close {
  position: absolute;
  top: 1.5rem; right: 1.5rem;
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1.4rem;
  cursor: pointer;
  transition: color 0.3s;
}
.nav-mobile-close:hover { color: var(--gold); }
.nav-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.6);
  z-index: 299;
}
.nav-overlay.open { display: block; }

/* ── BUTTONS ── */
.btn-primary {
  display: inline-block;
  background: var(--gold);
  color: var(--bg-deep);
  padding: 0.9rem 2.2rem;
  border: none;
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.3s, transform 0.2s;
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); }

.btn-outline {
  display: inline-block;
  background: transparent;
  color: var(--cream);
  padding: 0.9rem 2.2rem;
  border: 1px solid rgba(245,237,224,0.3);
  font-family: 'Jost', sans-serif;
  font-size: 0.82rem;
  font-weight: 400;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
  transition: border-color 0.3s, color 0.3s;
}
.btn-outline:hover { border-color: var(--gold); color: var(--gold); }

  /* ── HERO ── */
  #hero {
    min-height: 100vh;
    display: grid;
    place-items: center;
    position: relative;
    overflow: hidden;
    text-align: center;
    padding: 10rem 5vw 6rem;
  }

  .hero-bg {
    position: absolute;
    inset: 0;
    background:
      radial-gradient(ellipse 60% 70% at 50% 60%, rgba(123,79,138,0.18) 0%, transparent 70%),
      radial-gradient(ellipse 40% 50% at 50% 80%, rgba(232,112,58,0.12) 0%, transparent 60%),
      linear-gradient(180deg, var(--bg-deep) 0%, #100c18 100%);
  }

  /* Animated flame particles */
  .particles {
    position: absolute;
    inset: 0;
    pointer-events: none;
  }
  .particle {
    position: absolute;
    border-radius: 50%;
    animation: float-up linear infinite;
    opacity: 0;
  }
  @keyframes float-up {
    0%   { transform: translateY(0) scale(1);   opacity: 0; }
    15%  { opacity: 0.6; }
    85%  { opacity: 0.2; }
    100% { transform: translateY(-80vh) scale(0.3); opacity: 0; }
  }

  /* Decorative top line */
  .hero-ornament {
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 0.9rem;
    letter-spacing: 0.3em;
    color: var(--gold-dim);
    text-transform: uppercase;
    margin-bottom: 1.5rem;
    opacity: 0;
    animation: fade-in 1s 0.3s forwards;
  }

  h1.hero-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(3rem, 7vw, 6rem);
    line-height: 1.1;
    letter-spacing: -0.01em;
    margin-bottom: 0.5rem;
    opacity: 0;
    animation: slide-up 1s 0.5s forwards;
  }
  h1.hero-title em {
    font-style: italic;
    color: var(--gold-light);
  }

  .hero-divider {
    width: 80px;
    height: 1px;
    background: linear-gradient(to right, transparent, var(--gold), transparent);
    margin: 1.8rem auto;
    opacity: 0;
    animation: fade-in 1s 0.8s forwards;
  }

  .hero-desc {
    max-width: 560px;
    margin: 0 auto 2.8rem;
    font-size: 1.05rem;
    line-height: 1.8;
    color: rgba(245,237,224,0.75);
    opacity: 0;
    animation: fade-in 1s 1s forwards;
  }

  .hero-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    opacity: 0;
    animation: fade-in 1s 1.2s forwards;
  }

  .btn-primary {
    background: var(--gold);
    color: var(--bg-deep);
    padding: 0.9rem 2.2rem;
    border: none;
    font-family: 'Jost', sans-serif;
    font-size: 0.82rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s, transform 0.2s;
    display: inline-block;
  }
  .btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); }

  .btn-outline {
    background: transparent;
    color: var(--cream);
    padding: 0.9rem 2.2rem;
    border: 1px solid rgba(245,237,224,0.3);
    font-family: 'Jost', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.3s, color 0.3s;
    display: inline-block;
  }
  .btn-outline:hover { border-color: var(--gold); color: var(--gold); }

  /* Scroll indicator */
  .scroll-hint {
    position: absolute;
    bottom: 2.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    opacity: 0;
    animation: fade-in 1s 1.8s forwards;
  }
  .scroll-hint span {
    font-size: 0.65rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--gold-dim);
  }
  .scroll-line {
    width: 3px;
    height: 40px;
    background: linear-gradient(to bottom, var(--gold-dim), transparent);
    animation: scroll-pulse 2s ease-in-out infinite;
  }
  @keyframes scroll-pulse {
    0%, 100% { opacity: 0.4; transform: scaleY(1); }
    50%       { opacity: 1;   transform: scaleY(1.2); }
  }

  /* ── SECTION BASE ── */
  section { padding: 7rem 5vw; position: relative; }

  .section-label {
    font-size: 0.7rem;
    letter-spacing: 0.35em;
    text-transform: uppercase;
    color: var(--gold-dim);
    margin-bottom: 1rem;
    display: block;
  }

  h2.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.2rem, 4.5vw, 3.6rem);
    line-height: 1.15;
    margin-bottom: 1.5rem;
  }
  h2.section-title em { font-style: italic; color: var(--gold-light); }

  /* ── WHAT IS IT ── */
  #what {
    background: var(--bg-mid);
  }

  .what-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5vw;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
  }

  .what-visual {
    position: relative;
  }

  .candle-illustration {
    width: 100%;
    max-width: 380px;
    margin: 0 auto;
    display: block;
  }

  .candle-glow {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(232,112,58,0.35) 0%, transparent 70%);
    animation: glow-pulse 3s ease-in-out infinite;
    pointer-events: none;
  }
  @keyframes glow-pulse {
    0%, 100% { transform: translateX(-50%) scale(1);   opacity: 0.8; }
    50%       { transform: translateX(-50%) scale(1.2); opacity: 1; }
  }

  .what-text p {
    color: rgba(245,237,224,0.78);
    line-height: 1.9;
    font-size: 1.02rem;
    margin-bottom: 1.2rem;
  }

  /* ── HOW IT WORKS ── */
  #how { background: var(--bg-deep); }
  #how .inner { max-width: 1200px; margin: 0 auto; }
  #how .head { text-align: center; margin-bottom: 5rem; }

  .how-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2px;
  }

  .how-card {
    background: var(--bg-card);
    padding: 3rem 2.8rem;
    position: relative;
    overflow: hidden;
    transition: background 0.4s;
  }
  .how-card:hover { background: #221a30; }
  .how-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 3px;
    height: 0;
    background: var(--gold);
    transition: height 0.5s ease;
  }
  .how-card:hover::before { height: 100%; }

  .how-num {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    font-weight: 300;
    color: rgba(201,169,110,0.12);
    line-height: 1;
    margin-bottom: 1rem;
    display: block;
    transition: color 0.4s;
  }
  .how-card:hover .how-num { color: rgba(201,169,110,0.25); }

  .how-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.55rem;
    font-weight: 400;
    margin-bottom: 0.8rem;
    color: var(--gold-light);
  }
  .how-card p {
    color: rgba(245,237,224,0.65);
    line-height: 1.8;
    font-size: 0.95rem;
  }

  /* ── ADVANTAGES ── */
  #advantages { background: var(--bg-mid); }
  #advantages .inner { max-width: 1200px; margin: 0 auto; }
  #advantages .head { text-align: center; margin-bottom: 4rem; }

  .adv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .adv-card {
    padding: 2.5rem 2rem;
    border: 1px solid rgba(201,169,110,0.12);
    position: relative;
    transition: border-color 0.4s, transform 0.3s;
    background: var(--bg-deep);
  }
  .adv-card:hover {
    border-color: rgba(201,169,110,0.4);
    transform: translateY(-6px);
  }

  .adv-icon {
    font-size: 2rem;
    margin-bottom: 1.2rem;
    display: block;
  }
  .adv-card h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 500;
    margin-bottom: 0.7rem;
    color: var(--gold-light);
  }
  .adv-card p {
    color: rgba(245,237,224,0.6);
    font-size: 0.9rem;
    line-height: 1.75;
  }

  /* ── PORTFOLIO ── */
  #portfolio { background: var(--bg-deep); }
  #portfolio .inner { max-width: 1200px; margin: 1.5rem auto; }
  #portfolio .head { margin-bottom: 3.5rem; }

  .portfolio-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
  }

  .portfolio-item {
    position: relative;
    aspect-ratio: 4/5;
    overflow: hidden;
    background: var(--bg-card);
    cursor: pointer;
  }

  .portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.7s ease;
    filter: brightness(0.9) saturate(0.85);
  }
  .portfolio-item:hover img { transform: scale(1.07); }

  .portfolio-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(13,11,14,0.92) 0%, transparent 50%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 2rem 1.5rem;
    opacity: 0;
    transition: opacity 0.4s;
  }
  .portfolio-item:hover .portfolio-overlay { opacity: 1; }

  .portfolio-overlay h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--gold-light);
    margin-bottom: 0.4rem;
  }
  .portfolio-overlay p {
    font-size: 0.82rem;
    color: rgba(245,237,224,0.65);
    line-height: 1.6;
  }

  /* placeholder images for portfolio */
  .portfolio-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.8rem;
    background: var(--bg-card);
  }
  .portfolio-placeholder span { font-size: 3rem; opacity: 0.4; }
  .portfolio-placeholder p { font-size: 0.75rem; color: var(--muted); }

  /* ── PROCESS ── */
  #process { background: var(--bg-mid); }
  #process .inner { max-width: 900px; margin: 0 auto; }
  #process .head { text-align: center; margin-bottom: 4rem; }

  .process-steps {
    position: relative;
  }
  .process-steps::before {
    content: '';
    position: absolute;
    left: 1.5rem;
    top: 0; bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, var(--gold-dim), transparent);
  }

  .step {
    display: flex;
    gap: 2.5rem;
    padding: 0 0 3rem 0;
    position: relative;
    opacity: 0;
    transform: translateX(-20px);
    transition: opacity 0.6s, transform 0.6s;
  }
  .step.visible { opacity: 1; transform: translateX(0); }

  .step-dot {
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    background: var(--bg-deep);
    border: 1px solid var(--gold-dim);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: var(--gold);
    flex-shrink: 0;
    position: relative;
    z-index: 1;
    transition: background 0.3s, border-color 0.3s;
  }
  .step:hover .step-dot {
    background: var(--gold);
    color: var(--bg-deep);
    border-color: var(--gold);
  }

  .step-content h3 {
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.35rem;
    font-weight: 500;
    color: var(--gold-light);
    margin-bottom: 0.5rem;
  }
  .step-content p {
    color: rgba(245,237,224,0.65);
    font-size: 0.95rem;
    line-height: 1.8;
  }

  /* ── CTA ── */
  #cta {
    background: var(--bg-deep);
    text-align: center;
    padding: 8rem 5vw;
    position: relative;
    overflow: hidden;
  }
  #cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 70% 60% at 50% 50%, rgba(123,79,138,0.15) 0%, transparent 70%);
    pointer-events: none;
  }

  #cta .ornament-line {
    width: 60px;
    height: 1px;
    background: var(--gold);
    margin: 0 auto 2rem;
  }

  #cta h2 {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 300;
    font-size: clamp(2.4rem, 5vw, 4rem);
    margin-bottom: 1.2rem;
    line-height: 1.15;
  }
  #cta h2 em { font-style: italic; color: var(--gold-light); }

  #cta p {
    max-width: 500px;
    margin: 0 auto 3rem;
    color: rgba(245,237,224,0.65);
    font-size: 1rem;
    line-height: 1.8;
  }

  /* ── FOOTER ── */
  footer#site-footer {
  background: #090709;
  border-top: 1px solid var(--border);
  padding: 4rem 5vw 0;
}
.footer-top {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.footer-brand img { height: 52px; margin-bottom: 1.2rem; }
.footer-brand p {
  font-size: 0.88rem;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 1.5rem;
}
.footer-socials { display: flex; gap: 0.7rem; flex-wrap: wrap; }
.footer-social {
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
  color: var(--muted);
  transition: background 0.3s, border-color 0.3s, color 0.3s;
}
.footer-social:hover { background: var(--gold); border-color: var(--gold); color: var(--bg-deep); }

.footer-col h4 {
  font-size: 0.68rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--gold-dim);
  margin-bottom: 1.3rem;
}
.footer-col ul { list-style: none; display: flex; flex-direction: column; gap: 0.55rem; }
.footer-col ul a {
  font-size: 0.87rem;
  color: rgba(245,237,224,0.45);
  transition: color 0.3s;
}
.footer-col ul a:hover { color: var(--gold-light); }

.footer-bottom {
  max-width: 1200px;
  margin: 0 auto;
  padding: 1.5rem 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 0.76rem;
  color: rgba(245,237,224,0.25);
}
.footer-bottom a { color: rgba(245,237,224,0.25); transition: color 0.3s; }
.footer-bottom a:hover { color: var(--gold-dim); }
.footer-legal { display: flex; gap: 1.5rem; flex-wrap: wrap; }

/* ── KEYFRAMES ── */
@keyframes fade-in  { from { opacity: 0 } to { opacity: 1 } }
@keyframes slide-up { from { opacity: 0; transform: translateY(32px) } to { opacity: 1; transform: translateY(0) } }

/* ── RESPONSIVE ── */
@media (max-width: 1100px) {
  .services-grid     { grid-template-columns: repeat(2, 1fr); }
  .footer-top        { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .about-grid        { grid-template-columns: 1fr; }
  .process-visual    { grid-template-columns: 1fr; }
  .process-image     { display: none; }
  .articles-grid     { grid-template-columns: 1fr 1fr; }
  .nav-links         { display: none; }
  .nav-hamburger     { display: flex; }
}
@media (max-width: 640px) {
  section            { padding: 5rem 5vw; }
  .services-grid     { grid-template-columns: 1fr; }
  .articles-grid     { grid-template-columns: 1fr; }
  .footer-top        { grid-template-columns: 1fr; gap: 2rem; }
  .hero-stats        { gap: 2.5rem; }

  /* Flame SVG candle */
  .candle-svg { width: 100%; max-width: 320px; margin: 0 auto; display: block; }

  /* Quote */
  .pull-quote {
    border-left: 2px solid var(--gold);
    padding-left: 1.8rem;
    margin: 2rem 0;
    font-family: 'Cormorant Garamond', serif;
    font-style: italic;
    font-size: 1.25rem;
    color: var(--gold-light);
    line-height: 1.7;
  }