/* design by: sanikookalam@gmail.com */

:root {
  --ink: #041016;
  --teal: #144b86;
  --teal-mid: #1b5fa0;
  --teal-soft: rgba(20, 75, 134, 0.35);
  --gold: #c9a96e;
  --gold-bright: #efe6d6;
  --gold-deep: #a8884e;
  --gold-soft: rgba(201, 169, 110, 0.16);
  --cream: #efe6d6;
  --bg: #041016;
  --bg-elevated: #071428;
  --card: rgba(20, 75, 134, 0.22);
  --card-solid: #0a1d30;
  --line: rgba(201, 169, 110, 0.22);
  --line-strong: rgba(201, 169, 110, 0.48);
  --text: #efe6d6;
  --muted: #a8b5b0;
  --green: #1b5fa0;
  --green-deep: #144b86;
  --shadow: 0 24px 60px rgba(4, 16, 22, 0.55);
  --radius: 22px;
  --font-ui: "Vazirmatn", "Outfit", Tahoma, sans-serif;
  --font-display: "Cormorant Garamond", "Vazirmatn", Georgia, serif;
  --font-logo: "Outfit", "Vazirmatn", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

body {
  position: relative;
  color: var(--text);
  font-family: var(--font-ui);
  font-weight: 400;
  background: var(--ink);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}

html[lang="en"] body,
html[dir="ltr"] body {
  --font-ui: "Outfit", "Vazirmatn", sans-serif;
}

/* Ambient luxury backdrop */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(201, 169, 110, 0.18), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 25%, rgba(20, 75, 134, 0.45), transparent 55%),
    linear-gradient(180deg, #06182a 0%, var(--ink) 48%, #030d18 100%);
}

.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: 0.55;
  animation: drift 14s ease-in-out infinite;
}

.orb-a {
  width: 280px;
  height: 280px;
  top: -40px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(201, 169, 110, 0.15);
}

.orb-b {
  width: 220px;
  height: 220px;
  bottom: 12%;
  right: -40px;
  background: rgba(20, 75, 134, 0.65);
  animation-delay: -4s;
}

.orb-c {
  width: 180px;
  height: 180px;
  bottom: 30%;
  left: -50px;
  background: rgba(201, 169, 110, 0.14);
  animation-delay: -8s;
}

.grain {
  position: absolute;
  inset: 0;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
  0%,
  100% {
    transform: translate(0, 0) scale(1);
  }
  50% {
    transform: translate(12px, 18px) scale(1.06);
  }
}

.app {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: auto;
  padding: 18px 16px 40px;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .orb {
    animation: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }
}

/* Header */
.top {
  position: relative;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  text-align: center;
}

.brand-mark {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-row {
  display: flex;
  flex-direction: row;
  direction: ltr;
  align-items: center;
  gap: 12px;
}

.site-logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  width: clamp(72px, 18vw, 96px);
  height: clamp(72px, 18vw, 96px);
}

.site-logo-wrap::before {
  content: "";
  position: absolute;
  inset: 8% 6%;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 45%, rgba(239, 230, 214, 0.78) 0%, rgba(201, 169, 110, 0.35) 42%, transparent 72%);
  filter: blur(10px);
  z-index: 0;
  pointer-events: none;
}

.site-logo {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter:
    drop-shadow(0 0 10px rgba(239, 230, 214, 0.55))
    drop-shadow(0 0 22px rgba(201, 169, 110, 0.35));
}

.ig-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.03);
  border-radius: 999px;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.02em;
  transition: border-color 0.2s, color 0.2s, background 0.2s;
  backdrop-filter: blur(10px);
}

.ig-link:hover {
  color: var(--gold-bright);
  border-color: var(--line-strong);
  background: var(--gold-soft);
}

.ig-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  flex-shrink: 0;
  display: block;
}

.ig-handle {
  font-family: var(--font-logo);
  background: linear-gradient(105deg, #efe6d6 0%, #c9a96e 55%, #a8884e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.logo-tag {
  font-family: var(--font-display);
  font-size: 13px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding-inline-start: 4px;
  direction: ltr;
  text-align: start;
  background: linear-gradient(105deg, #efe6d6 0%, #c9a96e 38%, #efe6d6 55%, #a8884e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.lang {
  position: relative;
}

.lang button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--text);
  border-radius: 999px;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  cursor: pointer;
  backdrop-filter: blur(12px);
  transition: border-color 0.2s, background 0.2s;
}

.lang button:hover {
  border-color: var(--line-strong);
  background: var(--gold-soft);
}

.lang-globe::before {
  content: "◎";
  color: var(--gold-bright);
  font-size: 12px;
}

.chev::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  border-inline-end: 1.5px solid var(--muted);
  border-bottom: 1.5px solid var(--muted);
  transform: rotate(45deg) translateY(-2px);
  opacity: 0.8;
}

html[dir="ltr"] .chev::before {
  transform: rotate(45deg) translateY(-2px);
}

.langs {
  display: none;
  position: absolute;
  z-index: 200;
  inset-inline-end: 0;
  top: calc(100% + 8px);
  background: rgba(4, 16, 22, 0.96);
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  overflow: hidden;
  width: 180px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  pointer-events: none;
}

.langs.open {
  display: block;
  pointer-events: auto;
  animation: menuIn 0.2s ease both;
}

@keyframes menuIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.langs div {
  padding: 13px 15px;
  cursor: pointer;
  font-size: 14px;
  transition: background 0.15s;
}

.langs div:hover,
.langs div:focus {
  background: var(--gold-soft);
  color: var(--gold-bright);
}

/* Hero */
.hero {
  margin: 18px 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

h1 {
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: clamp(24px, 5.5vw, 32px);
  margin: 0 0 8px;
  letter-spacing: -0.02em;
  line-height: 1.25;
  background: linear-gradient(120deg, #efe6d6 0%, #e4d0a4 28%, #c9a96e 58%, #efe6d6 78%, #a8884e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.sub {
  color: rgba(239, 230, 214, 0.72);
  margin: 0 0 14px;
  font-size: 15px;
  line-height: 1.7;
  font-weight: 300;
  max-width: 36em;
}

/* Cards */
.card {
  position: relative;
  background:
    linear-gradient(165deg, rgba(255, 255, 255, 0.04), transparent 40%),
    var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 18px;
  margin: 14px 0;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 169, 110, 0.55), transparent);
  opacity: 0.8;
}

label {
  display: block;
  font-weight: 600;
  margin: 16px 0 10px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--cream);
}

label:first-child {
  margin-top: 0;
}

input,
select,
textarea {
  width: 100%;
  background: rgba(4, 16, 22, 0.78);
  border: 1px solid rgba(239, 230, 214, 0.1);
  border-radius: 14px;
  color: var(--text);
  padding: 14px 15px;
  font-size: 15px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--line-strong);
  box-shadow: 0 0 0 3px var(--gold-soft);
}

textarea {
  min-height: 140px;
  resize: vertical;
  line-height: 1.6;
}

.fields {
  margin-top: 14px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.brand,
.svc {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  text-align: center;
  cursor: pointer;
  user-select: none;
  background: rgba(255, 255, 255, 0.02);
  transition: transform 0.18s ease, border-color 0.18s, background 0.18s, color 0.18s, box-shadow 0.18s;
}

.brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 16px 8px 14px;
  min-height: 132px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: rgba(239, 230, 214, 0.82);
  color: #041016;
  border-color: rgba(239, 230, 214, 0.35);
}

.brand-logo-wrap {
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.brand-logo {
  max-width: 72px;
  max-height: 72px;
  width: auto;
  height: auto;
  object-fit: contain;
}

.brand-logo.is-missing,
.brand-logo-wrap:empty {
  display: none;
}

.brand-name {
  line-height: 1.25;
  font-size: 13px;
  color: #041016;
}

.svc {
  padding: 14px 10px;
  font-size: 13px;
  font-weight: 500;
}

.svc:hover {
  border-color: rgba(201, 169, 110, 0.4);
  background: var(--gold-soft);
  transform: translateY(-1px);
}

.brand:hover {
  border-color: rgba(201, 169, 110, 0.7);
  background: rgba(239, 230, 214, 0.92);
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(4, 16, 22, 0.18);
}

.svc.sel {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: linear-gradient(160deg, rgba(201, 169, 110, 0.22), rgba(20, 75, 134, 0.25));
  box-shadow: 0 0 0 1px rgba(201, 169, 110, 0.28), inset 0 1px 0 rgba(239, 230, 214, 0.12);
}

.brand.sel {
  border-color: #c9a96e;
  color: #041016;
  background: rgba(239, 230, 214, 0.92);
  box-shadow: 0 0 0 2px #c9a96e, 0 8px 20px rgba(201, 169, 110, 0.28);
}

.services {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 9px;
}

.row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn {
  width: 100%;
  padding: 16px 18px;
  border: 0;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  letter-spacing: 0.01em;
  transition: transform 0.18s ease, filter 0.18s, box-shadow 0.18s;
}

.btn:active {
  transform: scale(0.985);
}

.btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.gold {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #efe6d6 0%, #c9a96e 48%, #8f7342 100%);
  color: #041016;
  box-shadow: 0 10px 28px rgba(201, 169, 110, 0.3);
}

.gold::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.35) 50%, transparent 60%);
  transform: translateX(-120%);
  animation: sheen 4.5s ease-in-out infinite;
}

@keyframes sheen {
  0%,
  60%,
  100% {
    transform: translateX(-120%);
  }
  75% {
    transform: translateX(120%);
  }
}

.green {
  background: linear-gradient(135deg, #1aa35c 0%, #128c7e 52%, #0a5c4e 100%);
  color: #efe6d6;
  box-shadow: 0 12px 30px rgba(18, 140, 126, 0.38);
}

.send-card {
  padding: 14px;
}

.send-card.reveal {
  transition-duration: 0.35s;
}

.muted {
  color: var(--muted);
  font-size: 13px;
  margin-top: 10px;
}

.success {
  display: none;
  background: rgba(20, 75, 134, 0.28);
  border: 1px solid rgba(201, 169, 110, 0.35);
  color: var(--cream);
  padding: 12px 14px;
  border-radius: 12px;
  margin-top: 12px;
  font-size: 14px;
}

.success.show {
  display: block;
  animation: fadeInUp 0.45s ease both;
}

.recent {
  display: none;
}

.recent.show {
  display: block;
  animation: fadeInUp 0.5s ease both;
}

.request {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
  padding: 13px 14px;
  margin-top: 10px;
  background: rgba(255, 255, 255, 0.02);
}

.footer {
  text-align: center;
  color: #6f807c;
  font-size: 12px;
  padding: 22px 8px 8px;
  letter-spacing: 0.04em;
}

.footer-line {
  margin: 0;
  unicode-bidi: isolate;
}

.footer-line a {
  color: inherit;
  text-decoration: none;
  border-bottom: 1px solid rgba(111, 128, 124, 0.45);
  unicode-bidi: isolate;
}

.footer-line a:hover {
  color: #c9a96e;
  border-bottom-color: #c9a96e;
}

.footer-credit {
  margin: 10px 0 0;
  font-size: 10px;
  letter-spacing: 0.03em;
  color: rgba(180, 196, 190, 0.18);
  font-weight: 300;
  unicode-bidi: isolate;
}

/* Install */
.install-banner {
  display: none;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: linear-gradient(120deg, rgba(201, 169, 110, 0.18), rgba(20, 75, 134, 0.2));
  border: 1px solid var(--line-strong);
  border-radius: 16px;
  padding: 13px 14px;
  margin: 12px 0 4px;
  backdrop-filter: blur(10px);
}

.install-banner.show {
  display: flex;
}

.install-banner p {
  margin: 0;
  font-size: 13px;
  color: var(--text);
  flex: 1;
  line-height: 1.5;
}

.install-banner .install-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}

.install-banner button {
  border: 0;
  border-radius: 999px;
  padding: 9px 14px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
}

.install-banner .install-yes {
  background: linear-gradient(135deg, #efe6d6, #c9a96e);
  color: #041016;
}

.install-banner .install-no {
  background: transparent;
  color: var(--muted);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

.ios-hint {
  display: none;
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px dashed rgba(201, 169, 110, 0.35);
  background: rgba(20, 75, 134, 0.12);
}

.ios-hint.show {
  display: block;
}

.file-note {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.6;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px dashed rgba(201, 169, 110, 0.4);
  background: rgba(201, 169, 110, 0.08);
}

.map-hint {
  margin: 0 0 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
}

.map-wrap {
  position: relative;
  height: min(42vw, 260px);
  min-height: 200px;
  margin: 0 0 12px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: inset 0 0 0 1px rgba(239, 230, 214, 0.06);
  background: #0a1d30;
  z-index: 1;
}

#map {
  width: 100%;
  height: 100%;
}

.map-wrap .leaflet-control-attribution {
  font-size: 10px;
  background: rgba(4, 16, 22, 0.72);
  color: var(--muted);
}

.map-wrap .leaflet-control-attribution a {
  color: var(--gold);
}

.map-wrap .leaflet-bar a {
  background: rgba(4, 16, 22, 0.9);
  color: var(--cream);
  border-bottom-color: rgba(239, 230, 214, 0.12);
}

.map-wrap .leaflet-bar a:hover {
  background: var(--teal);
  color: var(--cream);
}

.loc-row {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.loc-row .btn {
  width: auto;
  flex: 1 1 auto;
  min-width: 0;
}

.loc-chip {
  display: none;
  flex: 0 1 46%;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid rgba(201, 169, 110, 0.55);
  background: rgba(239, 230, 214, 0.14);
  color: var(--cream);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1.35;
  text-align: center;
  word-break: break-all;
}

.loc-chip.is-on {
  display: flex;
}

.media-hint {
  margin: 16px 0 8px;
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--cream);
}

.char-count {
  margin-top: 8px;
  font-size: 12px;
  color: var(--muted);
  text-align: end;
}

.char-count #charCount.is-low {
  color: var(--gold-bright);
  font-weight: 600;
}

@media (max-width: 560px) {
  .grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }

  .brand {
    min-height: 140px;
    padding: 16px 8px 14px;
  }

  .brand-logo-wrap {
    width: 80px;
    height: 80px;
  }

  .brand-logo {
    max-width: 80px;
    max-height: 80px;
  }

  .services {
    grid-template-columns: repeat(2, 1fr);
  }

  .row {
    grid-template-columns: 1fr;
  }

  .install-banner {
    flex-direction: column;
    align-items: stretch;
  }

  .loc-row {
    flex-direction: column;
  }

  .loc-chip {
    flex: 1 1 auto;
  }

  .logo-tag {
    letter-spacing: 0.14em;
    font-size: 11px;
  }
}

@media (display-mode: standalone) {
  .install-banner {
    display: none !important;
  }

  body {
    padding-top: env(safe-area-inset-top);
  }
}
