@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
}

/* Кастомная графитовая палитра (дублируем tailwind config) */
.bg-graphite-950 { background-color: #1a1a1c; }
.bg-graphite-900 { background-color: #2d2d30; }  
.bg-graphite-800 { background-color: #3a3a3e; }
.bg-graphite-700 { background-color: #434348; }

.border-graphite-900 { border-color: #2d2d30; }
.border-graphite-800 { border-color: #3a3a3e; }
.border-graphite-700 { border-color: #434348; }

.text-graphite-400 { color: #818189; }



/* Hero фон с картинкой и затемнением для читаемости текста */
.hero-bg {
    background: 
        /* Тёмный градиент поверх картинки (от более плотного внизу к чуть прозрачнее вверху) */
        linear-gradient(135deg, rgba(26, 26, 28, 0.4) 0%, rgba(26, 26, 28, 0.1) 100%),
        /* Сама картинка */
        url('/images/bg.webp');
    
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Скрытие блоков до загрузки */
.block-loading {
    min-height: 100px;
}


/* SPECTRAFORM LAB — Microfluidics calculator */
.sf-calc {
  --sf-bg: #080c13;
  --sf-panel: #101620;
  --sf-card: #151e2a;
  --sf-border: #2a3544;
  --sf-text: #f4f7fb;
  --sf-muted: #9ba8b8;
  --sf-blue: #61c7fa;
  --sf-purple: #f1a2f2;
  --sf-gradient: linear-gradient(110deg, var(--sf-blue), var(--sf-purple));
  background: var(--sf-bg);
  color: var(--sf-text);
  padding: 88px 24px;
  font-family: inherit;
}

.sf-calc *,
.sf-calc *::before,
.sf-calc *::after {
  box-sizing: border-box;
}

.sf-calc [hidden] {
  display: none !important;
}

.sf-calc__container {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.sf-calc__header {
  text-align: center;
  margin-bottom: 36px;
}

.sf-calc__eyebrow {
  display: inline-block;
  color: var(--sf-blue);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.16em;
  margin-bottom: 15px;
}

.sf-calc__header h2 {
  margin: 0 0 16px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.15;
  font-weight: 750;
  letter-spacing: -0.035em;
  background: var(--sf-gradient);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.sf-calc__header p {
  max-width: 590px;
  margin: 0 auto;
  color: var(--sf-muted);
  font-size: 15px;
  line-height: 1.75;
}

.sf-calc__panel {
  padding: 30px;
  background: var(--sf-panel);
  border: 1px solid var(--sf-border);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgb(0 0 0 / 25%);
}

.sf-calc__progress {
  height: 5px;
  margin-bottom: 24px;
  background: #222d3a;
  border-radius: 99px;
  overflow: hidden;
}

.sf-calc__progress div {
  width: 25%;
  height: 100%;
  background: var(--sf-gradient);
  transition: width 0.3s ease;
}

.sf-step-label,
.sf-calc__step-label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 27px;
  color: var(--sf-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sf-step h3 {
  margin: 0 0 10px;
  font-size: 24px;
  line-height: 1.3;
}

.sf-muted {
  color: var(--sf-muted);
  font-size: 13px;
  line-height: 1.65;
}

.sf-step > .sf-muted {
  margin: 0 0 26px;
}

.sf-options {
  display: grid;
  gap: 12px;
}

.sf-options--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sf-option {
  display: block;
  cursor: pointer;
  min-width: 0;
}

.sf-option > input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.sf-option__body {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 94px;
  padding: 18px;
  border: 1px solid var(--sf-border);
  border-radius: 13px;
  background: var(--sf-card);
  transition: border-color 0.2s, background 0.2s;
}

.sf-option > input:checked + .sf-option__body {
  border-color: var(--sf-blue);
  background: rgb(97 199 250 / 8%);
  box-shadow: inset 0 0 0 1px rgb(97 199 250 / 12%);
}

.sf-option > input:focus-visible + .sf-option__body {
  outline: 2px solid var(--sf-blue);
  outline-offset: 3px;
}

.sf-option__icon {
  color: var(--sf-blue);
  font-size: 23px;
  margin-bottom: 9px;
}

.sf-option strong,
.sf-check strong {
  color: var(--sf-text);
  font-size: 14px;
  line-height: 1.5;
}

.sf-option small,
.sf-check small {
  display: block;
  color: var(--sf-muted);
  margin-top: 6px;
  font-size: 12px;
  line-height: 1.6;
}

.sf-field {
  margin-top: 24px;
}

.sf-field > label {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
  font-weight: 650;
  color: #dce4ee;
}

.sf-calc input:not([type="radio"]):not([type="checkbox"]):not([type="file"]),
.sf-calc select,
.sf-calc textarea {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--sf-text);
  background: var(--sf-bg);
  border: 1px solid var(--sf-border);
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
}

.sf-calc select {
  cursor: pointer;
}

.sf-calc textarea {
  resize: vertical;
  min-height: 90px;
}

.sf-calc input::placeholder,
.sf-calc textarea::placeholder {
  color: #697789;
}

.sf-calc input:focus,
.sf-calc select:focus,
.sf-calc textarea:focus {
  outline: none;
  border-color: var(--sf-blue);
  box-shadow: 0 0 0 3px rgb(97 199 250 / 10%);
}

.sf-info {
  padding: 17px 18px;
  margin: 22px 0;
  border-left: 3px solid var(--sf-blue);
  border-radius: 0 10px 10px 0;
  background: rgb(97 199 250 / 7%);
}

.sf-info strong {
  color: var(--sf-blue);
  font-size: 14px;
}

.sf-info p {
  margin: 7px 0 0;
  color: var(--sf-muted);
  font-size: 13px;
  line-height: 1.65;
}

.sf-checks {
  display: grid;
  gap: 10px;
}

.sf-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 15px;
  border: 1px solid var(--sf-border);
  background: var(--sf-card);
  border-radius: 10px;
  cursor: pointer;
}

.sf-check input,
.sf-consent input {
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  margin-top: 3px;
  accent-color: var(--sf-blue);
}

.sf-check span {
  flex: 1;
}

.sf-check:has(input:checked) {
  border-color: var(--sf-purple);
  background: rgb(241 162 242 / 6%);
}

.sf-navigation {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
}

.sf-button {
  min-height: 48px;
  padding: 13px 23px;
  border: 1px solid transparent;
  border-radius: 9px;
  font: inherit;
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
  transition: opacity 0.2s, transform 0.2s;
}

.sf-button:hover {
  opacity: 0.88;
}

.sf-button:active {
  transform: translateY(1px);
}

.sf-button:focus-visible {
  outline: 2px solid var(--sf-blue);
  outline-offset: 3px;
}

.sf-button:disabled {
  cursor: wait;
  opacity: 0.6;
}

.sf-button--primary {
  color: #080c13;
  background: var(--sf-gradient);
}

.sf-button--secondary {
  color: #dce4ee;
  border-color: #3b4757;
  background: transparent;
}

.sf-button--wide {
  width: 100%;
  margin-top: 22px;
}

.sf-result {
  padding: 20px;
  margin: 24px 0;
  border: 1px solid var(--sf-border);
  border-radius: 13px;
  background: var(--sf-card);
}

.sf-result__line,
.sf-result__total {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--sf-border);
  font-size: 13px;
}

.sf-result__line span {
  color: var(--sf-muted);
}

.sf-result__line strong {
  text-align: right;
  white-space: nowrap;
}

.sf-result__total {
  align-items: center;
  border-bottom: 0;
  padding-top: 20px;
  font-size: 16px;
  font-weight: 750;
}

.sf-result__total > span {
  background: var(--sf-gradient);
  color: transparent;
  background-clip: text;
  -webkit-background-clip: text;
}

.sf-result__total strong {
  text-align: right;
  font-size: clamp(18px, 3vw, 24px);
}

.sf-result__unit {
  padding: 13px;
  background: var(--sf-bg);
  border-radius: 8px;
  text-align: center;
  font-size: 13px;
  color: var(--sf-muted);
}

.sf-result__unit strong {
  color: var(--sf-blue);
}

.sf-result__disclaimer {
  margin: 15px 0 0;
  font-size: 11px;
  line-height: 1.7;
  color: var(--sf-muted);
}

.sf-warning {
  padding: 14px 16px;
  margin-bottom: 20px;
  border: 1px solid rgb(241 162 242 / 35%);
  border-radius: 10px;
  background: rgb(241 162 242 / 7%);
  color: #f5c7f5;
  font-size: 12px;
  line-height: 1.7;
}

.sf-calc input[type="file"] {
  width: 100%;
  color: var(--sf-muted);
  font-size: 12px;
}

.sf-consent {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  color: var(--sf-muted);
  font-size: 12px;
  line-height: 1.6;
}

.sf-status {
  padding: 13px;
  margin-top: 15px;
  border-radius: 9px;
  font-size: 13px;
  line-height: 1.6;
}

.sf-status--success {
  border: 1px solid #286d55;
  color: #a8f0d0;
  background: rgb(40 109 85 / 15%);
}

.sf-status--error {
  border: 1px solid #8a3d4c;
  color: #ffc3cc;
  background: rgb(138 61 76 / 15%);
}

.sf-spinner {
  display: inline-block;
  width: 17px;
  height: 17px;
  margin-left: 8px;
  vertical-align: middle;
  border: 2px solid rgb(8 12 19 / 30%);
  border-top-color: #080c13;
  border-radius: 50%;
  animation: sf-spin 0.7s linear infinite;
}

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

.sf-calc__footer {
  margin: 24px 0 0;
  color: #647184;
  font-size: 10px;
  text-align: center;
  letter-spacing: 0.08em;
}

@media (max-width: 600px) {
  .sf-calc {
    padding: 58px 15px;
  }

  .sf-calc__panel {
    padding: 20px 16px;
    border-radius: 15px;
  }

  .sf-options--two {
    grid-template-columns: 1fr;
  }

  .sf-option__body {
    min-height: auto;
  }

  .sf-step h3 {
    font-size: 21px;
  }

  .sf-result {
    padding: 15px;
  }

  .sf-result__line {
    font-size: 12px;
  }

  .sf-button {
    padding: 12px 16px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .sf-calc *,
  .sf-calc *::before,
  .sf-calc *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
