/* Nabra Dental demo. Look: clean daylight, petrol ink, one teal. Type: Tajawal. 4 px grid. */
:root {
  --bg: #F4F8F7;
  --card: #FFFFFF;
  --ink: #0E2F36;
  --soft: #4C666C;
  --main: #0B7F77;
  --main-ink: #FFFFFF;
  --deep: #0A4654;
  --tint: #DFF0EC;
  --line: rgba(14, 47, 54, .12);
  --ok: #0B7F77;
  --shut: #8A5A12;
  --r-s: 12px;
  --r-m: 16px;
  --r-l: 24px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 400 18px/1.7 "Tajawal", "Segoe UI", Tahoma, sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
  overflow-x: hidden;
}
/* Daylight from the top corner: one soft wash, nothing else decorative. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 520px;
  background: radial-gradient(120% 100% at 85% 0%, var(--tint), rgba(223, 240, 236, 0) 70%);
  pointer-events: none;
  z-index: -1;
}
bdi { direction: ltr; unicode-bidi: isolate; font-variant-numeric: tabular-nums; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
a, button { -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 3px solid var(--deep); outline-offset: 3px; border-radius: 8px; }
.skip { position: absolute; inset-inline-start: 16px; top: -64px; background: var(--deep); color: #fff; padding: 8px 16px; border-radius: var(--r-s); z-index: 5; }
.skip:focus { top: 8px; }

.demo-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1120px; margin: 0 auto; padding: 8px 20px 0;
}
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; color: var(--soft); font-size: 15px; font-weight: 500; text-decoration: none; }
.back:hover { color: var(--ink); }
.demo-tag { font-size: 13px; font-weight: 500; color: var(--deep); background: var(--card); box-shadow: 0 0 0 1px var(--line); border-radius: 999px; padding: 4px 12px; }

.page { max-width: 1120px; margin: 0 auto; padding: 16px 20px 48px; }

.brand { display: flex; align-items: center; gap: 12px; }
.mark { width: 48px; height: 48px; border-radius: 16px; background: var(--deep); color: #fff; display: grid; place-items: center; }
.mark svg { width: 32px; height: 32px; stroke-width: 2.6; }
.mark circle { fill: currentColor; stroke: none; }
.brand-text { display: grid; line-height: 1.3; }
.brand-name { font-size: 18px; font-weight: 700; }
.brand-en { font-size: 13px; color: var(--soft); }

.status { margin-top: 24px; display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; color: var(--ok); }
.status .dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 18%, transparent); }
.status.shut { color: var(--shut); }

h1 { margin-top: 12px; font-size: 40px; font-weight: 800; line-height: 1.3; color: var(--deep); text-wrap: balance; }
.smile { position: relative; display: inline-block; color: var(--main); white-space: nowrap; }
/* The drawn smile under the last words is the page's one mark. */
.smile svg { position: absolute; inset-inline: 0; bottom: -12px; width: 100%; height: 14px; stroke-width: 3; }
.sub { margin-top: 24px; color: var(--soft); max-width: 34em; text-wrap: pretty; }

.actions { margin-top: 24px; display: grid; gap: 8px; max-width: 480px; }
.btn {
  min-height: 52px; padding: 0 16px; border-radius: var(--r-m);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 17px; font-weight: 500; text-decoration: none;
  transition: transform .14s ease-out, background-color .14s ease-out, box-shadow .14s ease-out;
}
.btn:active { transform: scale(.96); }
.call { min-height: 60px; background: var(--main); color: var(--main-ink); font-weight: 700; box-shadow: 0 1px 0 rgba(255, 255, 255, .25) inset, 0 12px 24px -8px rgba(11, 127, 119, .5); }
.call:hover { background: #096C65; }
.call .tel { font-weight: 500; font-size: 16px; opacity: .92; margin-inline-start: 4px; }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.soft { background: var(--card); color: var(--deep); box-shadow: 0 0 0 1px var(--line), 0 1px 2px rgba(14, 47, 54, .06); }
.soft:hover { background: var(--tint); }
.line { background: transparent; color: var(--deep); box-shadow: 0 0 0 1.5px var(--deep) inset; }
.line:hover { background: var(--tint); }
.fine { font-size: 13px; color: var(--soft); }

.info { margin-top: 40px; display: grid; gap: 32px; }
h2 { font-size: 15px; font-weight: 700; color: var(--soft); }

.ask { background: var(--card); border-radius: var(--r-l); padding: 20px; box-shadow: 0 0 0 1px var(--line), 0 16px 32px -24px rgba(14, 47, 54, .3); display: grid; gap: 16px; justify-items: start; }
.ask h2 { color: var(--ink); font-size: 18px; }
.ask-bubble { background: var(--tint); color: var(--ink); padding: 12px 16px; border-radius: 16px; border-start-start-radius: 4px; font-size: 16px; max-width: 30em; }

.tags { margin-top: 12px; list-style: none; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--card); box-shadow: 0 0 0 1px var(--line); display: flex; align-items: center; font-size: 16px; font-weight: 500; }

.hours { margin-top: 8px; width: 100%; border-collapse: collapse; font-size: 16px; }
.hours th, .hours td { padding: 12px 0; border-bottom: 1px solid var(--line); text-align: start; font-weight: 400; }
.hours td { text-align: end; color: var(--soft); }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; }
.hours .today th { font-weight: 700; color: var(--deep); }
.hours .today th::after { content: "اليوم"; margin-inline-start: 8px; font-size: 13px; font-weight: 500; color: var(--main); background: var(--tint); padding: 2px 8px; border-radius: 999px; }
.hours .today td { color: var(--ink); font-weight: 500; }
.where p { margin-top: 8px; color: var(--soft); font-size: 16px; }

.made { max-width: 1120px; margin: 0 auto; padding: 24px 20px 40px; border-top: 1px solid var(--line); font-size: 15px; color: var(--soft); display: grid; gap: 4px; }
.made a { color: var(--deep); font-weight: 700; text-underline-offset: 6px; display: inline-block; padding: 8px 0; }

/* Chat: bottom sheet on phones, corner panel on wide screens. Native <dialog> gives focus trap and Esc. */
.chat {
  position: fixed; inset: auto 0 0 0; margin: 0; width: 100%; max-width: none;
  height: min(80dvh, 640px); max-height: none;
  border: 0; padding: 0; border-radius: var(--r-l) var(--r-l) 0 0;
  background: var(--bg); color: var(--ink);
  box-shadow: 0 -16px 48px rgba(10, 70, 84, .25);
  overflow: hidden;
}
.chat[open] { display: flex; flex-direction: column; animation: sheet .24s cubic-bezier(.2, 0, 0, 1); }
.chat::backdrop { background: rgba(10, 40, 48, .4); }
@keyframes sheet { from { transform: translateY(24px); opacity: 0; } }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; background: var(--card); border-bottom: 1px solid var(--line); }
.chat-head b { display: block; font-size: 17px; line-height: 1.4; }
.chat-head small { font-size: 13px; color: var(--soft); }
.chat-close { width: 44px; height: 44px; border-radius: var(--r-s); display: grid; place-items: center; color: var(--soft); margin-inline-end: -8px; }
.chat-close:hover { background: var(--tint); color: var(--ink); }
.chat-log { flex: 1; overflow-y: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.m { max-width: 86%; padding: 8px 16px; border-radius: 16px; font-size: 16px; white-space: pre-wrap; overflow-wrap: anywhere; }
.m.bot { background: var(--card); box-shadow: 0 0 0 1px var(--line); align-self: flex-start; border-start-start-radius: 4px; }
.m.me { background: var(--main); color: #fff; align-self: flex-end; border-start-end-radius: 4px; }
.m .eg { display: inline-block; margin-inline-end: 8px; font-size: 12px; font-weight: 700; color: var(--shut); background: #FBEFD9; padding: 0 8px; border-radius: 999px; vertical-align: 2px; }
.m.wait { color: var(--soft); }
.chat-demo { padding: 12px 20px 4px; border-top: 1px solid var(--line); background: var(--card); }
.chat-demo p { font-size: 14px; color: var(--soft); line-height: 1.6; }
.chips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 44px; padding: 0 16px; border-radius: 999px; background: var(--tint); color: var(--deep); font-size: 15px; font-weight: 500; transition: transform .14s ease-out, background-color .14s ease-out; }
.chip:hover { background: #CDE7E1; }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: transparent; box-shadow: 0 0 0 1px var(--line) inset; color: var(--soft); }
.chat-note { font-size: 13px; color: var(--soft); text-align: center; padding: 8px 20px; background: var(--card); }
.chat-form { display: flex; gap: 8px; padding: 0 20px 16px; background: var(--card); }
.chat-form[hidden], .chat-demo[hidden] { display: none; }
.chat-form input { flex: 1; min-width: 0; min-height: 48px; padding: 0 16px; border-radius: var(--r-s); border: 1px solid #7C9298; background: #fff; color: var(--ink); font: inherit; font-size: 16px; }
.send { min-height: 48px; min-width: 80px; border-radius: var(--r-s); background: var(--main); color: #fff; }
.send:disabled { opacity: .55; cursor: default; }
.chat-note:last-child, .chat-demo + .chat-note { padding-bottom: 16px; }

@media (min-width: 720px) {
  .chat { inset: auto auto 24px 24px; width: 400px; height: min(600px, calc(100dvh - 48px)); border-radius: var(--r-l); box-shadow: 0 24px 64px rgba(10, 70, 84, .3); }
  .chat::backdrop { background: rgba(10, 40, 48, .18); }
}
@media (min-width: 960px) {
  body::before { height: 720px; }
  .demo-bar { padding: 16px 40px 0; }
  .page { padding: 48px 40px 96px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 96px; align-items: start; }
  .lead { position: sticky; top: 48px; }
  h1 { font-size: 72px; line-height: 1.25; margin-top: 16px; }
  .smile svg { bottom: -16px; height: 18px; stroke-width: 2.4; }
  .sub { margin-top: 40px; font-size: 20px; }
  .actions { margin-top: 32px; }
  .status { margin-top: 64px; }
  .info { margin-top: 0; gap: 40px; }
  .ask { padding: 24px; }
  .made { padding: 32px 40px 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
  .btn:active, .chip:active { transform: none; }
}
