/* Page refresh (2026-12): project pages, stock plan pages, the home page "Homes we've
   designed" + plan list, the Projects grid, and the photo viewer (the house engine first
   built for Raykon, ported from Four Chairs). Behavior: js/refresh.js.
   Everything is scoped to .jr so the zeus theme rules elsewhere are untouched.
   Units are px on purpose: the theme sets html { font-size: 28px }, so rem would balloon.
   Colors: navy #3C4856 carries buttons and small text (AA on white and cream); the theme's
   steel blue #5F7FA3 is used for large display type only (4.16:1 on white). */

.jr { --jr-navy: #3C4856; --jr-steel: #5F7FA3; --jr-sand: #C8BCAB; --jr-sand2: #E7E0D3; --jr-cream: #F7F4EE;
  --jr-ink: #2B313A; --jr-muted: #5A606B; --jr-rule: #E2DDD3; --jr-top: 0px;
  --jr-serif: 'Cormorant Garamond', Georgia, serif; --jr-sans: 'Open Sans', Arial, sans-serif;
  color: var(--jr-ink); font-family: var(--jr-sans); font-size: 17px; line-height: 1.75; letter-spacing: 0; }
.jr *, .jr *::before, .jr *::after { box-sizing: border-box; }
.jr img { display: block; max-width: 100%; }
.jr p { font-size: 17px; line-height: 1.75; margin: 0; letter-spacing: 0; color: var(--jr-ink); text-wrap: pretty; }
.jr h1, .jr h2, .jr h3 { font-family: var(--jr-serif); font-weight: 500; color: var(--jr-navy); text-transform: none; letter-spacing: -.01em; margin: 0; text-wrap: balance; }
.jr a { color: inherit; }
.jr :focus-visible { outline: 2px solid var(--jr-navy); outline-offset: 3px; }
.jr-wrap { max-width: 1240px; margin: 0 auto; padding-left: max(5vw, 16px); padding-right: max(5vw, 16px); }

/* buttons: sentence case, navy (the theme's uppercase underline buttons stay elsewhere) */
.jr .jr-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 26px; border-radius: 2px;
  font: 600 15px/1 var(--jr-sans); letter-spacing: 0; text-transform: none; text-decoration: none !important; cursor: pointer;
  border: 1px solid var(--jr-navy); transition: background-color .2s ease, color .2s ease; margin: 0; }
.jr .jr-btn-fill { background: var(--jr-navy); color: #fff !important; }
.jr .jr-btn-fill:hover { background: #2E3844; color: #fff !important; }
.jr .jr-btn-line { background: transparent; color: var(--jr-navy) !important; }
.jr .jr-btn-line:hover { background: var(--jr-cream); }
.jr-acts { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.jr .jr-call { font-size: 15px; color: var(--jr-muted); }
.jr .jr-call a { color: var(--jr-navy); font-weight: 600; text-decoration: none; white-space: nowrap; }
.jr .jr-crumb { font-size: 14px; color: var(--jr-muted); }
.jr .jr-crumb a { color: var(--jr-navy); text-decoration: underline; text-underline-offset: 3px; display: inline-flex; align-items: center; min-height: 44px; }
.jr .jr-link { color: var(--jr-navy); font-weight: 600; font-size: 15px; text-decoration: underline; text-underline-offset: 4px; display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; }

/* ── Project page ─────────────────────────────────────── */
.jr-hero { height: clamp(300px, 62vh, 700px); background: var(--jr-sand2); overflow: hidden; }
.jr-hero picture { display: block; width: 100%; height: 100%; }
.jr-hero img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 60%; }
.jr-intro { padding: 40px 0 56px; }
.jr-intro .jr-wrap { display: grid; gap: 28px; }
.jr .jr-intro h1 { font-size: clamp(46px, 6vw, 76px); line-height: 1; margin-top: 4px; }
.jr-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 16px 28px; margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--jr-rule); }
.jr-facts dt { font-size: 14px; font-weight: 400; color: var(--jr-muted); }
.jr-facts dd { margin: 2px 0 0; font-family: var(--jr-serif); font-size: 26px; line-height: 1.2; color: var(--jr-navy); font-variant-numeric: lining-nums; }
.jr-story { display: grid; gap: 18px; align-content: start; }
.jr-more { display: grid; gap: 18px; }
.jr-more[hidden] { display: none; }
.jr .jr-readmore { justify-self: start; background: none; border: 0; padding: 0; min-height: 44px; color: var(--jr-navy); font: 600 16px var(--jr-sans); text-decoration: underline; text-underline-offset: 4px; cursor: pointer; }
.jr-rooms { position: sticky; top: var(--jr-top); z-index: 15; background: #fff; border-top: 1px solid var(--jr-rule); border-bottom: 1px solid var(--jr-rule); }
.jr-rooms ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 28px; overflow-x: auto; scrollbar-width: none; }
.jr-rooms ul::-webkit-scrollbar { display: none; }
/* a soft fade at the edges says the room list scrolls sideways */
.jr-rooms ul { -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 16px, #000 calc(100% - 32px), transparent 100%); padding: 0 16px; margin: 0 -16px; }
.jr-rooms li { flex: none; }
.jr .jr-rooms a { display: block; padding: 15px 0 13px; white-space: nowrap; text-decoration: none; color: var(--jr-muted); font-size: 15px; border-bottom: 2px solid transparent; }
.jr .jr-rooms a.on { color: var(--jr-navy); border-color: var(--jr-navy); }
.jr-room { padding-top: 56px; scroll-margin-top: calc(var(--jr-top) + 72px); }
.jr-room-h { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; margin-bottom: 18px; }
.jr-room-h span { white-space: nowrap; }
.jr .jr-room-h h2 { font-size: clamp(28px, 3vw, 36px); line-height: 1.1; }
.jr-room-h span { font-size: 14px; color: var(--jr-muted); }
.jr-gallery-end { padding-bottom: 96px; }
/* justified rows: js/refresh.js sets each photo's width and height; without JS they wrap */
.jr-jg { display: flex; flex-wrap: wrap; gap: 12px; }
.jr-jg a { display: block; background: var(--jr-sand2); overflow: hidden; cursor: zoom-in; width: calc(50% - 6px); }
.jr-jg img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.jr-jg a:hover img { transform: scale(1.025); }
.jr-cta { background: var(--jr-cream); }
.jr-cta .jr-wrap { display: grid; gap: 20px; padding-top: 72px; padding-bottom: 72px; }
.jr .jr-cta h2 { font-size: clamp(32px, 4vw, 46px); line-height: 1.08; }
.jr .jr-cta p { max-width: 52ch; }
.jr-next { padding: 72px 0 88px; }
.jr-next-h { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 24px; margin-bottom: 20px; }
.jr .jr-next-h h2 { font-size: clamp(28px, 3vw, 36px); }
.jr-cards { display: grid; gap: 28px; }
.jr .jr-card { display: grid; gap: 10px; align-content: start; text-decoration: none; color: inherit; }
.jr-card .ph { overflow: hidden; background: var(--jr-sand2); aspect-ratio: 16 / 10; }
.jr-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.22,.61,.36,1); }
.jr-card:hover img { transform: scale(1.03); }
.jr .jr-card h3 { font-size: 28px; line-height: 1.1; }
.jr .jr-card p { font-size: 15px; color: var(--jr-muted); }
.jr .jr-card .pr { color: var(--jr-navy); font-weight: 600; }

/* The theme's #wrapper { overflow: hidden } turns off every position: sticky inside it
   (same bug Four Chairs had). clip hides the same overflow without breaking sticky. Only
   on pages with a sticky part, so nothing else changes. */
#wrapper:has(.jr-rooms), #wrapper:has(.jr-buy) { overflow: clip; }

/* ── Photo viewer ─────────────────────────────────────── */
html.jr-lock, html.jr-lock body { overflow: hidden; }
html.jr-lock #a11yw, html.jr-lock #back-to-top, html.jr-lock .sticky-cta { display: none !important; }
.jr-vw { position: fixed; inset: 0; z-index: 100001; background: #111419; display: grid; grid-template-rows: auto 1fr; color: #fff; touch-action: pan-y pinch-zoom; font-family: 'Open Sans', Arial, sans-serif; }
.jr-vw[hidden] { display: none; }
.jr-vw-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: max(12px, env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 12px max(20px, env(safe-area-inset-left)); }
.jr-vw-count { margin: 0; font-size: 15px; line-height: 1.4; letter-spacing: 0; color: rgba(255,255,255,.88); font-variant-numeric: tabular-nums; }
.jr-vw-stage { display: flex; align-items: center; justify-content: center; min-height: 0; padding: 0 84px max(24px, env(safe-area-inset-bottom)); }
.jr-vw-stage img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; user-select: none; -webkit-user-drag: none; }
.jr-vw-stage img.draw { background: #fff; padding: 12px; }
.jr-vb { display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px; padding: 0; margin: 0; border-radius: 50%; border: 0; background: rgba(255,255,255,.12); color: #fff; cursor: pointer; transition: background-color .2s ease; }
.jr-vb:hover { background: rgba(255,255,255,.24); }
.jr-vb svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.jr-vb:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.jr-vw-prev, .jr-vw-next { position: absolute; top: 50%; transform: translateY(-50%); }
.jr-vw-prev { left: max(16px, env(safe-area-inset-left)); }
.jr-vw-next { right: max(16px, env(safe-area-inset-right)); }

/* ── Stock plan page ──────────────────────────────────── */
.jr-plan-top { padding: 20px 0 64px; }
.jr-plan-grid { display: grid; gap: 32px; margin-top: 8px; }
.jr-stage { display: grid; gap: 12px; }
.jr .jr-main-ph { display: block; width: 100%; padding: 0; margin: 0; border: 0; background: var(--jr-cream); aspect-ratio: 5 / 3; cursor: zoom-in; overflow: hidden; }
.jr-main-ph img { width: 100%; height: 100%; object-fit: contain; }
.jr-main-ph.cover img { object-fit: cover; }
.jr-thumbs { display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 56px) / 8); gap: 8px; overflow-x: auto; scrollbar-width: thin; }
.jr .jr-thumbs button { border: 1px solid var(--jr-rule); background: #fff; padding: 0; margin: 0; aspect-ratio: 4 / 3; cursor: pointer; overflow: hidden; }
.jr-thumbs button img { width: 100%; height: 100%; object-fit: cover; }
.jr-thumbs button.draw img { object-fit: contain; padding: 3px; }
.jr .jr-thumbs button[aria-pressed="true"] { outline: 2px solid var(--jr-navy); outline-offset: 1px; }
.jr-buy { display: grid; gap: 22px; align-content: start; }
.jr .jr-buy h1 { font-size: clamp(42px, 4.6vw, 60px); line-height: 1.02; }
.jr-specs { display: grid; grid-template-columns: repeat(var(--cols, 4), minmax(0, 1fr)); border-top: 1px solid var(--jr-rule); border-bottom: 1px solid var(--jr-rule); margin: 0; }
.jr-specs div { padding: 16px 0; }
.jr-specs div { padding-left: 16px; border-left: 1px solid var(--jr-rule); }
/* first cell of each row starts flush, rows after the first get a top rule */
.jr-specs[style*="--cols:1"] div, .jr-specs[style*="--cols:2"] div:nth-child(2n+1), .jr-specs[style*="--cols:3"] div:nth-child(3n+1), .jr-specs[style*="--cols:4"] div:nth-child(4n+1) { padding-left: 0; border-left: 0; }
.jr-specs[style*="--cols:2"] div:nth-child(n+3), .jr-specs[style*="--cols:3"] div:nth-child(n+4), .jr-specs[style*="--cols:4"] div:nth-child(n+5) { border-top: 1px solid var(--jr-rule); }
.jr-specs dt { white-space: nowrap; }
.jr-specs dd { display: block; margin: 0; font: 500 30px/1.1 var(--jr-serif); color: var(--jr-navy); white-space: nowrap; font-variant-numeric: lining-nums; }
.jr-specs dt { font-size: 14px; font-weight: 400; color: var(--jr-muted); }
.jr-specs div { display: flex; flex-direction: column-reverse; justify-content: flex-end; }
.jr-specs.long { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.jr-specs.long div { padding-left: 16px; border-left: 1px solid var(--jr-rule); border-top: 0; }
.jr-specs.long div:nth-child(odd) { padding-left: 0; border-left: 0; }
.jr-specs.long div:nth-child(n+3) { border-top: 1px solid var(--jr-rule); }
.jr-specs.long dd { font-size: 22px; white-space: normal; }
.jr-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; }
.jr-price b { font: 600 40px/1 var(--jr-serif); color: var(--jr-navy); font-variant-numeric: lining-nums; }
.jr-price span { font-size: 15px; color: var(--jr-muted); }
.jr-buy .jr-acts .jr-btn { flex: 1 1 200px; }
.jr-sheets { background: var(--jr-cream); padding: 72px 0; }
.jr-sheets-h { display: grid; gap: 8px; margin-bottom: 28px; }
.jr .jr-sheets h2, .jr .jr-about h2 { font-size: clamp(32px, 4vw, 44px); line-height: 1.08; }
.jr .jr-sheets-h p { color: var(--jr-muted); max-width: 72ch; }
.jr-sheet-group + .jr-sheet-group { margin-top: 40px; }
.jr .jr-sheet-group h3 { font: 600 16px/1.4 var(--jr-sans); color: var(--jr-ink); margin-bottom: 14px; }
.jr-sgrid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.jr-sgrid.big { grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr)); }
.jr .jr-sgrid a { display: grid; gap: 10px; text-decoration: none; color: var(--jr-ink); cursor: zoom-in; font-size: 15px; }
.jr-sgrid .ph { background: #fff; border: 1px solid var(--jr-rule); aspect-ratio: 5 / 4; padding: 10px; }
.jr-sgrid img { width: 100%; height: 100%; object-fit: contain; }
.jr-about { padding: 80px 0; }
.jr-about .jr-wrap { display: grid; gap: 28px; }
.jr-about .jr-story { max-width: 68ch; }
.jr-about .jr-story p, .jr-about .jr-story li { font-size: 17px; line-height: 1.75; }

/* ── Home: homes we've designed + plan list ───────────── */
.jr-homes { padding: 72px 0 120px; background: #fff; }
.jr-homes .head { text-align: center; max-width: 760px; margin: 0 auto 48px; padding: 0 20px; }
/* the section heading sits outside .jr on purpose, so it keeps the theme's own h2 look */
.jr-homes .head p { color: #424656; font-size: 18px; line-height: 1.7; margin: 0; }
.jr-grid { display: grid; gap: 40px 28px; padding: 0 max(3vw, 20px); max-width: 1760px; margin: 0 auto; }
.jr .jr-home { display: block; text-decoration: none !important; color: inherit; }
.jr-home .ph { position: relative; overflow: hidden; aspect-ratio: 3 / 2; background: var(--jr-sand2); }
.jr-home img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.22,.61,.36,1); }
.jr-home:hover img { transform: scale(1.03); }
.jr .jr-home h3 { font-family: var(--jr-serif); font-weight: 300; text-transform: uppercase; color: var(--jr-steel); font-size: 34px; line-height: 1.1; margin: 18px 0 4px; letter-spacing: 0; }
.jr .jr-home p { margin: 0; color: #424656; font-size: 16px; }
.jr-home .go, .jr-plan .go { display: inline-block; margin-top: 10px; color: var(--jr-navy); font-size: 15px; font-weight: 600; border-bottom: 1px solid var(--jr-navy); padding-bottom: 2px; }
.jr-home:focus-visible, .jr-plan:focus-visible { outline: 2px solid var(--jr-navy); outline-offset: 6px; }
.jr-more-btn { text-align: center; margin-top: 56px; }
.jr-plans { display: grid; gap: 18px; width: 100%; max-width: 640px; }
.jr .jr-plan { display: grid; grid-template-columns: 200px 1fr; gap: 22px; align-items: center; background: #fff; padding: 14px; text-decoration: none !important; color: inherit; }
.jr .jr-plan img { width: 100%; height: auto; align-self: center; aspect-ratio: 5 / 3; object-fit: cover; }
.jr .jr-plan h3 { font-family: var(--jr-serif); font-weight: 300; text-transform: uppercase; color: var(--jr-steel); font-size: 30px; line-height: 1.05; margin: 0 0 4px; letter-spacing: 0; }
.jr .jr-plan p { margin: 0; color: #424656; font-size: 15px; line-height: 1.5; }
.jr .jr-plan .pr { color: var(--jr-navy); font-weight: 600; font-size: 17px; margin-top: 6px; }
.jr-plan .nw { white-space: nowrap; }
.ready-to-build-images.jr { display: flex; align-items: center; justify-content: center; }

/* ── Projects page grid ───────────────────────────────── */
.jr-projects { padding: 90px 0 110px; }
.jr .jr-projects .jr-home h3 { font-size: 38px; }

/* ── Wider screens ────────────────────────────────────── */
@media (min-width: 768px) {
  .jr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .jr-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 992px) {
  .jr-intro .jr-wrap { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 72px; align-items: start; }
  .jr-cta .jr-wrap { grid-template-columns: minmax(0, 1fr) auto; align-items: end; column-gap: 64px; }
  .jr-cta .jr-acts { grid-row: 1 / 3; grid-column: 2; align-self: center; }
  .jr-plan-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 56px; align-items: start; }
  .jr-buy { position: sticky; top: 24px; }
  .jr-about .jr-wrap { grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 72px; }
  .jr-cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1200px) {
  .jr-homes .jr-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1199px) {
  .ready-to-build-images.jr { padding: 60px 32px; }
  .jr .jr-plan { grid-template-columns: 1fr; gap: 14px; padding: 0 0 18px; }
  .jr-plan > div { padding: 0 18px; }
  .jr .jr-plan img { aspect-ratio: 16 / 9; }
}
@media (max-width: 767px) {
  .jr-hero { height: auto; min-height: 0; aspect-ratio: 3 / 2; }
  .jr-hero img { object-position: 50% 50%; }
  .jr-intro { padding: 20px 0 40px; }
  .jr p, .jr-about .jr-story p { font-size: 16px; }
  .jr-jg { gap: 8px; }
  .jr-specs div + div { padding-left: 10px; }
  .jr-specs dd { font-size: 24px; }
  .jr-specs.long dd { font-size: 19px; }

  .jr-facts dd { font-size: 20px; }
  .jr-facts.words { grid-template-columns: 1fr; gap: 12px; }
  .jr .jr-rooms a { padding: 12px 0 10px; }
  .jr-specs dt { font-size: 13px; }
  .jr-thumbs { grid-auto-columns: 76px; scrollbar-width: none; }
  .jr-vw-stage { padding: 0 0 84px; }
  .jr-vw-prev, .jr-vw-next { top: auto; bottom: max(20px, env(safe-area-inset-bottom)); transform: none; width: 52px; height: 52px; }
  .jr-vw-prev { left: calc(50% - 64px); }
  .jr-vw-next { right: calc(50% - 64px); }
  .jr-homes { padding: 56px 0 80px; }
  .jr .jr-home h3, .jr .jr-projects .jr-home h3 { font-size: 30px; }
  .jr .jr-plan h3 { font-size: 28px; }
  .ready-to-build-images.jr { padding: 40px 16px; }
  .jr-projects { padding: 48px 0 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .jr-jg img, .jr-card img, .jr-home img { transition: none; }
}

/* ── Accessibility button on the LEFT (Jax 2026-12-01: it covered back-to-top) ──
   The widget injects its own styles at runtime, so these need !important. */
#a11yw { right: auto !important; left: 1rem !important; }
#a11yw #a11yw-panel { right: auto !important; left: 0 !important; }
@media (min-width: 1921px) { #a11yw { left: calc((100vw - 1920px) / 2 + 1rem) !important; } }
