/* Anas Technical Services — premium features:
   3D room planner, tilt cards, hero motion, scroll progress */

/* Nav "New" pill + scroll progress */
.nav__new em { font: 700 10px/1 var(--body); font-style: normal; letter-spacing: .08em; text-transform: uppercase; background: var(--gold); color: var(--ink); padding: 3px 6px; border-radius: 99px; margin-left: 6px; vertical-align: 2px; }
.progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; pointer-events: none; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--gold), #e6bf55); transform-origin: 0 50%; transform: scaleX(0); }

/* Hero entrance + parallax */
.hero__copy > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.hero__copy > :nth-child(2) { animation-delay: .08s; }
.hero__copy > :nth-child(3) { animation-delay: .16s; }
.hero__copy > :nth-child(4) { animation-delay: .24s; }
.hero__copy > :nth-child(5) { animation-delay: .32s; }
@keyframes rise { from { opacity: 0; transform: translateY(22px); } to { opacity: 1; transform: none; } }
.hero__media img { transform: translate3d(var(--px, 0px), var(--py, 0px), 0) scale(1.08); transition: transform .25s ease-out; will-change: transform; }

/* Tilt + glare cards */
.tilt { position: relative; will-change: transform; }
.tilt::after { content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit; background: radial-gradient(circle at var(--gx, 50%) var(--gy, 50%), rgba(255, 255, 255, .28), transparent 55%); opacity: 0; transition: opacity .3s; z-index: 2; }
.tilt.is-tilting::after { opacity: 1; }
.tilt.is-tilting { box-shadow: 0 24px 40px -22px rgba(18, 41, 42, .45); }

/* ---------- Planner section ---------- */
.planner { background: radial-gradient(1200px 600px at 20% 0%, #00525a, transparent 60%), var(--ink); color: #c4cfcc; overflow: hidden; }
.planner h2 { color: #fff; }
.planner .section__lead { color: #b9c6c2; }
.planner__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.btn--ghost { background: transparent; color: #fff; border: 1px solid rgba(255, 255, 255, .25); gap: 10px; justify-content: center; }
.btn--ghost:hover { border-color: var(--gold); }
.btn--ghost[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.planner__grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 28px; margin-top: 40px; align-items: stretch; }
.note--light { color: #8fa19d; }

.stage { position: relative; container-type: inline-size; border-radius: 10px; background: radial-gradient(ellipse at 50% 60%, #0a5a61 0%, #00333a 70%); border: 1px solid rgba(255, 255, 255, .08); overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.stage.is-dragging { cursor: grabbing; }
.scene { --u: min(1.15px, calc(100cqw / 720)); width: 100%; height: calc(620 * var(--u)); min-height: 300px; display: grid; place-items: center; perspective: calc(760 * var(--u)); perspective-origin: 50% 50%; }
.stage__hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 12.5px; font-weight: 600; letter-spacing: .04em; color: #dbe5e2; background: rgba(0, 0, 0, .3); padding: 6px 12px; border-radius: 99px; pointer-events: none; transition: opacity .4s; white-space: nowrap; }
.stage.was-dragged .stage__hint { opacity: 0; }

.room {
  --W: calc(620 * var(--u)); --D: calc(560 * var(--u)); --H: calc(360 * var(--u)); --gap: 0px;
  --rx: -2deg; --ry: -18deg;
  position: relative; width: 0; height: 0; transform-style: preserve-3d;
  transform: translateZ(calc(-330 * var(--u))) rotateX(var(--rx)) rotateY(var(--ry));
}
.room.is-exploded { --gap: calc(70 * var(--u)); }
.face { position: absolute; left: 0; top: 0; overflow: hidden; transition: transform .9s cubic-bezier(.2, .8, .2, 1), background-color .5s; }
.face > i { position: absolute; display: block; transition: opacity .5s; }
.face::after { content: ""; position: absolute; inset: 0; pointer-events: none; }

.face--floor, .face--ceiling { width: var(--W); height: var(--D); margin: calc(var(--D) / -2) 0 0 calc(var(--W) / -2); }
.face--back { width: var(--W); height: var(--H); margin: calc(var(--H) / -2) 0 0 calc(var(--W) / -2); }
.face--left, .face--right { width: var(--D); height: var(--H); margin: calc(var(--H) / -2) 0 0 calc(var(--D) / -2); }

.face--floor { transform: translateY(calc(var(--H) / 2 + var(--gap))) rotateX(90deg); }
.face--ceiling { transform: translateY(calc(var(--H) / -2 - var(--gap))) rotateX(-90deg); }
.face--back { transform: translateZ(calc(var(--D) / -2 - var(--gap))); }
.face--left { transform: translateX(calc(var(--W) / -2 - var(--gap))) rotateY(90deg); }
.face--right { transform: translateX(calc(var(--W) / 2 + var(--gap))) rotateY(-90deg); }

/* Lighting overlays */
.face--floor::after { background: radial-gradient(ellipse at 50% 40%, transparent 35%, rgba(0, 0, 0, .28)); }
.face--ceiling::after { background: radial-gradient(ellipse at 50% 50%, rgba(0, 0, 0, .04) 30%, rgba(0, 0, 0, .3)); }
.face--back::after { background: linear-gradient(180deg, rgba(0, 0, 0, .08), transparent 30%, rgba(0, 0, 0, .1)); }
.face--left::after { background: linear-gradient(90deg, rgba(0, 0, 0, .05), rgba(0, 0, 0, .22)); }
.face--right::after { background: linear-gradient(270deg, rgba(0, 0, 0, .06), rgba(0, 0, 0, .25)); }

/* Walls: base colour, window, door, skirting, feature */
.face--back { background-color: #ece6dc; }
.face--left, .face--right { background-color: #e3dccf; }
.skirting { left: 0; right: 0; bottom: 0; height: 4%; background: #cfc6b6; }
.window { left: 22%; right: 22%; top: 16%; bottom: 30%; background: linear-gradient(180deg, #bfe0ea, #e6f3f2 70%, #d1e4d6); border: calc(6 * var(--u)) solid #3a4747; }
.window::after { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: calc(5 * var(--u)); margin-left: calc(-2.5 * var(--u)); background: #3a4747; }
.door { left: 60%; width: 22%; top: 22%; bottom: 4%; background: linear-gradient(90deg, #6a4128, #8a5a38 50%, #6a4128); box-shadow: inset 0 0 0 calc(4 * var(--u)) #4b2d1b; }
.door::after { content: ""; position: absolute; left: 12%; top: 52%; width: calc(8 * var(--u)); height: calc(3 * var(--u)); background: #d9c08a; }
.feature { left: 18%; right: 18%; top: 0; bottom: 4%; opacity: 0; background: repeating-linear-gradient(90deg, #7a4f2c 0 calc(10 * var(--u)), #4a2c17 calc(10 * var(--u)) calc(12 * var(--u)), #8d5f38 calc(12 * var(--u)) calc(22 * var(--u)), #3a2212 calc(22 * var(--u)) calc(24 * var(--u))); }
.feature::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: calc(4 * var(--u)); background: #ffd99a; box-shadow: 0 0 calc(24 * var(--u)) calc(6 * var(--u)) rgba(255, 205, 120, .65); }
.room[data-wall="slats"] .feature { opacity: 1; }
.room[data-wall="slats"] .face--back { background-color: #d9d2c5; }

/* Glass partition replaces the right wall */
.room[data-wall="glass"] .face--right {
  background-color: rgba(190, 225, 225, .2);
  background-image:
    linear-gradient(90deg, #26302f 0 calc(5 * var(--u)), transparent calc(5 * var(--u))),
    linear-gradient(180deg, #26302f 0 calc(6 * var(--u)), transparent calc(6 * var(--u)) calc(100% - 10 * var(--u)), #26302f calc(100% - 10 * var(--u))),
    linear-gradient(115deg, transparent 30%, rgba(255, 255, 255, .35) 38%, transparent 46%, transparent 60%, rgba(255, 255, 255, .2) 64%, transparent 68%);
  background-size: 25% 100%, 100% 100%, 100% 100%;
}
.room[data-wall="glass"] .face--right::after { background: none; }
.room[data-wall="glass"] .face--right .door,
.room[data-wall="glass"] .face--right .skirting { opacity: 0; }

/* Floors */
.room[data-floor="marble"] .face--floor {
  background-color: #f2f0eb;
  background-image:
    linear-gradient(#cfcac0 1px, transparent 1px),
    linear-gradient(90deg, #cfcac0 1px, transparent 1px),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.008 .022' numOctaves='5' seed='7'/%3E%3CfeColorMatrix values='0 0 0 0 .42 0 0 0 0 .4 0 0 0 0 .37 2.4 0 0 0 -1.35'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 25% 25%, 25% 25%, 50% 50%;
}
.room[data-floor="parquet"] .face--floor { background: #b07a3f url("../images/5.jpg") 0 0 / 34% auto repeat; }
.room[data-floor="carpet"] .face--floor {
  background-color: #575c5e;
  background-image: repeating-linear-gradient(90deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 6px), conic-gradient(#4a4f51 0 25%, #6b7072 0 50%, #4a4f51 0 75%, #6b7072 0);
  background-size: auto, 25% 28%;
}
.room[data-floor="epoxy"] .face--floor { background: radial-gradient(ellipse at 50% 35%, rgba(255, 255, 255, .55), transparent 45%), linear-gradient(160deg, #9cb1ad, #718985 60%, #5d7370); }
.rug { left: 26%; right: 26%; top: 34%; bottom: 22%; background: repeating-linear-gradient(0deg, #00434b 0 calc(6 * var(--u)), #005660 calc(6 * var(--u)) calc(12 * var(--u))); box-shadow: inset 0 0 0 calc(8 * var(--u)) #c4920c, inset 0 0 0 calc(12 * var(--u)) #00434b; opacity: 0; }
.room[data-floor="marble"] .rug, .room[data-floor="parquet"] .rug { opacity: 1; }

/* Ceilings */
.room[data-ceiling="gypsum"] .face--ceiling { background-color: #f4f1ea; background-image: radial-gradient(circle, #fffdf6 0 calc(5 * var(--u)), #e9d7ae calc(6 * var(--u)) calc(8 * var(--u)), transparent calc(9 * var(--u))); background-size: 25% 25%; background-position: 12.5% 12.5%; }
.cove { inset: 18%; background: #faf8f3; box-shadow: 0 0 calc(30 * var(--u)) calc(8 * var(--u)) rgba(255, 196, 110, .8), inset 0 0 calc(14 * var(--u)) rgba(255, 200, 120, .55); opacity: 0; }
.room[data-ceiling="gypsum"] .cove { opacity: 1; }
.room[data-ceiling="aluminium"] .face--ceiling { background-color: #c9cfd2; background-image: linear-gradient(#9aa2a6 2px, transparent 2px), linear-gradient(90deg, #9aa2a6 2px, transparent 2px), radial-gradient(circle, #8d9498 1.3px, transparent 1.8px); background-size: 20% 20%, 20% 20%, calc(9 * var(--u)) calc(9 * var(--u)); }
.room[data-ceiling="acoustic"] .face--ceiling { background-color: #f1f0ec; background-image: linear-gradient(#b4b8b8 3px, transparent 3px), linear-gradient(90deg, #b4b8b8 3px, transparent 3px), radial-gradient(circle, rgba(0, 0, 0, .12) .8px, transparent 1.2px); background-size: 16.66% 20%, 16.66% 20%, calc(7 * var(--u)) calc(5 * var(--u)); }

/* Exploded-view labels */
.label { position: absolute; left: 0; top: 0; font: 700 calc(16 * var(--u))/1 var(--body); letter-spacing: .12em; text-transform: uppercase; color: var(--ink); background: var(--gold); padding: calc(7 * var(--u)) calc(12 * var(--u)); border-radius: 99px; white-space: nowrap; opacity: 0; transition: opacity .3s; pointer-events: none; }
.room.is-exploded .label { opacity: 1; transition-delay: .55s; }
.label--floor { transform: translate(-50%, -50%) translate3d(0, calc(var(--H) / 2 + var(--gap) + 34 * var(--u)), calc(var(--D) / 2)); }
.label--ceiling { transform: translate(-50%, -50%) translate3d(0, calc(var(--H) / -2 - var(--gap) - 34 * var(--u)), calc(var(--D) / 2)); }
.label--wall { transform: translate(-50%, -50%) translate3d(0, 0, calc(var(--D) / -2 - var(--gap) + 2px)); }

/* Controls */
.controls { display: flex; flex-direction: column; gap: 18px; }
.ctrl { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.ctrl legend { font: 700 12px/1 var(--body); letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 10px; padding: 0; }
.ctrl button { display: inline-flex; align-items: center; gap: 9px; padding: 8px 12px 8px 8px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: #e6eeec; font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.ctrl button:hover { border-color: rgba(255, 255, 255, .4); transform: translateY(-1px); }
.ctrl button[aria-pressed="true"] { border-color: var(--gold); background: rgba(196, 146, 12, .14); color: #fff; }
.sw { width: 24px; height: 24px; border-radius: 50%; flex: none; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .2); }
.sw--marble { background: linear-gradient(135deg, #fff 0 40%, #c9c3b8 42%, #fff 46% 70%, #d6d0c6 72%, #f6f4ef 76%); }
.sw--parquet { background: url("../images/5.jpg") center / 160%; }
.sw--carpet { background: conic-gradient(#4a4f51 0 25%, #6b7072 0 50%, #4a4f51 0 75%, #6b7072 0) 0 0 / 12px 12px; }
.sw--epoxy { background: radial-gradient(circle at 35% 30%, #e6f0ee, #7f9894 55%, #5d7370); }
.sw--gypsum { background: radial-gradient(circle, #fffaf0 30%, #f3c979 55%, #f4f1ea 70%); }
.sw--aluminium { background: radial-gradient(circle, #8d9498 1px, transparent 1.5px) 0 0 / 5px 5px, #c9cfd2; }
.sw--acoustic { background: linear-gradient(#b4b8b8 2px, transparent 2px) 0 0 / 8px 8px, linear-gradient(90deg, #b4b8b8 2px, transparent 2px) 0 0 / 8px 8px, #f1f0ec; }
.sw--paint { background: #ece6dc; }
.sw--glass { background: linear-gradient(135deg, rgba(200, 235, 235, .95), rgba(140, 180, 180, .7)); box-shadow: inset 0 0 0 3px #26302f; }
.sw--slats { background: repeating-linear-gradient(90deg, #7a4f2c 0 4px, #3a2212 4px 5px); }

.combo { margin-top: auto; background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .1); border-radius: 8px; padding: 18px; }
.combo__label { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: #8fa19d; }
.combo__value { margin: 8px 0 16px; color: #fff; font-weight: 600; line-height: 1.45; }
.combo__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 22px; }
.combo .btn--gold { padding: 14px 18px; }
.combo .ico-wa { width: 18px; height: 18px; }

@media (max-width: 900px) {
  .planner__grid { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .ctrl button { font-size: 13px; padding: 7px 10px 7px 7px; }
  .sw { width: 20px; height: 20px; }
  .combo .btn--gold { width: 100%; justify-content: center; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .hero__copy > * { animation: none; }
  .hero__media img { transform: scale(1.02); transition: none; }
}
