/* ==========================================================================
   RARE DESIGN HUB — style.css
   Digital marketing agency, Lahore.
   Palette + type derived from the RDH | RARE DESIGN HUB logo mark.
   ========================================================================== */

/* ---------- Fonts ---------- */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@400;500;600;700&family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- Tokens ---------- */
:root{
  /* colors — sampled directly from the logo */
  --bg:        #05050f;   /* page background */
  --surface:   #0a0a1f;   /* exact logo navy — panels blend with the mark */
  --surface-2: #0e0e26;   /* raised cards */
  --surface-3: #14143a;   /* hover / raised further */
  --line:      rgba(255,255,255,.08);
  --line-2:    rgba(255,255,255,.14);

  --blue:      #1aa6fb;
  --violet:    #7b45fc;
  --grad:      linear-gradient(135deg, var(--blue), var(--violet));
  --grad-soft: linear-gradient(135deg, rgba(26,166,251,.14), rgba(123,69,252,.14));

  --ink:       #f5f6fc;
  --muted:     #9a9fc7;
  --muted-2:   #62658c;

  /* type */
  --f-display: 'Space Grotesk', 'Segoe UI', sans-serif;
  --f-body:    'Inter', 'Segoe UI', sans-serif;
  --f-mono:    'JetBrains Mono', 'Courier New', monospace;

  /* layout */
  --container: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 18px;
  --cut: 22px; /* signature angular corner-cut, echoes the diagonal cuts in the RDH mark */

  --ease: cubic-bezier(.16,.84,.44,1);
}

/* ---------- Reset ---------- */
*, *::before, *::after{ box-sizing: border-box; }
html{ scroll-behavior: smooth; }
body{
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--f-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img{ max-width: 100%; display: block; }
a{ color: inherit; text-decoration: none; }
ul{ margin: 0; padding: 0; list-style: none; }
button{ font: inherit; cursor: pointer; }
input, textarea, select{ font: inherit; }
h1,h2,h3,h4,p{ margin: 0; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

:focus-visible{
  outline: 2px solid var(--blue);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Utility ---------- */
.container{
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}
.section{ position: relative; padding: clamp(72px, 10vw, 140px) 0; }
.section-head{
  max-width: 640px;
  margin-bottom: clamp(40px, 6vw, 72px);
}
.eyebrow{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--f-mono);
  font-size: 12.5px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 18px;
}
.eyebrow::before{
  content: '';
  width: 7px; height: 7px;
  background: var(--grad);
  display: inline-block;
  transform: rotate(45deg);
}
h2.h-lg{
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(30px, 4.4vw, 52px);
  line-height: 1.12;
  letter-spacing: -.01em;
}
.lede{
  font-size: clamp(15px, 1.4vw, 18px);
  color: var(--muted);
  margin-top: 16px;
  max-width: 54ch;
}
.grad-text{
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* signature angular corner-cut, used on cards / panels / buttons */
.cut-tl{ clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut)); }
.cut-br{ clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--cut)), calc(100% - var(--cut)) 100%, 0 100%); }

/* buttons */
.btn{
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  font-family: var(--f-body);
  font-weight: 600;
  font-size: 14.5px;
  letter-spacing: .01em;
  white-space: nowrap;
  border: 1px solid transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), background .35s var(--ease), border-color .35s var(--ease);
}
.btn-primary{
  background: var(--grad);
  color: #05050f;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut));
  box-shadow: 0 0 0 0 rgba(123,69,252,0);
}
.btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -12px rgba(123,69,252,.55);
}
.btn-ghost{
  background: transparent;
  border-color: var(--line-2);
  color: var(--ink);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut));
}
.btn-ghost:hover{
  border-color: var(--blue);
  background: rgba(26,166,251,.08);
  transform: translateY(-2px);
}
.btn-sm{ padding: 10px 18px; font-size: 13px; }
.btn svg{ width: 15px; height: 15px; flex: none; }

/* ---------- Background texture (shared) ---------- */
.grid-veil{
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, #000 40%, transparent 100%);
  pointer-events: none;
}
.glow{
  position: absolute;
  width: 620px; height: 620px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: .35;
  pointer-events: none;
}

/* ==========================================================================
   HEADER
   ========================================================================== */
.site-header{
  position: fixed; top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 18px var(--gutter);
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(5,5,15,.55);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: background .4s var(--ease), border-color .4s var(--ease), padding .4s var(--ease);
}
.site-header.is-scrolled{
  padding-top: 12px; padding-bottom: 12px;
  border-bottom-color: var(--line);
  background: rgba(5,5,15,.82);
}
.brand{ display: flex; align-items: center; gap: 12px; }
.brand img{ height: 30px; width: auto; display: block; }
.brand .wordmark{ height: 22px; width: auto; display: block; }
.brand .divider{ width: 1px; height: 22px; background: var(--line-2); }

.nav-links{ display: flex; align-items: center; gap: 34px; }
.nav-links a{
  font-size: 14px; font-weight: 500; color: var(--muted);
  position: relative;
  padding: 4px 0;
  transition: color .25s var(--ease);
}
.nav-links a::after{
  content: '';
  position: absolute; left: 0; right: 100%; bottom: -2px;
  height: 1px; background: var(--grad);
  transition: right .3s var(--ease);
}
.nav-links a:hover{ color: var(--ink); }
.nav-links a:hover::after{ right: 0; }

.header-actions{ display: flex; align-items: center; gap: 18px; }
.nav-toggle{
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: transparent; border: 1px solid var(--line-2);
  color: var(--ink);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after{
  content: ''; display: block; width: 16px; height: 1.5px; background: currentColor;
  position: relative; transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.nav-toggle span::before{ position: absolute; top: -5px; }
.nav-toggle span::after{ position: absolute; top: 5px; }
.nav-toggle.is-open span{ background: transparent; }
.nav-toggle.is-open span::before{ top: 0; transform: rotate(45deg); }
.nav-toggle.is-open span::after{ top: 0; transform: rotate(-45deg); }

/* ==========================================================================
   HERO
   ========================================================================== */
.hero{
  position: relative;
  padding: clamp(150px, 20vw, 210px) 0 clamp(90px, 10vw, 130px);
  overflow: hidden;
}
.hero .glow-a{ top: -160px; left: -120px; background: var(--blue); }
.hero .glow-b{ top: 40px; right: -180px; background: var(--violet); }
#hub-canvas{
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  opacity: .8;
}
.hero-inner{ position: relative; z-index: 2; max-width: 900px; }
.hero-badge{
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .1em;
  color: var(--muted);
  border: 1px solid var(--line-2);
  padding: 7px 14px;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%, 0 12px);
  margin-bottom: 30px;
  background: rgba(255,255,255,.02);
}
.hero-badge .dot{ width: 6px; height: 6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 3px rgba(26,166,251,.25); animation: pulse-dot 2.4s ease-in-out infinite; }
@keyframes pulse-dot{ 0%,100%{ opacity: 1; } 50%{ opacity: .35; } }

.hero h1{
  font-family: var(--f-display);
  font-weight: 600;
  font-size: clamp(38px, 6.4vw, 84px);
  line-height: 1.04;
  letter-spacing: -.02em;
}
.hero .lede{ font-size: clamp(16px, 1.7vw, 20px); max-width: 60ch; margin-top: 24px; }
.hero-actions{ display: flex; flex-wrap: wrap; gap: 16px; margin-top: 40px; }

.hero-ticker{
  margin-top: clamp(56px, 8vw, 90px);
  border-top: 1px solid var(--line);
  padding-top: 26px;
  position: relative;
}
.ticker-track{
  display: flex; gap: 48px;
  white-space: nowrap;
  animation: ticker 26s linear infinite;
  width: max-content;
}
@keyframes ticker{ from{ transform: translateX(0); } to{ transform: translateX(-50%); } }
.ticker-track span{
  font-family: var(--f-mono); font-size: 13px; letter-spacing: .06em;
  color: var(--muted-2); display: flex; align-items: center; gap: 12px;
}
.ticker-track span em{ color: var(--muted); font-style: normal; }
.ticker-track span::after{ content: '/'; color: var(--blue); margin-left: 36px; }

/* ==========================================================================
   SERVICES
   ========================================================================== */
.services-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.service-card{
  background: var(--surface);
  padding: 40px 34px;
  transition: background .35s var(--ease);
  position: relative;
}
.service-card:hover{ background: var(--surface-2); }
.service-num{
  font-family: var(--f-mono); font-size: 12px; color: var(--muted-2);
  margin-bottom: 22px; display: block;
}
.service-icon{
  width: 42px; height: 42px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 22px;
  color: var(--blue);
}
.service-icon svg{ width: 100%; height: 100%; }
.service-card h3{
  font-family: var(--f-display); font-weight: 600; font-size: 19px; margin-bottom: 10px;
}
.service-card p{ color: var(--muted); font-size: 14.5px; line-height: 1.65; }

/* ==========================================================================
   APPROACH (process rail)
   ========================================================================== */
.approach-rail{
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 28px;
}
.approach-rail::before{
  content: '';
  position: absolute; left: 0; right: 0; top: 27px;
  height: 1px;
  background: linear-gradient(90deg, var(--blue), var(--violet), transparent);
}
.step{ position: relative; padding-top: 64px; }
.step-marker{
  position: absolute; top: 0; left: 0;
  width: 54px; height: 54px;
  border: 1px solid var(--line-2);
  background: var(--surface);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-mono); font-size: 14px; color: var(--blue);
  clip-path: polygon(10px 0, 100% 0, 100% 100%, 0 100%, 0 10px);
}
.step h3{ font-family: var(--f-display); font-weight: 600; font-size: 18px; margin-bottom: 10px; }
.step p{ color: var(--muted); font-size: 14.5px; }

/* ==========================================================================
   WORK / PORTFOLIO
   ========================================================================== */
.work-grid{
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.work-card{
  border: 1px solid var(--line);
  background: var(--surface);
  overflow: hidden;
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut));
  transition: border-color .35s var(--ease);
}
.work-card:hover{ border-color: var(--line-2); }
.work-thumb{
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.work-thumb .art{
  position: absolute; inset: 0;
}
.work-thumb .grid-veil{ opacity: .6; }
.work-tag{
  position: absolute; top: 16px; left: 16px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase;
  padding: 5px 10px;
  background: rgba(5,5,15,.55);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line-2);
}
.work-body{ padding: 26px 28px 30px; display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; }
.work-body h3{ font-family: var(--f-display); font-weight: 600; font-size: 19px; margin-bottom: 8px; }
.work-body p{ color: var(--muted); font-size: 14px; }
.work-link{
  flex: none;
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border: 1px solid var(--line-2);
  color: var(--ink);
  transition: background .3s var(--ease), transform .3s var(--ease), border-color .3s var(--ease);
}
.work-link svg{ width: 16px; height: 16px; }
.work-card:hover .work-link{ background: var(--grad); border-color: transparent; color: #05050f; transform: rotate(45deg); }

/* ==========================================================================
   WHY US
   ========================================================================== */
.why-wrap{
  display: grid;
  grid-template-columns: .9fr 1.1fr;
  gap: clamp(40px, 6vw, 90px);
  align-items: start;
}
.why-list{ display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.why-item{
  background: var(--surface);
  padding: 26px 28px;
  display: flex; gap: 20px; align-items: flex-start;
}
.why-item .mark{ font-family: var(--f-mono); color: var(--blue); font-size: 13px; padding-top: 3px; }
.why-item h3{ font-family: var(--f-display); font-weight: 600; font-size: 16.5px; margin-bottom: 6px; }
.why-item p{ color: var(--muted); font-size: 14px; }

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.testi-track{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.testi-card{
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 32px 28px;
  clip-path: polygon(0 0, 100% 0, 100% 100%, var(--cut) 100%, 0 calc(100% - var(--cut)));
}
.testi-quote{ color: var(--blue); font-size: 30px; font-family: var(--f-display); line-height: 1; margin-bottom: 16px; display: block; }
.testi-card p.quote-text{ font-size: 15px; color: var(--ink); line-height: 1.7; margin-bottom: 22px; }
.testi-person{ display: flex; align-items: center; gap: 12px; }
.testi-avatar{
  width: 38px; height: 38px; flex: none;
  background: var(--grad);
  clip-path: polygon(6px 0, 100% 0, 100% 100%, 0 100%, 0 6px);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-display); font-weight: 600; font-size: 14px; color: #05050f;
}
.testi-person .name{ font-size: 14px; font-weight: 600; }
.testi-person .role{ font-size: 12.5px; color: var(--muted-2); }

/* ==========================================================================
   CTA BANNER
   ========================================================================== */
.cta-banner{
  position: relative;
  border: 1px solid var(--line-2);
  background: var(--surface-2);
  padding: clamp(48px, 8vw, 88px) clamp(28px, 6vw, 72px);
  display: flex; align-items: center; justify-content: space-between; gap: 40px; flex-wrap: wrap;
  clip-path: polygon(36px 0, 100% 0, 100% calc(100% - 36px), calc(100% - 36px) 100%, 0 100%, 0 36px);
  overflow: hidden;
}
.cta-banner::before{
  content:'';
  position: absolute; inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(123,69,252,.22), transparent 55%),
              radial-gradient(circle at 10% 90%, rgba(26,166,251,.18), transparent 50%);
  pointer-events: none;
}
.cta-banner h2{ font-family: var(--f-display); font-weight: 600; font-size: clamp(26px, 3.4vw, 40px); max-width: 560px; position: relative; }
.cta-banner .cta-actions{ position: relative; display: flex; gap: 16px; flex-wrap: wrap; }

/* ==========================================================================
   CONTACT
   ========================================================================== */
.contact-wrap{
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: clamp(32px, 5vw, 60px);
  align-items: start;
}
.contact-form{
  border: 1px solid var(--line);
  background: var(--surface);
  padding: clamp(28px, 4vw, 44px);
  clip-path: polygon(var(--cut) 0, 100% 0, 100% 100%, 0 100%, 0 var(--cut));
}
.form-row{ display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field{ margin-bottom: 20px; }
.field label{
  display: block; font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 9px;
}
.field input, .field select, .field textarea{
  width: 100%;
  background: var(--surface-2);
  border: 1px solid var(--line-2);
  color: var(--ink);
  padding: 13px 14px;
  font-size: 14.5px;
  transition: border-color .25s var(--ease), background .25s var(--ease);
}
.field textarea{ resize: vertical; min-height: 110px; }
.field input:focus, .field select:focus, .field textarea:focus{
  border-color: var(--blue); background: var(--surface-3); outline: none;
}
.field input::placeholder, .field textarea::placeholder{ color: var(--muted-2); }
.form-note{ font-size: 12.5px; color: var(--muted-2); margin-top: 6px; }
.form-status{ font-size: 13.5px; margin-top: 16px; display: none; }
.form-status.is-visible{ display: block; }
.form-status.ok{ color: #4ade80; }
.form-status.err{ color: #fb7185; }

.contact-side{ display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.contact-item{
  background: var(--surface);
  padding: 26px 28px;
  display: flex; gap: 18px; align-items: flex-start;
}
.contact-item .ico{
  width: 40px; height: 40px; flex: none;
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  color: var(--blue);
  clip-path: polygon(8px 0, 100% 0, 100% 100%, 0 100%, 0 8px);
}
.contact-item .ico svg{ width: 17px; height: 17px; }
.contact-item .label{ font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted-2); margin-bottom: 6px; }
.contact-item .value{ font-size: 15.5px; font-weight: 500; }
.contact-item .value a:hover{ color: var(--blue); }
.map-embed{
  border: 1px solid var(--line);
  filter: grayscale(1) invert(.92) contrast(.9);
  height: 220px;
}
.map-embed iframe{ width: 100%; height: 100%; border: 0; display: block; }

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer{
  border-top: 1px solid var(--line);
  padding: 60px 0 32px;
}
.footer-top{
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 44px;
}
.footer-brand .brand{ margin-bottom: 18px; }
.footer-brand p{ color: var(--muted); font-size: 14px; max-width: 34ch; margin-bottom: 22px; }
.social-row{ display: flex; gap: 12px; }
.social-row a{
  width: 36px; height: 36px;
  border: 1px solid var(--line-2);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .25s var(--ease), color .25s var(--ease);
}
.social-row a svg{ width: 15px; height: 15px; }
.social-row a:hover{ border-color: var(--blue); color: var(--blue); }
.footer-col h4{
  font-family: var(--f-mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--muted-2); margin-bottom: 18px;
}
.footer-col ul{ display: grid; gap: 12px; }
.footer-col a{ font-size: 14px; color: var(--muted); transition: color .25s var(--ease); }
.footer-col a:hover{ color: var(--ink); }
.footer-bottom{
  border-top: 1px solid var(--line);
  padding-top: 26px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-bottom p{ font-size: 13px; color: var(--muted-2); }
.back-to-top{
  display: flex; align-items: center; gap: 8px;
  font-family: var(--f-mono); font-size: 12px; color: var(--muted);
}
.back-to-top svg{ width: 13px; height: 13px; }
.back-to-top:hover{ color: var(--blue); }

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */
@media (max-width: 980px){
  .services-grid{ grid-template-columns: repeat(2, 1fr); }
  .approach-rail{ grid-template-columns: repeat(2, 1fr); row-gap: 44px; }
  .approach-rail::before{ display: none; }
  .why-wrap{ grid-template-columns: 1fr; }
  .testi-track{ grid-template-columns: 1fr 1fr; }
  .contact-wrap{ grid-template-columns: 1fr; }
  .footer-top{ grid-template-columns: 1fr 1fr; row-gap: 36px; }
}

@media (max-width: 760px){
  .nav-links{
    position: fixed; top: 66px; left: 0; right: 0; bottom: 0;
    flex-direction: column; align-items: flex-start; gap: 0;
    background: rgba(5,5,15,.98);
    padding: 10px var(--gutter) 30px;
    transform: translateY(-8px);
    opacity: 0; visibility: hidden;
    transition: opacity .3s var(--ease), transform .3s var(--ease), visibility .3s;
    border-bottom: 1px solid var(--line);
  }
  .nav-links.is-open{ opacity: 1; visibility: visible; transform: translateY(0); }
  .nav-links a{ width: 100%; padding: 15px 0; border-bottom: 1px solid var(--line); font-size: 15.5px; }
  .header-actions .btn-sm{ display: none; }
  .nav-toggle{ display: flex; }
  .services-grid{ grid-template-columns: 1fr; }
  .approach-rail{ grid-template-columns: 1fr; }
  .work-grid{ grid-template-columns: 1fr; }
  .testi-track{ grid-template-columns: 1fr; }
  .form-row{ grid-template-columns: 1fr; }
  .footer-top{ grid-template-columns: 1fr; }
  .cta-banner{ flex-direction: column; align-items: flex-start; }
}
