@font-face {
  font-family: "DM Sans";
  src: url("assets/dm-sans.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/instrument-serif.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Instrument Serif";
  src: url("assets/instrument-serif-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Vazirmatn;
  src: url("assets/vazirmatn-arabic.woff2") format("woff2");
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-08FF, U+200C-200F, U+FB50-FDFF, U+FE70-FEFF;
}

:root {
  color-scheme: light;
  --paper: #faf8f0;
  --ink: #19392f;
  --muted: #52635b;
  --green: #235b46;
  --green-dark: #153d32;
  --rule: #d9e1d6;
  --white: #fffef9;
  --mint: #dcebcf;
  --sans: "DM Sans", system-ui, sans-serif;
  --display: "Instrument Serif", Georgia, serif;
  --shell: min(100% - 96px, 1224px);
  --header-height: 74px;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.58;
  scroll-behavior: smooth;
}

:root[dir="rtl"] {
  --sans: Vazirmatn, "DM Sans", system-ui, sans-serif;
  --display: var(--sans);
}

*, *::before, *::after { box-sizing: border-box; }
body, h1, h2, h3, p, figure, dl, dd { margin: 0; }
img { display: block; max-inline-size: 100%; }
a { color: inherit; text-decoration: none; }
button { color: inherit; font: inherit; }
[hidden] { display: none !important; }

:focus-visible {
  outline: 3px solid #287951;
  outline-offset: 4px;
}

section[id], main[id] { scroll-margin-block-start: var(--header-height); }
.shell { inline-size: var(--shell); margin-inline: auto; }

.skip-link {
  position: fixed;
  z-index: 5;
  inset-block-start: 9px;
  inset-inline-start: 9px;
  padding: 12px 18px;
  border-radius: 8px;
  transform: translateY(-150%);
  background: var(--white);
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); }

.site-header {
  position: sticky;
  z-index: 3;
  inset-block-start: 0;
  background: var(--paper);
  border-block-end: 1px solid #e3e5d9;
}

.header-row {
  min-block-size: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  flex: none;
  font-weight: 700;
  font-size: 1.65rem;
  line-height: 1;
  letter-spacing: -.055em;
}

[dir="rtl"] .brand { letter-spacing: 0; }

.brand-mark {
  display: grid;
  place-items: center;
  position: relative;
  inline-size: 36px;
  block-size: 36px;
  border-radius: 10px;
  background: var(--green);
  color: #fffef4;
}

.tooth-mark {
  display: block;
  position: relative;
  inline-size: 18px;
  block-size: 12px;
  margin-block-end: 4px;
  border-radius: 45% 45% 52% 52%;
  background: currentColor;
}

.tooth-mark::before, .tooth-mark::after {
  content: "";
  position: absolute;
  inset-block-start: 5px;
  inline-size: 7px;
  block-size: 14px;
  border-radius: 45% 45% 55% 55%;
  background: currentColor;
}

.tooth-mark::before { left: 1px; transform: rotate(-10deg); }
.tooth-mark::after { right: 1px; transform: rotate(10deg); }

.desktop-nav, .header-actions {
  display: flex;
  align-items: center;
  gap: clamp(16px, 2.5vw, 36px);
}

.desktop-nav a, .language-link, .back-link { font-weight: 600; font-size: .92rem; }
.desktop-nav a:hover, .language-link:hover, .back-link:hover { text-decoration: underline; text-underline-offset: .25em; }
.header-actions { gap: clamp(14px, 2vw, 26px); }
:lang(ar) .language-link, .language-link[lang="ar"] { font-family: Vazirmatn, var(--sans); }
.language-link { padding-block: 9px; }

.button, .text-link {
  display: inline-flex;
  min-block-size: 50px;
  align-items: center;
  justify-content: center;
  gap: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.button {
  padding: 12px 19px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: var(--green);
  color: var(--white);
  transition: background-color .16s ease;
}

.button:hover { background: #174734; }
.button-small { min-block-size: 42px; padding-inline: 14px; font-size: .9rem; }
.arrow { display: inline-block; flex: none; font-size: 1.15em; line-height: 1; }
[dir="rtl"] .arrow { transform: scaleX(-1); }
.text-link { color: var(--green); }
.text-link:hover { text-decoration: underline; text-underline-offset: .25em; }

.mobile-menu { display: none; position: relative; }
.mobile-menu summary, .questions summary { cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker, .questions summary::-webkit-details-marker { display: none; }
.mobile-menu summary {
  display: grid;
  place-items: center;
  inline-size: 42px;
  block-size: 42px;
  border: 1px solid var(--rule);
  border-radius: 8px;
}

.menu-icon {
  position: relative;
  display: block;
  inline-size: 18px;
  block-size: 12px;
  border-block: 2px solid currentColor;
}

.menu-icon::after {
  content: "";
  position: absolute;
  inset: 3px 0 auto;
  border-block-start: 2px solid currentColor;
}

.mobile-menu nav {
  position: absolute;
  inset-block-start: calc(100% + 10px);
  inset-inline-end: 0;
  min-inline-size: 186px;
  width: max-content;
  max-inline-size: min(275px, 80vw);
  padding: 7px;
  border: 1px solid var(--rule);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 12px 24px #153b3020;
}

.mobile-menu nav a { display: block; padding: 10px 12px; border-radius: 7px; font-weight: 600; }
.mobile-menu nav a:hover { background: #ebf2e7; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, .94fr) minmax(0, 1.06fr);
  align-items: center;
  gap: clamp(32px, 4.5vw, 72px);
  padding-block: clamp(52px, 6vw, 92px);
}

.hero-copy { padding-block: 14px; }
.category {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-block-end: clamp(13px, 1.5vw, 21px);
  color: var(--green);
  font-weight: 700;
  font-size: .79rem;
  letter-spacing: .085em;
  text-transform: uppercase;
}

.category::before { content: ""; inline-size: 20px; border-block-start: 1px solid; }
[dir="rtl"] .category { letter-spacing: 0; font-size: .95rem; }

h1, h2 { font-family: var(--display); font-weight: 400; }
h1 {
  font-size: clamp(3.5rem, 6.2vw, 6.1rem);
  line-height: .96;
  letter-spacing: -.038em;
}

h1 em { color: var(--green); }
h2 { font-size: clamp(2.85rem, 4.5vw, 4.45rem); line-height: 1; letter-spacing: -.024em; }
[dir="rtl"] h1, [dir="rtl"] h2 { font-weight: 700; letter-spacing: 0; line-height: 1.32; }
[dir="rtl"] h1 { font-size: clamp(2.35rem, 4.25vw, 4.3rem); }
[dir="rtl"] h1 em { font-style: normal; }
[dir="rtl"] h2 { font-size: clamp(2rem, 3.7vw, 3.45rem); }

.hero-description {
  max-inline-size: 37ch;
  margin-block: 23px 29px;
  color: var(--muted);
  font-size: clamp(1rem, 1.45vw, 1.225rem);
  line-height: 1.62;
}

[dir="rtl"] .hero-description { max-inline-size: 45ch; }
.hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 7px clamp(16px, 2vw, 24px); }

.hero-figure {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  background: #d8d8cc;
  isolation: isolate;
}

.hero-figure img {
  inline-size: 100%;
  block-size: auto;
  aspect-ratio: 1.22;
  object-fit: cover;
  object-position: 57% 42%;
}

.visit-card {
  display: flex;
  align-items: center;
  gap: 12px;
  position: absolute;
  inset-inline-start: clamp(12px, 2.2vw, 30px);
  inset-block-end: clamp(12px, 2.2vw, 30px);
  max-inline-size: calc(100% - 24px);
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 4px 18px #12251c1c;
}

.visit-icon {
  flex: none;
  position: relative;
  display: grid;
  place-items: center;
  inline-size: 42px;
  block-size: 42px;
  border-radius: 10px;
  color: var(--green);
  background: #e2eddd;
}

.visit-icon::before {
  content: "";
  inline-size: 19px;
  block-size: 16px;
  border: 1.5px solid;
  border-radius: 4px;
}

.visit-icon::after {
  content: "";
  position: absolute;
  inset-block-start: 18px;
  inline-size: 17px;
  border-block-start: 1.5px solid;
}

.visit-card strong, .visit-label, .visit-time { display: block; }
.visit-card strong { font-size: .99rem; line-height: 1.32; }
.visit-label, .visit-time { color: var(--muted); font-size: .76rem; }

.section { padding-block: clamp(58px, 7.25vw, 106px); }
.section-heading { display: grid; gap: 13px; margin-block-end: clamp(24px, 3vw, 38px); }
.section-heading p { max-inline-size: 60ch; font-size: 1.05rem; color: var(--muted); }

.workspace-section { color: #f8f8ed; background: var(--green-dark); }
.workspace-section .section-heading p { color: #cde1d2; }
.workspace-section :focus-visible, .contact-card :focus-visible { outline-color: #beeb9e; }
.workspace { display: grid; grid-template-columns: minmax(220px, .7fr) minmax(0, 1.65fr); gap: clamp(15px, 2.6vw, 35px); align-items: stretch; }
.workspace-tabs { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: center; }

.workspace-tab {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 11px;
  min-block-size: 68px;
  padding: 12px 15px;
  background: transparent;
  color: #f5f9f1;
  border: 1px solid #53756a;
  border-radius: 10px;
  text-align: start;
  cursor: pointer;
}

.workspace-tab strong { display: block; font-size: 1rem; line-height: 1.34; }
.tab-description { display: block; margin-block-start: 3px; font-size: .82rem; line-height: 1.4; color: #cfe1d4; }
.workspace-tab .arrow { opacity: .7; }
.workspace-tab:hover { background: #285347; }
.workspace-tab[aria-selected="true"] { background: var(--mint); border-color: var(--mint); color: #1d4635; }
.workspace-tab[aria-selected="true"] .tab-description { color: #345446; }
.workspace-tab[aria-selected="true"] .arrow { opacity: 1; }

.workspace-demo {
  min-inline-size: 0;
  overflow: hidden;
  border: 1px solid #88a596;
  border-radius: 15px;
  background: #f7faf4;
  color: var(--ink);
}

.demo-toolbar {
  min-block-size: 42px;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px clamp(12px, 2.4vw, 23px);
  border-block-end: 1px solid #e0e8de;
  background: #e9f1e6;
  color: #365a4a;
  font-size: .78rem;
  font-weight: 700;
}

.demo-mark { flex: none; inline-size: 8px; block-size: 8px; border-radius: 50%; background: #598b70; }
.sample-label { margin-inline-start: auto; font-weight: 500; color: #4b6156; }

.demo-panel {
  min-block-size: 306px;
  padding: clamp(12px, 2.3vw, 25px);
}

.demo-panel:focus-visible { outline: 3px solid var(--green); outline-offset: -4px; }
.panel-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-block-end: 15px; }
.panel-heading h3 { font-size: clamp(1.18rem, 2vw, 1.55rem); line-height: 1.28; }
.panel-heading p { margin-block-start: 3px; color: var(--muted); font-size: .85rem; }
.panel-meta { color: var(--muted); font-size: .78rem; }

.demo-list { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.demo-list li {
  min-block-size: 54px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: clamp(8px, 1.7vw, 18px);
  padding: 8px 12px;
  border: 1px solid #e3e9e0;
  border-radius: 9px;
  background: #fff;
}

.demo-list strong, .chart-summary strong { display: block; font-size: .9rem; line-height: 1.28; font-weight: 700; }
.demo-list time { font-size: .85rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.row-detail { display: block; margin-block-start: 3px; font-size: .77rem; color: var(--muted); line-height: 1.28; }
.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  max-inline-size: 100%;
  padding: 3px 8px;
  border-radius: 6px;
  font-size: .73rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}

.status.done { background: #e2f0df; color: #2a5a35; }
.status.confirmed { background: #e1ebf8; color: #294c73; }
.status.booked { background: #f0e9f7; color: #624375; }
.status.low { background: #fae7dd; color: #873d24; }
.status.expiring { background: #f5edcf; color: #705722; }

.stock-dot { inline-size: 8px; block-size: 8px; border-radius: 50%; background: #4e8766; }
.stock-dot.low { background: #af5e42; }
.stock-dot.expiring { background: #a9863e; }

.demo-chart {
  padding: clamp(9px, 1.8vw, 17px);
  border: 1px solid #dde9de;
  border-radius: 10px;
  background: #edf4eb;
}

.chart-hint { margin-block-end: 9px; color: #426150; font-size: .83rem; }
.teeth-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  align-items: center;
  gap: clamp(1px, .65vw, 7px);
  max-inline-size: 570px;
  margin-inline: auto;
}

.chart-tooth {
  display: grid;
  min-inline-size: 0;
  min-block-size: 43px;
  justify-items: center;
  align-content: center;
  padding: 2px 0 4px;
  color: #355a47;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
}

button.chart-tooth { cursor: pointer; }
button.chart-tooth:hover, .chart-tooth[aria-pressed="true"] {
  border-color: #8ca899;
  background: #fffef9;
}

.chart-tooth:focus-visible { outline: 2px solid #205d45; outline-offset: 1px; }
.tooth-number { font: 700 clamp(.71rem, 1.25vw, .87rem) var(--sans); line-height: 1; }
.tooth-image {
  --sprite-x: 0%;
  display: block;
  width: min(100%, 58px);
  aspect-ratio: 1;
  background: url("assets/tooth-markings.png") var(--sprite-x) center / 700% 100% no-repeat;
}

.tooth-image[data-icon="missing"] { --sprite-x: calc(100% / 6); }
.tooth-image[data-icon="filling"] { --sprite-x: calc(200% / 6); }
.tooth-image[data-icon="extracted"] { --sprite-x: 50%; }
.tooth-image[data-icon="crown"] { --sprite-x: calc(400% / 6); }
.tooth-image[data-icon="canine"] { --sprite-x: calc(500% / 6); }
.tooth-image[data-icon="incisor"] { --sprite-x: 100%; }
.chart-summary { display: flex; align-items: center; gap: 9px; margin-block-start: 13px; }
.tooth-index { display: grid; place-items: center; flex: none; inline-size: 34px; block-size: 34px; border-radius: 8px; font-weight: 700; }
.tooth-index.filling { color: #2159ad; background: #e2eeff; }
.tooth-index.extracted { color: #a52d4e; background: #fce9ed; }
.tooth-index.missing { color: #4b655f; background: #e9efed; }
.tooth-index.crown { color: #805309; background: #fae4ab; }

.invoice-list { border: 1px solid #e3e9e0; border-radius: 9px; overflow: hidden; background: #fff; }
.invoice-list div { display: flex; align-items: center; justify-content: space-between; column-gap: 12px; padding: 12px; font-size: .9rem; }
.invoice-list div + div { border-block-start: 1px solid #e3e9e0; }
.invoice-list dd { white-space: nowrap; font-variant-numeric: tabular-nums; }
.invoice-list div:last-child { background: #e5eee1; font-weight: 700; }

.team-section { background: #fffdf5; }
.roles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(17px, 3vw, 38px); }
.role-card { padding-block-start: 20px; border-block-start: 1px solid #b7c9bb; }
.role-card h3 { margin-block: 13px 8px; font-size: 1.18rem; line-height: 1.3; }
.role-card p { max-inline-size: 40ch; color: var(--muted); }
.role-icon {
  position: relative;
  display: grid;
  place-items: center;
  inline-size: 38px;
  block-size: 38px;
  border-radius: 9px;
  background: #e8f1e2;
  color: var(--green);
}

.role-icon::before, .role-icon::after { content: ""; }
.front-desk::before { inline-size: 17px; block-size: 15px; border: 1.5px solid; border-radius: 3px; }
.front-desk::after { position: absolute; inset-block-start: 17px; inline-size: 15px; border-block-start: 1.5px solid; }
.treatment::before { inline-size: 15px; block-size: 19px; border: 1.5px solid; border-radius: 3px; }
.treatment::after { position: absolute; inline-size: 7px; block-size: 6px; border-block: 1.5px solid; }
.operations::before { inline-size: 18px; block-size: 16px; border: 1.5px solid; border-radius: 3px; }
.operations::after { position: absolute; inline-size: 7px; block-size: 16px; border-inline: 1.5px solid; }

.faq-section { border-block-start: 1px solid #e5e7db; }
.faq-shell { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 1.45fr); gap: 22px clamp(30px, 5vw, 88px); }
.questions { border-block-start: 1px solid var(--rule); }
.questions details { border-block-end: 1px solid var(--rule); }
.questions summary {
  min-block-size: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding-block: 13px;
  font-weight: 700;
}

.questions summary:hover { color: #216248; }
.questions p { max-inline-size: 61ch; padding-block-end: 18px; padding-inline-end: 18px; color: var(--muted); }
.disclosure-icon { position: relative; flex: none; inline-size: 16px; block-size: 16px; }
.disclosure-icon::before, .disclosure-icon::after {
  content: "";
  position: absolute;
  inset: 7px 1px auto;
  border-block-start: 1.5px solid currentColor;
}

.disclosure-icon::after { transform: rotate(90deg); }
.questions details[open] .disclosure-icon::after { display: none; }

.contact { padding-block-end: clamp(32px, 5vw, 61px); }
.contact-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 25px 40px;
  padding: clamp(28px, 5.5vw, 68px);
  border-radius: 19px;
  color: #f7f9ee;
  background: var(--green-dark);
}

.contact-card p { max-inline-size: 52ch; margin-block-start: 14px; color: #d8e9dd; font-size: 1.04rem; }
.contact-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; flex: none; }
.button-light { background: #e2efcf; color: #1c4533; }
.button-light:hover { background: #d0e7b5; }
.contact-phone { padding-inline: 4px; font-weight: 600; text-decoration: underline; text-underline-offset: .25em; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px 24px;
  padding-block: 24px 28px;
  border-block-start: 1px solid var(--rule);
}

.site-footer .brand { font-size: 1.35rem; }
.site-footer .brand-mark { transform: scale(.86); }
.site-footer p { color: var(--muted); font-size: .86rem; }
.site-footer p a { text-decoration: underline; text-underline-offset: .2em; }

@media (max-width: 1020px) {
  :root { --shell: min(100% - 64px, 1224px); }
  .hero { gap: 30px; }
  .hero-actions .button, .hero-actions .text-link { font-size: .92rem; }
  .hero-actions .button { padding-inline: 14px; }
}

@media (max-width: 780px) {
  :root { --shell: min(100% - 40px, 650px); --header-height: 63px; }
  .desktop-nav { display: none; }
  .mobile-menu { display: block; }
  .hero { grid-template-columns: 1fr; padding-block-start: 36px; gap: 24px; }
  .hero-copy { padding-block: 0; }
  h1 { font-size: clamp(3.65rem, 10.7vw, 5.3rem); }
  [dir="rtl"] h1 { font-size: clamp(2.6rem, 7.8vw, 4.2rem); }
  .hero-description { margin-block: 16px 18px; }
  .hero-figure img { aspect-ratio: 1.48; }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .workspace-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .workspace-tab { min-block-size: 48px; }
  .tab-description { display: none; }
  .demo-panel { min-block-size: 279px; }
  .faq-shell { grid-template-columns: 1fr; }
  .contact-card { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 505px) {
  .button-header { display: none; }
  .hero-figure img { aspect-ratio: 1.25; }
  .visit-card { gap: 8px; padding: 8px 10px; }
  .visit-icon { inline-size: 34px; block-size: 34px; }
  .visit-icon::after { inset-block-start: 14px; }
  .visit-card strong { font-size: .88rem; }
  .visit-label, .visit-time { font-size: .7rem; }
  .roles { grid-template-columns: minmax(0, 1fr); gap: 21px; }
  .role-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 2px 12px; padding-block-start: 16px; }
  .role-card h3 { margin-block: 3px 0; }
  .role-card p { grid-column: 2; }
  .role-card .role-icon { grid-row: span 2; }
  .demo-toolbar, .row-detail, .status { font-size: .72rem; }
  .demo-list li { padding-inline: 8px; }
  .demo-list strong, .demo-list time, .chart-summary strong { font-size: .83rem; }
  .contact-actions { inline-size: 100%; }
  .contact-card .button { min-block-size: 50px; padding-inline: 10px; font-size: .91rem; }
}

@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  .button { transition: none; }
}
