/* Procube website. Dark-only, one page. Follows the PRO CUBE brand book (Figma):
   navy system colour, bright functional accents, Graphik Arabic, 3D shapes (one hero, two support). */

@font-face { font-family: "Graphik Arabic"; font-weight: 400; font-display: swap;
  src: local("Graphik Arabic Regular"), url("fonts/GraphikArabic-Regular.ttf") format("truetype"); }
@font-face { font-family: "Graphik Arabic"; font-weight: 500; font-display: swap;
  src: local("Graphik Arabic Medium"), url("fonts/GraphikArabic-Medium.ttf") format("truetype"); }
@font-face { font-family: "Graphik Arabic"; font-weight: 600; font-display: swap;
  src: local("Graphik Arabic SemiBold"), url("fonts/GraphikArabic-SemiBold.ttf") format("truetype"); }
@font-face { font-family: "Graphik Arabic"; font-weight: 700; font-display: swap;
  src: local("Graphik Arabic Bold"), url("fonts/GraphikArabic-Bold.ttf") format("truetype"); }

:root {
  color-scheme: dark;
  --bg: #04192B; --navy: #083152; --ink: #083152;
  --cyan: #0497D4; --purple: #6859A7; --green: #019A5B; --coral: #F27B52;
  --pink: #F5A5BC; --gray: #E4E4E7; --red: #F15139; --yellow: #FFC231;
  --line: rgba(255, 255, 255, .16);
  --gutter: clamp(16px, 4vw, 56px);
  --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0; background: var(--bg); color: #fff; overflow-x: clip;
  font-family: "Graphik Arabic", "Graphik", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
em { font-style: normal; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }
::selection { background: var(--yellow); color: var(--ink); }

.wrap { padding-left: var(--gutter); padding-right: var(--gutter); max-width: 1600px; margin: 0 auto; }
section { padding-top: clamp(80px, 12vw, 180px); scroll-margin-top: 40px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 60; }
.skip:focus { left: 8px; }

.bg-yellow { background: var(--yellow); }
.c-yellow { color: var(--yellow); } .c-cyan { color: var(--cyan); } .c-pink { color: var(--pink); } .c-green { color: #2BC583; } .c-coral { color: var(--coral); }

.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); margin-bottom: 22px; }
h2 { font-weight: 700; font-size: clamp(40px, 7.4vw, 124px); line-height: .95; letter-spacing: -.03em; }
.head { margin-bottom: clamp(36px, 5vw, 80px); }
.ph {
  display: inline-block; margin-top: 22px; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: #FF9A85; border: 1.5px dashed var(--red); border-radius: 6px; padding: 3px 9px;
}
.ph.dark { color: #8f1f0e; border-color: #8f1f0e; margin-top: 4px; }

/* Buttons */
.btn { display: inline-block; text-decoration: none; font-weight: 600; font-size: 15px; border-radius: 999px; padding: 12px 22px; background: var(--yellow); color: var(--ink); transition: transform .25s var(--ease); }
.btn:hover { transform: translateY(-2px) rotate(-2deg); }

/* Header */
.top { position: fixed; z-index: 40; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gutter) 34px; pointer-events: none; background: linear-gradient(rgba(4, 25, 43, .95) 35%, rgba(4, 25, 43, 0)); }
.top > * { pointer-events: auto; }
.brand img { height: 40px; width: auto; }
.pill { display: flex; gap: 4px; padding: 6px; border-radius: 999px; background: rgba(8, 49, 82, .72); backdrop-filter: blur(14px); box-shadow: inset 0 0 0 1px var(--line); }
.pill a { text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 16px; border-radius: 999px; transition: background .2s, color .2s; }
.pill a:hover { background: #fff; color: var(--ink); }

/* Hero */
.hero { position: relative; min-height: 100svh; padding: 120px var(--gutter) 36px; display: flex; flex-direction: column; justify-content: flex-end; overflow: hidden; }
.dots { position: absolute; inset: 0; background-image: radial-gradient(rgba(255, 255, 255, .22) 1.5px, transparent 1.6px); background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 70% 70% at 70% 35%, #000 10%, transparent 75%); mask-image: radial-gradient(ellipse 70% 70% at 70% 35%, #000 10%, transparent 75%); }
.glow { position: absolute; border-radius: 50%; filter: blur(110px); opacity: .5; }
.g1 { width: 46vw; height: 46vw; right: -8vw; top: -10vw; background: var(--cyan); opacity: .28; }
.g2 { width: 34vw; height: 34vw; left: 18vw; bottom: -18vw; background: var(--purple); opacity: .35; }
.hero-tag { position: relative; display: flex; align-items: center; gap: 12px; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin-bottom: clamp(18px, 2.4vw, 36px); }
.hero-tag .dot { width: 12px; height: 12px; border-radius: 50%; }
.mega { position: relative; font-weight: 700; text-transform: uppercase; font-size: clamp(60px, 15.4vw, 300px); line-height: .84; letter-spacing: -.045em; margin-left: -.04em; }
.mega .line { display: block; overflow: hidden; padding-bottom: .06em; }
.mega .line > span { display: block; transform: translateY(105%); animation: rise 1s var(--ease) forwards; }
.mega .line:nth-child(2) > span { animation-delay: .1s; }
.mega .line:nth-child(3) > span { animation-delay: .2s; }
.mega i { font-style: normal; color: var(--yellow); }
@keyframes rise { to { transform: none; } }
.stage { position: absolute; inset: 0; pointer-events: none; }
.shape { position: absolute; filter: drop-shadow(0 30px 30px rgba(0, 0, 0, .4)); will-change: transform; }
.stage .shape { opacity: 0; animation: pop .9s var(--ease) .5s forwards; }
@keyframes pop { from { opacity: 0; scale: .6; } to { opacity: 1; scale: 1; } }
.s1 { width: clamp(170px, 27vw, 480px); right: 5vw; top: 15svh; rotate: -8deg; }
.s2 { width: clamp(64px, 9vw, 160px); right: 36vw; top: 16svh; }
.s3 { width: clamp(34px, 4.2vw, 76px); right: 11vw; top: 58svh; rotate: 14deg; }
.hero-foot { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 32px; margin-top: clamp(22px, 3vw, 44px); padding-top: 22px; border-top: 1px solid var(--line); }
.hero-foot p:first-child { max-width: 520px; font-size: clamp(17px, 1.5vw, 22px); }
.hero-foot .meta { text-align: right; font-size: 14px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.hero-foot a { color: var(--yellow); text-decoration: none; }

/* Tilted band */
.band { background: var(--yellow); color: var(--ink); transform: rotate(-2deg) scale(1.04); margin: clamp(40px, 6vw, 90px) 0 0; padding: clamp(12px, 1.6vw, 22px) 0; overflow: hidden; }
.track { display: flex; align-items: center; gap: clamp(20px, 3vw, 48px); width: max-content; animation: slide 28s linear infinite; }
.band span { font-weight: 700; text-transform: uppercase; font-size: clamp(26px, 4.2vw, 68px); letter-spacing: -.02em; line-height: 1; white-space: nowrap; }
.band i { width: clamp(16px, 2.2vw, 34px); height: clamp(16px, 2.2vw, 34px); border-radius: 50%; background: var(--ink); flex: none; }
@keyframes slide { to { transform: translateX(-50%); } }

/* Statement */
.statement .big { font-weight: 600; font-size: clamp(28px, 4.6vw, 76px); line-height: 1.08; letter-spacing: -.025em; max-width: 1400px; }

/* Service rows */
.rows { border-top: 1px solid var(--line); }
.row { position: relative; display: grid; grid-template-columns: 90px minmax(0, 1.25fr) minmax(0, 1fr) 150px; align-items: center; gap: 24px; padding: clamp(22px, 2.6vw, 40px) clamp(0px, 1.4vw, 24px); border-bottom: 1px solid var(--line); transition: color .3s, padding .4s var(--ease); isolation: isolate; }
.row::before { content: ""; position: absolute; inset: 0; background: var(--c); transform: scaleY(0); transform-origin: bottom; transition: transform .45s var(--ease); z-index: -1; }
.row .n { font-size: 14px; font-weight: 600; letter-spacing: .08em; color: var(--c); transition: color .3s; }
.row h3 { font-weight: 700; text-transform: uppercase; font-size: clamp(24px, 3.5vw, 58px); line-height: 1; letter-spacing: -.025em; }
.row p { font-size: clamp(16px, 1.2vw, 19px); opacity: .85; }
.row img { justify-self: end; height: clamp(64px, 7vw, 116px); width: auto; filter: drop-shadow(0 14px 14px rgba(0, 0, 0, .35)); transition: transform .5s var(--ease); }
@media (hover: hover) {
  .row:hover { color: var(--ink); padding-left: clamp(12px, 2.4vw, 44px); }
  .row:hover::before { transform: none; }
  .row:hover .n { color: var(--ink); }
  .row:hover p { opacity: 1; }
  .row:hover img { transform: scale(1.25) rotate(-14deg); }
}

/* Portfolio cards */
.stack { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.pcard { display: flex; flex-direction: column; gap: 22px; padding: clamp(22px, 2.2vw, 32px); border-radius: 28px; background: var(--bg); color: var(--ink); transition: transform .35s var(--ease); }
@media (hover: hover) { .pcard:hover { transform: translateY(-6px) rotate(-.6deg); } }
.plogo { height: 76px; display: flex; align-items: center; }
.plogo img { max-width: 190px; max-height: 76px; width: auto; height: auto; object-fit: contain; object-position: left center; }
.plogo img.app { width: 76px; height: 76px; max-width: none; border-radius: 22%; }
.pinfo { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; flex: 1; }
.pn { font-size: 13px; font-weight: 600; letter-spacing: .08em; }
.pinfo h3 { font-weight: 700; text-transform: uppercase; font-size: clamp(22px, 2vw, 30px); line-height: 1; letter-spacing: -.02em; }
.pinfo > p:not(.pn) { font-size: 16px; line-height: 1.4; }
.plink { margin-top: auto; text-decoration: none; font-weight: 600; font-size: 14px; padding: 9px 18px; border-radius: 999px; background: var(--ink); color: #fff; transition: transform .25s var(--ease); }
.plink:hover { transform: translateY(-2px) rotate(-2deg); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 72px); }
.step { border-top: 6px solid var(--c); border-radius: 3px; padding-top: 26px; }
.step .n { font-weight: 700; font-size: clamp(72px, 10vw, 176px); line-height: .9; letter-spacing: -.05em; color: var(--c); margin-bottom: 20px; }
.step h3 { font-weight: 700; text-transform: uppercase; font-size: clamp(20px, 1.8vw, 28px); margin-bottom: 10px; }
.step p:last-child { opacity: .85; max-width: 380px; }

/* Client wall */
.wall { display: grid; gap: 18px; overflow: hidden; padding: 6px 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.lane { display: flex; gap: 18px; width: max-content; }
.wall.run .lane { animation: slide 60s linear infinite; }
.wall.run .lane.rev { animation-direction: reverse; }
.wall.run:hover .lane { animation-play-state: paused; }
.tile { flex: none; width: clamp(170px, 17vw, 260px); height: clamp(104px, 10vw, 150px); border-radius: 26px; background: #fff; display: flex; align-items: center; justify-content: center; padding: clamp(16px, 1.8vw, 28px); }
.tile img { max-width: 100%; max-height: 100%; object-fit: contain; }
.tile.word span { color: var(--ink); font-weight: 700; text-transform: uppercase; font-size: clamp(15px, 1.4vw, 21px); line-height: 1.05; letter-spacing: -.01em; text-align: center; }

/* Contact */
.contact { position: relative; padding-bottom: clamp(40px, 6vw, 90px); }
.contact h2 { margin-bottom: clamp(28px, 4vw, 60px); }
.mail { display: inline-block; font-weight: 700; font-size: clamp(30px, 9.3vw, 180px); line-height: 1; letter-spacing: -.045em; color: var(--yellow); text-decoration: none; overflow-wrap: anywhere; }
.mail span { display: inline-block; font-size: .5em; margin-left: .12em; transition: transform .35s var(--ease); }
.mail:hover span { transform: translate(.12em, -.12em); }
.loc { margin-top: 26px; font-size: clamp(18px, 1.7vw, 26px); font-weight: 500; }
.cshape { width: clamp(90px, 13vw, 230px); right: var(--gutter); top: clamp(60px, 9vw, 150px); animation: bob 7s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-16px) rotate(8deg); } }

/* Footer */
.foot { margin-top: clamp(40px, 7vw, 110px); background: var(--navy); overflow: hidden; }
.wordmark { width: 100%; padding: clamp(28px, 5vw, 80px) var(--gutter) 0; opacity: .1; }
.legal { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 26px; font-size: 14px; }
.legal a { text-decoration: none; } .legal a:hover { text-decoration: underline; }

/* Reveal on scroll (only when JS is running) */
.js .reveal { opacity: 0; transform: translateY(36px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

@media (max-width: 900px) {
  .pill { display: none; }
  .row { grid-template-columns: 44px minmax(0, 1fr) 72px; }
  .row p { grid-column: 2; grid-row: 2; }
  .row img { grid-column: 3; grid-row: 1 / span 2; }
  .stack { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .steps { grid-template-columns: 1fr; }
  .s1 { top: 13svh; right: 2vw; } .s2 { right: 58vw; top: 21svh; } .s3 { right: 10vw; top: 38svh; }
  .hero-foot { flex-direction: column; align-items: flex-start; }
  .hero-foot .meta { text-align: left; }
  .brand img { height: 34px; }
  .cshape { top: 56px; width: 64px; }
}

/* Phones: large full-width portfolio cards */
@media (max-width: 720px) {
  .stack { grid-template-columns: 1fr; gap: 18px; }
  .pcard { padding: 30px 28px 32px; gap: 26px; border-radius: 30px; }
  .plogo { height: auto; min-height: 110px; }
  .plogo img { max-width: min(100%, 280px); max-height: 120px; }
  .plogo img.app { width: 120px; height: 120px; }
  .pinfo { gap: 14px; }
  .pn { font-size: 14px; }
  .pinfo h3 { font-size: 32px; }
  .pinfo > p:not(.pn) { font-size: 18px; line-height: 1.35; }
  .plink { margin-top: 8px; font-size: 16px; padding: 13px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .track, .cshape, .wall.run .lane { animation: none; }
  .mega .line > span { animation: none; transform: none; }
  .stage .shape { animation: none; opacity: 1; }
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .wall { overflow-x: auto; }
}
