:root {
  --wall: #F7F4EE;
  --card: #FFFDF8;
  --ink: #111111;
  --muted: #52504A;
  --cobalt: #1F4E9A;
  --vermilion: #E94F37;
  --yellow: #F6C90E;
  --teal: #2A9D8F;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; background: var(--wall); color: var(--ink); }

body {
  font-family: 'Cairo', system-ui, sans-serif;
  background: var(--wall);
  color: var(--ink);
  line-height: 1.72;
  overflow-x: hidden;
  letter-spacing: 0;
}

.g9-ltr {
  direction: ltr;
  display: inline-block;
  unicode-bidi: isolate;
  font-family: 'IBM Plex Mono', monospace;
}

.g9-wrap {
  width: min(1240px, calc(100% - 48px));
  margin-inline: auto;
}

/* Sticky 76px Cut-Out Header */
.g9-header {
  position: sticky;
  top: 0;
  z-index: 60;
  height: 76px;
  background: rgba(247, 244, 238, 0.96);
  backdrop-filter: blur(10px);
  border-bottom: 2px solid var(--ink);
}

.g9-nav {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.g9-brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
  white-space: nowrap;
}

.g9-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--cobalt);
  color: #FFFDF8;
  display: grid;
  place-items: center;
  font-family: 'Amiri', serif;
  font-size: 1.55rem;
  font-weight: 700;
  line-height: 1;
}

.g9-brand-name {
  font-family: 'Amiri', serif;
  font-size: 1.38rem;
  font-weight: 700;
}

.g9-tabs {
  display: flex;
  align-items: center;
  gap: 16px;
  list-style: none;
}

.g9-tabs a {
  display: inline-block;
  text-decoration: none;
  color: var(--ink);
  font-weight: 700;
  font-size: 0.9rem;
  padding: 6px 8px 4px;
  border-bottom: 4px solid transparent;
  white-space: nowrap;
  transition: transform 0.18s;
}

.g9-tabs a.t-yellow { border-color: var(--yellow); }
.g9-tabs a.t-teal { border-color: var(--teal); }
.g9-tabs a.t-vermilion { border-color: var(--vermilion); }
.g9-tabs a.t-cobalt { border-color: var(--cobalt); }
.g9-tabs a:hover { transform: rotate(-2deg) translateY(-1px); }

.g9-nav-right {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.g9-mini {
  text-decoration: none;
  color: var(--ink);
  border: 1.5px solid var(--ink);
  background: var(--card);
  padding: 5px 9px;
  font-size: 0.78rem;
  font-weight: 700;
}

.g9-mini:hover { background: var(--yellow); }

.g9-cart-btn {
  border: 2px solid var(--ink);
  background: var(--card);
  color: var(--ink);
  padding: 6px 12px;
  font-family: 'Cairo', sans-serif;
  font-size: 0.84rem;
  font-weight: 800;
  cursor: pointer;
}

.g9-cart-btn:hover { background: var(--yellow); }

.g9-free-cta {
  text-decoration: none;
  background: var(--cobalt);
  color: #FFFDF8;
  padding: 7px 14px;
  font-size: 0.84rem;
  font-weight: 800;
  border: 2px solid var(--ink);
}

/* Hero 5fr/7fr Matisse Cutout Stage */
.g9-hero {
  position: relative;
  padding: 52px 0 74px;
  overflow: hidden;
  border-bottom: 2px solid var(--ink);
}

.g9-shape-star {
  position: absolute;
  top: -36px;
  inset-inline-start: -36px;
  width: 190px;
  height: 190px;
  background: var(--yellow);
  clip-path: polygon(50% 0%, 61% 28%, 92% 16%, 76% 45%, 100% 62%, 70% 69%, 75% 100%, 49% 78%, 22% 96%, 29% 66%, 0% 56%, 28% 41%, 14% 12%, 42% 28%);
  opacity: 0.55;
  pointer-events: none;
}

.g9-shape-leaf {
  position: absolute;
  bottom: -44px;
  inset-inline-end: -24px;
  width: 240px;
  height: 180px;
  background: var(--teal);
  border-radius: 75% 25% 60% 40% / 55% 45% 55% 45%;
  opacity: 0.22;
  pointer-events: none;
}

.g9-hero-grid {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 44px;
  align-items: center;
}

.g9-kicker {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  background: var(--yellow);
  color: var(--ink);
  padding: 4px 10px;
  border: 1.5px solid var(--ink);
  margin-bottom: 32px;
}

.g9-h1 {
  font-family: 'Amiri', serif;
  font-size: clamp(2.5rem, 4.2vw, 3.7rem);
  font-weight: 700;
  line-height: 1.44;
  margin-bottom: 18px;
}

.g9-h1 em {
  font-style: italic;
  color: var(--vermilion);
}

.g9-lead {
  font-size: 1.02rem;
  color: var(--muted);
  margin-bottom: 26px;
}

.g9-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.g9-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 0.93rem;
  text-decoration: none;
  border: 2px solid var(--ink);
  cursor: pointer;
  transition: transform 0.18s;
}

.g9-btn-cobalt {
  background: var(--cobalt);
  color: #FFFDF8;
  box-shadow: 4px 4px 0 var(--ink);
}

.g9-btn-cobalt:hover { transform: translate(-2px, -2px); }

.g9-btn-outline {
  background: var(--card);
  color: var(--ink);
  box-shadow: 4px 4px 0 var(--yellow);
}

.g9-btn-outline:hover { background: var(--yellow); }

/* Pinned Tilted Gouache Frame + Scissor Cutline */
.g9-art-stage {
  position: relative;
  padding: 16px 10px 10px;
}

.g9-giant-9 {
  position: absolute;
  top: -32px;
  inset-inline-end: 12px;
  font-family: 'Amiri', serif;
  font-size: 13rem;
  font-weight: 700;
  line-height: 0.85;
  color: rgba(233, 79, 55, 0.22);
  user-select: none;
  pointer-events: none;
}

.g9-pinned {
  position: relative;
  background: var(--card);
  border: 2px solid var(--ink);
  padding: 14px;
  transform: rotate(-1.6deg);
  box-shadow: 12px 14px 0 rgba(17, 17, 17, 0.14);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
  cursor: crosshair;
}

.g9-pinned:hover { transform: rotate(-0.4deg); }

.g9-pushpin {
  position: absolute;
  top: -11px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #FFFFFF, #B4B8BE 65%, #5A5E66);
  border: 1.5px solid var(--ink);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.28);
  z-index: 4;
}

.g9-frame-box {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  border: 1.5px solid var(--ink);
}

.g9-frame-box img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.g9-cutline-h, .g9-cutline-v {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s;
}

.g9-pinned:hover .g9-cutline-h,
.g9-pinned:hover .g9-cutline-v { opacity: 1; }

.g9-cutline-h {
  left: 0;
  right: 0;
  top: var(--sy, 50%);
  border-top: 2px dashed var(--vermilion);
}

.g9-cutline-v {
  top: 0;
  bottom: 0;
  left: var(--sx, 50%);
  border-left: 2px dashed var(--cobalt);
}

.g9-frame-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 10px;
  font-size: 0.78rem;
  font-weight: 700;
}

/* Sections */
.g9-sec { padding: 74px 0; }

.g9-eyebrow {
  display: inline-block;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--cobalt);
  margin-bottom: 8px;
}

.g9-h2 {
  font-family: 'Amiri', serif;
  font-size: clamp(2rem, 3.2vw, 2.75rem);
  font-weight: 700;
  line-height: 1.38;
  margin-bottom: 14px;
}

/* #rooms Sticky Quote + 9-Room Numbered Index */
.g9-rooms-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.3fr;
  gap: 42px;
  align-items: start;
}

.g9-sticky-col {
  position: sticky;
  top: 96px;
}

.g9-pullquote {
  border-inline-start: 6px solid var(--yellow);
  background: var(--card);
  padding: 20px 22px;
  border-top: 1.5px solid var(--ink);
  border-bottom: 1.5px solid var(--ink);
  border-inline-end: 1.5px solid var(--ink);
  margin: 18px 0 22px;
}

.g9-pullquote blockquote {
  font-family: 'Amiri', serif;
  font-size: 1.36rem;
  line-height: 1.55;
  margin-bottom: 8px;
}

.g9-pullquote cite {
  font-style: normal;
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--vermilion);
}

.g9-room-preview {
  background: var(--cobalt);
  color: #FFFDF8;
  padding: 18px 20px;
  border: 2px solid var(--ink);
}

.g9-room-preview strong {
  display: block;
  font-family: 'Amiri', serif;
  font-size: 1.32rem;
  color: var(--yellow);
  margin-bottom: 4px;
}

.g9-room-list {
  list-style: none;
  border-top: 2px solid var(--ink);
}

.g9-room-item {
  display: grid;
  grid-template-columns: 58px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 15px 12px;
  border-bottom: 1.5px solid rgba(17, 17, 17, 0.25);
  cursor: pointer;
  transition: background 0.18s;
}

.g9-room-item:hover, .g9-room-item.is-active {
  background: var(--card);
}

.g9-room-num {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--vermilion);
}

.g9-room-title {
  font-family: 'Amiri', serif;
  font-size: 1.32rem;
  font-weight: 700;
}

.g9-room-tag {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border: 1.5px solid var(--ink);
  background: var(--wall);
}

/* #editions 3-Col Tilted Print Editions */
.g9-editions-band {
  background: #EFE9DD;
  border-block: 2px solid var(--ink);
}

.g9-ed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 28px;
}

.g9-ed-card {
  background: var(--card);
  border: 2px solid var(--ink);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  box-shadow: 6px 6px 0 var(--ink);
  transition: transform 0.26s;
}

.g9-ed-card:nth-child(1) { transform: rotate(-1.5deg); }
.g9-ed-card:nth-child(2) { transform: rotate(1.1deg); }
.g9-ed-card:nth-child(3) { transform: rotate(-1.2deg); }
.g9-ed-card:hover { transform: rotate(0deg) translateY(-4px); }

.g9-ed-art {
  height: 165px;
  border: 1.5px solid var(--ink);
  display: grid;
  place-items: center;
  position: relative;
  overflow: hidden;
}

.g9-ed-card h3 {
  font-family: 'Amiri', serif;
  font-size: 1.38rem;
}

.g9-ed-card p {
  font-size: 0.88rem;
  color: var(--muted);
}

.g9-ed-foot {
  margin-top: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1.5px dashed rgba(17, 17, 17, 0.25);
}

.g9-price {
  font-family: 'IBM Plex Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  color: var(--cobalt);
}

.g9-add-btn {
  padding: 7px 14px;
  border: 2px solid var(--ink);
  background: var(--yellow);
  color: var(--ink);
  font-family: 'Cairo', sans-serif;
  font-weight: 800;
  font-size: 0.84rem;
  cursor: pointer;
}

.g9-add-btn:hover { background: var(--vermilion); color: #FFFDF8; }

/* #members 3-Col Tiers */
.g9-members-band { background: var(--card); border-bottom: 2px solid var(--ink); }

.g9-tier-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
  margin-top: 28px;
}

.g9-tier {
  background: var(--wall);
  border: 1.5px solid var(--ink);
  padding: 26px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.g9-tier.is-featured {
  border: 3px solid var(--ink);
  box-shadow: 7px 7px 0 var(--cobalt);
  background: #FFFDF8;
}

.g9-tier-price {
  font-family: 'Amiri', serif;
  font-size: 2rem;
  font-weight: 700;
  color: var(--cobalt);
}

.g9-tier h3 { font-family: 'Amiri', serif; font-size: 1.45rem; }
.g9-tier p { font-size: 0.9rem; color: var(--muted); }

/* #visit 3 Color-Bar Info Tiles */
.g9-visit-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 24px;
}

.g9-tile {
  background: var(--card);
  border: 2px solid var(--ink);
  padding: 22px;
}

.g9-tile.bar-yellow { border-top: 10px solid var(--yellow); }
.g9-tile.bar-teal { border-top: 10px solid var(--teal); }
.g9-tile.bar-vermilion { border-top: 10px solid var(--vermilion); }

.g9-tile h3 { font-family: 'Amiri', serif; font-size: 1.36rem; margin-bottom: 6px; }
.g9-tile p { font-size: 0.9rem; color: var(--muted); }

/* Cobalt Footer */
.g9-footer {
  background: var(--cobalt);
  color: #FFFDF8;
  padding: 46px 0 36px;
}

.g9-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
}

.g9-footer-mark {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-family: 'Amiri', serif;
  font-size: 2rem;
  font-weight: 700;
}

.g9-footer-9 {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--yellow);
  color: var(--ink);
  display: grid;
  place-items: center;
  font-weight: 800;
}

.g9-footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.g9-footer-links a {
  color: var(--yellow);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

/* Slide-Over Editions Cart Drawer (strict visibility:hidden when closed!) */
.g9-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 17, 17, 0.45);
  z-index: 90;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.25s, visibility 0.25s;
}

.g9-drawer-backdrop.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.g9-drawer {
  position: fixed;
  top: 0;
  inset-inline-end: 0;
  width: min(390px, 92vw);
  height: 100%;
  background: var(--card);
  color: var(--ink);
  border-inline-start: 3px solid var(--ink);
  z-index: 95;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateX(-105%);
  visibility: hidden;
  pointer-events: none;
  transition: transform 0.28s, visibility 0.28s;
}

.g9-drawer.open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.g9-drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
}

.g9-drawer-close {
  border: 2px solid var(--ink);
  background: var(--wall);
  color: var(--ink);
  padding: 4px 10px;
  font-weight: 800;
  cursor: pointer;
}

.g9-drawer-items {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.g9-drawer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 12px;
  background: var(--wall);
  border: 1.5px solid var(--ink);
  font-size: 0.88rem;
}

.g9-drawer-foot {
  border-top: 2px solid var(--ink);
  padding-top: 14px;
}

@media (max-width: 720px) {
  .g9-tabs { display: none; }
  .g9-hero-grid, .g9-rooms-grid, .g9-ed-grid,
  .g9-tier-grid, .g9-visit-grid { grid-template-columns: 1fr; }
  .g9-sticky-col { position: static; }
  .g9-ed-card:nth-child(n) { transform: none; }
}
