:root {
  --bg: #fff2c8;
  --card: rgba(255, 255, 255, 0.9);
  --text: #2a2033;
  --muted: #7b6a88;
  --accent: #ff7a59;
  --accent-2: #2ec4b6;
  --accent-3: #ffd166;
  --accent-4: #8a5cff;
  --accent-5: #ff5ea8;
  --border: rgba(42, 32, 51, 0.09);
  --shadow: 0 22px 55px rgba(74, 39, 96, 0.16);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: "Vazirmatn", Tahoma, "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 207, 90, 0.35), transparent 32%),
    radial-gradient(circle at top right, rgba(255, 94, 168, 0.22), transparent 26%),
    radial-gradient(circle at 18% 72%, rgba(46, 196, 182, 0.22), transparent 24%),
    radial-gradient(circle at 92% 82%, rgba(138, 92, 255, 0.2), transparent 20%),
    linear-gradient(180deg, rgba(255, 244, 216, 0.94), rgba(255, 233, 239, 0.98)),
    var(--bg-url, url("./back.jpg")) center center / cover no-repeat fixed;
  overflow-x: hidden;
}

button,
input,
textarea {
  font: inherit;
}

button {
  border: 0;
}

input,
textarea {
  width: 100%;
  border: 1px solid rgba(25, 23, 19, 0.14);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.9);
  padding: 11px 12px;
  color: var(--text);
}

textarea {
  resize: vertical;
}

input:focus,
textarea:focus {
  outline: 2px solid rgba(47, 122, 108, 0.22);
  border-color: rgba(47, 122, 108, 0.35);
}

body::before,
body::after {
  content: "";
  position: fixed;
  inset: auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  filter: blur(8px);
  opacity: 0.28;
  pointer-events: none;
  z-index: -1;
  animation: floatBlob 10s ease-in-out infinite alternate;
}

body::before {
  top: -100px;
  right: -90px;
  background: linear-gradient(135deg, rgba(255, 122, 89, 0.94), rgba(255, 94, 168, 0));
}

body::after {
  bottom: 4vh;
  left: -90px;
  background: linear-gradient(135deg, rgba(46, 196, 182, 0.86), rgba(138, 92, 255, 0));
  animation-delay: -4s;
}

.page {
  width: min(430px, calc(100% - 18px));
  margin: 0 auto;
  padding: 14px 0 94px;
  display: grid;
  gap: 12px;
}

.editor-panel {
  position: fixed;
  inset: 12px 12px auto 12px;
  z-index: 50;
  max-height: calc(100vh - 24px);
  overflow: auto;
  border-radius: 24px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 60px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(25, 23, 19, 0.1);
}

.editor-panel__header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.editor-panel__eyebrow {
  font-size: 0.78rem;
  color: var(--accent-2);
  font-weight: 700;
}

.editor-panel__header h2 {
  margin-top: 4px;
  font-size: 1.15rem;
}

.panel-close,
.panel-save,
.panel-reset {
  cursor: pointer;
}

.panel-close {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(17, 17, 17, 0.08);
  color: #111;
  font-size: 1.3rem;
}

.editor-form {
  display: grid;
  gap: 12px;
}

.editor-form label {
  display: grid;
  gap: 6px;
}

.editor-form label span {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 700;
}

.editor-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.editor-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.panel-save,
.panel-reset {
  padding: 12px 14px;
  border-radius: 14px;
  font-weight: 700;
}

.panel-save {
  background: linear-gradient(135deg, var(--accent-2), #24564f);
  color: white;
}

.panel-reset {
  background: rgba(25, 23, 19, 0.08);
  color: var(--text);
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  position: relative;
  overflow: hidden;
  --card-tilt: 0deg;
  transform: rotate(var(--card-tilt));
  animation: cardRise 0.55s ease both;
}

.page > .card:nth-child(1) { animation-delay: 0.02s; }
.page > .card:nth-child(2) { animation-delay: 0.08s; }
.page > .card:nth-child(3) { animation-delay: 0.14s; }
.page > .card:nth-child(4) { animation-delay: 0.2s; }
.page > .card:nth-child(5) { animation-delay: 0.26s; }
.page > .card:nth-child(6) { animation-delay: 0.32s; }
.page > .card:nth-child(7) { animation-delay: 0.38s; }

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 14%, rgba(255, 207, 90, 0.18), transparent 18%),
    radial-gradient(circle at 84% 10%, rgba(138, 92, 255, 0.12), transparent 15%),
    radial-gradient(circle at 84% 90%, rgba(46, 196, 182, 0.12), transparent 16%),
    radial-gradient(circle at 12% 88%, rgba(255, 94, 168, 0.1), transparent 14%);
  pointer-events: none;
}

.hero {
  padding: 24px 20px 18px;
  position: relative;
  overflow: hidden;
  border-radius: 30px;
  --card-tilt: -0.4deg;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.92), rgba(255, 249, 236, 0.88)),
    rgba(255,255,255,0.74);
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -26% -56% auto;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 122, 89, 0.24), rgba(255, 122, 89, 0));
  pointer-events: none;
}

.hero__profile {
  display: grid;
  gap: 10px;
  justify-items: center;
  position: relative;
  z-index: 1;
}

.avatar {
  width: 102px;
  height: 102px;
  border-radius: 50%;
  object-fit: cover;
  border: 8px solid rgba(255,255,255,0.96);
  box-shadow:
    0 16px 30px rgba(35, 28, 18, 0.16),
    0 0 0 6px rgba(255, 207, 90, 0.16),
    0 0 0 12px rgba(138, 92, 255, 0.08);
}

.hero__identity {
  text-align: center;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 207, 90, 0.28), rgba(255, 138, 91, 0.18));
  color: #7a4c13;
  font-size: 0.84rem;
  font-weight: 800;
  border: 1px solid rgba(255, 138, 91, 0.12);
}

h1, h2, p { margin: 0; }
h1 {
  font-size: 2.08rem;
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 900;
}
.company, .lead, .muted, .section p { color: var(--muted); }
.company { margin-top: 6px; font-weight: 800; }
.lead {
  margin-top: 16px;
  font-size: 1rem;
  line-height: 1.9;
  text-align: center;
  position: relative;
  z-index: 1;
}

.icon-actions {
  display: flex;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.icon-action {
  width: 58px;
  height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.99), rgba(248, 243, 235, 0.94));
  border: 1px solid rgba(25, 23, 19, 0.08);
  box-shadow:
    0 14px 28px rgba(25, 23, 19, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  transform: translateY(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.icon-action svg {
  width: 24px;
  height: 24px;
  fill: currentColor;
  position: relative;
  z-index: 1;
}

.icon-action::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  opacity: 0.12;
  transform: scale(0.9);
  pointer-events: none;
}

.icon-action--phone {
  color: #3a2d24;
}

.icon-action--sms {
  color: #2f7a6c;
}

.icon-action--whatsapp {
  color: #25d366;
}

.icon-action--phone::before {
  background: rgba(31, 28, 24, 0.18);
}

.icon-action--sms::before {
  background: rgba(47, 122, 108, 0.18);
}

.icon-action--whatsapp::before {
  background: rgba(37, 211, 102, 0.18);
}

.section {
  padding: 18px 16px 16px;
  --card-tilt: 0.2deg;
}

.section-title {
  text-align: center;
  font-size: 1.18rem;
  font-weight: 900;
  margin-bottom: 10px;
  color: #35253d;
  text-shadow: 0 1px 0 rgba(255,255,255,0.65);
}

.about-card {
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(255, 207, 90, 0.18), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 94, 168, 0.14), transparent 22%),
    radial-gradient(circle at bottom left, rgba(46, 196, 182, 0.12), transparent 24%),
    linear-gradient(180deg, rgba(255,255,255,0.94), rgba(255, 246, 232, 0.9));
}

.about-card .section-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
  padding: 8px 16px;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 207, 90, 0.34), rgba(255, 94, 168, 0.18), rgba(46, 196, 182, 0.16));
  color: #32223b;
  box-shadow: 0 10px 22px rgba(74, 39, 96, 0.1);
}

.about-copy {
  max-width: 28ch;
  margin: 0 auto;
  padding: 12px 14px;
  border-radius: 18px;
  font-size: 1.02rem;
  line-height: 2;
  font-weight: 800;
  color: #4a3553;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.92), rgba(255, 251, 241, 0.86));
  border: 1px dashed rgba(255, 122, 89, 0.24);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.95),
    0 10px 22px rgba(74, 39, 96, 0.08);
}

.contact-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.section-head {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
}

.section-head--compact {
  margin-bottom: 14px;
}

.contact-head__icon {
  width: 52px;
  height: 52px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent-2), #0f7f73, var(--accent-4));
  color: white;
  flex: 0 0 auto;
  box-shadow: 0 12px 22px rgba(34, 166, 153, 0.22);
}

.contact-head__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.button, .web-link, .contact-item, .socials a, .floating {
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.button {
  padding: 12px 16px;
  border-radius: 999px;
  font-weight: 700;
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.button:hover, .web-link:hover, .contact-item:hover, .socials a:hover, .floating:hover {
  transform: translateY(-2px);
}

.icon-action:hover {
  box-shadow:
    0 18px 34px rgba(25, 23, 19, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.95);
  transform: translateY(-2px) scale(1.02);
}

.primary {
  color: white;
  background: linear-gradient(135deg, var(--accent), var(--accent-5));
  box-shadow: 0 10px 24px rgba(255, 94, 168, 0.24);
}

.secondary {
  color: var(--text);
  background: rgba(255,255,255,0.78);
  border: 1px solid var(--border);
}

.contact-list {
  display: grid;
  gap: 10px;
}

.contact-item, .web-link {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 6px 10px;
  padding: 12px 14px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(252, 246, 239, 0.82));
  border: 1px solid var(--border);
  color: var(--text);
}

.contact-item {
  direction: rtl;
  text-align: right;
}

.contact-item__label,
.contact-item strong {
  justify-self: end;
}

.web-link--featured {
  grid-template-columns: 56px 1fr auto;
  gap: 10px 12px;
  padding: 14px 16px;
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.96), rgba(255, 248, 228, 0.94)),
    rgba(255,255,255,0.7);
  border-color: rgba(255, 138, 91, 0.14);
  box-shadow:
    0 18px 36px rgba(25, 23, 19, 0.11),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.web-link--featured strong {
  font-size: 1.08rem;
  letter-spacing: -0.01em;
  color: #2d2333;
}

.web-link--featured .contact-item__chevron {
  font-size: 1.9rem;
  color: rgba(25, 23, 19, 0.42);
}

.web-link__icon--featured {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(46, 196, 182, 0.18), rgba(255, 207, 90, 0.18), rgba(255, 94, 168, 0.14));
  color: #2b7d76;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.8);
}

.section-head--compact .section-title {
  margin-bottom: 4px;
}

.section-head--compact .muted {
  font-size: 0.92rem;
  text-align: center;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.contact-item__label {
  grid-column: 2;
  font-size: 0.78rem;
  color: var(--muted);
}

.contact-item strong,
.web-link strong {
  grid-column: 2;
  font-size: 0.96rem;
}

.phone-number {
  direction: ltr;
  unicode-bidi: plaintext;
  text-align: left;
}

.web-link--featured .web-link__icon svg {
  width: 22px;
  height: 22px;
}

.contact-item__chevron {
  grid-column: 3;
  grid-row: 1 / span 2;
  font-size: 1.5rem;
  color: rgba(25, 23, 19, 0.55);
}

.floating {
  display: inline-flex;
  margin-top: 12px;
  padding: 12px 16px;
  border-radius: 999px;
  color: white;
  background: linear-gradient(135deg, var(--accent-2), #24564f);
  width: 100%;
  justify-content: center;
}

.gallery {
  display: grid;
  gap: 10px;
}

.gallery-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.gallery-item {
  margin: 0;
}

.gallery-item--wide img {
  width: 100%;
  height: auto;
}

.gallery img {
  width: 100%;
  height: auto;
  object-fit: contain;
  border-radius: 18px;
  border: 1px solid var(--border);
  box-shadow: 0 12px 24px rgba(25, 23, 19, 0.08);
  background: rgba(255,255,255,0.92);
}

.socials {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.social-link {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px 10px 10px;
  border-radius: 16px;
  background: rgba(255,255,255,0.95);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: 0 10px 20px rgba(25, 23, 19, 0.06);
  font-weight: 700;
}

.social-link__icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: linear-gradient(180deg, rgba(255,255,255,0.96), rgba(248,248,248,0.9));
}

.social-link__icon svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  flex: 0 0 auto;
}

.social-link.facebook {
  color: #1877f2;
}

.social-link.instagram {
  color: #d62976;
}

[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
}

.web-link strong {
  font-size: 0.92rem;
  color: var(--muted);
}

.web-link__icon {
  width: 46px;
  height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.95);
  color: #111;
}

.web-link__icon svg {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

.stack-actions {
  display: grid;
  gap: 10px;
}

.stack-actions--featured {
  gap: 12px;
}

.stack-action {
  display: block;
  padding: 13px 16px;
  text-align: center;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.95), rgba(245,240,233,0.92));
  color: white;
  text-decoration: none;
  font-weight: 700;
  box-shadow:
    0 12px 24px rgba(25, 23, 19, 0.08),
    inset 0 1px 0 rgba(255,255,255,0.7);
  border: 1px solid rgba(25, 23, 19, 0.08);
}

.stack-action--phone {
  color: #3a2d24;
}

.stack-action--whatsapp {
  color: #128c7e;
}

.stack-action--web {
  color: #2f7a6c;
}

.stack-action:hover {
  transform: translateY(-2px);
}

.mobile-bar {
  display: none;
}

@media (max-width: 640px) {
  .page { width: min(100% - 16px, 430px); padding-top: 10px; padding-bottom: 104px; gap: 10px; }
  .hero, .section { padding: 16px 14px; border-radius: 22px; }
  .hero__profile { gap: 8px; }
  .avatar { width: 96px; height: 96px; }
  .lead { font-size: 1rem; }
  .icon-actions { gap: 10px; }
  .icon-action { width: 54px; height: 54px; border-radius: 16px; }
  .icon-action svg { width: 22px; height: 22px; }
  .web-link--featured {
    grid-template-columns: 52px 1fr auto;
    padding: 12px 14px;
  }
  .web-link__icon--featured {
    width: 52px;
    height: 52px;
    border-radius: 16px;
  }
  .web-link--featured strong {
    font-size: 1rem;
  }
  .stack-actions--featured {
    gap: 10px;
  }
  .stack-action {
    border-radius: 16px;
    padding: 12px 14px;
  }
  .button { flex: 1 1 120px; }
  .editor-grid,
  .editor-actions,
  .gallery-row {
    grid-template-columns: 1fr;
  }
  .editor-panel {
    inset: 8px;
    border-radius: 20px;
  }
  .mobile-bar {
    position: fixed;
    left: 8px;
    right: 8px;
    bottom: 8px;
    z-index: 20;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    padding: 10px;
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(43, 35, 48, 0.94), rgba(102, 54, 130, 0.92));
    box-shadow: 0 16px 40px rgba(0,0,0,0.18);
    backdrop-filter: blur(14px);
  }
  .mobile-bar a {
    color: white;
    text-decoration: none;
    text-align: center;
    font-weight: 700;
    padding: 10px 8px;
    border-radius: 14px;
    background: rgba(255,255,255,0.09);
  }
}

@keyframes floatBlob {
  from { transform: translate3d(0, 0, 0) scale(1); }
  to { transform: translate3d(0, 18px, 0) scale(1.08); }
}

@keyframes cardRise {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985) rotate(var(--card-tilt));
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(var(--card-tilt));
  }
}
