/* ==========================================================================
   /services/<slug>/ — shared frame of the service pages (landing, expert,
   brand, web-apps). The same structure and type as «Корпоративные сайты»
   (/services/corporate/, which keeps its own stylesheet and is not built on
   this file): hero → intro → scope → price → next row. Each page adds its
   own stylesheet with its hero visual and its motion concept.
   Builds on /nikkalma-2.css (body.nk2.project-preview-cinematic) and
   /services.css (contact dialog).
   Load order: /styles.css → /nikkalma-2.css → /services.css → this file →
   /services/<slug>/<slug>.css
   ========================================================================== */

.service-page {
  --svc-serif: "Onest", system-ui, sans-serif;       /* display face: same as the homepage (name kept for the page stylesheets) */
  --svc-ink: var(--nk2-cream);
  --svc-text: rgba(241, 235, 221, .74);
  --svc-label: rgba(241, 235, 221, .64);
  --svc-line: rgba(218, 224, 230, .2);
  --svc-bg: var(--nk2-graphite);                     /* #0e0f0f */
  --svc-bleed: clamp(140px, 14vw, 240px);             /* how far the hero image runs into the next block */
}

main#content.svc-page { display: block; padding: 0; }

.svc-page h1,
.svc-page h2,
.svc-page h3 { overflow-wrap: break-word; }

.svc-label,
.svc-kicker {
  margin: 0;
  color: var(--svc-label);
  font-family: var(--sans);
  font-size: .75rem;
  font-weight: 500;
  letter-spacing: .18em;                              /* as the homepage labels */
  line-height: 1.3;
  text-transform: uppercase;
}

.svc-display {
  margin: 0;
  color: var(--svc-ink);
  font-family: var(--svc-serif);
  font-size: clamp(2.25rem, 4vw, 3.75rem);            /* 36–60px */
  font-weight: 300;
  letter-spacing: -.05em;
  line-height: 1.04;
}

/* --- 1. Hero ------------------------------------------------------------- */
.svc-hero {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  min-height: clamp(520px, calc(100svh - 66px), 720px);
  padding: clamp(48px, 5vw, 80px) var(--nk2-pad) clamp(150px, 16vw, 250px);
  overflow: visible;                                   /* the image layer bleeds into the intro */
}

/* Image layer: taller than the hero by --svc-bleed, fades out at the bottom
   with a mask, clips its own motion so nothing widens the page. Its
   background is the page graphite, so artwork blended with `screen` turns
   its black into the page colour: no rectangle edges. */
.svc-hero-media {
  position: absolute;
  z-index: -2;
  inset: 0 0 calc(-1 * var(--svc-bleed)) 0;
  overflow: hidden;
  background: var(--svc-bg);
  -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, .55) 80%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 0%, #000 58%, rgba(0, 0, 0, .55) 80%, transparent 100%);
  pointer-events: none;
}
.svc-hero-media img { display: block; max-width: none; }

.svc-hero-copy { position: relative; max-width: 760px; }

.svc-kicker { display: flex; align-items: center; gap: 14px; }
.svc-kicker::after {
  content: "";
  width: 22px;
  height: 1px;
  background: currentColor;
  opacity: .6;
}

.svc-hero h1 {
  max-width: 9.5em;
  margin: clamp(18px, 2vw, 26px) 0 0;
  color: var(--svc-ink);
  font-family: var(--svc-serif);
  font-size: clamp(3.25rem, 7vw, 6.75rem);            /* 52–108px, as the homepage h1 */
  font-weight: 300;
  letter-spacing: -.06em;
  line-height: 1;                                     /* Onest: «й» over «р» needs the full line */
}

.svc-lead {
  max-width: 30em;
  margin: clamp(24px, 2.6vw, 36px) 0 0;
  color: var(--svc-text);
  font-size: clamp(1rem, 1.25vw, 1.1875rem);          /* 16–19px */
  line-height: 1.55;
}

.svc-hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px 28px;
  margin-top: clamp(32px, 3.4vw, 48px);
}
.svc-hero-rule { width: 72px; height: 1px; background: var(--svc-line); }
.svc-hero-price {
  margin: 0;
  color: var(--svc-ink);
  font-size: 1.125rem;
  white-space: nowrap;
}

/* --- 2. Intro: heading left, text right (pulled up into the fading image) */
.svc-intro {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(32px, 6vw, 96px);
  margin-top: calc(-1 * clamp(110px, 11.5vw, 190px));
  padding: 0 var(--nk2-pad) clamp(56px, 7vw, 112px);
}
.svc-intro-text {
  max-width: 34em;
  padding-left: clamp(24px, 3.4vw, 48px);
  border-left: 1px solid var(--svc-line);
}
.svc-intro-text p {
  margin: 0;
  color: var(--svc-text);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.65;
  text-shadow: 0 0 16px rgba(14, 15, 15, .9), 0 1px 3px rgba(14, 15, 15, .7);
}
.svc-intro-text p + p { margin-top: 1em; }

/* --- 3. Scope: label + four directions ----------------------------------- */
.svc-scope {
  position: relative;
  z-index: 1;
  padding: clamp(24px, 3vw, 48px) var(--nk2-pad) clamp(56px, 7vw, 104px);
}
.svc-scope-list {
  margin: clamp(24px, 2.6vw, 36px) 0 0;
  padding: 0;
  list-style: none;
}
.svc-scope-list h3 {
  margin: 0;
  color: var(--svc-ink);
  font-family: var(--svc-serif);
  font-size: clamp(1.375rem, 1.75vw, 1.75rem);        /* 22–28px */
  font-weight: 400;
  letter-spacing: -.02em;
  line-height: 1.12;
}
.svc-scope-list p {
  max-width: 32em;
  margin: 8px 0 0;
  color: var(--svc-text);
  font-size: .9375rem;
  line-height: 1.55;
}

/* --- 4. Price: large typography, no card --------------------------------- */
.svc-price {
  position: relative;
  z-index: 1;
  margin: 0 var(--nk2-pad);
  padding: clamp(48px, 6vw, 88px) 0 clamp(64px, 8vw, 120px);
  border-top: 1px solid var(--svc-line);
}
.svc-price-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 64px);
  margin-top: clamp(16px, 1.6vw, 24px);
}
.svc-price-value {
  margin: 0;
  color: var(--svc-ink);
  font-family: var(--svc-serif);
  font-size: clamp(3rem, 6vw, 5.5rem);                /* 48–88px */
  font-weight: 300;
  letter-spacing: -.05em;
  line-height: 1;
  font-variant-numeric: lining-nums;
  white-space: nowrap;
}
.svc-price-slash {
  width: 1px;
  height: clamp(72px, 8vw, 116px);
  background: var(--svc-line);
  transform: rotate(24deg);
}
.svc-price-note { max-width: 30em; }
.svc-price-note p {
  margin: 0;
  color: var(--svc-text);
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  line-height: 1.6;
}
.svc-price-note .button { margin-top: 24px; }

/* --- Next row ------------------------------------------------------------ */
.svc-next-row { position: relative; z-index: 1; margin: 0 var(--nk2-pad); border-top: 1px solid var(--svc-line); }
.svc-next-row-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 72px;
  color: var(--svc-text);
  font-size: .9375rem;
  text-decoration: none;
  transition: color .2s ease;
}
.svc-next-row-link:hover { color: var(--svc-ink); }

/* --- Tablet -------------------------------------------------------------- */
@media (max-width: 960px) {
  .svc-hero { padding-bottom: 120px; }
  .svc-intro { grid-template-columns: minmax(0, 1fr); margin-top: -72px; }
  .svc-price-row { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .svc-price-slash { display: none; }
}

/* --- Mobile -------------------------------------------------------------- */
@media (max-width: 680px) {
  .service-page { --svc-bleed: 120px; }
  .svc-hero { align-items: flex-end; min-height: 0; padding: 280px 20px 72px; }
  .svc-hero-copy { min-width: 0; }
  .svc-hero-actions { gap: 16px 20px; }
  .svc-hero-actions .button { flex: 1 1 100%; }
  .svc-hero-rule { width: 40px; }
  .svc-intro { margin-top: -32px; padding: 0 20px 48px; }
  .svc-intro-text { padding-left: 20px; }
  .svc-scope { padding: 16px 20px 56px; }
  .svc-price { margin: 0 20px; padding: 40px 0 64px; }
  .svc-price-note .button { width: 100%; }
  .svc-next-row { margin: 0 20px; }
}

/* ==========================================================================
   Reveal (service-page.js). The script adds .svc-motion to <html>, .svc-reveal
   to each block below the hero and .is-visible when it enters the viewport;
   items inside a block that carry .svc-reveal-item get --i (their index) for
   a sequence. This file gives the default (block drifts up); each page's own
   stylesheet replaces it with its concept. Without JS or with reduced motion
   nothing is hidden.
   ========================================================================== */
.svc-motion .svc-reveal {
  opacity: 0;
  transform: translate3d(0, 56px, 0);
  transition:
    opacity 1.4s cubic-bezier(.16, 1, .3, 1),
    transform 1.6s cubic-bezier(.16, 1, .3, 1),
    filter 1.4s cubic-bezier(.16, 1, .3, 1);
}
.svc-motion .svc-reveal.is-visible { opacity: 1; transform: none; }

.svc-hero.is-offscreen * { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  .svc-motion .svc-reveal,
  .svc-motion .svc-reveal-item { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .svc-next-row-link { transition: none; }
}
