/* The homepage: a room at night (designed by Codex as "Redesign B", 2026-10-25).
 * Every project is an object in the room, drawn with the site's existing card art;
 * the furniture is flat shapes in the same palette. The plain list underneath is the
 * same links in reading order, for anyone who'd rather read than look around. */
body.home-room { margin: 0; padding: 0; }
.room-head { max-width: 1100px; margin: 0 auto; padding: 22px 18px 12px; display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 16px; }
.room-head h1 { margin: 0; font-size: clamp(1.5rem, 3.4vw, 2.2rem); }
.room-head p { margin: 0; color: var(--muted); }

.room-wrap { position: relative; max-width: 1240px; margin: 0 auto; padding: 0 12px; }
.room-scroll { overflow-x: auto; border-radius: 18px; box-shadow: var(--shadow); scrollbar-width: thin; }
.room-svg { display: block; width: 100%; min-width: 980px; height: auto; }
.room-hint { display: none; text-align: center; color: var(--muted); font-size: 0.85rem; margin: 8px 0 0; }
@media (max-width: 1000px) { .room-hint { display: block; } }

/* Scene colours: a warm lamp-lit night by default (the site is dark first),
 * a sunny afternoon in light mode. */
.room-svg { --wall: #f6e1d2; --dots: #edcfbd; --floor: #d6a98c; --plank: #c99b7f; --base: #e7c6b0;
            --wood: #a8705c; --wood2: #8e5b4a; --fabric: #e0917f; --fabric2: #c97767; --cream: #fff4e8;
            --sky1: #a9d0ec; --sky2: #fbe3cf; --frame: #fff4e8; --cork: #d9a777; --star: #ffffff00;
            --glow: #fff2c000; --shade: #f6c58f; --ink2: #6b4a4a; }
html.dark .room-svg { --wall: #2a2350; --dots: #322a5e; --floor: #3a2944; --plank: #31233b; --base: #463764;
            --wood: #8a5a4a; --wood2: #6c4439; --fabric: #c86f73; --fabric2: #a9585d; --cream: #f6e3cf;
            --sky1: #0b1030; --sky2: #26306a; --frame: #e9cdb6; --cork: #b88559; --star: #fff6d8;
            --glow: #ffd99a; --shade: #f2b46e; --ink2: #f0ecf6; }
.room-svg .wall { fill: var(--wall); } .room-svg .dot { fill: var(--dots); }
.room-svg .floor { fill: var(--floor); } .room-svg .plank { stroke: var(--plank); stroke-width: 3; }
.room-svg .base { fill: var(--base); }
.room-svg .wood { fill: var(--wood); } .room-svg .wood2 { fill: var(--wood2); }
.room-svg .fabric { fill: var(--fabric); } .room-svg .fabric2 { fill: var(--fabric2); }
.room-svg .cream { fill: var(--cream); } .room-svg .frame { fill: var(--frame); }
.room-svg .cork { fill: var(--cork); } .room-svg .star { fill: var(--star); }
.room-svg .shade { fill: var(--shade); }
.room-svg .glow { fill: url(#lampGlow); }
/* Furniture art (img/room/) is painted in daylight colors; dim it to sit in the night room. */
/* Furniture is scenery: clicks pass through it to the objects (the rug lies under the table). */
.room-svg .furn { pointer-events: none; }
html.dark .room-svg .furn { filter: brightness(0.78) saturate(0.92); }
html:not(.dark) .room-svg .glow, html:not(.dark) .room-svg .moon-g { opacity: 0.35; }

/* Objects: lift a little and show their name on hover or keyboard focus. */
.obj { cursor: pointer; outline: none; }
.obj .art { transition: transform 0.25s ease; transform-box: fill-box; transform-origin: 50% 100%; }
.obj:hover .art, .obj:focus-visible .art { transform: translateY(-6px) scale(1.04); }
.room-labels { pointer-events: none; }
.room-labels .lbl { opacity: 0; }
.room-labels .lbl.is-visible { opacity: 1; }
.room-labels .lbl rect { fill: var(--card); stroke: var(--primary); stroke-width: 2; }
.room-labels .lbl text { fill: var(--ink); font: 700 22px "Fredoka", "Nunito", sans-serif; }
.obj:focus-visible .ring { stroke: var(--primary); stroke-width: 4; stroke-dasharray: 8 6; fill: none; }
.obj .ring { fill: none; stroke: none; }
.swing { transform-box: view-box; transform-origin: 1010px 0; animation: swing 7s ease-in-out infinite; }
@keyframes swing { 0%, 100% { transform: rotate(1.6deg); } 50% { transform: rotate(-1.6deg); } }
.twinkle { animation: tw 4s ease-in-out infinite; }
@keyframes tw { 50% { opacity: 0.35; } }
@media (prefers-reduced-motion: reduce) {
  .swing, .twinkle { animation: none; }
  .obj .art { transition: none; }
}

/* The same links as a list. */
.room-below { max-width: 1100px; margin: 0 auto; padding: 28px 18px 20px; }
.room-kicker { margin: 0 0 8px; font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); font-weight: 800; }
.room-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px 26px; margin-top: 10px; }
.room-list h2 { margin: 0 0 6px; font-size: 1.1rem; color: var(--c-light); }
html.dark .room-list h2 { color: var(--c-dark); }
.room-list ul { list-style: none; margin: 0; padding: 0; }
.room-list li { margin: 0 0 4px; }
.room-list li a { color: var(--ink); text-decoration: none; font-weight: 600; }
.room-list li a:hover, .room-list li a:focus-visible { color: var(--primary-dark); text-decoration: underline; }
.room-list .new { font-size: 0.7rem; font-weight: 800; color: var(--primary-dark); margin-left: 6px; }
.room-guest { margin-top: 26px; color: var(--muted); }
.room-guest a { color: var(--primary-dark); font-weight: 800; }
.home-room footer { max-width: 1100px; margin: 0 auto; padding: 0 18px 40px; }

/* The site-wide --muted (#7a7a9b) is 3.7:1 on the light theme's cream background; the
   homepage's small print sits straight on that background, so it gets a deeper grey here
   (4.4:1 even over the peach and teal corner glows). Section colours above are likewise
   the deeper light-theme shades. */
html:not(.dark) .home-room { --muted: #5f5e7e; }
html:not(.dark) .room-list .new, html:not(.dark) .room-guest a,
html:not(.dark) .room-list li a:hover, html:not(.dark) .room-list li a:focus-visible { color: #b0306a; }
/* Leave room for the floating theme button in the top-right corner. */
@media (max-width: 700px) { .room-head { padding-right: 70px; } }
