/* ─── uslugi.css — премиум-стили для страниц услуг fishchuk.pro ────────────
 * Расширяет longread.css. Подключается ПОСЛЕ longread.css.
 *
 * Содержит:
 *   - Hero split (text + editorial photo)
 *   - Унифицированный gold ▸ стиль для всех буллетов
 *   - SVG-инфографика «Алгоритм бюджета»
 *   - Video iframe block
 *   - Sticky bottom CTA-bar
 *   - PDF download button
 *   - Print styles
 */

/* === HERO ================================================================ */

.us-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 56px;
  align-items: center;
  margin: 32px 0 64px;
}

.us-hero-text h1 {
  font-family: var(--font-heading), "Cormorant Garamond", serif;
  font-size: clamp(36px, 5.2vw, 64px);
  font-weight: 400;
  line-height: 1.08;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 14px 0 24px;
}

.us-hero-text .us-eyebrow {
  font-family: var(--font-nav), system-ui, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  color: var(--mint);
  text-transform: uppercase;
  margin-bottom: 12px;
}

.us-hero-text .us-lede {
  font-size: 1.18rem;
  line-height: 1.7;
  color: var(--text-m);
  max-width: 56ch;
  margin: 0;
}

/* Drop cap on lede first letter */
.us-hero-text .us-lede::first-letter {
  font-family: var(--font-heading), "Cormorant Garamond", serif;
  font-size: 3.4em;
  float: left;
  line-height: 0.9;
  padding: 6px 12px 0 0;
  color: var(--gold);
  font-weight: 500;
}

.us-hero-photo {
  position: relative;
  aspect-ratio: 4 / 5;
  background: var(--surface);
  border: 1px solid var(--gold);
  padding: 8px;
  border-radius: 4px;
  box-shadow: 0 12px 48px rgba(0, 0, 0, 0.10), 0 0 0 1px rgba(106, 158, 145, 0.18);
  transition: box-shadow 0.4s;
}
.us-hero-photo::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, #1a1a1f 0%, #2c2820 60%, #3d3320 100%);
  z-index: -1;
  border-radius: 3px;
}
.us-hero-photo img {
  border-radius: 2px;
  position: relative;
  z-index: 1;
}

.us-hero-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.us-hero-photo .us-photo-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: rgba(201, 169, 110, 0.7);
  font-family: var(--font-nav);
  font-size: 0.72rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(circle at 30% 35%, rgba(201, 169, 110, 0.15) 0%, transparent 50%),
    radial-gradient(circle at 70% 65%, rgba(106, 158, 145, 0.08) 0%, transparent 50%),
    linear-gradient(135deg, #1a1a1f 0%, #2c2820 60%, #3d3320 100%);
}

.us-hero-photo figcaption {
  position: absolute;
  bottom: 14px;
  left: 14px;
  right: 14px;
  font-family: var(--font-nav);
  font-size: 0.65rem;
  letter-spacing: 0.22em;
  color: rgba(201, 169, 110, 0.85);
  text-transform: uppercase;
  text-align: center;
}

@media (max-width: 880px) {
  .us-hero { grid-template-columns: 1fr; gap: 24px; }
  .us-hero-photo { aspect-ratio: 16 / 10; max-height: 280px; }
  .us-hero-text h1 { font-size: clamp(28px, 7vw, 42px); }
}

/* === PDF BUTTON (top-right) ============================================= */

.us-pdf-btn {
  position: absolute;
  top: 84px;
  right: 32px;
  padding: 10px 18px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 30px;
  font-family: var(--font-nav);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-m);
  cursor: pointer;
  text-decoration: none;
  transition: border-color 0.2s, color 0.2s;
}

.us-pdf-btn:hover { border-color: var(--gold); color: var(--gold); }

@media (max-width: 880px) { .us-pdf-btn { display: none; } }

/* === UNIFIED BULLET STYLE =============================================== */

ul.us-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

ul.us-list li {
  position: relative;
  padding: 14px 0 14px 32px;
  border-bottom: 1px solid var(--border-s);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
}

ul.us-list li::before {
  content: "▸";
  position: absolute;
  left: 0;
  top: 14px;
  color: var(--gold);
  font-size: 1.1rem;
}

ul.us-list li:last-child { border-bottom: none; }

/* === THREE PRINCIPLES (numbered callouts) =============================== */

.us-principles {
  display: grid;
  gap: 24px;
  margin: 32px 0;
}

.us-principle {
  position: relative;
  padding: 32px 32px 32px 96px;
  background: var(--surface);
  border: 1px solid var(--border-s);
  border-radius: 6px;
}

.us-principle::before {
  content: attr(data-num);
  position: absolute;
  left: 32px;
  top: 28px;
  font-family: var(--font-heading), serif;
  font-size: 3rem;
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.us-principle h3 {
  font-family: var(--font-heading), serif;
  font-size: 1.35rem;
  font-weight: 500;
  color: var(--text);
  margin: 0 0 12px;
  line-height: 1.3;
}

.us-principle p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text-m);
  margin: 0 0 12px;
}

.us-principle p:last-child { margin-bottom: 0; }

@media (max-width: 720px) {
  .us-principle { padding: 24px 20px 24px 64px; }
  .us-principle::before { left: 18px; top: 18px; font-size: 2.2rem; }
}

/* === STATS BAR ========================================================== */

.us-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin: 48px 0;
  padding: 36px 32px;
  background: var(--surface);
  border-top: 2px solid var(--gold);
  border-bottom: 1px solid var(--border-s);
}

.us-stat {
  text-align: center;
}

.us-stat-num {
  font-family: var(--font-heading), serif;
  font-size: clamp(2.4rem, 4.5vw, 3.6rem);
  font-weight: 400;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 10px;
  font-variant-numeric: tabular-nums;
}

.us-stat-label {
  font-family: var(--font-nav);
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-m);
  line-height: 1.4;
}

.us-stat-source {
  margin-top: 6px;
  font-size: 0.72rem;
  color: var(--text-d);
  font-style: italic;
}

@media (max-width: 720px) {
  .us-stats { grid-template-columns: 1fr; gap: 24px; padding: 28px 20px; }
}

/* === SERVICE ICON (monogram above eyebrow) ============================ */

.us-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1), filter 0.4s;
}

.us-icon::before {
  content: "";
  position: absolute;
  inset: -8px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.3;
  transition: opacity 0.3s, transform 0.4s;
}

.us-icon:hover {
  transform: rotate(-4deg) scale(1.05);
  filter: drop-shadow(0 0 10px rgba(201, 169, 110, 0.4));
}

.us-icon:hover::before {
  opacity: 0.7;
  transform: scale(1.08);
}

.us-icon svg {
  width: 32px;
  height: 32px;
  display: block;
}

/* === PREMIUM PULL QUOTE ================================================ */

.us-pullquote {
  position: relative;
  margin: 80px auto;
  max-width: 760px;
  padding: 64px 64px 56px 88px;
  background:
    radial-gradient(ellipse at top left, var(--gold-d) 0%, transparent 55%),
    var(--surface);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  box-shadow: 0 4px 32px rgba(0, 0, 0, 0.04);
  font-family: var(--font-heading), "Cormorant Garamond", serif;
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  font-style: italic;
  line-height: 1.5;
  color: var(--text);
  overflow: hidden;
}

.us-pullquote::before {
  content: "\201C";  /* opening curly quote */
  position: absolute;
  top: -36px;
  left: 18px;
  font-size: 11rem;
  line-height: 1;
  color: var(--gold);
  opacity: 0.18;
  font-family: "Cormorant Garamond", serif;
  font-style: normal;
  font-weight: 500;
  pointer-events: none;
  user-select: none;
}

.us-pullquote::after {
  content: "";
  position: absolute;
  right: -120px;
  bottom: -120px;
  width: 280px;
  height: 280px;
  border: 1px solid var(--gold);
  border-radius: 50%;
  opacity: 0.10;
  pointer-events: none;
}

.us-pullquote-text { margin: 0; }

.us-pullquote-attr {
  display: block;
  margin-top: 18px;
  font-family: var(--font-nav), system-ui, sans-serif;
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--mint);
  font-weight: 500;
}

@media (max-width: 720px) {
  .us-pullquote { padding: 48px 28px 40px 36px; margin: 56px 0; }
  .us-pullquote::before { font-size: 7rem; top: -24px; left: 6px; }
  .us-pullquote::after { width: 200px; height: 200px; right: -80px; bottom: -80px; }
}

/* === SVG INFOGRAPHIC «АЛГОРИТМ БЮДЖЕТА» ================================ */

.us-flow {
  margin: 48px 0;
  padding: 36px 32px;
  background: var(--surface);
  border: 1px solid var(--border-s);
  border-radius: 6px;
}

.us-flow-title {
  font-family: var(--font-heading), serif;
  font-size: 1.4rem;
  color: var(--text);
  margin: 0 0 8px;
  font-weight: 400;
}

.us-flow-sub {
  font-size: 0.92rem;
  color: var(--text-d);
  margin: 0 0 28px;
}

.us-flow svg {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* === FLOW NODE INTERACTIVITY ========================================== */

/* Animated nodes: subtle hover scale + glow.
 * Animatable r/transform on circles (modern Chrome/FF/Safari). */
.us-flow svg circle {
  transition: r 0.3s ease, filter 0.3s ease;
  cursor: default;
  transform-origin: center;
}

.us-flow:hover svg circle {
  filter: drop-shadow(0 0 4px currentColor);
}

.us-flow svg g:hover circle {
  r: 18;
  filter: drop-shadow(0 0 10px var(--gold));
}

.us-flow svg g:hover text {
  font-weight: 600 !important;
}

/* Subtle pulse on connecting lines when section is hovered */
.us-flow:hover svg line[stroke-dasharray] {
  animation: us-flow-line-pulse 2.4s ease-in-out infinite;
}

@keyframes us-flow-line-pulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 0.7; }
}

/* Reduced motion respect */
@media (prefers-reduced-motion: reduce) {
  .us-flow svg circle, .us-flow:hover svg line[stroke-dasharray],
  .us-icon, .us-icon::before {
    transition: none !important;
    animation: none !important;
  }
}

.us-flow-legend {
  display: flex;
  gap: 24px;
  margin-top: 20px;
  font-size: 0.78rem;
  color: var(--text-m);
  flex-wrap: wrap;
}

.us-flow-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.us-flow-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

/* === VIDEO BLOCK ======================================================== */

.us-video {
  margin: 48px 0;
  padding: 36px 32px;
  background: linear-gradient(135deg, var(--gold-d) 0%, var(--surface) 100%);
  border: 1px solid var(--gold);
  border-radius: 6px;
  text-align: center;
}

.us-video-title {
  font-family: var(--font-heading), serif;
  font-size: 1.4rem;
  color: var(--text);
  margin: 0 0 8px;
}

.us-video-sub {
  font-size: 0.92rem;
  color: var(--text-m);
  margin: 0 0 24px;
}

.us-video-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1a1f;
  border-radius: 6px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(201, 169, 110, 0.7);
  font-family: var(--font-nav);
  font-size: 0.78rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

.us-video-frame iframe {
  width: 100%;
  height: 100%;
  border: 0;
}

/* === STICKY BOTTOM CTA BAR ============================================= */

.us-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--bg);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
  padding: 14px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  z-index: 200;
  transform: translateY(100%);
  transition: transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.us-sticky-cta.visible { transform: translateY(0); }

.us-sticky-cta-text {
  flex: 1;
  min-width: 0;
}

.us-sticky-cta-title {
  font-family: var(--font-nav);
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-d);
  margin: 0 0 2px;
}

.us-sticky-cta-price {
  font-family: var(--font-heading), serif;
  font-size: 1.1rem;
  color: var(--gold);
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.us-sticky-cta-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.us-sticky-cta-actions a {
  padding: 10px 18px;
  border-radius: 30px;
  text-decoration: none;
  font-family: var(--font-nav);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 500;
  white-space: nowrap;
}

.us-sticky-cta-actions a.us-btn-primary {
  background: var(--gold);
  color: var(--void);
}

.us-sticky-cta-actions a.us-btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border);
}

@media (max-width: 720px) {
  .us-sticky-cta { flex-direction: column; padding: 12px 16px; gap: 8px; }
  .us-sticky-cta-text { text-align: center; }
  .us-sticky-cta-actions { width: 100%; }
  .us-sticky-cta-actions a { flex: 1; text-align: center; padding: 10px 12px; }
}

/* === PRINT STYLES ====================================================== */

@media print {
  nav.nav, .footer, .cookie-banner, .us-sticky-cta, .us-pdf-btn,
  .us-video, .us-hero-photo, .theme-toggle, .nav-burger, .lang-toggle {
    display: none !important;
  }

  body {
    background: white !important;
    color: black !important;
    font-size: 11pt;
  }

  main.container { max-width: 100% !important; padding: 0 !important; }

  .us-hero { display: block; }
  .us-hero-text h1 { font-size: 22pt; color: black; }
  .us-hero-text .us-lede { font-size: 12pt; color: #333; }
  .us-hero-text .us-lede::first-letter { color: #8b6e3a; }

  ul.us-list li::before { color: #8b6e3a; }
  .us-principle { border: 1px solid #ccc; page-break-inside: avoid; }
  .us-principle::before { color: #8b6e3a; }
  .us-stats { background: #f8f6f0; border-color: #8b6e3a; page-break-inside: avoid; }
  .us-stat-num { color: #8b6e3a; }
  .us-flow { page-break-inside: avoid; }

  /* Show URL after links */
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #888; }
  a[href^="/"]::after { content: " (https://fishchuk.pro" attr(href) ")"; font-size: 9pt; color: #888; }
  a[href^="tel:"]::after, a[href^="mailto:"]::after { content: ""; }

  /* Print-only header with contact details */
  .us-print-header {
    display: block !important;
    border-bottom: 2px solid #8b6e3a;
    padding-bottom: 12pt;
    margin-bottom: 18pt;
  }

  /* Signature visible in print/PDF, larger size for paper */
  #consult figure[role="signature"], #consult > figure {
    margin-top: 18pt;
    page-break-inside: avoid;
  }
  #consult > figure img {
    width: 200px !important;
    opacity: 1 !important;
  }
}

.us-print-header { display: none; }
