/* ============================================================
   common.css — PortfolixHub shared styles
   ============================================================ */

/* ── RESET & BASE ── */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --black:  #0a0a0a;
  --white:  #ffffff;
  --g50:    #fafafa;
  --g100:   #f4f4f4;
  --g200:   #e8e8e8;
  --g300:   #d1d1d1;
  --g400:   #a3a3a3;
  --g500:   #737373;
  --g600:   #525252;
  --pad:    clamp(24px, 5vw, 80px);
  --nav:    64px;
  --r:      14px;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden; /* must be on html, not just body, to avoid scroll-container bug */
}

body {
  font-family: 'Bricolage Grotesque', sans-serif;
  background: var(--white);
  color: var(--black);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  cursor: none;
}

/* ── CUSTOM CURSOR ── */
#cd {
  position: fixed;
  width: 10px;
  height: 10px;
  background: #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  transition: width .2s, height .2s;
  mix-blend-mode: difference;
}

#cr {
  position: fixed;
  width: 36px;
  height: 36px;
  border: 1.5px solid #fff;
  border-radius: 50%;
  pointer-events: none;
  z-index: 9998;
  transform: translate(-50%, -50%);
  transition: opacity .2s, width .2s, height .2s;
  mix-blend-mode: difference;
}

body:has(a:hover) #cd,
body:has(button:hover) #cd { width: 40px; height: 40px; }
body:has(a:hover) #cr,
body:has(button:hover) #cr { opacity: 0; }

/* ── PROGRESS BAR ── */
#pb {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  background: var(--black);
  z-index: 9000;
  width: 0;
  pointer-events: none;
}

/* ── NAV — glassmorphism floating pill ── */
nav {
  position: fixed;
  top: 14px;
  left: 50%;
  transform: translateX(-50%) translateY(-120%);
  width: calc(100% - 48px);
  max-width: 1240px;
  height: 62px;
  min-height: 62px;
  max-height: 62px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  overflow: hidden;
  background: rgba(10, 10, 10, 0.12);
  backdrop-filter: blur(28px) saturate(160%);
  -webkit-backdrop-filter: blur(28px) saturate(160%);
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 18px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.10),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
  z-index: 500;
  animation: navIn .65s .1s cubic-bezier(.16, 1, .3, 1) forwards;
  transition: background .4s, border-color .4s, box-shadow .4s;
}

@keyframes navIn {
  to { transform: translateX(-50%) translateY(0); }
}

nav.scrolled {
  background: rgba(10, 10, 10, 0.32);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow:
    0 12px 48px rgba(0, 0, 0, 0.15),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

/* #nav-content is the flex row injected by JS — must also be row */
#nav-content {
  display: contents;
}

/* ── LOGO VARIANTS ── */
/* Default (dark bg): show white logo, hide dark logo */
.nav-logo-white { display: block; }
.nav-logo-dark  { display: none;  }

/* Light bg: show dark logo, hide white logo */
nav.nav-light .nav-logo-white { display: none;  }
nav.nav-light .nav-logo-dark  { display: block; }

/* ── NAV-LIGHT THEME (nav over light/white background) ── */
nav.nav-light {
  background: rgba(255, 255, 255, 0.28);
  border-color: rgba(0, 0, 0, 0.07);
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

nav.nav-light.scrolled {
  background: rgba(255, 255, 255, 0.52);
  border-color: rgba(0, 0, 0, 0.09);
}

nav.nav-light .nav-logo-fallback { color: var(--black); }

nav.nav-light .nav-center {
  background: rgba(0, 0, 0, 0.05);
  border-color: rgba(0, 0, 0, 0.07);
}

nav.nav-light .nav-center a       { color: rgba(0, 0, 0, 0.55); }
nav.nav-light .nav-center a:hover { color: var(--black); background: rgba(0, 0, 0, 0.06); }
nav.nav-light .nav-center a.active {
  color: var(--black);
  background: rgba(0, 0, 0, 0.08);
}

nav.nav-light .nav-cta {
  background: var(--black);
  color: var(--white);
}
nav.nav-light .nav-cta:hover {
  background: #222;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

/* Nav elements — always light since pill is always dark */
.nav-logo {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0;
  flex-shrink: 0;
  text-decoration: none;
  color: var(--white);
  transition: opacity .2s, transform .25s cubic-bezier(.16, 1, .3, 1);
}

.nav-logo:hover { opacity: .85; transform: scale(1.02); }

.nav-logo-img {
  height: 34px;
  width: auto;
  max-width: 180px;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.3));
}

.nav-logo-fallback {
  color: var(--white);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.03em;
  white-space: nowrap;
}

.nav-logo svg { flex-shrink: 0; }

.nav-center {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 2px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  padding: 4px 6px;
  white-space: nowrap;
}

.nav-center a {
  font-size: 13.5px;
  color: rgba(255, 255, 255, 0.65);
  text-decoration: none;
  letter-spacing: -.01em;
  transition: color .15s, background .2s;
  padding: 6px 15px;
  border-radius: 100px;
  white-space: nowrap;
}

.nav-center a:hover { color: var(--white); background: rgba(255, 255, 255, 0.09); }

.nav-center a.active {
  font-weight: 600;
  color: var(--white);
  background: rgba(255, 255, 255, 0.11);
}

.nav-cta {
  flex-shrink: 0;
  background: var(--white);
  color: var(--black);
  padding: 9px 20px;
  border-radius: 100px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .25s;
  cursor: none;
  border: 1.5px solid transparent;
  white-space: nowrap;
}

.nav-cta:hover {
  background: var(--g100);
  transform: scale(1.03);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* hero-zone — no overrides needed, pill is always dark */
nav.hero-zone .nav-logo { color: var(--white); }
nav.hero-zone .nav-center a { color: rgba(255, 255, 255, .65); }
nav.hero-zone .nav-center a:hover { color: var(--white); }

/* ── SHARED BUTTONS ── */
.btn-black {
  display: inline-block;
  background: var(--black);
  color: var(--white);
  padding: 13px 26px;
  border-radius: 100px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  transition: background .2s, transform .2s, box-shadow .2s;
  cursor: none;
}

.btn-black:hover {
  background: #1a1a1a;
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
}

.btn-outline {
  background: transparent;
  color: var(--black);
  padding: 11px 22px;
  border-radius: 100px;
  border: 1.5px solid var(--g200);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: -.01em;
  text-decoration: none;
  white-space: nowrap;
  transition: border-color .2s, background .2s, color .2s;
  cursor: none;
  flex-shrink: 0;
}

.btn-outline:hover {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

/* ── SCROLL REVEAL ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .75s cubic-bezier(.16, 1, .3, 1),
              transform .75s cubic-bezier(.16, 1, .3, 1);
}

.reveal.vis {
  opacity: 1;
  transform: translateY(0);
}

.reveal.d1 { transition-delay: .08s; }
.reveal.d2 { transition-delay: .16s; }
.reveal.d3 { transition-delay: .24s; }

.from-l {
  opacity: 0;
  transform: translateX(-32px);
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1),
              transform .8s cubic-bezier(.16, 1, .3, 1);
}

.from-r {
  opacity: 0;
  transform: translateX(32px);
  transition: opacity .8s cubic-bezier(.16, 1, .3, 1),
              transform .8s cubic-bezier(.16, 1, .3, 1);
}

.from-l.vis,
.from-r.vis {
  opacity: 1;
  transform: translateX(0);
}

/* ── FOOTER ── */
footer {
  background: var(--black);
  padding: 56px var(--pad) 0;
}

.foot-inner {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 48px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  max-width: 1200px;
  margin: 0 auto;
}

.foot-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -.03em;
  color: var(--white);
  text-decoration: none;
  margin-bottom: 10px;
}

.foot-logo img {
  height: 36px;
  width: auto;
  display: block;
  opacity: .85;
}

.foot-desc {
  font-size: 13px;
  color: rgba(255, 255, 255, .32);
  line-height: 1.6;
  max-width: 210px;
}

.foot-col-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .28);
  margin-bottom: 16px;
}

.foot-col a,
.foot-contact p {
  display: block;
  font-size: 13.5px;
  color: rgba(255, 255, 255, .48);
  text-decoration: none;
  margin-bottom: 10px;
  transition: color .15s;
  letter-spacing: -.01em;
}

.foot-col a:hover { color: var(--white); }

.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 28px;
  padding-bottom: 28px;
  font-size: 12px;
  color: rgba(255, 255, 255, .2);
  max-width: 1200px;
  margin: 0 auto;
}