/* Print ideas (on request): the same room before and after, split by a handle to drag, and the wide tile under the
   hero that leads to it. js/ideas.js, js/ideas-data.js. Pictures and short names do the talking. */

/* ── The wide tile under the three big ones: three rooms, each half before and half after ── */
.ideas-tile { display: block; margin-top: clamp(16px, 2.6vw, 28px); color: var(--ink); text-decoration: none; }
.ideas-tile-pics { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(10px, 1.8vw, 22px); }
.ideas-half { position: relative; display: block; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: var(--panel); box-shadow: 0 1px 2px rgba(24, 23, 22, .06), 0 10px 26px -18px rgba(24, 23, 22, .35); }
.ideas-half img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ideas-half img.is-before { clip-path: inset(0 50% 0 0); }
.ideas-half::after { content: ''; position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 0 1px rgba(24, 23, 22, .12); }
.ideas-tile-pics .render-tag { position: absolute; left: 8px; top: 8px; z-index: 1; }
.ideas-tile-text { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 12px; margin-bottom: 10px; }
.ideas-tile-text b { grid-column: 1; font: 400 clamp(1.3rem, 2.4vw, 1.8rem)/1.15 var(--display); letter-spacing: -.01em; }
.ideas-tile-text small { grid-column: 1; color: var(--muted); font-size: .9rem; }
.ideas-tile-go { grid-column: 2; grid-row: 1 / span 2; color: var(--accent); font-size: 1.3rem; }
.ideas-tile:hover b { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.ideas-tile:focus-visible { outline: 2px solid var(--ink); outline-offset: 6px; border-radius: 14px; }
@media (max-width: 640px) { .ideas-half { border-radius: 10px; aspect-ratio: 4 / 3; } .ideas-tile-pics .render-tag { left: 5px; top: 5px; font-size: .68rem; padding: 2px 6px; } }

/* ── The section ── */
.ideas { display: grid; gap: clamp(18px, 2.6vw, 34px); }
@media (min-width: 960px) { .ideas { grid-template-columns: minmax(0, 1.75fr) minmax(250px, 1fr); align-items: start; } }

/* the picture slot */
.ba { --pos: 50%; position: relative; aspect-ratio: 1168 / 880; overflow: hidden; border-radius: 18px; background: var(--panel); box-shadow: 0 1px 2px rgba(24, 23, 22, .06), 0 22px 48px -28px rgba(24, 23, 22, .45); cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; -webkit-user-drag: none; }
.ba-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.ba-line { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 0 1px rgba(24, 23, 22, .14); pointer-events: none; }
.ba-knob { position: absolute; top: 50%; left: 50%; display: grid; place-items: center; width: 48px; height: 48px; margin: -24px 0 0 -24px; border-radius: 50%; background: #fff; color: var(--ink); box-shadow: 0 2px 10px rgba(24, 23, 22, .3); }
.ba-tag { position: absolute; bottom: 12px; padding: 5px 11px; border-radius: 999px; background: rgba(24, 23, 22, .62); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); color: #fff; font-size: .78rem; font-weight: 600; letter-spacing: .04em; pointer-events: none; }
.ba-tag-before { left: 12px; }
.ba-tag-after { right: 12px; background: var(--accent); }
.ba .render-tag { position: absolute; left: 12px; top: 12px; }
/* the range is only for the keyboard and screen readers: fingers and the mouse drag the picture itself */
.ba input[type="range"] { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; pointer-events: none; }
.ba:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.ba:has(input:focus-visible) .ba-knob { box-shadow: 0 0 0 3px var(--accent), 0 2px 10px rgba(24, 23, 22, .3); }

/* what's printed in the picture: short names, nothing more */
.ideas-pieces { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.ideas-pieces li { padding: 6px 12px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--panel); color: var(--ink); font-size: .88rem; line-height: 1.2; }
.ideas-pieces li:first-child { border-color: var(--ink); font-weight: 600; }

/* the rooms to pick from */
.ideas-group + .ideas-group { margin-top: 18px; }
.ideas-group h3 { margin: 0 0 8px; color: var(--muted); font: 600 .78rem/1.2 var(--sans, inherit); letter-spacing: .1em; text-transform: uppercase; }
.ideas-thumbs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.ideas-thumb { display: block; padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.ideas-thumb img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 10px; outline: 2px solid transparent; outline-offset: 2px; transition: outline-color var(--quick); }
.ideas-thumb span { display: block; margin-top: 6px; font-size: .86rem; line-height: 1.2; }
.ideas-thumb:hover img { outline-color: var(--line-2); }
.ideas-thumb[aria-pressed="true"] img { outline-color: var(--accent); }
.ideas-thumb[aria-pressed="true"] span { color: var(--accent); font-weight: 600; }
.ideas-thumb:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; border-radius: 10px; }

.ideas-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.ideas-cta p { flex-basis: 100%; margin: 0; font: 400 1.35rem/1.2 var(--display); letter-spacing: -.01em; }
.ideas-cta .btn { flex: 1 1 140px; justify-content: center; min-height: 46px; }

@media (max-width: 640px) {
  .ba { border-radius: 14px; }
  .ba-knob { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
  .ba-tag { bottom: 8px; padding: 4px 9px; font-size: .72rem; }
  .ba-tag-before { left: 8px; } .ba-tag-after { right: 8px; }
  .ba .render-tag { left: 8px; top: 8px; }
  .ideas-pieces { gap: 6px; margin-top: 10px; }
  .ideas-pieces li { padding: 5px 10px; font-size: .82rem; }
  .ideas-thumb span { font-size: .8rem; }
}
/* short, zoomed-in screens: the picture never takes more than the screen */
@media (max-height: 520px) { .ba { max-height: 78vh; aspect-ratio: auto; height: 78vh; } }
@media (prefers-reduced-motion: reduce) { .ideas-thumb img { transition: none; } }

/* ── The menu with eight tabs ── phones: the second row has five, so the tab says just "Ideas" and the row sits a
   little closer together; it stays two rows down to 360 px wide. */
@media (max-width: 700px) {
  .nav nav.tabs .tab-long { display: none; }
  .nav nav.tabs:has(.tab-break) { column-gap: clamp(9px, 3.4vw, 24px); }
  .nav nav.tabs .tab-break ~ a { letter-spacing: .04em; }
}
@media (max-width: 900px) and (min-width: 701px) { .nav nav.tabs { gap: 0 clamp(8px, 1.5vw, 16px); } .nav nav.tabs a { letter-spacing: .09em; } } /* (eight on one row) */
@media (max-width: 370px) { .nav nav.tabs:has(.tab-break) { column-gap: 7px; } .nav nav.tabs .tab-break ~ a { letter-spacing: .01em; } }
@media (max-width: 780px) and (min-width: 701px) { .nav nav.tabs { gap: 0 9px; } .nav nav.tabs a { letter-spacing: .05em; } }

/* ── Phones: "Or have a look around" bigger (on request: the three tiles and the Print ideas row were too small to
   make out). The three tiles stay three across but grow taller with a tighter gap, so each photo is bigger; Print
   ideas shows one room across the whole width instead of three thumbnails. ── */
@media (max-width: 640px) {
  .choose h2 { margin-bottom: 14px; }
  #pick-grid { gap: 8px; margin: 0 -6px; }
  #pick-grid .pick-img { aspect-ratio: 3 / 4; }
  #pick-grid .pick b { font-size: 1.15rem; padding: 6px 4px; }
  .ideas-tile { margin-top: 14px; }
  .ideas-tile-pics { grid-template-columns: minmax(0, 1fr); }
  .ideas-tile-pics .ideas-half { aspect-ratio: 16 / 10; border-radius: 14px; }
  .ideas-tile-pics .ideas-half ~ .ideas-half { display: none; }
  .ideas-tile-pics .render-tag { left: 8px; top: 8px; }
}

/* ── The big tiles' names and "Print ideas": bigger and clearer (on request). Bold lettering on a solid plate,
   on phones and computers alike. ── */
#pick-grid .pick b { font-weight: 700; font-size: clamp(1.6rem, 3vw, 2.4rem); line-height: 1.05; letter-spacing: 0; padding: 10px 6px; }
#pick-grid .pick b::before { inset: -4px 0; background: linear-gradient(180deg, rgba(247, 246, 242, 0) 0%, #f7f6f2 14%, #f7f6f2 86%, rgba(247, 246, 242, 0) 100%); }
#pick-grid .pick[aria-pressed="true"] b::before { background: linear-gradient(180deg, rgba(24, 23, 22, 0) 0%, #181716 14%, #181716 86%, rgba(24, 23, 22, 0) 100%); }
.ideas-tile-text b { font-weight: 700; font-size: clamp(1.6rem, 2.8vw, 2.2rem); }
.ideas-tile-text small { color: var(--ink); font-size: 1rem; }
@media (max-width: 640px) {
  #pick-grid .pick b { font-size: 1.45rem; padding: 8px 2px; }
}
#pick-grid .pick small { color: var(--ink); font-size: .98rem; }
