/* Blue Isle – brand styles (home + digital cards) */
:root {
  --blue: #273587;
  --blue-deep: #1c2766;
  --blue-soft: #3a4796;
  --gold-1: #8d7557;
  --gold-2: #d5b794;
  --gold-3: #b89d72;
  --gold: linear-gradient(100deg, var(--gold-1) 0%, var(--gold-2) 46%, var(--gold-3) 99%);
  --ink: #1a1f4d;
  --muted: #646a8c;
  --line: #e4e6f2;
  --paper: #ffffff;
  --mist: #f3f4fa;
  --radius: 22px;
  --font-display: "Krona One", "Cairo", system-ui, sans-serif;
  --font-body: "Cairo", system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font-body); color: var(--ink); background: var(--paper); line-height: 1.55; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
[lang="ar"] { font-family: "Cairo", var(--font-body); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.gold-text {
  background: var(--gold);
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
}

/* The large outlined "BLUE" letters used across the brand */
.brand-lines {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background: url("../img/lines-white.svg") left -6vw top -4vh / auto 118vh no-repeat;
  opacity: .16;
}
.brand-lines--blue { background-image: url("../img/lines-blue.svg"); opacity: .22; }

/* ================= HOME: coming soon ================= */
.home {
  min-height: 100vh; min-height: 100svh;
  background: radial-gradient(120% 90% at 70% 10%, var(--blue-soft) 0%, var(--blue) 45%, var(--blue-deep) 100%);
  color: #fff; display: flex; flex-direction: column; overflow-x: hidden;
}
.home main {
  position: relative; z-index: 1; flex: 1;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 48px 20px 24px;
}
.logo-anim { width: min(300px, 62vw); --logo-blue: #ffffff; }
.logo-anim svg { width: 100%; height: auto; overflow: visible; }
.logo-anim .b { fill: var(--logo-blue); }

/* icon: outline draws in, then fills */
.logo-anim .icon {
  fill: rgba(255,255,255,0); stroke: #fff; stroke-width: .28; stroke-linejoin: round;
  stroke-dasharray: 1; stroke-dashoffset: 1;
  animation: bi-draw 1.5s cubic-bezier(.6,.05,.3,1) forwards, bi-fill .7s ease forwards;
  animation-delay: calc(var(--i) * .16s), calc(1.25s + var(--i) * .08s);
}
/* wordmarks: rise in one element at a time */
.logo-anim .en, .logo-anim .ar {
  opacity: 0; transform: translateY(5px); transform-box: fill-box;
  animation: bi-rise .7s cubic-bezier(.2,.7,.2,1) forwards;
  animation-delay: calc(1.6s + (var(--i) - 4) * .07s);
}
/* gold letters catch the light in a slow wave */
.logo-anim .g { animation: bi-rise .7s cubic-bezier(.2,.7,.2,1) forwards, bi-glint 5s ease-in-out infinite; animation-delay: calc(1.6s + (var(--i) - 4) * .07s), calc(3.4s + var(--i) * .09s); }

@keyframes bi-draw { to { stroke-dashoffset: 0; } }
@keyframes bi-fill { to { fill: #fff; stroke-width: 0; } }
@keyframes bi-rise { to { opacity: 1; transform: none; } }
@keyframes bi-glint { 0%, 78%, 100% { filter: brightness(1); } 86% { filter: brightness(1.45) saturate(1.1); } }

.soon { margin-top: clamp(28px, 6vh, 56px); opacity: 0; animation: bi-rise .9s ease 2.4s forwards; transform: translateY(8px); }
.soon h1 { margin: 0; font-family: "Cairo", sans-serif; font-weight: 800; font-size: clamp(26px, 5.4vw, 44px); line-height: 1.3; }
.soon .en-title { margin: 6px 0 0; font-family: var(--font-display); font-size: clamp(13px, 2.4vw, 20px); letter-spacing: .06em; text-transform: uppercase; font-weight: 400; }
.rule { width: 72px; height: 2px; margin: 26px auto; background: var(--gold); border-radius: 2px; }
.soon p { margin: 0 auto; max-width: 560px; color: rgba(255,255,255,.82); font-size: clamp(14px, 2.4vw, 17px); }
.soon p + p { margin-top: 6px; }

.progress { width: min(260px, 60vw); height: 3px; margin: 34px auto 0; border-radius: 3px; background: rgba(255,255,255,.14); overflow: hidden; }
.progress span { display: block; height: 100%; width: 40%; background: var(--gold); border-radius: inherit; animation: bi-slide 2.6s ease-in-out infinite; }
@keyframes bi-slide { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }

.home footer { position: relative; z-index: 1; padding: 18px 20px 26px; text-align: center; font-size: 13px; color: rgba(255,255,255,.7); }
.home footer .addr { display: flex; flex-wrap: wrap; gap: 4px 14px; justify-content: center; align-items: center; }
.home footer svg { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }
.home footer .portal-link {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 14px; padding: 8px 16px;
  border: 1px solid rgba(213,183,148,.45); border-radius: 999px; color: var(--gold-2);
  font-weight: 700; font-size: 13px; text-decoration: none; transition: background .2s, border-color .2s;
}
.home footer .portal-link:hover { background: rgba(255,255,255,.08); border-color: var(--gold-2); }
.home footer .portal-link svg { width: 15px; height: 15px; vertical-align: 0; }
.home footer small { display: block; margin-top: 10px; color: rgba(255,255,255,.72); letter-spacing: .04em; }

@media (prefers-reduced-motion: reduce) {
  .logo-anim .icon, .logo-anim .en, .logo-anim .ar, .logo-anim .g, .soon, .progress span { animation: none !important; opacity: 1; transform: none; }
  .logo-anim .icon { fill: #fff; stroke-width: 0; stroke-dashoffset: 0; }
}

/* ================= DIGITAL CARD ================= */
.card-page { background: var(--mist); min-height: 100vh; }
.vcard {
  position: relative; z-index: 1; max-width: 440px; margin: 0 auto; min-height: 100vh;
  background: var(--paper); box-shadow: 0 0 0 1px var(--line), 0 30px 80px rgba(28,39,102,.12);
  overflow: hidden;
}
@media (min-width: 520px) {
  .card-page { background: radial-gradient(120% 90% at 70% 10%, var(--blue-soft) 0%, var(--blue) 45%, var(--blue-deep) 100%); padding: 32px 16px; }
  .vcard { min-height: 0; border-radius: 28px; }
}

.vc-head {
  position: relative; height: 190px; padding: 22px 22px 0;
  background: radial-gradient(130% 120% at 85% 0%, var(--blue-soft), var(--blue) 55%, var(--blue-deep));
  border-radius: 0 0 0 64px; overflow: hidden;
}
.vc-head::before { /* brand line-art inside the header */
  content: ""; position: absolute; inset: -20px -40px -60px -30px;
  background: url("../img/lines-white.svg") left top / auto 200% no-repeat; opacity: .18;
}
.vc-head .logo { position: relative; width: 150px; }
.vc-head .lang { position: absolute; top: 20px; right: 20px; }

.vc-photo {
  position: relative; width: 132px; height: 132px; margin: -70px auto 0; border-radius: 50%;
  padding: 4px; background: var(--gold); box-shadow: 0 14px 34px rgba(28,39,102,.25);
}
.vc-photo img, .vc-photo .initials {
  width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 4px solid #fff; background: var(--mist);
}
.vc-photo .initials {
  display: grid; place-items: center; font-family: var(--font-display); font-size: 34px; color: var(--blue);
  background: linear-gradient(160deg, #fff, var(--mist));
}

.vc-body { padding: 16px 24px 28px; text-align: center; }
.vc-name { margin: 6px 0 0; font-family: var(--font-display); font-weight: 400; font-size: 22px; letter-spacing: .01em; color: var(--blue); line-height: 1.3; }
.vc-name-ar { margin: 2px 0 0; font-weight: 800; font-size: 22px; color: var(--blue); }
.vc-title { margin: 8px 0 0; font-weight: 700; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.vc-title-ar { margin: 2px 0 0; font-size: 14px; color: var(--gold-1); font-weight: 600; }
.vc-company { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 48px; padding: 0 22px; border: 0; border-radius: 14px; cursor: pointer;
  font: 700 15px/1 var(--font-body); text-decoration: none; transition: transform .15s ease, box-shadow .2s ease, filter .2s;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn:active { transform: scale(.98); }
.btn-gold { width: 100%; margin-top: 22px; color: #2a2112; background: var(--gold); box-shadow: 0 10px 24px rgba(141,117,87,.35); }
.btn-gold:hover { filter: brightness(1.05); }
.btn-gold small { font-weight: 600; opacity: .8; }

.vc-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 16px; }
.vc-actions a, .vc-actions button {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 14px 4px 12px;
  border: 1px solid var(--line); border-radius: 16px; background: #fff; color: var(--blue);
  font: 700 12px/1.2 var(--font-body); text-decoration: none; cursor: pointer; transition: border-color .2s, box-shadow .2s, transform .15s;
}
.vc-actions a:hover, .vc-actions button:hover { border-color: var(--gold-3); box-shadow: 0 8px 20px rgba(39,53,135,.08); }
.vc-actions svg { width: 24px; height: 24px; }
.vc-actions span[lang="ar"] { font-weight: 600; color: var(--muted); font-size: 11px; }

.vc-info { margin: 22px 0 0; padding: 0; list-style: none; text-align: left; border-top: 1px solid var(--line); }
.vc-info li { display: flex; gap: 14px; align-items: flex-start; padding: 13px 2px; border-bottom: 1px solid var(--line); }
.vc-info .ic { flex: none; width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; background: var(--mist); color: var(--blue); }
.vc-info .ic svg { width: 18px; height: 18px; }
.vc-info .lbl { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.vc-info a, .vc-info .val { color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; word-break: break-word; }
.vc-info .val[lang="ar"] { display: block; direction: rtl; text-align: right; font-size: 14px; margin-top: 2px; }
.vc-info .val.en { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }

.vc-foot { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 18px 20px 26px; color: var(--muted); font-size: 12px; }
.vc-foot img { width: 22px; }

/* QR / share sheet */
.sheet { border: 0; padding: 0; border-radius: 24px; width: min(360px, calc(100vw - 32px)); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.sheet::backdrop { background: rgba(20,27,70,.55); backdrop-filter: blur(3px); }
.sheet-in { padding: 26px 24px 22px; text-align: center; }
.sheet h2 { margin: 0; font-family: var(--font-display); font-weight: 400; font-size: 16px; color: var(--blue); }
.sheet .qr { width: 220px; height: 220px; margin: 18px auto 8px; padding: 12px; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px var(--line); }
.sheet .qr svg { width: 100%; height: 100%; }
.sheet .url { font-size: 13px; color: var(--muted); word-break: break-all; }
.sheet .row { display: flex; gap: 10px; margin-top: 16px; }
.sheet .row .btn { flex: 1; min-height: 44px; font-size: 14px; }
.btn-blue { background: var(--blue); color: #fff; }
.btn-line { background: #fff; color: var(--blue); box-shadow: inset 0 0 0 1px var(--line); }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; padding: 24px; }
.notfound h1 { font-family: var(--font-display); font-weight: 400; font-size: 20px; margin: 18px 0 6px; }
.notfound p { margin: 4px 0; color: rgba(255,255,255,.8); }
.notfound a { display: inline-block; margin-top: 20px; color: var(--gold-2); }
