/* ==========================================================================
   لیدتک | LeadTech — Design System
   Author: LeadTech
   ========================================================================== */

/* ---------- 1. Fonts (self-hosted / Vazirmatn — SIL OFL) ---------- */
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Medium.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Vazirmatn";
  src: url("../fonts/Vazirmatn-ExtraBold.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}
@supports (font-variation-settings: normal) {
  @font-face {
    font-family: "Vazirmatn";
    src: url("../fonts/Vazirmatn-Variable.woff2") format("woff2-variations");
    font-weight: 100 900;
    font-style: normal;
    font-display: swap;
  }
}

/* ---------- 2. Tokens ---------- */
:root {
  /* brand */
  --gold: #f1c40f;
  --gold-deep: #c79a0b;
  --gold-soft: rgba(241, 196, 15, 0.12);
  --gold-line: rgba(241, 196, 15, 0.28);
  --gold-text: #f1c40f; /* رنگ طلایی متن‌های کوچک */

  /* dark theme (default identity) */
  --bg: #0e1316;
  --bg-alt: #11181c;
  --surface: #161d21;
  --card: #22282a;
  --card-head: #1b2225;
  --line: #2c3438;
  --line-soft: rgba(255, 255, 255, 0.07);
  --text: #ffffff;
  --text-2: #d3dade;
  --muted: #96a3a9;
  --shadow: 0 18px 44px -24px rgba(0, 0, 0, 0.85);
  --shadow-sm: 0 6px 18px -12px rgba(0, 0, 0, 0.8);
  --ink-on-gold: #1a1f21;
  --grid-dot: rgba(255, 255, 255, 0.045);
  --hero-glow: rgba(241, 196, 15, 0.13);
  --input-bg: #171e21;

  /* type */
  --font: "Vazirmatn", "Tahoma", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", "Cascadia Code", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* space & shape */
  --r-sm: 8px;
  --r: 12px;
  --r-lg: 18px;
  --r-pill: 999px;
  --wrap: 1200px;
  --gap: 24px;
  --sec-y: clamp(56px, 7vw, 92px);
  --header-h: 76px;
  --t: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html[data-theme="light"] {
  --bg: #ffffff;
  --bg-alt: #f6f7f8;
  --surface: #f7f8f9;
  --card: #ffffff;
  --card-head: #f4f6f6;
  --line: #e3e7e9;
  --line-soft: rgba(34, 40, 42, 0.08);
  --text: #22282a;
  --text-2: #394346;
  --muted: #5d686d;
  --shadow: 0 16px 40px -26px rgba(34, 40, 42, 0.4);
  --shadow-sm: 0 6px 16px -12px rgba(34, 40, 42, 0.35);
  --gold: #b8860b;
  --gold-deep: #f1c40f;
  --gold-soft: rgba(241, 196, 15, 0.16);
  --gold-line: rgba(184, 134, 11, 0.3);
  --gold-text: #946c09; /* طلایی تیره‌تر برای خوانایی متن روی پس‌زمینه روشن */
  --grid-dot: rgba(34, 40, 42, 0.06);
  --hero-glow: rgba(241, 196, 15, 0.22);
  --input-bg: #ffffff;
  --ink-on-gold: #22282a;
}

/* ---------- 3. Base ---------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.85;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  transition: background-color var(--t), color var(--t);
}

img,
svg,
picture {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t);
}

button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.5;
  font-weight: 800;
  letter-spacing: -0.02em;
}

p {
  margin: 0;
}

ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--gold);
  color: var(--ink-on-gold);
}

.container {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: 20px;
}

.section {
  padding-block: var(--sec-y);
}

.section--alt {
  background: var(--bg-alt);
}

.skip-link {
  position: absolute;
  inset-inline-start: 50%;
  top: -60px;
  transform: translateX(50%);
  background: var(--gold);
  color: var(--ink-on-gold);
  padding: 10px 20px;
  border-radius: 0 0 var(--r) var(--r);
  font-weight: 700;
  z-index: 200;
  transition: top var(--t);
}
.skip-link:focus {
  top: 0;
}

.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;
}

/* section heading */
.sec-head {
  text-align: center;
  margin-bottom: 44px;
}
.sec-head h2 {
  font-size: clamp(1.55rem, 3.1vw, 2.15rem);
  margin-bottom: 10px;
}
.sec-head p {
  color: var(--muted);
  font-size: 0.98rem;
  max-width: 60ch;
  margin-inline: auto;
}

/* ---------- 4. Buttons ---------- */
.btn {
  --btn-bg: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 26px;
  border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: var(--btn-bg);
  font-weight: 700;
  font-size: 0.95rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform var(--t), background-color var(--t), border-color var(--t),
    color var(--t), box-shadow var(--t);
}
.btn:hover {
  transform: translateY(-2px);
}
.btn:active {
  transform: translateY(0);
}

.btn--gold {
  background: #f1c40f;
  color: #22282a;
  box-shadow: 0 10px 24px -14px rgba(241, 196, 15, 0.75);
}
.btn--gold:hover {
  background: #ffd429;
  box-shadow: 0 14px 30px -14px rgba(241, 196, 15, 0.9);
}

.btn--ghost {
  border-color: var(--line);
  color: var(--text);
}
.btn--ghost:hover {
  border-color: var(--gold);
  color: var(--gold-text);
  background: var(--gold-soft);
}

.btn--sm {
  padding: 9px 18px;
  font-size: 0.87rem;
}

.link-gold {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-text);
  font-weight: 700;
  font-size: 0.88rem;
}
.link-gold svg {
  transition: transform var(--t);
}
.link-gold:hover svg {
  transform: translateX(4px);
}

/* ---------- 5. Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line-soft);
  transition: box-shadow var(--t), background-color var(--t);
}
.header.is-stuck {
  box-shadow: var(--shadow-sm);
}
.header__inner {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

/* logo */
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand__mark {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
}
.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}
.brand__name {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}
.brand__tag {
  font-size: 0.63rem;
  color: var(--gold);
  font-weight: 500;
  letter-spacing: 0;
}

/* nav */
.nav {
  display: flex;
  align-items: center;
  gap: 4px;
}
.nav a {
  position: relative;
  padding: 8px 12px;
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
  border-radius: var(--r-sm);
}
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 12px;
  bottom: 2px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
  transform: scaleX(0);
  transition: transform var(--t);
}
.nav a:hover {
  color: var(--text);
}
.nav a:hover::after,
.nav a[aria-current="page"]::after {
  transform: scaleX(1);
}
.nav a[aria-current="page"] {
  color: var(--gold-text);
  font-weight: 700;
}

.header__side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.header__phone {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: var(--gold);
  font-weight: 700;
  font-size: 0.95rem;
  font-family: var(--mono);
  letter-spacing: 0.02em;
  direction: ltr;
}
.header__phone:hover {
  filter: brightness(1.15);
}

.icon-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  color: var(--text-2);
  transition: color var(--t), border-color var(--t), background-color var(--t);
}
.icon-btn:hover {
  color: var(--gold-text);
  border-color: var(--gold-line);
  background: var(--gold-soft);
}
.theme-toggle .i-sun {
  display: none;
}
html[data-theme="light"] .theme-toggle .i-sun {
  display: block;
}
html[data-theme="light"] .theme-toggle .i-moon {
  display: none;
}

.burger {
  display: none;
}

/* mobile drawer */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 150;
  visibility: hidden;
  pointer-events: none;
}
.drawer__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
  transition: opacity var(--t);
}
.drawer__panel {
  position: absolute;
  inset-block: 0;
  inset-inline-end: 0;
  width: min(320px, 85vw);
  background: var(--surface);
  border-inline-start: 1px solid var(--line);
  padding: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transform: translateX(-100%);
  transition: transform 0.32s cubic-bezier(0.4, 0, 0.2, 1);
  overflow-y: auto;
}
html[dir="rtl"] .drawer__panel {
  transform: translateX(100%);
}
.drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}
.drawer.is-open .drawer__scrim {
  opacity: 1;
}
.drawer.is-open .drawer__panel {
  transform: translateX(0);
}
.drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}
.drawer__panel a.drawer__link {
  padding: 12px 14px;
  border-radius: var(--r-sm);
  font-weight: 500;
  color: var(--text-2);
  border: 1px solid transparent;
}
.drawer__panel a.drawer__link:hover,
.drawer__panel a.drawer__link[aria-current="page"] {
  background: var(--gold-soft);
  color: var(--gold-text);
  border-color: var(--gold-line);
}
.drawer__foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

/* ---------- 6. Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(48px, 6vw, 84px) clamp(40px, 5vw, 64px);
  background: var(--bg);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 26px 26px;
  mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 30% 40%, #000 30%, transparent 75%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  inset-inline-start: -8%;
  top: -20%;
  width: 60%;
  aspect-ratio: 1;
  background: radial-gradient(circle, var(--hero-glow), transparent 62%);
  pointer-events: none;
}
.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  align-items: center;
  gap: clamp(24px, 4vw, 56px);
}
.hero__title {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.42;
  margin-bottom: 18px;
}
.hero__title .accent {
  color: var(--gold);
}
.hero__lead {
  color: var(--muted);
  font-size: clamp(0.95rem, 1.4vw, 1.06rem);
  max-width: 44ch;
  margin-bottom: 30px;
}
.hero__cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.hero__art {
  position: relative;
}
.hero__art svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

/* floating badges animation */
.float-a {
  animation: floaty 6s ease-in-out infinite;
}
.float-b {
  animation: floaty 7.5s ease-in-out infinite;
  animation-delay: -2s;
}
.float-c {
  animation: floaty 6.8s ease-in-out infinite;
  animation-delay: -3.4s;
}
.float-d {
  animation: floaty 8s ease-in-out infinite;
  animation-delay: -1.2s;
}
@keyframes floaty {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-9px);
  }
}
.pulse-ring {
  animation: pulse 3.6s ease-out infinite;
  transform-origin: center;
}
@keyframes pulse {
  0% {
    opacity: 0.5;
    transform: scale(0.92);
  }
  70% {
    opacity: 0;
    transform: scale(1.15);
  }
  100% {
    opacity: 0;
  }
}

/* ---------- 7. Stats ---------- */
.stats {
  border-block: 1px solid var(--line);
  background: var(--bg-alt);
}
.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
}
.stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 26px 14px;
  position: relative;
}
.stat + .stat::before {
  content: "";
  position: absolute;
  inset-inline-end: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 46px;
  background: var(--line);
}
.stat__icon {
  color: var(--gold);
  flex-shrink: 0;
}
.stat__num {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--gold);
  line-height: 1.3;
  font-family: var(--mono);
  letter-spacing: -0.02em;
}
.stat__label {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.4;
}

/* ---------- 8. Services ---------- */
.services__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--gap);
}
.svc-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: border-color var(--t), transform var(--t);
}
.svc-card:hover {
  border-color: var(--gold-line);
  transform: translateY(-3px);
}
.svc-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 22px;
  background: var(--card-head);
  border-bottom: 1px solid var(--line);
}
.svc-card__head h3 {
  font-size: 1.08rem;
}
.svc-card__head .ico {
  color: var(--gold);
  flex-shrink: 0;
}
.svc-list {
  padding: 6px 10px 4px;
  flex: 1;
}
.svc-list li + li {
  border-top: 1px solid var(--line-soft);
}
.svc-item {
  display: block;
  padding: 13px 12px;
  border-radius: var(--r-sm);
  transition: background-color var(--t);
}
.svc-item__row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.svc-item__row .chev {
  color: var(--gold);
  flex-shrink: 0;
  transition: transform var(--t);
}
.svc-item__title {
  font-size: 0.92rem;
  font-weight: 500;
  color: var(--text-2);
}
.svc-item__desc {
  display: block;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.7;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  padding-inline-start: 26px;
  transition: max-height 0.32s ease, opacity 0.32s ease, margin-top 0.32s ease;
}
.svc-item:hover,
.svc-item:focus-visible {
  background: var(--gold-soft);
}
.svc-item:hover .svc-item__title,
.svc-item:focus-visible .svc-item__title {
  color: var(--gold-text);
}
.svc-item:hover .chev {
  transform: translateX(-4px);
}
.svc-item:hover .svc-item__desc,
.svc-item:focus-visible .svc-item__desc {
  max-height: 80px;
  opacity: 1;
  margin-top: 4px;
}
.svc-card__foot {
  padding: 14px 22px 18px;
  border-top: 1px solid var(--line-soft);
}

/* ---------- 9. Projects ---------- */
.projects__wrap {
  position: relative;
}
.carousel {
  display: flex;
  gap: var(--gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding-bottom: 8px;
  scrollbar-width: none;
}
.carousel::-webkit-scrollbar {
  display: none;
}
.proj-card {
  scroll-snap-align: start;
  flex: 0 0 calc((100% - var(--gap) * 2) / 3);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t), border-color var(--t), box-shadow var(--t);
}
.proj-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-line);
  box-shadow: var(--shadow);
}
.proj-card__media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--bg-alt);
}
.proj-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  transition: transform 0.5s ease;
}
.proj-card:hover .proj-card__media img {
  transform: scale(1.05);
}
.proj-card__badge {
  position: absolute;
  inset-block-start: 10px;
  inset-inline-end: 10px;
  background: rgba(14, 19, 22, 0.82);
  color: var(--gold);
  border: 1px solid var(--gold-line);
  backdrop-filter: blur(6px);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--r-pill);
}
.proj-card__body {
  padding: 16px 18px 20px;
}
.proj-card__body h3 {
  font-size: 1rem;
  margin-bottom: 6px;
}
.proj-card__body p {
  font-size: 0.83rem;
  color: var(--muted);
  line-height: 1.75;
}
.carousel-btn {
  position: absolute;
  top: 38%;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  color: var(--text-2);
  cursor: pointer;
  z-index: 3;
  box-shadow: var(--shadow-sm);
  transition: color var(--t), border-color var(--t), background-color var(--t);
}
.carousel-btn:hover {
  color: var(--gold-text);
  border-color: var(--gold);
}
.carousel-btn--prev {
  inset-inline-end: -14px;
}
.carousel-btn--next {
  inset-inline-start: -14px;
}

/* ---------- 10. Clients ---------- */
.clients__row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(28px, 7vw, 90px);
}
.client {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  filter: grayscale(1);
  opacity: 0.72;
  transition: filter var(--t), opacity var(--t), transform var(--t);
}
.client:hover {
  filter: grayscale(0);
  opacity: 1;
  transform: translateY(-3px);
}
.client img {
  height: 34px;
  width: auto;
}
.client span {
  font-size: 0.8rem;
  color: var(--muted);
}

/* ---------- 11. Newsletter ---------- */
.newsletter {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(24px, 4vw, 40px);
  display: grid;
  grid-template-columns: 1fr minmax(280px, 460px);
  align-items: center;
  gap: 26px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.newsletter::before {
  content: "";
  position: absolute;
  inset-inline-end: -60px;
  top: -80px;
  width: 240px;
  height: 240px;
  background: radial-gradient(circle, var(--gold-soft), transparent 65%);
  pointer-events: none;
}
.newsletter h2 {
  font-size: clamp(1.2rem, 2.4vw, 1.5rem);
  margin-bottom: 8px;
}
.newsletter p {
  color: var(--muted);
  font-size: 0.9rem;
}
.newsletter__form {
  display: flex;
  gap: 10px;
  position: relative;
  z-index: 1;
}
.newsletter__form input {
  flex: 1;
  min-width: 0;
}

/* ---------- 12. Forms ---------- */
.field {
  display: block;
  margin-bottom: 16px;
}
.field__label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 7px;
  color: var(--text-2);
}
.field__label .req {
  color: var(--gold);
}
.input,
.select,
.textarea {
  width: 100%;
  background: var(--input-bg);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: 0.9rem;
  color: var(--text);
  transition: border-color var(--t), box-shadow var(--t), background-color var(--t);
}
.input::placeholder,
.textarea::placeholder {
  color: var(--muted);
  opacity: 0.8;
}
.input:focus,
.select:focus,
.textarea:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-soft);
}
.textarea {
  min-height: 132px;
  resize: vertical;
  line-height: 1.9;
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2396a3a9' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: left 14px center;
  padding-inline-start: 40px;
}
.form-note {
  font-size: 0.8rem;
  border-radius: var(--r-sm);
  padding: 11px 14px;
  margin-top: 14px;
  display: none;
  line-height: 1.7;
}
.form-note.is-ok {
  display: block;
  background: rgba(46, 160, 90, 0.12);
  border: 1px solid rgba(46, 160, 90, 0.4);
  color: #3fbf78;
}
.form-note.is-err {
  display: block;
  background: rgba(220, 76, 70, 0.12);
  border: 1px solid rgba(220, 76, 70, 0.4);
  color: #e2685f;
}
.btn[aria-busy="true"] {
  opacity: 0.7;
  pointer-events: none;
}

/* ---------- 13. Footer ---------- */
.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  padding-block: clamp(40px, 5vw, 60px) 0;
}
.footer__grid {
  display: grid;
  grid-template-columns: 1.25fr 1fr 1fr 1fr;
  gap: clamp(24px, 4vw, 48px);
}
.footer h3 {
  font-size: 0.98rem;
  margin-bottom: 18px;
  position: relative;
  padding-bottom: 10px;
}
.footer h3::after {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  bottom: 0;
  width: 32px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}
.footer__about p {
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.95;
  margin-bottom: 18px;
}
.footer__links li {
  margin-bottom: 10px;
}
.footer__links a {
  color: var(--muted);
  font-size: 0.86rem;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.footer__links a::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.5;
  transition: opacity var(--t), transform var(--t);
}
.footer__links a:hover {
  color: var(--gold-text);
}
.footer__links a:hover::before {
  opacity: 1;
  transform: scale(1.5);
}
.footer__contact li {
  display: flex;
  gap: 11px;
  margin-bottom: 16px;
  align-items: flex-start;
}
.footer__contact .ico {
  color: var(--gold);
  flex-shrink: 0;
  margin-top: 3px;
}
.footer__contact b {
  display: block;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-2);
  line-height: 1.6;
}
.footer__contact small {
  color: var(--muted);
  font-size: 0.75rem;
}
.footer__contact a b {
  transition: color var(--t);
}
.footer__contact a:hover b {
  color: var(--gold-text);
}
.socials {
  display: flex;
  gap: 10px;
}
.socials a {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  color: var(--muted);
  transition: all var(--t);
}
.socials a:hover {
  color: var(--ink-on-gold);
  background: #f1c40f;
  border-color: #f1c40f;
  transform: translateY(-3px);
}
.footer__bottom {
  margin-top: 42px;
  border-top: 1px solid var(--line);
  padding-block: 20px;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
}
.footer__bottom .dot {
  color: var(--gold);
  margin-inline: 8px;
}

/* ---------- 14. Page header (inner pages) ---------- */
.page-head {
  position: relative;
  padding-block: clamp(40px, 5.5vw, 68px);
  text-align: center;
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.page-head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(var(--grid-dot) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 70% 100% at 50% 0%, #000, transparent 70%);
}
.page-head__inner {
  position: relative;
  z-index: 1;
}
.page-head h1 {
  font-size: clamp(1.7rem, 3.6vw, 2.4rem);
  margin-bottom: 10px;
}
.page-head p {
  color: var(--muted);
  font-size: 0.96rem;
  max-width: 58ch;
  margin-inline: auto;
}
.breadcrumb {
  display: flex;
  justify-content: center;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 14px;
}
.breadcrumb a:hover {
  color: var(--gold);
}
.breadcrumb li + li::before {
  content: "/";
  margin-inline-end: 8px;
  opacity: 0.5;
}

/* ---------- 15. Articles ---------- */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: clamp(24px, 3vw, 36px);
  align-items: start;
}
.blog-toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 26px;
}
.search-box {
  position: relative;
  flex: 1;
}
.search-box .ico {
  position: absolute;
  inset-inline-start: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}
.search-box input {
  padding-inline-start: 42px;
}
.blog-toolbar .select {
  width: 190px;
  flex-shrink: 0;
}

.post-card {
  display: grid;
  grid-template-columns: 1fr 210px;
  gap: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 18px;
  margin-bottom: 20px;
  transition: border-color var(--t), transform var(--t), box-shadow var(--t);
}
.post-card:hover {
  border-color: var(--gold-line);
  transform: translateY(-3px);
  box-shadow: var(--shadow);
}
.post-card__body {
  display: flex;
  flex-direction: column;
}
.post-card__title {
  font-size: 1.06rem;
  margin-bottom: 10px;
}
.post-card__title a:hover {
  color: var(--gold-text);
}
.post-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 12px;
}
.post-meta span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.chip {
  background: var(--gold-soft);
  color: var(--gold-text);
  border: 1px solid var(--gold-line);
  padding: 3px 10px;
  border-radius: var(--r-pill);
  font-weight: 700;
  font-size: 0.7rem;
}
.post-card__excerpt {
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.9;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__foot {
  margin-top: auto;
}
.post-card__media {
  border-radius: var(--r);
  overflow: hidden;
  background: var(--bg-alt);
  border: 1px solid var(--line-soft);
  aspect-ratio: 4 / 3;
}
.post-card__media img,
.post-card__media svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.widget {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  margin-bottom: 20px;
}
.widget h2 {
  font-size: 0.98rem;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.widget__list li a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 0;
  font-size: 0.86rem;
  color: var(--muted);
  border-bottom: 1px dashed var(--line-soft);
}
.widget__list li:last-child a {
  border-bottom: 0;
}
.widget__list a:hover,
.widget__list a[aria-current="true"] {
  color: var(--gold-text);
}
.widget__list .count {
  font-size: 0.72rem;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 1px 9px;
  font-family: var(--mono);
}
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.tag {
  font-size: 0.75rem;
  padding: 5px 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  color: var(--muted);
  background: var(--bg-alt);
  cursor: pointer;
  transition: all var(--t);
}
.tag:hover,
.tag.is-active {
  color: var(--gold-text);
  border-color: var(--gold-line);
  background: var(--gold-soft);
}

.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  margin-top: 32px;
  flex-wrap: wrap;
}
.pagination a,
.pagination span {
  min-width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 12px;
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
  font-size: 0.85rem;
  color: var(--muted);
  transition: all var(--t);
}
.pagination a:hover {
  border-color: var(--gold);
  color: var(--gold-text);
}
.pagination .is-current {
  background: #f1c40f;
  border-color: #f1c40f;
  color: #22282a;
  font-weight: 700;
}
.pagination .is-disabled {
  opacity: 0.4;
  pointer-events: none;
}
.empty-state {
  text-align: center;
  padding: 50px 20px;
  color: var(--muted);
  border: 1px dashed var(--line);
  border-radius: var(--r-lg);
  display: none;
}
.empty-state.is-visible {
  display: block;
}

/* ---------- 16. Contact ---------- */
.contact-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap);
  margin-bottom: clamp(28px, 4vw, 44px);
}
.contact-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 26px 20px;
  text-align: center;
  transition: border-color var(--t), transform var(--t);
}
.contact-card:hover {
  border-color: var(--gold-line);
  transform: translateY(-3px);
}
.contact-card__icon {
  width: 50px;
  height: 50px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--gold-soft);
  color: var(--gold);
  border: 1px solid var(--gold-line);
}
.contact-card b {
  display: block;
  font-size: 0.95rem;
  font-weight: 700;
  margin-bottom: 6px;
  word-break: break-word;
}
.contact-card span {
  font-size: 0.8rem;
  color: var(--muted);
}
.contact-card .mono {
  font-family: var(--mono);
  direction: ltr;
  letter-spacing: 0.02em;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--gap);
  align-items: stretch;
}
.contact-grid > .panel {
  display: flex;
  flex-direction: column;
}
.contact-grid > .panel > .map-frame {
  flex: 1;
}
.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: var(--shadow);
}
.panel > h2 {
  font-size: 1.1rem;
  margin-bottom: 20px;
}
.map-frame {
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  height: 100%;
  min-height: 420px;
  position: relative;
  background: var(--bg-alt);
}
.map-frame iframe {
  width: 100%;
  height: 100%;
  min-height: 420px;
  border: 0;
  display: block;
  filter: var(--map-filter, none);
}
html[data-theme="dark"] .map-frame iframe {
  filter: grayscale(0.3) invert(0.92) hue-rotate(180deg) brightness(0.92) contrast(0.9);
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 16px;
}

/* ---------- 17. Modal ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 180;
  display: grid;
  place-items: center;
  padding: 20px;
  visibility: hidden;
  opacity: 0;
  transition: opacity var(--t), visibility var(--t);
}
.modal.is-open {
  visibility: visible;
  opacity: 1;
}
.modal__scrim {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  backdrop-filter: blur(3px);
}
.modal__box {
  position: relative;
  width: min(560px, 100%);
  max-height: 88vh;
  overflow-y: auto;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(20px, 3vw, 30px);
  box-shadow: 0 30px 70px -30px rgba(0, 0, 0, 0.8);
  transform: translateY(14px) scale(0.98);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.modal.is-open .modal__box {
  transform: translateY(0) scale(1);
}
.modal__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.modal__head h2 {
  font-size: 1.15rem;
  margin-bottom: 5px;
}
.modal__head p {
  font-size: 0.83rem;
  color: var(--muted);
}

/* ---------- 18. Article detail ---------- */
.article-layout {
  display: grid;
  grid-template-columns: 1fr 290px;
  gap: clamp(24px, 3vw, 36px);
  align-items: start;
}
.prose {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: clamp(22px, 3.4vw, 40px);
  font-size: 0.95rem;
  line-height: 2.1;
  color: var(--text-2);
}
.prose h2 {
  font-size: 1.25rem;
  margin: 34px 0 14px;
  color: var(--text);
  padding-inline-start: 14px;
  border-inline-start: 3px solid var(--gold);
  line-height: 1.6;
}
.prose h3 {
  font-size: 1.05rem;
  margin: 26px 0 10px;
  color: var(--text);
}
.prose p {
  margin-bottom: 16px;
}
.prose ul,
.prose ol {
  margin: 0 0 18px;
  padding-inline-start: 22px;
}
.prose ul li {
  list-style: none;
  position: relative;
  padding-inline-start: 18px;
  margin-bottom: 9px;
}
.prose ul li::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 14px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--gold);
}
.prose ol {
  list-style: decimal;
}
.prose ol li {
  margin-bottom: 9px;
  padding-inline-start: 6px;
}
.prose ol li::marker {
  color: var(--gold);
  font-weight: 700;
}
.prose strong {
  color: var(--text);
  font-weight: 700;
}
.prose a {
  color: var(--gold-text);
  border-bottom: 1px dashed var(--gold-line);
}
.prose blockquote {
  margin: 22px 0;
  padding: 16px 20px;
  background: var(--bg-alt);
  border-inline-start: 3px solid var(--gold);
  border-radius: var(--r-sm);
  color: var(--muted);
  font-size: 0.88rem;
}
.prose blockquote p:last-child {
  margin-bottom: 0;
}
.prose pre {
  background: #0d1215;
  border: 1px solid #263034;
  border-radius: var(--r);
  padding: 16px 18px;
  overflow-x: auto;
  direction: ltr;
  text-align: left;
  margin: 0 0 18px;
}
.prose pre code {
  font-family: var(--mono);
  font-size: 0.82rem;
  line-height: 1.85;
  color: #d7e2e6;
  white-space: pre;
}
.prose :not(pre) > code {
  font-family: var(--mono);
  font-size: 0.82rem;
  background: var(--gold-soft);
  color: var(--gold-text);
  padding: 2px 7px;
  border-radius: 5px;
  direction: ltr;
  display: inline-block;
}
.prose figure {
  margin: 22px 0;
}
.prose figcaption {
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
  margin-top: 8px;
}
.article-hero {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--line);
  margin-bottom: 22px;
  background: var(--bg-alt);
}
.share-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: 0.83rem;
  color: var(--muted);
}

/* ---------- 19. Reveal on scroll ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.6s ease, transform 0.6s ease;
  will-change: opacity, transform;
}
.reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ---------- 20. Responsive ---------- */
@media (max-width: 1080px) {
  .nav {
    display: none;
  }
  .burger {
    display: grid;
  }
  .header__phone span.label {
    display: none;
  }
  .footer__grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 940px) {
  :root {
    --header-h: 68px;
  }
  .hero__grid {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .hero__lead {
    margin-inline: auto;
  }
  .hero__cta {
    justify-content: center;
  }
  .hero__art {
    order: -1;
    max-width: 520px;
    margin-inline: auto;
  }
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .stat:nth-child(2)::before {
    display: none;
  }
  .stat:nth-child(3),
  .stat:nth-child(4) {
    border-top: 1px solid var(--line);
  }
  .services__grid {
    grid-template-columns: 1fr;
  }
  .proj-card {
    flex: 0 0 calc((100% - var(--gap)) / 2);
  }
  .newsletter {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .blog-layout,
  .article-layout {
    grid-template-columns: 1fr;
  }
  .blog-sidebar {
    order: -1;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .carousel-btn {
    top: auto;
    bottom: -54px;
  }
  .carousel-btn--prev {
    inset-inline-end: calc(50% - 48px);
  }
  .carousel-btn--next {
    inset-inline-start: calc(50% - 48px);
  }
  .projects__wrap {
    padding-bottom: 56px;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
  }
  .contact-cards {
    grid-template-columns: 1fr;
  }
  .post-card {
    grid-template-columns: 1fr;
  }
  .post-card__media {
    order: -1;
    aspect-ratio: 16 / 9;
  }
  .proj-card {
    flex: 0 0 86%;
  }
  .blog-toolbar {
    flex-direction: column;
  }
  .blog-toolbar .select {
    width: 100%;
  }
  .footer__grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .hero__cta .btn {
    flex: 1;
  }
  .brand__tag {
    display: none;
  }
}

@media (max-width: 420px) {
  .stats__grid {
    grid-template-columns: 1fr;
  }
  .stat::before {
    display: none !important;
  }
  .stat + .stat {
    border-top: 1px solid var(--line);
  }
}

/* ---------- 21. Motion & print ---------- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

@media print {
  .header,
  .footer,
  .drawer,
  .modal,
  .carousel-btn,
  .newsletter {
    display: none !important;
  }
  body {
    background: #fff;
    color: #000;
  }
}

/* ---------- 22. Hero isometric artwork ---------- */
:root {
  --iso-top: #262f34;
  --iso-left: #161d21;
  --iso-right: #1e262b;
  --iso-stroke: #3a464c;
  --iso-badge-bg: #1b2226;
  --iso-badge-line: #333f45;
  --iso-badge-tx: #ffffff;
}
html[data-theme="light"] {
  --iso-top: #fbfcfd;
  --iso-left: #d8dfe4;
  --iso-right: #eaeef1;
  --iso-stroke: #c3ced4;
  --iso-badge-bg: #ffffff;
  --iso-badge-line: #e0e5e8;
  --iso-badge-tx: #22282a;
}
.iso-art .iso-t {
  fill: var(--iso-top);
  stroke: var(--iso-stroke);
  stroke-width: 1;
}
.iso-art .iso-l {
  fill: var(--iso-left);
}
.iso-art .iso-r {
  fill: var(--iso-right);
}
.iso-art .iso-trace {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.6;
  opacity: 0.55;
}
.iso-art .iso-node {
  fill: var(--gold);
}
.iso-art .iso-led {
  fill: var(--gold);
}
.iso-art .iso-link {
  fill: none;
  stroke: var(--gold);
  stroke-width: 1.4;
  stroke-dasharray: 5 7;
  opacity: 0.45;
}
.iso-art .iso-badge {
  fill: var(--iso-badge-bg);
  stroke: var(--iso-badge-line);
  stroke-width: 1.5;
}
.iso-art .iso-badge-tx {
  fill: var(--iso-badge-tx);
}
.iso-art .iso-badge-st {
  stroke: var(--iso-badge-tx);
}
