/* ============================================================
   ZOHAIB STUDIO — Shared design system  ·  Direction B (Concrete & Clay)
   ============================================================ */
@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700;800;900&family=Space+Mono:wght@400;700&display=swap');

:root {
  --paper:    #E9E6DF;
  --paper-2:  #DFDBD1;
  --navy:     #14233B;
  --navy-2:   #1B2E48;
  --clay:     #C0613B;
  --clay-lt:  #E08A5E;
  --concrete: #C7C1B4;
  --stone:    #B9B2A4;
  --ink:      #14233B;
  --muted:    #6F6A61;
  --line:     rgba(20,35,59,0.14);
  --line-dk:  rgba(255,255,255,0.12);
  --paper-on-dk: #F1EDE4;
  --muted-on-dk: #A7B0BE;

  --display: 'Archivo', sans-serif;
  --mono: 'Space Mono', monospace;

  --maxw: 1280px;
  --pad: clamp(20px, 5vw, 72px);
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--display);
  background: var(--paper);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--clay); color: #fff; }

/* ---------- typography helpers ---------- */
.mono { font-family: var(--mono); letter-spacing: 0.14em; text-transform: uppercase; }
.kicker { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.26em; text-transform: uppercase; color: var(--clay); }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: 0.2em; text-transform: uppercase; color: var(--clay); }
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.02em; line-height: 0.98; text-transform: uppercase; text-wrap: balance; }
p { text-wrap: pretty; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--pad); padding-right: var(--pad); }
.section { padding-block: clamp(64px, 9vw, 130px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase;
  padding: 15px 24px; border: none; cursor: pointer; background: var(--clay); color: #F6F1E9;
  transition: background .35s var(--ease), transform .35s var(--ease), gap .35s var(--ease);
}
.btn:hover { background: var(--navy); gap: 18px; }
.btn .arr { transition: transform .35s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }
.btn--ghost { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn--ghost:hover { background: var(--navy); color: var(--paper-on-dk); border-color: var(--navy); }
.btn--lg { padding: 19px 34px; font-size: 13.5px; }
.btn--on-dk { background: var(--clay); color: #fff; }
.btn--on-dk:hover { background: var(--paper-on-dk); color: var(--navy); }

.txtlink { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.14em; text-transform: uppercase; display: inline-flex; align-items: center; gap: 9px; color: var(--clay); transition: gap .3s var(--ease); }
.txtlink:hover { gap: 14px; }

/* ============================================================  NAV  ============================================================ */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 22px var(--pad);
  transition: padding .4s var(--ease), background .4s var(--ease), box-shadow .4s var(--ease);
}
.nav.scrolled { padding: 13px var(--pad); background: rgba(233,230,223,0.86); backdrop-filter: blur(12px); box-shadow: 0 1px 0 var(--line); }
.nav.on-dark { color: var(--paper-on-dk); }
.nav.on-dark.scrolled { background: rgba(20,35,59,0.82); box-shadow: 0 1px 0 var(--line-dk); }
.logo { display: flex; flex-direction: column; line-height: 1; }
.logo .mark { font-size: 21px; font-weight: 800; letter-spacing: 0.06em; }
.logo .sub { font-family: var(--mono); font-size: 9px; letter-spacing: 0.32em; margin-top: 5px; color: var(--clay); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a.nl { font-family: var(--mono); font-size: 12.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); position: relative; padding-block: 4px; transition: color .3s; }
.nav.on-dark .nav-links a.nl { color: var(--muted-on-dk); }
.nav-links a.nl::after { content: ''; position: absolute; left: 0; bottom: 0; height: 1px; width: 0; background: var(--clay); transition: width .35s var(--ease); }
.nav-links a.nl:hover, .nav-links a.nl.active { color: var(--ink); }
.nav.on-dark .nav-links a.nl:hover, .nav.on-dark .nav-links a.nl.active { color: var(--paper-on-dk); }
.nav-links a.nl:hover::after, .nav-links a.nl.active::after { width: 100%; }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; }
.nav-toggle span { width: 24px; height: 2px; background: currentColor; transition: transform .3s, opacity .3s; }

.mobile-menu { position: fixed; inset: 0; z-index: 99; background: var(--navy); color: var(--paper-on-dk); display: flex; flex-direction: column; justify-content: center; gap: 8px; padding: var(--pad); transform: translateY(-100%); transition: transform .5s var(--ease); }
.mobile-menu.open { transform: translateY(0); }
.mobile-menu a { font-size: clamp(34px, 11vw, 60px); font-weight: 800; text-transform: uppercase; letter-spacing: -0.02em; padding-block: 6px; border-bottom: 1px solid var(--line-dk); }
.mobile-menu a:last-of-type { border: none; }

/* ============================================================  HERO  ============================================================ */
.hero { position: relative; min-height: 100vh; display: flex; align-items: flex-start; overflow: hidden; color: var(--paper-on-dk); background: var(--navy); }
.hero .hero-bg { position: absolute; inset: -12% 0; z-index: 0; will-change: transform; }
.hero-bg::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,35,59,0.30) 0%, rgba(20,35,59,0.55) 55%, rgba(20,35,59,0.86) 100%); }
.hero .wrap { position: relative; z-index: 2; width: 100%; padding-bottom: clamp(48px, 8vh, 96px); padding-top: clamp(160px, 22vh, 280px); }
.hero h1 { font-size: clamp(46px, 8vw, 112px); line-height: 0.92; max-width: 16ch; }
.hero .lede { font-size: clamp(17px, 1.5vw, 21px); line-height: 1.5; max-width: 50ch; margin-top: 26px; color: #D6D0C4; font-weight: 500; }
.hero .cta-row { display: flex; gap: 14px; margin-top: 36px; flex-wrap: wrap; }
.hero-corner { position: absolute; top: 120px; right: var(--pad); z-index: 2; text-align: right; font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; line-height: 2; color: var(--stone); }
.scroll-cue { position: absolute; bottom: 26px; left: 50%; transform: translateX(-50%); z-index: 2; font-family: var(--mono); font-size: 10px; letter-spacing: 0.2em; color: var(--stone); display: flex; flex-direction: column; align-items: center; gap: 8px; }
.scroll-cue .bar { width: 1px; height: 38px; background: linear-gradient(var(--clay-lt), transparent); animation: cue 1.8s var(--ease) infinite; transform-origin: top; }
@keyframes cue { 0%,100% { transform: scaleY(0.4); opacity: .4; } 50% { transform: scaleY(1); opacity: 1; } }

/* ============================================================  STAT STRIP  ============================================================ */
.stats { background: var(--navy); color: var(--paper-on-dk); }
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat { padding: clamp(40px, 6vw, 76px) clamp(22px, 3vw, 44px); border-right: 1px solid var(--line-dk); }
.stat:last-child { border-right: none; }
.stat .num { font-size: clamp(44px, 5.5vw, 78px); font-weight: 800; letter-spacing: -0.03em; line-height: 1; }
.stat .num .suf { color: var(--clay-lt); }
.stat .lbl { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-on-dk); margin-top: 14px; }

/* ============================================================  SECTION HEADER  ============================================================ */
.sec-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 28px; margin-bottom: clamp(36px, 5vw, 64px); flex-wrap: wrap; }
.sec-head h2 { font-size: clamp(30px, 4.5vw, 60px); line-height: 0.96; }
.sec-head .sh-meta { max-width: 38ch; }
.sec-head .sh-meta p { color: var(--muted); font-size: 16px; line-height: 1.55; margin-top: 12px; }
.idx { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--clay); display: block; margin-bottom: 16px; }

/* ============================================================  WORK / PROJECTS  ============================================================ */
.work { background: var(--paper); }
.feat { display: grid; grid-template-columns: 1.55fr 1fr; gap: clamp(24px, 3vw, 48px); align-items: center; margin-bottom: clamp(40px, 5vw, 72px); }
.feat .ph { aspect-ratio: 16 / 10; }
.feat-info .ft-tag { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.16em; color: var(--clay); }
.feat-info h3 { font-size: clamp(28px, 3.4vw, 46px); margin: 16px 0 16px; line-height: 0.98; }
.feat-info p { color: var(--muted); font-size: 16.5px; line-height: 1.6; margin-bottom: 26px; max-width: 42ch; }
.feat-info .specs { display: flex; gap: 28px; margin-bottom: 30px; flex-wrap: wrap; }
.feat-info .specs .s .k { font-family: var(--mono); font-size: 10px; letter-spacing: 0.14em; color: var(--muted); text-transform: uppercase; }
.feat-info .specs .s .v { font-family: var(--mono); font-size: 13px; letter-spacing: 0.04em; margin-top: 5px; }

.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 2.4vw, 36px); }
.pcard { display: block; cursor: pointer; }
.pcard .ph { aspect-ratio: 4 / 3; }
.pcard .pc-meta { display: flex; justify-content: space-between; align-items: flex-start; padding-top: 18px; gap: 16px; }
.pcard h4 { font-size: 20px; line-height: 1; }
.pcard .tags { font-family: var(--mono); font-size: 11px; letter-spacing: 0.05em; color: var(--muted); margin-top: 9px; line-height: 1.5; }
.pcard .yr { font-family: var(--mono); font-size: 12px; letter-spacing: 0.08em; color: var(--clay); white-space: nowrap; }
.pcard h4 { transition: color .3s; }
.pcard:hover h4 { color: var(--clay); }

/* placeholder image (drop real images here) */
.ph { position: relative; overflow: hidden; background-color: var(--concrete);
  background-image: repeating-linear-gradient(45deg, rgba(20,35,59,0.055) 0 2px, transparent 2px 13px); }
.ph.dk { background-color: var(--navy-2); background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.04) 0 2px, transparent 2px 13px); }
.ph .ph-lbl { position: absolute; top: 14px; left: 14px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); background: rgba(233,230,223,0.7); padding: 5px 9px; }
.ph.dk .ph-lbl { color: var(--muted-on-dk); background: rgba(20,35,59,0.5); }
.ph .ph-z { position: absolute; inset: 0; transition: transform .8s var(--ease); }
.pcard:hover .ph-z, .feat:hover .ph-z { transform: scale(1.05); }
.ph .ph-over { position: absolute; inset: 0; background: rgba(192,97,59,0); display: flex; align-items: center; justify-content: center; transition: background .4s var(--ease); }
.pcard:hover .ph-over { background: rgba(192,97,59,0.16); }
.ph .ph-arrow { width: 54px; height: 54px; border-radius: 50%; background: var(--clay); color: #fff; display: flex; align-items: center; justify-content: center; transform: scale(0) rotate(-30deg); transition: transform .45s var(--ease); }
.pcard:hover .ph-arrow { transform: scale(1) rotate(0); }

/* ============================================================  PROCESS SPECTRUM  ============================================================ */
.spectrum { background: var(--navy); color: var(--paper-on-dk); position: relative; }
.spectrum .sec-head h2 { color: var(--paper-on-dk); }
.spectrum .sec-head .sh-meta p { color: var(--muted-on-dk); }
.spec-track { position: relative; margin-top: 22px; }
.spec-line { height: 2px; width: 100%; background: linear-gradient(90deg, var(--clay-lt) 0%, #3F6699 50%, var(--clay) 100%); position: relative; }
.spec-phases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin-top: 0; }
.spec-phase { padding: 34px 26px 8px; position: relative; }
.spec-phase::before { content: ''; position: absolute; top: -7px; left: 26px; width: 13px; height: 13px; border-radius: 50%; background: var(--paper-on-dk); border: 3px solid var(--navy); }
.spec-phase .pn { font-family: var(--mono); font-size: 12px; letter-spacing: 0.16em; color: var(--clay-lt); }
.spec-phase h4 { font-size: clamp(19px, 2vw, 26px); margin: 12px 0 14px; }
.spec-phase ul { list-style: none; }
.spec-phase li { font-family: var(--mono); font-size: 12px; letter-spacing: 0.03em; color: var(--muted-on-dk); line-height: 2; text-transform: none; }
.spec-domains { display: grid; grid-template-columns: 1fr 1fr; margin-top: 44px; gap: 1px; border-top: 1px solid var(--line-dk); padding-top: 30px; }
.spec-dom { display: flex; align-items: baseline; gap: 16px; }
.spec-dom .dlabel { font-family: var(--mono); font-size: 11px; letter-spacing: 0.18em; text-transform: uppercase; padding: 6px 12px; }
.spec-dom.eng .dlabel { background: rgba(63,102,153,0.25); color: #9DBDE8; }
.spec-dom.arc .dlabel { background: rgba(224,138,94,0.2); color: var(--clay-lt); }
.spec-dom p { font-size: 14.5px; color: var(--muted-on-dk); line-height: 1.5; }
.spec-mid { text-align: center; margin-top: 40px; }
.spec-mid p { font-size: clamp(17px, 2vw, 22px); font-weight: 600; max-width: 50ch; margin: 0 auto; line-height: 1.4; color: var(--paper-on-dk); }
.spec-mid p .hl { color: var(--clay-lt); }

/* ============================================================  HOW WE WORK  ============================================================ */
.how { background: var(--paper-2); }
.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.step { background: var(--paper-2); padding: clamp(28px, 3vw, 44px) clamp(22px, 2.4vw, 34px); }
.step .sn { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--clay); }
.step h4 { font-size: clamp(18px, 1.9vw, 23px); margin: 18px 0 12px; line-height: 1.05; }
.step p { color: var(--muted); font-size: 14.5px; line-height: 1.55; }
.step .tline { font-family: var(--mono); font-size: 11px; letter-spacing: 0.1em; color: var(--navy); margin-top: 14px; }

/* ============================================================  SOFTWARE  ============================================================ */
.soft { background: var(--paper); }
.soft-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border-block: 1px solid var(--line); }
.soft-cell { background: var(--paper); padding: clamp(34px, 4vw, 54px) 28px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; transition: background .35s var(--ease); }
.soft-cell:hover { background: var(--navy); color: var(--paper-on-dk); }
.soft-cell .sname { font-size: clamp(19px, 2vw, 25px); font-weight: 800; letter-spacing: -0.01em; text-transform: none; }
.soft-cell .srole { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); transition: color .35s; }
.soft-cell:hover .srole { color: var(--clay-lt); }

/* ============================================================  TESTIMONIALS  ============================================================ */
.quotes { background: var(--paper); }
.quote-big { font-size: clamp(26px, 4vw, 52px); font-weight: 700; line-height: 1.08; letter-spacing: -0.02em; text-transform: none; max-width: 22ch; text-wrap: balance; }
.quote-big .mk { color: var(--clay); }
.quote-attr { display: flex; align-items: center; gap: 16px; margin-top: 36px; }
.quote-attr .av { width: 52px; height: 52px; border-radius: 50%; flex: none; }
.quote-attr .who .n { font-weight: 700; font-size: 16px; text-transform: none; letter-spacing: 0; }
.quote-attr .who .r { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.08em; color: var(--muted); margin-top: 4px; }
.quote-nav { display: flex; gap: 10px; margin-top: 40px; }
.qbtn { width: 46px; height: 46px; border: 1px solid var(--line); background: none; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: background .3s, color .3s, border-color .3s; color: var(--ink); }
.qbtn:hover { background: var(--navy); color: var(--paper-on-dk); border-color: var(--navy); }

/* ============================================================  CTA  ============================================================ */
.cta { background: var(--navy); color: var(--paper-on-dk); position: relative; overflow: hidden; }
.cta::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(45deg, rgba(255,255,255,0.025) 0 2px, transparent 2px 16px); }
.cta .wrap { position: relative; z-index: 2; text-align: center; }
.cta h2 { font-size: clamp(36px, 6vw, 84px); line-height: 0.95; }
.cta p { color: var(--muted-on-dk); font-size: clamp(16px, 1.6vw, 19px); margin: 24px auto 40px; max-width: 46ch; line-height: 1.5; }
.cta .cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.cta .email { font-family: var(--mono); font-size: 13px; letter-spacing: 0.1em; color: var(--clay-lt); margin-top: 30px; }

/* ============================================================  FOOTER  ============================================================ */
.footer { background: #0F1B2E; color: var(--paper-on-dk); padding-block: clamp(54px, 7vw, 90px) 34px; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 36px; padding-bottom: 48px; border-bottom: 1px solid var(--line-dk); }
.foot-brand .mark { font-size: 28px; font-weight: 800; letter-spacing: 0.04em; }
.foot-brand .sub { font-family: var(--mono); font-size: 10px; letter-spacing: 0.3em; color: var(--clay-lt); margin-top: 8px; }
.foot-brand p { color: var(--muted-on-dk); font-size: 14px; line-height: 1.6; margin-top: 20px; max-width: 32ch; }
.foot-col h5 { font-family: var(--mono); font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted-on-dk); margin-bottom: 18px; font-weight: 400; }
.foot-col a, .foot-col .li { display: block; font-size: 15px; padding-block: 7px; color: var(--paper-on-dk); transition: color .3s; }
.foot-col a:hover { color: var(--clay-lt); }
.foot-bottom { display: flex; justify-content: space-between; align-items: center; padding-top: 26px; gap: 20px; flex-wrap: wrap; }
.foot-bottom .kw { font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.06em; color: var(--muted-on-dk); max-width: 70ch; line-height: 1.7; }
.foot-bottom .cp { font-family: var(--mono); font-size: 11px; letter-spacing: 0.08em; color: var(--muted-on-dk); white-space: nowrap; }

/* ============================================================  REVEAL ANIMATION  ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal.d1 { transition-delay: .08s; } .reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; } .reveal.d4 { transition-delay: .32s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } .hero-bg { transform: none !important; } .scroll-cue .bar { animation: none; } }

/* ============================================================  RESPONSIVE  ============================================================ */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .stats-grid, .soft-row, .steps { grid-template-columns: repeat(2, 1fr); }
  .spec-phases { grid-template-columns: repeat(2, 1fr); }
  .spec-line { display: none; }
  .spec-phase::before { display: none; }
  .grid3 { grid-template-columns: repeat(2, 1fr); }
  .feat { grid-template-columns: 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .stats-grid, .soft-row, .steps, .spec-phases, .grid3, .foot-top, .spec-domains { grid-template-columns: 1fr; }
  .stat, .step, .soft-cell { border-right: none; border-bottom: 1px solid var(--line-dk); }
  .hero h1 { font-size: clamp(38px, 12vw, 58px); }
  .hero-corner { display: none; }
}
