/* رِواق (Drafthouse) — Dark Obsidian Architectural CAD (#0E1012), Blueprint Cyan (#5BC8FF), Signal Orange (#FF6A2B) & Paper Contrast (#F1EFE8) */
:root {
  --bg: #0e1012;
  --fg: #f1efe8;
  --paper: #f1efe8;
  --paper-sheet: #fbfaf6;
  --ink: #0e1012;
  --muted: rgba(241, 239, 232, 0.66);
  --muted-light: rgba(14, 16, 18, 0.62);
  --accent: #5bc8ff;
  --accent-light: #1b78a8;
  --signal: #ff6a2b;
  --signal-svg: #e4561a;
  --hair: rgba(241, 239, 232, 0.14);
  --hair2: rgba(241, 239, 232, 0.28);
  --hair-light: rgba(14, 16, 18, 0.14);
  --hair2-light: rgba(14, 16, 18, 0.30);
  --font-display: 'IBM Plex Sans Arabic', 'Inter Tight', system-ui, sans-serif;
  --font-serif: 'Amiri', 'Newsreader', Georgia, serif;
  --font-mono: 'IBM Plex Mono', 'JetBrains Mono', ui-monospace, monospace;
  --nav-h: 68px;
  --pad: clamp(20px, 2.8vw, 48px);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
  -webkit-font-smoothing: antialiased;
  scroll-padding-top: 76px;
}
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--fg);
  font-size: 16.5px;
  line-height: 1.55;
  overflow-x: clip;
}
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
svg, canvas, img { display: block; max-width: 100%; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1360px; margin-inline: auto; padding-inline: var(--pad); }
.mono { font-family: var(--font-mono); font-size: 11.5px; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---- Fixed 3-Column Architectural Header (68px) ---- */
.dh-nav {
  position: fixed; top: 0; inset-inline: 0; z-index: 60; height: var(--nav-h);
  padding-inline: var(--pad);
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px;
  background: transparent; border-bottom: 1px solid transparent;
  transition: background 0.3s var(--ease), border-color 0.3s, backdrop-filter 0.3s;
}
.dh-nav.is-scrolled {
  background: rgba(14, 16, 18, 0.78);
  -webkit-backdrop-filter: blur(14px) saturate(1.2); backdrop-filter: blur(14px) saturate(1.2);
  border-bottom-color: var(--hair);
}
.dh-brand {
  justify-self: start; display: inline-flex; align-items: center; gap: 11px;
  font-weight: 500; font-size: 14.5px; letter-spacing: 0.16em;
}
.dh-brand svg { width: 26px; height: 26px; flex: none; }
.dh-links { justify-self: center; display: flex; align-items: center; gap: 6px; }
.dh-links a {
  padding: 7px 14px; border-radius: 999px; font-size: 14px; color: var(--muted);
  transition: color 0.2s, background 0.2s;
}
.dh-links a:hover { color: var(--fg); background: rgba(241, 239, 232, 0.07); }
.dh-nav-end { justify-self: end; display: inline-flex; align-items: center; gap: 10px; }
.dh-dir-btn {
  padding: 7px 13px; border-radius: 999px; border: 1px solid var(--hair2);
  font-size: 12px; color: var(--muted); transition: color 0.2s, border-color 0.2s;
}
.dh-dir-btn:hover { color: var(--fg); border-color: var(--accent); }

/* Pill CTAs */
.dh-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: 46px; padding: 0 24px; border-radius: 999px; cursor: pointer;
  font-size: 14px; font-weight: 600; border: 1px solid transparent;
  transition: transform 0.24s var(--ease), background 0.2s, border-color 0.2s, color 0.2s;
}
.dh-pill-sm { min-height: 38px; padding: 0 18px; font-size: 13.5px; }
.dh-pill-signal { background: var(--signal); color: var(--ink); }
.dh-pill-signal:hover { transform: translateY(-1.5px); background: #ff7e47; }
.dh-pill-ghost { background: rgba(14, 16, 18, 0.48); border-color: var(--hair2); color: var(--fg); }
.dh-pill-ghost:hover { transform: translateY(-1.5px); border-color: var(--accent); color: var(--accent); }

@media (max-width: 900px) {
  .dh-nav { grid-template-columns: auto 1fr; }
  .dh-links { display: none; }
}

/* ---- Hero: Single-Viewport CAD Blueprint X-Ray Lens + 7-Column Drawing Title Block ---- */
.dh-hero {
  position: relative; min-height: max(100svh, 720px);
  display: flex; flex-direction: column; justify-content: flex-end;
  overflow: hidden; isolation: isolate; background: var(--bg);
}
.hero-render {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.hero-render img {
  width: 100%; height: 100%; object-fit: cover; object-position: left center;
  transform: scaleX(-1); opacity: 0.92;
}
.hero-render::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(270deg, rgba(14, 16, 18, 0.94) 0%, rgba(14, 16, 18, 0.72) 38%, rgba(14, 16, 18, 0.16) 76%, rgba(14, 16, 18, 0.45) 100%),
    linear-gradient(180deg, rgba(14, 16, 18, 0.76) 0%, transparent 22%, transparent 74%, rgba(14, 16, 18, 0.96) 100%);
}
.hero-ghost-word {
  position: absolute; inset-inline-end: 4%; bottom: 92px; z-index: 1; pointer-events: none;
  font-family: var(--font-display); font-weight: 700; font-size: clamp(110px, 19vw, 320px);
  line-height: 0.85; color: transparent;
  -webkit-text-stroke: 1.2px rgba(91, 200, 255, 0.24); user-select: none;
}
.cad-sheet {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none;
}
#dh-lens-canvas {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none;
}

.hero-body {
  position: relative; z-index: 10; width: 100%; max-width: 1360px; margin-inline: auto;
  padding: calc(var(--nav-h) + 34px) var(--pad) 34px;
}
.hero-copy {
  max-width: 590px; display: flex; flex-direction: column; align-items: flex-start; gap: 20px;
}
.hero-chip {
  display: inline-flex; align-items: center; gap: 10px; padding: 6px 14px; border-radius: 999px;
  border: 1px solid var(--hair2); background: rgba(14, 16, 18, 0.62); color: var(--fg);
}
.signal-sq { width: 7px; height: 7px; background: var(--signal); flex: none; }

.hero-h1 {
  font-weight: 400; font-size: clamp(3rem, 6.2vw, 5.9rem); line-height: 1.02;
  letter-spacing: -0.024em; color: var(--fg);
}
.hero-h1 em {
  display: block; font-family: var(--font-serif); font-style: italic; font-weight: 400;
  color: var(--accent); font-size: 1.08em; line-height: 1.12;
}
.hero-sub { font-size: 16.5px; color: var(--muted); max-width: 44ch; line-height: 1.7; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; }

.hero-proof {
  margin-top: 12px; display: flex; flex-wrap: wrap; gap: 24px;
}
.proof-item {
  padding-inline-start: 14px; border-inline-start: 1px solid var(--hair2);
  display: flex; flex-direction: column; gap: 2px;
}
.proof-item b { font-size: 19px; font-weight: 600; color: var(--fg); }
.proof-item span { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); letter-spacing: 0.06em; }

/* Bottom Full-Width 7-Column CAD Drawing Title Block */
.titleblock {
  position: relative; z-index: 12; width: 100%;
  border-top: 1px solid var(--hair2);
  background: rgba(14, 16, 18, 0.72);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  display: grid; grid-template-columns: 1.45fr 0.75fr 1.4fr 0.75fr 1.1fr 1fr 0.85fr;
}
.tb-cell {
  padding: 11px 16px; border-inline-end: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 3px; min-width: 0;
}
.tb-cell:last-child { border-inline-end: 0; }
.tb-cell small { font-family: var(--font-mono); font-size: 9.5px; letter-spacing: 0.1em; color: var(--muted); text-transform: uppercase; }
.tb-cell b { font-family: var(--font-mono); font-size: 12px; font-weight: 500; color: var(--fg); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-cell.is-cyan b { color: var(--accent); }
@media (max-width: 960px) {
  .titleblock { grid-template-columns: repeat(3, 1fr); }
  .tb-cell:nth-child(n+4) { display: none; }
}

/* ---- Standardized Architectural Section Headers ---- */
.sec {
  padding-block: clamp(72px, 9vw, 128px);
  border-top: 1px solid var(--hair);
}
.sec-head { max-width: 720px; margin-bottom: clamp(36px, 5vw, 60px); }
.eyebrow-rule {
  display: inline-flex; align-items: center; gap: 12px; color: var(--accent); margin-bottom: 14px;
}
.eyebrow-rule::before { content: ""; width: 22px; height: 1px; background: currentColor; }
.sec-head h2 {
  font-weight: 400; font-size: clamp(2.1rem, 4.4vw, 3.8rem); line-height: 1.12; letter-spacing: -0.022em;
}
.sec-head h2 em { font-family: var(--font-serif); font-style: italic; color: var(--accent); font-weight: 400; }
.sec-head p { margin-top: 14px; color: var(--muted); max-width: 52ch; font-size: 16.5px; }

/* ---- Section 1: #workflow — 3-Col Zero-Gap Hairline Grid with CAD SVG Diagrams ---- */
.wf-grid {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hair); border-inline-start: 1px solid var(--hair);
}
@media (max-width: 900px) { .wf-grid { grid-template-columns: 1fr; } }
.wf-card {
  padding: clamp(22px, 2.8vw, 32px);
  border-inline-end: 1px solid var(--hair); border-bottom: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 16px;
}
.wf-diagram {
  width: 100%; aspect-ratio: 320 / 190; border: 1px solid var(--hair);
  background-color: rgba(241, 239, 232, 0.02);
  background-image:
    linear-gradient(rgba(241, 239, 232, 0.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(241, 239, 232, 0.06) 1px, transparent 1px);
  background-size: 20px 20px;
}
.wf-card h3 { font-size: 22px; font-weight: 500; }
.wf-card p { font-size: 14.5px; color: var(--muted); line-height: 1.72; }
.wf-foot {
  margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hair);
  color: var(--muted); display: flex; justify-content: space-between;
}

/* ---- Section 2: #plot — Live Interactive 3D Isometric Massing Workbench ---- */
.plot-bench {
  display: grid; grid-template-columns: minmax(300px, 390px) minmax(0, 1fr);
  border: 1px solid var(--hair2); background: rgba(241, 239, 232, 0.02);
}
@media (max-width: 920px) { .plot-bench { grid-template-columns: 1fr; } }
.plot-controls {
  padding: clamp(22px, 2.8vw, 32px);
  border-inline-end: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 18px;
}
.sl-row { display: flex; flex-direction: column; gap: 8px; }
.sl-top { display: flex; justify-content: space-between; align-items: center; font-size: 13.5px; }
.sl-top b { font-family: var(--font-mono); color: var(--accent); font-weight: 500; }
.dh-range {
  -webkit-appearance: none; appearance: none; width: 100%; height: 2px;
  background: var(--hair2); outline: none; cursor: pointer;
}
.dh-range::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 12px; height: 12px;
  background: var(--accent); border: 2px solid var(--bg); transform: rotate(45deg);
  cursor: pointer; transition: transform 0.15s, background 0.15s;
}
.dh-range::-webkit-slider-thumb:hover { background: var(--signal); transform: rotate(45deg) scale(1.2); }

.style-pills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.style-pill {
  padding: 7px 6px; border: 1px solid var(--hair2); background: transparent; cursor: pointer;
  font-size: 12.5px; color: var(--muted); transition: all 0.18s;
}
.style-pill.is-on { background: var(--accent); border-color: var(--accent); color: var(--ink); font-weight: 600; }

.plot-stats {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--hair); border: 1px solid var(--hair);
}
.p-stat { background: var(--bg); padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.p-stat small { font-family: var(--font-mono); font-size: 10px; color: var(--muted); }
.p-stat b { font-family: var(--font-mono); font-size: 18px; color: var(--fg); font-variant-numeric: tabular-nums; }

.plot-canvas-stage {
  position: relative; min-height: 440px; padding: 24px;
  display: grid; place-items: center;
  background-image:
    linear-gradient(rgba(91, 200, 255, 0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 200, 255, 0.08) 1px, transparent 1px);
  background-size: 28px 28px;
}
.plot-svg { width: 100%; max-width: 680px; height: auto; }

/* ---- Section 3: #modular — Full-Bleed 100svh Architectural Block Tower Band ---- */
.modular-band {
  position: relative; min-height: min(92svh, 820px); overflow: hidden;
  border-top: 1px solid var(--hair); display: flex; align-items: center;
}
.modular-bg {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
}
.modular-bg img { width: 100%; height: 100%; object-fit: cover; object-position: left center; }
.modular-bg::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(270deg, rgba(14, 16, 18, 0.95) 0%, rgba(14, 16, 18, 0.78) 42%, rgba(14, 16, 18, 0.12) 82%),
    linear-gradient(180deg, rgba(14, 16, 18, 0.65) 0%, transparent 20%, transparent 80%, rgba(14, 16, 18, 0.85) 100%);
}
.modular-copy {
  position: relative; z-index: 2; max-width: 540px; padding-block: 72px;
  display: flex; flex-direction: column; gap: 22px;
}
.mod-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--hair); }
.mod-table tr { border-bottom: 1px solid var(--hair); }
.mod-table td { padding: 12px 0; font-size: 14px; }
.mod-table td:first-child { font-family: var(--font-mono); color: var(--accent); width: 92px; }
.mod-table td:last-child { font-family: var(--font-mono); color: var(--muted); text-align: end; }
.mod-nums { display: flex; gap: 42px; margin-top: 6px; }
.mod-nums b { display: block; font-size: clamp(2.4rem, 4vw, 3.6rem); font-weight: 400; line-height: 1; color: var(--fg); }
.mod-nums span { font-family: var(--font-mono); font-size: 11px; color: var(--muted); }

/* ---- Section 4: #deliverables — Contrasting Light Paper Band (#F1EFE8) + Interactive Sticky CAD Sheet ---- */
.sec-paper {
  background: var(--paper); color: var(--ink); border-top: 1px solid var(--hair-light);
}
.sec-paper .eyebrow-rule,
.sec-paper .sec-head h2 em { color: var(--accent-light); }
.sec-paper .sec-head p { color: var(--muted-light); }

.deliv-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: clamp(24px, 4vw, 56px);
  align-items: start;
}
@media (max-width: 920px) { .deliv-grid { grid-template-columns: 1fr; } }
.sheet-rows { border-top: 1px solid var(--hair-light); }
.sheet-row {
  width: 100%; text-align: right; border: 0; border-bottom: 1px solid var(--hair-light);
  background: transparent; color: var(--ink); cursor: pointer;
  padding: 20px 18px; display: grid; grid-template-columns: 76px 1fr auto; align-items: center; gap: 14px;
  transition: background 0.22s var(--ease), color 0.22s;
}
.sheet-row:hover, .sheet-row.is-active { background: var(--ink); color: var(--paper); }
.sheet-row .s-code { font-family: var(--font-mono); font-size: 12.5px; color: var(--accent-light); font-weight: 500; }
.sheet-row:hover .s-code, .sheet-row.is-active .s-code { color: var(--accent); }
.sheet-row b { display: block; font-size: 18px; font-weight: 500; }
.sheet-row small { display: block; font-size: 13.5px; color: var(--muted-light); margin-top: 2px; }
.sheet-row:hover small, .sheet-row.is-active small { color: rgba(241, 239, 232, 0.68); }
.sheet-row .s-fmt { font-family: var(--font-mono); font-size: 11px; opacity: 0.72; }

.sheet-preview-box {
  position: sticky; top: 90px; padding: 22px;
  background: var(--paper-sheet); border: 1px solid var(--hair2-light);
  box-shadow: 0 24px 50px -24px rgba(14, 16, 18, 0.22);
  display: flex; flex-direction: column; gap: 14px;
}
.sheet-preview-head {
  display: flex; justify-content: space-between; align-items: center;
  padding-bottom: 10px; border-bottom: 1px solid var(--hair-light);
  font-family: var(--font-mono); font-size: 11px; color: var(--muted-light);
}
.sheet-preview-svg { width: 100%; aspect-ratio: 4 / 3; border: 1px solid var(--hair-light); background: #fff; }

/* ---- Section 5: #pricing — 3-Col Zero-Gap Grid (Center Inverted Paper Card + Sharp Orange Badge) ---- */
.dh-plans {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--hair2); border-inline-start: 1px solid var(--hair2);
}
@media (max-width: 900px) { .dh-plans { grid-template-columns: 1fr; } }
.dh-plan {
  position: relative; padding: clamp(26px, 3vw, 38px);
  border-inline-end: 1px solid var(--hair2); border-bottom: 1px solid var(--hair2);
  display: flex; flex-direction: column; gap: 18px;
}
.dh-plan.is-paper {
  background: var(--paper); color: var(--ink); border-color: var(--paper);
}
.dh-plan-badge {
  position: absolute; top: 0; inset-inline-end: 0;
  padding: 6px 14px; background: var(--signal); color: var(--ink);
  font-family: var(--font-mono); font-size: 10.5px; font-weight: 700; letter-spacing: 0.08em;
}
.dh-plan-price { display: flex; align-items: baseline; gap: 8px; }
.dh-plan-price b { font-size: 52px; font-weight: 400; line-height: 1; font-variant-numeric: tabular-nums; }
.dh-plan-price span { font-family: var(--font-mono); font-size: 12px; color: var(--muted); }
.dh-plan.is-paper .dh-plan-price span,
.dh-plan.is-paper .dh-plan-desc { color: var(--muted-light); }
.dh-plan-list {
  list-style: none; padding-top: 18px; border-top: 1px solid var(--hair);
  display: flex; flex-direction: column; gap: 10px; font-size: 14px;
}
.dh-plan.is-paper .dh-plan-list { border-top-color: var(--hair-light); }
.dh-plan-list li { display: flex; gap: 10px; }
.dh-plan-list li::before { content: "+"; font-family: var(--font-mono); color: var(--accent); font-weight: 600; }
.dh-plan.is-paper .dh-plan-list li::before { color: var(--accent-light); }

/* ---- Section 6: #start — Radially Masked Cyan Blueprint Grid Closing CTA ---- */
.start-band {
  position: relative; overflow: hidden; padding-block: clamp(80px, 10vw, 136px);
  border-top: 1px solid var(--hair);
}
.start-band::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(91, 200, 255, 0.14) 1px, transparent 1px),
    linear-gradient(90deg, rgba(91, 200, 255, 0.14) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 68% 68% at 50% 50%, #000 18%, transparent 80%);
  mask-image: radial-gradient(ellipse 68% 68% at 50% 50%, #000 18%, transparent 80%);
}
.start-in { position: relative; z-index: 2; max-width: 960px; }
.start-in h2 {
  font-weight: 400; font-size: clamp(2.5rem, 6.2vw, 5.4rem); line-height: 1.04; letter-spacing: -0.025em;
}
.start-in h2 em { font-family: var(--font-serif); font-style: italic; color: var(--accent); }
.start-form {
  margin-top: 34px; display: grid; grid-template-columns: 1fr 1.2fr auto; gap: 18px; align-items: end;
}
@media (max-width: 820px) { .start-form { grid-template-columns: 1fr; } }
.start-field { display: flex; flex-direction: column; gap: 6px; }
.start-field label { font-family: var(--font-mono); font-size: 10.5px; color: var(--muted); }
.start-field input {
  border: 0; border-bottom: 1px solid var(--hair2); background: transparent;
  padding: 12px 4px; font-size: 15px; color: var(--fg); border-radius: 0;
}
.start-field input:focus { outline: none; border-bottom-color: var(--accent); }
.start-status { margin-top: 14px; font-family: var(--font-mono); font-size: 13px; color: var(--accent); min-height: 22px; }

/* ---- Architectural Footer ---- */
.dh-foot { border-top: 1px solid var(--hair); padding: 54px 0 32px; }
.foot-top {
  display: grid; grid-template-columns: 1.4fr 2fr; gap: 36px; padding-bottom: 40px;
}
@media (max-width: 820px) { .foot-top { grid-template-columns: 1fr; } }
.foot-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.foot-col h4 { font-family: var(--font-mono); font-size: 11px; color: var(--accent); letter-spacing: 0.1em; margin-bottom: 14px; }
.foot-col a { display: block; font-size: 14px; color: var(--muted); padding-block: 4px; transition: color 0.2s; }
.foot-col a:hover { color: var(--fg); }
.foot-base {
  padding-top: 20px; border-top: 1px solid var(--hair);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px;
  font-family: var(--font-mono); font-size: 11.5px; color: var(--muted);
}
