/* =========================================================
   Master Camera — Premium dark CCTV/security website
   Stack: vanilla CSS, no preprocessor required.
   ========================================================= */

/* ---------- Design tokens ---------- */
:root {
  --bg: #08090C;
  --bg-2: #0B0D12;
  --surface: #0F1117;
  --surface-2: #14171F;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --text: #F2F3F5;
  --text-2: #B7BBC4;
  --muted: #8A8E97;
  --muted-2: #5C616B;

  --accent: #FF6B1A;
  --accent-2: #FF8642;
  --accent-soft: rgba(255, 107, 26, 0.12);
  --accent-glow: rgba(255, 107, 26, 0.35);

  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 24px;
  --radius-xl: 32px;

  --container: 1240px;
  --gutter: clamp(20px, 4vw, 40px);

  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --shadow-sm: 0 2px 10px rgba(0, 0, 0, .35);
  --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  --shadow-orange: 0 12px 40px rgba(255, 107, 26, 0.28);

  --header-h: 76px;

  --font-display: 'Unbounded', system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: 'Plus Jakarta Sans', system-ui, -apple-system, "Segoe UI", sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body, h1, h2, h3, h4, h5, h6, p, ul, ol, figure, dl { margin: 0; padding: 0; }
ul, ol { list-style: none; }
a { color: inherit; text-decoration: none; }
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
input, textarea { font-family: var(--font-body); }

/* ---------- Base ---------- */
html, body { background: var(--bg); }
body {
  font-family: var(--font-body);
  color: var(--text);
  font-size: 16px;
  line-height: 1.6;
  font-weight: 400;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  position: relative;
  min-height: 100vh;
}

::selection { background: var(--accent); color: #0a0a0a; }

/* Scrollbar (subtle) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #1f242e; border-radius: 8px; border: 2px solid var(--bg); }
::-webkit-scrollbar-thumb:hover { background: #2a3140; }

/* ---------- Background atmosphere ---------- */
.bg-grid {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: radial-gradient(ellipse at top, rgba(0,0,0,.85) 0%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse at top, rgba(0,0,0,.85) 0%, transparent 75%);
}
.bg-glow {
  position: fixed; top: -10%; left: 50%; transform: translateX(-50%);
  width: 80vw; max-width: 1100px; aspect-ratio: 1 / 1;
  background: radial-gradient(circle at center, rgba(255, 107, 26, 0.18) 0%, transparent 60%);
  filter: blur(60px); z-index: 0; pointer-events: none;
}
.bg-scan {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .35;
  background: repeating-linear-gradient(
    180deg,
    transparent 0px, transparent 3px,
    rgba(255,255,255,.012) 3px, rgba(255,255,255,.012) 4px
  );
}

/* Layout helpers */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-inline: var(--gutter);
  position: relative;
  z-index: 2;
}

.section {
  padding-block: clamp(72px, 10vw, 140px);
  position: relative;
  z-index: 1;
}
.section-alt {
  background:
    linear-gradient(180deg, transparent 0%, rgba(255,255,255,.012) 50%, transparent 100%);
  border-block: 1px solid var(--line);
}

/* ---------- Typography ---------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: var(--text);
}
.section-tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 8px 14px;
  border: 1px solid rgba(255, 107, 26, 0.25);
  background: var(--accent-soft);
  border-radius: 999px;
  margin-bottom: 24px;
}
.section-title {
  font-size: clamp(26px, 3.4vw, 40px);
  line-height: 1.12;
  margin-bottom: 18px;
}
.section-lede {
  max-width: 640px;
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--text-2);
  line-height: 1.7;
}
.section-head { margin-bottom: clamp(40px, 6vw, 72px); }
.accent { color: var(--accent); }

/* ---------- Buttons ---------- */
.btn-primary, .btn-ghost, .btn-icon {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.01em;
  padding: 14px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: transform .35s var(--ease), background .25s var(--ease), color .25s var(--ease), box-shadow .35s var(--ease), border-color .25s var(--ease);
  white-space: nowrap;
  position: relative;
  overflow: hidden;
}
.btn-primary {
  background: var(--accent);
  color: #0a0a0a;
  box-shadow: var(--shadow-orange);
}
.btn-primary::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s var(--ease-out);
}
.btn-primary:hover { transform: translateY(-2px); background: var(--accent-2); box-shadow: 0 16px 50px rgba(255, 107, 26, 0.4); }
.btn-primary:hover::after { transform: translateX(120%); }
.btn-primary:active { transform: translateY(0); }

.btn-ghost {
  background: rgba(255,255,255,.04);
  color: var(--text);
  border: 1px solid var(--line-strong);
  backdrop-filter: blur(10px);
}
.btn-ghost:hover {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.22);
  transform: translateY(-2px);
}

.btn-sm { padding: 10px 16px; font-size: 13px; }
.btn-lg { padding: 18px 28px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-icon {
  width: 42px; height: 42px;
  padding: 0;
  background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--text);
  border-radius: 50%;
}
.btn-icon:hover { background: var(--accent); color: #0a0a0a; border-color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(8, 9, 12, 0.6);
  backdrop-filter: blur(20px) saturate(140%);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background .25s var(--ease), border-color .25s var(--ease);
}
.site-header.scrolled {
  background: rgba(8, 9, 12, 0.85);
  border-bottom-color: var(--line);
}
.header-inner {
  display: flex; align-items: center; gap: 24px;
  height: 100%;
}
.brand {
  display: inline-flex; align-items: center; gap: 12px;
  color: var(--text);
}
.brand-mark {
  display: inline-flex;
  width: 38px; height: 38px;
  align-items: center; justify-content: center;
  background: var(--accent);
  color: #0a0a0a;
  border-radius: 9px;
  flex-shrink: 0;
  transition: transform .4s var(--ease);
}
.brand:hover .brand-mark { transform: rotate(8deg); }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.005em;
  white-space: nowrap;
}
.brand-sub {
  font-size: 9.5px;
  letter-spacing: 0.22em;
  color: var(--muted);
  margin-top: 4px;
  font-weight: 500;
}

.nav-desktop {
  display: flex;
  gap: 4px;
  margin-left: auto;
  margin-right: 8px;
}
.nav-desktop a {
  font-size: 14px;
  color: var(--text-2);
  padding: 10px 14px;
  border-radius: 999px;
  position: relative;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-desktop a:hover { color: var(--text); background: rgba(255,255,255,.04); }

.header-cta { display: flex; align-items: center; gap: 10px; }

.nav-toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  border-radius: 12px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  margin-left: auto;
}
.nav-toggle span {
  display: block;
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle.is-open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.is-open span:nth-child(2) { opacity: 0; }
.nav-toggle.is-open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  position: fixed;
  top: var(--header-h);
  left: 0;
  right: 0;
  /* Dynamic viewport height — adapts to mobile browser UI showing/hiding */
  height: calc(100dvh - var(--header-h));
  /* Fallback for older browsers without dvh */
  max-height: calc(100vh - var(--header-h));
  background: rgba(8, 9, 12, 0.96);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  z-index: 95;
  padding: 28px var(--gutter) calc(28px + env(safe-area-inset-bottom, 0px));
  display: flex; flex-direction: column;
  gap: 18px;
  transform: translateY(-110%);
  opacity: 0;
  pointer-events: none;
  transition: transform .45s var(--ease-out), opacity .35s var(--ease);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}
@supports (height: 100dvh) {
  .nav-mobile { max-height: none; }
}
.nav-mobile.is-open { transform: translateY(0); opacity: 1; pointer-events: auto; }
.nav-mobile nav { display: flex; flex-direction: column; gap: 2px; }
.nav-mobile nav a {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  transition: color .2s var(--ease), padding-left .25s var(--ease);
}
.nav-mobile nav a:hover { color: var(--accent); padding-left: 8px; }
.nav-mobile-cta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: auto;
  padding-top: 20px;
  flex-shrink: 0;
}

/* Tighter on small phones (iPhone SE etc.) */
@media (max-width: 380px) {
  .nav-mobile { padding-top: 20px; gap: 14px; }
  .nav-mobile nav a { font-size: 17px; padding: 11px 0; }
  .nav-mobile-cta { padding-top: 14px; }
}
/* Even tighter on very short viewports (landscape mobile) */
@media (max-height: 600px) {
  .nav-mobile { padding-top: 16px; gap: 10px; }
  .nav-mobile nav a { font-size: 16px; padding: 9px 0; }
  .nav-mobile-cta { padding-top: 12px; }
}

/* ---------- HERO ---------- */
.hero {
  position: relative;
  min-height: clamp(640px, 92svh, 900px);
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 120px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-media { position: absolute; inset: 0; z-index: 0; }
.hero-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: right center;
  transform: scale(1.04);
  animation: heroPan 22s ease-in-out infinite alternate;
}
@keyframes heroPan {
  from { transform: scale(1.04) translate(0, 0); }
  to   { transform: scale(1.08) translate(-1.2%, -1%); }
}
.hero-overlay {
  position: absolute; inset: 0;
  background:
    /* Left-weighted darkness for text readability */
    linear-gradient(90deg,
      rgba(8, 9, 12, 0.94) 0%,
      rgba(8, 9, 12, 0.82) 24%,
      rgba(8, 9, 12, 0.55) 45%,
      rgba(8, 9, 12, 0.18) 65%,
      rgba(8, 9, 12, 0) 85%
    ),
    /* Subtle bottom-fade into page background for seamless blend */
    linear-gradient(180deg,
      rgba(8, 9, 12, 0) 60%,
      rgba(8, 9, 12, 0.55) 85%,
      var(--bg) 100%
    );
}
.hero-inner {
  width: 100%;
  display: flex; flex-direction: column; align-items: flex-start;
  gap: clamp(20px, 3vw, 32px);
  max-width: 1100px;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 9px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line-strong);
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-2);
  font-weight: 500;
  backdrop-filter: blur(10px);
}
.hero-eyebrow .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow: 0 0 0 0 var(--accent-glow);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 var(--accent-glow); }
  70%  { box-shadow: 0 0 0 12px rgba(255, 107, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(255, 107, 26, 0); }
}

.hero-title-wrap {
  position: relative;
  width: 100%;
  max-width: 1080px;
  isolation: isolate;
}

.hero-title {
  position: relative;
  z-index: 2;
  font-size: clamp(30px, 4.2vw, 56px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.022em;
  max-width: 100%;
}

/* Ghost background words — premium futuristic depth layer */
.hero-ghost {
  position: absolute;
  inset: -10% 0 -10% 0;
  z-index: 1;
  pointer-events: none;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0;
  overflow: hidden;
  user-select: none;
}
.hero-ghost-line {
  font-family: var(--font-display);
  font-weight: 900;
  font-size: clamp(48px, 8vw, 116px);
  letter-spacing: -0.045em;
  line-height: 0.88;
  white-space: nowrap;
  filter: blur(0.5px);
  will-change: transform;
}
.hero-ghost-1 {
  color: rgba(255, 255, 255, 0.04);
  transform: translateX(-2%);
}
.hero-ghost-2 {
  color: rgba(255, 107, 26, 0.06);
  transform: translateX(6%) translateY(-3%);
}

/* Premium subtitle above CTAs */
.hero-subtitle {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: clamp(15px, 1.3vw, 18px);
  font-weight: 600;
  color: var(--accent);
  letter-spacing: 0.005em;
  text-shadow:
    0 0 20px rgba(255, 107, 26, 0.45),
    0 0 40px rgba(255, 107, 26, 0.18);
  margin: 0;
  padding: 0;
}
.hero-subtitle-dot {
  width: 7px; height: 7px;
  background: var(--accent);
  border-radius: 50%;
  box-shadow:
    0 0 0 0 var(--accent-glow),
    0 0 16px var(--accent),
    0 0 32px rgba(255, 107, 26, 0.5);
  flex: none;
  animation: pulse 2.4s infinite;
}

.hero-lede {
  font-size: clamp(16px, 1.6vw, 19px);
  max-width: 620px;
  color: var(--text-2);
  line-height: 1.7;
}
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(16px, 2vw, 32px);
  margin-top: clamp(24px, 4vw, 48px);
  padding-top: clamp(24px, 4vw, 40px);
  border-top: 1px solid var(--line);
  width: 100%;
  max-width: 800px;
}
.hero-stats li {
  display: flex; flex-direction: column; gap: 4px;
}
.stat-value {
  display: flex;
  align-items: baseline;
  gap: 2px;
  white-space: nowrap;
}
.stat-num {
  font-family: var(--font-display);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  display: inline;
}
.stat-plus { color: var(--accent); font-family: var(--font-display); font-size: clamp(28px, 4vw, 48px); font-weight: 700; }
.stat-label {
  display: block;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 4px;
}

/* Hero brands marquee */
.hero-marquee {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 70px;
  display: flex; align-items: center;
  overflow: hidden;
  border-top: 1px solid var(--line);
  background: rgba(8, 9, 12, 0.4);
  backdrop-filter: blur(8px);
  z-index: 2;
}
.marquee-track {
  display: flex; gap: 36px; align-items: center;
  white-space: nowrap;
  animation: marquee 35s linear infinite;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 14px;
  letter-spacing: 0.18em;
  color: var(--muted);
}
.marquee-track span:nth-child(odd) { color: var(--text-2); }
@keyframes marquee {
  to { transform: translateX(-50%); }
}

/* ---------- Grid systems ---------- */
.grid {
  display: grid;
  gap: clamp(16px, 2vw, 24px);
}
.services-grid { grid-template-columns: repeat(3, 1fr); }
.services-image-grid { grid-template-columns: repeat(3, 1fr); }
.why-grid { grid-template-columns: repeat(4, 1fr); gap: clamp(16px, 2vw, 24px); }
.products-grid { grid-template-columns: repeat(3, 1fr); }
.blog-grid { grid-template-columns: repeat(3, 1fr); }

/* ---------- Card base ---------- */
.card {
  position: relative;
  padding: clamp(24px, 3vw, 36px);
  background: linear-gradient(180deg, rgba(255,255,255,.035) 0%, rgba(255,255,255,.012) 100%);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .5s var(--ease-out), border-color .35s var(--ease), background .35s var(--ease);
  overflow: hidden;
}
.card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 26, 0.25);
  background: linear-gradient(180deg, rgba(255,107,26,.05) 0%, rgba(255,255,255,.02) 100%);
}
.card:hover::before { opacity: 1; }

/* ---------- Service cards ---------- */
.service-card {
  display: flex; flex-direction: column; gap: 16px;
  min-height: 280px;
}
.card-icon {
  display: inline-flex;
  width: 56px; height: 56px;
  align-items: center; justify-content: center;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 107, 26, 0.22);
  border-radius: 14px;
  color: var(--accent);
  margin-bottom: 4px;
  transition: transform .35s var(--ease), background .25s var(--ease);
}
.service-card:hover .card-icon { transform: scale(1.06) rotate(-4deg); background: var(--accent); color: #0a0a0a; }
.card-icon svg { width: 26px; height: 26px; }
.service-card h3 {
  font-size: clamp(20px, 1.8vw, 24px);
  letter-spacing: -0.015em;
}
.service-card p {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
}
.card-arrow {
  margin-top: auto;
  display: inline-flex;
  width: 40px; height: 40px;
  border-radius: 50%;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.04);
  color: var(--muted);
  font-size: 18px;
  transition: transform .35s var(--ease), background .25s var(--ease), color .25s var(--ease);
}
.service-card:hover .card-arrow {
  background: var(--accent);
  color: #0a0a0a;
  transform: translate(4px, -4px);
}

/* ---------- Why us cards ---------- */
.why-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: transform .5s var(--ease-out), border-color .35s var(--ease), box-shadow .45s var(--ease);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.why-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 107, 26, 0.32);
  box-shadow:
    0 22px 44px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255, 107, 26, 0.12);
}
.why-image {
  position: relative;
  aspect-ratio: 5 / 3;
  overflow: hidden;
  flex-shrink: 0;
}
.why-image::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(15, 17, 23, 0.7) 100%);
  pointer-events: none;
}
.why-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease-out);
  display: block;
}
.why-card:hover .why-image img { transform: scale(1.06); }
.why-body {
  padding: clamp(18px, 1.6vw, 24px);
  position: relative;
  display: flex; flex-direction: column;
  gap: 8px;
  flex: 1;
}
.why-num {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.16em;
  color: var(--accent);
}
.why-body h3 {
  font-size: clamp(16px, 1.35vw, 19px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
}
.why-body p {
  color: var(--text-2);
  font-size: 13.5px;
  line-height: 1.6;
  margin: 0;
}

/* ---------- About ---------- */
.about-grid {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.about-media {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  aspect-ratio: 4 / 3;
  background: var(--surface);
}
.about-media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.5s var(--ease-out);
}
.about-media:hover img { transform: scale(1.04); }
.about-media::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 50%, rgba(8, 9, 12, 0.6) 100%);
  pointer-events: none;
}
.about-media-tag {
  position: absolute;
  bottom: 24px; left: 24px;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(8, 9, 12, 0.7);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text);
  z-index: 2;
}
.about-media-tag .dot {
  width: 8px; height: 8px;
  background: var(--accent);
  border-radius: 50%;
  animation: pulse 2s infinite;
}
.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-top: 36px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}
.about-stats li { display: flex; flex-direction: column; gap: 4px; }
.stat-big {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(36px, 4vw, 52px);
  color: var(--text);
  letter-spacing: -0.025em;
  line-height: 1;
}
.about-stats li:nth-child(odd) .stat-big { color: var(--accent); }
.stat-cap {
  font-size: 13px;
  color: var(--muted);
  margin-top: 6px;
  letter-spacing: 0.02em;
}

/* ---------- Products ---------- */
.product-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .5s var(--ease-out), border-color .35s var(--ease);
  display: flex; flex-direction: column;
}
.product-card:hover { transform: translateY(-6px); border-color: rgba(255, 107, 26, 0.3); }
.product-image {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1d25 0%, #0e1015 100%);
}
.product-image img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.2s var(--ease-out);
}
.product-card:hover .product-image img { transform: scale(1.07); }
.product-badge {
  position: absolute;
  top: 14px; right: 14px;
  padding: 6px 12px;
  background: rgba(8, 9, 12, 0.75);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 11px;
  font-family: var(--font-display);
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--accent);
  text-transform: uppercase;
}
.product-body {
  padding: 24px;
  display: flex; flex-direction: column; gap: 12px;
  flex: 1;
}
.product-body h3 {
  font-size: 22px;
  letter-spacing: -0.015em;
}
.product-body p {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.65;
  flex: 1;
}
.product-cta {
  display: flex; align-items: center; gap: 8px;
  margin-top: 8px;
}

/* ---------- Service image cards (Наши услуги) ---------- */
.service-image-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: linear-gradient(180deg, rgba(255,255,255,.04) 0%, rgba(255,255,255,.012) 100%);
  border: 1px solid var(--line);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  transition:
    transform .45s var(--ease-out),
    border-color .3s var(--ease),
    box-shadow .45s var(--ease-out);
}
.service-image-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 107, 26, 0.35);
  box-shadow:
    0 24px 48px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255, 107, 26, 0.15),
    0 0 60px -20px rgba(255, 107, 26, 0.35);
}
.service-image-card-media {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: linear-gradient(180deg, #1a1d25 0%, #0e1015 100%);
  flex-shrink: 0;
}
.service-image-card-media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 1.1s var(--ease-out);
  display: block;
}
.service-image-card:hover .service-image-card-media img {
  transform: scale(1.06);
}
.service-image-card-media::after {
  content: '';
  position: absolute;
  inset: 60% 0 0 0;
  background: linear-gradient(180deg, transparent 0%, rgba(15, 17, 23, 0.55) 100%);
  pointer-events: none;
}
.service-image-card-body {
  padding: clamp(20px, 2vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.service-image-card-body h3 {
  font-family: var(--font-display);
  font-size: clamp(16px, 1.45vw, 19px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0;
}
.service-image-card-body p {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin: 0;
  flex: 1; /* push actions to bottom for equal heights */
}

/* ---------- Card action buttons ---------- */
.service-image-card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.service-image-card-actions .btn-primary {
  flex: 1;
  justify-content: center;
  padding: 11px 16px;
  font-size: 13px;
}
.service-image-card-actions .btn-primary:hover {
  box-shadow:
    0 0 0 4px rgba(255, 107, 26, 0.15),
    0 8px 24px rgba(255, 107, 26, 0.45),
    0 0 30px rgba(255, 107, 26, 0.35);
  transform: translateY(-1px);
}
.service-image-card-actions .btn-icon {
  flex-shrink: 0;
  width: 40px; height: 40px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background .25s var(--ease),
    color .25s var(--ease),
    border-color .25s var(--ease),
    transform .3s var(--ease);
}
.service-image-card-actions .btn-icon:hover {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
  transform: scale(1.06);
  box-shadow: 0 6px 18px rgba(255, 107, 26, 0.35);
}
.service-image-card-actions .btn-icon:active { transform: scale(0.96); }

/* ---------- Process timeline ---------- */
.process-timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  position: relative;
}
.process-timeline::before {
  content: '';
  position: absolute;
  top: 32px; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--line-strong) 10%, var(--line-strong) 90%, transparent);
  z-index: 0;
}
.process-step {
  position: relative;
  padding: 0 16px 0 0;
  z-index: 1;
}
.step-num {
  width: 64px; height: 64px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  border: 1px solid var(--line-strong);
  border-radius: 50%;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 20px;
  color: var(--accent);
  margin-bottom: 24px;
  position: relative;
  transition: background .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease);
}
.process-step:hover .step-num {
  background: var(--accent);
  border-color: var(--accent);
  color: #0a0a0a;
}
.step-body h3 { font-size: 22px; margin-bottom: 10px; letter-spacing: -0.015em; }
.step-body p { color: var(--text-2); font-size: 14.5px; line-height: 1.65; margin-bottom: 14px; }
.step-time {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 12px;
  background: var(--accent-soft);
  border: 1px solid rgba(255, 107, 26, 0.2);
  border-radius: 999px;
  color: var(--accent);
}

/* ---------- Portfolio ---------- */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-auto-rows: 280px;
  gap: clamp(16px, 2vw, 24px);
}
.portfolio-tall { grid-row: span 2; }
.portfolio-wide { grid-column: span 2; }
.portfolio-item {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: transform .5s var(--ease-out);
}
.portfolio-item:hover { transform: translateY(-4px); }
.portfolio-item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 1.5s var(--ease-out);
}
.portfolio-item:hover img { transform: scale(1.08); }
.portfolio-item::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 40%, rgba(8, 9, 12, 0.92) 100%);
  pointer-events: none;
  transition: background .4s var(--ease);
}
.portfolio-item:hover::after {
  background: linear-gradient(180deg, rgba(8, 9, 12, 0.2) 0%, rgba(8, 9, 12, 0.95) 100%);
}
.portfolio-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  padding: clamp(20px, 2.5vw, 32px);
  z-index: 2;
}
.pf-tag {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  padding: 4px 10px;
  background: rgba(255, 107, 26, 0.12);
  border: 1px solid rgba(255, 107, 26, 0.25);
  border-radius: 999px;
  margin-bottom: 12px;
}
.portfolio-item figcaption h3 {
  font-size: clamp(18px, 1.6vw, 22px);
  margin-bottom: 6px;
  letter-spacing: -0.015em;
}
.portfolio-item figcaption p {
  font-size: 13.5px;
  color: var(--text-2);
}

/* ---------- FAQ ---------- */
.faq-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: clamp(32px, 5vw, 80px);
  align-items: start;
}
.faq-head { margin-bottom: 0; position: sticky; top: calc(var(--header-h) + 32px); }

.faq-list { display: flex; flex-direction: column; gap: 12px; }

.faq-item {
  background: linear-gradient(180deg, rgba(255,255,255,.03), rgba(255,255,255,.01));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.faq-item:hover { border-color: var(--line-strong); }
.faq-item[open] { border-color: rgba(255, 107, 26, 0.25); background: rgba(255, 107, 26, 0.03); }

.faq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 22px 24px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  font-family: var(--font-display);
  font-size: clamp(15px, 1.4vw, 17px);
  font-weight: 500;
  color: var(--text);
  letter-spacing: -0.005em;
  user-select: none;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-icon {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line);
  position: relative;
  transition: background .3s var(--ease), border-color .3s var(--ease), transform .35s var(--ease);
}
.faq-icon::before, .faq-icon::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 12px; height: 1.5px;
  background: var(--text);
  transform: translate(-50%, -50%);
  border-radius: 2px;
  transition: transform .35s var(--ease), background .25s var(--ease);
}
.faq-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq-item[open] .faq-icon { background: var(--accent); border-color: var(--accent); transform: rotate(180deg); }
.faq-item[open] .faq-icon::before, .faq-item[open] .faq-icon::after { background: #0a0a0a; }
.faq-item[open] .faq-icon::after { transform: translate(-50%, -50%) rotate(0deg); }

.faq-content {
  padding: 0 24px 22px 24px;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.7;
  animation: faqSlide .35s var(--ease-out);
}
@keyframes faqSlide {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ---------- Blog (text-only cards on homepage) ---------- */
.blog-card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: transform .5s var(--ease-out), border-color .35s var(--ease), box-shadow .45s var(--ease);
  position: relative;
}
.blog-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.blog-card:hover {
  transform: translateY(-4px);
  border-color: rgba(255, 107, 26, 0.32);
  box-shadow: 0 18px 36px rgba(0,0,0,0.35);
}
.blog-card:hover::before { opacity: 1; }
.blog-body {
  padding: clamp(22px, 2.4vw, 32px);
  display: flex; flex-direction: column; gap: 12px;
  flex: 1;
}
.blog-meta {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.blog-body h3 {
  font-size: clamp(17px, 1.5vw, 20px);
  letter-spacing: -0.015em;
  line-height: 1.3;
  font-weight: 600;
  margin: 0;
}
.blog-body p {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 1.6;
  flex: 1;
  margin: 0;
}
.blog-arrow {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text);
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  transition: color .25s var(--ease), letter-spacing .35s var(--ease);
}
.blog-card:hover .blog-arrow { color: var(--accent); letter-spacing: 0.1em; }

/* ---------- Blog: compact card toggle ---------- */
.blog-toggle {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: none;
  border: 0;
  border-top: 1px solid var(--line);
  cursor: pointer;
  margin-top: auto;
  padding: 14px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  transition: gap .25s var(--ease), letter-spacing .3s var(--ease), color .25s var(--ease);
}
.blog-toggle:hover { letter-spacing: 0.12em; gap: 12px; }
.blog-toggle:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 4px;
  border-radius: 4px;
}
.blog-toggle-icon {
  transition: transform .35s var(--ease);
  flex-shrink: 0;
}
/* Active card highlight when its article is open in the reader */
.blog-card.is-active {
  border-color: rgba(255, 107, 26, 0.45);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.4),
    0 0 0 1px rgba(255, 107, 26, 0.18),
    0 0 50px -20px rgba(255, 107, 26, 0.4);
}
.blog-card.is-active::before { opacity: 1; }
.blog-card.is-active .blog-toggle-icon { transform: rotate(45deg); }
.blog-card.is-active .blog-toggle-text::after {
  content: ' · открыто';
  color: var(--muted-2);
  font-weight: 400;
}

/* ---------- Blog reader panel ---------- */
.blog-reader {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows .6s cubic-bezier(.22,.61,.36,1);
  margin-top: 0;
}
.blog-reader.is-open {
  grid-template-rows: 1fr;
  margin-top: clamp(18px, 2vw, 28px);
}
.blog-reader[aria-hidden="true"]:not(.is-open) > .blog-reader-shell {
  /* Collapse padding when closed so empty panel doesn't take space */
  padding: 0 clamp(18px, 2vw, 28px);
}
.blog-reader-shell {
  overflow: hidden;
  min-height: 0;
  position: relative;
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.018) 100%),
    rgba(15, 17, 23, 0.85);
  border: 1px solid var(--line);
  backdrop-filter: blur(24px) saturate(120%);
  -webkit-backdrop-filter: blur(24px) saturate(120%);
  padding: 0 clamp(18px, 2vw, 28px);
  transition: padding .5s var(--ease);
}
.blog-reader.is-open .blog-reader-shell {
  padding: clamp(28px, 3.4vw, 48px) clamp(20px, 3vw, 56px);
  box-shadow:
    0 30px 60px rgba(0,0,0,0.45),
    0 0 0 1px rgba(255, 107, 26, 0.08);
}
/* Decorative orange aura at top */
.blog-reader-shell::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--accent) 50%, transparent 100%);
  opacity: 0;
  transition: opacity .6s var(--ease);
}
.blog-reader.is-open .blog-reader-shell::before { opacity: 0.7; }

.blog-reader-close {
  position: absolute;
  top: clamp(16px, 2vw, 24px);
  right: clamp(16px, 2vw, 24px);
  width: 38px; height: 38px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: rgba(8, 9, 12, 0.6);
  color: var(--text-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease), transform .25s var(--ease);
  z-index: 2;
}
.blog-reader-close:hover {
  background: var(--accent);
  color: #0a0a0a;
  border-color: var(--accent);
  transform: rotate(90deg);
}

.blog-reader-meta {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
}
.blog-reader-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2.6vw, 32px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.018em;
  color: var(--text);
  margin: 0 0 18px;
  max-width: 720px;
}
.blog-reader-divider {
  height: 1px;
  background: linear-gradient(90deg, var(--line-strong) 0%, var(--line) 40%, transparent 100%);
  margin: 0 0 28px;
}

/* Content typography — constrained reading column */
.blog-reader-content {
  max-width: 720px;
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-2);
  /* fade-in for swap animation */
  opacity: 1;
  transition: opacity .25s var(--ease);
}
.blog-reader.is-fading .blog-reader-content { opacity: 0; }
.blog-reader-content > * + * { margin-top: 1.1em; }
.blog-reader-content h2 {
  font-family: var(--font-display);
  font-size: clamp(17px, 1.6vw, 20px);
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: var(--text);
  margin-top: 36px !important;
  margin-bottom: 8px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
.blog-reader-content h2:first-child {
  margin-top: 0 !important;
  padding-top: 0;
  border-top: 0;
}
.blog-reader-content h3 {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text);
  margin-top: 22px !important;
  margin-bottom: 4px;
}
.blog-reader-content p { margin: 0; }
.blog-reader-content ul,
.blog-reader-content ol {
  padding-left: 24px;
  margin: 0;
}
.blog-reader-content li {
  font-size: 15px;
  line-height: 1.7;
}
.blog-reader-content li + li { margin-top: 6px; }
.blog-reader-content li::marker { color: var(--accent); }
.blog-reader-content strong { color: var(--text); font-weight: 600; }
.blog-reader-content blockquote {
  margin: 22px 0;
  padding: 16px 22px;
  border-left: 2px solid var(--accent);
  background: rgba(255, 107, 26, 0.05);
  font-size: 14.5px;
  color: var(--text-2);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

@media (max-width: 640px) {
  .blog-reader.is-open .blog-reader-shell {
    padding: 26px 20px 28px;
  }
  .blog-reader-close { top: 12px; right: 12px; width: 34px; height: 34px; }
  .blog-reader-title { font-size: 20px; line-height: 1.22; padding-right: 44px; }
  .blog-reader-content { font-size: 14.5px; line-height: 1.7; }
  .blog-reader-content h2 { font-size: 17px; padding-top: 22px; margin-top: 28px !important; }
  .blog-reader-content h3 { font-size: 15px; }
  .blog-reader-content li { font-size: 14.5px; }
  .blog-reader-divider { margin-bottom: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .blog-reader,
  .blog-reader-shell,
  .blog-reader-content,
  .blog-toggle-icon,
  .blog-reader-close { transition: none; }
}

/* ---------- Contact ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(32px, 5vw, 64px);
  align-items: start;
}
.contact-info .section-tag { margin-bottom: 24px; }
.contact-list {
  margin-top: 36px;
  border-top: 1px solid var(--line);
}
.contact-list li {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
  align-items: center;
}
.contact-key {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.contact-val {
  font-size: 15px;
  color: var(--text);
  font-weight: 500;
  transition: color .2s var(--ease);
}
a.contact-val:hover { color: var(--accent); }
.contact-buttons {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 28px;
}

.contact-form {
  background: linear-gradient(180deg, rgba(255,255,255,.04), rgba(255,255,255,.015));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(28px, 3vw, 40px);
  backdrop-filter: blur(10px);
  position: relative;
  overflow: hidden;
}
.contact-form::before {
  content: '';
  position: absolute;
  top: -50%; right: -30%;
  width: 400px; height: 400px;
  background: radial-gradient(circle, rgba(255, 107, 26, 0.18) 0%, transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}
.form-title {
  font-family: var(--font-display);
  font-size: clamp(22px, 2vw, 28px);
  font-weight: 600;
  margin-bottom: 6px;
  letter-spacing: -0.015em;
  position: relative;
}
.form-sub {
  font-size: 14px;
  color: var(--text-2);
  margin-bottom: 24px;
  position: relative;
}
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; position: relative; }
.field label {
  font-family: var(--font-display);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.field input,
.field textarea {
  background: rgba(8, 9, 12, 0.6);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px 16px;
  color: var(--text);
  font-size: 15px;
  width: 100%;
  outline: none;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field input::placeholder,
.field textarea::placeholder { color: var(--muted-2); }
.field input:focus,
.field textarea:focus {
  border-color: var(--accent);
  background: rgba(8, 9, 12, 0.8);
}
.field textarea { resize: vertical; min-height: 100px; }
.form-note {
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  text-align: center;
  position: relative;
}
.form-success {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(40, 200, 100, 0.1);
  border: 1px solid rgba(40, 200, 100, 0.3);
  border-radius: 12px;
  color: #6FE5A8;
  font-size: 14px;
  position: relative;
}
.form-success strong { color: #fff; }

.form-error {
  margin-top: 16px;
  padding: 14px 16px;
  background: rgba(255, 80, 80, 0.08);
  border: 1px solid rgba(255, 100, 100, 0.3);
  border-radius: 12px;
  color: #FFA0A0;
  font-size: 14px;
}
.form-error strong { color: #fff; }

/* Honeypot — visually hidden but accessible to bots that scrape DOM */
.hp-field {
  position: absolute !important;
  left: -9999px !important;
  width: 1px; height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

/* Submit button busy state */
.contact-form .btn-primary[disabled] {
  opacity: 0.65;
  cursor: not-allowed;
  pointer-events: none;
}
.contact-form .btn-primary.is-sending .btn-label::after {
  content: '…';
  display: inline-block;
  margin-left: 2px;
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  background:
    linear-gradient(180deg, transparent, rgba(255,255,255,.015));
  padding-top: 72px;
  margin-top: 40px;
  position: relative;
  z-index: 2;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1.2fr 2fr;
  gap: 48px;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--line);
}
.footer-brand p {
  color: var(--muted);
  font-size: 14px;
  margin-top: 20px;
  max-width: 320px;
  line-height: 1.6;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.footer-cols h4 {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}
.footer-cols ul { display: flex; flex-direction: column; gap: 10px; }
.footer-cols li, .footer-cols a {
  font-size: 14px;
  color: var(--text-2);
  transition: color .2s var(--ease);
}
.footer-cols a:hover { color: var(--accent); }
.footer-bottom {
  padding-block: 28px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
  font-size: 12.5px;
  color: var(--muted);
}
.footer-mini { letter-spacing: 0.02em; }
.footer-credit {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  opacity: 0.78;
}
.footer-credit a {
  color: var(--text-2);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255, 107, 26, 0.35);
  padding-bottom: 1px;
  transition: color .2s var(--ease), border-color .2s var(--ease);
}
.footer-credit a:hover {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

/* ---------- Floating call button ---------- */
.float-call {
  position: fixed;
  bottom: 24px; right: 24px;
  width: 58px; height: 58px;
  border-radius: 50%;
  background: var(--accent);
  color: #0a0a0a;
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 50;
  box-shadow:
    0 12px 28px rgba(255, 107, 26, 0.45),
    0 4px 12px rgba(255, 107, 26, 0.25);
  transition: transform .35s var(--ease), background .25s var(--ease), box-shadow .35s var(--ease);
}
.float-call::before {
  content: '';
  position: absolute; inset: -4px;
  border-radius: 50%;
  background: var(--accent);
  opacity: .4;
  z-index: -1;
  animation: ringPulse 2.5s ease-out infinite;
}
@keyframes ringPulse {
  0%   { transform: scale(.95); opacity: .5; }
  70%  { transform: scale(1.45); opacity: 0; }
  100% { transform: scale(.95); opacity: 0; }
}
/* Subtle handset tilt on hover — like the receiver lifting */
.float-call:hover {
  transform: scale(1.08) translateY(-2px);
  background: var(--accent-2);
  box-shadow:
    0 16px 36px rgba(255, 107, 26, 0.55),
    0 6px 16px rgba(255, 107, 26, 0.3);
}
.float-call:active { transform: scale(0.96); }

/* ---------- Reveal animation (JS opt-in: hidden only after JS arms it) ---------- */
.js-ready .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .8s var(--ease-out), transform .8s var(--ease-out);
  will-change: opacity, transform;
}
.js-ready .reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}
.js-ready .reveal:nth-child(2) { transition-delay: 60ms; }
.js-ready .reveal:nth-child(3) { transition-delay: 120ms; }
.js-ready .reveal:nth-child(4) { transition-delay: 180ms; }
.js-ready .reveal:nth-child(5) { transition-delay: 240ms; }
.js-ready .reveal:nth-child(6) { transition-delay: 300ms; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .js-ready .reveal { opacity: 1; transform: none; }
}

/* =====================================================
   RESPONSIVE
   ===================================================== */

/* Large desktop and below */
@media (max-width: 1100px) {
  .nav-desktop { display: none; }
  .nav-toggle { display: inline-flex; }
  .header-cta .btn-ghost { display: none; }
  .header-cta { margin-left: auto; }
}

/* Tablet */
@media (max-width: 960px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .services-image-grid { grid-template-columns: repeat(2, 1fr); }
  .why-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .blog-grid { grid-template-columns: repeat(2, 1fr); }
  .process-timeline { grid-template-columns: repeat(2, 1fr); gap: 32px 24px; }
  .process-timeline::before { display: none; }
  .portfolio-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 240px; }
  .portfolio-tall { grid-row: span 1; }
  .portfolio-wide { grid-column: span 2; }
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-media { aspect-ratio: 16 / 10; max-height: 400px; }
  .faq-grid { grid-template-columns: 1fr; gap: 32px; }
  .faq-head { position: static; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .hero-stats { grid-template-columns: repeat(2, 1fr); gap: 20px; }
}

/* Mobile */
@media (max-width: 640px) {
  :root { --header-h: 64px; }

  .header-cta .btn-primary span { display: none; }
  .header-cta .btn-primary { padding: 10px 14px; }
  .header-cta { display: none; }

  .brand-sub { font-size: 8.5px; }
  .brand-name { font-size: 13.5px; }
  .brand-mark { width: 34px; height: 34px; }

  /* Hero: prevent oversized text */
  .hero {
    min-height: auto;
    padding-top: calc(var(--header-h) + 36px);
    padding-bottom: 80px;
  }
  .hero-eyebrow {
    padding: 7px 13px;
    font-size: 10.5px;
    letter-spacing: 0.12em;
  }
  /* On mobile, image stacks behind stacked content — shift focus to keep camera visible
     and switch overlay to vertical so text on top stays readable */
  .hero-media img {
    object-position: 78% center;
  }
  .hero-overlay {
    background:
      linear-gradient(180deg,
        rgba(8, 9, 12, 0.92) 0%,
        rgba(8, 9, 12, 0.78) 22%,
        rgba(8, 9, 12, 0.45) 48%,
        rgba(8, 9, 12, 0.15) 72%,
        rgba(8, 9, 12, 0.6) 92%,
        var(--bg) 100%
      );
  }
  .hero-title-wrap {
    max-width: 100%;
  }
  .hero-title {
    font-size: clamp(22px, 5.6vw, 28px);
    line-height: 1.18;
    letter-spacing: -0.015em;
    word-break: normal;
    overflow-wrap: break-word;
    hyphens: none;
  }
  /* Ghost text — keep on mobile but smaller and tightly clipped */
  .hero-ghost {
    inset: -6% 0 -6% 0;
  }
  .hero-ghost-line {
    font-size: clamp(28px, 9vw, 52px);
    letter-spacing: -0.04em;
  }
  .hero-ghost-1 { transform: translateX(-2%); color: rgba(255,255,255,0.038); }
  .hero-ghost-2 { transform: translateX(4%) translateY(-3%); color: rgba(255,107,26,0.05); }

  .hero-subtitle {
    font-size: 14px;
    text-shadow: 0 0 14px rgba(255,107,26,0.4);
  }
  .hero-lede { font-size: 15px; }
  .hero-cta { width: 100%; }
  .hero-cta .btn-primary, .hero-cta .btn-ghost { flex: 1; min-width: 0; }
  .hero-stats {
    grid-template-columns: repeat(2, 1fr);
    gap: 18px;
    padding-top: 28px;
  }
  .stat-num, .stat-plus { font-size: 28px; }
  .stat-label { font-size: 10.5px; }

  /* Marquee smaller */
  .hero-marquee { height: 56px; }
  .marquee-track { font-size: 12px; gap: 24px; }

  /* Section spacing */
  .section { padding-block: 64px; }

  /* Section title size guard */
  .section-title { font-size: clamp(19px, 5.2vw, 25px); line-height: 1.22; margin-bottom: 14px; }
  .section-tag { font-size: 11px; padding: 6px 12px; margin-bottom: 18px; }
  .section-lede { font-size: 14.5px; line-height: 1.6; }
  .section-head { margin-bottom: 36px; }

  /* Cards/grids */
  .services-grid { grid-template-columns: 1fr; gap: 14px; }
  .services-image-grid { grid-template-columns: 1fr; gap: 16px; }
  .products-grid { grid-template-columns: 1fr; gap: 14px; }
  .why-grid { grid-template-columns: 1fr; gap: 14px; }
  .blog-grid { grid-template-columns: 1fr; gap: 14px; }
  .process-timeline { grid-template-columns: 1fr; gap: 28px; }
  .portfolio-grid { grid-template-columns: 1fr; grid-auto-rows: 220px; }
  .portfolio-wide { grid-column: span 1; }

  .service-card { min-height: auto; }
  .why-card { min-height: auto; }

  .about-stats { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .stat-big { font-size: 32px; }

  .footer-cols { grid-template-columns: repeat(2, 1fr); }
  .footer-bottom { flex-direction: column; align-items: flex-start; }

  .contact-list li {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 14px 0;
  }
  .contact-buttons { gap: 8px; }
  .contact-buttons .btn-primary,
  .contact-buttons .btn-ghost { flex: 1; min-width: 130px; justify-content: center; padding: 12px 16px; font-size: 13px; }

  .float-call { width: 52px; height: 52px; bottom: 18px; right: 18px; }

  /* FAQ */
  .faq-item summary { padding: 18px; font-size: 15px; }
  .faq-content { padding: 0 18px 18px 18px; font-size: 14px; }
  .faq-icon { width: 28px; height: 28px; }
}

@media (max-width: 380px) {
  :root { --gutter: 16px; }
  .hero-title { font-size: 21px; line-height: 1.22; letter-spacing: -0.012em; }
  .hero-ghost-line { font-size: 32px; }
  .hero-subtitle { font-size: 12.5px; }
  .section-title { font-size: 19px; }
  .section { padding-block: 56px; }
}

/* Touch friendly: increase tap targets */
@media (hover: none) {
  .btn-primary:hover, .btn-ghost:hover, .card:hover, .product-card:hover, .service-image-card:hover, .why-card:hover, .blog-card:hover {
    transform: none;
  }
}
