/* Qala Aluminium — design system v2 ("architectural minimal").
   Visual language inspired by premium façade brands: black/white + one accent, large photography,
   a diagonal cut under hero images, uppercase section titles, outline buttons, circled line icons.
   Own code. Logical properties throughout so dir="rtl" mirrors the layout for Arabic. */

/* ---------- Fonts (all open licence, self-hosted) ---------- */
@font-face { font-family: "Montserrat"; src: url("/assets/fonts/montserrat-latin-300-normal.woff2") format("woff2"); font-weight: 300; font-display: optional; }
@font-face { font-family: "Montserrat"; src: url("/assets/fonts/montserrat-latin-400-normal.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("/assets/fonts/montserrat-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: optional; }
@font-face { font-family: "Montserrat"; src: url("/assets/fonts/montserrat-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Source Serif"; src: url("/assets/fonts/source-serif-4-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Plex Arabic"; src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2") format("woff2"); font-weight: 300 400; font-display: optional; }
@font-face { font-family: "Plex Arabic"; src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-500-normal.woff2") format("woff2"); font-weight: 500; font-display: optional; }
@font-face { font-family: "Plex Arabic"; src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2") format("woff2"); font-weight: 600; font-display: optional; }
@font-face { font-family: "Plex Arabic"; src: url("/assets/fonts/ibm-plex-sans-arabic-arabic-700-normal.woff2") format("woff2"); font-weight: 700; font-display: swap; }

/* ---------- Tokens ---------- */
:root {
  --ink: #111110;
  --white: #fff;
  --paper: #fff;
  --grey-bg: #f2f1ee;
  --sand: #ece3d3;          /* signature band */
  --line: #e2ded6;
  --text: #111110;
  --text-soft: #5e5a52;     /* 6.6:1 on white */
  --text-on-dark: #f4f1ea;
  --text-on-dark-soft: #bdb6a8;
  --gold: #b48e52;          /* decorative: rules, icons, large text */
  --gold-strong: #7a5a2b;   /* text/links on light: 6.3:1 */
  --gold-on-dark: #d2b47c;  /* text on dark */
  --wa: #157a43;
  --wa-hover: #10633a;

  --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif", Georgia, serif;
  --radius: 0;
  --container: 1240px;
  --column: 930px;
  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(56px, 7vw, 100px);
  --header-h: 80px;
  --cut-l: 3vw;             /* diagonal cut: left edge rise */
  --cut-r: 13.75vw;         /* diagonal cut: right edge rise */
  --cut-x: 13%;             /* point of the cut */
  --ease: cubic-bezier(.25, .6, .3, 1);
  --t-fast: .125s;
  --t: .25s;
}
:lang(ar) { --font: "Plex Arabic", "Montserrat", Arial, sans-serif; --serif: "Plex Arabic", serif; }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { margin: 0; font-family: var(--font); font-size: 17px; font-weight: 400; line-height: 1.65; color: var(--text); background: var(--paper); -webkit-font-smoothing: antialiased; }
@media (min-width: 992px) { body { font-size: 18px; line-height: 1.6; } }
body:lang(ar) { font-size: 18px; line-height: 1.85; }
img { display: block; max-width: 100%; height: auto; }
picture { display: block; }
[hidden] { display: none !important; }
a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--gold-strong); }
button { font: inherit; cursor: pointer; }
ul, ol { margin: 0; padding: 0; list-style: none; }
p { margin-block: 0 1em; }
p:last-child { margin-block-end: 0; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.visually-hidden { position: absolute !important; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; inset-inline-start: 12px; inset-block-start: -60px; z-index: 200; background: var(--white); color: var(--ink); padding: 10px 16px; }
.skip-link:focus { inset-block-start: 12px; }

h1, h2, h3, h4, .h3, .h4 { margin-block: 0 .55em; color: inherit; line-height: 1.15; font-weight: 500; }
h1 { font-size: clamp(2.1rem, 4.6vw, 4rem); font-weight: 300; }
h2 { font-size: clamp(1.5rem, 2.4vw, 2rem); }
h3, .h3 { font-size: 1.3rem; font-weight: 500; }
h4, .h4 { font-size: 1.02rem; font-weight: 600; }
:lang(en) h2, :lang(en) .title { text-transform: uppercase; letter-spacing: .02em; }
:lang(ar) :is(h1, h2, h3, h4, .h3, .h4) { line-height: 1.45; letter-spacing: 0; }
:lang(ar) h1 { font-weight: 500; }
:lang(ar) h2 { font-weight: 600; }

.container { inline-size: 100%; max-inline-size: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.column, .narrow { inline-size: 100%; max-inline-size: calc(var(--column) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.container.narrow { max-inline-size: calc(var(--column) + 2 * var(--gutter)); }
.icon { inline-size: 1.15em; block-size: 1.15em; flex: none; }
[dir="rtl"] .icon-dir { transform: scaleX(-1); }
.muted { color: var(--text-soft); }
.lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); color: var(--text-soft); }
.eyebrow { display: inline-block; font-size: .78rem; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--gold-strong); margin-block-end: 14px; }
:lang(ar) .eyebrow { letter-spacing: 0; font-size: .95rem; }
.eyebrow-light { color: var(--gold-on-dark); }

/* ---------- Buttons: outline-first, square ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-block-size: 50px; padding: .8em 1.6em; border: 1px solid currentColor; border-radius: var(--radius);
  font-size: .9rem; font-weight: 400; letter-spacing: .06em; text-transform: uppercase; line-height: 1.2; text-decoration: none; white-space: nowrap;
  color: var(--ink); background: transparent; transition: background-color var(--t-fast), color var(--t-fast), border-color var(--t-fast);
}
:lang(ar) .btn { text-transform: none; letter-spacing: 0; font-size: 1rem; font-weight: 500; }
.btn:hover { background: var(--ink); color: var(--white); border-color: var(--ink); }
.btn-sm { min-block-size: 40px; padding: .5em 1.1em; font-size: .8rem; }
.btn-lg { min-block-size: 56px; padding: .9em 1.9em; }
.btn-outline { color: var(--ink); }
.btn-ghost, .on-dark .btn:not(.btn-primary):not(.btn-whatsapp) { color: var(--white); border-color: rgb(255 255 255 / .75); }
.btn-ghost:hover, .on-dark .btn:not(.btn-primary):not(.btn-whatsapp):hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn-primary:hover { background: var(--ink); border-color: var(--ink); color: var(--white); }
.on-dark .btn-primary:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-light { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn-light:hover { background: transparent; color: var(--white); border-color: var(--white); }
.btn-whatsapp { background: var(--wa); border-color: var(--wa); color: var(--white); }
.btn-whatsapp:hover { background: var(--wa-hover); border-color: var(--wa-hover); color: var(--white); }
.text-link, .card-link { display: inline-flex; align-items: center; gap: 8px; font-size: .92rem; color: var(--gold-strong); text-decoration: none; }
.text-link:hover .icon, .card-link:hover .icon { transform: translateX(3px); }
[dir="rtl"] .text-link:hover .icon, [dir="rtl"] .card-link:hover .icon { transform: scaleX(-1) translateX(3px); }

/* ---------- Header: black bar, transparent over hero images ---------- */
.site-header { position: fixed; inset-block-start: 0; inset-inline: 0; z-index: 60; block-size: var(--header-h); background: var(--ink); color: var(--white); transition: background-color var(--t), transform var(--t) var(--ease); }
.has-hero .site-header:not(.is-scrolled):not(:hover):not(:focus-within) { background: linear-gradient(180deg, rgb(0 0 0 / .55), rgb(0 0 0 / 0)); }
.site-header.is-hidden { transform: translateY(-100%); }
body:not(.has-hero) main { padding-block-start: var(--header-h); }
.header-inner { display: flex; align-items: center; gap: 28px; block-size: 100%; max-inline-size: 1440px; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: inherit; }
.brand:hover { color: inherit; }
.brand-logo { inline-size: 40px; block-size: 40px; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; font-family: "Montserrat", sans-serif; font-weight: 500; font-size: 1.15rem; line-height: 1; letter-spacing: .22em; text-transform: uppercase; }
.brand-text small { font-weight: 300; font-size: .6rem; letter-spacing: .42em; margin-block-start: 6px; opacity: .8; }
.main-nav { margin-inline-start: auto; display: flex; align-items: center; gap: 28px; }
.main-nav ul { display: flex; gap: 26px; }
.main-nav a { color: var(--white); text-decoration: none; font-size: .8rem; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding-block: 8px; background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1px; transition: background-size var(--t); }
:lang(ar) .main-nav a { font-size: 1rem; letter-spacing: 0; text-transform: none; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--white); background-size: 100% 1px; }
.lang-switch { color: inherit; text-decoration: none; font-size: .85rem; padding: 6px 12px; border: 1px solid rgb(255 255 255 / .35); }
.lang-switch:hover { color: var(--ink) !important; background: var(--white) !important; }
.lang-switch:lang(ar) { font-family: "Plex Arabic", sans-serif; }
.lang-switch:lang(en) { font-family: "Montserrat", sans-serif; }
.header-actions { display: flex; align-items: center; gap: 12px; }
.header-cta { color: var(--white); border-color: rgb(255 255 255 / .75); }
.header-cta:hover { background: var(--white); color: var(--ink); border-color: var(--white); }
.nav-toggle { display: none; background: none; border: 0; color: var(--white); inline-size: 44px; block-size: 44px; align-items: center; justify-content: center; }
.nav-toggle .icon { inline-size: 26px; block-size: 26px; }
@media (max-width: 1100px) {
  .nav-toggle { display: inline-flex; }
  .header-cta { display: none; }
  .main-nav { position: fixed; inset: var(--header-h) 0 0 0; z-index: 55; flex-direction: column; align-items: stretch; gap: 0; background: var(--ink); padding: 24px var(--gutter) 40px; opacity: 0; visibility: hidden; transform: translateY(-8px); }
  .main-nav.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity var(--t) var(--ease), transform var(--t) var(--ease); }
  .main-nav ul { flex-direction: column; gap: 0; }
  .main-nav ul a { display: block; padding-block: 18px; font-size: 1.1rem; border-block-end: 1px solid rgb(255 255 255 / .12); background: none; }
  .main-nav .lang-switch { margin-block-start: 28px; align-self: flex-start; }
  body.nav-open { overflow: hidden; }
  body.nav-open .site-header { background: var(--ink) !important; }
}

/* ---------- Diagonal cut (signature) ---------- */
.cut, .page-head { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-r)), var(--cut-x) 100%, 0 calc(100% - var(--cut-l))); }
[dir="rtl"] .cut, [dir="rtl"] .page-head { clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut-l)), calc(100% - var(--cut-x)) 100%, 0 calc(100% - var(--cut-r))); }
@media (max-width: 760px) { :root { --cut-l: 4vw; --cut-r: 16vw; --cut-x: 18%; } }

/* ---------- Hero ---------- */
.hero { position: relative; isolation: isolate; display: flex; align-items: center; min-block-size: min(100vh, 900px); color: var(--white); overflow: hidden; background: var(--ink); }
.hero-media, .hero-slides { position: absolute; inset: 0; z-index: -2; }
.hero-media picture, .hero-media img, .hero-slide picture, .hero-slide img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.hero-shade { position: absolute; inset: 0; z-index: -1; background: linear-gradient(90deg, rgb(0 0 0 / .68) 0%, rgb(0 0 0 / .38) 50%, rgb(0 0 0 / .08) 100%), linear-gradient(0deg, rgb(0 0 0 / .25), transparent 40%); }
[dir="rtl"] .hero-shade { background: linear-gradient(270deg, rgb(0 0 0 / .68) 0%, rgb(0 0 0 / .38) 50%, rgb(0 0 0 / .08) 100%), linear-gradient(0deg, rgb(0 0 0 / .25), transparent 40%); }
.hero-content { padding-block: calc(var(--header-h) + 40px) calc(var(--cut-r) + 40px); }
.hero-title { font-size: clamp(2.4rem, 5vw, 4.4rem); line-height: .98; font-weight: 300; text-transform: uppercase; margin-block-end: 28px; text-shadow: 0 2px 30px rgb(0 0 0 / .35); }
.hero-title strong { display: block; font-family: var(--serif); font-weight: 600; letter-spacing: -.005em; font-size: 1.08em; }
.hero-title span { display: block; max-inline-size: 18ch; }
:lang(ar) .hero-title { text-transform: none; line-height: 1.35; font-weight: 300; }
:lang(ar) .hero-title strong { font-weight: 700; font-size: 1em; }
.hero-lead { font-size: clamp(1rem, 1.4vw, 1.15rem); max-inline-size: 52ch; color: var(--text-on-dark); margin-block-end: 28px; text-shadow: 0 1px 12px rgb(0 0 0 / .45); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.hero-slide { position: absolute; inset: 0; opacity: 0; animation: heroFade 18s infinite; }
.hero-slide img { animation: heroZoom 18s infinite; }
.hero-slide:nth-child(1) { opacity: 1; animation-name: heroFadeFirst; }
.hero-slide:nth-child(2), .hero-slide:nth-child(2) img { animation-delay: 6s; }
.hero-slide:nth-child(3), .hero-slide:nth-child(3) img { animation-delay: 12s; }
@keyframes heroFade { 0% { opacity: 0; } 4% { opacity: 1; } 33% { opacity: 1; } 38% { opacity: 0; } 100% { opacity: 0; } }
@keyframes heroFadeFirst { 0% { opacity: 1; } 33% { opacity: 1; } 38% { opacity: 0; } 96% { opacity: 0; } 100% { opacity: 1; } }
@keyframes heroZoom { from { transform: scale(1); } to { transform: scale(1.07); } }
.hero-sub { min-block-size: min(72vh, 680px); }

/* ---------- Sections ---------- */
.section { padding-block: var(--section); }
.section-tight { padding-block: clamp(32px, 4vw, 56px) var(--section); }
.section-muted, .band-grey { background: var(--grey-bg); }
.band-sand { background: var(--sand); }
.section-dark { background: var(--ink); color: var(--text-on-dark); }
.section-dark p, .section-dark .muted { color: var(--text-on-dark-soft); }
.section-dark .eyebrow { color: var(--gold-on-dark); }
.section-head { margin-block-end: clamp(28px, 3vw, 44px); }
.section-head p { color: var(--text-soft); }
.section-dark .section-head p { color: var(--text-on-dark-soft); }
.section-head-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.section-head-row > div { max-inline-size: 640px; }
.crumbline { border-block-end: 1px solid var(--line); padding-block: 14px; margin-block-end: clamp(28px, 4vw, 48px); }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: .8rem; color: var(--text-soft); }
.breadcrumb a { text-decoration: none; color: var(--text); }
.breadcrumb a:hover { color: var(--gold-strong); }
.breadcrumb span[aria-hidden] { color: #b9b3a8; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(32px, 6vw, 88px); align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.split-title { font-size: 1.3rem; margin-block-end: 20px; }

/* ---------- Product tiles (label over image) ---------- */
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.tiles-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 1000px) { .tiles, .tiles-3 { grid-template-columns: repeat(2, 1fr); gap: 16px; } }
@media (max-width: 520px) { .tiles, .tiles-3 { grid-template-columns: 1fr; } }
.tile a { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; color: var(--white); text-decoration: none; background: var(--ink); }
.tiles-wide .tile a { aspect-ratio: 4 / 3; }
.tile picture, .tile img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 3s var(--ease); }
.tile a:hover img { transform: scale(1.05); }
.tile a::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(0 0 0 / 0) 50%, rgb(0 0 0 / .72) 100%); }
.tile-label { position: absolute; inset-inline: 0; inset-block-end: 0; z-index: 1; display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 18px 18px 20px; }
.tile-label strong { display: block; font-weight: 500; font-size: 1.05rem; letter-spacing: .04em; text-transform: uppercase; }
:lang(ar) .tile-label strong { text-transform: none; letter-spacing: 0; font-size: 1.15rem; }
.tile-label small { display: block; font-size: .85rem; font-weight: 400; opacity: .9; margin-block-start: 2px; }
.tile-label .icon { flex: none; inline-size: 22px; block-size: 22px; }
.tile a:hover { color: var(--white); }
.tile a:hover .tile-label .icon { color: var(--gold-on-dark); }

.more-list { display: grid; grid-template-columns: repeat(2, 1fr); column-gap: 48px; border-block-start: 1px solid var(--line); margin-block-start: 40px; }
.more-list a { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 16px; border-block-end: 1px solid var(--line); text-decoration: none; }
.more-list span { display: flex; flex-direction: column; }
.more-list strong { font-weight: 500; }
.more-list small { color: var(--text-soft); font-size: .88rem; }
.more-list .icon { color: var(--gold-strong); }
@media (max-width: 760px) { .more-list { grid-template-columns: 1fr; } }

/* ---------- Consultation block ---------- */
.consult { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(24px, 4vw, 48px); align-items: center; }
.consult-media { aspect-ratio: 3 / 2; overflow: hidden; }
.consult-media picture, .consult-media img { inline-size: 100%; block-size: 100%; object-fit: cover; }
.consult h3 { font-size: clamp(1.4rem, 2.2vw, 1.8rem); font-weight: 300; }
.consult .hero-actions { margin-block-start: 24px; }
@media (max-width: 760px) { .consult { grid-template-columns: 1fr; } }

/* ---------- World cards ---------- */
.world { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.world a { display: block; text-decoration: none; }
.world .world-media { aspect-ratio: 1; overflow: hidden; background: var(--ink); }
.world picture, .world img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 3s var(--ease); }
.world a:hover img { transform: scale(1.05); }
.world strong { display: block; margin-block-start: 16px; font-weight: 400; font-size: 1.15rem; text-transform: uppercase; letter-spacing: .04em; }
:lang(ar) .world strong { text-transform: none; letter-spacing: 0; font-weight: 600; }
.world small { color: var(--text-soft); font-size: .9rem; }
@media (max-width: 760px) { .world { grid-template-columns: 1fr; } .world .world-media { aspect-ratio: 16 / 10; } }

/* ---------- Circled icons ---------- */
.circle-row { display: grid; grid-template-columns: repeat(var(--cols, 3), 1fr); gap: 32px; text-align: center; }
.circle-row li { display: flex; flex-direction: column; align-items: center; }
.circle { display: inline-flex; align-items: center; justify-content: center; inline-size: 96px; block-size: 96px; border: 1px solid var(--ink); border-radius: 50%; margin-block-end: 18px; color: var(--ink); transition: background-color var(--t), color var(--t); }
.circle .icon { inline-size: 40px; block-size: 40px; }
a.circle-link { text-decoration: none; display: flex; flex-direction: column; align-items: center; }
a.circle-link:hover .circle { background: var(--ink); color: var(--white); }
.circle-row h3, .circle-row h4 { font-size: 1rem; font-weight: 600; margin-block-end: 4px; text-transform: none; }
.circle-row p { font-size: .92rem; color: var(--text-soft); max-inline-size: 28ch; margin-inline: auto; }
@media (max-width: 760px) { .circle-row { grid-template-columns: repeat(2, 1fr); gap: 28px 16px; } .circle { inline-size: 80px; block-size: 80px; } }

/* ---------- Split block (sand, 65/35) ---------- */
.split-band { display: grid; grid-template-columns: 65fr 35fr; background: var(--sand); min-block-size: 420px; }
.split-band-media { position: relative; overflow: hidden; min-block-size: 280px; }
.split-band-media picture, .split-band-media img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.split-band-body { padding: clamp(32px, 4vw, 56px); display: flex; flex-direction: column; justify-content: center; }
.split-band-body h2 { font-weight: 300; }
@media (max-width: 860px) { .split-band { grid-template-columns: 1fr; } }

/* ---------- Product page ---------- */
.product-intro { padding-block: 0 var(--section); }
.product-intro h1 { font-size: clamp(1.9rem, 3.2vw, 2.4rem); font-weight: 500; text-transform: uppercase; letter-spacing: .02em; }
:lang(ar) .product-intro h1 { text-transform: none; letter-spacing: 0; font-weight: 600; }
.h1-sub { color: var(--gold-strong); font-weight: 300; }
.product-intro .hero-actions { margin-block-start: 28px; }
.spec-chips { display: grid; grid-template-columns: repeat(4, 1fr); border-block: 1px solid var(--line); margin-block: 32px 0; }
.spec-chips div { padding-block: 16px; padding-inline: 0 16px; }
.spec-chips div + div { border-inline-start: 1px solid var(--line); padding-inline-start: 16px; }
.spec-chips dt { font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--text-soft); }
:lang(ar) .spec-chips dt { letter-spacing: 0; font-size: .85rem; }
.spec-chips dd { margin: 4px 0 0; font-size: .95rem; }
@media (max-width: 760px) { .spec-chips { grid-template-columns: 1fr 1fr; } .spec-chips div:nth-child(3) { border-inline-start: 0; padding-inline-start: 0; } }

/* Tabs */
.tabs [role="tablist"] { display: flex; justify-content: space-between; gap: 16px; border-block-end: 1px solid var(--ink); margin-block-end: 40px; overflow-x: auto; }
.tabs [role="tab"] { background: none; border: 0; padding: 0 0 14px; font-size: clamp(1.05rem, 1.8vw, 1.5rem); font-weight: 400; text-transform: uppercase; color: var(--text-soft); position: relative; white-space: nowrap; }
:lang(ar) .tabs [role="tab"] { text-transform: none; font-weight: 500; }
.tabs [role="tab"][aria-selected="true"] { color: var(--ink); font-weight: 500; }
.tabs [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; inset-inline: 0; inset-block-end: -1px; block-size: 4px; background: var(--ink); }
.type-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.type-grid li { padding: 26px; background: var(--white); border-block-start: 3px solid var(--gold); }
.type-grid h3 { font-size: 1.05rem; font-weight: 600; text-transform: none; }
.type-grid p { color: var(--text-soft); font-size: .95rem; }
.check-list { display: grid; gap: 12px; }
.check-list li { display: flex; gap: 12px; align-items: flex-start; }
.check-list .icon { color: var(--gold); margin-block-start: .3em; }
.spec-table { inline-size: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td { text-align: start; padding: 14px 0; border-block-end: 1px solid rgb(0 0 0 / .12); vertical-align: top; }
.spec-table th { inline-size: 35%; font-weight: 500; padding-inline-end: 16px; }

/* Horizontal strip / carousel */
.strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(260px, 31%); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding-block-end: 10px; scrollbar-width: thin; }
.strip li { aspect-ratio: 4 / 3; overflow: hidden; scroll-snap-align: start; background: var(--grey-bg); }
.strip picture, .strip img { inline-size: 100%; block-size: 100%; object-fit: cover; }
@media (max-width: 640px) { .strip { grid-auto-columns: 80%; } }

/* ---------- Page head (inner pages): black band with the cut ---------- */
.page-head { background: var(--ink); color: var(--white); padding-block: calc(var(--header-h) + clamp(40px, 6vw, 80px)) calc(var(--cut-r) + 40px); margin-block-start: calc(-1 * var(--header-h)); }
.page-head h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 300; text-transform: uppercase; }
:lang(ar) .page-head h1 { text-transform: none; font-weight: 500; }
.page-head .lead { color: var(--text-on-dark-soft); max-inline-size: 62ch; }
.page-head .breadcrumb, .page-head .breadcrumb a { color: var(--text-on-dark-soft); }
.page-head .breadcrumb { margin-block-end: 20px; }
.page-head .eyebrow { color: var(--gold-on-dark); }
.page-404 { min-block-size: 70vh; }
.meta { color: var(--text-on-dark-soft); font-size: .9rem; margin: 0; }

/* ---------- Mosaic & gallery ---------- */
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); grid-auto-rows: 260px; gap: 12px; }
.mosaic li { overflow: hidden; background: var(--grey-bg); }
.mosaic li:nth-child(1) { grid-row: span 2; }
.mosaic li:nth-child(4) { grid-column: span 2; }
.mosaic picture, .mosaic img { inline-size: 100%; block-size: 100%; object-fit: cover; }
@media (max-width: 760px) { .mosaic { grid-template-columns: 1fr 1fr; grid-auto-rows: 180px; } .mosaic li:nth-child(4) { grid-column: auto; } }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-block-end: 28px; }
.filter { border: 1px solid var(--line); background: var(--white); padding: 9px 18px; font-size: .85rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text); }
:lang(ar) .filter { text-transform: none; letter-spacing: 0; font-size: .95rem; }
.filter:hover { border-color: var(--ink); }
.filter.is-active { background: var(--ink); color: var(--white); border-color: var(--ink); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.gallery li { position: relative; aspect-ratio: 1; overflow: hidden; background: var(--grey-bg); }
.gallery picture, .gallery img { inline-size: 100%; block-size: 100%; object-fit: cover; transition: transform 3s var(--ease); }
.gallery li:hover img { transform: scale(1.05); }
.gallery-tag { position: absolute; inset-block-end: 10px; inset-inline-start: 10px; background: rgb(0 0 0 / .72); color: var(--white); font-size: .75rem; padding: 4px 10px; text-transform: uppercase; letter-spacing: .06em; }
:lang(ar) .gallery-tag { text-transform: none; letter-spacing: 0; font-size: .85rem; }
@media (max-width: 520px) { .gallery { grid-template-columns: 1fr 1fr; gap: 8px; } }

/* ---------- Process, swatches, lists ---------- */
.process { display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; }
.process li { border-block-start: 1px solid var(--ink); padding-block-start: 20px; }
.process-num { display: block; font-family: var(--serif); font-size: 1.6rem; color: var(--gold-strong); margin-block-end: 10px; }
.process h3 { font-size: 1.05rem; font-weight: 600; text-transform: none; }
.process p { color: var(--text-soft); font-size: .95rem; }
@media (max-width: 860px) { .process { grid-template-columns: 1fr 1fr; } }
@media (max-width: 480px) { .process { grid-template-columns: 1fr; } }
.swatches { display: grid; grid-template-columns: repeat(8, 1fr); gap: 16px; }
.swatches li { display: flex; flex-direction: column; gap: 10px; font-size: .88rem; color: var(--text-soft); }
.swatch { display: block; aspect-ratio: 1; background: var(--swatch); border: 1px solid rgb(0 0 0 / .1); border-radius: 50%; }
@media (max-width: 760px) { .swatches { grid-template-columns: repeat(4, 1fr); } }
.why-list li { display: flex; gap: 20px; padding-block: 20px; border-block-start: 1px solid var(--line); }
.why-list li:last-child { border-block-end: 1px solid var(--line); }
.why-list h4 { margin-block-end: .3em; }
.why-list p { margin: 0; color: var(--text-soft); }
.why-num { font-family: var(--serif); color: var(--gold-strong); font-size: 1.2rem; }

/* ---------- FAQ ---------- */
.faq details { border-block-end: 1px solid var(--line); }
.faq details:first-child { border-block-start: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding-block: 20px; padding-inline-end: 40px; position: relative; font-weight: 500; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; inset-inline-end: 4px; inset-block-start: 50%; transform: translateY(-50%); font-size: 1.6rem; font-weight: 300; color: var(--gold-strong); }
.faq details[open] summary::after { content: "–"; }
.faq-answer { padding-block-end: 20px; color: var(--text-soft); }

/* ---------- Comparison table ---------- */
.table-scroll { overflow-x: auto; background: var(--white); }
.compare { inline-size: 100%; min-inline-size: 640px; border-collapse: collapse; font-size: .95rem; }
.compare th, .compare td { padding: 16px 20px; text-align: start; vertical-align: top; border-block-end: 1px solid var(--line); }
.compare thead th { background: var(--ink); color: var(--white); font-weight: 500; }
.compare thead td { background: var(--ink); }
.compare tbody th { font-weight: 600; background: var(--grey-bg); inline-size: 18%; }
.compare tbody tr:last-child td { font-weight: 600; color: var(--gold-strong); }
.compare-compact { min-inline-size: 520px; }
.compare-compact tbody tr:last-child td { font-weight: 400; color: inherit; }
.table-note { font-size: .85rem; color: var(--text-soft); margin-block-start: 12px; }
[dir="rtl"] .compare td[dir="ltr"], [dir="rtl"] .compare th[dir="ltr"] { text-align: right; }

/* ---------- Price calculator ---------- */
.calc { display: grid; grid-template-columns: 1.3fr 1fr; background: var(--white); color: var(--text); border: 1px solid var(--line); }
.calc-form { padding: clamp(20px, 3.5vw, 40px); }
.calc-group { border: 0; padding: 0; margin: 0 0 22px; min-inline-size: 0; }
.calc-group legend { font-weight: 600; font-size: .9rem; margin-block-end: 10px; padding: 0; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; border: 1px solid var(--ink); }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: flex; align-items: center; justify-content: center; text-align: center; min-block-size: 48px; padding: 8px 12px; font-size: .9rem; }
.seg label + label span { border-inline-start: 1px solid var(--ink); }
.seg input:checked + span { background: var(--ink); color: var(--white); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: -4px; }
.calc-dims { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-block-end: 6px; }
.range-row { display: flex; align-items: center; gap: 12px; }
.range-row input[type="range"] { flex: 1; accent-color: var(--ink); min-block-size: 0; padding: 0; border: 0; background: none; }
.range-row output { min-inline-size: 3ch; font-weight: 600; font-size: 1.1rem; }
.field-inline { flex-direction: row !important; align-items: center; gap: 12px; margin-block: 12px 0 !important; }
.field-inline select { inline-size: auto !important; min-block-size: 40px !important; }
.calc-result { background: var(--ink); color: var(--text-on-dark); padding: clamp(24px, 3.5vw, 40px); display: flex; flex-direction: column; }
.calc-area { color: var(--text-on-dark-soft); font-size: .9rem; }
.calc-area strong { color: var(--white); font-weight: 500; }
.calc-label { margin-block: 18px 4px; font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--gold-on-dark); }
:lang(ar) .calc-label { letter-spacing: 0; font-size: .95rem; }
.calc-price { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 300; color: var(--white); line-height: 1.2; margin-block-end: 8px; direction: ltr; text-align: start; }
[dir="rtl"] .calc-price { text-align: right; }
.calc-cur { font-size: .5em; font-weight: 500; color: var(--gold-on-dark); vertical-align: .55em; }
.calc-dash { color: var(--text-on-dark-soft); }
.calc-min { font-size: .85rem; color: var(--gold-on-dark); }
.calc-note { font-size: .8rem; color: var(--text-on-dark-soft); margin-block: 12px 24px; }
.calc-actions { display: flex; flex-direction: column; gap: 10px; margin-block-start: auto; }
.calc-actions .btn { inline-size: 100%; white-space: normal; text-align: center; }
@media (max-width: 860px) { .calc { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .calc-dims { grid-template-columns: 1fr; } .seg { grid-auto-flow: row; } .seg label + label span { border-inline-start: 0; border-block-start: 1px solid var(--ink); } }

/* ---------- Forms ---------- */
.quote-section { display: grid; grid-template-columns: .8fr 1.2fr; gap: clamp(32px, 6vw, 80px); align-items: start; }
@media (max-width: 900px) { .quote-section { grid-template-columns: 1fr; } }
.quote-intro p { color: var(--text-soft); }
.contact-mini { display: grid; gap: 12px; margin-block-start: 24px; }
.contact-mini li, .contact-cards li { display: flex; gap: 12px; align-items: flex-start; }
.contact-mini .icon { color: var(--gold-strong); margin-block-start: .3em; }
.contact-cards li { padding-block: 20px; border-block-end: 1px solid var(--line); }
.contact-cards li:first-child { padding-block-start: 0; }
.contact-cards .icon { inline-size: 26px; block-size: 26px; color: var(--ink); margin-block-start: 2px; }
.contact-cards h2 { margin-block-end: .2em; color: var(--text-soft); font-weight: 600; font-size: .78rem; letter-spacing: .1em; text-transform: uppercase; }
:lang(ar) .contact-cards h2 { letter-spacing: 0; font-size: .95rem; }
.contact-cards a, .contact-cards p { font-size: 1.05rem; margin: 0; }
.quote-wrap { background: var(--white); border: 1px solid var(--line); padding: clamp(20px, 4vw, 40px); }
.quote-progress { block-size: 2px; background: var(--line); margin-block-end: 16px; }
.quote-progress span { display: block; block-size: 100%; inline-size: 25%; background: var(--ink); transition: inline-size var(--t) var(--ease); }
.quote-stepcount { font-size: .8rem; color: var(--text-soft); margin-block-end: 8px; text-transform: uppercase; letter-spacing: .1em; }
:lang(ar) .quote-stepcount { text-transform: none; letter-spacing: 0; }
.quote-step { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.quote-step legend { font-size: 1.3rem; font-weight: 400; margin-block-end: 16px; padding: 0; }
.hint { font-size: .9rem; color: var(--text-soft); margin-block: -8px 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-block-size: 44px; padding: 8px 16px; border: 1px solid #cdc7bc; font-size: .92rem; transition: border-color var(--t-fast), background-color var(--t-fast); }
.chip input:hover + span { border-color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.chip input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.field { display: flex; flex-direction: column; gap: 6px; margin-block-end: 16px; flex: 1; }
.field > span, .field-label { font-size: .85rem; font-weight: 600; }
.field-label { margin-block: 8px 10px; }
.field-row { display: flex; gap: 16px; }
@media (max-width: 560px) { .field-row { flex-direction: column; gap: 0; } }
.field input, .field select, .field textarea { inline-size: 100%; min-block-size: 48px; padding: 10px 14px; font: inherit; font-size: 1rem; color: var(--text); background: var(--white); border: 1px solid #b9b3a8; border-radius: 0; }
[dir="rtl"] .field input[dir="ltr"] { text-align: right; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgb(180 142 82 / .25); }
.is-invalid { border-color: #b3261e !important; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .85rem; color: var(--text-soft); line-height: 1.5; margin-block-start: 8px; }
.consent input { margin-block-start: 3px; inline-size: 18px; block-size: 18px; accent-color: var(--ink); flex: none; }
.turnstile { margin-block: 8px; }
.form-error { color: #b3261e; font-size: .92rem; margin-block: 12px 0; }
.quote-nav { display: flex; justify-content: space-between; gap: 12px; margin-block-start: 24px; }
.quote-nav [data-next], .quote-nav [data-submit] { margin-inline-start: auto; }
.quote-result { text-align: center; padding-block: 24px; }
.quote-result p { color: var(--text-soft); max-inline-size: 46ch; margin-inline: auto; margin-block-end: 20px; }

/* ---------- Article / prose ---------- */
.prose h2 { font-size: 1.3rem; margin-block-start: 1.8em; }
.prose h3 { font-size: 1.05rem; font-weight: 600; text-transform: none; margin-block: 1.4em .3em; }
.prose p { color: var(--text-soft); }
.answer-box { background: var(--sand); padding: 26px 30px; margin-block-end: 40px; }
.answer-box h2 { margin-block-start: 0 !important; }
.answer-box p { color: var(--text) !important; }
.steps { counter-reset: st; display: grid; gap: 12px; }
.steps li { counter-increment: st; display: flex; gap: 14px; align-items: baseline; color: var(--text-soft); }
.steps li::before { content: counter(st); flex: none; inline-size: 30px; block-size: 30px; border: 1px solid var(--ink); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: .85rem; color: var(--ink); }

/* ---------- CTA band ---------- */
.cta-band { background: var(--ink); color: var(--text-on-dark); padding-block: clamp(48px, 6vw, 80px); }
.cta-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: wrap; }
.cta-band h2 { color: var(--white); margin-block-end: .3em; }
.cta-band p { color: var(--text-on-dark-soft); max-inline-size: 56ch; margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- Footer: quiet and centred ---------- */
.site-footer { border-block-start: 1px solid var(--line); padding-block: 48px 32px; text-align: center; font-size: .85rem; color: var(--text-soft); }
.footer-services { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 22px; margin-block-end: 28px; }
.footer-services a, .footer-links a { text-decoration: none; color: var(--text-soft); }
.footer-services a:hover, .footer-links a:hover { color: var(--ink); }
.social { display: flex; justify-content: center; gap: 18px; margin-block-end: 24px; }
.social a { color: #8d877c; }
.social a:hover { color: var(--ink); }
.social .icon { inline-size: 20px; block-size: 20px; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; padding-block: 20px; border-block: 1px solid var(--line); text-transform: uppercase; letter-spacing: .06em; font-size: .78rem; }
:lang(ar) .footer-links { text-transform: none; letter-spacing: 0; font-size: .9rem; }
.footer-bottom { display: flex; justify-content: center; align-items: center; gap: 20px; flex-wrap: wrap; margin-block-start: 20px; font-size: .8rem; }
.footer-bottom p { margin: 0; }
.footer-bottom .lang-switch { border-color: var(--line); color: var(--text); }
.footer-nap { margin-block-end: 20px; font-size: .85rem; }
.footer-nap a { color: var(--text); }

/* ---------- Floating WhatsApp & cookie bar ---------- */
.wa-float { position: fixed; inset-block-end: 20px; inset-inline-end: 20px; z-index: 45; inline-size: 56px; block-size: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: var(--wa); color: var(--white); box-shadow: 0 6px 20px rgb(0 0 0 / .25); transition: transform var(--t) var(--ease); }
.wa-float:hover { background: var(--wa-hover); color: var(--white); transform: scale(1.06); }
.wa-float .icon { inline-size: 28px; block-size: 28px; }
.cookie { position: fixed; inset-block-end: 16px; inset-inline-start: 16px; z-index: 70; max-inline-size: 440px; background: var(--white); color: var(--text); padding: 20px 22px; box-shadow: 0 10px 40px rgb(0 0 0 / .18); border-block-start: 3px solid var(--gold); font-size: .88rem; }
.cookie p { margin-block-end: 14px; }
.cookie-actions { display: flex; gap: 8px; justify-content: flex-end; }
@media (max-width: 560px) { .cookie { inset-inline: 12px; inset-block-end: 86px; max-inline-size: none; } }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .hero-slide { opacity: 0; } .hero-slide:nth-child(1) { opacity: 1; }
}

/* About page media pair */
.split-media .stack-media { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stack-media img { aspect-ratio: 3 / 4; object-fit: cover; inline-size: 100%; }
.stack-media picture:nth-child(2) { margin-block-start: 48px; }
.type-grid-3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.band-grey .type-grid li { background: var(--white); }

/* =========================================================
   Qala Visualizer (3D pergola designer)
   ========================================================= */
.viz { display: grid; grid-template-columns: minmax(0, 1fr) 440px; min-block-size: calc(100vh - var(--header-h)); background: var(--grey-bg); }
.viz-stage { position: sticky; inset-block-start: var(--header-h); block-size: calc(100vh - var(--header-h)); overflow: hidden; background: #d9e7f2; }
.viz-stage canvas { display: block; inline-size: 100%; block-size: 100%; touch-action: none; cursor: grab; }
.viz-stage canvas:active { cursor: grabbing; }
.viz-poster { position: absolute; inset: 0; display: grid; place-items: center; }
.viz-poster picture, .viz-poster img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.viz-poster::after { content: ""; position: absolute; inset: 0; background: rgb(0 0 0 / .35); }
.viz-poster-body { position: relative; z-index: 1; text-align: center; padding: 24px; }
.viz-status { color: var(--white); margin-block-start: 16px; max-inline-size: 40ch; }
.viz-hint { position: absolute; inset-block-end: 16px; inset-inline-start: 50%; transform: translateX(-50%); margin: 0; background: rgb(0 0 0 / .55); color: var(--white); font-size: .8rem; padding: 6px 14px; border-radius: 999px; pointer-events: none; }
[dir="rtl"] .viz-hint { transform: translateX(50%); }
.viz-panel { display: flex; flex-direction: column; background: var(--white); border-inline-start: 1px solid var(--line); min-block-size: calc(100vh - var(--header-h)); }
.viz-head { padding: 22px 28px 6px; }
.viz-head .eyebrow { margin-block-end: 6px; }
.viz-head h1 { font-size: 1.3rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; margin-block-end: 2px; }
:lang(ar) .viz-head h1 { text-transform: none; letter-spacing: 0; }
.viz-head p { color: var(--text-soft); font-size: .92rem; margin: 0; }
.viz-steps { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 2px; padding: 14px 20px; position: relative; border-block-end: 1px solid var(--line); }
.viz-steps button { display: flex; flex-direction: column; align-items: center; gap: 4px; inline-size: 100%; background: none; border: 0; padding: 4px 0; font-size: .68rem; color: var(--text-soft); line-height: 1.2; text-align: center; }
:lang(ar) .viz-steps button { font-size: .78rem; }
.viz-steps button span { display: inline-flex; align-items: center; justify-content: center; inline-size: 28px; block-size: 28px; border: 1px solid #b9b3a8; border-radius: 50%; font-size: .8rem; color: var(--text); }
.viz-steps button[aria-current] { color: var(--ink); font-weight: 600; }
.viz-steps button[aria-current] span { background: var(--ink); border-color: var(--ink); color: var(--white); }
.viz-steps button.is-done span { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.viz-form { flex: 1; padding: 20px 28px; overflow-y: auto; }
.viz-step { border: 0; padding: 0; margin: 0; min-inline-size: 0; }
.viz-step legend { font-size: 1.15rem; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; margin-block-end: 12px; padding: 0; }
:lang(ar) .viz-step legend { text-transform: none; letter-spacing: 0; font-weight: 600; }
.viz-label { font-size: .8rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--text-soft); margin-block: 18px 10px; }
:lang(ar) .viz-label { letter-spacing: 0; text-transform: none; font-size: .9rem; }
.viz-label strong { color: var(--ink); text-transform: none; letter-spacing: 0; font-weight: 500; }
.viz-range { display: grid; grid-template-columns: 80px 1fr 64px; align-items: center; gap: 12px; margin-block: 10px; font-size: .9rem; }
.viz-range input[type="range"] { inline-size: 100%; accent-color: var(--ink); }
.viz-range output { font-weight: 600; text-align: end; }
.viz-range select { padding: 8px; border: 1px solid #b9b3a8; font: inherit; background: var(--white); grid-column: 2 / 4; }
.viz-range-wide { grid-template-columns: auto 1fr auto 52px; }
.viz-range-wide small { color: var(--text-soft); font-size: .78rem; }
.viz-note { font-size: .85rem; color: var(--text-soft); margin-block-start: 10px; }
.viz-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.viz-swatches label { position: relative; cursor: pointer; }
.viz-swatches input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.viz-swatches span { display: block; inline-size: 40px; block-size: 40px; border-radius: 50%; background: var(--swatch); border: 1px solid rgb(0 0 0 / .15); box-shadow: inset 0 0 0 3px var(--white); }
.viz-swatches span.is-wood { background: repeating-linear-gradient(100deg, #8b5a35 0 4px, #774a2a 4px 6px, #9a6942 6px 10px); }
.viz-swatches input:checked + span { outline: 2px solid var(--ink); outline-offset: 2px; }
.viz-swatches input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 2px; }
.viz-steps li[hidden] { display: none; }
.viz-steps button span { transition: background var(--t), border-color var(--t); }
.viz-lead { font-size: .9rem; color: var(--text-soft); margin-block: 0 14px; }
.viz-ico { inline-size: 28px; block-size: 28px; flex: none; }
.viz-price-tag { font-size: .78rem; font-weight: 600; color: var(--gold-strong); white-space: nowrap; }
.viz-price-tag em { font-style: normal; font-weight: 400; color: var(--text-soft); }

/* size presets */
.viz-presets { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.viz-preset { position: relative; display: grid; text-align: center; border: 1px solid var(--line); padding: 10px 4px; cursor: pointer; transition: border-color var(--t-fast); }
.viz-preset input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.viz-preset span { font-weight: 600; font-size: .95rem; }
.viz-preset small { color: var(--text-soft); font-size: .72rem; }
.viz-preset:hover { border-color: var(--ink); }
.viz-preset:has(input:checked) { border-color: var(--ink); background: var(--ink); color: var(--white); }
.viz-preset:has(input:checked) small { color: var(--text-on-dark-soft); }
.viz-preset:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }

/* roof type cards */
.viz-cards { display: grid; gap: 10px; }
.viz-card { position: relative; display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); cursor: pointer; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.viz-card input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.viz-card-ico { display: grid; place-items: center; inline-size: 48px; block-size: 48px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-strong); flex: none; }
.viz-card-text { display: grid; gap: 2px; }
.viz-card-text b { font-weight: 600; }
.viz-card:hover { border-color: var(--ink); }
.viz-card:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.viz-card:has(input:checked) .viz-card-ico { background: var(--ink); border-color: var(--ink); color: var(--white); }
.viz-card:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.seg span .viz-ico { inline-size: 22px; block-size: 22px; margin-inline-end: 8px; }

/* sides */
.viz-sides { display: grid; gap: 14px; }
.viz-side { border: 1px solid var(--line); padding: 12px 14px 14px; transition: border-color var(--t); }
.viz-side.is-closed { border-color: var(--gold); }
.viz-side-name { display: flex; justify-content: space-between; align-items: baseline; margin: 0 0 10px; }
.viz-side-name b { font-weight: 600; text-transform: uppercase; letter-spacing: .06em; font-size: .82rem; }
:lang(ar) .viz-side-name b { text-transform: none; letter-spacing: 0; font-size: .92rem; }
.viz-side-name small { color: var(--text-soft); font-size: .75rem; }
.viz-models { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.viz-models label { position: relative; display: grid; justify-items: center; align-content: start; gap: 4px; padding: 8px 4px; border: 1px solid var(--line); text-align: center; cursor: pointer; font-size: .72rem; line-height: 1.25; transition: border-color var(--t-fast); }
.viz-models input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.viz-models b { font-weight: 500; }
.viz-models small { color: var(--text-soft); font-size: .65rem; }
.viz-models .viz-ico { inline-size: 26px; block-size: 26px; color: var(--gold-strong); }
.viz-models label:hover { border-color: var(--ink); }
.viz-models label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--white); }
.viz-models label:has(input:checked) .viz-ico, .viz-models label:has(input:checked) small { color: var(--gold-on-dark); }
.viz-models label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.viz-fabric .viz-label { margin-block: 12px 8px; }
.viz-model-desc { font-size: .8rem; color: var(--text-soft); margin: 8px 0 0; }
.viz-model-desc:empty { display: none; }
.viz-swatches-sm { gap: 8px; }
.viz-swatches-sm span { inline-size: 30px; block-size: 30px; }

/* lighting & comfort items */
.viz-items { display: grid; gap: 10px; }
.viz-item { border: 1px solid var(--line); transition: border-color var(--t), background var(--t); }
.viz-item.is-on { border-color: var(--ink); }
.viz-item.is-off { opacity: .55; }
.viz-item-head { position: relative; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 4px 12px; padding: 12px 14px; cursor: pointer; }
.viz-item-head input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.viz-item-head input:disabled { cursor: not-allowed; }
.viz-item-ico { grid-row: span 2; display: grid; place-items: center; inline-size: 44px; block-size: 44px; border: 1px solid var(--gold); border-radius: 50%; color: var(--gold-strong); transition: background var(--t), color var(--t); }
.viz-item.is-on .viz-item-ico { background: var(--ink); border-color: var(--ink); color: var(--white); }
.viz-item-text { display: grid; gap: 2px; min-inline-size: 0; }
.viz-item-text b { font-weight: 600; font-size: .92rem; }
.viz-item-text small { color: var(--text-soft); font-size: .78rem; line-height: 1.4; }
.viz-item-head .viz-price-tag { grid-column: 2; }
.viz-item-tick { grid-column: 3; grid-row: 1 / span 2; inline-size: 22px; block-size: 22px; border: 1px solid #b9b3a8; position: relative; }
.viz-item.is-on .viz-item-tick { background: var(--ink); border-color: var(--ink); }
.viz-item.is-on .viz-item-tick::after { content: ""; position: absolute; inset: 4px 7px 7px; border: solid var(--white); border-width: 0 2px 2px 0; transform: rotate(45deg); }
.viz-item-head:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: -2px; }
.viz-item-body { padding: 0 14px 14px 70px; display: grid; gap: 4px; }
[dir="rtl"] .viz-item-body { padding: 0 70px 14px 14px; }
.viz-item-body .viz-label { margin-block: 8px 8px; }
.viz-item-note { margin: 0; padding: 0 14px 12px 70px; font-size: .78rem; color: var(--gold-strong); }
[dir="rtl"] .viz-item-note { padding: 0 70px 12px 14px; }
.viz-qty { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: .85rem; }
.viz-qty > span { margin-inline-end: 6px; color: var(--text-soft); }
.viz-qty button { inline-size: 34px; block-size: 34px; border: 1px solid var(--ink); background: var(--white); font-size: 1.1rem; line-height: 1; }
.viz-qty button:hover { background: var(--ink); color: var(--white); }
.viz-qty input { inline-size: 46px; block-size: 34px; text-align: center; border: 1px solid var(--line); font: inherit; font-weight: 600; -moz-appearance: textfield; }
.viz-qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.viz-qty small { color: var(--text-soft); font-size: .75rem; margin-inline-start: 6px; }

/* price breakdown */
.viz-breakdown { inline-size: 100%; border-collapse: collapse; font-size: .82rem; margin-block-end: 20px; }
.viz-breakdown th, .viz-breakdown td { padding: 7px 0; border-block-end: 1px solid var(--line); text-align: start; font-weight: 400; vertical-align: top; }
.viz-breakdown td { text-align: end; white-space: nowrap; padding-inline-start: 12px; }
[dir="rtl"] .viz-breakdown td { text-align: left; }
.viz-breakdown tfoot th, .viz-breakdown tfoot td { font-weight: 700; border-block-end: 0; border-block-start: 2px solid var(--ink); padding-block-start: 10px; }

/* stage tools (day / night) */
.viz-stage-tools { position: absolute; inset-block-start: 16px; inset-inline-end: 16px; display: flex; border: 1px solid rgb(255 255 255 / .6); background: rgb(17 17 16 / .55); }
.viz-stage-tools button { background: none; border: 0; color: var(--white); font: inherit; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; padding: 8px 14px; cursor: pointer; }
:lang(ar) .viz-stage-tools button { letter-spacing: 0; text-transform: none; font-size: .85rem; }
.viz-stage-tools button + button { border-inline-start: 1px solid rgb(255 255 255 / .35); }
.viz-stage-tools button:hover { background: rgb(180 142 82 / .6); }

.viz-checks { display: grid; gap: 12px; }
.viz-checks label { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--line); cursor: pointer; }
.viz-checks input { inline-size: 18px; block-size: 18px; accent-color: var(--ink); }
.viz-summary { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: .88rem; margin: 0 0 18px; }
.viz-summary dt { color: var(--text-soft); }
.viz-summary dd { margin: 0; }
.viz-actions { display: grid; gap: 10px; }
.viz-actions .btn { inline-size: 100%; }
.viz-actions-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.viz-actions-row .btn { white-space: normal; }
.viz-foot { position: sticky; inset-block-end: 0; padding: 16px 28px 18px; background: var(--white); border-block-start: 1px solid var(--line); }
.viz-price { display: flex; flex-direction: column; }
.viz-price .viz-label { margin: 0; }
.viz-price strong { font-size: 1.6rem; font-weight: 300; direction: ltr; text-align: start; }
[dir="rtl"] .viz-price strong { text-align: right; }
.viz-price small { font-size: .55em; font-weight: 500; color: var(--gold-strong); vertical-align: .5em; }
.viz-nav { display: flex; justify-content: space-between; gap: 10px; margin-block-start: 10px; }
.viz-nav [data-viz-next] { margin-inline-start: auto; }
.viz-fine { font-size: .72rem; color: var(--text-soft); margin: 10px 0 0; line-height: 1.4; }
@media (max-width: 1000px) {
  .viz { grid-template-columns: 1fr; }
  .viz-stage { position: relative; inset-block-start: 0; block-size: 58vh; min-block-size: 340px; }
  .viz-panel { min-block-size: 0; border-inline-start: 0; }
  .viz-form { overflow: visible; }
}
@media (max-width: 480px) { .viz-head, .viz-steps, .viz-form, .viz-foot { padding-inline: 16px; } .viz-steps button { font-size: 0; gap: 0; } .viz-item-body, [dir="rtl"] .viz-item-body { padding-inline: 14px; } .viz-range { grid-template-columns: 64px 1fr 56px; } }
.page-viz .wa-float { inset-block-end: 150px; }
@media (min-width: 1001px) { .page-viz .wa-float { inset-inline-end: 460px; inset-block-end: 20px; } }

/* Customer photos (quote form) */
.photo-field { margin-block: 18px; }
.photo-list { display: flex; flex-wrap: wrap; gap: 10px; }
.photo-add { display: grid; place-items: center; align-content: center; gap: 2px; inline-size: 96px; block-size: 96px; border: 1px dashed var(--ink); cursor: pointer; text-align: center; font-size: .72rem; position: relative; order: 99; }
.photo-add span { font-size: 1.8rem; font-weight: 200; line-height: 1; }
.photo-add b { font-weight: 500; }
.photo-add input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.photo-add:hover { background: var(--sand); }
.photo-field.is-full .photo-add { display: none; }
.photo-thumb { position: relative; margin: 0; inline-size: 96px; block-size: 96px; }
.photo-thumb img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.photo-thumb.is-pending img { opacity: .45; }
.photo-thumb.is-pending::after { content: ""; position: absolute; inset: 36px; border: 2px solid var(--gold); border-block-start-color: transparent; border-radius: 50%; animation: spin 1s linear infinite; }
.photo-thumb.is-failed { outline: 2px solid #b3261e; }
.photo-rm { position: absolute; inset-block-start: 4px; inset-inline-end: 4px; inline-size: 24px; block-size: 24px; border: 0; border-radius: 50%; background: rgb(0 0 0 / .65); color: #fff; line-height: 1; cursor: pointer; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Visualizer v3: pictures, tiles, photo mode ---------- */
.viz-card { padding: 0; align-items: stretch; overflow: hidden; }
.viz-card-pic { flex: none; inline-size: 132px; aspect-ratio: 4 / 3; background: var(--sand); display: grid; place-items: center; overflow: hidden; }
.viz-card-text { padding: 12px 14px; align-content: center; }
.viz-card-pic img, .viz-tile-pic img, .viz-model-pic img, .viz-item-pic img { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.viz-card:hover img, .viz-tile:hover img, .viz-item:hover img, .viz-models label:hover img { transform: scale(1.06); }
.viz-pic-icon { color: var(--gold-strong); display: grid; place-items: center; }
.viz-pic-icon .viz-ico { inline-size: 34px; block-size: 34px; }
.viz-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 8px; }
.viz-tile { position: relative; display: grid; gap: 2px; border: 1px solid var(--line); cursor: pointer; text-align: center; padding-block-end: 10px; transition: border-color var(--t-fast), box-shadow var(--t-fast); overflow: hidden; }
.viz-tile input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.viz-tile-pic { aspect-ratio: 4 / 3; background: var(--sand); display: grid; place-items: center; overflow: hidden; margin-block-end: 6px; }
.viz-tile b { font-size: .8rem; font-weight: 600; padding-inline: 6px; }
.viz-tile small { font-size: .7rem; color: var(--gold-strong); }
.viz-tile:hover { border-color: var(--ink); }
.viz-tile:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.viz-tile:has(input:checked) b::before { content: "✓ "; color: var(--gold-strong); }
.viz-tile:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.viz-models label { padding: 0 0 8px; overflow: hidden; }
/* Product choice (step 1) */
.viz-products { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.viz-product { position: relative; display: grid; border: 1px solid var(--line); cursor: pointer; overflow: hidden; transition: border-color var(--t-fast), box-shadow var(--t-fast); }
.viz-product input { position: absolute; opacity: 0; inset: 0; cursor: pointer; z-index: 1; }
.viz-product-pic { aspect-ratio: 4 / 3; background: var(--sand); overflow: hidden; display: block; }
.viz-product-pic img, .viz-product-pic picture { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; transition: transform .6s var(--ease); }
.viz-product:hover img { transform: scale(1.05); }
.viz-product-text { display: grid; gap: 4px; padding: 12px 14px 14px; }
.viz-product-text b { font-weight: 600; font-size: 1rem; }
.viz-product-text small { color: var(--text-soft); font-size: .8rem; line-height: 1.45; }
.viz-product:hover { border-color: var(--ink); }
.viz-product:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); }
.viz-product:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.viz-product[hidden] { display: none; }
.viz-foot[hidden] { display: none; }
.viz-steps button:disabled { opacity: .45; cursor: not-allowed; }
.viz-tile-desc { display: block; font-size: .68rem; color: var(--text-soft); padding-inline: 8px; line-height: 1.35; }
.viz-cards-text .viz-card { padding: 12px 14px; }
.viz-card-text small { color: var(--text-soft); font-size: .78rem; line-height: 1.4; }
.viz-card[hidden], .viz-item[hidden] { display: none; }
.viz-modtabs { margin-block-end: 14px; padding: 8px 10px; background: var(--sand); }
.viz-modtabs button { border: 1px solid var(--line); background: var(--white); padding: 6px 14px; font: inherit; font-size: .82rem; cursor: pointer; }
.viz-modtabs button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--white); }
.viz-rest { margin-block-start: 12px; padding-block-start: 10px; border-block-start: 1px dashed var(--line); }
@media (max-width: 480px) { .viz-products { grid-template-columns: 1fr; } .viz-product { grid-template-columns: 120px 1fr; } .viz-product-pic { aspect-ratio: auto; } }
/* Structure / roof zones / style groups / side coverage */
.viz-tiles-3 { grid-template-columns: repeat(3, 1fr); }
.viz-tiles-3 .viz-tile-pic { aspect-ratio: 5 / 3; }
.viz-wing { display: grid; gap: 4px; margin-block-start: 12px; padding: 12px 14px; border: 1px solid var(--line); }
.viz-seg { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .82rem; }
.viz-seg > span { color: var(--text-soft); margin-inline-end: 4px; }
.viz-seg label { position: relative; border: 1px solid var(--line); padding: 5px 12px; cursor: pointer; transition: border-color var(--t-fast), background var(--t-fast); }
.viz-seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.viz-seg b { font-weight: 500; }
.viz-seg label:hover { border-color: var(--ink); }
.viz-seg label:has(input:checked) { background: var(--ink); border-color: var(--ink); color: var(--white); }
.viz-seg label:has(input:focus-visible) { outline: 2px solid var(--gold); outline-offset: 2px; }
.viz-cover { margin-block-start: 10px; }
.viz-zones { margin-block-start: 6px; }
.viz-zone-count { margin-block-end: 10px; }
.viz-zone-rows { display: grid; gap: 10px; }
.viz-zone { border: 1px solid var(--line); padding: 10px 12px 12px; }
.viz-zone-name { display: block; font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; margin-block-end: 8px; }
:lang(ar) .viz-zone-name { text-transform: none; letter-spacing: 0; font-size: .88rem; }
.viz-models-sm { grid-template-columns: repeat(auto-fill, minmax(70px, 1fr)); }
.viz-models-sm label { font-size: .66rem; padding: 6px 3px; }
.viz-models-sm .viz-ico { inline-size: 22px; block-size: 22px; }
.viz-style + .viz-style { margin-block-start: 4px; }
.viz-models-style { grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); }
.viz-models-style .viz-pic-icon .viz-ico { inline-size: 30px; block-size: 30px; }
.viz-model-pic { inline-size: 100%; aspect-ratio: 4 / 3; background: var(--sand); display: grid; place-items: center; overflow: hidden; margin-block-end: 4px; }
.viz-models label:has(input:checked) .viz-model-pic { outline: 2px solid var(--gold); outline-offset: -2px; }
.viz-item-head { grid-template-columns: 96px 1fr auto; padding: 0; gap: 4px 14px; overflow: hidden; }
.viz-item-pic { grid-row: span 2; inline-size: 96px; block-size: 100%; min-block-size: 84px; background: var(--sand); display: grid; place-items: center; overflow: hidden; }
.viz-item-text { padding-block-start: 12px; }
.viz-item-head .viz-price-tag { padding-block-end: 12px; }
.viz-item-tick { margin-inline-end: 14px; }
.viz-item.is-on .viz-item-pic { box-shadow: inset 0 0 0 3px var(--gold); }
.viz-item-body { padding: 4px 14px 14px 124px; }
[dir="rtl"] .viz-item-body { padding: 4px 124px 14px 14px; }
.viz-item-note { padding-inline-start: 124px; }
[dir="rtl"] .viz-item-note { padding: 0 124px 12px 14px; }
.viz-swatches span { background: radial-gradient(circle at 32% 28%, rgb(255 255 255 / .55), transparent 42%), radial-gradient(circle at 70% 80%, rgb(0 0 0 / .25), transparent 55%), var(--swatch); box-shadow: inset 0 0 0 3px var(--white), 0 2px 6px rgb(0 0 0 / .18); }
.viz-stage-tools button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.viz-photo-btn { position: relative; color: var(--white); font-size: .78rem; letter-spacing: .06em; text-transform: uppercase; padding: 8px 14px; cursor: pointer; border-inline-start: 1px solid rgb(255 255 255 / .35); }
:lang(ar) .viz-photo-btn { letter-spacing: 0; text-transform: none; font-size: .85rem; }
.viz-photo-btn::before { content: "📷 "; }
.viz-photo-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.viz-photo-btn:hover { background: rgb(180 142 82 / .6); }
.viz-photo { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; }
.viz-stage canvas { position: relative; z-index: 1; }
.viz-stage-tools, .viz-hint, .viz-photo-bar { z-index: 2; }
.viz-photo-bar { position: absolute; inset-inline: 16px; inset-block-end: 16px; background: rgb(17 17 16 / .82); color: var(--white); padding: 14px 16px; display: grid; gap: 10px; max-inline-size: 560px; }
.viz-photo-bar p { margin: 0; font-size: .82rem; }
.viz-photo-bar div { display: flex; gap: 8px; flex-wrap: wrap; }
.viz-photo-status { color: var(--gold-on-dark); }
.viz-photo-status:empty { display: none; }
@media (max-width: 480px) { .viz-item-body, [dir="rtl"] .viz-item-body, .viz-item-note, [dir="rtl"] .viz-item-note { padding-inline: 14px; } .viz-card-pic { inline-size: 104px; } }

/* Visualizer AR */
.viz-ar-btn { border-inline-start: 1px solid rgb(255 255 255 / .35) !important; }
.viz-ar { inline-size: min(980px, 96vw); block-size: min(760px, 92vh); padding: 0; border: 0; background: var(--ink); color: var(--white); display: none; }
.viz-ar[open] { display: flex; flex-direction: column; }
.viz-ar::backdrop { background: rgb(0 0 0 / .7); }
.viz-ar-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 16px; border-block-end: 1px solid rgb(255 255 255 / .15); }
.viz-ar-head b { font-weight: 500; letter-spacing: .06em; text-transform: uppercase; }
:lang(ar) .viz-ar-head b { letter-spacing: 0; text-transform: none; }
.viz-ar-body { position: relative; flex: 1; display: grid; place-items: center; background: radial-gradient(circle at 50% 40%, #3a3a38, #111110); }
.viz-ar-body model-viewer { inline-size: 100%; block-size: 100%; --poster-color: transparent; }
.viz-ar-body [slot="ar-button"] { position: absolute; inset-block-end: 20px; inset-inline-start: 50%; transform: translateX(-50%); }
[dir="rtl"] .viz-ar-body [slot="ar-button"] { transform: translateX(50%); }
.viz-ar-msg { margin: 0; padding: 20px; text-align: center; color: var(--text-on-dark); max-inline-size: 52ch; }
.viz-ar-desktop { position: absolute; inset-block-end: 16px; inset-inline: 16px; margin-inline: auto; background: rgb(17 17 16 / .8); border: 1px solid rgb(255 255 255 / .2); }
.viz-ar-hint { margin: 0; padding: 10px 16px; font-size: .8rem; color: var(--text-on-dark-soft); border-block-start: 1px solid rgb(255 255 255 / .15); }
.footer-legal { font-size: .74rem; color: var(--text-soft); margin-block-start: 4px; }

/* Home hero: brand emblem (flat SVG, 3D gold on desktop) */
.hero-emblem { position: absolute; z-index: 0; inset-inline-end: max(4vw, calc((100vw - var(--container)) / 2)); inset-block-start: 50%; transform: translateY(-42%); inline-size: clamp(200px, 23vw, 350px); aspect-ratio: 1 / 1.08; pointer-events: none; display: grid; place-items: center; }
.hero-emblem img { inline-size: 78%; block-size: auto; filter: drop-shadow(0 12px 40px rgb(0 0 0 / .45)); opacity: .95; transition: opacity .6s var(--ease); }
.hero-emblem canvas { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; }
.hero-emblem.is-3d img { opacity: 0; }
.hero-emblem::before { content: ""; position: absolute; inset: 12%; border-radius: 50%; background: radial-gradient(circle, rgb(212 173 85 / .22), transparent 65%); filter: blur(10px); }
@media (max-width: 999px) { .hero-emblem { inline-size: 120px; inset-block-start: calc(var(--header-h) + 16px); transform: none; inset-inline-end: var(--gutter); } .hero-emblem::before { display: none; } }
@media (max-width: 600px) { .hero-emblem { display: none; } }

/* ---------- Qala Assistant (website guide) ---------- */
.wa-float { inset-block-end: 88px; }
.qa-fab { position: fixed; z-index: 46; inset-block-end: 20px; inset-inline-end: 20px; display: flex; align-items: center; gap: 10px; block-size: 56px; padding-inline: 8px 20px; border: 1px solid rgb(212 173 85 / .6); border-radius: 999px; background: var(--ink); color: var(--white); font: inherit; font-size: .85rem; letter-spacing: .08em; text-transform: uppercase; cursor: pointer; box-shadow: 0 8px 24px rgb(0 0 0 / .3); transition: transform var(--t) var(--ease), background var(--t); }
:lang(ar) .qa-fab { letter-spacing: 0; text-transform: none; font-size: .95rem; }
.qa-fab:hover { transform: translateY(-2px); background: #1d1c1a; }
.qa-fab-ico { inline-size: 40px; block-size: 40px; border-radius: 50%; background: url("/assets/img/brand/qala-emblem.svg") center / 70% no-repeat, radial-gradient(circle at 35% 30%, #3a352b, #111); flex: none; }
.qa-fab.is-loading .qa-fab-ico { animation: spin 1.2s linear infinite; }
.qa.is-open .qa-fab { opacity: 0; pointer-events: none; }
.qa-panel { position: fixed; z-index: 60; inset-block-end: 20px; inset-inline-end: 20px; inline-size: min(400px, calc(100vw - 24px)); block-size: min(620px, calc(100vh - 110px)); display: flex; flex-direction: column; background: var(--white); color: var(--ink); border-radius: 14px; overflow: hidden; box-shadow: 0 24px 70px rgb(0 0 0 / .35); }
.qa-panel[hidden] { display: none; }
.qa-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--ink); color: var(--white); }
.qa-head b { display: block; font-weight: 600; letter-spacing: .06em; }
.qa-head small { color: var(--gold-on-dark); font-size: .72rem; }
.qa-x { margin-inline-start: auto; background: none; border: 0; color: var(--white); font-size: 1.1rem; cursor: pointer; padding: 6px; }
.qa-log { flex: 1; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 10px; background: var(--grey-bg); }
.qa-msg { max-inline-size: 88%; padding: 10px 13px; border-radius: 12px; font-size: .9rem; line-height: 1.55; }
.qa-msg p { margin: 0 0 6px; } .qa-msg p:last-child { margin: 0; }
.qa-bot { align-self: flex-start; background: var(--white); border: 1px solid var(--line); border-start-start-radius: 4px; }
.qa-me { align-self: flex-end; background: var(--ink); color: var(--white); border-start-end-radius: 4px; }
.qa-title { font-weight: 600; color: var(--gold-strong); }
.qa-links { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 8px; }
.qa-links:empty { display: none; }
.qa-links a { font-size: .78rem; padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; background: var(--grey-bg); }
.qa-links a:hover { border-color: var(--gold); background: var(--sand); }
.qa-card { display: grid; gap: 4px; }
.qa-card-title { font-weight: 600; }
.qa-price { font-size: 1.25rem; font-weight: 300; color: var(--ink); }
.qa-card small { color: var(--text-soft); font-size: .72rem; }
.qa-cta { margin-block-start: 8px; display: inline-block; padding: 9px 14px; background: var(--gold); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .85rem; border-radius: 6px; text-align: center; }
.qa-cta:hover { background: #c9a35e; color: var(--ink); }
.qa-chips { display: flex; gap: 6px; overflow-x: auto; padding: 8px 12px; border-block-start: 1px solid var(--line); scrollbar-width: none; }
.qa-chips button { flex: none; font: inherit; font-size: .78rem; padding: 6px 11px; border: 1px solid var(--gold); border-radius: 999px; background: var(--white); color: var(--gold-strong); cursor: pointer; }
.qa-chips button:hover { background: var(--sand); }
.qa-form { display: flex; gap: 6px; padding: 10px 12px 12px; }
.qa-form input { flex: 1; font: inherit; font-size: .92rem; padding: 10px 12px; border: 1px solid #c9c3b8; border-radius: 8px; }
.qa-form input:focus { outline: 2px solid var(--gold); outline-offset: 0; }
.qa-send { inline-size: 44px; border: 0; border-radius: 8px; background: var(--ink); color: var(--gold-on-dark); font-size: 1rem; cursor: pointer; }
[dir="rtl"] .qa-send { transform: scaleX(-1); }
@media (max-width: 640px) { .qa-fab { padding: 8px; } .qa-fab-text { display: none; } .qa-panel { inset: auto 0 0 0; inline-size: 100%; block-size: 85vh; border-radius: 14px 14px 0 0; } }
.page-viz .qa-fab { inset-block-end: 216px; }
@media (min-width: 1001px) { .page-viz .qa-fab { inset-inline-end: 460px; inset-block-end: 88px; } .page-viz .wa-float { inset-block-end: 156px !important; } }
@media print { .qa { display: none; } }
.hero-video { position: absolute; inset: 0; z-index: -2; inline-size: 100%; block-size: 100%; object-fit: cover; opacity: 0; transition: opacity 1.2s var(--ease); }
.hero-video.is-playing { opacity: 1; }

/* Project cards and case pages */
.project-cards { list-style: none; padding: 0; margin: 0 0 var(--section); display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 24px; }
.project-cards a { display: grid; gap: 6px; color: var(--ink); text-decoration: none; }
.project-card-media { display: block; aspect-ratio: 4 / 3; overflow: hidden; background: var(--sand); }
.project-card-media img, .project-card-media picture { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; transition: transform .8s var(--ease); }
.project-cards a:hover img { transform: scale(1.05); }
.project-card-cat { font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--gold-strong); margin-block-start: 6px; }
:lang(ar) .project-card-cat { letter-spacing: 0; font-size: .8rem; }
.project-cards b { font-weight: 500; font-size: 1.05rem; }
.project-cards small { color: var(--text-soft); }
.project-cards-small { margin: 0; }
.project-title { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 300; text-transform: uppercase; max-inline-size: 20ch; }
:lang(ar) .project-title { text-transform: none; font-weight: 600; }
.project-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 48px; margin-block-start: 24px; }
.project-facts { margin: 0; border-block-start: 2px solid var(--ink); }
.project-facts div { padding-block: 12px; border-block-end: 1px solid var(--line); }
.project-facts dt { font-size: .75rem; letter-spacing: .1em; text-transform: uppercase; color: var(--gold-strong); }
:lang(ar) .project-facts dt { letter-spacing: 0; font-size: .85rem; }
.project-facts dd { margin: 2px 0 0; }
.project-photos { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.project-photos li:first-child:nth-last-child(odd), .project-photos li:last-child:nth-child(odd) { grid-column: 1 / -1; }
.project-photos img, .project-photos picture { inline-size: 100%; block-size: 100%; object-fit: cover; display: block; }
.project-cta { margin-block-start: 28px; display: flex; gap: 12px; flex-wrap: wrap; }
@media (max-width: 760px) { .project-grid { grid-template-columns: 1fr; gap: 24px; } .project-photos { grid-template-columns: 1fr; } }
.map-box { margin-block-start: 24px; aspect-ratio: 4 / 3; display: grid; place-items: center; align-content: center; gap: 10px; text-align: center; padding: 24px; background: linear-gradient(135deg, #1b1a18, #2b2823); color: var(--text-on-dark); border: 1px solid var(--line); }
.map-box small { color: var(--text-on-dark-soft); font-size: .72rem; }
.map-box .btn-outline { color: var(--white); border-color: var(--gold); }
.map-box.is-loaded { padding: 0; }
.map-box iframe { inline-size: 100%; block-size: 100%; border: 0; }

/* Home hero: a little shorter, with a scroll cue */
.hero-home { min-block-size: min(84vh, 780px); }
.hero-home .hero-title { font-size: clamp(2.1rem, 4.3vw, 3.8rem); }
.scroll-cue { position: absolute; z-index: 2; inset-inline-start: 50%; inset-block-end: calc(var(--cut-r) * .55 + 18px); transform: translateX(-50%); display: grid; justify-items: center; gap: 6px; color: var(--white); text-decoration: none; opacity: .85; transition: opacity var(--t); }
[dir="rtl"] .scroll-cue { transform: translateX(50%); }
.scroll-cue:hover { opacity: 1; color: var(--gold-on-dark); }
.scroll-cue small { font-size: .65rem; letter-spacing: .3em; text-transform: uppercase; }
:lang(ar) .scroll-cue small { letter-spacing: 0; font-size: .8rem; }
.scroll-cue-mouse { inline-size: 24px; block-size: 38px; border: 1.5px solid currentColor; border-radius: 14px; display: flex; justify-content: center; padding-block-start: 7px; }
.scroll-cue-mouse span { inline-size: 3px; block-size: 8px; border-radius: 2px; background: var(--gold); animation: scrollCue 1.8s var(--ease) infinite; }
@keyframes scrollCue { 0% { transform: translateY(0); opacity: 1; } 70% { transform: translateY(12px); opacity: 0; } 100% { transform: translateY(0); opacity: 0; } }
.anchor-target { display: block; position: relative; inset-block-start: calc(-1 * var(--header-h)); }
@media (prefers-reduced-motion: reduce) { .scroll-cue-mouse span { animation: none; } }
@media (max-width: 600px) { .hero-home { min-block-size: 78vh; } .scroll-cue { display: none; } }
/* Visualizer on desktop: the panel has a fixed height and scrolls inside, so the page never changes length between steps */
@media (min-width: 1001px) {
  .viz-panel { position: sticky; inset-block-start: var(--header-h); block-size: calc(100vh - var(--header-h)); min-block-size: 0; }
  .viz-form { min-block-size: 0; overscroll-behavior: contain; }
}
/* Assistant: placed by the page direction (not by the language of the chat), so it never jumps sides */
.qa-panel, .qa-fab { inset-inline-end: auto; right: 20px; left: auto; }
html[dir="rtl"] .qa-panel, html[dir="rtl"] .qa-fab { right: auto; left: 20px; }
@media (min-width: 1001px) { .page-viz .qa-fab { right: 460px; } html[dir="rtl"] .page-viz .qa-fab { left: 460px; right: auto; } }
@media (max-width: 640px) { .qa-panel, html[dir="rtl"] .qa-panel { left: 0; right: 0; } }
.viz-status { min-block-size: 1.6em; }

/* Your photo: corner handles, loupe, tools, full screen */
.viz-fit { position: absolute; z-index: 3; touch-action: none; }
.viz-fit[hidden] { display: none; }
.viz-fit-quad { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; overflow: visible; pointer-events: none; }
.viz-fit-quad polygon { fill: rgb(180 142 82 / .18); stroke: #e9c27a; stroke-width: 2; stroke-dasharray: 7 5; }
.viz-fit-quad polygon.is-bad { fill: rgb(200 60 60 / .18); stroke: #ff7b7b; }
.viz-fit-handle { position: absolute; inline-size: 44px; block-size: 44px; margin: -22px 0 0 -22px; border-radius: 50%; border: 3px solid #fff; background: rgb(180 142 82 / .92); color: #111; font: 700 .95rem/1 var(--font-sans, sans-serif); box-shadow: 0 2px 10px rgb(0 0 0 / .45); cursor: grab; touch-action: none; display: grid; place-items: center; padding: 0; }
.viz-fit-handle::after { content: ""; position: absolute; inline-size: 6px; block-size: 6px; border-radius: 50%; background: #111; inset-block-start: 50%; inset-inline-start: 50%; transform: translate(-50%, -50%); opacity: .0; }
.viz-fit-handle span { pointer-events: none; }
.viz-fit-handle small { position: absolute; inset-block-start: 46px; inset-inline-start: 50%; transform: translateX(-50%); white-space: nowrap; font-size: .68rem; font-weight: 600; color: #fff; background: rgb(17 17 16 / .7); padding: 2px 6px; pointer-events: none; }
.viz-fit-handle.is-active { cursor: grabbing; background: #fff; transform: scale(.55); }
.viz-fit-handle.is-active::after { opacity: 1; }
.viz-fit-loupe { position: absolute; inline-size: 120px; block-size: 120px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 4px 16px rgb(0 0 0 / .5); background-repeat: no-repeat; pointer-events: none; z-index: 4; }
.viz-fit-loupe::after { content: "+"; position: absolute; inset: 0; display: grid; place-items: center; color: #e9c27a; font: 300 28px/1 sans-serif; text-shadow: 0 0 3px #000; }
.viz-photo-bar { gap: 8px; padding: 10px 12px; }
.viz-photo-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.viz-photo-modes { display: flex; border: 1px solid rgb(255 255 255 / .5); }
.viz-photo-modes button, .viz-photo-tools button, .viz-photo-min { background: none; border: 0; color: #fff; font: inherit; font-size: .8rem; padding: 7px 11px; cursor: pointer; min-inline-size: 38px; min-block-size: 36px; }
.viz-photo-modes button + button { border-inline-start: 1px solid rgb(255 255 255 / .35); }
.viz-photo-modes button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.viz-photo-hint { font-size: .8rem; line-height: 1.45; }
.viz-photo-hint.is-bad { color: #ffb4b4; }
.viz-photo-more { display: grid; gap: 8px; }
.viz-photo-more[hidden] { display: none; }
.viz-photo-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.viz-photo-tools button { border: 1px solid rgb(255 255 255 / .35); font-size: 1rem; }
.viz-photo-tools button:hover, .viz-photo-modes button:hover { background: rgb(180 142 82 / .6); }
.viz-photo-opacity { display: flex; align-items: center; gap: 6px; font-size: .75rem; margin-inline-end: auto; }
.viz-photo-opacity input { inline-size: 90px; accent-color: var(--gold); }
.viz-photo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.viz-stage.is-full { position: fixed; inset: 0; z-index: 1000; block-size: 100dvh; min-block-size: 0; }
html.viz-full { overflow: hidden; }
@media (max-width: 600px) {
  .viz-photo-bar { inset-inline: 8px; inset-block-end: 8px; padding: 8px 10px; }
  .viz-photo-hint { font-size: .74rem; }
  .viz-fit-handle small { display: none; }
}
.viz-photo-bar, .viz-stage-tools { z-index: 5; }

/* Photo mode: the tool bar is docked under the photo (the photo is laid out above it) */
.viz-stage.is-photo { background: #111; }
.viz-stage.is-photo .viz-stage-tools { display: none; }
.viz-stage.is-photo .viz-photo-bar { inset-inline: 0; inset-block-end: 0; max-inline-size: none; background: rgb(17 17 16 / .94); }
.viz-photo-min { border: 1px solid rgb(255 255 255 / .35) !important; font-size: 1rem !important; }
.viz-photo-top { justify-content: flex-start; }
.viz-photo-top .viz-photo-modes { margin-inline-end: auto; }
.viz-photo-status:empty { display: none; }
@media (max-width: 600px) {
  .viz-photo-tools:first-child { flex-wrap: nowrap; overflow-x: auto; }
  .viz-photo-modes button { padding: 7px 9px; font-size: .76rem; }
  .viz-photo-hint { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .viz-photo-status { font-size: .72rem; }
}
.btn { max-inline-size: 100%; }
@media (max-width: 600px) { .btn { white-space: normal; text-align: center; } }
.viz-photo-bar > *, .viz-photo-more > * { min-inline-size: 0; }
@media (max-width: 600px) {
  .viz-photo-tools button { min-inline-size: 34px; min-block-size: 34px; padding: 5px 8px; }
  .viz-photo-opacity input { inline-size: 70px; }
}

/* AR overlay (WebXR dom-overlay over the camera view) */
.viz-xr { position: fixed; inset: 0; z-index: 2000; display: flex; flex-direction: column; justify-content: flex-start; padding: max(12px, env(safe-area-inset-top)) 12px max(14px, env(safe-area-inset-bottom)); color: #fff; font-size: 15px; touch-action: none; pointer-events: auto; background: transparent; }
.viz-xr[hidden] { display: none; }
.viz-xr-top { display: flex; align-items: flex-start; gap: 10px; }
.viz-xr-status { flex: 1; margin: 0; background: rgb(17 17 16 / .66); padding: 10px 12px; border-radius: 10px; line-height: 1.45; font-size: .9rem; }
.viz-xr-status:empty { visibility: hidden; }
.viz-xr-btn { min-inline-size: 48px; min-block-size: 46px; padding: 8px 12px; border: 1px solid rgb(255 255 255 / .55); border-radius: 10px; background: rgb(17 17 16 / .62); color: #fff; font: inherit; font-size: .9rem; cursor: pointer; }
.viz-xr-btn[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
.viz-xr-size { align-self: center; margin: 6px 0 0; background: rgb(17 17 16 / .55); padding: 4px 12px; border-radius: 99px; font-size: .82rem; }
.viz-xr-size:empty { display: none; }
.viz-xr-scan { align-self: center; margin-block: auto; inline-size: 120px; block-size: 120px; display: grid; place-items: center; }
.viz-xr-scan[hidden] { display: none; }
.viz-xr-scan span { inline-size: 34px; block-size: 58px; border: 3px solid #fff; border-radius: 8px; animation: viz-xr-scan 2.2s ease-in-out infinite; }
@keyframes viz-xr-scan { 0%, 100% { transform: translateX(-34px) rotate(-12deg); } 50% { transform: translateX(34px) rotate(12deg); } }
.viz-xr-place { align-self: center; font-size: 1rem; padding: 14px 28px; margin-block-end: 8px; }
.viz-xr-place[hidden] { display: none; }
.viz-xr-bar { display: grid; gap: 8px; }
.viz-xr-bar[hidden] { display: none; }
.viz-xr-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.viz-xr-row:first-child .viz-xr-btn { flex: 1; }
.viz-xr.is-clean > :not(.viz-xr-show) { visibility: hidden; }
.viz-xr-show { position: absolute; inset-block-end: max(14px, env(safe-area-inset-bottom)); inset-inline-end: 12px; }
.viz-xr-show[hidden] { display: none; }
html.viz-xr-on body > *:not(.viz-xr) { }
@media (prefers-reduced-motion: reduce) { .viz-xr-scan span { animation: none; } }
.viz-xr-scan { flex: 1; margin-block: 0; }
.viz-xr-place, .viz-xr-bar { margin-block-start: auto; }
.viz-xr-place:not([hidden]) + .viz-xr-bar { margin-block-start: 0; }
.viz-xr-row { direction: ltr; }
.viz-xr-row .viz-xr-btn { min-inline-size: 44px; padding: 8px 9px; }

/* Horizon line (Place mode) */
.viz-horizon { position: absolute; z-index: 3; pointer-events: none; --h: 42%; }
.viz-horizon[hidden] { display: none; }
.viz-horizon-line { position: absolute; inset-inline: 0; inset-block-start: var(--h); border-block-start: 2px dashed #e9c27a; filter: drop-shadow(0 0 2px rgb(0 0 0 / .6)); }
.viz-horizon-knob { position: absolute; inset-block-start: var(--h); inset-inline-end: 8px; transform: translateY(-50%); pointer-events: auto; touch-action: none; cursor: ns-resize; border: 2px solid #fff; border-radius: 99px; background: rgb(180 142 82 / .95); color: #111; padding: 8px 12px 8px 26px; font: 600 .78rem/1 var(--font-sans, sans-serif); box-shadow: 0 2px 8px rgb(0 0 0 / .45); }
.viz-horizon-knob::before { content: "↕"; position: absolute; inset-inline-start: 9px; inset-block-start: 50%; transform: translateY(-50%); font-size: .9rem; }
.viz-photo-sliders { gap: 14px; }
.viz-photo-sliders .viz-photo-opacity { margin-inline-end: 0; }
.viz-photo-sliders input { inline-size: 110px; }
.viz-photo-tools button[aria-pressed="true"] { background: var(--gold); color: var(--ink); }
.viz-stage-tools [hidden] { display: none; }
