/* k-dgtal draft home: a night street of made-up Dubai shops, then the quote, the person and the apps.
   Loaded after styles.css and signal.css. */
.hx .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hx-wrap { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 clamp(1.25rem, 4vw, 3rem); }
.hx main h1, .hx main h2, .hx main h3 { color: var(--ink); font-family: var(--font-title); text-wrap: balance; }
.hx main h2 { font-size: clamp(1.9rem, 3.4vw, 3rem); line-height: 1.08; letter-spacing: -0.02em; font-weight: 700; max-width: 20ch; }
.hx main p { text-wrap: pretty; }
.hx-intro { color: var(--ink-muted); font-size: 1.08rem; line-height: 1.6; max-width: 40rem; margin: 1rem 0 1.6rem; }

/* ---------- Buttons and links ---------- */
.hx-btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; min-height: 54px; padding: 0 1.5rem; border-radius: 999px; font: 600 1.05rem/1.2 var(--font-body); text-decoration: none; transition: background-color 160ms ease, transform 120ms ease; }
.hx-btn svg { width: 21px; height: 21px; flex: none; }
.hx-btn-wa { background: var(--wa); color: var(--wa-ink); box-shadow: 0 8px 18px -10px rgba(0, 0, 0, 0.7); }
.hx-btn-wa:hover { background: var(--wa-hover); }
.hx-btn:active { transform: translateY(1px); }
.hx-link { color: var(--ink); font-weight: 600; text-decoration: underline; text-decoration-color: var(--lamp); text-decoration-thickness: 2px; text-underline-offset: 0.22em; }
.hx-link:hover { color: var(--lamp); }
.hx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.9rem 1.4rem; margin-top: 1.6rem; }
.hx-number { margin: 0; color: var(--ink-muted); font-size: 0.95rem; }
.hx-number a { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-permit { display: inline-block; margin: 1.2rem 0 0; padding: 0.65rem 0.9rem; border: 1px solid var(--line-strong); border-radius: 10px; background: rgba(11, 17, 32, 0.72); color: var(--ink-secondary); font-size: 0.93rem; line-height: 1.45; }

/* ---------- The street ---------- */
.st-hero { position: relative; }
.st-stage { position: relative; height: 100svh; min-height: 560px; overflow: hidden; background: #0a1226; }
#street-gl { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

/* Intro: set in the night sky above the street */
/* desktop: over the open sky on the right, where the street recedes */
.st-intro { position: absolute; z-index: 2; right: clamp(1.25rem, 5vw, 4.5rem); top: calc(var(--header-h) + clamp(1.5rem, 6vh, 4rem)); width: min(34rem, 42vw); }
.st-intro h1 { font-size: clamp(2.3rem, 4.2vw, 3.9rem); line-height: 1.04; letter-spacing: -0.022em; font-weight: 600; margin: 0; max-width: 13ch; text-shadow: 0 2px 24px rgba(4, 8, 18, 0.6); }
.st-lede { margin: 1rem 0 0; color: var(--ink-secondary); font-size: 1.05rem; line-height: 1.55; max-width: 29rem; }
.st-price { margin: 0.7rem 0 0; color: var(--ink-secondary); font-size: 1.08rem; }
.st-price strong, .st-yours strong { color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }

/* One caption panel per shop, solid, not a gradient wash */
.st-stops { list-style: none; margin: 0; padding: 0; }
.st-stops > li { position: absolute; z-index: 2; left: clamp(1.25rem, 5vw, 4.5rem); bottom: clamp(4.5rem, 12vh, 7rem); width: min(25rem, 36vw); padding: 1.4rem 1.5rem 1.5rem; border-radius: 14px; background: rgba(7, 11, 22, 0.88); border: 1px solid rgba(244, 239, 230, 0.12); box-shadow: 0 24px 48px -24px rgba(0, 0, 0, 0.8); opacity: 0; visibility: hidden; transform: translateY(14px); transition: opacity 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.4s; }
.st-stops > li.is-on { opacity: 1; visibility: visible; transform: none; }
.st-stops img { display: none; }
.st-stops h2 { font-size: clamp(1.5rem, 2.2vw, 2rem); line-height: 1.1; letter-spacing: -0.015em; margin: 0; max-width: none; }
.st-stops p { margin: 0.6rem 0 0.9rem; color: var(--ink-secondary); font-size: 0.98rem; line-height: 1.55; }
.st-yours .hx-actions { margin-top: 0.2rem; }
.st-yours .hx-permit { margin-top: 0.9rem; font-size: 0.86rem; }

/* Street index: where you are, and a way to jump */
.st-index { position: absolute; z-index: 3; left: 50%; bottom: clamp(1rem, 3vh, 1.8rem); transform: translateX(-50%); display: flex; gap: 0.25rem; padding: 0.3rem; border-radius: 999px; background: rgba(7, 11, 22, 0.82); border: 1px solid rgba(244, 239, 230, 0.12); }
.st-index button { appearance: none; border: 0; background: none; color: var(--ink-muted); font: 500 0.85rem/1 var(--font-body); padding: 0.6rem 0.9rem; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.st-index button:hover { color: var(--ink); }
.st-index button[aria-current="step"] { background: rgba(243, 182, 96, 0.16); color: var(--ink); }
.hx:not(.st-live) .st-index { display: none; }

/* No WebGL, reduced motion or no JS: the street becomes a plain list of the shops */
.hx:not(.st-live) .st-stage { height: auto; min-height: 0; overflow: visible; padding: clamp(3rem, 7vw, 5rem) clamp(1.25rem, 5vw, 4.5rem); background: linear-gradient(180deg, #0a1226, var(--bg-frame)); }
.hx:not(.st-live) #street-gl { display: none; }
.hx:not(.st-live) .st-intro, .hx:not(.st-live) .st-stops > li { position: static; width: auto; opacity: 1; visibility: visible; transform: none; background: none; border: 0; box-shadow: none; padding: 0; }
.hx:not(.st-live) .st-stops { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem 3rem; margin-top: 3.5rem; }
.hx:not(.st-live) .st-stops img { display: block; width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 1.2rem; }

/* ---------- Sections ---------- */
.hx-sec { padding: clamp(4rem, 9vw, 7rem) 0; border-top: 1px solid var(--line); }

/* Quotation: a printed slip under the street lamp */
.hx-quote-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.hx-quote { background: #f4efe6; color: #1a1d24; border-radius: 6px; padding: clamp(1.4rem, 3vw, 2.4rem); box-shadow: 0 30px 60px -30px rgba(0, 0, 0, 0.8); }
.hx-quote h3 { color: #1a1d24; }
.hx-quote-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-bottom: 0.9rem; border-bottom: 2px solid #1a1d24; }
.hx-quote-head b { font-size: 1.15rem; }
.hx-quote-head span { color: #545a66; font-size: 0.95rem; }
.hx-lines { width: 100%; border-collapse: collapse; margin-top: 0.4rem; }
.hx-lines th, .hx-lines td { padding: 1rem 0; border-bottom: 1px dashed rgba(26, 29, 36, 0.28); vertical-align: top; text-align: left; color: #1a1d24; }
.hx-lines th { font-weight: 500; padding-right: 1rem; line-height: 1.45; }
.hx-lines th span { display: block; color: #545a66; font-weight: 400; font-size: 0.9rem; margin-top: 0.2rem; }
.hx-lines td { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.hx-lines tr:first-child td { font-size: 1.35rem; }
.hx-lines tr.opt td { color: #353a45; font-weight: 600; }
.hx-quote h3 { font-size: 1rem; font-weight: 700; margin: 1.6rem 0 0.7rem; }
.hx-checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.55rem 1.5rem; }
.hx-checks li { position: relative; padding-left: 1.6rem; line-height: 1.45; }
.hx-checks li::before { content: ""; position: absolute; left: 0.3rem; top: 0.22em; width: 0.42rem; height: 0.78rem; border: solid #0b7a3c; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.hx-terms { margin: 1.8rem 0 0; }
.hx-terms div { display: grid; grid-template-columns: 8.5rem 1fr; gap: 1rem; padding: 0.85rem 0; border-top: 1px solid rgba(26, 29, 36, 0.14); }
.hx-terms dt { font-weight: 600; }
.hx-terms dd { margin: 0; color: #353a45; line-height: 1.5; }
.hx-quote-foot { margin: 1.2rem 0 0; color: #545a66; font-size: 0.92rem; }
.hx-quote-foot a { color: #1a1d24; }
.hx-quote :focus-visible { outline-color: #0b7a3c; }

/* Person */
.hx-person-grid { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(1.5rem, 5vw, 5rem); align-items: start; }
.hx-person h2 { margin: 0; }
.hx-big-p { font-size: clamp(1.2rem, 1.8vw, 1.45rem); line-height: 1.5; color: var(--ink); margin: 0 0 1rem; max-width: 36rem; }
.hx-person p { color: var(--ink-secondary); line-height: 1.6; max-width: 36rem; }

/* Apps */
.hx-app-list { list-style: none; margin: 0 0 2rem; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: clamp(1.5rem, 4vw, 3rem); }
.hx-app-list li { display: grid; grid-template-columns: 112px 1fr; gap: 1.2rem; align-items: start; padding: 1.5rem 0; border-top: 1px solid var(--line); }
.hx-app-list li.no-img { grid-template-columns: 1fr; }
.hx-app-list img { width: 112px; height: 112px; object-fit: cover; object-position: top left; border-radius: 10px; border: 1px solid var(--line); }
.hx-app-list h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 0.35rem; }
.hx-app-list h3 a { color: var(--ink); text-decoration: none; }
.hx-app-list h3 a:hover { text-decoration: underline; text-decoration-color: var(--lamp); }
.hx-app-list p { margin: 0; color: var(--ink-muted); line-height: 1.55; }
.hx-app-list .hx-meta { margin-top: 0.5rem; color: var(--ink); font-weight: 600; font-size: 0.92rem; }

/* Phone dock: the WhatsApp button stays under the thumb */
.hx-dock { display: none; }

@media (max-width: 860px) {
  .st-stage { min-height: 600px; }
  .st-intro { left: 1.25rem; right: 1.25rem; width: auto; top: calc(var(--header-h) + 1.2rem); }
  .st-intro h1 { font-size: clamp(2.1rem, 9.5vw, 2.8rem); }
  .st-lede { display: none; }
  .st-intro .hx-link { display: none; }
  .st-stops > li { left: 0.9rem; right: 0.9rem; width: auto; bottom: 4.4rem; padding: 1.1rem 1.15rem 1.2rem; }
  .st-stops h2 { font-size: 1.45rem; }
  .st-stops p { font-size: 0.93rem; margin: 0.45rem 0 0.7rem; }
  .st-index { left: 0.9rem; right: 0.9rem; transform: none; bottom: 0.9rem; justify-content: space-between; overflow-x: auto; }
  .st-index { gap: 0; }
  .st-index button { padding: 0.55rem 0.45rem; font-size: 0.76rem; }
  .hx:not(.st-live) .st-stops { grid-template-columns: 1fr; }
  .hx-quote-grid, .hx-person-grid { grid-template-columns: 1fr; }
  .hx-app-list { grid-template-columns: 1fr; }
  .hx-checks { grid-template-columns: 1fr; }
  .hx-terms div { grid-template-columns: 1fr; gap: 0.2rem; }
  .hx-lines tr:first-child td { font-size: 1.15rem; }
  .hx-dock { display: flex; align-items: center; gap: 0.9rem; position: fixed; left: 0; right: 0; bottom: 0; z-index: 60; padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom)); background: rgba(11, 17, 32, 0.96); border-top: 1px solid var(--line); transform: translateY(110%); transition: transform 0.35s ease; }
  .hx-dock.is-on { transform: none; }
  .hx-dock .hx-btn { min-height: 50px; padding: 0 1.2rem; }
  .hx-dock span { color: var(--ink-muted); font-size: 0.85rem; line-height: 1.3; }
  body.hx { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
}

@media (prefers-reduced-motion: reduce) {
  .hx-btn, .st-stops > li, .hx-dock { transition: none; }
}

/* Intro hand-off and the dock outside the live street */
.st-live .st-intro { transition: opacity 0.45s ease, transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.45s; }
.st-live .st-intro.is-off { opacity: 0; visibility: hidden; transform: translateY(-18px); }
@media (max-width: 860px) { .hx:not(.st-live) .hx-dock { transform: none; } }

/* ==========================================================================
   Below the street: the night goes on, and ends at dawn
   ========================================================================== */
.hx-sec { border-top: 0; }
.hx-quote-sec { background: linear-gradient(180deg, #0b1120 0%, #0e1531 100%); }
.hx-person { background: linear-gradient(180deg, #0e1531 0%, #161b40 100%); }
.hx-apps { background: linear-gradient(180deg, #161b40 0%, #2a2252 100%); }

/* Lightbox sign: dark until it is in view, then it flickers on */
.lb { display: inline-grid; justify-items: start; gap: 0.15rem; margin-bottom: 2.2rem; padding: 1rem 1.6rem 1.1rem; border-radius: 8px; background: #0c0d12; border: 2px solid #2c2416; box-shadow: 0 30px 50px -28px rgba(0, 0, 0, 0.9); }
.lb-small { font: 600 0.78rem/1 var(--font-body); letter-spacing: 0.18em; text-transform: uppercase; color: #c9a56a; }
.lb-price { white-space: nowrap; font: 700 clamp(2.6rem, 4.8vw, 4.6rem)/1 var(--font-title); letter-spacing: -0.02em; color: #ffd98a; font-variant-numeric: tabular-nums; }
.lb-ar { justify-self: end; font: 700 1.3rem/1.3 "IBM Plex Sans Arabic", var(--font-body); color: #ffd98a; }
.lb.is-lit .lb-price, .lb.is-lit .lb-ar { color: #ffd98a; text-shadow: 0 0 2px #fff4d6, 0 0 18px rgba(255, 186, 90, 0.55), 0 0 42px rgba(255, 160, 60, 0.3); }
.lb.is-lit .lb-small { color: #c9a56a; }
.fx .lb.is-lit .lb-price, .fx .lb.is-lit .lb-ar { animation: lb-on 1.1s steps(1, end) both; }
@keyframes lb-on { 0% { opacity: 0.25; } 12% { opacity: 1; } 18% { opacity: 0.3; } 30% { opacity: 1; } 36% { opacity: 0.5; } 44%, 100% { opacity: 1; } }

/* The quotation prints out once the sign is on */
.fx .hx-quote { clip-path: inset(0 0 100% 0); transition: clip-path 1.4s cubic-bezier(0.65, 0, 0.35, 1) 0.3s; }
.fx .hx-quote.is-lit { clip-path: inset(0 0 0 0); }

/* My own shopfront */
.kd-front { position: relative; max-width: 1040px; margin: 0 auto; padding: 0 22px; background: linear-gradient(180deg, #4a4560, #3a3650); border-radius: 4px 4px 0 0; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.9); }
.kd-sign { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin: 0 -10px; padding: 1rem 1.6rem; background: #0c0d12; border: 2px solid #2c2416; border-radius: 6px; transform: translateY(-50%); }
.kd-sign span { font: 700 clamp(1.8rem, 4vw, 2.8rem)/1 var(--font-title); letter-spacing: -0.01em; color: #ffd98a; }
.kd-sign small { font: 600 0.8rem/1 var(--font-body); letter-spacing: 0.18em; text-transform: uppercase; color: #c9a56a; }
.kd-front.is-lit .kd-sign span { color: #ffd98a; text-shadow: 0 0 2px #fff4d6, 0 0 18px rgba(255, 186, 90, 0.55); }
.kd-front.is-lit .kd-sign small { color: #c9a56a; }
.fx .kd-front.is-lit .kd-sign span { animation: lb-on 1.1s steps(1, end) both; }
.kd-body { display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 22px; margin-top: -1.2rem; }
.kd-window { position: relative; padding: clamp(1.6rem, 4vw, 2.8rem); background: linear-gradient(180deg, rgba(255, 214, 150, 0.1), rgba(255, 190, 110, 0.04)), #10131d; border: 10px solid #121520; border-bottom: 0; box-shadow: inset 0 0 70px rgba(255, 190, 110, 0.1); }
.kd-window h2 { margin: 0 0 1.2rem; }
.kd-window p { color: var(--ink-secondary); line-height: 1.6; max-width: 36rem; }
.kd-email { margin: 1.2rem 0 0; }
.kd-door { position: relative; background: #0c0e15; border: 10px solid #121520; border-bottom: 0; }
.kd-door::before { content: ""; position: absolute; left: 50%; top: 2.2rem; width: 46%; height: 1.6rem; transform: translateX(-50%); border: 2px solid #b9b2a2; border-bottom: 0; border-radius: 50% 50% 0 0; clip-path: inset(0 0 50% 0); }
.kd-plate { position: absolute; left: 50%; top: 3rem; transform: translateX(-50%) rotate(-4deg); transform-origin: top center; padding: 0.55rem 0.7rem; border-radius: 4px; background: #f4efe6; color: #1a1d24; font: 700 0.82rem/1.2 var(--font-body); text-align: center; white-space: nowrap; box-shadow: 0 8px 16px -8px rgba(0, 0, 0, 0.8); }
.fx .kd-front.is-lit .kd-plate { animation: swing 2.4s cubic-bezier(0.3, 1.6, 0.5, 1) both; }
@keyframes swing { 0% { transform: translateX(-50%) rotate(14deg); } 100% { transform: translateX(-50%) rotate(-4deg); } }

/* The app shops */
.af-row { list-style: none; margin: 0 0 2.4rem; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; }
.af > p { margin: 1rem 0 0; color: #c9c3da; line-height: 1.55; font-size: 0.95rem; }
.af .hx-meta { margin-top: 0.4rem; color: var(--ink); font-weight: 600; font-size: 0.9rem; }
.af-front { position: relative; display: grid; gap: 12px; padding: 14px 14px 0; background: linear-gradient(180deg, #4b4660, #3a3650); border-radius: 4px 4px 0 0; text-decoration: none; color: var(--ink); transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1); }
.af-front:hover { transform: translateY(-4px); }
.af-sign { display: block; padding: 0.65rem 0.8rem; background: #0c0d12; border: 2px solid #2c2416; border-radius: 4px; font: 700 1.05rem/1 var(--font-title); color: #4a3b24; text-align: center; color: #ffd98a; }
.af.is-lit.is-open .af-sign { color: #ffd98a; text-shadow: 0 0 2px #fff4d6, 0 0 14px rgba(255, 186, 90, 0.5); }
.af.is-soon .af-sign { color: #a59a88; }
.af-window { position: relative; display: block; aspect-ratio: 4 / 3; overflow: hidden; background: #0c0e15; border: 8px solid #121520; border-bottom: 0; }
.af-window img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top center; }
.af-window::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(180deg, #858890 0 10px, #6c6f76 10px 12px, #7d8087 12px 14px); transform-origin: top; transition: transform 1.2s cubic-bezier(0.65, 0, 0.35, 1) 0.4s; }
.fx .af.is-open.is-lit .af-window::after { transform: scaleY(0); }
.hx:not(.fx) .af.is-open .af-window::after { transform: scaleY(0); }
.af-plate { position: absolute; right: 22px; bottom: 22%; padding: 0.4rem 0.6rem; border-radius: 4px; background: #f4efe6; color: #1a1d24; font: 700 0.75rem/1.2 var(--font-body); transform: rotate(-3deg); box-shadow: 0 6px 12px -6px rgba(0, 0, 0, 0.8); }
.af.is-open .af-plate { background: #25d366; color: var(--wa-ink); }

/* Dawn */
.hx-dawn { position: relative; padding: clamp(5rem, 11vw, 9rem) 0 0; background: linear-gradient(180deg, #2a2252 0%, #4a2d5e 38%, #7e4458 64%, #d4825a 86%, #f4b56c 100%); overflow: hidden; }
.hx-dawn-inner { position: relative; z-index: 1; padding-bottom: clamp(7rem, 12vw, 10rem); }
.hx-dawn h2 { font-size: clamp(2.1rem, 4.6vw, 4rem); max-width: 18ch; }
.hx-dawn-inner > p { color: #f4e6dc; font-size: 1.12rem; line-height: 1.55; max-width: 34rem; margin: 1.2rem 0 0; }
.hx-dawn .hx-permit { background: rgba(26, 18, 48, 0.55); border-color: rgba(244, 239, 230, 0.3); color: #f4efe6; }
.hx-dawn .hx-link { text-decoration-color: #ffd98a; }
.dawn-skyline { position: absolute; left: 0; right: 0; bottom: -1px; width: 100%; height: clamp(90px, 12vw, 170px); display: block; }

@media (max-width: 1000px) { .af-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 860px) {
  .kd-body { grid-template-columns: 1fr; }
  .kd-door { height: 120px; }
  .kd-front { padding: 0 12px; }
  .kd-sign { padding: 0.8rem 1rem; }
  .af-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .af-front { padding: 10px 10px 0; gap: 8px; }
  .af-sign { font-size: 0.9rem; padding: 0.55rem 0.4rem; }
  .af-window { border-width: 6px; }
  .af-plate { right: 14px; font-size: 0.68rem; }
  .af > p { font-size: 0.88rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hx-quote, .af-window::after, .af-front { transition: none !important; }
  .lb-price, .lb-ar, .kd-sign span, .kd-plate { animation: none !important; }
}
@media (min-width: 861px) { .hx-quote-grid > div:first-child { position: sticky; top: calc(var(--header-h) + 2.5rem); } }
.kd-front::after, .af-front::after { content: ""; position: absolute; left: -24px; right: -24px; bottom: -12px; height: 12px; background: linear-gradient(180deg, #5b566a, #343042); border-radius: 2px; }
.af-front::after { left: -8px; right: -8px; bottom: -8px; height: 8px; }
@media (max-width: 860px) {
  .kd-window { padding: 1.3rem 1.1rem; border-width: 6px; }
  .kd-door { border-width: 6px; }
  .kd-door::before { width: 110px; }
  .kd-body { gap: 12px; }
}

/* Signs wait in the dark only when the light-up effect will run */
.fx .lb:not(.is-lit) .lb-price, .fx .lb:not(.is-lit) .lb-ar, .fx .kd-front:not(.is-lit) .kd-sign span, .fx .af:not(.is-lit) .af-sign { color: #4a3b24; text-shadow: none; }
.fx .lb:not(.is-lit) .lb-small, .fx .kd-front:not(.is-lit) .kd-sign small { color: #5a4a30; }
.hx-apps .hx-intro { color: #c9c3da; }
.st-demos { font-size: 0.92rem !important; color: var(--ink-muted) !important; }
.st-stops strong { color: var(--ink); font-variant-numeric: tabular-nums; }
.hx-quote h3:first-of-type { margin-top: 1.2rem; }

/* Inside the live site's shell (site.css): no outer frame, its own header height */
.hx-live { --header-h: 76px; --outer-pad: 0px; }

/* ==========================================================================
   My shopfront, upgraded: awning, a lit workshop behind the glass, a door
   ========================================================================== */
.kd-front { padding-bottom: 0; }
.kd-awning { position: relative; z-index: 1; height: 54px; margin: -2.6rem -6px 0; background: repeating-linear-gradient(90deg, #a8362d 0 44px, #efe4d2 44px 88px); box-shadow: 0 14px 22px -12px rgba(0, 0, 0, 0.7); -webkit-mask: radial-gradient(22px 14px at 22px 100%, transparent 98%, #000) 0 0 / 44px 100% repeat-x; mask: radial-gradient(22px 14px at 22px 100%, transparent 98%, #000) 0 0 / 44px 100% repeat-x; transform-origin: top; }
.fx .kd-awning { transform: scaleY(0.12); transition: transform 0.9s cubic-bezier(0.34, 1.4, 0.5, 1) 0.5s; }
.fx .kd-front.is-lit .kd-awning { transform: none; }
.kd-body { margin-top: 0.9rem; }

.kd-window { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); padding: 0; overflow: hidden; background: #0e1018; }
.kd-copy { position: relative; z-index: 2; padding: clamp(1.6rem, 3.6vw, 2.8rem); background: linear-gradient(90deg, rgba(10, 12, 20, 0.95) 0%, rgba(10, 12, 20, 0.9) 80%, rgba(10, 12, 20, 0.55) 100%); }
.kd-copy h2 { margin: 0 0 1.1rem; }

/* the workshop */
.kd-room { position: relative; min-height: 100%; overflow: hidden; background: radial-gradient(120% 70% at 78% 62%, rgba(255, 196, 120, 0.2), transparent 60%), linear-gradient(180deg, #2c211d 0%, #3a2b23 70%, #2a1e18 100%); }
.fx .kd-front:not(.is-lit) .kd-room { filter: brightness(0.35); }
.kd-room { transition: filter 1.2s ease 0.3s; }
.kd-shelf { position: absolute; left: 8%; right: 34%; top: 13%; height: 15%; display: flex; align-items: flex-end; gap: 3px; border-bottom: 7px solid #6b4a32; padding-left: 6%; }
.kd-shelf i { width: 9%; background: #8a4b2c; border-radius: 2px 2px 0 0; }
.kd-shelf i:nth-child(1) { height: 78%; background: #b4532a; } .kd-shelf i:nth-child(2) { height: 92%; background: #2f5d62; }
.kd-shelf i:nth-child(3) { height: 70%; background: #d9a75a; } .kd-shelf i:nth-child(4) { height: 86%; background: #5a4a7a; transform: rotate(-8deg); transform-origin: bottom left; margin-left: 4px; }
.kd-shelf i:nth-child(5) { height: 64%; background: #c9c3b4; } .kd-shelf i:nth-child(6) { height: 80%; background: #8f2f2a; }
.kd-shelf b { margin-left: auto; width: 16%; height: 60%; border-radius: 50% 50% 8px 8px; background: #3e6b47; }
.kd-poster { position: absolute; right: 9%; top: 9%; width: 22%; aspect-ratio: 3 / 4; padding: 5px; background: #e9dcc5; box-shadow: 0 8px 14px -6px rgba(0, 0, 0, 0.7); }
.kd-poster span { display: block; width: 100%; height: 100%; background: linear-gradient(180deg, #2a2252, #9a5258 70%, #f2a65e); -webkit-mask: linear-gradient(#000 0 0); }
.kd-poster span::after { content: ""; display: block; height: 100%; background: linear-gradient(0deg, #141024 18%, transparent 18%), linear-gradient(90deg, transparent 46%, #141024 46% 54%, transparent 54%); background-size: 100% 100%, 100% 52%; background-position: 0 0, 0 100%; background-repeat: no-repeat; }
.kd-desk { position: absolute; left: 0; right: 0; bottom: 0; height: 20%; background: linear-gradient(180deg, #7a5236 0 6px, #5a3c28 6px); }
.kd-monitor { position: absolute; left: 12%; bottom: 20%; width: 54%; }
.kd-screen { position: relative; aspect-ratio: 16 / 10; border: 7px solid #121318; border-radius: 6px; background: #fff7ea; overflow: hidden; box-shadow: 0 0 40px rgba(255, 236, 200, 0.18); }
.kd-screen span { position: absolute; display: block; border-radius: 3px; }
.kd-screen .bar { left: 0; right: 0; top: 0; height: 12%; background: #2b1a0e; }
.kd-screen .l1 { left: 8%; top: 24%; height: 10%; width: 0; background: #2b1a0e; }
.kd-screen .l2 { left: 8%; top: 39%; height: 10%; width: 0; background: #2b1a0e; }
.kd-screen .pic { right: 7%; top: 22%; width: 34%; height: 56%; background: linear-gradient(180deg, #f0a24f, #d9603a); transform: scale(0); }
.kd-screen .wa { left: 8%; top: 62%; width: 30%; height: 13%; border-radius: 999px; background: #25d366; transform: scale(0); transform-origin: left center; }
.kd-monitor .stand { display: block; width: 18%; height: 14px; margin: 0 auto; background: #1a1b21; border-radius: 0 0 4px 4px; }
.kd-front.is-lit .kd-screen .l1 { animation: kd-type1 8s steps(14, end) 1.2s infinite; }
.kd-front.is-lit .kd-screen .l2 { animation: kd-type2 8s steps(10, end) 1.2s infinite; }
.kd-front.is-lit .kd-screen .pic { animation: kd-pop 8s cubic-bezier(0.34, 1.5, 0.6, 1) 1.2s infinite; }
.kd-front.is-lit .kd-screen .wa { animation: kd-wa 8s cubic-bezier(0.34, 1.6, 0.6, 1) 1.2s infinite; }
@keyframes kd-type1 { 0% { width: 0; } 18%, 88% { width: 46%; } 96%, 100% { width: 0; } }
@keyframes kd-type2 { 0%, 18% { width: 0; } 32%, 88% { width: 34%; } 96%, 100% { width: 0; } }
@keyframes kd-pop { 0%, 34% { transform: scale(0); } 44%, 88% { transform: scale(1); } 96%, 100% { transform: scale(0); } }
@keyframes kd-wa { 0%, 50% { transform: scale(0); } 58%, 88% { transform: scale(1); } 96%, 100% { transform: scale(0); } }
.kd-lamp { position: absolute; right: 12%; bottom: 20%; width: 22%; height: 46%; }
.kd-lamp .base { position: absolute; right: 18%; bottom: 0; width: 38%; height: 7px; border-radius: 4px; background: #1d1f26; }
.kd-lamp .arm { position: absolute; right: 36%; bottom: 6px; width: 5px; height: 78%; background: #1d1f26; transform: rotate(-24deg); transform-origin: bottom center; }
.kd-lamp .lhead { position: absolute; left: 4%; top: 6%; width: 42%; height: 18%; border-radius: 50% 50% 8px 8px; background: #2a2d36; transform: rotate(-18deg); }
.kd-lamp .cone { position: absolute; left: -36%; top: 18%; width: 120%; height: 84%; clip-path: polygon(30% 0, 52% 0, 100% 100%, 0 100%); background: linear-gradient(180deg, rgba(255, 214, 150, 0.45), rgba(255, 214, 150, 0)); opacity: 0; transition: opacity 0.6s steps(3, end) 0.8s; }
.kd-front.is-lit .kd-lamp .cone, .hx:not(.fx) .kd-lamp .cone { opacity: 1; }
.kd-plant { position: absolute; left: 3%; bottom: 20%; width: 10%; height: 24%; }
.kd-plant b { position: absolute; left: 15%; right: 15%; bottom: 0; height: 34%; background: #b4532a; clip-path: polygon(0 0, 100% 0, 85% 100%, 15% 100%); }
.kd-plant i { position: absolute; bottom: 28%; width: 34%; height: 72%; border-radius: 50% 50% 50% 50% / 70% 70% 30% 30%; background: #3e6b47; transform-origin: bottom center; }
.kd-plant i:nth-child(1) { left: 10%; transform: rotate(-24deg); } .kd-plant i:nth-child(2) { left: 33%; height: 86%; } .kd-plant i:nth-child(3) { left: 56%; transform: rotate(22deg); background: #4f7f55; }
.kd-mug { position: absolute; right: 38%; bottom: 20%; width: 6%; height: 9%; }
.kd-mug b { position: absolute; inset: 0; border-radius: 2px 2px 5px 5px; background: #efe4d2; }
.kd-mug b::after { content: ""; position: absolute; right: -40%; top: 18%; width: 45%; height: 50%; border: 3px solid #efe4d2; border-left: 0; border-radius: 0 50% 50% 0; }
.kd-mug i { position: absolute; bottom: 110%; width: 3px; height: 70%; border-radius: 3px; background: rgba(255, 255, 255, 0.35); opacity: 0; animation: kd-steam 3s ease-in-out infinite; }
.kd-mug i:nth-child(1) { left: 28%; } .kd-mug i:nth-child(2) { left: 60%; animation-delay: 1.4s; }
@keyframes kd-steam { 0% { opacity: 0; transform: translateY(6px) scaleY(0.6); } 40% { opacity: 1; } 100% { opacity: 0; transform: translateY(-22px) scaleY(1.2) rotate(8deg); } }

/* the glass catches the light, and follows the pointer a little */
.kd-sheen { position: absolute; inset: 0; z-index: 3; pointer-events: none; background: linear-gradient(115deg, transparent 38%, rgba(255, 255, 255, 0.05) 46%, rgba(255, 255, 255, 0.09) 50%, transparent 58%); background-size: 220% 100%; background-position: calc(30% + var(--kx, 0) * 30%) 0; transition: background-position 0.6s ease; }

/* the door: glass in a frame, it opens a little to the warm room behind */
.kd-door { position: relative; padding: 0; border: 10px solid #121520; border-bottom: 0; background: linear-gradient(180deg, #ffcf8a, #b8773a); perspective: 700px; }
.kd-door::before { display: none; }
.kd-leaf { position: absolute; inset: 0; background: linear-gradient(160deg, rgba(30, 36, 52, 0.96), rgba(14, 16, 24, 0.98)); border: 6px solid #1d2230; transform-origin: left center; transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1); box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.6); }
.kd-front:hover .kd-leaf { transform: rotateY(-22deg); }
.kd-handle { position: absolute; right: 10px; top: 46%; width: 6px; height: 64px; border-radius: 3px; background: linear-gradient(90deg, #c9c3b4, #8f897c); box-shadow: 0 0 0 2px rgba(0, 0, 0, 0.3); }
.kd-leaf .kd-plate { top: 2.6rem; }
.kd-leaf::before { content: ""; position: absolute; left: 50%; top: 1.2rem; width: 54%; height: 1.4rem; transform: translateX(-50%); border: 2px solid #b9b2a2; border-bottom: 0; border-radius: 50% 50% 0 0; clip-path: inset(0 0 50% 0); }

/* a doormat on the pavement */
.kd-front { position: relative; }
.kd-mat { position: absolute; z-index: 2; right: 22px; bottom: -34px; width: 150px; padding: 0.35rem 0; border-radius: 4px; background: #7a3b2a; color: #f4e6cf; text-align: center; font: 700 1.05rem/1.2 "IBM Plex Sans Arabic", var(--font-body); box-shadow: 0 6px 10px -6px rgba(0, 0, 0, 0.8); transform: perspective(300px) rotateX(48deg); }

@media (max-width: 860px) {
  .kd-awning { height: 40px; margin-top: -2rem; }
  .kd-window { grid-template-columns: 1fr; }
  .kd-copy { background: rgba(10, 12, 20, 0.94); }
  .kd-room { min-height: 230px; }
  .kd-door { height: 150px; }
  .kd-mat { right: 50%; transform: translateX(50%) perspective(300px) rotateX(48deg); }
}
@media (prefers-reduced-motion: reduce) {
  .kd-screen span, .kd-mug i { animation: none !important; }
  .kd-screen .l1 { width: 46%; } .kd-screen .l2 { width: 34%; } .kd-screen .pic, .kd-screen .wa { transform: none; }
  .kd-leaf, .kd-awning, .kd-room { transition: none !important; }
}

/* everything in the room sits in one scene with its own proportions, on the floor of the window */
.kd-scene { position: absolute; left: 0; right: 0; bottom: 0; aspect-ratio: 1 / 1.08; max-height: 100%; }
.kd-mug { height: 7%; width: 5.5%; }
.kd-plant { height: 20%; }
/* a pendant light fills the wall above the desk */
@media (min-width: 861px) { .kd-window { grid-template-columns: minmax(0, 1.18fr) minmax(0, 0.82fr); } }
.kd-room { background: radial-gradient(60% 34% at 46% 30%, rgba(255, 206, 140, 0.24), transparent 70%), radial-gradient(120% 70% at 78% 70%, rgba(255, 196, 120, 0.16), transparent 60%), linear-gradient(180deg, #2c211d 0%, #3a2b23 70%, #2a1e18 100%); }
.kd-room::before { content: ""; position: absolute; left: 46%; top: 0; width: 2px; height: 22%; background: #15161c; }
.kd-room::after { content: ""; position: absolute; left: calc(46% - 34px); top: 22%; width: 70px; height: 30px; border-radius: 50% 50% 6px 6px / 100% 100% 6px 6px; background: linear-gradient(180deg, #3a3d48, #23252d); box-shadow: 0 16px 30px -6px rgba(255, 206, 140, 0.55); }
.fx .kd-front:not(.is-lit) .kd-room::after { box-shadow: none; }
@media (max-width: 860px) { .kd-room::before { height: 12%; } .kd-room::after { top: 12%; } }

@media (max-width: 860px) { .kd-awning { margin-left: 0; margin-right: 0; } .kd-mat { width: 120px; } }
@media (max-width: 860px) {
  .kd-room { min-height: 250px; }
  .kd-scene { top: 0; aspect-ratio: auto; max-height: none; }
  .kd-room::before, .kd-room::after { display: none; }
  .kd-monitor { width: 46%; left: 16%; }
  .kd-mug { width: 4%; }
}
.hx main { overflow-x: clip; }

/* ==========================================================================
   Inside the live site: use its theme (site.css) for type and controls.
   The street's own lights (lamps, shop signs) stay as they are; they are part of the scene.
   ========================================================================== */
.hx-live { --font-title: var(--display); --font-body: var(--body); }
.hx-live main h1, .hx-live main h2 { font-weight: 600; letter-spacing: -0.03em; }
.hx-live .hx-btn-wa { background: var(--ruby); color: #fff; }
.hx-live .hx-btn-wa:hover { background: #b81f2b; }
.hx-live .hx-link { text-decoration-color: var(--ruby); }
.hx-live .hx-link:hover { color: var(--ruby-soft); }
.hx-live .st-index button[aria-current="step"] { background: rgba(212, 42, 54, 0.24); }
.hx-live .af.is-open .af-plate { background: var(--ruby); color: #fff; }
.hx-live .hx-checks li::before { border-color: #b81f2b; }
.hx-live .hx-quote :focus-visible { outline-color: #b81f2b; }

/* ==========================================================================
   Pricing: lit price tags you switch on, and a receipt that prints the estimate
   ========================================================================== */
.pq { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.pq-left h2 { margin: 0; }
.pq-pick { display: grid; gap: 0.75rem; margin: 1.6rem 0 0; padding: 0; border: 0; min-width: 0; }
.pq-tag { position: relative; display: block; cursor: pointer; }
.pq-tag input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pq-sign { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 1rem; align-items: center; padding: 0.95rem 1.2rem 0.95rem 2.6rem; border-radius: 8px; background: #0c0d12; border: 2px solid #2a2418; transition: border-color 0.3s ease, background-color 0.3s ease; }
.pq-sign::before { content: ""; position: absolute; left: 1rem; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; border-radius: 50%; background: #3a3226; transition: background-color 0.3s ease, box-shadow 0.3s ease; }
.pq-sign b { font: 600 1.2rem/1.2 var(--font-title); color: #8a7b62; transition: color 0.3s ease; }
.pq-sign small { grid-column: 1; font-size: 0.86rem; line-height: 1.4; color: var(--ink-muted); margin-top: 0.15rem; }
.pq-sign em { grid-column: 2; grid-row: 1 / span 2; font: 700 1.1rem/1.2 var(--font-title); font-style: normal; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; color: #8a7b62; transition: color 0.3s ease; }
.pq-tag:hover .pq-sign { border-color: #4a3a20; }
.pq-tag input:checked + .pq-sign { border-color: #6a5128; background: #100e0a; box-shadow: inset 0 0 40px rgba(255, 190, 110, 0.07); }
.pq-tag input:checked + .pq-sign::before { background: #ffd98a; box-shadow: 0 0 10px 2px rgba(255, 196, 110, 0.55); }
.pq-tag input:checked + .pq-sign b, .pq-tag input:checked + .pq-sign em { color: #ffd98a; text-shadow: 0 0 2px #fff4d6, 0 0 16px rgba(255, 186, 90, 0.5); }
.pq-tag input:focus-visible + .pq-sign { outline: 2px solid var(--ruby-soft, #f3b660); outline-offset: 3px; }
.pq-tag input:disabled + .pq-sign { opacity: 0.45; cursor: not-allowed; }
.pq-left .hx-permit { margin-top: 1.4rem; }

/* the printer and its receipt */
.pq-right { display: grid; justify-items: center; }
.pq-printer { position: relative; z-index: 2; width: min(100%, 460px); height: 58px; border-radius: 16px 16px 8px 8px; background: linear-gradient(180deg, #343844, #1a1c23); box-shadow: 0 20px 30px -18px rgba(0, 0, 0, 0.9), inset 0 1px 0 rgba(255, 255, 255, 0.12); }
.pq-printer .slot { position: absolute; left: 6%; right: 6%; bottom: 10px; height: 6px; border-radius: 3px; background: #07080b; }
.pq-printer .led { position: absolute; right: 18px; top: 14px; width: 7px; height: 7px; border-radius: 50%; background: #25d366; opacity: 0.5; }
.pq-right.is-printing .led { animation: pq-led 0.25s steps(1, end) 4; }
@keyframes pq-led { 50% { opacity: 1; } }
.pq-receipt { position: relative; width: min(88%, 404px); margin-top: -13px; padding: 1.9rem 1.4rem 1.6rem; background: #f7f3ea; color: #1a1d24; font: 400 0.86rem/1.45 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; filter: drop-shadow(0 26px 26px rgba(0, 0, 0, 0.55)); }
.pq-receipt::after { content: ""; position: absolute; left: 0; right: 0; bottom: -12px; height: 12px; background: linear-gradient(135deg, #f7f3ea 50%, transparent 50%) 0 0 / 16px 12px repeat-x, linear-gradient(225deg, #f7f3ea 50%, transparent 50%) 0 0 / 16px 12px repeat-x; }
.pq-receipt a { color: #1a1d24; }
.r-head { display: grid; justify-items: center; gap: 0.15rem; text-align: center; padding-bottom: 0.9rem; border-bottom: 1px dashed rgba(26, 29, 36, 0.45); }
.r-head b { font: 700 1.5rem/1.1 var(--font-title); letter-spacing: -0.01em; }
.r-head span { font-size: 0.74rem; color: #545a66; }
.r-kind { text-transform: uppercase; letter-spacing: 0.12em; }
.r-lines { list-style: none; margin: 0; padding: 0.7rem 0; border-bottom: 1px dashed rgba(26, 29, 36, 0.45); }
.r-lines li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.3rem 0; }
.r-lines li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.r-lines li.r-note { color: #6b6457; font-size: 0.78rem; padding-top: 0; }
.r-lines li.r-empty { display: none; color: #6b6457; }
.pq.is-live .r-lines li.r-empty.is-on { display: flex; }
.pq.is-live .r-lines li[hidden] { display: none; }
.pq.is-live .r-lines li:not([hidden]) { animation: r-print 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes r-print { from { opacity: 0; transform: translateY(-6px); } }
.r-totals { margin: 0; padding: 0.7rem 0; border-bottom: 1px dashed rgba(26, 29, 36, 0.45); }
.r-totals div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.2rem 0; }
.r-totals dt { font-weight: 700; }
.r-totals dd { margin: 0; font-weight: 700; font-variant-numeric: tabular-nums; }
.r-totals .r-dep dt, .r-totals .r-dep dd { font-weight: 400; font-size: 0.8rem; color: #353a45; }
.pq:not(.is-live) .r-totals { display: none; }
.r-fine { padding-top: 0.8rem; font-size: 0.7rem; line-height: 1.45; color: #4a505c; }
.r-fine p { margin: 0 0 0.35rem; }
.r-barcode { width: 72%; height: 42px; margin: 1rem auto 0.5rem; background: repeating-linear-gradient(90deg, #1a1d24 0 2px, transparent 2px 4px, #1a1d24 4px 5px, transparent 5px 8px, #1a1d24 8px 11px, transparent 11px 13px, #1a1d24 13px 14px, transparent 14px 17px); }
.r-thanks { margin: 0; text-align: center; font-size: 0.78rem; color: #545a66; }
.pq-right.is-printing .pq-receipt { animation: pq-feed 0.5s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes pq-feed { from { transform: translateY(-10px); } }
.fx .pq-receipt { clip-path: inset(0 0 100% 0); transition: clip-path 1.6s cubic-bezier(0.65, 0, 0.35, 1) 0.3s; }
.fx .pq-receipt.is-lit { clip-path: inset(-20px -40px -60px -40px); }
.pq-send { margin-top: 2.2rem; }

@media (max-width: 860px) {
  .pq { grid-template-columns: 1fr; }
  .pq-sign { padding: 0.85rem 0.95rem 0.85rem 2.3rem; }
  .pq-sign::before { left: 0.85rem; }
  .pq-sign b { font-size: 1.08rem; }
  .pq-sign em { font-size: 0.98rem; }
  .pq-receipt { width: 92%; }
}
@media (prefers-reduced-motion: reduce) {
  .pq-receipt, .pq-right.is-printing .pq-receipt, .pq.is-live .r-lines li:not([hidden]), .pq-right.is-printing .led { animation: none !important; transition: none !important; }
}
