/* ============================================================
   Emirates Developments — QR link page (links.emiratesdevelopments.tech)
   One column, phone-first. Same tokens, buttons, cards and reveal as the
   materials hub. No colour literals outside tokens.css.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--f-body);
  font-weight: 300;
  font-size: var(--t-body);
  line-height: 1.6;
  letter-spacing: 0.005em;
  color: rgb(var(--c-ink));
  background: var(--ground-wash) rgb(var(--c-paper));
  -webkit-font-smoothing: antialiased;
  min-height: 100svh;
  overflow-x: hidden;
}
:focus-visible { outline: 2px solid rgb(var(--c-ink)); outline-offset: 3px; border-radius: 4px; }
::selection { background: rgb(var(--c-ink) / 0.12); }
img, svg { display: block; }
a { color: inherit; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.visually-hidden:focus {
  position: fixed; top: 1rem; left: 1rem; z-index: 50; width: auto; height: auto; margin: 0;
  padding: 0.6rem 1rem; clip: auto; background: rgb(var(--c-paper)); border-radius: var(--radius-pill);
  box-shadow: var(--shadow-lift);
}

/* ---- The brand's E-pattern (the icon mark tiled), drawn with the ink colour
        through a mask so the colour stays a token, fading out below the card ---- */
.pattern {
  position: absolute; inset: 0 0 auto 0; height: min(64vh, 620px); z-index: 0; pointer-events: none;
  background-color: rgb(var(--c-ink) / 0.045);
  -webkit-mask-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Crect x='16' y='16.75' width='40' height='7.7'/%3E%3Crect x='16' y='32.15' width='40' height='7.7'/%3E%3Crect x='16' y='47.55' width='40' height='7.7'/%3E%3C/svg%3E"),
    linear-gradient(to bottom, rgb(0 0 0) 0%, rgb(0 0 0 / 0.6) 45%, transparent 100%);
  -webkit-mask-size: 72px 72px, 100% 100%;
  -webkit-mask-repeat: repeat, no-repeat;
  -webkit-mask-composite: source-in;
  mask-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='72' height='72' viewBox='0 0 72 72'%3E%3Crect x='16' y='16.75' width='40' height='7.7'/%3E%3Crect x='16' y='32.15' width='40' height='7.7'/%3E%3Crect x='16' y='47.55' width='40' height='7.7'/%3E%3C/svg%3E"),
    linear-gradient(to bottom, rgb(0 0 0) 0%, rgb(0 0 0 / 0.6) 45%, transparent 100%);
  mask-size: 72px 72px, 100% 100%;
  mask-repeat: repeat, no-repeat;
  mask-composite: intersect;
}

/* ---- Column ---- */
.page {
  position: relative; z-index: 1;
  max-width: 31rem;
  margin-inline: auto;
  padding-block: calc(env(safe-area-inset-top, 0px) + 0.75rem) calc(env(safe-area-inset-bottom, 0px) + 2.5rem);
  padding-inline: clamp(1.25rem, 5vw, 2rem);
}
@media (min-width: 900px) { .page { padding-block-start: 3rem; } }

.top { display: flex; justify-content: flex-end; align-items: center; min-height: 44px; margin-bottom: 0.75rem; }
.lang {
  display: inline-flex; align-items: center; gap: 0.45rem;
  min-height: 36px; padding: 0 0.95rem;
  border-radius: var(--radius-pill);
  border: 1px solid rgb(var(--c-ink) / 0.18);
  background: var(--glass);
  -webkit-backdrop-filter: var(--blur-glass); backdrop-filter: var(--blur-glass);
  font-size: var(--t-small); font-weight: 500; line-height: 1;
  text-decoration: none;
  transition: border-color var(--dur-fast), background var(--dur-fast);
}
.lang:hover { border-color: rgb(var(--c-ink)); }
.lang svg { width: 15px; height: 15px; }

/* ---- Eyebrow (shared device) ---- */
.eyebrow {
  margin: 0;
  font-family: var(--f-label); font-weight: 500; font-size: var(--t-eyebrow);
  letter-spacing: var(--ls-eyebrow); text-transform: uppercase;
  color: rgb(var(--c-grey-600));
}

/* ---- The card: reads like the front of the business card ---- */
.card {
  position: relative;
  background: rgb(var(--c-paper));
  border: 1px solid rgb(var(--c-grey-200) / 0.8);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(1.6rem, 6vw, 2.25rem) clamp(1.25rem, 5vw, 2rem) clamp(1.4rem, 5vw, 1.9rem);
}
.card__mark {
  position: absolute; top: 1.25rem; inset-inline-end: 1.25rem;
  width: 40px; height: 40px; object-fit: cover;
  border-radius: 10px; /* the digital icon mark tile, like an app icon */
  box-shadow: 0 1px 2px rgb(var(--c-ink) / 0.12), 0 0 0 1px rgb(var(--c-ink) / 0.06);
}
.card__logo img { height: 30px; width: auto; }
.card__eyebrow { margin: 1.6rem 0 0.55rem; }
.card__blurb { margin: 0; max-width: 36ch; line-height: 1.6; color: rgb(var(--c-ink) / 0.88); }
.card__tollfree {
  display: flex; flex-direction: column; gap: 0.2rem;
  margin-top: 1.4rem; padding-top: 1.2rem;
  border-top: 1px solid var(--rule);
  text-decoration: none;
}
.card__tollfree .num {
  font-size: var(--t-numeral); font-weight: 300; line-height: 1.1;
  letter-spacing: -0.01em; font-variant-numeric: tabular-nums;
  transition: opacity var(--dur-fast);
}
.card__tollfree:hover .num { opacity: 0.72; }

/* ---- Buttons (materials-hub .btn) ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.65rem;
  min-height: 44px; padding: 0.8rem 1.6rem;
  border-radius: var(--radius-btn);
  font-family: var(--f-label); font-size: var(--t-micro); font-weight: 500;
  letter-spacing: var(--ls-button); text-transform: uppercase; line-height: 1.2;
  border: 1px solid rgb(var(--c-ink) / 0.3);
  color: rgb(var(--c-ink)); background: rgb(var(--c-paper) / 0.6);
  text-decoration: none; cursor: pointer; -webkit-tap-highlight-color: transparent;
  transition: border-color var(--dur-fast), color var(--dur-fast), background var(--dur-fast), transform var(--dur-fast);
}
.btn:hover { border-color: rgb(var(--c-ink)); background: rgb(var(--c-ink) / 0.05); }
.btn:active { transform: scale(0.985); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-solid { background: rgb(var(--c-ink)); color: rgb(var(--c-paper)); border-color: rgb(var(--c-ink)); }
.btn-solid:hover { background: rgb(var(--c-ink) / 0.88); color: rgb(var(--c-paper)); border-color: transparent; }
.btn-block { width: 100%; min-height: 54px; }
.btn-sm { min-height: 38px; padding: 0.5rem 1.15rem; }

.actions { display: grid; gap: 0.65rem; margin-top: 0.9rem; }
.actions__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.65rem; }

/* ---- Sections ---- */
.sec { margin-top: 2rem; }
.sec__head { margin: 0 0.25rem 0.75rem; }

/* ---- Socials ---- */
.socials { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0.5rem; list-style: none; margin: 0; padding: 0; }
.social {
  display: flex; flex-direction: column; align-items: center; gap: 0.55rem;
  padding: 0.9rem 0.25rem 0.75rem;
  border-radius: var(--radius-tile);
  border: 1px solid rgb(var(--c-grey-200) / 0.8);
  background: rgb(var(--c-paper));
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: transform var(--dur-med) var(--ease-editorial), box-shadow var(--dur-med) var(--ease-editorial), border-color var(--dur-fast);
}
.social__icon { width: 24px; height: 24px; }
.social__label { font-size: var(--t-micro); font-weight: 500; letter-spacing: 0.06em; color: rgb(var(--c-grey-600)); transition: color var(--dur-fast); }
@media (hover: hover) {
  .social:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); border-color: var(--rule-strong); }
  .social:hover .social__label { color: rgb(var(--c-ink)); }
}

/* ---- Link lists ---- */
.list {
  background: rgb(var(--c-paper));
  border: 1px solid rgb(var(--c-grey-200) / 0.8);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  overflow: hidden;
}
.row {
  display: flex; align-items: center; gap: 0.95rem;
  min-height: 60px; padding: 0.8rem 1.1rem 0.8rem 1.25rem;
  text-decoration: none;
  transition: background var(--dur-fast);
}
[dir="rtl"] .row { padding: 0.8rem 1.25rem 0.8rem 1.1rem; }
.row + .row { border-top: 1px solid var(--rule); }
.row:hover { background: rgb(var(--c-ink) / 0.035); }
.row__icon { width: 20px; height: 20px; flex: none; color: rgb(var(--c-grey-600)); }
.row__body { flex: 1; min-width: 0; }
.row__title { display: block; font-weight: 500; font-size: var(--t-body); line-height: 1.3; }
.row__meta { display: block; margin-top: 0.15rem; font-size: var(--t-small); color: rgb(var(--c-grey-600)); line-height: 1.35; }
.row__chev { width: 18px; height: 18px; flex: none; color: rgb(var(--c-grey-300)); transition: transform var(--dur-fast), color var(--dur-fast); }
.row:hover .row__chev { color: rgb(var(--c-ink)); transform: translateX(2px); }
[dir="rtl"] .row__chev { transform: scaleX(-1); }
[dir="rtl"] .row:hover .row__chev { transform: scaleX(-1) translateX(2px); }

/* ---- Visit ---- */
.visit {
  background: rgb(var(--c-paper));
  border: 1px solid rgb(var(--c-grey-200) / 0.8);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: 1.25rem;
}
.visit__addr { font-style: normal; margin: 0 0 1rem; line-height: 1.55; }
.visit__addr .pobox { display: block; margin-top: 0.3rem; font-size: var(--t-small); color: rgb(var(--c-grey-600)); }
.visit__phones { display: grid; gap: 0.45rem; margin: 1.1rem 0 0; padding: 1rem 0 0; border-top: 1px solid var(--rule); list-style: none; }
.visit__phones a { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: var(--t-small); text-decoration: none; }
.visit__phones .k { color: rgb(var(--c-grey-600)); }
.visit__phones .v { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.visit__phones a:hover .v { text-decoration: underline; text-underline-offset: 3px; }

/* ---- Footer ---- */
.foot { margin-top: 2.5rem; display: grid; gap: 1.1rem; justify-items: center; text-align: center; }
.foot__legal { margin: 0; font-size: var(--t-micro); color: rgb(var(--c-grey-600)); line-height: 1.7; }
.foot__legal a { text-decoration: none; }
.foot__legal a:hover { text-decoration: underline; text-underline-offset: 3px; }
.foot__legal .sep { margin: 0 0.5rem; opacity: 0.6; }
.btn.is-done { border-color: rgb(var(--c-ink)); background: rgb(var(--c-ink)); color: rgb(var(--c-paper)); }

/* ---- Reveal (same keyframe as the materials hub) ---- */
.reveal { opacity: 0; transform: translateY(14px); animation: reveal var(--dur-reveal) var(--ease-editorial) forwards; animation-delay: var(--rd, 0ms); }
@keyframes reveal { to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {
  .reveal { animation: none; opacity: 1; transform: none; }
  .social, .row__chev, .btn { transition: none; }
}

/* ---- Arabic ---- */
[lang="ar"] body, [dir="rtl"] { font-family: "Tajawal", "Poppins", system-ui, -apple-system, sans-serif; }
[dir="rtl"] body { font-weight: 400; letter-spacing: 0; }
[dir="rtl"] .eyebrow, [dir="rtl"] .btn, [dir="rtl"] .social__label { letter-spacing: 0; text-transform: none; }
[dir="rtl"] .eyebrow { font-size: var(--t-small); font-weight: 500; }
[dir="rtl"] .btn { font-size: var(--t-small); font-weight: 500; }
[dir="rtl"] .row__title { font-weight: 500; }
[dir="rtl"] .card__tollfree .num, [dir="rtl"] .latin { font-family: var(--f-body); direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .card__tollfree { align-items: flex-start; }
[dir="rtl"] .card__tollfree .num { align-self: flex-start; }

/* ---- Community numerals ---- */
.row__num { flex: none; width: 22px; font-size: var(--t-small); font-weight: 300; color: rgb(var(--c-grey-600)); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
[dir="rtl"] .row__num { font-family: var(--f-body); }

/* ---- Reveal stagger as classes — the CSP has no unsafe-inline, so no style attributes ---- */
.rd-0 { --rd: 0ms; }
.rd-1 { --rd: 70ms; }
.rd-2 { --rd: 150ms; }
.rd-3 { --rd: 220ms; }
.rd-4 { --rd: 290ms; }
.rd-5 { --rd: 360ms; }
.rd-6 { --rd: 430ms; }

/* ---- Community banners: render behind a black gradient, white text inside ---- */
.banners { display: grid; gap: 0.65rem; }
.banner {
  position: relative; display: block; isolation: isolate;
  aspect-ratio: 2 / 1;
  border-radius: var(--radius-card); overflow: hidden;
  background: rgb(var(--c-grey-100));
  box-shadow: var(--shadow-card);
  color: rgb(var(--c-white)); text-decoration: none;
  transform: translateZ(0);
}
.banner__img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-editorial); }
.banner::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgb(var(--c-black) / 0.10) 0%, rgb(var(--c-black) / 0.30) 45%, rgb(var(--c-black) / 0.74) 100%);
}
.banner__num {
  position: absolute; top: 0.95rem; inset-inline-start: 1.1rem; z-index: 1;
  font-size: var(--t-small); font-weight: 300; letter-spacing: 0.08em;
  color: rgb(var(--c-white) / 0.85); font-variant-numeric: tabular-nums;
}
.banner__body {
  position: absolute; inset-inline: 1.1rem; bottom: 1rem; z-index: 1;
  display: flex; flex-direction: column; gap: 0.15rem; padding-inline-end: 2.6rem;
}
.banner__title { font-weight: 500; font-size: var(--t-h3); line-height: 1.2; letter-spacing: var(--ls-tight); text-shadow: 0 1px 2px rgb(var(--c-black) / 0.35); }
.banner__meta { font-size: var(--t-small); color: rgb(var(--c-white) / 0.84); text-shadow: 0 1px 2px rgb(var(--c-black) / 0.35); }
.banner__chev {
  position: absolute; bottom: 1.05rem; inset-inline-end: 1rem; z-index: 1;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid rgb(var(--c-white) / 0.5);
  color: rgb(var(--c-white)); background: rgb(var(--c-black) / 0.22);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: background var(--dur-fast), color var(--dur-fast), border-color var(--dur-fast);
}
.banner__chev svg { width: 16px; height: 16px; }
[dir="rtl"] .banner__chev svg { transform: scaleX(-1); }
[dir="rtl"] .banner__num, [dir="rtl"] .banner__meta .latin { font-family: var(--f-body); }
@media (hover: hover) {
  .banner:hover .banner__img { transform: scale(1.04); }
  .banner:hover .banner__chev { background: rgb(var(--c-white)); color: rgb(var(--c-black)); border-color: rgb(var(--c-white)); }
}
