:root { --bg:#f9f7eb; --accent:#ce1018; --text:#222; }
* { box-sizing: border-box; }
html, body { margin:0; padding:0; }
body { font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif; background: var(--bg); color: var(--text); }

.container { max-width: 1100px; margin: 0 auto; padding: 24px; }
h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 2vw, 2rem); color: var(--accent); }
p.lede { margin: 0 0 20px; opacity: .8; }

/* Grid */
.grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
@media (min-width: 900px) {
  .grid { grid-template-columns: repeat(4, 1fr); }
}

.card {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,.08);
  cursor: pointer;
  transition: transform .25s ease, box-shadow .25s ease;
  outline: none;
}
.card:hover, .card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
}
.card img {
  width: 100%; height: 280px; object-fit: cover; display:block;
}
.card .info {
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
}
.name { font-weight: 800; }
.role { font-size: .95rem; opacity: .75; }

/* Modal */
.modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.5);
  display: none; /* toggled to flex */
  align-items: center; justify-content: center;
  padding: 16px;
  z-index: 9999;
}
.modal-backdrop.open { display: flex; }

.modal {
  width: min(720px, 100%);
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 12px 36px rgba(0,0,0,.3);
}
.modal-header {
  background: var(--accent);
  color: #fff;
  padding: 16px 18px;
  display:flex; align-items:center; justify-content: space-between;
}
.modal-title { margin:0; font-size: 1.25rem; font-weight: 800; }
.modal-close {
  background: transparent; border: 0; color: #fff; font-size: 1.5rem; line-height: 1;
  cursor: pointer; padding: 6px; border-radius: 8px;
}
.modal-close:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

.modal-body {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0;
}
@media (max-width: 640px) {
  .modal-body { grid-template-columns: 1fr; }
}

.modal-photo { min-height: 260px; background: #eee; }
.modal-photo img { width: 100%; height: 100%; object-fit: cover; display:block; }

.modal-content { padding: 18px; }
.meta { display:flex; gap: 14px; flex-wrap: wrap; margin: 8px 0 14px; }
.pill { background: #f4f4f4; border-radius: 999px; padding: 6px 10px; font-size: .9rem; }
.bio { line-height: 1.6; margin: 0; }
.section-label { font-weight: 800; margin: 14px 0 6px; color: var(--accent); }

.sr-only {
  position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden;
  clip:rect(0,0,1px,1px); white-space:nowrap; border:0;
}

.booking-link {
  display: inline-block;
  margin-top: 18px;
  padding: 10px 18px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  border-radius: 10px;
  transition: background .2s ease, transform .2s ease;
}
.booking-link:hover {
  background: #a60e13;
  transform: translateY(-1px);
}
.booking-link:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 3px;
}

/* Backdrop must sit above header/burger; cover whole screen */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.5);
  display: none;            /* toggled to flex */
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 10000;           /* higher than header/nav */
}

/* When open */
.modal-backdrop.open { display: flex; }

/* Modal should scroll internally on small screens */
.modal {
  width: min(720px, 96%);
  max-height: 90vh;
  overflow: auto;
  -webkit-overflow-scrolling: touch; /* iOS smooth scroll */
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 12px 36px rgba(0,0,0,.3);
}

/* Bigger, easier-to-tap close button */
.modal-close {
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 1.8rem;      /* larger tap target */
  line-height: 1;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 10px;
  touch-action: manipulation;
}

/* Prevent background page from scrolling when modal is open */
body.modal-open {
  overflow: hidden;
  height: 100dvh;         /* mobile-friendly viewport */
  touch-action: none;
}

.modal-backdrop {
  opacity: 0;
  transition: opacity .25s ease;
}
.modal-backdrop.open { opacity: 1; }
.modal {
  transform: translateY(20px);
  opacity: 0;
  transition: transform .25s ease, opacity .25s ease;
}
.modal-backdrop.open .modal {
  transform: translateY(0);
  opacity: 1;
}

