/* Baskerville X-ray — site styles
   Fonts match the Squarespace site: Libre Baskerville (headings, logo),
   EB Garamond (body), Almarai (buttons). */

:root {
  --ink: #000;
  --paper: #fff;
  --grey: #383838;
  --muted: #555;
  --rule: #ddd;
  --max: 1180px;
  --serif-head: "Libre Baskerville", Georgia, serif;
  --serif-body: "EB Garamond", Garamond, Georgia, serif;
  --sans-btn: "Almarai", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--serif-body);
  font-size: 20px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}
img, video { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, h4 {
  font-family: var(--serif-head);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0 0 0.6em;
}
h1 { font-size: clamp(30px, 4vw, 44px); }
h2 { font-size: clamp(26px, 3.2vw, 34px); }
h3 { font-size: clamp(22px, 2.6vw, 28px); }
h4 { font-size: 20px; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 4vw; }
.narrow { max-width: 820px; margin: 0 auto; padding: 0 4vw; }
.section { padding: 80px 0; }
.section--dark { background: var(--grey); color: #fff; }
.section--black { background: #000; color: #fff; }
.centre { text-align: center; }

/* ---------- Header ---------- */
.site-header {
  position: relative;
  z-index: 10;
  padding: 22px 4vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header--overlay { position: absolute; top: 0; left: 0; right: 0; color: #fff; }
.logo {
  font-family: var(--serif-head);
  font-size: 21px;
  letter-spacing: -0.02em;
  text-decoration: none;
  white-space: nowrap;
}
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: center; }
.nav a { text-decoration: none; font-size: 17px; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; }
.header-spacer { width: 140px; }
.menu-toggle { display: none; background: none; border: 0; color: inherit; font: inherit; cursor: pointer; padding: 6px; }
.menu-toggle span { display: block; width: 26px; height: 2px; background: currentColor; margin: 6px 0; }

@media (max-width: 760px) {
  .header-spacer { display: none; }
  .menu-toggle { display: block; }
  .nav { position: absolute; top: 100%; left: 0; right: 0; background: #fff; color: #000; display: none; border-bottom: 1px solid var(--rule); }
  .nav ul { flex-direction: column; padding: 16px 4vw 24px; gap: 14px; align-items: flex-start; }
  .nav a { font-size: 22px; }
  .site-header.is-open .nav { display: block; }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  font-family: var(--sans-btn);
  font-size: 16px;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  color: #000;
  background: #fff;
  border: 2px solid #000;
  border-radius: 999px;
  padding: 16px 34px;
  line-height: 1.2;
  text-align: center;
  cursor: pointer;
  transition: background .15s, color .15s;
}
.btn:hover { background: #000; color: #fff; }
.btn--light { border-color: #fff; color: #fff; background: transparent; }
.btn--light:hover { background: #fff; color: #000; }
.btn--solid { background: #000; color: #fff; }
.btn--solid:hover { background: #fff; color: #000; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 1.2em; }

/* ---------- Hero (home) ---------- */
.hero {
  position: relative;
  background: #000 center / cover no-repeat;
  color: #fff;
  min-height: 420px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 140px 4vw 80px;
}
.hero::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.35); }
.hero > * { position: relative; }
.hero h1 { max-width: 900px; margin: 0 auto 0.7em; font-size: clamp(28px, 3.4vw, 40px); }
.hero p { font-size: 20px; margin: 0; }

/* ---------- Banner (shop) ---------- */
.banner {
  position: relative;
  margin: 0 4vw;
  min-height: 300px;
  background: #000 center / cover no-repeat;
  display: flex; align-items: center; justify-content: center;
  color: #fff; text-align: center; padding: 40px 4vw;
}
.banner::before { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.25); }
.banner h1 { position: relative; margin: 0; }

/* ---------- Two-column blocks ---------- */
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 6vw; align-items: center; }
.split--reverse { grid-template-columns: 1fr 1.4fr; }
.split--top { align-items: start; }
.split > * { min-width: 0; }
@media (max-width: 860px) { .split, .split--reverse { grid-template-columns: minmax(0, 1fr); gap: 40px; } }

.circle-media { width: 100%; max-width: 420px; aspect-ratio: 1; border-radius: 50%; overflow: hidden; margin: 0 auto; background: #b7b5b2; }
.circle-media video, .circle-media img { width: 100%; height: 100%; object-fit: cover; }

.caption { font-size: 16px; font-style: italic; margin-top: 10px; }

/* ---------- Clients ---------- */
.logos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; align-items: center; justify-items: center; margin: 40px 0 60px; }
.logos figure { margin: 0; text-align: center; }
.logos img { max-height: 120px; width: auto; margin: 0 auto; }
.logos figcaption { font-size: 16px; margin-top: 8px; }
@media (max-width: 700px) { .logos { grid-template-columns: 1fr; } }

/* ---------- Gallery ---------- */
.gallery { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0; }
.gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(3, 1fr); } }

/* ---------- Footer ---------- */
.site-footer { background: #000; color: #fff; padding: 80px 0 60px; font-size: 17px; }
.site-footer h2 { font-size: 26px; margin-bottom: .5em; }
.site-footer h4 { font-family: var(--serif-body); letter-spacing: .08em; font-size: 15px; margin-bottom: .6em; }
.footer-news { text-align: center; max-width: 640px; margin: 0 auto 70px; }
.footer-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.footer-cols a { text-decoration: none; }
.footer-cols a:hover { text-decoration: underline; }
.footer-cols ul { list-style: none; margin: 0; padding: 0; }
@media (max-width: 760px) { .footer-cols { grid-template-columns: 1fr; } }

/* ---------- About ---------- */
.person { padding: 70px 0; border-bottom: 1px solid var(--rule); }
.person:last-child { border-bottom: 0; }
.person h2 { margin-bottom: .2em; }
.person .role { font-family: var(--serif-head); font-size: 20px; color: var(--muted); margin-bottom: 1.2em; }
.person-photo { width: 100%; }
.links { font-size: 17px; word-break: break-word; }
.links a { margin-right: 18px; }
.inst-title { font-weight: 600; margin-top: 1.6em; }
.institutions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; margin-top: 20px; }
.institutions figure { margin: 0; }
.institutions img { height: 90px; width: auto; max-width: 100%; object-fit: contain; object-position: left center; }
.institutions figcaption { font-size: 16px; margin-top: 10px; line-height: 1.35; }
@media (max-width: 700px) { .institutions { grid-template-columns: 1fr 1fr; } }

/* ---------- Shop ---------- */
.shop-intro p { margin-bottom: 1.2em; }
.products { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 30px; }
@media (max-width: 1000px) { .products { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .products { grid-template-columns: 1fr; } }
.product-card { text-decoration: none; display: block; }
.product-card img { width: 100%; aspect-ratio: 1; object-fit: cover; background: #eef; transition: opacity .2s; }
.product-card:hover img { opacity: .85; }
.product-card h3 { font-family: var(--serif-body); font-size: 19px; letter-spacing: 0; margin: 14px 0 4px; line-height: 1.3; }
.price { font-size: 18px; }
.reviews { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; margin-top: 30px; }
.reviews blockquote { margin: 0; font-size: 22px; font-style: italic; }
.reviews cite { display: block; margin-top: 14px; font-style: normal; font-size: 17px; }
@media (max-width: 760px) { .reviews { grid-template-columns: 1fr; } }

.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: 5vw; padding: 40px 0 90px; }
@media (max-width: 860px) { .product { grid-template-columns: 1fr; } }
.product-gallery .main { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: #eef; }
.thumbs { display: flex; gap: 10px; margin-top: 10px; }
.thumbs button { border: 2px solid transparent; padding: 0; background: none; cursor: pointer; width: 90px; }
.thumbs button[aria-pressed="true"] { border-color: #000; }
.thumbs img { width: 100%; aspect-ratio: 1; object-fit: cover; }
.product-info h1 { font-size: clamp(26px, 3vw, 34px); }
.product-info .price { font-size: 22px; margin-bottom: 1.2em; }
.product-note { font-size: 16px; color: var(--muted); margin-top: 1em; }
.breadcrumb { font-size: 16px; padding-top: 20px; }
.breadcrumb a { text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

/* ---------- Blog ---------- */
.posts { display: grid; grid-template-columns: repeat(2, 1fr); gap: 50px 40px; }
@media (max-width: 760px) { .posts { grid-template-columns: 1fr; } }
.post-card { text-decoration: none; display: block; }
.post-card img { width: 100%; aspect-ratio: 3/2; object-fit: cover; margin-bottom: 18px; }
.post-card h2 { font-size: 26px; }
.post-card .more { text-decoration: underline; text-underline-offset: 4px; }
.post-meta { color: var(--muted); font-size: 17px; margin-bottom: 2em; }
.article { padding: 50px 0 90px; }
.article h1 { margin-bottom: .4em; }
.article h2 { margin-top: 1.6em; font-size: 28px; }
.article h3 { margin-top: 1.3em; font-size: 22px; }
.article ul { padding-left: 1.2em; margin: 0 0 1.2em; }
.article li { margin-bottom: .4em; }
.article table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; font-size: 17px; margin: 1em 0 1.5em; }
.article th, .article td { border: 1px solid var(--rule); padding: 10px 12px; text-align: left; vertical-align: top; }
.article th { background: #f4f4f4; font-weight: 600; }
.article a { word-break: break-word; }

/* ---------- Contact / legal ---------- */
.contact h4 { font-family: var(--serif-body); font-size: 21px; letter-spacing: 0; }
.form-frame { width: 100%; height: 1150px; border: 0; margin-top: 30px; }
.legal { padding: 50px 0 90px; font-size: 18px; }
.legal h2 { font-size: 30px; }
.legal h3 { font-size: 24px; margin-top: 1.4em; }
.legal h4 { font-size: 20px; margin-top: 1.4em; }
.legal ul { padding-left: 1.2em; }
