/* Shared light/dark theme for niki-losk.ru. The default is light. */
:root,
html[data-theme="light"] {
  color-scheme: light;
  --bg: #ffffff;
  --text: #181817;
  --muted: #686762;
  --line: #e5e1d7;
  --card: #fcfcfa;
  --thumb: #e8e5dc;
  --accent: #c8a24a;
}

html[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f0f0f;
  --text: #f4f2ed;
  --muted: #b7b4ac;
  --line: #33312d;
  --card: #1a1a19;
  --thumb: #34332f;
  --accent: #d5b15a;
}

.theme-toggle {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: space-between;
  width: 66px;
  height: 34px;
  margin: 0;
  padding: 0 7px;
  overflow: hidden;
  border: 1px solid #ded9cd;
  border-radius: 999px;
  background: #ffffff;
  color: #282722;
  box-shadow: 0 3px 10px rgba(17, 17, 17, 0.06);
  cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible {
  border-color: rgba(213, 177, 90, 0.85);
  outline: none;
}

.theme-toggle-icon {
  z-index: 1;
  display: inline-flex;
  width: 16px;
  height: 16px;
}

.theme-toggle-icon svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

.theme-toggle-thumb {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #f7e7ad;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: transform 0.18s ease, background-color 0.18s ease;
}

html[data-theme="dark"] .theme-toggle-thumb {
  transform: translateX(30px);
  background: #d0b367;
}

html[data-theme="dark"] .theme-toggle {
  border-color: rgba(255, 255, 255, 0.2);
  background: #151515;
  color: #f6f3e9;
  box-shadow: none;
}

.theme-toggle-text {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* The personal-site surface uses older hard-coded dark values. */
html[data-theme="light"] body:not(.fulfillment-body) .link-group,
html[data-theme="light"] body:not(.fulfillment-body) .links a,
html[data-theme="light"] body:not(.fulfillment-body) .contacts a,
html[data-theme="light"] body:not(.fulfillment-body) .button,
html[data-theme="light"] body:not(.fulfillment-body) .video-section .card,
html[data-theme="light"] body:not(.fulfillment-body) #cases .card,
html[data-theme="light"] body:not(.fulfillment-body) #projects .card {
  background: var(--card);
}

html[data-theme="light"] .blog-card-cover,
html[data-theme="light"] .thumb {
  color: #77736a;
}

/* The black top navigation remains readable in both themes. */
.site-contact-bar .site-primary-links a,
.site-contact-bar .site-contact-links a {
  color: #f5f3ed;
}

.site-contact-bar .theme-toggle {
  margin-left: 2px;
}

/* Fulfillment: variables and explicit component surfaces for dark mode. */
html[data-theme="dark"] .fulfillment-body {
  --color-bg: #111111;
  --color-text: #f4f2ed;
  --color-muted: #bab7af;
  --color-soft: #1b1b1a;
  --color-soft-strong: #262522;
  --color-border: #3a3833;
  --color-card: #1a1a19;
  --color-accent: #d0aa52;
  --color-accent-dark: #e2bf6b;
  --color-dark: #fbfaf6;
  --f-accent-soft: #30291b;
  --shadow-sm: 0 10px 30px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 18px 44px rgba(0, 0, 0, 0.28);
  --button-primary-bg: #d0aa52;
  --button-primary-hover: #e2bf6b;
  --button-primary-text: #171510;
  --button-secondary-bg: #262521;
  --button-secondary-hover: #302f2a;
  --button-secondary-text: #f4f2ed;
  --button-secondary-border: #4a4841;
}

html[data-theme="light"] .fulfillment-body {
  --button-primary-bg: #1c1c1a;
  --button-primary-hover: #35342f;
  --button-primary-text: #ffffff;
  --button-secondary-bg: #ffffff;
  --button-secondary-hover: #f4f1e9;
  --button-secondary-text: #1c1c1a;
  --button-secondary-border: #ded9cd;
}

html[data-theme="dark"] .fulfillment-header {
  background: rgba(17, 17, 17, 0.96);
}

.fulfillment-header .theme-toggle {
  align-self: flex-start;
  margin-top: 2px;
}

/* Buttons use theme variables instead of a fixed white label. */
.fulfillment-body .button,
.fulfillment-body .fulfillment-button {
  border-color: var(--button-primary-bg) !important;
  background: var(--button-primary-bg) !important;
  color: var(--button-primary-text) !important;
}

.fulfillment-body .button:hover,
.fulfillment-body .button:focus-visible,
.fulfillment-body .fulfillment-button:hover,
.fulfillment-body .fulfillment-button:focus-visible {
  border-color: var(--button-primary-hover) !important;
  background: var(--button-primary-hover) !important;
  color: var(--button-primary-text) !important;
}

.fulfillment-body .button.button-secondary,
.fulfillment-body .fulfillment-button.fulfillment-button-secondary,
.fulfillment-body .blog-card-read {
  border-color: var(--button-secondary-border) !important;
  background: var(--button-secondary-bg) !important;
  color: var(--button-secondary-text) !important;
}

.fulfillment-body .button.button-secondary:hover,
.fulfillment-body .button.button-secondary:focus-visible,
.fulfillment-body .fulfillment-button.fulfillment-button-secondary:hover,
.fulfillment-body .fulfillment-button.fulfillment-button-secondary:focus-visible,
.fulfillment-body .blog-card-link:hover .blog-card-read,
.fulfillment-body .blog-card-link:focus-visible .blog-card-read {
  border-color: var(--color-accent) !important;
  background: var(--button-secondary-hover) !important;
  color: var(--button-secondary-text) !important;
}

html[data-theme="dark"] .fulfillment-body .price-card,
html[data-theme="dark"] .fulfillment-body .feature-list li,
html[data-theme="dark"] .fulfillment-body .fulfillment-rich-card,
html[data-theme="dark"] .fulfillment-body .pill,
html[data-theme="dark"] .fulfillment-body .fulfillment-steps span,
html[data-theme="dark"] .fulfillment-body .faq-item,
html[data-theme="dark"] .fulfillment-body .fulfillment-faq-item,
html[data-theme="dark"] .fulfillment-body .form-card,
html[data-theme="dark"] .fulfillment-body .fulfillment-form,
html[data-theme="dark"] .fulfillment-body .fulfillment-footer-links a,
html[data-theme="dark"] .fulfillment-body .blog-card,
html[data-theme="dark"] .fulfillment-body .blog-article-summary,
html[data-theme="dark"] .fulfillment-body .blog-article-links,
html[data-theme="dark"] .fulfillment-body .blog-article-cta {
  background: var(--color-card);
}

html[data-theme="dark"] .fulfillment-body .fulfillment-calculator-result {
  background: linear-gradient(180deg, #201f1c 0%, var(--f-accent-soft) 100%);
}

html[data-theme="dark"] .fulfillment-body .fulfillment-field input,
html[data-theme="dark"] .fulfillment-body .fulfillment-field textarea,
html[data-theme="dark"] .fulfillment-body .fulfillment-field select,
html[data-theme="dark"] .fulfillment-body .blog-comments-field input,
html[data-theme="dark"] .fulfillment-body .blog-comments-field textarea {
  background: #252421;
  color: var(--f-text);
}

html[data-theme="dark"] .fulfillment-body .button-secondary,
html[data-theme="dark"] .fulfillment-body .fulfillment-button-secondary,
html[data-theme="dark"] .fulfillment-body .blog-card-read,
html[data-theme="dark"] .fulfillment-body .fulfillment-body-blog-post .blog-article-links .pill {
  background: #262521;
  color: var(--f-text);
}

html[data-theme="dark"] .fulfillment-body .blog-card-image,
html[data-theme="dark"] .fulfillment-body .blog-card-image-placeholder,
html[data-theme="dark"] .fulfillment-body .blog-article-hero-image,
html[data-theme="dark"] .fulfillment-body .blog-article-image-placeholder,
html[data-theme="dark"] .fulfillment-body .blog-article-hero-placeholder {
  border-color: rgba(255, 255, 255, 0.08);
  background-color: #2c2b28;
}

html[data-theme="dark"] .fulfillment-body .blog-card-title,
html[data-theme="dark"] .fulfillment-body .blog-article-title,
html[data-theme="dark"] .fulfillment-body .blog-article-section h2,
html[data-theme="dark"] .fulfillment-body .blog-article-summary h2,
html[data-theme="dark"] .fulfillment-body .blog-article-cta h2,
html[data-theme="dark"] .fulfillment-body .blog-comments-title,
html[data-theme="dark"] .fulfillment-body .blog-comment-author {
  color: var(--f-text);
}

html[data-theme="dark"] .fulfillment-body .blog-card-description,
html[data-theme="dark"] .fulfillment-body .blog-card-date,
html[data-theme="dark"] .fulfillment-body .blog-article-meta-item,
html[data-theme="dark"] .fulfillment-body .blog-article-lead,
html[data-theme="dark"] .fulfillment-body .blog-article-section p,
html[data-theme="dark"] .fulfillment-body .blog-article-cta p,
html[data-theme="dark"] .fulfillment-body .blog-article-disclaimer,
html[data-theme="dark"] .fulfillment-body .blog-article-list,
html[data-theme="dark"] .fulfillment-body .blog-comment-text,
html[data-theme="dark"] .fulfillment-body .blog-comments-empty {
  color: var(--f-muted);
}

html[data-theme="dark"] .fulfillment-body .blog-card-badge {
  border-color: rgba(226, 191, 107, 0.26);
  background: rgba(208, 170, 82, 0.16);
  color: #e5c978;
}

@media (max-width: 760px) {
  .site-contact-bar .theme-toggle {
    position: absolute;
    top: 10px;
    right: 12px;
  }

  .fulfillment-header .theme-toggle {
    margin-top: 0;
  }
}

/* Compact hero and services overview on the fulfillment home page. */
.fulfillment-section-hero {
  min-height: min(68svh, 640px);
  padding-top: 50px;
  padding-bottom: 62px;
}

.fulfillment-section-hero .fulfillment-section-inner {
  width: min(100%, 1000px);
}

.fulfillment-section-hero .section-title {
  max-width: 18ch;
  font-size: clamp(42px, 5vw, 64px);
}

.fulfillment-section-hero .section-description {
  max-width: 700px;
  margin-top: 16px;
  font-size: clamp(17px, 1.6vw, 20px);
  line-height: 1.58;
}

.fulfillment-section-hero .fulfillment-list {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: 1000px;
  gap: 12px;
  margin-top: 26px;
}

.fulfillment-section-hero .fulfillment-list li {
  min-height: 0;
  padding: 15px 16px;
  font-size: 14px;
  font-weight: 650;
  line-height: 1.45;
}

.fulfillment-section-hero .fulfillment-actions {
  margin-top: 24px;
}

/* Three-step fulfillment process: real images are used automatically when supplied. */
.fulfillment-process-section {
  min-height: 0;
  padding: 62px 0;
}

.fulfillment-process-inner {
  width: 100%;
  max-width: 1180px;
}

.fulfillment-process-header {
  max-width: 720px;
}

.fulfillment-process-header .section-title {
  font-size: clamp(38px, 4.2vw, 54px);
}

.fulfillment-process-header .section-description {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.55;
}

.fulfillment-process-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  width: 100%;
  margin-top: 30px;
}

.fulfillment-process-card {
  display: flex;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-card);
  box-shadow: var(--shadow-sm);
}

.fulfillment-process-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.fulfillment-process-card-placeholder {
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.66), transparent 48%), #e2e0da;
}

.fulfillment-process-card-content {
  display: flex;
  min-height: 0;
  flex: 1 1 auto;
  flex-direction: column;
  padding: 22px;
}

.fulfillment-process-stage {
  margin: 0 0 10px;
  color: var(--color-accent-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fulfillment-process-card h3 {
  margin: 0;
  color: var(--color-dark);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.fulfillment-process-card-content > p:last-child {
  margin: 12px 0 0;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.55;
}

.fulfillment-audience-section {
  min-height: 0;
  padding: 62px 0;
}

.fulfillment-audience-inner {
  width: 100%;
  max-width: 1180px;
}

.fulfillment-audience-header {
  max-width: 720px;
}

.fulfillment-audience-header .section-title {
  font-size: clamp(38px, 4.2vw, 54px);
}

.fulfillment-audience-header .section-description {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.55;
}

.fulfillment-audience-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  gap: 20px;
  width: 100%;
  margin-top: 30px;
}

.fulfillment-audience-card {
  display: flex;
  height: 100%;
  min-width: 0;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-card);
  box-shadow: var(--shadow-sm);
}

.fulfillment-audience-card-media {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.fulfillment-audience-card-placeholder {
  border-bottom: 1px solid var(--color-border);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.66), transparent 48%), #e2e0da;
}

.fulfillment-audience-card-content {
  display: flex;
  height: 100%;
  flex-direction: column;
  padding: 22px;
}

.fulfillment-audience-card h3 {
  margin: 0 0 18px;
  color: var(--color-dark);
  font-size: 22px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.fulfillment-audience-label {
  margin: 0;
  color: var(--color-accent-dark);
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.fulfillment-audience-copy {
  margin: 8px 0 18px;
  color: var(--color-muted);
  font-size: 15px;
  line-height: 1.58;
}

.fulfillment-audience-copy:last-child {
  margin-bottom: 0;
}

html[data-theme="dark"] .fulfillment-audience-card {
  border-color: var(--color-border);
  background: var(--color-card);
}

html[data-theme="dark"] .fulfillment-audience-card-placeholder {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 48%), #2b2a26;
}

/* Native FAQ disclosure keeps several answers open without extra JavaScript. */
.fulfillment-faq-item {
  padding: 0;
  overflow: hidden;
}

.fulfillment-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px;
  color: var(--color-dark);
  cursor: pointer;
  font-size: 20px;
  font-weight: 750;
  line-height: 1.35;
  list-style: none;
}

.fulfillment-faq-item summary::-webkit-details-marker {
  display: none;
}

.fulfillment-faq-item summary::after {
  flex: 0 0 auto;
  color: var(--color-accent-dark);
  content: "+";
  font-size: 26px;
  font-weight: 500;
  line-height: 1;
}

.fulfillment-faq-item[open] summary::after {
  content: "−";
}

.fulfillment-faq-answer {
  padding: 0 24px 22px;
}

.fulfillment-faq-answer p {
  margin: 0;
  color: var(--color-muted);
  font-size: 16px;
  line-height: 1.6;
}

.fulfillment-faq-item summary:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: -3px;
}

html[data-theme="dark"] .fulfillment-process-card {
  border-color: var(--color-border);
  background: var(--color-card);
}

html[data-theme="dark"] .fulfillment-process-card-placeholder {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 48%), #2b2a26;
}

.services-showcase-section {
  min-height: 0;
  align-items: flex-start;
  padding: 52px 0;
}

.services-showcase-inner {
  width: 100%;
  max-width: 1180px;
}

.services-showcase-header {
  max-width: 760px;
}

.services-showcase-header .section-title {
  font-size: clamp(38px, 4.2vw, 54px);
}

.services-showcase-header .section-description {
  margin-top: 14px;
  font-size: 17px;
  line-height: 1.55;
}

.service-operations-grid,
.marketplace-cards-grid,
.services-overview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  width: 100%;
}

.service-operations-grid {
  margin-top: 30px;
}

.services-overview-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 1fr;
  margin-top: 30px;
}

.service-operation-card,
.marketplace-service-card {
  display: flex;
  height: 100%;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  background: var(--color-card);
  box-shadow: var(--shadow-sm);
}

.service-operation-card {
  padding: 0;
}

.service-card-placeholder,
.marketplace-card-placeholder {
  display: block;
  flex: 0 0 auto;
  overflow: hidden;
  object-fit: cover;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.68), transparent 46%), #e2e0da;
}

.service-card-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-width: 0 0 1px;
  border-radius: 0;
}

.service-operation-card h3,
.marketplace-service-card h3 {
  margin: 0;
  color: var(--color-dark);
  font-size: 18px;
  line-height: 1.2;
  letter-spacing: -0.02em;
}

.service-operation-card h3,
.marketplace-service-card h3 {
  margin: 14px 14px 0;
}

.service-operation-card p,
.marketplace-service-card > p:not(.marketplace-card-kicker) {
  margin: 10px 0 0;
  color: var(--color-muted);
  font-size: 13px;
  line-height: 1.48;
}

.service-operation-card p,
.marketplace-service-card > p:not(.marketplace-card-kicker) {
  margin: 10px 14px 14px;
}

.service-operation-card-actions,
.marketplace-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: auto;
  padding: 0 14px 14px;
}

.service-showcase-actions,
.marketplace-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.service-showcase-actions {
  margin-top: 20px;
}

.compact-card-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  color: var(--color-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.compact-card-link:hover,
.compact-card-link:focus-visible {
  border-color: var(--color-accent);
  background: var(--color-soft);
  color: var(--color-text);
  outline: none;
}

.marketplace-cards-grid {
  margin-top: 28px;
}

.marketplace-service-card {
  scroll-margin-top: 132px;
}

.marketplace-card-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-width: 0 0 1px;
  border-radius: 0;
}

.marketplace-service-card h3,
.marketplace-service-card > p,
.marketplace-card-kicker {
  margin-right: 14px;
  margin-left: 14px;
}

.marketplace-card-kicker {
  margin-top: 14px;
  margin-bottom: 0;
  color: var(--color-accent-dark);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.marketplace-service-card h3 {
  margin-top: 4px;
}

.marketplace-card-actions {
  margin-right: 0;
  margin-left: 0;
}

html[data-theme="dark"] .service-operation-card,
html[data-theme="dark"] .marketplace-service-card {
  border-color: var(--color-border);
  background: var(--color-card);
}

html[data-theme="dark"] .service-card-placeholder,
html[data-theme="dark"] .marketplace-card-placeholder {
  border-color: rgba(255, 255, 255, 0.08);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.06), transparent 46%), #2b2a26;
}

html[data-theme="dark"] .compact-card-link {
  border-color: var(--button-secondary-border);
  background: var(--button-secondary-bg);
  color: var(--button-secondary-text);
}

html[data-theme="dark"] .compact-card-link:hover,
html[data-theme="dark"] .compact-card-link:focus-visible {
  border-color: var(--color-accent);
  background: var(--button-secondary-hover);
  color: var(--button-secondary-text);
}

@media (max-width: 980px) {
  .fulfillment-section-hero .fulfillment-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-operations-grid,
  .marketplace-cards-grid,
  .services-overview-grid,
  .fulfillment-process-grid,
  .fulfillment-audience-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .fulfillment-section-hero {
    min-height: auto;
    padding-top: 38px;
    padding-bottom: 44px;
  }

  .fulfillment-section-hero .section-title {
    font-size: clamp(36px, 10vw, 48px);
  }

  .fulfillment-section-hero .fulfillment-list {
    grid-template-columns: 1fr;
    margin-top: 22px;
  }

  .services-showcase-section {
    padding: 44px 0;
  }

  .fulfillment-process-section {
    padding: 44px 0;
  }

  .fulfillment-audience-section {
    padding: 44px 0;
  }

  .service-operations-grid,
  .marketplace-cards-grid,
  .services-overview-grid,
  .fulfillment-process-grid,
  .fulfillment-audience-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .fulfillment-process-card-content {
    padding: 18px;
  }

  .fulfillment-audience-card-content {
    padding: 18px;
  }

  .fulfillment-faq-item summary {
    padding: 18px;
    font-size: 18px;
  }

  .fulfillment-faq-answer {
    padding: 0 18px 18px;
  }
}
