/* MC Studio demo factory — shared base. Templates layer style.css on top; briefs set the tokens. */
:root {
  --bg: #f5f6f4; --surface: #ffffff; --ink: #1d2320; --muted: #5b625e;
  --accent: #2f5d50; --accent-ink: #ffffff; --alt: var(--ink); --alt-ink: var(--bg);
  --line: color-mix(in srgb, var(--ink) 14%, transparent);
  --font-display: Georgia, serif; --font-body: system-ui, sans-serif;
  --container: 76rem; --gutter: clamp(1rem, 4vw, 2.5rem);
  --section: clamp(4rem, 9vw, 8rem); --radius: .5rem;
  --ease: cubic-bezier(.2, .7, .1, 1);
  --header-h: 4.5rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: var(--header-h); }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font-body); font-size: clamp(1rem, .96rem + .2vw, 1.0625rem); line-height: 1.6;
  text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; overflow-x: clip;
}
:lang(ar) body, body:lang(ar) { line-height: 1.8; }
img { display: block; max-width: 100%; height: auto; }
img { background: color-mix(in srgb, var(--ink) 8%, var(--bg)); } /* graceful block if an image fails */
h1, h2, h3, h4, p, ul, ol, dl, dd, figure { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
a { color: inherit; text-decoration-thickness: .08em; text-underline-offset: .18em; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; line-height: 1.05; text-wrap: balance; }
:lang(ar) :is(h1, h2, h3) { line-height: 1.25 !important; letter-spacing: 0 !important; }
p { text-wrap: pretty; }

.container { width: min(100% - 2 * var(--gutter), var(--container)); margin-inline: auto; }
.section { padding-block: var(--section); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 1rem; top: -4rem; z-index: 100; padding: .75rem 1rem; background: var(--ink); color: var(--bg); border-radius: var(--radius); }
.skip-link:focus { top: 1rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  min-height: 3rem; padding: .8rem 1.4rem; border: 1.5px solid transparent; border-radius: var(--radius);
  font-weight: 600; font-size: 1rem; line-height: 1.2; text-decoration: none; cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s, transform .2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--primary:hover { background: color-mix(in srgb, var(--accent) 86%, var(--ink)); }
.btn--ghost { border-color: currentColor; }
.btn--ghost:hover { background: color-mix(in srgb, currentColor 10%, transparent); }
.btn--small { min-height: 2.5rem; padding: .5rem 1rem; font-size: .9375rem; }

/* Header + nav */
.site-header { position: fixed; inset: 0 0 auto; z-index: 50; transition: background-color .3s, box-shadow .3s, color .3s; }
.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: var(--header-h); }
.brand { font-family: var(--font-display); font-size: 1.35rem; text-decoration: none; margin-inline-end: auto; line-height: 1.1; }
.site-nav__list { display: flex; gap: clamp(1rem, 2vw, 2rem); }
.site-nav__list a { text-decoration: none; padding-block: .5rem; }
.site-nav__list a:hover { text-decoration: underline; }
.nav-toggle { display: none; width: 2.75rem; height: 2.75rem; border: 0; background: none; cursor: pointer; position: relative; z-index: 2; }
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after { position: absolute; left: 50%; width: 1.4rem; height: 2px; margin-left: -.7rem; background: currentColor; transition: transform .3s var(--ease), opacity .2s; content: ""; }
.nav-toggle__bars { top: 50%; } .nav-toggle__bars::before { top: -7px; left: 0; margin: 0; } .nav-toggle__bars::after { top: 7px; left: 0; margin: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .header-cta { display: none; }
  .site-nav .site-nav__list {
    position: fixed; inset: 0; flex-direction: column; justify-content: center; gap: .25rem;
    padding: var(--header-h) var(--gutter) 6rem; background: var(--bg); color: var(--ink);
    font-family: var(--font-display); font-size: clamp(1.75rem, 8vw, 2.5rem);
    opacity: 0; visibility: hidden; transform: translateY(-1rem); transition: opacity .3s, transform .4s var(--ease), visibility 0s .4s;
  }
  .site-nav .site-nav__list.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity .3s, transform .4s var(--ease); }
  .nav-open .site-header { color: var(--ink) !important; }
  .nav-open { overflow: hidden; }
}

/* Contact links, hours, social, footer */
.contact-links { display: grid; gap: .25rem; }
.contact-link { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .25rem 1rem; padding: 1rem 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.contact-link__k { font-weight: 600; }
.contact-link__v { color: var(--muted); overflow-wrap: anywhere; }
.contact-link:hover .contact-link__k { text-decoration: underline; }
.hours__title { font-weight: 600; margin-bottom: .5rem; }
.hours__rows > div { display: flex; justify-content: space-between; gap: 1rem; padding: .35rem 0; border-bottom: 1px dashed var(--line); }
.hours__rows dd { font-variant-numeric: tabular-nums; }
.open-status { display: inline-flex; align-items: center; gap: .5rem; margin-bottom: .75rem; font-weight: 600; }
.open-status::before { content: ""; width: .55rem; height: .55rem; border-radius: 50%; background: #9aa19d; }
.open-status.is-open::before { background: #1f9d55; box-shadow: 0 0 0 4px color-mix(in srgb, #1f9d55 25%, transparent); }
.social { display: flex; flex-wrap: wrap; gap: 1.25rem; }
.site-footer { padding-block: 3rem 6rem; border-top: 1px solid var(--line); font-size: .9375rem; }
.site-footer__inner { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-start; gap: 1.5rem 3rem; }
.site-footer__name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1.2; }
.site-footer__tag, .site-footer__meta { color: var(--muted); }
.site-footer__meta { flex-basis: 100%; display: flex; flex-wrap: wrap; justify-content: space-between; gap: .5rem; }

/* Mobile sticky action bar */
.actionbar { display: none; }
@media (max-width: 860px) {
  .actionbar {
    position: fixed; inset: auto .75rem .75rem; z-index: 40; display: flex; gap: .5rem;
    padding: .4rem; border-radius: calc(var(--radius) + .4rem); background: var(--ink);
    box-shadow: 0 10px 30px -10px rgb(0 0 0 / .45);
    transform: translateY(150%); transition: transform .4s var(--ease);
  }
  .actionbar.is-visible { transform: none; }
  .actionbar__btn { flex: 1; display: grid; place-items: center; min-height: 3rem; border-radius: var(--radius); color: var(--bg); font-weight: 700; text-decoration: none; }
  .actionbar__btn--main { background: var(--accent); color: var(--accent-ink); }
}

/* One orchestrated hero entrance (pure CSS, no flash) + sparing [data-reveal] */
@keyframes hero-in { from { opacity: 0; transform: translateY(1.25rem); } to { opacity: 1; transform: none; } }
[data-hero] { animation: hero-in 1s var(--ease) both; animation-delay: calc(var(--d, 0) * 120ms + 120ms); }
.reveal { opacity: 0; transform: translateY(1.5rem); transition: opacity .8s var(--ease), transform 1s var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  [data-hero] { animation: none; }
}
