/* shidiq — bio page
   Layout: one blue card with a side rail, a yellow panel on the right,
   and a pendant lamp hanging from the top of the viewport. */

:root {
  --wall: #2f6d8d;
  --wall-deep: #22556f;
  --card: #4fb8d6;
  --card-deep: #44adcc;
  --panel: #ffc62d;
  --tile: #ffe7a1;
  --tile-ink: #3b2f10;
  --accent: #6b6cf6;
  --ink: #fff;
  --ink-dim: rgba(255, 255, 255, .8);
  --rail-ink: #173646;
  --glow: #ffd36a;

  --radius: 42px;
  --stage-w: min(1180px, 94vw);
  --stage-h: min(640px, 78svh);
  --stage-top: calc((100svh - var(--stage-h)) / 2);

  --shade-w: 190px;
  --shade-h: 150px;
  --av: 138px;
  --cord-h: calc(var(--stage-top) - 34px);
  --pendant-x: 21%;

  --title-size: clamp(72px, 10.5vw, 168px);
  --orb: 98px;

  --beam-op: .55;
  --glow-op: .8;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

html[data-lights="off"] {
  --wall: #0f1b23;
  --wall-deep: #0a1319;
  --card: #163b4b;
  --card-deep: #123242;
  --panel: #d9a41c;
  --tile: #f3cf63;
  --rail-ink: #bcd6e0;
  --ink-dim: rgba(255, 255, 255, .72);
  --beam-op: 1;
  --glow-op: 1;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--wall);
  color: var(--ink);
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
  transition: background-color .7s ease;
}
body::before {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 255, 255, .09), transparent 60%),
    linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .3));
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  opacity: .07;
  mix-blend-mode: overlay;
}
button { font: inherit; }
button:focus-visible, a:focus-visible { outline: 2px solid #fff; outline-offset: 3px; border-radius: 14px; }
svg.sprite { display: none; }
img { display: block; }

/* ---------- room / stage ---------- */
.room {
  position: relative; z-index: 1;
  min-height: 100svh;
  display: grid; place-items: center;
  perspective: 1600px;
}
.stage {
  position: relative; z-index: 2;
  width: var(--stage-w); height: var(--stage-h);
  display: flex;
  transform: rotateX(calc(var(--my, 0) * -1.2deg)) rotateY(calc(var(--mx, 0) * 1.6deg));
  transition: transform .6s var(--ease-out);
  transform-style: preserve-3d;
}
.card {
  flex: 1; min-width: 0;
  display: grid; grid-template-columns: 92px 1fr;
  background: linear-gradient(160deg, var(--card), var(--card-deep));
  border-radius: var(--radius) 0 0 var(--radius);
  box-shadow: 0 60px 90px -36px rgba(0, 0, 0, .5), 0 24px 40px -24px rgba(0, 0, 0, .3);
  position: relative;
  transition: background .7s;
}
.panel {
  width: 252px; flex: none;
  background: var(--panel);
  color: var(--tile-ink);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 36px 26px 30px;
  display: flex; flex-direction: column; gap: 24px;
  box-shadow: 0 60px 90px -36px rgba(0, 0, 0, .5);
  position: relative;
  transition: background .7s;
}

/* ---------- rail ---------- */
.rail {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 32px 0 26px;
}
.rail-pill {
  position: absolute; left: 50%; top: 0;
  width: 48px; height: 48px; margin-left: -24px;
  border-radius: 15px; background: var(--accent);
  transform: translate(0, var(--y, 32px));
  transition: transform .55s var(--spring);
  box-shadow: 0 14px 26px -12px rgba(107, 108, 246, .8);
  z-index: 0;
}
.rail-btn, .rail-down {
  position: relative; z-index: 1;
  width: 48px; height: 48px; border: 0; background: transparent;
  border-radius: 15px; color: var(--rail-ink);
  display: grid; place-items: center; cursor: pointer;
  transition: color .35s, transform .25s;
}
.rail-btn:hover { transform: translateY(-2px); }
.rail-btn.is-active { color: #fff; }
.rail-btn svg, .rail-down svg {
  width: 22px; height: 22px; fill: none; stroke: currentColor;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round;
}
.rail-down { margin-top: auto; animation: nudge 2.8s ease-in-out infinite; }
@keyframes nudge { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(5px); } }

/* ---------- center ---------- */
.center {
  position: relative; min-width: 0;
  display: flex; flex-direction: column;
  padding: 34px 40px 30px 30px;
}
.topbar { position: absolute; top: 30px; right: 36px; display: flex; gap: 14px; z-index: 3; }
.icon-btn {
  width: 40px; height: 40px; border: 0; background: transparent; color: #fff;
  display: grid; place-items: center; cursor: pointer; border-radius: 12px;
  transition: transform .3s var(--spring), background .3s;
}
.icon-btn:hover { transform: translateY(-2px) scale(1.06); background: rgba(255, 255, 255, .12); }
.icon-btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#lightsBtn { color: var(--panel); filter: drop-shadow(0 0 8px rgba(255, 214, 110, .7)); }
html[data-lights="off"] #lightsBtn { color: rgba(255, 255, 255, .55); filter: none; }

.title {
  font-family: Pacifico, "Brush Script MT", cursive;
  font-weight: 400; font-size: var(--title-size);
  line-height: 1.1; margin: auto 0 0; padding-left: 1.3em;
  color: #fff; letter-spacing: .004em; white-space: nowrap;
  min-height: 1.1em;
  text-shadow: 0 14px 34px rgba(0, 0, 0, .14);
}
html[data-lights="off"] .title { text-shadow: 0 0 40px rgba(255, 214, 110, .25), 0 14px 34px rgba(0, 0, 0, .3); }
.title span { display: inline-block; will-change: transform, opacity; }
.swash {
  width: 140px; height: 16px; margin: -4px 0 0 calc(.95em * 1.6 + 2.2em);
  stroke: #fff; stroke-width: 3; fill: none; stroke-linecap: round; opacity: .9;
  font-size: var(--title-size); /* lets the em margin track the title */
  margin-left: calc(var(--title-size) * 2.05);
}
.content { margin-top: 22px; min-height: 198px; position: relative; }

.lede {
  margin: 0 0 14px .3em; font-size: 13.5px; color: var(--ink-dim);
  display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center;
}
.lede b { color: #fff; font-weight: 600; }
.lede i { font-style: normal; display: inline-flex; align-items: center; gap: 5px; }
.lede svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------- shelf (hanging items) ---------- */
.shelf { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: center; }
.shelf-items { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.orb-item {
  display: grid; justify-items: center;
  background: none; border: 0; padding: 0; color: #fff; cursor: pointer;
  text-align: left; text-decoration: none; position: relative;
}
.orb-swing { display: grid; justify-items: center; transform-origin: 50% 0; animation: orbSway 5.6s ease-in-out infinite; }
.orb-item:nth-child(2) .orb-swing { animation-delay: -1.4s; animation-duration: 6.1s; }
.orb-item:nth-child(3) .orb-swing { animation-delay: -2.9s; animation-duration: 5.2s; }
.orb-item:nth-child(4) .orb-swing { animation-delay: -4.1s; animation-duration: 6.6s; }
.orb-item:nth-child(5) .orb-swing { animation-delay: -0.7s; animation-duration: 5.9s; }
.feature .orb-swing { animation-delay: -3.3s; animation-duration: 6.3s; }
@keyframes orbSway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }
.orb-cord { display: block; width: 2px; height: 24px; background: rgba(15, 38, 50, .6); }
.orb-cap { display: block; width: 16px; height: 5px; border-radius: 2px; background: #1a3744; margin-bottom: -1px; }
.orb {
  width: var(--orb); height: var(--orb); border-radius: 50%;
  display: grid; place-items: center; overflow: hidden;
  background: radial-gradient(circle at 34% 28%, #fff 0, var(--tint, #fff) 42%, color-mix(in srgb, var(--tint, #fff) 78%, #1a3744) 100%);
  box-shadow: inset -10px -12px 24px rgba(0, 0, 0, .1), inset 8px 10px 16px rgba(255, 255, 255, .6), 0 28px 34px -18px rgba(0, 0, 0, .5);
  transition: transform .4s var(--spring), box-shadow .4s;
}
.orb img { width: 56%; height: 56%; object-fit: contain; border-radius: 20%; }
.orb.is-wide img { width: 66%; height: 44%; border-radius: 0; }
.orb-item:hover .orb { transform: translateY(-5px) scale(1.05); box-shadow: inset -10px -12px 24px rgba(0, 0, 0, .1), inset 8px 10px 16px rgba(255, 255, 255, .6), 0 36px 40px -18px rgba(0, 0, 0, .55); }
.orb-item:hover .orb-cord { transform: scaleY(1.08); transform-origin: top; }
.cap {
  justify-self: start; margin: 12px 0 0 calc(50% - var(--orb) / 2);
  font-size: 12.5px; line-height: 1.35; color: var(--ink-dim); max-width: 100%;
}
.cap i { display: block; width: 12px; height: 2px; background: currentColor; opacity: .7; margin-bottom: 8px; }
.cap b { display: block; font-weight: 600; color: #fff; font-size: 13px; }
.panel .cap { color: rgba(59, 47, 16, .72); }
.panel .cap b { color: #3b2f10; }

.dots { display: none; }

.arrow {
  width: 44px; height: 44px; border-radius: 50%; border: 0; background: #fff; color: #1f3340;
  display: grid; place-items: center; cursor: pointer;
  box-shadow: 0 14px 24px -12px rgba(0, 0, 0, .5);
  transition: transform .3s var(--spring), background .3s;
  margin-bottom: 30px;
}
.arrow:hover { transform: scale(1.1); }
.arrow:active { transform: scale(.94); }
.arrow svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- panel ---------- */
.tiles { display: grid; grid-template-columns: repeat(2, 64px); gap: 14px 20px; justify-content: center; }
.tile {
  width: 64px; height: 64px; border-radius: 20px; background: var(--tile); color: var(--tile-ink);
  display: grid; place-items: center; border: 0; cursor: pointer; text-decoration: none; position: relative;
  box-shadow: 0 10px 18px -12px rgba(0, 0, 0, .35);
  transition: transform .35s var(--spring), background .3s, box-shadow .3s;
}
.tile:hover { transform: translateY(-4px); background: #fff; box-shadow: 0 18px 26px -14px rgba(0, 0, 0, .45); }
.tile svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.tile svg.fill { fill: currentColor; stroke: none; width: 22px; height: 22px; }
.tile img { width: 28px; height: 28px; }
.tile.ghost { background: transparent; box-shadow: none; }
.tile.ghost:hover { background: rgba(255, 255, 255, .5); }
.tip {
  position: absolute; bottom: -28px; left: 50%;
  transform: translateX(-50%) translateY(4px);
  background: #1f2a30; color: #fff; font-size: 11px; padding: 4px 8px; border-radius: 8px;
  white-space: nowrap; opacity: 0; pointer-events: none; transition: all .25s; z-index: 5;
}
.tile:hover .tip, .mailrow:hover .tip { opacity: 1; transform: translateX(-50%) translateY(0); }

.feature { margin-top: auto; display: grid; grid-template-columns: 1fr 44px; align-items: center; gap: 8px; }
.feature.wide { grid-template-columns: 1fr; }
.fcard {
  background: rgba(255, 255, 255, .55); border-radius: 22px; padding: 16px 16px 14px;
  color: var(--tile-ink); display: grid; gap: 8px; text-decoration: none; border: 0; text-align: left; cursor: pointer;
  transition: background .3s, transform .3s var(--spring);
}
.fcard:hover { background: #fff; transform: translateY(-3px); }
.fcard small { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; font-weight: 600; }
.fcard b { font-size: 15px; font-weight: 600; line-height: 1.3; word-break: break-word; }
.fcard p { margin: 0; font-size: 12.5px; line-height: 1.45; opacity: .8; }
.fcard img { width: 24px; height: 24px; }
.fcard svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- views ---------- */
.about { max-width: 600px; padding-left: .3em; }
.about p { margin: 0 0 10px; font-size: 15px; line-height: 1.65; color: rgba(255, 255, 255, .94); }
.facts { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { background: rgba(255, 255, 255, .16); border-radius: 14px; padding: 8px 14px; font-size: 13px; display: grid; gap: 1px; }
.facts small { font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; opacity: .7; }
.facts b { font-weight: 600; }

.linklist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; }
.linklist a {
  display: grid; grid-template-columns: 40px 1fr 18px; align-items: center; gap: 12px;
  padding: 8px 12px 8px 8px; border-radius: 16px; background: rgba(255, 255, 255, .14); color: #fff; text-decoration: none;
  transition: background .25s, transform .3s var(--spring);
}
.linklist a:hover { background: rgba(255, 255, 255, .26); transform: translateX(3px); }
.li-ic { width: 40px; height: 40px; border-radius: 12px; background: #fff; color: #1f3340; display: grid; place-items: center; overflow: hidden; }
.li-ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.li-ic svg.fill { fill: currentColor; stroke: none; width: 18px; height: 18px; }
.li-ic img { width: 70%; height: 70%; object-fit: contain; }
.li-t { min-width: 0; }
.li-t b { display: block; font-size: 14px; font-weight: 600; }
.li-t small { display: block; font-size: 12px; color: var(--ink-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.li-out { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }

.contact { display: grid; gap: 14px; max-width: 640px; }
.mailrow {
  position: relative;
  display: grid; grid-template-columns: 48px 1fr auto; align-items: center; gap: 14px;
  padding: 10px 16px 10px 10px; border-radius: 20px; background: #fff; color: #17303d; border: 0; cursor: pointer; text-align: left;
  box-shadow: 0 20px 30px -18px rgba(0, 0, 0, .5);
  transition: transform .3s var(--spring);
}
.mailrow:hover { transform: translateY(-3px); }
.mailrow .ic { width: 48px; height: 48px; border-radius: 14px; background: var(--panel); display: grid; place-items: center; color: #3b2f10; }
.mailrow .ic svg, .mailrow .hint svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.mailrow b { font-size: clamp(16px, 2vw, 22px); font-weight: 600; letter-spacing: -.01em; }
.mailrow .hint { font-size: 12px; color: #5c6f7a; display: flex; align-items: center; gap: 6px; }
.mailrow .hint svg { width: 16px; height: 16px; }
.pills { display: flex; flex-wrap: wrap; gap: 10px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .16); color: #fff; text-decoration: none; font-size: 13.5px; font-weight: 500;
  transition: background .25s, transform .3s var(--spring);
}
.pill:hover { background: rgba(255, 255, 255, .28); transform: translateY(-2px); }
.pill svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pill svg.fill { fill: currentColor; stroke: none; }
.note { font-size: 13px; color: var(--ink-dim); margin: 0; }

/* ---------- pendant lamp ---------- */
.pendant {
  position: absolute; left: var(--pendant-x); top: calc(-1 * var(--stage-top));
  width: 0; height: 0; z-index: 6; pointer-events: none;
  transform: translateX(calc(var(--mx, 0) * 10px));
  transition: transform .8s var(--ease-out);
}
.pendant-swing { position: absolute; left: 0; top: 0; transform-origin: 0 0; animation: sway 7.5s ease-in-out infinite; }
.pendant-kick { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.cord { position: absolute; left: -1px; top: 0; width: 2px; height: var(--cord-h); background: linear-gradient(#edf2f5, #cfd8de); }
.shade {
  position: absolute; top: var(--cord-h); left: calc(var(--shade-w) / -2);
  width: var(--shade-w); height: var(--shade-h); overflow: hidden;
  border-radius: 50% 50% 12% 12% / 70% 70% 14% 14%;
  background: radial-gradient(120% 90% at 36% 18%, #fffaf0 0%, #f1e8d9 52%, #d6cbba 100%);
  box-shadow: inset 0 -22px 28px rgba(0, 0, 0, .09), 0 34px 54px -22px rgba(0, 0, 0, .4);
  pointer-events: auto; cursor: pointer;
}
.shade .crackle { position: absolute; inset: 0; width: 100%; height: 100%; }
.shade .gold path { fill: none; stroke: #d2a84f; stroke-width: 1; stroke-linecap: round; stroke-linejoin: round; opacity: .65; }
.shade-lip { position: absolute; left: 0; right: 0; bottom: 0; height: 14px; background: linear-gradient(180deg, transparent, rgba(255, 220, 140, .55)); }
.glow {
  position: absolute; left: -130px; top: calc(var(--cord-h) + var(--shade-h) - 26px);
  width: 260px; height: 150px; opacity: var(--glow-op);
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 214, 110, .9), rgba(255, 214, 110, 0) 70%);
  filter: blur(10px); animation: breathe 4s ease-in-out infinite; transition: opacity .7s;
}
.beam {
  position: absolute; left: -280px; top: calc(var(--cord-h) + var(--shade-h) - 14px);
  width: 560px; height: 560px; opacity: var(--beam-op);
  background: linear-gradient(180deg, rgba(255, 224, 150, .34), rgba(255, 224, 150, 0) 85%);
  clip-path: polygon(38% 0, 62% 0, 100% 100%, 0 100%);
  mix-blend-mode: soft-light; transition: opacity .7s;
}
html[data-lights="off"] .beam { mix-blend-mode: screen; }
.string { position: absolute; width: 1px; background: rgba(60, 50, 40, .55); top: calc(var(--cord-h) + var(--shade-h) - 52px); }
.string.s1 { left: -22px; height: 96px; }
.string.s2 { left: 0; height: 92px; }
.string.s3 { left: 24px; height: 100px; }
.avatar {
  position: absolute; top: calc(var(--cord-h) + var(--shade-h) + 34px); left: calc(var(--av) / -2);
  width: var(--av); height: var(--av); border-radius: 50%; padding: 5px;
  background: linear-gradient(145deg, #fff3c7, #e3b449);
  box-shadow: 0 26px 44px -16px rgba(0, 0, 0, .5), 0 0 0 7px rgba(255, 255, 255, .16);
  pointer-events: auto; cursor: pointer;
  transform-origin: 50% -90px; animation: sway 5.2s ease-in-out -1.3s infinite;
}
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background: #cfd8de; }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.glow.flick { animation: flick .5s steps(2, end) 1, breathe 4s ease-in-out .5s infinite; }
@keyframes flick { 0% { opacity: .2; } 30% { opacity: 1; } 55% { opacity: .35; } 100% { opacity: var(--glow-op); } }

/* ---------- chairs on the floor ---------- */
.chairs { position: fixed; left: 0; right: 0; bottom: 0; height: 22vh; pointer-events: none; z-index: 1; }
.chair {
  position: absolute; bottom: -8vh; width: 14vw; max-width: 210px; height: 25vh;
  border-radius: 18px 18px 0 0;
  background: linear-gradient(180deg, #cf6443, #ad4a32);
  box-shadow: inset 0 0 0 6px rgba(255, 255, 255, .06), inset 0 -40px 60px rgba(0, 0, 0, .2), 0 -10px 40px rgba(0, 0, 0, .25);
  filter: blur(1.2px) saturate(.9);
}
.chair.a { left: 5vw; }
.chair.b { left: 37vw; }
.chair.wood {
  right: 9vw; background: linear-gradient(90deg, #8b5a3c 0, #a56f4b 22%, #8f5d3e 48%, #a8714d 74%, #7f4f33 100%);
  border-radius: 10px 10px 0 0;
}
html[data-lights="off"] .chair { filter: blur(1.2px) brightness(.45); }

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 50; background: var(--wall);
  display: grid; justify-items: center; align-items: start;
  transition: transform .85s cubic-bezier(.7, 0, .3, 1);
}
.loader::after {
  content: ""; position: absolute; left: 50%; top: 38vh; width: 100vw; height: 100vh; transform: translate(-50%, -20%);
  background: radial-gradient(circle at 50% 20%, rgba(255, 214, 110, .45), rgba(255, 214, 110, 0) 55%);
  opacity: 0; transition: opacity .25s;
}
.loader.on::after { opacity: 1; }
.loader.lift { transform: translateY(-102%); }
.lamp { position: relative; width: 2px; height: 36vh; transform-origin: 50% 0; animation: sway 2.6s ease-in-out infinite; }
.lamp-cord { position: absolute; inset: 0; background: #dfe7ec; transform: scaleY(0); transform-origin: top; transition: transform .7s var(--ease-out); }
.loader.drop .lamp-cord { transform: scaleY(1); }
.lamp-bulb {
  position: absolute; top: 100%; left: 50%; width: 30px; height: 40px; margin-left: -15px;
  border-radius: 50% 50% 46% 46%; background: #cfd9df; opacity: 0;
  transform: translateY(-14px) scale(.6); transform-origin: 50% 0;
  transition: transform .45s var(--spring) .45s, opacity .3s .45s, background .15s, box-shadow .15s;
}
.loader.drop .lamp-bulb { opacity: 1; transform: none; }
.loader.on .lamp-bulb { background: #ffeeb8; box-shadow: 0 0 30px 10px rgba(255, 214, 110, .85), 0 0 120px 70px rgba(255, 214, 110, .35); }

/* ---------- entrance ---------- */
body:not(.ready) .stage, body:not(.ready) .chairs { opacity: 0; }
.ready .card { animation: cardIn .9s var(--ease-out) backwards; }
.ready .panel { animation: panelIn .9s var(--ease-out) .12s backwards; }
.ready .chairs { animation: fadeIn 1.2s ease .4s backwards; }
.ready .rail-btn, .ready .rail-down { animation: fadeUp .6s var(--ease-out) backwards; }
.ready .rail-btn:nth-child(2) { animation-delay: .3s; }
.ready .rail-btn:nth-child(3) { animation-delay: .36s; }
.ready .rail-btn:nth-child(4) { animation-delay: .42s; }
.ready .rail-btn:nth-child(5) { animation-delay: .48s; }
.ready .rail-down { animation-delay: .6s; }
.ready .rail-pill { animation: fadeIn .5s ease .32s backwards; }
.ready .topbar .icon-btn { animation: fadeUp .6s var(--ease-out) .5s backwards; }
.ready .tile { animation: popIn .6s var(--spring) backwards; }
.ready .tile:nth-child(1) { animation-delay: .40s; }
.ready .tile:nth-child(2) { animation-delay: .46s; }
.ready .tile:nth-child(3) { animation-delay: .52s; }
.ready .tile:nth-child(4) { animation-delay: .58s; }
.ready .tile:nth-child(5) { animation-delay: .64s; }
.ready .tile:nth-child(6) { animation-delay: .70s; }
.ready .pendant { animation: pendantIn 1.3s var(--spring) .15s backwards; }
@keyframes cardIn { from { opacity: 0; transform: translateY(36px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes panelIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }
@keyframes pendantIn { from { transform: translateX(calc(var(--mx, 0) * 10px)) translateY(-90vh); } to { transform: translateX(calc(var(--mx, 0) * 10px)) translateY(0); } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 60;
  transform: translate(-50%, 20px);
  background: #15232b; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13.5px;
  opacity: 0; pointer-events: none; transition: all .35s var(--spring);
  box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- small screens ---------- */
@media (max-width: 880px) {
  :root {
    --title-size: clamp(60px, 18vw, 88px);
    --shade-w: 112px; --shade-h: 90px; --av: 88px; --orb: 72px;
    --pendant-x: 22%; --radius: 32px;
    --stage-top: 64px; --cord-h: 34px;
    --beam-op: .35;
  }
  html, body { height: auto; min-height: 100%; }
  body { overflow-x: hidden; overflow-y: auto; }
  .room { display: block; min-height: 100svh; padding-bottom: calc(104px + env(safe-area-inset-bottom)); perspective: none; }
  .stage { width: calc(100% - 28px); height: auto; margin: var(--stage-top) auto 0; flex-direction: column; transform: none; transform-style: flat; }
  .card { border-radius: var(--radius) var(--radius) 0 0; grid-template-columns: 1fr; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .5); }
  .center { padding: 200px 18px 26px; }
  .topbar { top: 14px; right: 10px; }
  .title { padding-left: .08em; white-space: normal; line-height: 1.05; margin: 0; }
  .swash { margin-left: calc(var(--title-size) * 1.15); width: 110px; }
  .content { margin-top: 18px; min-height: 0; position: static; }

  /* name block sits to the right of the lamp, level with the photo */
  .lede {
    position: absolute; top: 106px; right: 14px;
    left: calc(var(--pendant-x) + var(--av) / 2 + 16px);
    margin: 0; flex-direction: column; align-items: flex-start; gap: 5px; font-size: 13px;
  }
  .lede b { font-size: 15px; line-height: 1.25; }

  /* products: lamps hanging from one rail, swipe sideways */
  .shelf { grid-template-columns: 1fr; position: relative; margin: 0 -18px; padding-top: 4px; }
  .shelf::before { content: ""; position: absolute; left: 12px; right: 12px; top: 0; height: 4px; border-radius: 2px; background: #1a3744; opacity: .9; }
  .shelf > .arrow { display: none; }
  .shelf-items { display: flex; flex-wrap: nowrap; gap: 0; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 18px 4px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .shelf-items::-webkit-scrollbar { display: none; }
  .shelf-items { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, transparent, #000 40px, #000 calc(100% - 44px), transparent); }
  .shelf-items.at-start { -webkit-mask-image: linear-gradient(90deg, #000, #000 calc(100% - 44px), transparent); mask-image: linear-gradient(90deg, #000, #000 calc(100% - 44px), transparent); }
  .shelf-items.at-end { -webkit-mask-image: linear-gradient(90deg, transparent, #000 40px, #000); mask-image: linear-gradient(90deg, transparent, #000 40px, #000); }
  .shelf-items.at-start.at-end { -webkit-mask-image: none; mask-image: none; }
  .shelf-items .orb-item { flex: 0 0 31%; scroll-snap-align: start; }
  .orb-cord { height: 20px; }
  .cap { justify-self: center; margin: 10px 4px 0; text-align: center; font-size: 11.5px; line-height: 1.3; }
  .cap i { display: none; }
  .cap b { font-size: 12.5px; }
  .dots { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }
  .dots i { width: 6px; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, .35); transition: width .3s var(--ease-out), background .3s; }
  .dots i.on { width: 18px; background: #fff; }

  .about { padding-left: 0; }
  .about p { font-size: 14.5px; }
  .linklist { grid-template-columns: 1fr; }
  .mailrow { grid-template-columns: 44px 1fr auto; gap: 12px; padding: 8px 14px 8px 8px; }
  .mailrow .ic { width: 44px; height: 44px; }

  .panel { width: 100%; border-radius: 0 0 var(--radius) var(--radius); padding: 26px 18px 30px; gap: 22px; box-shadow: 0 40px 70px -30px rgba(0, 0, 0, .5); }
  .tiles { grid-template-columns: repeat(3, 64px); gap: 14px 22px; }
  .feature { margin-top: 0; grid-template-columns: 1fr; }
  .feature.is-home { display: none; }
  .feature .arrow { display: none; }

  .rail {
    position: fixed; left: 14px; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); z-index: 20;
    flex-direction: row; justify-content: space-around; gap: 0; padding: 8px;
    background: rgba(18, 36, 46, .78); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-radius: 22px; color: #fff;
  }
  .rail-btn { color: rgba(255, 255, 255, .7); }
  .rail-pill { top: 8px; left: 0; margin-left: 0; transform: translate(var(--x, 8px), 0); }
  .rail-down { display: none; }

  .pendant { top: calc(-1 * var(--stage-top)); transform: none; }
  .glow { width: 200px; left: -100px; height: 120px; }
  .beam { width: 420px; left: -210px; height: 420px; }
  .chairs { display: none; }
  .toast { bottom: calc(92px + env(safe-area-inset-bottom)); }
  .ready .card, .ready .panel { animation: fadeIn .9s ease backwards; }
  .ready .pendant { animation: pendantIn 1.2s var(--spring) .1s backwards; }
}
@media (max-width: 880px) and (min-width: 560px) {
  .center { padding-top: 210px; }
  .shelf-items .orb-item { flex-basis: 23%; }
  .linklist { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-height: 640px) and (min-width: 881px) {
  .chairs { display: none; }
  :root { --stage-h: min(560px, 90svh); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .pendant-swing, .avatar, .lamp, .glow, .rail-down, .orb-swing { animation: none !important; }
}
