/* ==========================================================================
   OTHMAN RIYADH — DEVELOPER PAGE (/developer)
   The public design system (Obsidian, Solar Gold, Dusk Violet, Graphik) with a
   developer's accent: editor windows, a monospace voice for code and labels,
   comment-style kickers. Tokens come from immersive.css (--ir-*).
   Motion animates transform and opacity only.
   ========================================================================== */

.dv-body {
  background: var(--ir-ink);
}

.dv-page {
  --dv-mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --dv-sec: clamp(80px, 8.4vw, 136px);
  --dv-card: rgba(255, 255, 255, 0.035);
  color: var(--ir-text);
}

/* One language at a time: every text carries lang="ar" or lang="en". */
html[lang="en"] .dv-page [lang="ar"],
html:not([lang="en"]) .dv-page [lang="en"] {
  display: none !important;
}

/* ==========================================================================
   HERO — pinned stage; --p (0..1) is the scroll progress set by developer.js
   ========================================================================== */
section.dv-hero {
  position: relative;
  padding: 0;
  background: var(--ir-ink);
}

.dv-hero-track {
  height: 220vh;
  height: 220svh;
}

.dv-hero-stage {
  --p: 0;
  --dv-x: 1; /* which way the window travels to the centre (RTL: it starts on the left) */
  --dv-w: min(50vw, 80svh);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

html[dir="ltr"] .dv-hero-stage {
  --dv-x: -1;
}

/* Blueprint grid with two soft lights; static, so it costs nothing */
.dv-grid {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(46% 52% at 18% 22%, rgba(245, 197, 66, 0.1), transparent 70%),
    radial-gradient(52% 58% at 84% 78%, rgba(120, 113, 205, 0.18), transparent 72%),
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 100% 56px,
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px) 0 0 / 56px 100%;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 45%, #000 35%, transparent 100%);
  mask-image: radial-gradient(120% 90% at 50% 45%, #000 35%, transparent 100%);
  opacity: calc(1 - var(--p) * 0.5);
}

.dv-hero-copy {
  position: absolute;
  top: 50%;
  inset-inline-start: var(--ir-gutter);
  width: min(42vw, 36rem);
  opacity: calc(1 - var(--p) * 2.6);
  transform: translate3d(0, calc(-50% - var(--p) * 64px), 0);
  will-change: transform, opacity;
}

.dv-prompt {
  display: flex;
  align-items: center;
  justify-content: flex-end; /* a prompt always reads left to right; in Arabic it sits on the right */
  direction: ltr;
  gap: 10px;
  margin: 0 0 18px;
  font-family: var(--dv-mono);
  font-size: 0.9rem;
  color: var(--ir-dim);
}

.dv-sign {
  color: var(--ir-gold);
  font-family: var(--dv-mono);
}

html[dir="ltr"] .dv-prompt {
  justify-content: flex-start;
}

.dv-hero-title {
  margin: 0;
  font-size: clamp(2.3rem, 4.5vw, 4.8rem);
  font-weight: 900;
  line-height: 1.16;
  letter-spacing: -0.01em;
  color: var(--ir-text);
}

html[lang="en"] .dv-hero-title {
  line-height: 1.02;
  letter-spacing: -0.035em;
}

.dv-hero-title > span {
  display: flex;
  flex-direction: column;
}

.dv-hero-title .ir-mask-inner {
  animation: irRise 1.25s var(--ir-ease) both;
  animation-delay: calc(0.3s + var(--d, 0) * 0.14s);
}

.dv-hero-role {
  margin: 22px 0 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--ir-gold);
}

.dv-hero-statement {
  margin: 12px 0 0;
  max-width: 30rem;
  font-size: clamp(1.02rem, 1.35vw, 1.2rem);
  line-height: 1.75;
  color: var(--ir-dim);
}

html[lang="en"] .dv-hero-statement {
  line-height: 1.55;
}

.dv-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

/* ---- Editor window ---- */
.dv-window-wrap {
  position: absolute;
  top: 50%;
  inset-inline-end: var(--ir-gutter);
  width: var(--dv-w);
  transform:
    translate3d(calc(var(--p) * var(--dv-x) * (50vw - var(--ir-gutter) - var(--dv-w) / 2)), calc(-50% + var(--p) * 26px), 0)
    scale(calc(1 + var(--p) * 0.38));
  will-change: transform;
}

.dv-window {
  --rx: 0deg;
  --ry: 0deg;
  container-type: inline-size;
  display: flex;
  flex-direction: column;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0b17;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(120, 113, 205, 0.12);
  transform: perspective(1400px) rotateX(var(--rx)) rotateY(var(--ry));
  transition: transform 0.6s var(--ir-ease);
  animation: irFade 1.1s var(--ir-ease) 0.5s backwards;
}

.dv-window-bar {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 36px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  direction: ltr;
}

.dv-dots {
  display: inline-flex;
  gap: 6px;
}

.dv-dots i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
}

.dv-dots i:last-child {
  background: var(--ir-gold);
}

.dv-tab {
  position: relative;
  font-family: var(--dv-mono);
  font-size: 11.5px;
  color: var(--ir-dim);
  white-space: nowrap;
}

.dv-tab-site,
.dv-foot-site {
  position: absolute;
  inset-inline-start: 0;
  top: 0;
  opacity: calc((var(--p) - 0.3) * 3);
}

.dv-tab-code,
.dv-foot-code {
  opacity: calc(1 - var(--p) * 3);
}

.dv-window-body {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #0b0b17;
}

.dv-code {
  position: absolute;
  inset: 0;
  margin: 0;
  padding: 4.2cqw 0;
  overflow: hidden;
  font-family: var(--dv-mono);
  font-size: 11px;
  font-size: clamp(8px, 2.5cqw, 19px);
  line-height: 1.95;
  color: #d9d6f2;
  white-space: pre;
  direction: ltr;
  text-align: left;
  opacity: calc(1 - var(--p) * 2.6);
}

.dv-code code {
  display: block;
  font: inherit;
  background: none;
  padding: 0;
  color: inherit;
  white-space: normal; /* line breaks come from the .l blocks, not from the markup */
}

.dv-code .l {
  display: block;
  min-height: 1.95em;
  white-space: pre;
  animation: dvLine 0.7s var(--ir-ease) both;
  animation-delay: calc(0.9s + var(--i, 0) * 0.11s);
}

.dv-code b {
  display: inline-block;
  width: 5.2cqw;
  min-width: 26px;
  padding-inline-end: 1.6cqw;
  text-align: right;
  font-weight: 400;
  color: rgba(236, 233, 255, 0.26);
  user-select: none;
}

.dv-code i {
  font-style: normal;
}

.dv-code .c { color: rgba(236, 233, 255, 0.42); }
.dv-code .t { color: #a8a2ee; }
.dv-code .f { color: var(--ir-gold); }
.dv-code .n { color: #f1dc9c; }

.dv-caret {
  display: inline-block;
  width: 0.55em;
  height: 1.1em;
  margin-inline-start: 2px;
  vertical-align: -0.18em;
  background: var(--ir-gold);
  animation: dvBlink 1.1s steps(1, end) infinite;
}

.dv-shot {
  position: absolute;
  inset: 0;
  opacity: calc((var(--p) - 0.22) * 2.6);
}

.dv-shot img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 0;
}

.dv-window-foot {
  position: relative;
  height: 28px;
  padding: 0 14px;
  display: flex;
  align-items: center;
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  font-family: var(--dv-mono);
  font-size: 10.5px;
  color: var(--ir-faint);
  white-space: nowrap;
}

.dv-window-foot .dv-foot-site {
  inset-inline-start: 14px;
  top: 50%;
  margin-top: -0.6em;
  color: var(--ir-gold);
}

.dv-scroll-cue {
  position: absolute;
  inset-inline-start: var(--ir-gutter);
  bottom: 28px;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 48px;
  font-size: 0.86rem;
  color: var(--ir-faint);
  text-decoration: none;
  opacity: calc(1 - var(--p) * 3);
}

@keyframes dvLine {
  from { opacity: 0; transform: translate3d(-10px, 0, 0); }
  to { opacity: 1; transform: none; }
}

@keyframes dvBlink {
  0%, 55% { opacity: 1; }
  56%, 100% { opacity: 0; }
}

/* ==========================================================================
   SECTIONS
   ========================================================================== */
section.dv-section {
  position: relative;
  padding: var(--dv-sec) 0;
  background: var(--ir-ink);
}

section.dv-section-alt {
  background: linear-gradient(180deg, rgba(15, 15, 30, 0.9) 0%, var(--ir-ink) 100%);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.dv-wrap {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--ir-gutter);
}

.dv-head {
  max-width: 54rem;
  margin-bottom: clamp(32px, 4.4vw, 64px);
}

.dv-kicker {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ir-dim);
}

.dv-slash {
  font-family: var(--dv-mono);
  font-weight: 500;
  color: var(--ir-gold);
  direction: ltr;
  unicode-bidi: isolate;
}

.dv-title {
  margin: 0;
  font-size: clamp(2rem, 4.3vw, 4.2rem);
  font-weight: 800;
  line-height: 1.26;
  letter-spacing: -0.01em;
  color: var(--ir-text);
}

html[lang="en"] .dv-title {
  line-height: 1.06;
  letter-spacing: -0.03em;
}

.dv-lead {
  margin: 18px 0 0;
  max-width: 44rem;
  font-size: clamp(1.02rem, 1.4vw, 1.22rem);
  line-height: 1.85;
  color: var(--ir-dim);
}

html[lang="en"] .dv-lead {
  line-height: 1.6;
}

.dv-note {
  margin: 16px 0 0;
  font-size: 0.82rem;
  color: var(--ir-faint);
}

/* ---- Works grid: one wide card, then two; each opens a detail view ---- */
.dv-pgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2vw, 28px);
}

.dv-pcard {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 22px;
  overflow: hidden;
  background: var(--ir-ink-2);
  color: var(--ir-text);
  text-decoration: none;
  transition: border-color 0.4s ease, transform 0.6s var(--ir-ease);
}

.dv-pcard-wide {
  grid-column: 1 / -1;
}

.dv-pcard-media {
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 10;
}

.dv-pcard-wide .dv-pcard-media {
  aspect-ratio: 16 / 8.5;
}

/* Brand tile: same treatment as the client tiles on /work: a drifting two-colour
   gradient, a soft travelling glow and the logo floating in the middle. */
.dv-pcard-media {
  position: relative;
}

.dv-brand {
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--c1);
  isolation: isolate;
}

.dv-brand::before {
  content: "";
  position: absolute;
  inset: -40%;
  background: linear-gradient(135deg, var(--c1) 20%, var(--c2) 50%, var(--c1) 80%);
  animation: dvBrandDrift 14s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
  animation-delay: calc(var(--i, 0) * -1.3s);
  z-index: -2;
}

.dv-brand-glow {
  position: absolute;
  width: 70%;
  aspect-ratio: 1;
  inset-block-start: -10%;
  inset-inline-start: -10%;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.28), transparent 65%);
  animation: dvBrandGlow 11s cubic-bezier(0.45, 0, 0.55, 1) infinite alternate;
  animation-delay: calc(var(--i, 0) * -0.9s);
  z-index: -1;
}

.dv-brand-logo {
  position: absolute;
  inset: 26% 20%;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: dvBrandFloat 6s cubic-bezier(0.45, 0, 0.55, 1) infinite;
  animation-delay: calc(var(--i, 0) * -0.7s);
}

.dv-brand-logo img,
.dv-wordmark {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  transform: scale(var(--logo-scale, 1));
  filter: drop-shadow(0 10px 22px rgba(0, 0, 0, 0.18));
  transition: transform 0.6s var(--ir-ease);
}

.dv-wordmark {
  font-size: clamp(2.6rem, 7vw, 5.4rem);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  color: #fff;
}

.dv-wordmark sup {
  font-size: 0.36em;
  font-weight: 600;
  vertical-align: 1.4em;
  margin-inline-start: 0.06em;
}

.dv-concept {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-start: 16px;
  padding: 6px 14px;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  color: #fff;
  font-size: 0.8rem;
  font-weight: 600;
}

@keyframes dvBrandDrift {
  from { transform: translate3d(-12%, -8%, 0) rotate(0deg); }
  to { transform: translate3d(12%, 8%, 0) rotate(8deg); }
}

@keyframes dvBrandGlow {
  from { transform: translate3d(0, 0, 0); opacity: 0.55; }
  to { transform: translate3d(70%, 85%, 0); opacity: 1; }
}

@keyframes dvBrandFloat {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -5px, 0); }
}

.dv-pcard-info {
  display: grid;
  gap: 6px;
  padding: clamp(18px, 2vw, 28px);
  padding-inline-end: 96px;
}

.dv-pcard-tag {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ir-faint);
}

.dv-pcard-name {
  font-size: clamp(1.4rem, 2.4vw, 2.2rem);
  font-weight: 800;
  line-height: 1.25;
}

.dv-pcard-line {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--ir-dim);
}

.dv-pcard-go {
  position: absolute;
  inset-block-end: clamp(18px, 2vw, 28px);
  inset-inline-end: clamp(18px, 2vw, 28px);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ir-text);
  transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.5s var(--ir-ease);
}

html[dir="rtl"] .dv-pcard-go svg {
  transform: scaleX(-1);
}

.dv-pcard-go svg {
  width: 20px;
  height: 20px;
}

.dv-pcard:hover {
  border-color: rgba(245, 197, 66, 0.5);
}

@media (hover: hover) {
  .dv-pcard:hover .dv-brand-logo img,
  .dv-pcard:hover .dv-wordmark {
    transform: scale(calc(var(--logo-scale, 1) * 1.08));
  }
}

.dv-pcard:hover .dv-pcard-go {
  background: var(--ir-gold);
  border-color: var(--ir-gold);
  color: #17130a;
}

.dv-pcard:focus-visible {
  outline: 2px solid var(--ir-gold);
  outline-offset: 4px;
}

.dv-frame-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 34px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  background: #12121f;
}

.dv-url {
  font-family: var(--dv-mono);
  font-size: 11px;
  color: var(--ir-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dv-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---- Project detail: a full-screen sheet with the screens at full width ---- */
.dv-detail {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--ir-ink);
  color: var(--ir-text);
}

.dv-detail::backdrop {
  background: var(--ir-ink);
}

.dv-detail[open] {
  animation: dvDetailIn 0.6s var(--ir-ease) both;
}

@keyframes dvDetailIn {
  from { opacity: 0; transform: translate3d(0, 24px, 0); }
  to { opacity: 1; transform: none; }
}

.dv-detail-top {
  position: sticky;
  top: 0;
  z-index: 3;
  height: 0;
}

.dv-detail .dv-dialog-close {
  position: absolute;
  inset-block-start: 16px;
  inset-inline-end: 16px;
}

.dv-detail-wrap {
  width: 100%;
  max-width: 1360px;
  margin: 0 auto;
  padding: clamp(72px, 8vw, 120px) var(--ir-gutter) clamp(64px, 8vw, 120px);
}

.dv-detail-head {
  max-width: 56rem;
  margin-bottom: clamp(36px, 5vw, 72px);
}

.dv-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

.dv-chips li {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid var(--ir-line);
  border-radius: 999px;
  font-size: 0.9rem;
  color: var(--ir-dim);
}

.dv-detail-shots {
  display: grid;
  gap: clamp(36px, 5vw, 80px);
}

.dv-dshot {
  margin: 0;
  min-width: 0;
}

.dv-dshot > img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 0 0 14px 14px;
  background: var(--ir-ink-2);
}

.dv-dshot figcaption,
.dv-dphone figcaption {
  margin-top: 14px;
  font-size: 0.95rem;
  color: var(--ir-faint);
}

.dv-dphone {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: clamp(24px, 5vw, 80px);
  align-items: center;
  margin: 0;
  padding: clamp(24px, 4vw, 56px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 22px;
  background: radial-gradient(70% 90% at 20% 50%, rgba(245, 197, 66, 0.07), transparent 70%), var(--ir-ink-2);
}

.dv-dphone img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: clamp(20px, 2.4vw, 34px);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6), 0 0 0 8px #0c0c18;
}

.dv-dphone figcaption {
  display: grid;
  gap: 10px;
  margin: 0;
  font-size: clamp(1rem, 1.4vw, 1.2rem);
  line-height: 1.8;
  color: var(--ir-dim);
}

.dv-dphone figcaption strong {
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 800;
  color: var(--ir-text);
}

.dv-detail .dv-cards {
  margin-top: 0;
}

.dv-detail .dv-note {
  margin-top: calc(clamp(36px, 5vw, 80px) * -1 + 12px);
}

/* ---- Detail sub-blocks: an ordering flow strip and an admin grid ---- */
.dv-dblock {
  min-width: 0;
}

.dv-dblock-title {
  margin: 0 0 8px;
  font-size: clamp(1.4rem, 2.6vw, 2.2rem);
  font-weight: 800;
  line-height: 1.3;
}

.dv-dblock-lead {
  margin: 0 0 clamp(20px, 3vw, 32px);
  max-width: 44rem;
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ir-dim);
}

.dv-flow {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(180px, 1fr);
  gap: clamp(12px, 1.6vw, 20px);
  margin: 20px 0 0;
  padding: 0 0 12px;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  overscroll-behavior-x: contain;
}

.dv-step {
  display: grid;
  gap: 10px;
  align-content: start;
  scroll-snap-align: start;
  min-width: 0;
}

.dv-step img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 22px;
  background: var(--ir-ink-2);
}

.dv-step-n {
  font-family: var(--dv-mono);
  font-size: 0.8rem;
  color: var(--ir-gold);
}

.dv-step-t {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--ir-text);
}

.dv-dgrid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 3vw, 40px) clamp(16px, 2vw, 28px);
}

@media (max-width: 900px) {
  .dv-dgrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dv-flow {
    grid-auto-columns: 62%;
  }
}

/* ---- Project links (live site, case study) ---- */
.dv-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: clamp(28px, 4vw, 44px);
}

.dv-links .ir-btn {
  min-height: 48px;
}

.dv-links-center {
  justify-content: center;
}

.dv-share-btn {
  gap: 10px;
  cursor: pointer;
  font-family: inherit;
}

.dv-share-btn svg {
  width: 18px;
  height: 18px;
  flex: none;
}

/* ---- Dialogs: full-size screen and story sharing ---- */
.dv-share {
  position: fixed;
  inset: 0;
  margin: auto;
  padding: 0;
  border: 0;
  color: var(--ir-text);
  background: transparent;
  max-width: none;
  max-height: none;
}

.dv-share::backdrop {
  background: rgba(5, 5, 12, 0.86);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.dv-share[open] {
  animation: dvDialogIn 0.5s var(--ir-ease) both;
}

@keyframes dvDialogIn {
  from { opacity: 0; transform: translate3d(0, 16px, 0) scale(0.98); }
  to { opacity: 1; transform: none; }
}

.dv-dialog-close {
  position: fixed;
  inset-block-start: 16px;
  inset-inline-end: 16px;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  background: rgba(8, 8, 17, 0.8);
  color: var(--ir-text);
  cursor: pointer;
}

.dv-dialog-close svg {
  width: 20px;
  height: 20px;
}

.dv-dialog-close:focus-visible {
  outline: 2px solid var(--ir-gold);
  outline-offset: 3px;
}

.dv-share {
  width: min(880px, calc(100vw - 32px));
  height: fit-content;
  max-height: calc(100svh - 32px);
  overflow: auto;
  border: 1px solid var(--ir-line);
  border-radius: 24px;
  background: #0c0c18;
}

.dv-share[open] {
  display: grid;
  grid-template-columns: minmax(0, 380px) minmax(0, 1fr);
  gap: clamp(20px, 3vw, 40px);
  align-items: center;
  padding: clamp(20px, 3vw, 36px);
}

.dv-share .dv-dialog-close {
  position: absolute;
  inset-block-start: 12px;
  inset-inline-end: 12px;
}

.dv-share-frames {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.dv-share-frame {
  display: grid;
  gap: 6px;
  justify-items: center;
  color: var(--ir-faint);
  font-family: var(--dv-mono);
  font-size: 0.74rem;
  text-decoration: none;
}

.dv-share-frame img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--ir-ink-2);
  transition: border-color 0.3s ease;
}

.dv-share-frame:hover img,
.dv-share-frame:focus-visible img {
  border-color: var(--ir-gold);
}

.dv-share-frame:focus-visible {
  outline: none;
}

.dv-share-preview img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: var(--ir-ink-2);
}

.dv-share-title {
  margin: 0;
  font-size: clamp(1.4rem, 2.4vw, 2rem);
  font-weight: 800;
  line-height: 1.3;
}

.dv-share-text {
  margin: 12px 0 0;
  font-size: 0.98rem;
  line-height: 1.8;
  color: var(--ir-dim);
}

.dv-share-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.dv-share-actions .ir-btn {
  min-height: 48px;
  cursor: pointer;
  font-family: inherit;
}

.dv-share-actions [hidden] {
  display: none;
}

.dv-copy-done,
.dv-copied .dv-copy-idle {
  display: none;
}

.dv-copied .dv-copy-done {
  display: inline;
}

.dv-share-link {
  margin: 14px 0 0;
  font-family: var(--dv-mono);
  font-size: 0.78rem;
  color: var(--ir-faint);
  overflow-wrap: anywhere;
}

@media (max-width: 640px) {
  .dv-share[open] {
    grid-template-columns: minmax(0, 1fr);
    padding-top: 72px;
  }

  .dv-share-frames {
    max-width: 320px;
    margin-inline: auto;
  }
}

/* ---- Cards ---- */
.dv-cards {
  display: grid;
  gap: clamp(12px, 1.4vw, 20px);
  margin-top: clamp(28px, 4vw, 56px);
}

.dv-cards-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 0;
}

.dv-cards-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.dv-card {
  position: relative;
  padding: clamp(18px, 1.8vw, 26px);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 16px;
  background: var(--dv-card);
}

.dv-card-tag {
  display: inline-block;
  margin-bottom: 14px;
  font-family: var(--dv-mono);
  font-size: 0.74rem;
  color: var(--ir-gold);
}

.dv-card h3 {
  margin: 0 0 8px;
  font-size: 1.12rem;
  font-weight: 700;
  line-height: 1.4;
  color: var(--ir-text);
}

.dv-card p {
  margin: 0;
  font-size: 0.94rem;
  line-height: 1.75;
  color: var(--ir-dim);
}

html[lang="en"] .dv-card p {
  line-height: 1.55;
}

/* ---- Numbers ---- */
.dv-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--ir-line);
}

.dv-stats li {
  padding: clamp(22px, 2.6vw, 40px) 0;
  padding-inline-end: 20px;
  border-bottom: 1px solid var(--ir-line);
}

.dv-stats strong {
  display: block;
  margin-bottom: 8px;
  font-size: clamp(2.3rem, 5vw, 4.6rem);
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ir-text);
  font-variant-numeric: tabular-nums;
  text-align: start;
}

html[dir="rtl"] .dv-stats strong {
  text-align: right;
}

.dv-stats span {
  font-size: 0.94rem;
  color: var(--ir-dim);
}

/* ---- Terminal ---- */
.dv-terminal {
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 14px;
  overflow: hidden;
  background: #0b0b17;
}

.dv-terminal-body {
  padding: clamp(18px, 2.4vw, 34px);
}

.dv-cmd {
  margin: 0 0 18px;
  font-family: var(--dv-mono);
  font-size: 0.9rem;
  color: var(--ir-dim);
  text-align: left;
}

.dv-build {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 40px);
  margin: 0;
  padding: 0;
  list-style: none;
}

.dv-build li {
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.dv-build-n {
  display: block;
  margin-bottom: 12px;
  font-family: var(--dv-mono);
  font-size: 0.78rem;
  color: var(--ir-gold);
}

html[dir="rtl"] .dv-build-n {
  text-align: right;
}

.dv-build h3 {
  margin: 0 0 8px;
  font-size: clamp(1.25rem, 1.9vw, 1.7rem);
  font-weight: 800;
  line-height: 1.35;
  color: var(--ir-text);
}

.dv-build p {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.75;
  color: var(--ir-dim);
}

html[lang="en"] .dv-build p {
  line-height: 1.55;
}

.dv-soon {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: clamp(24px, 3vw, 40px) 0 0;
  font-size: 0.95rem;
  color: var(--ir-dim);
}

/* ---- Call to action ---- */
.dv-cta {
  margin-top: clamp(56px, 7vw, 112px);
  text-align: center;
}

.dv-cta-title {
  margin: 0;
  font-size: clamp(2.1rem, 5.2vw, 5rem);
  font-weight: 900;
  line-height: 1.24;
  color: var(--ir-text);
}

html[lang="en"] .dv-cta-title {
  line-height: 1.04;
  letter-spacing: -0.03em;
}

.dv-cta .dv-lead {
  margin-inline: auto;
}

.dv-cta .ir-btn {
  margin-top: 28px;
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 1100px) {
  .dv-cards-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 900px) {
  .dv-hero-track {
    height: 190vh;
    height: 190svh;
  }

  /* Phone and tablet: copy on top, the window takes the room that is left */
  .dv-hero-stage {
    display: flex;
    flex-direction: column;
    gap: 18px;
    padding: calc(var(--global-header-height, 62px) + 22px) var(--ir-gutter) 70px;
  }

  .dv-hero-copy {
    position: relative;
    top: auto;
    inset-inline-start: auto;
    width: 100%;
    flex: 0 0 auto;
    transform: translate3d(0, calc(var(--p) * -28px), 0);
  }

  .dv-prompt {
    margin-bottom: 10px;
  }

  .dv-hero-title {
    font-size: clamp(2rem, 9.4vw, 3.4rem);
  }

  .dv-hero-role {
    margin-top: 14px;
  }

  .dv-hero-actions {
    margin-top: 18px;
  }

  .dv-hero-actions .ir-btn {
    flex: 1 1 0;
    justify-content: center;
    text-align: center;
    white-space: nowrap;
    padding-inline: 12px;
    font-size: 0.94rem;
  }

  .dv-window-wrap {
    position: relative;
    top: auto;
    inset-inline-end: auto;
    width: 100%;
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translate3d(0, calc(var(--p) * -9svh), 0) scale(calc(1 + var(--p) * 0.04));
  }

  .dv-window {
    width: 100%;
    max-height: 100%;
    aspect-ratio: 16 / 12.3;
  }

  .dv-window-body {
    flex: 1 1 auto;
    min-height: 0;
    aspect-ratio: auto;
  }

  .dv-scroll-cue {
    bottom: 12px;
  }

  .dv-pgrid {
    grid-template-columns: minmax(0, 1fr);
  }

  .dv-pcard-wide .dv-pcard-media {
    aspect-ratio: 16 / 10;
  }

  .dv-dphone {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .dv-dphone img {
    width: min(260px, 70vw);
  }

  .dv-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dv-cards-3,
  .dv-cards-4,
  .dv-build {
    grid-template-columns: minmax(0, 1fr);
  }

}

@media (max-width: 900px) and (max-height: 720px) {
  .dv-hero-statement,
  .dv-prompt {
    display: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dv-hero-track {
    height: auto;
  }
  .dv-hero-stage {
    position: relative;
    --p: 0 !important;
    min-height: 100svh;
  }
  .dv-pcard,
  .dv-brand::before,
  .dv-brand-glow,
  .dv-brand-logo,
  .dv-brand-logo img,
  .dv-wordmark,
  .dv-detail[open],
  .dv-share[open] {
    transition: none;
    animation: none;
  }
  .dv-hero-title .ir-mask-inner,
  .dv-code .l,
  .dv-window,
  .dv-caret {
    animation: none !important;
  }
  .dv-window {
    transition: none;
    transform: none;
  }
}
