/* TEPLOVENT.KZ — shared design system
   Industrial-heat theme: graphite/charcoal surfaces, molten-orange accent, technical type. */

:root {
  --bg: #0a0c0f;
  --bg-elevated: #12151a;
  --surface: #171b21;
  --surface-2: #1e232b;
  --line: rgba(255, 255, 255, 0.09);
  --line-soft: rgba(255, 255, 255, 0.05);
  --ink: #f3f5f7;
  --ink-soft: #9aa4b2;
  --ink-faint: #6b7484;

  --paper: #f6f4f0;
  --paper-2: #ffffff;
  --ink-on-paper: #14171c;
  --ink-on-paper-soft: #565f6b;

  --accent: #ff6a1a;
  --accent-2: #ffb703;
  --accent-ink: #1a0d02;
  --gradient-heat: linear-gradient(135deg, #ff6a1a 0%, #ff8a1f 45%, #ffb703 100%);
  --gradient-heat-soft: linear-gradient(135deg, rgba(255, 106, 26, 0.16), rgba(255, 183, 3, 0.10));

  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow-soft: 0 20px 60px -20px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(255, 106, 26, 0.35), 0 20px 50px -18px rgba(255, 106, 26, 0.45);

  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-fast: 180ms;
  --dur-normal: 420ms;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--paper);
  color: var(--ink-on-paper);
  font-feature-settings: 'ss01' on;
}

.font-display {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  letter-spacing: -0.02em;
}

/* ---------- texture / atmosphere ---------- */
.grain {
  position: relative;
}
.grain::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

.bg-dark {
  background: var(--bg);
  color: var(--ink);
}
.bg-elevated { background: var(--bg-elevated); }

.section-dark { background: var(--bg); color: var(--ink); position: relative; overflow: hidden; }
.section-paper { background: var(--paper); color: var(--ink-on-paper); }
.section-white { background: var(--paper-2); color: var(--ink-on-paper); }

/* ---------- heat mesh backgrounds ---------- */
.heat-mesh {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.heat-mesh span {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.55;
  animation: driftBlob 22s ease-in-out infinite;
}
.heat-mesh span:nth-child(1) {
  width: 46vw; height: 46vw; max-width: 620px; max-height: 620px;
  background: radial-gradient(circle, rgba(255,106,26,0.55), transparent 70%);
  top: -14%; left: -8%;
}
.heat-mesh span:nth-child(2) {
  width: 34vw; height: 34vw; max-width: 480px; max-height: 480px;
  background: radial-gradient(circle, rgba(255,183,3,0.4), transparent 70%);
  bottom: -18%; right: -6%;
  animation-delay: -8s;
  animation-direction: reverse;
}
.heat-mesh span:nth-child(3) {
  width: 22vw; height: 22vw; max-width: 340px; max-height: 340px;
  background: radial-gradient(circle, rgba(255,138,31,0.35), transparent 70%);
  top: 30%; left: 45%;
  animation-delay: -14s;
}
@keyframes driftBlob {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(4%, 6%) scale(1.08); }
  66% { transform: translate(-5%, -3%) scale(0.95); }
}

.grid-overlay {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 40%, transparent 90%);
}

/* ---------- header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 12, 15, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid var(--line-soft);
  transition: background var(--dur-fast) ease, border-color var(--dur-fast) ease, padding var(--dur-fast) ease;
}
.site-header.is-scrolled {
  background: rgba(10, 12, 15, 0.92);
  border-color: var(--line);
}
.nav-link {
  position: relative;
  color: var(--ink-soft);
  font-weight: 500;
  transition: color var(--dur-fast) ease;
}
.nav-link::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -6px;
  height: 2px;
  background: var(--gradient-heat);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--dur-fast) var(--ease-out-expo);
}
.nav-link:hover { color: var(--ink); }
.nav-link:hover::after { transform: scaleX(1); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-weight: 700;
  border-radius: var(--radius-sm);
  padding: 0.85rem 1.6rem;
  transition: transform var(--dur-fast) var(--ease-out-expo), box-shadow var(--dur-fast) ease, background var(--dur-fast) ease, border-color var(--dur-fast) ease;
  white-space: nowrap;
}
.btn-heat {
  background: var(--gradient-heat);
  color: #180a00;
  box-shadow: 0 12px 30px -10px rgba(255, 106, 26, 0.55);
}
.btn-heat:hover { transform: translateY(-2px); box-shadow: 0 18px 40px -12px rgba(255, 106, 26, 0.65); }
.btn-ghost-dark {
  background: rgba(255,255,255,0.04);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost-dark:hover { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); transform: translateY(-2px); }
.btn-ghost-light {
  background: rgba(20,23,28,0.03);
  color: var(--ink-on-paper);
  border: 1px solid rgba(20,23,28,0.14);
}
.btn-ghost-light:hover { background: rgba(20,23,28,0.06); transform: translateY(-2px); }

/* ---------- section chrome ---------- */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
}
.eyebrow::before {
  content: '';
  width: 22px;
  height: 2px;
  background: var(--gradient-heat);
  border-radius: 2px;
}
.section-heading {
  font-size: clamp(1.9rem, 1.5rem + 1.8vw, 3rem);
  font-weight: 700;
  line-height: 1.08;
}
.gradient-text {
  background: var(--gradient-heat);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* ---------- cards ---------- */
.card {
  background: var(--paper-2);
  color: var(--ink-on-paper);
  border: 1px solid rgba(20,23,28,0.08);
  border-radius: var(--radius-md);
  transition: transform var(--dur-normal) var(--ease-out-expo), box-shadow var(--dur-normal) var(--ease-out-expo), border-color var(--dur-fast) ease;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-soft);
  border-color: rgba(255, 106, 26, 0.25);
}
.card-dark {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  color: var(--ink);
  transition: transform var(--dur-normal) var(--ease-out-expo), box-shadow var(--dur-normal) var(--ease-out-expo), border-color var(--dur-fast) ease;
}
.card-dark:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-glow);
  border-color: rgba(255, 106, 26, 0.45);
}
.card-media {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-md) var(--radius-md) 0 0;
}
.card-media img {
  transition: transform var(--dur-normal) var(--ease-out-expo);
}
.card:hover .card-media img,
.card-dark:hover .card-media img { transform: scale(1.06); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background: rgba(20,23,28,0.06);
  color: var(--ink-on-paper-soft);
  border: 1px solid rgba(20,23,28,0.08);
}
.pill-heat {
  background: var(--gradient-heat-soft);
  color: #c14a00;
  border: 1px solid rgba(255, 106, 26, 0.25);
}
.pill-dark {
  background: rgba(255,255,255,0.06);
  color: var(--ink-soft);
  border: 1px solid var(--line);
}

.ribbon {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: var(--gradient-heat);
  color: #1a0d02;
  box-shadow: 0 6px 16px -6px rgba(255,106,26,0.6);
}

/* ---------- animations ---------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-18px); }
}
.float { animation: float 6s ease-in-out infinite; }

@keyframes pulseRing {
  0% { box-shadow: 0 0 0 0 rgba(255,106,26,0.5); }
  100% { box-shadow: 0 0 0 22px rgba(255,106,26,0); }
}
.pulse-ring { animation: pulseRing 2.4s ease-out infinite; }

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.8s var(--ease-out-expo), transform 0.8s var(--ease-out-expo);
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-scale {
  opacity: 0;
  transform: scale(0.94);
  transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}
.reveal-scale.is-visible { opacity: 1; transform: scale(1); }

.stagger > * { transition-delay: calc(var(--i, 0) * 90ms); }

.marquee-track {
  display: flex;
  gap: 3.5rem;
  width: max-content;
  animation: marquee 28s linear infinite;
}
.marquee-wrap:hover .marquee-track { animation-play-state: paused; }
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- modal (brand product spec sheets) ---------- */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: rgba(6, 7, 9, 0.7);
  backdrop-filter: blur(6px);
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}
.modal.is-open { display: flex; }
.modal-content {
  background: var(--paper-2);
  color: var(--ink-on-paper);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 900px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.5);
  animation: modalIn 0.35s var(--ease-out-expo);
}
@keyframes modalIn {
  from { opacity: 0; transform: translateY(16px) scale(0.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-header {
  padding: 1.4rem 1.6rem;
  border-bottom: 1px solid rgba(20,23,28,0.08);
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--paper);
  position: sticky;
  top: 0;
}
.modal-body { padding: 1.6rem; }
.modal-footer {
  padding: 1.2rem 1.6rem;
  border-top: 1px solid rgba(20,23,28,0.08);
  display: flex;
  justify-content: flex-end;
}
.modal-close {
  color: var(--ink-on-paper-soft);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: color var(--dur-fast) ease, transform var(--dur-fast) ease;
}
.modal-close:hover { color: var(--accent); transform: rotate(90deg); }

.specs-table { width: 100%; border-collapse: collapse; }
.specs-table th, .specs-table td {
  padding: 0.75rem 0.9rem;
  text-align: left;
  border-bottom: 1px solid rgba(20,23,28,0.08);
  font-size: 0.92rem;
}
.specs-table th { background: rgba(20,23,28,0.04); font-weight: 700; }
.specs-table tr:hover td { background: rgba(255,106,26,0.04); }

/* ---------- misc ---------- */
.divider-heat {
  height: 3px;
  width: 64px;
  border-radius: 3px;
  background: var(--gradient-heat);
}
.icon-badge {
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  background: var(--gradient-heat-soft);
  color: var(--accent);
  border: 1px solid rgba(255,106,26,0.22);
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--accent); color: #1a0d02; font-weight: 700;
  padding: 0.6rem 1rem; border-radius: 8px; z-index: 200;
  transition: top var(--dur-fast) ease;
}
.skip-link:focus { top: 1rem; }

::selection { background: rgba(255,106,26,0.3); color: inherit; }

.scroll-x { overflow-x: auto; }
.scroll-x::-webkit-scrollbar { height: 8px; }
.scroll-x::-webkit-scrollbar-thumb { background: rgba(20,23,28,0.18); border-radius: 8px; }
