/* The three niche landing pages (/for/services/, /for/shops/, /for/digital/).
   One frame (.nx) with three looks: a calm studio (.nx-services), an
   editorial boutique (.nx-shops) and paper and ink (.nx-digital). Neexaa's
   one accent everywhere; motion only moves transform and opacity, and none
   of it runs for visitors who ask for less motion. Logical properties so the
   Arabic pages mirror. */

.nx { --accent: #ff6a2b; --accent-ink: #b8430f; --on-accent: #1b0d05; --ink: #16171b; --muted: #62656f; --paper: #fff;
  --line: rgba(22, 23, 27, .1); --card: #fff; --r: 22px; --head: inherit; --body: inherit; --wrap: 1180px;
  color: var(--ink); font-family: var(--body); }
main:has(> .nx) { max-width: none; padding: 0; }
body:has(.nx) { overflow-x: clip; background: var(--nx-page, #fff); }
.nx img { animation: none; filter: none; max-width: 100%; display: block; }
.nx h1, .nx h2, .nx h3 { font-family: var(--head); letter-spacing: -.02em; margin: 0; }
.nx p { margin: 0; }
.nx-wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.nx section { padding-block: clamp(2.5rem, 5vw, 4.25rem); }

.nx-kicker { text-transform: uppercase; letter-spacing: .14em; font-size: .76rem; font-weight: 700; color: var(--accent-ink); margin-bottom: .9rem !important; }
.nx-h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); line-height: 1.02; margin-bottom: 1.1rem !important; }
.nx-h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); line-height: 1.08; margin-bottom: 2rem !important; }
.nx-lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); line-height: 1.6; color: var(--muted); max-width: 36rem; }
.nx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; margin-top: 1.8rem; }
.nx-btn { display: inline-flex; align-items: center; gap: .5rem; background: var(--accent); color: var(--on-accent); font-weight: 700;
  padding: .95rem 1.6rem; border-radius: 999px; text-decoration: none; box-shadow: 0 12px 28px -12px color-mix(in srgb, var(--accent) 70%, transparent);
  transition: transform .25s ease, box-shadow .25s ease; }
.nx-btn:hover { transform: translateY(-2px); box-shadow: 0 18px 36px -14px color-mix(in srgb, var(--accent) 80%, transparent); text-decoration: none; }
.nx-btn-light { background: #fff; color: var(--ink); box-shadow: none; }
.nx-link { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink); font-weight: 600; text-decoration: none; }
.nx-link svg { transition: transform .25s ease; }
.nx-link:hover svg { transform: translateX(4px); }
[dir="rtl"] .nx-link svg, [dir="rtl"] .nx-link:hover svg { transform: scaleX(-1); }
.nx-assure { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; list-style: none; padding: 0; margin: 1.6rem 0 0; color: var(--muted); font-size: .9rem; }
.nx-assure li::before { content: "✓"; color: var(--accent-ink); margin-inline-end: .4rem; font-weight: 700; }
.nx-icon { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent-ink); }

/* Reveals: the first screen is never hidden (niche.js marks it done at once). */
.nx-js .nx-reveal:not(.is-in) { opacity: 0; transform: translateY(24px); }
.nx-reveal { transition: opacity .8s cubic-bezier(.2, .7, .2, 1), transform .8s cubic-bezier(.2, .7, .2, 1); transition-delay: calc(var(--d, 0) * 90ms); }

/* Shared: hero layout, steps, features, plan, questions, last call. */
.nx-hero { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; padding-block: clamp(2.5rem, 6vw, 5rem) !important; }
.nx-steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 1.3rem; }
.nx-steps li { display: grid; grid-template-columns: 2.6rem 1fr; gap: 1rem; align-items: start; }
.nx-steps li > span { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--ink); color: #fff; font-weight: 700; }
.nx-steps h3 { font-size: 1.12rem; margin-bottom: .25rem !important; }
.nx-steps p { color: var(--muted); line-height: 1.55; }
.nx-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.2rem; }
.nx-feature { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem; display: grid; gap: .7rem; align-content: start;
  transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
.nx-feature:hover { transform: translateY(-4px); box-shadow: 0 22px 44px -26px rgba(0, 0, 0, .28); }
.nx-feature h3 { font-size: 1.12rem; }
.nx-feature p { color: var(--muted); line-height: 1.55; }

.nx-plan-card { max-width: 34rem; margin-inline: auto; background: var(--card); border: 1px solid var(--line); border-radius: calc(var(--r) + 6px); padding: clamp(1.8rem, 4vw, 2.8rem);
  box-shadow: 0 30px 70px -40px rgba(0, 0, 0, .35); text-align: center; }
.nx-plan-card h2 { font-size: 2rem; }
.nx-plan-price { margin: .6rem 0 1.4rem !important; color: var(--muted); }
.nx-plan-price strong { font-size: 3.2rem; color: var(--ink); font-family: var(--head); letter-spacing: -.03em; }
.nx-plan-price em { font-style: normal; }
.nx-ticks { list-style: none; padding: 0; margin: 0 0 1.8rem; display: grid; gap: .6rem; text-align: start; }
.nx-ticks li { display: flex; gap: .6rem; align-items: flex-start; line-height: 1.45; }
.nx-ticks svg { color: var(--accent-ink); flex: none; margin-top: .15rem; }
.nx-note { color: var(--muted); font-size: .88rem; margin-top: 1rem !important; }

.nx-faq-list { max-width: 48rem; display: grid; gap: .7rem; }
.nx-faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 1.1rem 1.3rem; }
.nx-faq-item summary { cursor: pointer; font-weight: 700; list-style: none; display: flex; justify-content: space-between; gap: 1rem; }
.nx-faq-item summary::after { content: "+"; font-size: 1.3rem; line-height: 1; color: var(--accent-ink); transition: transform .25s ease; }
.nx-faq-item[open] summary::after { transform: rotate(45deg); }
.nx-faq-item p { color: var(--muted); margin-top: .7rem !important; line-height: 1.6; }

.nx-final { position: relative; overflow: hidden; color: #fff; text-align: center; padding-block: clamp(5rem, 12vw, 8.5rem) !important; }
.nx-final-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.nx-final::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(10, 10, 12, .55), rgba(10, 10, 12, .78)); }
.nx-final-body { position: relative; z-index: 1; max-width: 42rem; margin-inline: auto; padding-inline: 20px; display: grid; gap: 1rem; justify-items: center; }
.nx-final h2 { font-size: clamp(2rem, 5vw, 3.4rem); line-height: 1.05; }
.nx-final p { color: rgba(255, 255, 255, .82); }
.nx-others a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Services: a calm studio ---------- */
.nx-services { --head: 'Fraunces', Georgia, serif; --body: 'DM Sans', system-ui, sans-serif; --nx-page: #faf6f1; --card: #fffdfa; --r: 26px; }
.nx-services:lang(ar) { --head: 'Readex Pro', system-ui, sans-serif; --body: 'Readex Pro', system-ui, sans-serif; }
body:has(.nx-services) { --nx-page: #faf6f1; }
.nx-services .nx-h1 { font-weight: 600; }
.nx-services .nx-h1, .nx-services .nx-h2 { font-variation-settings: "SOFT" 100, "WONK" 1; }
.nx-hero-art { position: relative; }
.nx-hero-photo { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 200px 200px var(--r) var(--r); box-shadow: 0 40px 80px -45px rgba(60, 30, 10, .5); }
.sv-card { position: absolute; inset-inline-start: -10%; bottom: 8%; width: min(320px, 78%); background: rgba(255, 253, 250, .9); backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px); border: 1px solid rgba(255, 255, 255, .7); border-radius: 22px; padding: 1.1rem; box-shadow: 0 30px 60px -30px rgba(40, 20, 5, .45);
  animation: sv-float 7s ease-in-out infinite; }
.sv-card-head { display: flex; gap: .7rem; align-items: center; margin-bottom: .9rem; }
.sv-card-head strong { display: block; font-size: .98rem; }
.sv-card-head small { color: var(--muted); }
.sv-dot { width: 38px; height: 38px; border-radius: 12px; background: linear-gradient(135deg, var(--accent), #ffb489); flex: none; }
.sv-days { display: flex; gap: .3rem; margin-bottom: .7rem; font-size: .76rem; color: var(--muted); }
.sv-days span { flex: 1; text-align: center; padding: .3rem 0; border-radius: 8px; }
.sv-days .is-on { background: var(--ink); color: #fff; }
.sv-times { display: grid; grid-template-columns: repeat(4, 1fr); gap: .35rem; }
.sv-time { text-align: center; padding: .45rem 0; border: 1px solid var(--line); border-radius: 999px; font-size: .82rem; font-variant-numeric: tabular-nums;
  transition: background .3s ease, color .3s ease, border-color .3s ease, transform .3s ease; }
.sv-time.is-hover { border-color: var(--accent); color: var(--accent-ink); transform: translateY(-2px); }
.sv-time.is-picked { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 700; }
.sv-booked { display: flex; align-items: center; gap: .4rem; margin-top: .8rem !important; font-size: .85rem; font-weight: 700; color: #1d7a46;
  opacity: 0; transform: translateY(6px); transition: opacity .4s ease, transform .4s ease; }
.sv-booked.is-on { opacity: 1; transform: none; }
@keyframes sv-float { 50% { transform: translateY(-10px); } }

.sv-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; }
.sv-tile { margin: 0; position: relative; overflow: hidden; border-radius: var(--r); }
.sv-tile img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; transition: transform .9s cubic-bezier(.2, .7, .2, 1); }
.sv-tile:hover img { transform: scale(1.06); }
.sv-tile figcaption { position: absolute; inset-inline: .7rem; bottom: .7rem; background: rgba(255, 253, 250, .92); border-radius: 999px; padding: .5rem .9rem; font-weight: 700; font-size: .9rem; text-align: center; }

.sv-week { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.sv-cal { display: grid; grid-template-columns: repeat(6, 1fr); gap: .5rem; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.2rem;
  box-shadow: 0 30px 60px -40px rgba(60, 30, 10, .4); }
.sv-col { display: grid; gap: .45rem; }
.sv-col b { font-size: .78rem; color: var(--muted); text-align: center; font-weight: 600; }
.sv-slot { display: block; height: 34px; border-radius: 10px; background: color-mix(in srgb, var(--ink) 5%, transparent); }
.sv-slot.is-booked { background: linear-gradient(135deg, var(--accent), #ffb489); transform-origin: left center; }
.nx-js .sv-cal:not(.is-in) .sv-slot.is-booked { transform: scaleX(0); opacity: 0; }
.sv-cal .sv-slot.is-booked { transition: transform .5s cubic-bezier(.2, .7, .2, 1), opacity .5s ease; transition-delay: calc((var(--c) * 90ms) + (var(--r) * 140ms) + 300ms); }

/* ---------- Shops: an editorial boutique ---------- */
.nx-shops { --head: 'Playfair Display', Georgia, serif; --body: 'Inter', system-ui, sans-serif; --r: 4px; }
.nx-shops:lang(ar) { --head: 'Cairo', system-ui, sans-serif; --body: 'Cairo', system-ui, sans-serif; }
.nx-shops .nx-h1 { font-style: italic; font-weight: 600; font-size: clamp(2.8rem, 8vw, 6rem); }
.nx-shops:lang(ar) .nx-h1 { font-style: normal; font-weight: 800; }
.nx-shops .nx-btn { border-radius: 0; }
.nx-shops .nx-steps li > span { border-radius: 0; background: var(--accent); color: var(--on-accent); }
.sh-hero { position: relative; min-height: min(92vh, 820px); display: grid; align-items: end; color: #fff; padding: 0 !important; overflow: hidden; }
.sh-hero-photo { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; animation: sh-drift 26s ease-in-out infinite alternate; }
.sh-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .1) 20%, rgba(0, 0, 0, .72)); }
.sh-hero-body { position: relative; z-index: 1; padding-block: 0 clamp(3rem, 8vw, 5.5rem); width: 100%; }
.sh-hero .nx-kicker { color: #ffd2bd; }
.sh-hero .nx-lead { color: rgba(255, 255, 255, .85); }
.sh-hero .nx-link { color: #fff; }
@keyframes sh-drift { from { transform: scale(1.04); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
.sh-ticker { overflow: hidden; background: var(--ink); color: #fff; padding: .95rem 0; font-family: var(--head); font-style: italic; font-size: 1.15rem; white-space: nowrap; }
.nx-shops:lang(ar) .sh-ticker { font-style: normal; }
.sh-ticker-track { display: inline-flex; gap: 1.6rem; align-items: center; animation: sh-ticker 32s linear infinite; }
.sh-ticker i { color: var(--accent); font-style: normal; }
@keyframes sh-ticker { to { transform: translateX(-50%); } }
[dir="rtl"] .sh-ticker-track { animation-name: sh-ticker-rtl; }
@keyframes sh-ticker-rtl { to { transform: translateX(50%); } }
.sh-look-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.sh-look-head .nx-h2 { margin: 0 !important; }
.sh-cart { position: relative; display: grid; place-items: center; width: 52px; height: 52px; border: 1px solid var(--line); border-radius: 50%; }
.sh-cart b { position: absolute; top: -4px; inset-inline-end: -4px; min-width: 22px; height: 22px; border-radius: 999px; background: var(--accent); color: var(--on-accent);
  font-size: .75rem; display: grid; place-items: center; padding: 0 5px; }
.sh-cart.is-bump { animation: sh-bump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes sh-bump { 40% { transform: scale(1.18) rotate(-6deg); } }
.sh-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 27%); gap: 1.1rem; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 2rem max(20px, calc((100vw - var(--wrap)) / 2 + 20px)) 1rem; scrollbar-width: thin;
  scroll-padding-inline: max(20px, calc((100vw - var(--wrap)) / 2 + 20px)); }
.sh-product { margin: 0; scroll-snap-align: start; }
.sh-product-photo { position: relative; overflow: hidden; background: #f1efec; }
.sh-product-photo img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; transition: transform 1.1s cubic-bezier(.2, .7, .2, 1); }
.sh-product:hover img { transform: scale(1.07); }
.sh-add { position: absolute; inset-inline: .8rem; bottom: .8rem; padding: .8rem; border: 0; background: #fff; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer;
  transform: translateY(140%); transition: transform .35s cubic-bezier(.2, .7, .2, 1), background .2s ease; }
.sh-product:hover .sh-add, .sh-add:focus-visible { transform: none; }
.sh-add:hover { background: var(--accent); color: var(--on-accent); }
@media (hover: none) { .sh-add { transform: none; } }
.sh-product figcaption { display: flex; justify-content: space-between; gap: .8rem; padding-top: .8rem; font-size: .98rem; }
.sh-product figcaption b { font-variant-numeric: tabular-nums; white-space: nowrap; }
.sh-orders { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.sh-phone { justify-self: center; width: min(300px, 100%); aspect-ratio: 9 / 19; border-radius: 44px; background: #0e0f12; padding: 12px; box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .6); }
.sh-phone-screen { height: 100%; border-radius: 34px; background: linear-gradient(160deg, #3a2a22, #0e0f12 60%); padding: 2.2rem .8rem; display: grid; align-content: start; gap: .7rem; overflow: hidden; }
.sh-phone-time { color: #fff; text-align: center; font-size: 3rem; font-weight: 300; margin-bottom: 1rem !important; font-family: var(--body); }
.sh-alert { display: flex; gap: .7rem; align-items: center; background: rgba(255, 255, 255, .88); border-radius: 18px; padding: .75rem .8rem; transform: translateY(-16px) scale(.96); opacity: 0;
  transition: transform .6s cubic-bezier(.2, .9, .3, 1.2), opacity .4s ease; font-family: var(--body); }
.sh-alert.is-on { transform: none; opacity: 1; }
.sh-alert strong { display: block; font-size: .85rem; }
.sh-alert small { color: var(--muted); font-size: .76rem; }
.sh-alert-icon { width: 34px; height: 34px; border-radius: 9px; background: #121317; color: #fff; display: grid; place-items: center; font-weight: 800; flex: none; box-shadow: inset 0 -3px 0 var(--accent); }
.sh-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2rem 2rem; }
.sh-feature { border-top: 1px solid var(--ink); padding-top: 1.1rem; display: grid; gap: .5rem; }
.sh-num { font-family: var(--head); font-style: italic; font-size: 2.2rem; color: var(--accent-ink); line-height: 1; }
.sh-feature h3 { font-size: 1.2rem; }
.sh-feature p { color: var(--muted); line-height: 1.55; }
.nx-shops .nx-plan-card, .nx-shops .nx-faq-item { border-radius: 0; }
.nx-shops .nx-final-photo { object-position: center 40%; }

/* ---------- Digital: paper and ink ---------- */
.nx-digital { --head: 'Libre Baskerville', Georgia, serif; --body: 'Manrope', system-ui, sans-serif; --nx-page: #f7f5ef; --ink: #1c2233; --card: #fffefa; --r: 14px; }
.nx-digital:lang(ar) { --head: 'Noto Naskh Arabic', serif; --body: 'Noto Naskh Arabic', serif; }
body:has(.nx-digital) { --nx-page: #f7f5ef; }
.nx-digital .nx-h1 { font-weight: 700; font-size: clamp(2.3rem, 5.8vw, 4.2rem); }
.dg-stage { position: relative; min-height: 460px; display: grid; place-items: center; perspective: 1600px; }
.dg-desk { position: absolute; inset: 6% 4% 10% 10%; width: 86%; height: 84%; object-fit: cover; border-radius: 28px; opacity: .9; }
.dg-book { position: relative; width: min(300px, 70%); aspect-ratio: 3 / 4; transform-style: preserve-3d; transform: rotateY(-18deg) rotateX(8deg); animation: dg-tilt 9s ease-in-out infinite; }
@keyframes dg-tilt { 50% { transform: rotateY(-8deg) rotateX(4deg) translateY(-8px); } }
.dg-cover, .dg-page { position: absolute; inset: 0; border-radius: 6px 14px 14px 6px; transform-origin: left center; backface-visibility: hidden; }
[dir="rtl"] .dg-cover, [dir="rtl"] .dg-page { transform-origin: right center; border-radius: 14px 6px 6px 14px; }
.dg-cover { z-index: 4; background: linear-gradient(145deg, #1c2233, #2d3650); color: #fff; padding: 1.6rem 1.4rem; display: grid; align-content: space-between;
  box-shadow: 0 30px 60px -25px rgba(20, 25, 40, .6), inset 6px 0 0 rgba(255, 255, 255, .08); font-family: var(--head); }
.dg-cover small { font-family: var(--body); letter-spacing: .2em; color: var(--accent); font-weight: 800; }
.dg-cover strong { font-size: 1.5rem; line-height: 1.2; }
.dg-page { background: #fffefa; border: 1px solid rgba(28, 34, 51, .08); padding: 1.5rem 1.3rem; display: grid; align-content: start; gap: .7rem; box-shadow: 0 20px 40px -30px rgba(20, 25, 40, .5); }
.dg-page span { font-size: .72rem; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; }
.dg-page i { display: block; height: 9px; border-radius: 5px; background: rgba(28, 34, 51, .1); }
.dg-page i:nth-child(3) { width: 80%; } .dg-page i:nth-child(5) { width: 64%; }
.dg-p1 { z-index: 3; } .dg-p2 { z-index: 2; } .dg-p3 { z-index: 1; }
.dg-book.is-open .dg-cover { animation: dg-turn 7.5s cubic-bezier(.45, .05, .25, 1) infinite; }
.dg-book.is-open .dg-p1 { animation: dg-turn 7.5s cubic-bezier(.45, .05, .25, 1) .9s infinite; }
.dg-book.is-open .dg-p2 { animation: dg-turn 7.5s cubic-bezier(.45, .05, .25, 1) 1.8s infinite; }
@keyframes dg-turn { 0%, 12% { transform: rotateY(0); } 34%, 78% { transform: rotateY(-165deg); } 96%, 100% { transform: rotateY(0); } }
[dir="rtl"] .dg-book.is-open .dg-cover, [dir="rtl"] .dg-book.is-open .dg-p1, [dir="rtl"] .dg-book.is-open .dg-p2 { animation-name: dg-turn-rtl; }
@keyframes dg-turn-rtl { 0%, 12% { transform: rotateY(0); } 34%, 78% { transform: rotateY(165deg); } 96%, 100% { transform: rotateY(0); } }
.dg-lock { position: absolute; top: 7%; inset-inline-end: 6%; background: #fff; border-radius: 999px; padding: .55rem 1rem; font-weight: 700; font-size: .88rem;
  box-shadow: 0 14px 30px -18px rgba(20, 25, 40, .6); display: grid; }
.dg-lock span { grid-area: 1 / 1; display: flex; align-items: center; gap: .4rem; transition: opacity .4s ease, transform .4s ease; }
.dg-lock-open { color: #1d7a46; opacity: 0; transform: translateY(6px); }
.dg-lock.is-open .dg-lock-closed { opacity: 0; transform: translateY(-6px); }
.dg-lock.is-open .dg-lock-open { opacity: 1; transform: none; }
.dg-file-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.1rem; }
.dg-file { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem 1.3rem 1.3rem; display: grid; gap: .5rem; align-content: start;
  overflow: hidden; transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease; }
.dg-file::before { content: ""; position: absolute; inset-inline-end: 0; top: 0; border-width: 0 26px 26px 0; border-style: solid; border-color: transparent #efe9dc transparent transparent; }
[dir="rtl"] .dg-file::before { border-width: 0 0 26px 26px; border-color: transparent transparent transparent #efe9dc; }
.dg-file:hover { transform: translateY(-6px) rotate(-.6deg); box-shadow: 0 24px 50px -30px rgba(20, 25, 40, .45); }
.dg-kind { justify-self: start; font-size: .7rem; font-weight: 800; letter-spacing: .12em; padding: .3rem .55rem; border-radius: 6px; background: var(--ink); color: #fff; }
.dg-file h3 { font-size: 1.05rem; line-height: 1.3; }
.dg-file p { color: var(--muted); font-size: .9rem; }
.dg-file b { font-variant-numeric: tabular-nums; margin-top: .4rem; }
.dg-timeline { position: relative; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2rem; }
.dg-timeline::before { content: ""; position: absolute; top: 1.3rem; inset-inline-start: 1.3rem; width: calc((100% - 4rem) * 2 / 3 + 4rem); height: 2px; background: repeating-linear-gradient(90deg, var(--accent) 0 8px, transparent 8px 14px);
  transform-origin: left; transition: transform 1.4s cubic-bezier(.2, .7, .2, 1) .2s; }
[dir="rtl"] .dg-timeline::before { transform-origin: right; }
.nx-js .dg-timeline:not(.is-in)::before { transform: scaleX(0); }
.dg-timeline li { position: relative; display: grid; gap: .45rem; }
.dg-timeline span { width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--card); border: 2px solid var(--accent); display: grid; place-items: center; font-weight: 800; font-family: var(--head); }
.dg-timeline h3 { font-size: 1.15rem; margin-top: .4rem !important; }
.dg-timeline p { color: var(--muted); line-height: 1.55; }
.dg-photos { display: grid; grid-template-columns: 1.2fr 1fr 1fr 1.2fr; gap: 1rem; padding-block: 0 !important; }
.dg-photos img { width: 100%; height: 240px; object-fit: cover; border-radius: var(--r); }
.dg-photos img:nth-child(even) { margin-top: 2.5rem; }
/* A notebook page: one margin line down the side, not ruling through the words. */
.dg-paper { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 18px;
  padding: clamp(1.4rem, 4vw, 2.6rem) clamp(1.4rem, 4vw, 2.6rem) clamp(1.4rem, 4vw, 2.6rem) clamp(2.6rem, 6vw, 4rem); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.8rem 2.4rem; box-shadow: 0 30px 60px -45px rgba(20, 25, 40, .45); }
.dg-paper::before { content: ""; position: absolute; top: 0; bottom: 0; inset-inline-start: clamp(1.4rem, 3vw, 2rem); width: 2px; background: color-mix(in srgb, var(--accent) 45%, transparent); }
[dir="rtl"] .dg-paper { padding-inline: clamp(2.6rem, 6vw, 4rem) clamp(1.4rem, 4vw, 2.6rem); }
.dg-feature { display: grid; grid-template-columns: 44px 1fr; gap: 1rem; }
.dg-feature h3 { font-size: 1.1rem; margin-bottom: .3rem !important; }
.dg-feature p { color: var(--muted); line-height: 1.6; }

/* ---------- Narrow screens ---------- */
@media (max-width: 900px) {
  .nx-hero, .sv-week, .sh-orders { grid-template-columns: 1fr; }
  .nx-feature-grid, .sh-feature-grid { grid-template-columns: 1fr 1fr; }
  .sv-tiles, .dg-file-grid { grid-template-columns: 1fr 1fr; }
  .sv-card { inset-inline-start: 4%; bottom: 5%; }
  .sh-rail { grid-auto-columns: 62%; }
  .dg-paper { grid-template-columns: 1fr; }
  .dg-photos { grid-template-columns: 1fr 1fr; }
  .dg-photos img:nth-child(even) { margin-top: 0; }
  .dg-timeline { grid-template-columns: 1fr; }
  .dg-timeline::before { display: none; }
}
@media (max-width: 560px) {
  .nx-feature-grid, .sh-feature-grid, .dg-file-grid { grid-template-columns: 1fr; }
  .dg-stage { min-height: 380px; }
}

/* Less motion: everything is simply there. */
@media (prefers-reduced-motion: reduce) {
  .nx *, .nx *::before, .nx *::after { animation: none !important; transition: none !important; }
  .nx-js .nx-reveal:not(.is-in), .nx-js .sv-cal:not(.is-in) .sv-slot.is-booked, .nx-js .dg-timeline:not(.is-in)::before { opacity: 1; transform: none; }
  .sv-booked, .sh-alert, .dg-lock-open { opacity: 1; transform: none; }
  .dg-lock-closed { opacity: 0; }
}
