:root {
  /* ألوان مستخرجة من ملف الشعار الأصلي (28k عينة خضراء / 63k فحمية) */
  --green: #1f8c4f;
  --green-dark: #17703f;
  --green-soft: #e6f4eb;
  --charcoal: #2c2f2c;
  --surface: #f4f6f5;
  --line: #dce3e0;
  --muted: #5c6663;
  --wa: #1fa855;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: 'Cairo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  background: var(--surface);
  color: var(--charcoal);
  min-height: 100vh;
  line-height: 1.7;
}

/* الخلفية ثلاثية الأبعاد: زخرفة صامتة خلف المحتوى، بلا أي تفاعل */
#bg3d {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 78vh;
  z-index: 0;
  opacity: 0.42;
  pointer-events: none;
}

.pipe-fallback {
  position: fixed;
  top: 0;
  inset-inline-start: 0;
  width: 100%;
  height: 78vh;
  z-index: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0.5;
}

.pipe-fallback svg {
  width: min(72vw, 420px);
  height: auto;
}

.pipe-fallback.hidden {
  display: none;
}

.company-bar {
  position: relative;
  z-index: 2;
  background: #fff;
  border-bottom: 3px solid var(--green);
  padding: 12px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-logo {
  height: 38px;
  width: auto;
  flex: none;
}

.brand-name {
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--charcoal);
}

.brand-sub {
  margin-inline-start: auto;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

main.wrap {
  position: relative;
  z-index: 1;
  max-width: 560px;
  margin: 18px auto 24px;
  padding: 0 14px;
}

.plumber-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 26px 20px 22px;
  box-shadow: 0 10px 30px rgba(27, 122, 67, 0.09);
  text-align: center;
}

.kicker {
  display: inline-block;
  margin: 0 0 6px;
  padding: 4px 14px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 0.78rem;
  font-weight: 700;
}

.plumber-name {
  margin: 4px 0 10px;
  font-size: clamp(1.8rem, 8vw, 2.5rem);
  font-weight: 900;
  color: var(--charcoal);
  line-height: 1.25;
}

.phone-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.phone-number {
  font-weight: 800;
  color: var(--green-dark);
  text-decoration: none;
  font-size: clamp(1.25rem, 5vw, 1.55rem);
  letter-spacing: 0.5px;
  background: var(--green-soft);
  padding: 6px 18px;
  border-radius: 12px;
}

.copy-mini {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 8px 14px;
  font-family: inherit;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--muted);
  cursor: pointer;
}

.copy-mini:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 11px;
  margin: 8px 0 6px;
}

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 56px;
  padding: 14px 16px;
  border-radius: 16px;
  font-weight: 800;
  font-size: 1.05rem;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:active {
  transform: scale(0.985);
}

.btn .ico {
  font-size: 1.15rem;
}

.btn.primary {
  background: var(--green);
  color: #fff;
  box-shadow: 0 6px 16px rgba(27, 122, 67, 0.28);
}

.btn.whatsapp {
  background: var(--wa);
  color: #fff;
  box-shadow: 0 6px 16px rgba(31, 168, 85, 0.24);
}

.btn.company {
  background: #fff;
  color: var(--green-dark);
  border: 2px solid var(--green);
}

.bio {
  margin-top: 16px;
  background: var(--green-soft);
  border-radius: 14px;
  padding: 12px 16px;
  color: var(--charcoal);
  font-size: 0.95rem;
  text-align: start;
}

.company-box {
  margin-top: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px;
  text-align: start;
}

.box-logo {
  display: block;
  width: 130px;
  height: auto;
  margin: 0 auto 10px;
}

.landing-logo {
  display: block;
  width: 150px;
  height: auto;
  margin: 0 auto 12px;
}

.company-box h2 {
  margin: 0 0 6px;
  font-size: 1rem;
  color: var(--green-dark);
}

.company-box p {
  margin: 4px 0;
  font-size: 0.9rem;
  color: var(--charcoal);
}

.company-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--charcoal);
  font-weight: 600;
  font-size: 0.88rem;
  text-decoration: none;
  cursor: pointer;
  font-family: inherit;
}

.chip:hover {
  border-color: var(--green);
  color: var(--green-dark);
}

.share-row {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: center;
  gap: 10px;
}

.qr {
  width: 100%;
}

.qr summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.88rem;
}

.qr img {
  display: block;
  margin: 10px auto 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 8px;
}

.big-ico {
  font-size: 2.4rem;
}

.hint {
  color: var(--muted);
  font-size: 0.9rem;
}

footer {
  position: relative;
  z-index: 1;
  text-align: center;
  color: var(--muted);
  font-size: 0.82rem;
  padding: 14px 0 26px;
}

@media (max-width: 380px) {
  .plumber-card {
    padding: 20px 14px 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    animation: none !important;
  }
}
