/* ─────────────────────────────────────────────────────────────
   NEXFLOW group landing page
   Left portal: Nexflow Labs (dark, futuristic, cyan / blue)
   Right portal: Nexflow Digital (cream paper, neo-brutalist, Zoho colours)
   ───────────────────────────────────────────────────────────── */
@font-face { font-family: 'Geist'; src: url('fonts/geist-latin-wght-normal.woff2') format('woff2'); font-weight: 100 900; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('fonts/geist-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Arabic'; src: url('fonts/ibm-plex-sans-arabic-arabic-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Plex Arabic'; src: url('fonts/ibm-plex-sans-arabic-arabic-600-normal.woff2') format('woff2'); font-weight: 600 700; font-display: swap; }

:root {
  --bg: #04050B; --text: #ECEFF7; --text-2: #A9B1C9; --muted: #6E7690;
  --blue: #4361FF; --cyan: #3BE3FF; --violet: #8B6CFF;
  --paper: #FFF7E9; --ink: #111111;
  --z-red: #E42527; --z-green: #089949; --z-blue: #226DB4; --z-yellow: #F9B21D;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --gutter: clamp(16px, 4vw, 40px);
  --font: 'Geist', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, monospace;
}
[dir="rtl"] { --font: 'Plex Arabic', 'Geist', system-ui, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; background: var(--bg); color: var(--text); font-family: var(--font); line-height: 1.5; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
body::before { content: ''; position: fixed; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(60% 50% at 20% 0%, rgba(67, 97, 255, .18), transparent 70%), radial-gradient(50% 50% at 90% 100%, rgba(249, 178, 29, .08), transparent 70%); }
a { color: inherit; }
img { display: block; max-width: 100%; height: auto; }
.mono { font-family: var(--mono); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 3px; border-radius: 8px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px var(--gutter) 0; }
.brand img { width: 136px; }
.langs { display: flex; gap: 4px; padding: 4px; border: 1px solid rgba(255, 255, 255, .1); border-radius: 12px; background: rgba(255, 255, 255, .03); }
.langs a { display: grid; place-items: center; min-width: 38px; height: 32px; padding: 0 8px; border-radius: 9px; font-size: .78rem; font-weight: 600; color: var(--text-2); text-decoration: none; transition: background-color .2s, color .2s; }
.langs a:hover { color: #fff; background: rgba(255, 255, 255, .07); }
.langs a[aria-current] { color: #04050B; background: #fff; }

/* intro */
.stage { display: grid; align-content: center; gap: clamp(22px, 3vw, 36px); padding: clamp(24px, 4vw, 48px) var(--gutter); }
.intro { text-align: center; display: grid; justify-items: center; gap: 10px; }
.hud { margin: 0; font-size: .72rem; letter-spacing: .18em; text-transform: uppercase; color: #FFB547; }
[dir="rtl"] .hud { letter-spacing: 0; font-size: .85rem; }
h1 { margin: 0; font-size: clamp(2rem, 1.2rem + 3.4vw, 4rem); line-height: 1.05; letter-spacing: -.04em; font-weight: 650; text-wrap: balance; }
[dir="rtl"] h1 { letter-spacing: 0; line-height: 1.3; }
.grad { background: linear-gradient(100deg, #b7c3ff, var(--blue) 35%, var(--cyan) 65%, var(--z-yellow)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { margin: 0; font-size: clamp(1rem, .95rem + .3vw, 1.2rem); color: var(--text-2); }

/* portals */
.portals { position: relative; display: flex; gap: clamp(14px, 2vw, 22px); width: min(100%, 1280px); margin-inline: auto; min-height: clamp(470px, 62vh, 640px); }
.portal { position: relative; flex: 1 1 0; display: flex; align-items: flex-end; min-width: 0; overflow: hidden; border-radius: 28px; text-decoration: none; isolation: isolate; transition: flex-grow .7s var(--ease), transform .5s var(--ease), box-shadow .5s; }
@media (hover: hover) and (min-width: 861px) {
  .portals:hover .portal { flex-grow: .8; }
  .portals .portal:hover, .portals .portal:focus-visible { flex-grow: 1.35; }
}
.portal__bg { position: absolute; inset: 0; z-index: -1; }
.portal__inner { position: relative; display: grid; gap: 14px; justify-items: start; width: 100%; padding: clamp(24px, 3.2vw, 44px); }
.portal__kicker { display: inline-flex; align-items: center; gap: 10px; font-size: .74rem; letter-spacing: .2em; }
.portal__title { font-size: clamp(1.7rem, 1.1rem + 2vw, 2.8rem); font-weight: 650; line-height: 1.05; letter-spacing: -.035em; max-width: 16ch; }
[dir="rtl"] .portal__title { letter-spacing: 0; line-height: 1.3; max-width: 22ch; }
.portal__text { max-width: 46ch; font-size: .98rem; line-height: 1.6; }
.portal__tags { display: flex; flex-wrap: wrap; gap: 8px; }
.portal__tags span { padding: .35em .8em; border-radius: 999px; font-size: .75rem; font-weight: 500; }
.portal__cta { display: inline-flex; align-items: center; gap: 10px; margin-top: 8px; padding: 13px 20px; border-radius: 14px; font-weight: 650; font-size: 1rem; transition: transform .3s var(--ease), box-shadow .3s; }
.portal__cta svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: translate .3s var(--ease); }
[dir="rtl"] .portal__cta svg { transform: scaleX(-1); }
.portal:hover .portal__cta svg, .portal:focus-visible .portal__cta svg { translate: 4px 0; }
[dir="rtl"] .portal:hover .portal__cta svg { translate: -4px 0; }
.portal__url { font-size: .7rem; letter-spacing: .12em; opacity: .7; }

/* Labs: dark console */
.portal--labs { color: #fff; background: radial-gradient(120% 90% at 20% 0%, rgba(67, 97, 255, .35), transparent 60%), radial-gradient(80% 70% at 100% 100%, rgba(59, 227, 255, .18), transparent 60%), #070A16; box-shadow: inset 0 0 0 1px rgba(59, 227, 255, .25), 0 40px 90px -50px rgba(67, 97, 255, .9); }
.portal--labs:hover, .portal--labs:focus-visible { box-shadow: inset 0 0 0 1px rgba(59, 227, 255, .6), 0 50px 110px -40px rgba(59, 227, 255, .7); }
.portal--labs canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.portal__grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px); background-size: 34px 34px; -webkit-mask: linear-gradient(180deg, #000 10%, transparent 80%); mask: linear-gradient(180deg, #000 10%, transparent 80%); }
.portal--labs::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, transparent 30%, rgba(4, 5, 11, .85)); pointer-events: none; }
.portal--labs .portal__kicker { color: var(--cyan); }
.portal--labs .portal__kicker i { width: 8px; height: 8px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 12px var(--cyan); animation: blink 1.6s steps(2) infinite; }
.portal--labs .portal__text { color: #C8D0E6; }
.portal--labs .portal__tags span { color: #D9E7FF; border: 1px solid rgba(59, 227, 255, .35); background: rgba(59, 227, 255, .08); }
.portal--labs .portal__cta { color: #fff; background: linear-gradient(135deg, var(--blue), #5B5BFF); box-shadow: 0 16px 36px -14px rgba(67, 97, 255, .9); }
.portal--labs .portal__url { color: var(--cyan); }
.portal--labs .portal__inner::before { content: ''; position: absolute; top: 18px; inset-inline-start: 18px; width: 18px; height: 18px; border-top: 2px solid var(--cyan); border-inline-start: 2px solid var(--cyan); opacity: .7; }

/* Digital: neo-brutalist paper */
.portal--digital { color: var(--ink); background: var(--paper); border: 3px solid var(--ink); box-shadow: 8px 8px 0 var(--z-yellow); }
.portal--digital:hover, .portal--digital:focus-visible { transform: translate(-3px, -3px); box-shadow: 12px 12px 0 var(--z-yellow); }
[dir="rtl"] .portal--digital { box-shadow: -8px 8px 0 var(--z-yellow); }
[dir="rtl"] .portal--digital:hover { transform: translate(3px, -3px); box-shadow: -12px 12px 0 var(--z-yellow); }
.portal__dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(17, 17, 17, .14) 1.2px, transparent 1.4px); background-size: 18px 18px; -webkit-mask: linear-gradient(180deg, #000 20%, transparent 85%); mask: linear-gradient(180deg, #000 20%, transparent 85%); }
.shape { position: absolute; border: 3px solid var(--ink); }
/* a cluster of Zoho-coloured shapes in the top corner, clear of the copy */
.s1 { width: 84px; height: 84px; border-radius: 50%; background: var(--z-red); top: 26px; inset-inline-end: 26px; box-shadow: 5px 5px 0 var(--ink); animation: float 7s ease-in-out infinite; }
.s2 { width: 54px; height: 54px; border-radius: 14px; background: var(--z-blue); top: 92px; inset-inline-end: 120px; rotate: 14deg; box-shadow: 4px 4px 0 var(--ink); animation: float 8s ease-in-out -2s infinite; }
.s3 { width: 0; height: 0; border: 0; border-inline-start: 34px solid transparent; border-inline-end: 34px solid transparent; border-bottom: 58px solid var(--z-green); top: 22px; inset-inline-end: 132px; filter: drop-shadow(4px 4px 0 var(--ink)); animation: float 9s ease-in-out -4s infinite; }
.s4 { width: 96px; height: 28px; border-radius: 999px; background: var(--z-yellow); top: 128px; inset-inline-end: 22px; rotate: -10deg; box-shadow: 4px 4px 0 var(--ink); animation: float 6.5s ease-in-out -1s infinite; }
.portal--digital .portal__kicker { padding: .4em .8em; border: 2px solid var(--ink); border-radius: 8px; background: var(--z-yellow); color: var(--ink); font-weight: 600; box-shadow: 3px 3px 0 var(--ink); }
.portal--digital .portal__inner { padding-top: 172px; }
.portal--digital .portal__text { color: #3A3A42; }
.portal--digital .portal__tags span { border: 2px solid var(--ink); background: #fff; color: var(--ink); font-weight: 600; }
.portal--digital .portal__tags span:nth-child(1) { background: #FFD9D5; }
.portal--digital .portal__tags span:nth-child(2) { background: #D5E7FA; }
.portal--digital .portal__tags span:nth-child(3) { background: #CBF0D9; }
.portal--digital .portal__tags span:nth-child(4) { background: #FFE8B0; }
.portal--digital .portal__cta { color: #fff; background: var(--ink); border: 2px solid var(--ink); box-shadow: 4px 4px 0 var(--z-red); }
.portal--digital:hover .portal__cta { box-shadow: 6px 6px 0 var(--z-red); }
.portal--digital .portal__url { color: var(--ink); }

/* centre core */
.core { position: absolute; z-index: 3; left: 50%; top: 50%; translate: -50% -50%; display: grid; place-items: center; width: 74px; height: 74px; border-radius: 50%; background: #04050B; box-shadow: 0 0 0 1px rgba(255, 255, 255, .15), 0 0 40px rgba(67, 97, 255, .6); pointer-events: none; transition: left .7s var(--ease); }
.core__n { font-weight: 800; font-size: 1.6rem; background: linear-gradient(135deg, var(--cyan), var(--blue)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.core__ring { position: absolute; inset: -8px; border-radius: 50%; border: 1px dashed rgba(59, 227, 255, .5); animation: spin 14s linear infinite; }
.core__ring--2 { inset: -16px; border-style: solid; border-color: rgba(249, 178, 29, .25) transparent; animation-duration: 9s; animation-direction: reverse; }

/* footer */
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding: 18px var(--gutter) 22px; font-size: .82rem; color: var(--muted); border-top: 1px solid rgba(255, 255, 255, .06); }
.foot p { margin: 0; }
.foot__contact { display: flex; flex-wrap: wrap; gap: 6px 18px; }
.foot a { color: var(--text-2); text-decoration: none; }
.foot a:hover { color: #fff; }

@keyframes blink { 50% { opacity: .25; } }
@keyframes spin { to { rotate: 360deg; } }
@keyframes float { 50% { translate: 0 -12px; } }
@keyframes rise { from { opacity: 0; translate: 0 18px; } }
.intro > * { animation: rise .8s var(--ease) both; }
.intro > :nth-child(2) { animation-delay: .08s; }
.intro > :nth-child(3) { animation-delay: .16s; }
.portal { animation: rise .9s var(--ease) both; animation-delay: .2s; }
.portal--digital { animation-delay: .3s; }

/* phones: portals stack, core between them */
@media (max-width: 860px) {
  .portals { flex-direction: column; min-height: 0; gap: 22px; }
  .portal { flex: none; min-height: 400px; }
  .portal--digital .portal__inner { padding-top: 140px; }
  .core { display: none; }

  .s1 { width: 64px; height: 64px; } .s2 { width: 44px; height: 44px; inset-inline-end: 96px; } .s3 { inset-inline-end: 104px; } .s4 { width: 76px; height: 24px; top: 104px; }
  .foot { justify-content: center; text-align: center; }
  .foot__contact { justify-content: center; }
}
