:root {
  --ink: #211924;
  --muted: #776a79;
  --line: rgba(255, 112, 135, .20);
  --soft: #fff4f6;
  --paper: rgba(255,255,255,.82);
  --paper-solid: #ffffff;
  --brand: #f45f7a;
  --brand-2: #ff8a7a;
  --brand-dark: #c92f55;
  --accent: #2b2230;
  --danger: #b42318;
  --shadow: 0 28px 80px rgba(201,47,85,.16);
  --shadow-soft: 0 16px 44px rgba(33,25,36,.08);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Vazirmatn", Tahoma, Arial, sans-serif;
  color: var(--ink);
  line-height: 1.8;
  overflow-x: hidden;
  direction: ltr;
  background:
    linear-gradient(120deg, rgba(244,95,122,.10), transparent 34%),
    linear-gradient(300deg, rgba(255,138,122,.14), transparent 36%),
    #fff9fa;
}

body > * { direction: rtl; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font: inherit; }
h1, h2, h3, p { overflow-wrap: anywhere; }

@keyframes riseIn {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes softFloat {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(1.5deg); }
}

@keyframes sheen {
  from { transform: translateX(110%) skewX(-16deg); }
  to { transform: translateX(-140%) skewX(-16deg); }
}

.topbar, .app-header {
  width: min(1180px, calc(100vw - 32px));
  margin: 18px auto 0;
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 10px 16px;
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  position: sticky;
  top: 12px;
  z-index: 20;
  animation: riseIn .55s ease both;
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; min-width: 0; }
.brand img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 10px 18px rgba(244,95,122,.24)); }
.brand span { min-width: 0; overflow-wrap: anywhere; }
.topbar nav, .app-header nav { display: flex; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: .95rem; }
.topbar nav a, .app-header nav a, .link-reset {
  padding: 8px 11px;
  border-radius: 8px;
  transition: color .2s ease, background .2s ease, transform .2s ease;
}
.topbar nav a:hover, .app-header nav a:hover, .link-reset:hover {
  color: var(--brand-dark);
  background: rgba(244,95,122,.10);
  transform: translateY(-1px);
}

.hero {
  width: min(1180px, calc(100vw - 32px));
  min-height: calc(100svh - 108px);
  margin: 18px auto 0;
  display: grid;
  grid-template-columns: 365px minmax(0, 1fr);
  grid-template-areas: "panel copy";
  align-items: center;
  gap: 30px;
  padding: clamp(28px, 5vw, 70px);
  color: white;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(201,47,85,.96), rgba(255,138,122,.86) 48%, rgba(43,34,48,.96)),
    url("logo.png") center left 7% / min(560px, 58vw) no-repeat;
  box-shadow: 0 34px 100px rgba(201,47,85,.24);
  animation: riseIn .7s .08s ease both;
  direction: ltr;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent),
    repeating-linear-gradient(135deg, rgba(255,255,255,.08) 0 1px, transparent 1px 18px);
  opacity: .55;
  pointer-events: none;
}

.hero-orbit {
  position: absolute;
  width: min(46vw, 520px);
  aspect-ratio: 1;
  left: 5%;
  top: 14%;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 999px;
  transform: rotate(-18deg);
  opacity: .45;
  animation: softFloat 6s ease-in-out infinite;
  pointer-events: none;
}

.hero-copy, .hero-panel, .hero > * { min-width: 0; position: relative; z-index: 1; direction: rtl; }
.hero-copy { max-width: 710px; animation: riseIn .7s .18s ease both; }
.hero-copy { grid-area: copy; justify-self: end; text-align: right; }
.eyebrow { margin: 0 0 8px; color: var(--brand-dark); font-weight: 900; font-size: .88rem; }
.hero .eyebrow { color: #fff1a8; }
.hero h1 { margin: 0; font-size: clamp(2.7rem, 6.8vw, 6.2rem); line-height: 1.12; letter-spacing: 0; }
.hero h1 span { display: block; }
.lead { max-width: 630px; margin: 18px 0 0; color: rgba(255,255,255,.88); font-size: 1.18rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }

.btn {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 10px 20px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: pointer;
  font-weight: 900;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.btn::after {
  content: "";
  position: absolute;
  inset: 0;
  width: 36%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.45), transparent);
  transform: translateX(120%) skewX(-16deg);
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(201,47,85,.22); }
.btn:hover::after { animation: sheen .85s ease; }
.btn.primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: white; }
.hero .btn.primary { background: white; color: var(--brand-dark); }
.btn.ghost { background: rgba(255,255,255,.82); color: var(--ink); border-color: var(--line); }
.hero .btn.ghost { background: rgba(255,255,255,.12); color: white; border-color: rgba(255,255,255,.40); backdrop-filter: blur(12px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }

.hero-panel {
  grid-area: panel;
  align-self: center;
  justify-self: start;
  color: var(--ink);
  border-radius: 8px;
  padding: 20px;
  display: grid;
  gap: 12px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.94);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
  animation: riseIn .7s .28s ease both;
}
.hero-panel img { width: 92px; height: 92px; object-fit: contain; animation: softFloat 5.5s ease-in-out infinite; }
.hero-panel strong, .hero-panel a { display: block; }
.hero-panel a { color: var(--brand-dark); font-weight: 900; direction: ltr; text-align: right; }
.hero-panel p { margin: 0; color: var(--muted); }

.section, .split-section, .contact-band, .footer {
  width: min(1180px, calc(100vw - 32px));
  margin: 28px auto 0;
}
.section, .split-section, .contact-band {
  padding: clamp(24px, 4vw, 46px);
  background: var(--paper);
  border: 1px solid rgba(255,255,255,.92);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  animation: riseIn .7s ease both;
}
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.section h2, .split-section h2, .contact-band h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2.35rem); line-height: 1.35; }
.service-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.service-grid article {
  min-height: 220px;
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,246,248,.78));
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}
.service-grid article:hover { transform: translateY(-6px); border-color: rgba(244,95,122,.42); box-shadow: var(--shadow); }
.service-grid span { color: var(--brand-dark); font-weight: 900; }
.service-grid h3 { margin: 10px 0 8px; }
.service-grid p, .split-section p { margin: 0; color: var(--muted); }
.split-section { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.check-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; }
.check-list li { padding: 14px 16px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255,255,255,.76); transition: transform .2s ease, border-color .2s ease; }
.check-list li:hover { transform: translateX(-4px); border-color: rgba(244,95,122,.44); }
.clinic-note {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255,255,255,.76);
}
.clinic-note strong {
  display: block;
  margin-bottom: 8px;
  color: var(--brand-dark);
  font-weight: 900;
}
.contact-band { display: flex; justify-content: space-between; align-items: center; gap: 24px; background: linear-gradient(135deg, rgba(255,255,255,.86), rgba(255,231,236,.86)); }
.contact-items { display: grid; gap: 8px; color: var(--muted); }
.contact-items a { direction: ltr; color: var(--brand-dark); font-weight: 900; }
.footer { display: flex; justify-content: space-between; color: var(--muted); padding: 24px 0 38px; }

.auth-page {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 20px;
  background:
    linear-gradient(135deg, rgba(244,95,122,.20), transparent 40%),
    linear-gradient(315deg, rgba(255,138,122,.18), transparent 42%),
    #fff9fa;
}
.auth-shell { width: min(430px, 100%); }
.auth-card, .panel, .dash-hero {
  background: var(--paper);
  border: 1px solid rgba(255,255,255,.94);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  backdrop-filter: blur(18px);
  animation: riseIn .55s ease both;
}
.auth-card { padding: 30px; display: grid; gap: 16px; }
.auth-card img { width: 92px; height: 92px; object-fit: contain; justify-self: center; filter: drop-shadow(0 14px 24px rgba(244,95,122,.24)); animation: softFloat 5.5s ease-in-out infinite; }
.auth-card h1 { margin: 0; text-align: center; font-size: 1.65rem; }
.auth-subtitle { margin: -6px 0 0; text-align: center; color: var(--muted); }
.auth-wide { width: min(820px, 100%); }
.hub-card { text-align: center; }
.hub-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 10px 0; }
.hub-grid.single { grid-template-columns: 1fr; }
.hub-grid a {
  display: grid;
  gap: 6px;
  min-height: 116px;
  align-content: center;
  padding: 18px;
  border: 1px solid rgba(244,95,122,.18);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,238,242,.72));
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.hub-grid a:hover { transform: translateY(-4px); border-color: rgba(244,95,122,.42); box-shadow: var(--shadow); }
.hub-grid strong { color: var(--brand-dark); font-size: 1.08rem; }
.hub-grid span { color: var(--muted); font-size: .92rem; }
label { display: grid; gap: 7px; font-weight: 900; color: var(--ink); }
input, textarea {
  width: 100%;
  border: 1px solid rgba(244,95,122,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  padding: 11px 13px;
  color: var(--ink);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
select {
  width: 100%;
  border: 1px solid rgba(244,95,122,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  padding: 11px 13px;
  color: var(--ink);
}
input:focus, textarea:focus {
  outline: none;
  border-color: rgba(244,95,122,.62);
  box-shadow: 0 0 0 4px rgba(244,95,122,.12);
  background: white;
}
textarea { resize: vertical; }
.flash { margin: 0; padding: 10px 12px; border-radius: 8px; border: 1px solid #bbf7d0; background: #f0fdf4; color: #166534; }
.flash.bad { border-color: #fecaca; background: #fef2f2; color: var(--danger); }

.dashboard {
  width: min(1180px, calc(100vw - 32px));
  margin: 20px auto 44px;
  display: grid;
  gap: 18px;
}
.dashboard.narrow { width: min(900px, calc(100vw - 32px)); }
.dashboard-home { gap: 20px; }
.dash-hero {
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,232,237,.82)),
    url("logo.png") left 5% center / 190px no-repeat;
}
.dashboard-welcome {
  background:
    radial-gradient(circle at 12% 30%, rgba(255,88,120,.18), transparent 32%),
    linear-gradient(135deg, rgba(255,255,255,.94), rgba(255,232,237,.84)),
    url("logo.png") left 5% center / 210px no-repeat;
}
.dashboard-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.dashboard-stats article,
.dashboard-actions a {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.9);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.90), rgba(255,246,248,.74));
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.dashboard-stats article:hover,
.dashboard-actions a:hover {
  transform: translateY(-4px);
  border-color: rgba(244,95,122,.36);
  box-shadow: var(--shadow);
}
.dashboard-stats strong {
  display: block;
  color: var(--brand-dark);
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  line-height: 1.1;
}
.dashboard-stats span,
.dashboard-actions span,
.mini-list span {
  color: var(--muted);
}
.dashboard-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}
.dashboard-actions a {
  min-height: 132px;
  display: grid;
  align-content: center;
  gap: 8px;
}
.dashboard-actions strong {
  color: var(--ink);
  font-size: 1.12rem;
}
.dashboard-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.mini-list {
  display: grid;
  gap: 10px;
}
.mini-list a {
  display: grid;
  gap: 4px;
  padding: 13px;
  border: 1px solid rgba(244,95,122,.14);
  border-radius: 8px;
  background: rgba(255,255,255,.62);
  transition: transform .2s ease, border-color .2s ease;
}
.mini-list a:hover {
  transform: translateX(-4px);
  border-color: rgba(244,95,122,.34);
}
.dash-hero h1 { margin: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
.dash-hero p:last-child { margin-bottom: 0; color: var(--muted); }
.panel-grid { display: grid; grid-template-columns: 390px 1fr; gap: 18px; }
.panel { padding: 21px; overflow: hidden; transition: transform .22s ease, box-shadow .22s ease; }
.panel:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 14px; font-size: 1.25rem; }
.panel-title-row { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 14px; }
.panel-title-row h2 { margin: 0; }
.stack-form { display: grid; gap: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.inline-form { display: inline; }
.danger-link { color: #b42318; margin-right: 12px; }
.compact-form { grid-template-columns: minmax(220px, 360px) auto; align-items: end; }
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 620px; }
th, td { border-bottom: 1px solid rgba(244,95,122,.16); padding: 12px 10px; text-align: right; vertical-align: top; }
th { color: var(--muted); font-size: .9rem; white-space: nowrap; background: rgba(255,246,248,.65); }
.user-edit-list { display: grid; gap: 12px; }
.user-edit-row {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) minmax(140px, .8fr) minmax(170px, 1fr) minmax(140px, 1fr) auto;
  gap: 10px;
  align-items: end;
  padding: 12px;
  border: 1px solid rgba(244,95,122,.16);
  border-radius: 8px;
  background: rgba(255,255,255,.58);
}
.readonly-field { display: grid; gap: 7px; }
.readonly-field span { color: var(--muted); font-weight: 900; }
.readonly-field strong { min-height: 47px; display: flex; align-items: center; padding: 11px 13px; border-radius: 8px; background: rgba(255,255,255,.74); }
.empty-state { margin: 0; color: var(--muted); }
tr { transition: background .18s ease; }
tbody tr:hover { background: rgba(255,112,135,.07); }
.link-btn, .link-reset { color: var(--brand-dark); font-weight: 900; border: 0; background: transparent; cursor: pointer; padding: 0; }

.preview-panel {
  display: grid;
  gap: 16px;
}

.preview-panel .panel-title-row {
  margin-bottom: 0;
}

.file-image-preview,
.file-pdf-preview,
.stl-canvas,
.file-no-preview {
  width: 100%;
  border: 1px solid rgba(244,95,122,.16);
  border-radius: 8px;
  background: #fff7f9;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.75);
}

.file-image-preview {
  max-height: 72svh;
  object-fit: contain;
  padding: 10px;
}

.file-pdf-preview {
  height: min(74svh, 760px);
  min-height: 520px;
}

.stl-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(244,95,122,.14);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(255,238,242,.70));
}

.stl-toolbar span {
  color: var(--brand-dark);
  font-weight: 900;
}

.stl-canvas {
  display: block;
  aspect-ratio: 16 / 10;
  min-height: 360px;
  cursor: grab;
  touch-action: none;
}

.stl-canvas:active {
  cursor: grabbing;
}

.file-no-preview {
  display: grid;
  gap: 7px;
  min-height: 180px;
  align-content: center;
  padding: 22px;
}

.file-no-preview strong {
  color: var(--ink);
}

.invoice-workspace { width: min(1100px, calc(100vw - 32px)); margin: 20px auto 44px; }
.invoice-sheet {
  background: white;
  border: 1px solid rgba(244,95,122,.18);
  border-radius: 8px;
  box-shadow: var(--shadow);
  overflow: hidden;
  animation: riseIn .6s ease both;
}
.invoice-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 22px;
  border-bottom: 2px solid rgba(244,95,122,.13);
  background: linear-gradient(135deg, rgba(255,246,248,.92), rgba(255,255,255,.95));
}
.brand-block { display: flex; align-items: center; gap: 14px; }
.brand-block img { width: 84px; height: 84px; object-fit: contain; flex: 0 0 auto; }
.brand-block h1 { margin: 0; font-size: 1.3rem; }
.brand-block p { margin: 5px 0 0; color: var(--muted); font-size: .92rem; }
.meta-grid { display: grid; grid-template-columns: repeat(2, minmax(145px, 1fr)); gap: 10px; align-content: start; }
.meta-grid label { font-size: .85rem; color: var(--muted); }
.meta-grid input, .meta-grid strong { display: block; background: white; color: var(--ink); border: 1px solid rgba(244,95,122,.18); border-radius: 8px; padding: 9px 10px; min-height: 42px; direction: ltr; text-align: right; }
.invoice-table-wrap { padding: 18px 22px 6px; }
.invoice-table { table-layout: fixed; min-width: 920px; }
.invoice-table th, .invoice-table td { border: 1px solid rgba(244,95,122,.18); text-align: center; padding: 9px 7px; }
.invoice-table th { background: linear-gradient(180deg, rgba(244,95,122,.14), rgba(255,138,122,.10)); color: var(--brand-dark); }
.invoice-table td { min-height: 42px; }
[contenteditable="true"] { outline: 0; }
[contenteditable="true"]:focus { box-shadow: inset 0 0 0 2px rgba(244,95,122,.34); }
.row-selected td { background: rgba(255,112,135,.08); }
.line-total { font-weight: 900; color: var(--brand-dark); }
.invoice-bottom { display: grid; grid-template-columns: 1fr 300px; gap: 16px; padding: 10px 22px 22px; }
.bank-box, .summary-box { border: 1px solid rgba(244,95,122,.18); border-radius: 8px; padding: 14px 16px; background: #fff9fa; }
.bank-box h2 { margin: 0 0 8px; font-size: 1rem; }
.bank-box p { margin: 6px 0; }
.summary-box { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.summary-box span { color: var(--muted); }
.summary-box strong { font-size: 1.15rem; color: var(--brand-dark); }
.invoice-actions { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; }

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

@media (max-width: 820px) {
  .topbar, .app-header, .contact-band, .dash-hero, .invoice-head { align-items: stretch; flex-direction: column; }
  .hero { min-height: auto; grid-template-columns: 1fr; grid-template-areas: "copy" "panel"; padding: 30px; }
  .hero-panel { align-self: stretch; }
  .service-grid, .split-section, .panel-grid, .invoice-bottom { grid-template-columns: 1fr; }
  .section-head { display: block; }
  .meta-grid { grid-template-columns: 1fr; }
  .topbar nav, .app-header nav { width: 100%; justify-content: flex-start; }
  .compact-form { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .user-edit-row { grid-template-columns: 1fr; }
  .dashboard-stats,
  .dashboard-actions,
  .dashboard-columns,
  .blog-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 520px) {
  .topbar, .app-header, .hero, .section, .split-section, .contact-band, .footer, .dashboard, .dashboard.narrow, .invoice-workspace { width: calc(100vw - 28px); }
  .topbar, .app-header { position: static; }
  .brand img { width: 40px; height: 40px; }
  .topbar .brand, .app-header .brand { width: 100%; justify-content: flex-end; }
  .brand span { font-size: .92rem; line-height: 1.55; }
  .hero { padding: 26px 18px; background-size: 430px; background-position: center top; }
  .hero-copy { text-align: center; }
  .hero h1 { font-size: clamp(2rem, 10vw, 2.7rem); }
  .hero .lead { width: min(292px, 100%); margin-inline: auto; font-size: .95rem; }
  .hero-actions { display: grid; grid-template-columns: 1fr; }
  .hero-actions .btn { width: 100%; padding-inline: 12px; }
  .hero-panel { width: 100%; padding: 16px; overflow: hidden; text-align: center; justify-items: center; }
  .hero-panel p { width: min(292px, 100%); overflow-wrap: anywhere; }
  .hero-panel img { width: 72px; height: 72px; }
}

@media print {
  body { background: white; }
  .no-print, .app-header, .invoice-actions { display: none !important; }
  .invoice-workspace { width: 100%; margin: 0; }
  .invoice-sheet { box-shadow: none; border: 0; }
  .table-scroll { overflow: visible; }
}

/* Modern visual pass */
:root {
  --ink: #19141d;
  --muted: #7b6d78;
  --line: rgba(244, 95, 122, .18);
  --paper: rgba(255, 255, 255, .76);
  --brand: #ff5878;
  --brand-2: #ff947f;
  --brand-dark: #d72f59;
  --night: #201722;
  --night-2: #372532;
  --shadow: 0 30px 90px rgba(215, 47, 89, .20);
  --shadow-soft: 0 18px 60px rgba(39, 25, 36, .10);
}

body {
  background:
    linear-gradient(180deg, #fff7f8 0%, #fff 46%, #fff7f9 100%);
}

body::before {
  display: none;
}

.topbar, .app-header {
  min-height: 76px;
  background: rgba(255, 255, 255, .72);
  border-color: rgba(255, 255, 255, .82);
  box-shadow: 0 18px 54px rgba(32, 23, 34, .09);
}

.topbar::after, .app-header::after {
  content: "";
  position: absolute;
  inset-inline: 20px;
  bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 88, 120, .72), transparent);
}

.hero {
  --mx: 58%;
  --my: 42%;
  min-height: min(760px, calc(100svh - 112px));
  grid-template-columns: minmax(330px, 410px) minmax(0, 1fr);
  padding: clamp(34px, 5vw, 76px);
  background:
    radial-gradient(circle at var(--mx) var(--my), rgba(255, 148, 127, .42), transparent 26%),
    linear-gradient(135deg, rgba(36, 22, 35, .98), rgba(113, 45, 65, .96) 48%, rgba(255, 95, 123, .88)),
    url("logo.png") left 7% bottom -22px / min(470px, 42vw) no-repeat;
  box-shadow: 0 42px 120px rgba(58, 27, 43, .28);
}

.hero::before {
  background:
    linear-gradient(90deg, rgba(255,255,255,.06), transparent 35%, rgba(255,255,255,.10)),
    repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 1px, transparent 1px 22px);
  opacity: .8;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: 8px;
  pointer-events: none;
}

.topbar,
.app-header,
.hero,
.hero-copy,
.hero-panel,
.auth-page .auth-card {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.hero::before {
  z-index: 0;
  opacity: .38;
}

.hero::after,
.hero-glow {
  z-index: 0;
}

.hero-copy,
.hero-panel {
  z-index: 2;
}

.hero-glow {
  position: absolute;
  inset-inline: 8%;
  top: 13%;
  height: 42%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.16), transparent);
  transform: rotate(-8deg);
  filter: blur(18px);
  opacity: .72;
  animation: panelDrift 7s ease-in-out infinite;
}

@keyframes panelDrift {
  0%, 100% { transform: translateY(0) rotate(-8deg); }
  50% { transform: translateY(18px) rotate(-5deg); }
}

.hero-copy {
  max-width: 760px;
}

.hero .eyebrow {
  width: fit-content;
  padding: 7px 12px;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.10);
  color: #ffe4ea;
  backdrop-filter: blur(14px);
}

.hero h1 {
  margin-top: 18px;
  font-size: clamp(3rem, 6.5vw, 6.7rem);
  text-shadow: 0 18px 50px rgba(0,0,0,.18);
}

.hero .lead {
  max-width: 720px;
  color: rgba(255,255,255,.82);
}

.workflow-board {
  width: min(100%, 405px);
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,238,242,.72));
  border: 1px solid rgba(255,255,255,.9);
}

.board-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.board-head img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.board-head strong, .board-head span {
  display: block;
}

.board-head span {
  color: var(--muted);
  direction: ltr;
  text-align: right;
  font-size: .88rem;
}

.file-stack {
  display: grid;
  gap: 10px;
  margin: 16px 0;
}

.clinic-highlights {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin: 16px 0;
}

.clinic-highlights span {
  display: block;
  padding: 12px;
  border: 1px solid rgba(255, 88, 120, .16);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 28px rgba(33,20,30,.06);
  color: #3b2b38;
  font-weight: 900;
}

.file-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 88, 120, .16);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  box-shadow: 0 10px 28px rgba(33,20,30,.06);
  animation: filePulse 4s ease-in-out infinite;
}

.file-row:nth-child(2) { animation-delay: .35s; }
.file-row:nth-child(3) { animation-delay: .7s; }

.file-row span {
  direction: ltr;
  text-align: left;
  color: #3b2b38;
  font-weight: 800;
}

.file-row b {
  color: var(--brand-dark);
  white-space: nowrap;
}

.file-row.active {
  background: linear-gradient(135deg, rgba(255, 88, 120, .12), rgba(255,255,255,.84));
  border-color: rgba(255, 88, 120, .36);
}

@keyframes filePulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}

.board-contact {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding-top: 12px;
  border-top: 1px solid rgba(255, 88, 120, .16);
}

.board-contact span {
  color: var(--muted);
  font-weight: 800;
}

.board-contact a {
  direction: ltr;
  color: var(--brand-dark);
  font-weight: 900;
}

.section, .split-section, .contact-band, .auth-card, .panel, .dash-hero, .invoice-sheet {
  box-shadow: var(--shadow-soft);
}

.js-ready .section,
.js-ready .split-section,
.js-ready .contact-band,
.js-ready .panel,
.js-ready .dash-hero,
.js-ready .invoice-sheet,
.js-ready .auth-card {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity .62s ease, transform .62s ease;
}

.js-ready .section.is-visible,
.js-ready .split-section.is-visible,
.js-ready .contact-band.is-visible,
.js-ready .panel.is-visible,
.js-ready .dash-hero.is-visible,
.js-ready .invoice-sheet.is-visible,
.js-ready .auth-card.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.service-grid article {
  position: relative;
  overflow: hidden;
}

.service-grid article::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,88,120,.10), transparent 45%);
  opacity: 0;
  transition: opacity .24s ease;
}

.service-grid article:hover::before {
  opacity: 1;
}

.auth-card, .panel, .dash-hero {
  background:
    linear-gradient(180deg, rgba(255,255,255,.88), rgba(255,246,248,.72));
  border-color: rgba(255,255,255,.88);
}

@media (max-width: 820px) {
  .hero {
    grid-template-columns: 1fr;
    background-size: 410px;
    background-position: center bottom -20px;
  }
  .hero-copy {
    text-align: center;
    justify-self: center;
  }
  .hero .eyebrow {
    margin-inline: auto;
  }
  .workflow-board {
    justify-self: center;
  }
}

/* Smoothness/performance overrides */
.topbar,
.app-header,
.hero-panel,
.section,
.split-section,
.contact-band,
.auth-card,
.panel,
.dash-hero {
  backdrop-filter: none !important;
}

.hero-glow,
.hero-orbit {
  display: none !important;
}

.brand img,
.auth-card img,
.hero-panel img {
  animation: none !important;
}

.js-ready .section,
.js-ready .split-section,
.js-ready .contact-band,
.js-ready .panel,
.js-ready .dash-hero,
.js-ready .invoice-sheet,
.js-ready .auth-card {
  opacity: 1;
  transform: none;
  transition: none;
}

.section,
.split-section,
.contact-band,
.panel,
.dash-hero,
.invoice-sheet,
.auth-card,
.service-grid article,
.dashboard-actions a,
.dashboard-stats article,
.blog-grid article {
  will-change: transform;
}

.hero,
.section,
.split-section,
.contact-band,
.panel,
.dash-hero,
.invoice-sheet,
.auth-card {
  content-visibility: visible;
  contain-intrinsic-size: auto;
}

.hero {
  content-visibility: visible;
}

body {
  background-attachment: scroll !important;
}

.site-home .topbar {
  position: static;
}

.hero,
.topbar,
.app-header,
.section,
.split-section,
.contact-band,
.panel,
.dash-hero,
.invoice-sheet,
.auth-card,
.blog-grid article,
.dashboard-actions a,
.dashboard-stats article {
  box-shadow: 0 12px 32px rgba(55, 25, 42, .08) !important;
}

.hero {
  transform: translateZ(0);
  background-repeat: no-repeat;
  background-size: auto, auto, min(390px, 38vw);
  background-position: center, center, left 7% bottom -22px;
}

.hero-metrics span {
  backdrop-filter: none !important;
}

@media (max-width: 820px) {
  .hero {
    background-size: auto, auto, 340px;
    background-position: center, center, center bottom -18px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .btn,
  .service-grid article,
  .dashboard-actions a,
  .dashboard-stats article,
  .blog-grid article,
  .clinic-highlights span,
  .panel {
    transition-duration: .18s;
  }
}

/* Polished interaction layer */
.hero {
  perspective: 1200px;
}

.hero-copy {
  padding-block: 12px;
}

.hero h1 {
  letter-spacing: 0;
  background: linear-gradient(180deg, #fff, #ffe6eb 78%, #ffd0da);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero .lead {
  font-weight: 500;
}

.hero-metrics {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 22px;
}

.hero-metrics span {
  min-width: 126px;
  padding: 11px 13px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.10);
  backdrop-filter: blur(14px);
  color: rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.12);
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

.hero-metrics span:hover {
  transform: translateY(-4px);
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.34);
}

.hero-metrics b {
  display: block;
  color: #fff;
  font-size: 1.05rem;
  line-height: 1.35;
}

.clinic-card {
  transform-style: preserve-3d;
  transition: transform .28s ease, box-shadow .28s ease;
}

.clinic-card:hover {
  transform: rotateY(-3deg) rotateX(2deg) translateY(-5px) !important;
  box-shadow: 0 38px 90px rgba(32, 23, 34, .20);
}

.clinic-highlights span {
  position: relative;
  overflow: hidden;
  transition: transform .22s ease, border-color .22s ease, background .22s ease;
}

.clinic-highlights span::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 88, 120, .12), transparent);
  transform: translateX(120%);
  transition: transform .65s ease;
}

.clinic-highlights span:hover {
  transform: translateX(-4px);
  border-color: rgba(255,88,120,.34);
  background: rgba(255,255,255,.92);
}

.clinic-highlights span:hover::after {
  transform: translateX(-120%);
}

.service-grid article {
  isolation: isolate;
}

.service-grid article span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,88,120,.16), rgba(255,148,127,.12));
}

.service-grid article h3,
.service-grid article p,
.service-grid article span {
  position: relative;
  z-index: 1;
}

.service-grid article i {
  position: absolute;
  width: 150px;
  height: 150px;
  left: -48px;
  bottom: -64px;
  border: 1px solid rgba(255,88,120,.14);
  border-radius: 40%;
  transform: rotate(18deg);
  transition: transform .35s ease, opacity .35s ease;
  opacity: .55;
}

.service-grid article:hover i {
  transform: rotate(42deg) scale(1.08);
  opacity: .85;
}

.clinic-note {
  position: relative;
  overflow: hidden;
}

.clinic-note::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255,88,120,.10), transparent 52%);
  pointer-events: none;
}

.clinic-note strong,
.clinic-note p,
.note-lines {
  position: relative;
  z-index: 1;
}

.note-lines {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.note-lines span {
  display: block;
  height: 8px;
  border-radius: 8px;
  background: linear-gradient(90deg, rgba(255,88,120,.26), rgba(255,148,127,.10));
}

.note-lines span:nth-child(2) { width: 74%; }
.note-lines span:nth-child(3) { width: 48%; }

.contact-band {
  position: relative;
  overflow: hidden;
}

.contact-band::after {
  content: "";
  position: absolute;
  inset: auto -10% -42px auto;
  width: 42%;
  height: 110px;
  background: linear-gradient(90deg, rgba(255,88,120,.16), rgba(255,148,127,.06));
  transform: rotate(-8deg);
  pointer-events: none;
}

.contact-band > * {
  position: relative;
  z-index: 1;
}

.blog-shell {
  width: min(1180px, calc(100vw - 32px));
  margin: 20px auto 44px;
  display: grid;
  gap: 24px;
}

.blog-hero h1,
.article-page h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.4rem);
  line-height: 1.35;
}

.blog-hero p:last-child,
.article-excerpt {
  max-width: 760px;
  color: var(--muted);
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.blog-grid article {
  min-height: 250px;
  display: grid;
  align-content: start;
  gap: 10px;
  padding: 20px;
  border: 1px solid rgba(244,95,122,.16);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255,255,255,.92), rgba(255,246,248,.78));
  box-shadow: var(--shadow-soft);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}

.blog-grid article:hover {
  transform: translateY(-5px);
  border-color: rgba(244,95,122,.38);
  box-shadow: var(--shadow);
}

.blog-grid article > span {
  color: var(--brand-dark);
  font-weight: 900;
  font-size: .88rem;
}

.blog-grid h2,
.blog-grid h3 {
  margin: 0;
  line-height: 1.45;
}

.blog-grid p {
  margin: 0;
  color: var(--muted);
}

.article-page {
  max-width: 880px;
  margin-inline: auto;
}

.article-page > p:not(.eyebrow) {
  color: #4f4450;
  font-size: 1.04rem;
}

.article-source {
  margin-top: 24px;
  padding: 14px 16px;
  border: 1px solid rgba(244,95,122,.16);
  border-radius: 8px;
  background: rgba(255,255,255,.72);
  color: var(--muted);
}

.article-source a {
  color: var(--brand-dark);
  font-weight: 900;
}

@media (max-width: 820px) {
  .hero-metrics {
    justify-content: center;
  }
  .blog-grid {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 520px) {
  .hero-metrics {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .hero {
    padding: 26px 18px;
  }
  .hero h1 {
    font-size: clamp(2.05rem, 9.4vw, 2.55rem);
    max-width: 310px;
    margin-inline: auto;
  }
  .hero .lead {
    width: min(310px, 100%);
  }
  .file-row {
    display: grid;
  }
  .file-row span, .file-row b {
    text-align: center;
  }
  .board-contact {
    display: grid;
    justify-items: center;
  }
  .hub-grid {
    grid-template-columns: 1fr;
  }
  .dashboard-stats,
  .dashboard-actions,
  .dashboard-columns,
  .blog-grid {
    grid-template-columns: 1fr;
  }
}

/* Full-screen public homepage redesign */
.site-home {
  --home-ink: #20171f;
  --home-muted: #71636e;
  --home-rose: #ee5977;
  --home-rose-dark: #c53258;
  --home-peach: #ff967f;
  --home-cream: #fff8f9;
  background: #fff;
}

.site-home .topbar {
  width: min(1240px, calc(100vw - 34px));
  min-height: 78px;
  margin: 18px auto 0;
  padding: 12px 14px 12px 18px;
  position: fixed;
  inset: 0 auto auto 50%;
  transform: translateX(-50%) !important;
  z-index: 50;
  background: rgba(255,255,255,.86);
  border: 1px solid rgba(255,255,255,.92);
  box-shadow: 0 16px 44px rgba(32,23,31,.12) !important;
  flex-direction: row;
  animation: homeNavDrop .55s ease both;
}

.site-home .topbar .brand {
  color: var(--home-ink);
  flex: 0 0 auto;
  min-width: max-content;
  max-width: none;
  white-space: nowrap;
}

.site-home .topbar .brand span {
  display: block;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: clamp(.9rem, 1.25vw, 1rem);
}

.site-home .topbar nav {
  align-items: center;
  margin-inline-start: auto;
}

.site-home .topbar nav a {
  color: #4d414b;
  font-weight: 900;
  position: relative;
}

.site-home .topbar nav a::after {
  content: "";
  position: absolute;
  inset: auto 12px 4px;
  height: 2px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--home-rose), var(--home-peach));
  transform: scaleX(0);
  transform-origin: right;
  transition: transform .22s ease;
}

.site-home .topbar nav a:hover::after {
  transform: scaleX(1);
}

.site-nav-toggle {
  display: none;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid rgba(238,89,119,.22);
  border-radius: 8px;
  background: rgba(255,255,255,.86);
  color: var(--home-rose-dark);
  font-weight: 900;
  cursor: pointer;
}

.site-home .hero {
  width: 100%;
  min-height: 100svh;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr;
  grid-template-areas: "stack";
  border-radius: 0;
  box-shadow: none !important;
  background: #20171f;
  overflow: hidden;
}

.site-home .hero::before,
.site-home .hero::after {
  display: none;
}

.hero-media,
.hero-shade,
.hero-inner {
  grid-area: stack;
}

.hero-media {
  position: relative;
  z-index: 0;
}

.hero-media img {
  width: 100%;
  height: 100%;
  min-height: 100svh;
  object-fit: cover;
  object-position: center;
  display: block;
  transform: scale(1.04);
  transition: transform .7s ease;
}

.hero-shade {
  position: relative;
  z-index: 1;
  background:
    radial-gradient(circle at var(--mx, 23%) var(--my, 54%), rgba(255,126,146,.18), transparent 28%),
    radial-gradient(circle at 23% 54%, rgba(16,9,18,.30), transparent 32%),
    linear-gradient(90deg, rgba(18,10,18,.50), rgba(48,25,40,.26) 44%, rgba(255,255,255,.10)),
    linear-gradient(0deg, rgba(20,14,20,.28), transparent 46%);
  transition: background-position .2s ease;
}

.site-home .hero-copy > * {
  animation: heroReveal .72s cubic-bezier(.2,.78,.22,1) both;
}

.site-home .hero-copy h1 { animation-delay: .08s; }
.site-home .hero-copy .lead { animation-delay: .18s; }
.site-home .hero-copy .hero-actions { animation-delay: .28s; }
.site-home .hero-copy .hero-metrics { animation-delay: .38s; }

.hero-inner {
  position: relative;
  z-index: 2;
  width: min(1240px, calc(100vw - 34px));
  min-height: 100svh;
  margin: 0 auto;
  padding: 132px 0 56px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 5vw, 70px);
}

.site-home .hero-copy {
  justify-self: start;
  width: min(840px, 100%);
  max-width: 840px;
  padding: clamp(22px, 4vw, 34px);
  border: 1px solid rgba(255,255,255,.20);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(30,18,30,.86), rgba(72,37,56,.66));
  box-shadow: 0 30px 90px rgba(22,10,20,.30);
  text-align: right;
}

.site-home .hero .eyebrow {
  margin: 0;
  padding: 8px 13px;
  width: fit-content;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.25);
  color: #ffe1e8;
}

.site-home .hero h1 {
  margin: 18px 0 0;
  font-size: clamp(2.45rem, 4.25vw, 5.05rem);
  line-height: 1.05;
  white-space: nowrap;
  overflow-wrap: normal;
  word-break: keep-all;
  text-shadow: 0 20px 55px rgba(0,0,0,.28);
  background: none;
  color: #fff;
}

.site-home .hero .lead {
  max-width: 640px;
  margin-top: 24px;
  color: rgba(255,255,255,.90);
  font-size: clamp(1rem, 1.55vw, 1.28rem);
  text-shadow: 0 10px 28px rgba(0,0,0,.30);
}

.site-home .hero-actions {
  gap: 12px;
  align-items: center;
}

.site-home .btn {
  min-height: 52px;
  padding-inline: 24px;
}

.site-home .hero .btn.primary,
.site-home .btn.primary {
  background: linear-gradient(135deg, var(--home-rose), var(--home-peach));
  color: #fff;
}

.site-home .hero .btn.ghost,
.site-home .btn.ghost {
  background: rgba(255,255,255,.14);
  color: #fff;
  border-color: rgba(255,255,255,.36);
}

.site-home .contact-section .btn.ghost {
  background: #fff;
  color: var(--home-rose-dark);
  border-color: rgba(238,89,119,.22);
}

.site-home .hero-metrics {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.site-home .hero-metrics span {
  min-width: 0;
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.22);
  color: rgba(255,255,255,.76);
  transition: transform .22s ease, background .22s ease, border-color .22s ease;
}

.site-home .hero-metrics span:hover {
  transform: translateY(-5px);
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.36);
}

.site-home .hero:hover .hero-media img {
  transform: scale(1.055);
}

.site-home .hero-panel {
  display: none !important;
  width: 100%;
  align-self: end;
  margin-bottom: clamp(18px, 5vh, 70px);
  grid-template-columns: 70px 1fr;
  gap: 14px;
  align-items: center;
  padding: 18px;
  background: rgba(255,255,255,.88);
  border: 1px solid rgba(255,255,255,.94);
  color: var(--home-ink);
}

.site-home .hero-panel img {
  width: 70px;
  height: 70px;
  object-fit: contain;
}

.site-home .hero-panel strong,
.site-home .hero-panel span,
.site-home .hero-panel small {
  display: block;
}

.site-home .hero-panel span {
  direction: ltr;
  text-align: right;
  color: var(--home-rose-dark);
  font-weight: 900;
}

.site-home .hero-panel small {
  grid-column: 1 / -1;
  color: var(--home-muted);
  font-size: .9rem;
}

.cta-box,
.feature-section,
.process-section,
.testimonial-band,
.contact-section {
  width: min(1240px, calc(100vw - 34px));
  margin: 0 auto;
}

.cta-box {
  min-height: 132px;
  margin-top: -54px;
  position: relative;
  z-index: 5;
  display: grid;
  grid-template-columns: 1fr 1fr auto;
  gap: 14px;
  align-items: center;
  padding: 18px;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 22px 68px rgba(32,23,31,.14);
  transition: transform .24s ease, box-shadow .24s ease;
}

.cta-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 28px 78px rgba(32,23,31,.16);
}

.cta-box article {
  padding: 14px 18px;
  border-inline-start: 1px solid rgba(238,89,119,.18);
}

.cta-box span {
  display: block;
  color: var(--home-muted);
  font-weight: 800;
}

.cta-box strong {
  display: block;
  color: var(--home-ink);
  font-size: clamp(1rem, 1.5vw, 1.25rem);
}

.feature-section {
  padding: clamp(70px, 9vw, 118px) 0 clamp(42px, 7vw, 88px);
  display: grid;
  grid-template-columns: minmax(300px, 1fr) minmax(0, 1fr);
  gap: clamp(32px, 6vw, 82px);
  align-items: center;
}

.image-collage {
  position: sticky;
  top: 112px;
  min-height: 560px;
}

.image-collage img {
  display: block;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 24px 70px rgba(32,23,31,.14);
  transition: transform .42s ease, box-shadow .42s ease;
}

.image-collage:hover .collage-main {
  transform: translateY(-8px) scale(1.015);
  box-shadow: 0 32px 86px rgba(32,23,31,.18);
}

.image-collage:hover .collage-float {
  transform: translateY(8px) scale(1.025);
}

.collage-main {
  width: 78%;
  height: 520px;
}

.collage-float {
  width: 46%;
  height: 290px;
  position: absolute;
  left: 0;
  bottom: 0;
  border: 10px solid #fff;
}

.experience-badge {
  position: absolute;
  right: 18px;
  bottom: 34px;
  width: min(235px, 56%);
  padding: 18px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--home-rose), var(--home-peach));
  color: #fff;
  box-shadow: 0 18px 48px rgba(238,89,119,.25);
}

.experience-badge strong,
.experience-badge span {
  display: block;
}

.feature-copy h2,
.services-section h2,
.process-section h2,
.testimonial-band h2,
.contact-section h2 {
  color: var(--home-ink);
}

.feature-copy h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 4rem);
  line-height: 1.18;
}

.feature-copy p {
  color: var(--home-muted);
}

.tick-list {
  display: grid;
  gap: 12px;
  margin: 22px 0 0;
  padding: 0;
  list-style: none;
}

.tick-list li {
  padding: 13px 16px;
  border-radius: 8px;
  background: #fff7f9;
  color: #3c303a;
  font-weight: 900;
}

.tick-list li::before {
  content: "";
  display: inline-block;
  width: 9px;
  height: 9px;
  margin-left: 10px;
  border-radius: 99px;
  background: var(--home-rose);
}

.site-home .section {
  width: min(1240px, calc(100vw - 34px));
  margin-top: 0;
  padding: clamp(56px, 8vw, 92px) 0;
  background: transparent;
  border: 0;
  box-shadow: none !important;
}

.section-head.centered {
  display: grid;
  justify-items: center;
  text-align: center;
  max-width: 780px;
  margin-inline: auto;
}

.section-head.centered p:last-child {
  margin: 0;
  color: var(--home-muted);
}

.site-home .service-grid {
  grid-template-columns: repeat(4, 1fr);
  margin-top: 34px;
}

.site-home .service-grid article {
  min-height: 265px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(32,23,31,.08);
  transform-style: preserve-3d;
  position: relative;
  overflow: hidden;
}

.site-home .service-grid article:hover {
  transform: translateY(-9px) rotateX(1.2deg);
}

.site-home .service-grid article::after,
.testimonial-grid article::after,
.site-home .blog-grid article::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.58), transparent 62%);
  transform: translateX(110%);
  transition: transform .62s ease;
  pointer-events: none;
}

.site-home .service-grid article:hover::after,
.testimonial-grid article:hover::after,
.site-home .blog-grid article:hover::after {
  transform: translateX(-110%);
}

.process-grid article,
.testimonial-grid article,
.site-home .blog-grid article,
.cta-box,
.tick-list li {
  transition: transform .24s ease, box-shadow .24s ease, border-color .24s ease;
}

.testimonial-grid article,
.site-home .blog-grid article {
  position: relative;
  overflow: hidden;
}

.process-grid article:hover,
.testimonial-grid article:hover,
.site-home .blog-grid article:hover,
.tick-list li:hover {
  transform: translateY(-7px);
  box-shadow: 0 22px 58px rgba(32,23,31,.12);
  border-color: rgba(238,89,119,.28);
}

.process-section {
  padding: clamp(48px, 7vw, 86px);
  border-radius: 8px;
  background: linear-gradient(135deg, #241722, #4b2638 54%, #d94d70);
  color: #fff;
}

.process-section .section-head {
  align-items: center;
}

.process-section h2,
.process-section .eyebrow {
  color: #fff;
}

.process-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 24px;
}

.process-grid article {
  min-height: 220px;
  padding: 22px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.10);
}

.process-grid b {
  color: #ffdce5;
  font-size: 2rem;
}

.process-grid p {
  color: rgba(255,255,255,.78);
}

.testimonial-band {
  padding: clamp(58px, 8vw, 98px) 0;
}

.testimonial-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 30px;
}

.testimonial-grid article,
.site-home .blog-grid article {
  padding: 24px;
  border: 1px solid rgba(238,89,119,.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 16px 44px rgba(32,23,31,.08);
}

.testimonial-grid p {
  margin-top: 0;
  color: var(--home-muted);
}

.testimonial-grid strong {
  color: var(--home-rose-dark);
}

.contact-section {
  padding: clamp(28px, 6vw, 58px);
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: 18px;
  border-radius: 8px;
  background: #fff7f9;
  box-shadow: 0 18px 56px rgba(32,23,31,.08);
}

.contact-card {
  padding: clamp(18px, 4vw, 34px);
}

.contact-list {
  display: grid;
  gap: 12px;
  margin: 20px 0;
  color: var(--home-muted);
}

.contact-list a {
  direction: ltr;
  text-align: right;
  color: var(--home-rose-dark);
  font-size: 1.25rem;
  font-weight: 900;
}

.map-card {
  min-height: 410px;
  border-radius: 8px;
  overflow: hidden;
  position: relative;
  isolation: isolate;
  background:
    linear-gradient(135deg, rgba(238,89,119,.10), transparent 34%),
    linear-gradient(315deg, rgba(255,150,127,.13), transparent 38%),
    #fff;
  border: 1px solid rgba(238,89,119,.14);
}

.map-card::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(238,89,119,.08));
}

.map-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  min-height: 410px;
  background:
    radial-gradient(circle at 62% 46%, rgba(238,89,119,.22), transparent 8%),
    linear-gradient(135deg, rgba(255,255,255,.84), rgba(255,244,247,.90));
}

.map-canvas::before {
  content: "";
  position: absolute;
  inset: -12%;
  background-image:
    linear-gradient(rgba(238,89,119,.12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(238,89,119,.10) 1px, transparent 1px);
  background-size: 54px 54px;
  transform: rotate(-9deg);
}

.map-canvas.map-ready::before {
  display: none;
}

.map-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  color: var(--home-rose-dark);
  font-weight: 900;
}

.map-canvas.map-ready .map-loading {
  display: none;
}

.clinic-map-marker {
  width: 34px;
  height: 34px;
  border: 4px solid #fff;
  border-radius: 50% 50% 50% 0;
  background: linear-gradient(135deg, var(--home-rose), var(--home-peach));
  box-shadow: 0 14px 34px rgba(238,89,119,.34);
  transform: rotate(-45deg);
}

.clinic-map-marker::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: #fff;
}

.map-overlay {
  position: absolute;
  inset: auto 16px 16px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 12px;
  align-items: center;
  padding: 14px;
  border-radius: 8px;
  background: rgba(255,255,255,.94);
  box-shadow: 0 18px 46px rgba(32,23,31,.14);
}

.map-pin {
  width: 46px;
  height: 46px;
  border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg);
  background: linear-gradient(135deg, var(--home-rose), var(--home-peach));
  box-shadow: 0 18px 44px rgba(238,89,119,.28);
  animation: pinFloat 2.8s ease-in-out infinite;
}

.map-pin::after {
  content: "";
  position: absolute;
  inset: 15px;
  border-radius: 999px;
  background: #fff;
}

.map-card h3,
.map-card p {
  margin: 0;
}

.map-card p:not(.eyebrow) {
  color: var(--home-muted);
}

.map-actions {
  grid-column: 1 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.map-card .btn.ghost {
  background: #fff;
  color: var(--home-rose-dark);
  border-color: rgba(238,89,119,.22);
}

.site-home .footer {
  width: min(1240px, calc(100vw - 34px));
}

@media (prefers-reduced-motion: no-preference) {
  @keyframes heroReveal {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: translateY(0); }
  }

  @keyframes homeNavDrop {
    from { opacity: 0; }
    to { opacity: 1; }
  }

  @keyframes pinFloat {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -7px; }
  }

  @keyframes gentlePulse {
    0%, 100% { transform: translateY(0) scale(1); }
    50% { transform: translateY(-3px) scale(1.01); }
  }

  .js-ready .site-home .cta-box,
  .js-ready .site-home .feature-section,
  .js-ready .site-home .feature-copy,
  .js-ready .site-home .image-collage,
  .js-ready .site-home .process-section,
  .js-ready .site-home .testimonial-band,
  .js-ready .site-home .contact-section,
  .js-ready .site-home .map-card,
  .js-ready .site-home .service-grid article,
  .js-ready .site-home .process-grid article,
  .js-ready .site-home .testimonial-grid article,
  .js-ready .site-home .blog-grid article,
  .js-ready .site-home .tick-list li {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity .62s cubic-bezier(.2,.78,.22,1), transform .62s cubic-bezier(.2,.78,.22,1), box-shadow .24s ease, border-color .24s ease;
  }

  .js-ready .site-home .cta-box.is-visible,
  .js-ready .site-home .feature-section.is-visible,
  .js-ready .site-home .feature-copy.is-visible,
  .js-ready .site-home .image-collage.is-visible,
  .js-ready .site-home .process-section.is-visible,
  .js-ready .site-home .testimonial-band.is-visible,
  .js-ready .site-home .contact-section.is-visible,
  .js-ready .site-home .contact-section:target,
  .js-ready .site-home .contact-section:target .map-card,
  .js-ready .site-home .map-card.is-visible,
  .js-ready .site-home .service-grid article.is-visible,
  .js-ready .site-home .process-grid article.is-visible,
  .js-ready .site-home .testimonial-grid article.is-visible,
  .js-ready .site-home .blog-grid article.is-visible,
  .js-ready .site-home .tick-list li.is-visible {
    opacity: 1;
    transform: translateY(0);
  }

  .js-ready .site-home .service-grid article:nth-child(2),
  .js-ready .site-home .process-grid article:nth-child(2),
  .js-ready .site-home .testimonial-grid article:nth-child(2),
  .js-ready .site-home .blog-grid article:nth-child(2),
  .js-ready .site-home .tick-list li:nth-child(2) {
    transition-delay: .07s;
  }

  .js-ready .site-home .service-grid article:nth-child(3),
  .js-ready .site-home .process-grid article:nth-child(3),
  .js-ready .site-home .testimonial-grid article:nth-child(3),
  .js-ready .site-home .blog-grid article:nth-child(3),
  .js-ready .site-home .tick-list li:nth-child(3) {
    transition-delay: .14s;
  }

  .js-ready .site-home .service-grid article:nth-child(4) {
    transition-delay: .21s;
  }

  .site-home .cta-box .btn,
  .site-home .map-pin {
    animation: gentlePulse 4.8s ease-in-out infinite;
  }
}

@media (max-width: 980px) {
  .site-home .topbar .brand {
    flex: 0 0 auto;
    min-width: max-content;
  }
  .site-home .topbar .brand span {
    font-size: .9rem;
  }
  .hero-inner {
    grid-template-columns: 1fr;
    align-items: end;
  }
  .site-home .hero-panel {
    max-width: 460px;
    margin-bottom: 0;
  }
  .site-home .service-grid,
  .process-grid,
  .testimonial-grid,
  .contact-section,
  .feature-section {
    grid-template-columns: 1fr 1fr;
  }
  .contact-section,
  .feature-section {
    grid-template-columns: 1fr;
  }
  .image-collage {
    position: relative;
    top: auto;
  }
}

@media (max-width: 720px) {
  .site-home .topbar {
    width: calc(100vw - 24px);
    min-height: 68px;
    margin-top: 12px;
    inset: 0 auto auto 50%;
    align-items: center;
    flex-direction: row;
  }
  .site-home .topbar .brand {
    width: auto;
    flex: 1 1 auto;
    justify-content: flex-start;
    min-width: 0;
  }
  .site-home .topbar .brand span {
    display: none;
    line-height: 1.45;
    max-width: 170px;
    overflow: hidden;
  }
  .site-home .topbar .brand img {
    display: none;
  }
  .site-home .topbar::before {
    content: "دکتر غفاری";
    position: absolute;
    inset-inline: 82px;
    text-align: center;
    color: var(--home-ink);
    font-weight: 900;
    pointer-events: none;
  }
  .site-nav-toggle {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
  }
  .site-home .topbar nav {
    position: absolute;
    inset: calc(100% + 8px) 0 auto;
    display: grid;
    gap: 4px;
    padding: 10px;
    border-radius: 8px;
    background: transparent;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-8px);
    transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
  }
  .site-nav-open .topbar nav {
    background: rgba(255,255,255,.96);
    box-shadow: 0 16px 42px rgba(32,23,31,.14);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
  }
  .hero-inner {
    width: calc(100vw - 28px);
    padding-top: 116px;
    padding-bottom: 32px;
  }
  .site-home .hero-copy {
    text-align: center;
    justify-self: center;
    padding: 20px 16px;
    width: min(100%, 370px);
  }
  .site-home .hero .eyebrow {
    margin-inline: auto;
  }
  .site-home .hero h1 {
    font-size: clamp(1.7rem, 7.5vw, 2.45rem);
    line-height: 1.08;
    max-width: none;
    margin-inline: auto;
  }
  .site-home .hero .lead {
    margin-inline: auto;
  }
  .site-home .hero-actions,
  .site-home .hero-metrics {
    display: grid;
    grid-template-columns: 1fr;
  }
  .site-home .hero-metrics {
    display: none;
  }
  .site-home .hero-panel {
    max-width: none;
  }
  .cta-box {
    width: calc(100vw - 28px);
    grid-template-columns: 1fr;
    margin-top: 14px;
  }
  .cta-box article {
    border-inline-start: 0;
    border-bottom: 1px solid rgba(238,89,119,.14);
  }
  .site-home .service-grid,
  .process-grid,
  .testimonial-grid {
    grid-template-columns: 1fr;
  }
  .collage-main {
    width: 100%;
    height: 390px;
  }
  .collage-float {
    position: relative;
    width: 72%;
    height: 220px;
    margin-top: -70px;
  }
  .image-collage {
    min-height: auto;
  }
  .experience-badge {
    right: 12px;
    bottom: 20px;
  }
  .contact-section {
    width: calc(100vw - 28px);
    padding: 16px;
  }
  .map-overlay {
    position: static;
    margin: 0;
    border-radius: 0;
  }
}

.site-home .feature-section,
.site-home .services-section,
.site-home .process-section,
.site-home .testimonial-band,
.site-home .blog-preview {
  content-visibility: auto;
  contain-intrinsic-size: 720px;
}
