/**
 * Guesthouse presentation — extensions on preso-design.css (portfolio design system)
 * Cover photo, iframe embeds, deck cards, arch/price layouts
 */

:root {
  /* Fixed internal slide title zone (not cover / contacts) */
  --slide-head-zone-h: clamp(168px, 20vh, 204px);
  --step-badge-slot-h: 1.75rem;

  /* Internal slide typography (cover slides excluded) */
  --slide-body-size: 15px;
  --slide-lead-size: 15px;
  --slide-title-size: 36px;
  --slide-card-title-size: 17px;

  /* Card tiers */
  --deck-card-min-h: 112px;
  --deck-card-title-size: var(--slide-card-title-size);
  --deck-card-body-size: var(--slide-body-size);

  /* B2B nav chrome — ярче body-accent, только footer / arrows */
  --color-nav: #2563eb;
  --color-nav-hover: #1d4ed8;
  --color-nav-soft: #3b82f6;
  --color-nav-border: rgba(147, 197, 253, 0.55);
  --color-nav-glow: rgba(37, 99, 235, 0.42);
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  color-scheme: dark;
}

/* MPA: no enter animation between full page loads (avoids blink) */
.page-root > .slide {
  animation: none;
}

html.from-bfcache .page-root > .slide {
  animation: none;
}

/* —— Shared layout tweaks —— */
.layout-content .slide-grid,
.layout-cards .slide-grid,
.layout-embed .slide-grid {
  align-content: start;
}

.layout-cards:not(.layout-cards-visual) .slide-grid,
.layout-list .slide-grid,
.layout-flow .slide-grid,
.layout-arch--roles .slide-grid,
.layout-contacts .slide-grid,
.layout-split-duo--pinned .slide-grid {
  align-content: start;
}

.layout-content .slide-head,
.layout-cards .slide-head,
.layout-embed .slide-head {
  align-self: start;
  width: 100%;
  padding-top: 0;
  margin-top: 0;
  flex-shrink: 0;
}

.layout-cards .slide-head .topbar,
.layout-embed .slide-head .topbar {
  min-height: 1.25rem;
  margin-bottom: var(--layout-zone-gap);
}

.slide-head--center {
  text-align: center;
}

.slide-head--center h2,
.slide-head--center .lead {
  margin-left: auto;
  margin-right: auto;
}

.slide-head--center .topbar {
  text-align: left;
}

/* Internal slides: centered titles, same head height (cover only excluded) */
.slide:not(.layout-cover) .slide-head {
  text-align: center;
  min-height: var(--slide-head-zone-h);
  width: 100%;
}

.slide:not(.layout-cover) .slide-head h2 {
  font-size: var(--slide-title-size);
  font-weight: var(--font-weight-heavy);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-heading);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: min(52ch, 100%);
  min-height: 2.35em;
}

.slide:not(.layout-cover) .slide-head .lead {
  font-size: var(--slide-lead-size);
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  max-width: var(--measure-head);
  min-height: 2.75em;
}

.slide:not(.layout-cover) .slide-head .topbar {
  width: 100%;
}

/* Same vertical slot as step-badge on slides without one */
.slide:not(.layout-cover):not(.layout-step) .slide-head::before {
  content: "";
  display: block;
  height: var(--step-badge-slot-h);
  width: 1px;
  margin: 0 auto;
}

.topbar .nav-hint a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* —— Unified body copy —— */
.slide:not(.layout-cover) .lead,
.deck-card p,
.step-points li,
.arch-box p,
.flow-step__text,
.pain li,
.list li,
.embed-points li {
  font-size: var(--slide-body-size);
  line-height: var(--line-height-body);
}

/* Card / block titles */
.slide:not(.layout-cover) .deck-card b,
.slide:not(.layout-cover) .arch-box b,
.slide:not(.layout-cover) .flow-step__title {
  font-size: var(--slide-card-title-size);
  font-weight: var(--font-weight-bold);
  line-height: var(--line-height-tight);
}

/* —— Deck cards (3 width tiers, equal height) —— */
.deck-grid {
  width: 100%;
  margin-inline: auto;
  grid-auto-rows: 1fr;
  align-items: stretch;
  align-content: center;
}

.deck-grid--regular {
  max-width: min(880px, 100%);
}

.deck-grid--wide {
  max-width: min(1040px, 100%);
}

.deck-grid--xwide {
  max-width: min(var(--layout-max), 100%);
}

.deck-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: var(--deck-card-min-h);
  text-decoration: none;
  color: inherit;
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
  transition: border-color var(--duration-fast), transform var(--duration-fast);
}

.layout-cards--wide .deck-card {
  padding: var(--space-5);
  min-height: calc(var(--deck-card-min-h) + 8px);
}

.layout-cards--xwide .deck-card {
  padding: var(--space-5) var(--space-6);
  min-height: calc(var(--deck-card-min-h) + 16px);
}

.deck-card .n {
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
  display: block;
  margin-bottom: var(--space-2);
  flex: 0 0 auto;
}

.deck-card b {
  display: block;
  font-size: var(--deck-card-title-size);
  line-height: var(--line-height-tight);
  margin-bottom: var(--space-2);
  flex: 0 0 auto;
}

.deck-card p {
  color: var(--color-text-muted);
  margin: 0;
  flex: 1 1 auto;
}

.deck-card p a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.deck-card:hover {
  border-color: var(--color-accent);
  transform: translateY(-2px);
}

.deck-card--static {
  cursor: default;
}

.deck-card--static:hover {
  transform: none;
  border-color: var(--color-border);
}

.layout-cards:not(.layout-cards-visual) .slide-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.layout-list .slide-body {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Cards + static screenshot */
.layout-cards-visual .cards-visual-shot {
  width: 100%;
  margin-bottom: 0;
}

.layout-cards-visual .shot-frame--static {
  width: 100%;
  max-width: var(--shot-max-w-solo, 960px);
  margin-inline: auto;
}

.layout-cards-visual .shot-frame__viewport--natural {
  aspect-ratio: auto;
  max-height: min(40vh, 480px);
  overflow: hidden;
  background: #f4f6f8;
  display: flex;
  align-items: center;
  justify-content: center;
}

.layout-cards-visual .shot-frame__viewport--natural .shot-frame__img {
  width: 100%;
  height: auto;
  max-height: min(40vh, 480px);
  object-fit: contain;
  object-position: center center;
}

/* Natural shots — full image, no crop */
.shot-frame__viewport--natural {
  aspect-ratio: auto;
  max-height: none;
  height: auto;
  overflow: hidden;
  background: var(--color-bg-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.shot-frame__viewport--natural .shot-frame__img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  object-position: center center;
}

/* —— Live site embed (iframe in shot-frame chrome) —— */
.embed-stage {
  flex: 1 1 auto;
  min-height: 0;
  display: flex;
  width: 100%;
}

.embed-stage--with-points {
  display: grid;
  grid-template-columns: minmax(200px, 260px) minmax(0, 1fr);
  gap: var(--layout-grid-gap);
  align-items: stretch;
}

.embed-points {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  align-self: start;
  width: 100%;
  min-height: 6.75rem;
  box-sizing: border-box;
}

.embed-points li {
  position: relative;
  padding-left: 16px;
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
}

.embed-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.embed-frame {
  flex: 1 1 auto;
  min-height: 0;
  min-width: 0;
  margin: 0;
  width: 100%;
}

.embed-frame__viewport {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: auto;
  max-height: none;
  overflow: hidden;
  background: #fffdf2;
}

.embed-frame__viewport iframe.site-embed {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  border: 0;
  background: #fffdf2;
}

/* Embed loader + auto-reveal iframe (slides 05-09) */
.embed-live {
  position: relative;
  width: 100%;
  min-height: var(--embed-cached-h, min(72vh, 880px));
  background: #fffdf2;
}

.embed-loader {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-4, 16px);
  background: #fffdf2;
  color: #5c5340;
  transition: opacity 120ms ease-out;
}

.embed-loader__spinner {
  width: 40px;
  height: 40px;
  border: 3px solid rgba(92, 83, 64, 0.18);
  border-top-color: var(--color-accent, #ff5200);
  border-radius: 50%;
  animation: embed-spin 0.75s linear infinite;
}

.embed-loader__text {
  margin: 0;
  font-size: var(--font-size-base, 16px);
  line-height: var(--line-height-body, 1.5);
  color: #5c5340;
  text-align: center;
  max-width: 22ch;
}

@keyframes embed-spin {
  to {
    transform: rotate(360deg);
  }
}

.embed-live.is-ready .embed-loader {
  opacity: 0;
  pointer-events: none;
  visibility: hidden;
}

.embed-live iframe.site-embed.is-loading {
  position: relative;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
}

.embed-live.is-ready iframe.site-embed.is-loading {
  opacity: 1;
  visibility: visible;
}

.embed-scroll-hint {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: fit-content;
  max-width: calc(100% - 32px);
  padding: 10px 16px;
  border: 0;
  border-radius: 999px;
  background: rgba(20, 20, 20, 0.88);
  color: #fffdf2;
  font: inherit;
  font-size: 14px;
  line-height: 1.3;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  cursor: pointer;
  opacity: 0;
  transition: opacity 180ms ease, transform 180ms ease, background 120ms ease;
}

.embed-scroll-hint:hover {
  background: rgba(20, 20, 20, 0.96);
}

.embed-scroll-hint:focus-visible {
  outline: 2px solid var(--color-accent, #ff5200);
  outline-offset: 2px;
}

body[data-layout="shot"] .embed-scroll-hint {
  position: fixed;
  left: 50%;
  bottom: calc(var(--footer-chrome-h, 64px) + 16px + env(safe-area-inset-bottom, 0px));
  z-index: 30;
  margin: 0;
  transform: translateX(-50%) translateY(8px);
}

body[data-layout="shot"] .embed-scroll-hint.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.embed-scroll-hint__icon {
  font-size: 16px;
  line-height: 1;
  animation: embed-scroll-bounce 1.4s ease-in-out infinite;
}

@keyframes embed-scroll-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(4px);
  }
}

body[data-layout="shot"] {
  --embed-cached-h: min(72vh, 880px);
}

body[data-layout="shot"] .embed-frame__viewport {
  min-height: var(--embed-cached-h);
}

/* Embed slides: scroll header + full-height iframe (not squeezed into viewport) */
body[data-layout="shot"] .embed-frame__viewport {
  aspect-ratio: auto;
  max-height: none;
}

body[data-layout="shot"] .embed-frame__viewport iframe.site-embed.is-sized {
  height: auto;
  min-height: 0;
}

@media (min-width: 961px) and (hover: hover) and (pointer: fine) {
  .slide.layout-cover {
    overflow: hidden;
  }

  body[data-layout="shot"] .page-root {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    min-height: 0;
    max-height: 100dvh;
    overflow: hidden;
  }

  body[data-layout="shot"] .slide.layout-embed {
    flex: 1 1 auto;
    min-height: 0;
    max-height: 100dvh;
    height: 100%;
    overflow-x: hidden;
    overflow-y: auto;
    overscroll-behavior-y: contain;
    scroll-padding-bottom: calc(
      var(--footer-chrome-h) + var(--scroll-footer-extra, 72px) + env(safe-area-inset-bottom, 0px)
    );
  }

  body[data-layout="shot"] .layout-embed .slide-grid,
  body[data-layout="shot"] .layout-embed .slide-body {
    flex: 0 0 auto;
    min-height: auto;
    align-content: start;
  }

  body[data-layout="shot"] .layout-embed .slide-body {
    display: block;
  }

  body[data-layout="shot"] .embed-stage {
    flex: none;
    min-height: auto;
    display: block;
  }

  body[data-layout="shot"] .embed-frame {
    min-height: auto;
  }

  body[data-layout="shot"] .embed-frame__viewport {
    min-height: var(--embed-cached-h);
    height: auto;
  }

  body[data-layout="shot"] .scroll-footer-spacer {
    flex-shrink: 0;
    width: 100%;
    min-height: 120px;
    height: calc(
      var(--footer-chrome-h) + var(--scroll-footer-extra, 72px) + env(safe-area-inset-bottom, 0px)
    );
    pointer-events: none;
  }

  body[data-layout="shot"] .embed-stage--with-points {
    grid-template-columns: 1fr;
    gap: var(--space-4);
  }

  body[data-layout="shot"] .embed-points {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-3);
    align-self: stretch;
    min-height: 2.75rem;
  }
}

/* Shot slides: lock embed band so frame top aligns across 05-09 */
body[data-layout="shot"] .embed-stage--with-points {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4);
  align-items: start;
}

/* —— Architecture flow —— */
.layout-arch .slide-body {
  max-width: min(920px, 100%);
  margin: 0 auto;
  width: 100%;
}

.arch-flow {
  display: grid;
  gap: var(--layout-grid-gap);
  width: 100%;
}

.arch-box {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.arch-box b {
  display: block;
  font-size: var(--font-size-md);
  margin-bottom: var(--space-1);
}

.arch-box p {
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text-muted);
}

.arch-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--layout-grid-gap);
}

.arch-arrow {
  text-align: center;
  color: var(--color-accent);
  font-size: 18px;
  line-height: 1;
}

/* —— Roles slide (slide 4) — large blocks —— */
.layout-arch--roles .slide-body {
  max-width: min(1100px, 100%);
}

.layout-arch--roles .arch-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-4);
}

.layout-arch--roles .arch-row {
  display: contents;
}

.layout-arch--roles .arch-arrow {
  display: none;
}

.layout-arch--roles .arch-box--roles {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-height: 148px;
  padding: var(--space-5) var(--space-5);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.layout-arch--roles .arch-box__tag {
  display: block;
  margin-bottom: var(--space-2);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}

.layout-arch--roles .arch-box b {
  margin-bottom: var(--space-2);
}

.layout-arch--roles .arch-box p {
  color: var(--color-text-secondary);
  margin: 0;
}

/* —— Flow infographic (slide 5) —— */
.flow-infographic {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  width: 100%;
  padding: var(--space-4) var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
}

.flow-infographic__node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  flex: 0 0 auto;
  min-width: 0;
}

.flow-infographic__dot {
  display: block;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--color-accent);
  box-shadow: 0 0 0 4px rgba(49, 65, 128, 0.22);
}

.flow-infographic__line {
  flex: 1 1 auto;
  height: 2px;
  min-width: 10px;
  margin: 0 2px;
  margin-bottom: 1.35rem;
  background: linear-gradient(90deg, var(--color-accent), rgba(255, 255, 255, 0.12));
  opacity: 0.85;
}

.flow-infographic__label {
  font-size: 11px;
  line-height: 1.25;
  text-align: center;
  color: var(--color-text-muted);
  max-width: 9ch;
}

/* —— Pinned head + split body (slides 6–11, 10, 15) —— */
.layout-split-duo--pinned .slide-grid {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  grid-template-columns: 1fr;
  flex: 1;
  min-height: 0;
  width: 100%;
  gap: var(--space-4);
  align-content: start;
}

.slide-head--pinned {
  grid-row: 1;
  grid-column: 1;
  align-self: start;
  width: 100%;
  flex-shrink: 0;
  text-align: center;
}

.slide-head--pinned h2,
.slide-head--pinned .lead {
  margin-left: auto;
  margin-right: auto;
}

.layout-split-duo--pinned .split-duo-body {
  grid-row: 2;
  grid-column: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: var(--space-5);
  align-items: center;
  min-height: 0;
  overflow: hidden;
}

.layout-split-duo--pinned .split-duo-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.layout-split-duo--pinned .split-duo-media {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
}

.layout-split-duo--pinned .step-points {
  margin-top: 0;
}

.layout-cards-visual .cards-visual-shot {
  width: 100%;
  margin-bottom: 0;
}

/* —— Contacts deck (slide 17) —— */
.layout-contacts .slide-body {
  align-items: center;
  justify-content: center;
}

.contacts-deck {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: var(--space-4);
  width: 100%;
  max-width: min(var(--layout-max), 100%);
  margin: 0 auto;
  flex: 0 1 auto;
  align-items: stretch;
  align-content: center;
}

.contacts-deck-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  min-height: 100%;
  height: 100%;
  padding: var(--space-5) var(--space-4);
  gap: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  background: var(--color-bg-card);
  color: var(--color-text);
  position: relative;
  overflow: hidden;
  transition:
    border-color var(--duration-fast),
    transform var(--duration-fast),
    box-shadow var(--duration-fast);
}

.contacts-deck-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--color-accent), rgba(49, 65, 128, 0.35));
}

.contacts-deck-card--legal::before {
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0.08));
}

.contacts-deck-card--party:hover,
.contacts-deck-card--legal:hover {
  border-color: rgba(49, 65, 128, 0.55);
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.28);
}

.contacts-deck-card__tag {
  display: block;
  margin: 0;
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}

.contacts-deck-card__person {
  margin: 0;
  font-size: clamp(20px, 2.2vw, 26px);
  font-weight: var(--font-weight-heavy);
  line-height: var(--line-height-tight);
  color: #ffffff;
}

.contacts-deck-card__role {
  margin: 0;
  font-size: var(--slide-body-size);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
}

.contacts-deck-card__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin: 0;
  width: 100%;
  max-width: 100%;
}

.contacts-deck-card__legal {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  width: 100%;
}

.contacts-deck-card__legal-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin: 0;
}

.contacts-deck-card__legal-key {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-bold);
}

.contacts-deck-card__legal-val {
  font-size: var(--slide-body-size);
  line-height: 1.4;
  color: #ffffff;
  font-weight: var(--font-weight-bold);
}

.contacts-deck-card__legal-year {
  margin: var(--space-1) 0 0;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.contacts-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  width: 100%;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.035);
  color: inherit;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition:
    background var(--duration-fast),
    border-color var(--duration-fast),
    transform var(--duration-fast);
}

.contacts-action:hover {
  border-color: rgba(49, 65, 128, 0.65);
  background: rgba(49, 65, 128, 0.16);
  transform: translateY(-1px);
}

.contacts-action.is-copied {
  border-color: var(--color-accent);
  background: rgba(49, 65, 128, 0.28);
}

.contacts-action__label {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}

.contacts-action__value {
  font-size: clamp(14px, 1.5vw, 17px);
  font-weight: var(--font-weight-bold);
  line-height: 1.3;
  color: #ffffff;
  word-break: break-word;
}

.contacts-deck-hint {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin: var(--space-4) auto 0;
  max-width: min(52ch, 100%);
  font-size: 11px;
  line-height: 1.45;
  color: var(--color-text-muted);
  text-align: center;
}

/* —— Scope list —— */
.list--2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--layout-grid-gap);
  align-content: center;
}

/* —— Price slide —— */
.layout-price .slide-body {
  max-width: min(920px, 100%);
  margin: 0 auto;
  width: 100%;
}

.price-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: var(--layout-grid-gap);
  align-items: start;
}

.price-packages {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.price-package {
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
}

.price-package-main {
  border-color: rgba(255, 82, 0, 0.35);
}

.price-package .label {
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
  margin-bottom: var(--space-2);
}

.price-package b {
  display: block;
  font-size: clamp(22px, 2.8vw, 30px);
  margin-bottom: var(--space-2);
}

.price-package p {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  line-height: var(--line-height-body);
}

.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size-base);
}

.price-table th,
.price-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--color-border);
}

.price-table th {
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-caps-sm);
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-bold);
}

.price-table td:last-child,
.price-table th:last-child {
  text-align: right;
}

.price-table tr.total td {
  font-weight: var(--font-weight-heavy);
  color: var(--color-accent);
  border-bottom: none;
}

.price-cta {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
}

.price-cta-lead {
  font-size: var(--font-size-base);
  color: var(--color-text-muted);
  line-height: var(--line-height-body);
  margin-bottom: var(--space-4);
}

/* —— Cover slide (photo background) —— */
.slide.layout-cover {
  position: relative;
  padding: 0;
}

.cover-bg {
  position: absolute;
  inset: 0;
  background-color: var(--color-bg);
  background-image: url("assets/cover-mall-promo.png");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
  transform: scale(1.03);
}

.cover-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(20, 20, 20, 0.82) 0%, rgba(20, 20, 20, 0.5) 42%, rgba(20, 20, 20, 0.9) 100%),
    radial-gradient(ellipse 80% 60% at 50% 40%, rgba(49, 65, 128, 0.12) 0%, rgba(20, 20, 20, 0.75) 100%);
}

/* —— Flow steps (visitor journey) —— */
.layout-flow .slide-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  justify-content: center;
}

.flow-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: var(--space-2);
  align-items: stretch;
}

.flow-step {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-3);
  background: var(--color-bg-card);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  min-height: 0;
}

.flow-step__n {
  display: none;
}

.flow-step__title {
  display: block;
  font-size: var(--font-size-base);
  line-height: var(--line-height-tight);
  font-weight: var(--font-weight-bold);
}

.flow-step__text {
  margin: 0;
  font-size: var(--font-size-sm);
  line-height: var(--line-height-body);
  color: var(--color-text-muted);
}

.flow-step__arrow {
  flex: 0 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-accent);
  font-size: var(--font-size-xl);
  font-weight: var(--font-weight-bold);
  opacity: 0.7;
}

.layout-arch .arch-row {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.layout-shot-img .shot-grid--solo {
  width: 100%;
  max-width: var(--shot-max-w-solo);
  margin: 0 auto;
}

/* —— Step slides (one scene per slide) —— */
.step-badge {
  display: block;
  min-height: var(--step-badge-slot-h);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
  margin-bottom: 0;
}

.step-points {
  list-style: none;
  margin: var(--space-4) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.step-points li {
  position: relative;
  padding-left: 1.1rem;
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
}

.step-points li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--color-accent);
}

.step-visual .shot-frame {
  margin: 0;
}


.cover-center {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  min-height: 100svh;
  min-height: 100dvh;
  padding: var(--layout-pad-y) var(--layout-pad-x) var(--layout-pad-bottom);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.cover-topbar {
  width: 100%;
  margin-bottom: var(--space-6);
}

.cover-title {
  font-size: clamp(44px, 8.5vw, 96px);
  font-weight: var(--font-weight-heavy);
  line-height: var(--line-height-tight);
  letter-spacing: var(--letter-spacing-heading);
  margin-bottom: var(--space-4);
  max-width: none;
}

.cover-line {
  display: block;
}

.cover-accent {
  color: var(--color-accent);
}

.cover-sub {
  font-size: var(--font-size-lg);
  line-height: var(--line-height-body);
  color: var(--color-text-secondary);
  max-width: 40ch;
  margin-bottom: var(--space-2);
}

.cover-sub-accent {
  color: var(--color-accent);
  font-weight: var(--font-weight-bold);
}

.cover-for {
  font-size: var(--font-size-base);
  line-height: var(--line-height-body);
  color: var(--color-text-muted);
  max-width: 46ch;
  margin-bottom: var(--space-5);
}

.cover-btns {
  justify-content: center;
}

.cover-hint {
  margin-top: var(--space-5);
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  opacity: 0.45;
}

/* —— Footer extras (email button) —— */
.email-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  text-decoration: none;
  border: 1px solid var(--color-border-strong);
  background: var(--color-bg-elevated);
  color: var(--color-text);
  cursor: pointer;
  transition: transform var(--duration-fast), filter var(--duration-fast), background var(--duration-fast);
}

.email-cta:hover {
  filter: brightness(1.08);
  transform: scale(1.05);
}

.email-cta.is-copied {
  background: var(--color-nav);
  border-color: var(--color-nav-border);
}

/* —— Footer / nav chrome (B2B blue, readable on cover photos) —— */
.footer-ui .nav-arrows .nav-arrow {
  background: var(--color-nav);
  border: 1px solid var(--color-nav-border);
  color: #ffffff;
  box-shadow:
    0 4px 18px var(--color-nav-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);
  transition:
    background var(--duration-fast),
    transform var(--duration-fast),
    box-shadow var(--duration-fast);
}

.footer-ui .nav-arrows a.nav-arrow:hover {
  background: var(--color-nav-hover);
  transform: scale(1.05);
  box-shadow:
    0 6px 22px var(--color-nav-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

.footer-ui .nav-arrows .nav-arrow.is-disabled {
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(147, 197, 253, 0.28);
}

/* —— Contacts widget —— */
.contacts-widget {
  position: relative;
  pointer-events: auto;
}

.contacts-fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid var(--color-nav-border);
  background: var(--color-nav);
  color: #ffffff;
  cursor: pointer;
  box-shadow:
    0 4px 18px var(--color-nav-glow),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
  transition:
    background var(--duration-fast),
    transform var(--duration-fast),
    box-shadow var(--duration-fast);
}

.contacts-fab:hover,
.contacts-widget.is-open .contacts-fab {
  background: var(--color-nav-hover);
  transform: scale(1.05);
}

.contacts-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 12px);
  width: min(340px, calc(100vw - 48px));
  padding: var(--space-3);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-nav-border);
  background: rgba(15, 23, 42, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow:
    0 18px 48px rgba(0, 0, 0, 0.5),
    0 0 0 1px rgba(37, 99, 235, 0.12) inset;
  z-index: 80;
}

.contacts-panel__title {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: #93c5fd;
  font-weight: var(--font-weight-bold);
}

.contacts-group {
  margin-bottom: var(--space-3);
}

.contacts-group:last-of-type {
  margin-bottom: 0;
}

.contacts-group__label {
  margin: 0 0 var(--space-1);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-bold);
}

.contacts-group__person {
  margin: 0 0 var(--space-2);
  font-size: 11px;
  line-height: 1.35;
  color: var(--color-text-secondary);
}

.contacts-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin-bottom: var(--space-2);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(147, 197, 253, 0.22);
  background: rgba(37, 99, 235, 0.12);
  color: #ffffff;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition:
    background var(--duration-fast),
    border-color var(--duration-fast),
    transform var(--duration-fast);
}

.contacts-item:last-child {
  margin-bottom: 0;
}

.contacts-item:hover {
  background: rgba(37, 99, 235, 0.24);
  border-color: var(--color-nav-border);
}

.contacts-item.is-copied {
  background: var(--color-nav);
  border-color: var(--color-nav-border);
}

.contacts-item__primary {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: #dbeafe;
}

.contacts-item__meta {
  font-size: var(--font-size-sm);
  line-height: 1.35;
  color: var(--color-text-secondary);
}

.contacts-hint {
  margin: var(--space-2) 0 0;
  font-size: 11px;
  line-height: 1.35;
  color: var(--color-text-muted);
}

/* —— Contacts page (final slide) —— */
.layout-contacts .contacts-page-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: var(--space-5);
  align-items: start;
}

.contacts-page-block__title {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-xs);
  letter-spacing: var(--letter-spacing-caps);
  text-transform: uppercase;
  color: #93c5fd;
  font-weight: var(--font-weight-bold);
}

.contacts-page-group {
  margin-bottom: var(--space-4);
}

.contacts-page-group:last-of-type {
  margin-bottom: 0;
}

.contacts-page-group__label {
  margin: 0 0 var(--space-2);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  font-weight: var(--font-weight-bold);
}

.contacts-page-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  width: 100%;
  margin-bottom: var(--space-2);
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(147, 197, 253, 0.22);
  background: rgba(37, 99, 235, 0.1);
  color: #ffffff;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
  transition:
    background var(--duration-fast),
    border-color var(--duration-fast);
}

.contacts-page-item:hover {
  background: rgba(37, 99, 235, 0.22);
  border-color: var(--color-nav-border);
}

.contacts-page-item.is-copied {
  background: var(--color-nav);
  border-color: var(--color-nav-border);
}

.contacts-page-item__primary {
  font-size: var(--font-size-base);
  font-weight: var(--font-weight-bold);
  color: #dbeafe;
}

.contacts-page-item__meta {
  font-size: var(--font-size-sm);
  line-height: 1.35;
  color: var(--color-text-secondary);
}

.contacts-page-hint {
  margin: var(--space-2) 0 0;
  font-size: 11px;
  color: var(--color-text-muted);
}

.legal-card {
  padding: var(--space-4);
  border-radius: var(--radius-lg);
  border: 1px solid rgba(147, 197, 253, 0.24);
  background: rgba(15, 23, 42, 0.55);
}

.legal-card__name {
  margin: 0 0 var(--space-3);
  font-size: var(--font-size-md);
  font-weight: var(--font-weight-bold);
  color: #ffffff;
}

.legal-card__ids,
.legal-card__address,
.legal-card__year {
  margin: 0 0 var(--space-2);
  font-size: var(--font-size-sm);
  line-height: 1.5;
  color: var(--color-text-secondary);
}

.legal-card__year {
  margin-bottom: 0;
  margin-top: var(--space-3);
  color: var(--color-text-muted);
}


body[data-layout="cover"] .cover-topbar {
  padding: 10px 16px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(20, 20, 20, 0.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
}

body[data-layout="cover"] .cover-topbar .nav-hint {
  opacity: 0.85;
  color: #ffffff;
}

/* —— Responsive —— */
@media (max-width: 960px), (hover: none), (pointer: coarse) {
  :root {
    --slide-title-size: 28px;
    --slide-lead-size: 15px;
    --slide-body-size: 15px;
    --slide-card-title-size: 17px;
  }

  .embed-stage--with-points,
  .arch-row,
  .list--2col,
  .price-layout {
    grid-template-columns: 1fr;
  }

  .flow-steps {
    flex-direction: column;
    flex-wrap: nowrap;
    align-items: stretch;
    gap: 0;
  }

  .flow-step {
    flex: none;
    width: 100%;
  }

  .flow-step__arrow {
    flex: none;
    width: 100%;
    height: auto;
    padding: var(--space-1) 0;
    transform: rotate(90deg);
    font-size: var(--font-size-lg);
  }

  .flow-infographic {
    display: none;
  }

  .layout-arch .arch-row {
    grid-template-columns: 1fr;
  }

  .layout-arch--roles .arch-flow {
    grid-template-columns: 1fr;
  }

  .layout-arch--roles .arch-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .layout-split-duo--pinned .split-duo-body {
    grid-template-columns: 1fr;
    gap: var(--space-5);
  }

  .layout-split-duo--pinned .split-duo-main {
    order: 1;
  }

  .layout-split-duo--pinned .split-duo-media {
    order: 2;
  }

  .contacts-deck {
    grid-template-columns: 1fr;
    grid-auto-rows: auto;
    gap: var(--space-3);
  }

  .contacts-deck-card {
    min-height: 0;
    height: auto;
  }

  .embed-frame__viewport iframe.site-embed {
    min-height: min(48vh, 420px);
  }
}

/* Phone only · cover top-aligned */
@media (max-width: 579px) {
  .layout-cover .cover-center {
    justify-content: flex-start;
    padding-top: max(var(--layout-pad-y), env(safe-area-inset-top, 0px));
  }

  .layout-cover .cover-title {
    font-size: clamp(36px, 10vw, 52px);
  }
}

/* Tablet touch · stable typography from first paint (no phone→tablet jump) */
@media (min-width: 580px) and (hover: none) and (pointer: coarse) {
  :root {
    --font-size-h2: clamp(34px, 4.2vw, 48px);
    --font-size-lg: clamp(18px, 2.3vw, 22px);
    --font-size-xl: clamp(18px, 2.3vw, 22px);
    --font-size-base: 16px;
    --btn-font-size: 16px;
  }

  .slide-head h2 {
    font-size: var(--font-size-h2);
  }

  .slide-head .lead,
  .lead {
    font-size: var(--font-size-lg);
  }

  .layout-cover .cover-center {
    max-width: min(760px, 90vw);
    justify-content: center;
    padding-top: max(var(--space-7), env(safe-area-inset-top, 0px));
    padding-bottom: max(var(--space-8), env(safe-area-inset-bottom, 0px));
  }

  .layout-cover .cover-topbar {
    margin-bottom: var(--space-7);
    font-size: 12px;
    letter-spacing: 0.12em;
  }

  .layout-cover .cover-topbar .mark,
  .layout-cover .cover-topbar .nav-hint {
    font-size: 13px;
  }

  .layout-cover .cover-topbar .nav-hint {
    opacity: 0.7;
    text-align: right;
    max-width: 48%;
  }

  .layout-cover .cover-title {
    font-size: clamp(58px, 9.5vw, 104px);
    margin-bottom: var(--space-5);
    min-height: 2.94em;
  }

  .layout-cover .cover-sub {
    font-size: clamp(21px, 2.7vw, 27px);
    max-width: none;
    width: min(100%, 34em);
    margin-bottom: var(--space-3);
  }

  .layout-cover .cover-for {
    font-size: clamp(17px, 2.1vw, 21px);
    max-width: none;
    width: min(100%, 36em);
    margin-bottom: var(--space-7);
  }

  .layout-cover .cover-btns {
    margin-top: var(--space-4);
    justify-content: center;
    gap: var(--space-3);
  }

  .layout-cover .cover-btns .btn {
    font-size: 18px;
    padding: 16px 30px;
  }

  .layout-cover .cover-hint {
    margin-top: var(--space-6);
    font-size: 16px;
    opacity: 0.55;
  }
}

@media (max-height: 820px) and (hover: hover) and (pointer: fine) {
  .cover-title {
    font-size: clamp(36px, 7vw, 64px);
  }
}

/* —— Desktop · fit content in 100dvh (no scroll) —— */
@media (hover: hover) and (pointer: fine) {
  :root {
    --layout-pad-y: 40px;
    --shot-max-h: clamp(200px, 36vh, 320px);
  }

  .slide .slide-grid {
    flex: 1;
    min-height: 0;
  }

  .slide .slide-body {
    flex: 1;
    min-height: 0;
    overflow: hidden;
  }

  .slide-head .topbar {
    margin-bottom: var(--space-3);
  }

  .slide:not(.layout-cover) .slide-head .lead {
    margin-top: var(--space-1);
  }

  /* Head pinned top; only body content centered */
  .layout-cards:not(.layout-cards-visual) .slide-grid,
  .layout-list .slide-grid,
  .layout-flow .slide-grid,
  .layout-arch--roles .slide-grid,
  .layout-contacts .slide-grid {
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    align-content: start;
    flex: 1;
    min-height: 0;
  }

  .layout-cards:not(.layout-cards-visual) .slide-head,
  .layout-list .slide-head,
  .layout-flow .slide-head,
  .layout-arch--roles .slide-head,
  .layout-contacts .slide-head {
    grid-row: 1;
    align-self: start;
  }

  .layout-cards:not(.layout-cards-visual) .slide-body,
  .layout-list .slide-body,
  .layout-flow .slide-body,
  .layout-arch--roles .slide-body,
  .layout-contacts .slide-body {
    grid-row: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    min-height: 0;
    overflow: visible;
  }

  /* Flow — cards + infographic, centered */
  .layout-flow .slide-body {
    gap: var(--space-3);
    justify-content: center;
  }

  .flow-steps {
    gap: var(--space-2);
  }

  .flow-step {
    padding: var(--space-3);
    gap: var(--space-2);
  }

  .flow-step__text {
    font-size: var(--slide-body-size);
    line-height: var(--line-height-body);
  }

  .layout-split-duo--pinned .split-duo-body {
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  }

  .layout-split-duo--pinned .shot-frame__viewport--natural,
  .layout-split-duo--pinned .shot-frame__viewport--natural .shot-frame__img {
    max-height: min(48vh, 460px);
    object-fit: contain;
  }

  .grid-cards {
    gap: var(--space-3);
    margin-top: 0;
  }

  /* Arch (slide 12 — vertical flow) */
  .layout-arch:not(.layout-arch--roles) .arch-box {
    padding: var(--space-3) var(--space-4);
  }

  .layout-arch:not(.layout-arch--roles) .arch-box b {
    font-size: var(--deck-card-title-size);
  }

  .layout-arch--roles .arch-box--roles {
    min-height: 128px;
    padding: var(--space-4) var(--space-5);
  }

  /* List */
  .pain li,
  .list li {
    padding: 10px 0;
    font-size: var(--font-size-base);
  }

  .contacts-deck-hint {
    font-size: 10px;
  }
}

@media (max-height: 900px) and (hover: hover) and (pointer: fine) {
  :root {
    --layout-pad-y: 32px;
    --shot-max-h: clamp(180px, 32vh, 280px);
    --slide-title-size: 32px;
  }

  .layout-split-duo--pinned .shot-frame__viewport--natural,
  .layout-split-duo--pinned .shot-frame__viewport--natural .shot-frame__img {
    max-height: min(40vh, 380px);
  }
}
