/* ========================================
   9to5devhindi.com — Shared Styles
   ======================================== */

:root {
  --bg: #0a0a0f;
  --bg-2: #12121a;
  --surface: #1a1a25;
  --surface-2: #232333;
  --ink: #f5f5f7;
  --ink-2: #a1a1aa;
  --ink-3: #71717a;
  --accent: #ff3b30;
  --accent-2: #ffd60a;
  --accent-3: #4ade80;
  --grid: rgba(255, 255, 255, 0.04);
  --glow: rgba(255, 59, 48, 0.4);
  --glow-2: rgba(255, 214, 10, 0.3);
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Bricolage Grotesque', sans-serif;
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  max-width: 100vw;
}

::selection { background: var(--accent-2); color: var(--bg); }

a { color: inherit; text-decoration: none; }

/* ========================================
   Background effects
   ======================================== */

.grid-bg {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 60px 60px;
  z-index: 0;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 90%);
}

.noise {
  position: fixed;
  inset: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='200' height='200'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' /></filter><rect width='100%25' height='100%25' filter='url(%23n)' opacity='0.25'/></svg>");
  opacity: 0.04;
  z-index: 1;
  pointer-events: none;
  mix-blend-mode: overlay;
}

/* ========================================
   Navigation
   ======================================== */

body > nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  padding: 24px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  background: rgba(10, 10, 15, 0.7);
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.logo {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  width: 32px; height: 32px;
  background: var(--accent);
  border-radius: 8px;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 13px;
  box-shadow: 0 4px 12px var(--glow), inset 0 1px 0 rgba(255,255,255,0.2);
  transform: rotate(-5deg);
  transition: transform 0.3s ease;
}
.logo:hover .logo-mark { transform: rotate(5deg) scale(1.1); }

nav ul {
  list-style: none;
  display: flex;
  gap: 36px;
  align-items: center;
}

nav ul a {
  color: var(--ink-2);
  font-size: 15px;
  font-weight: 500;
  transition: color 0.2s ease;
  position: relative;
}
nav ul a:hover { color: var(--ink); }
nav ul a.active { color: var(--ink); }
nav ul a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--accent-2);
  transition: width 0.3s ease;
}
nav ul a:hover::after, nav ul a.active::after { width: 100%; }

/* Disabled nav link */
nav ul a.disabled {
  color: var(--ink-3);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
}
nav ul a.disabled::after { display: none; }

.cta-btn {
  background: var(--ink);
  color: var(--bg);
  padding: 10px 20px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.cta-btn:hover {
  background: var(--accent-2);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px var(--glow-2);
}

.cta-btn .cta-icon { display: none; }
.cta-btn .cta-text { display: inline; }

/* ========================================
   Buttons
   ======================================== */

.btn-primary {
  background: var(--accent);
  color: var(--ink);
  padding: 18px 32px;
  border-radius: 100px;
  font-weight: 600;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
  box-shadow: 0 8px 24px var(--glow), inset 0 1px 0 rgba(255,255,255,0.2);
  border: none;
  cursor: pointer;
  font-family: inherit;
}
.btn-primary:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 40px var(--glow);
}
.btn-primary svg { transition: transform 0.3s ease; }
.btn-primary:hover svg { transform: translateX(4px); }

.btn-secondary {
  color: var(--ink);
  padding: 18px 32px;
  border-radius: 100px;
  font-weight: 500;
  font-size: 16px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  cursor: pointer;
  font-family: inherit;
}
.btn-secondary:hover {
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Disabled button state */
.btn-secondary.disabled,
.btn-primary.disabled {
  opacity: 0.4;
  cursor: not-allowed;
  pointer-events: none;
}

/* ========================================
   Common section structure
   ======================================== */

section {
  padding: 120px 48px;
  position: relative;
  z-index: 2;
}

.container {
  max-width: 1280px;
  margin: 0 auto;
}

.container-narrow {
  max-width: 920px;
  margin: 0 auto;
}

.section-eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.section-eyebrow::before {
  content: '';
  width: 32px;
  height: 1px;
  background: var(--accent);
}

.section-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(36px, 5vw, 64px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  max-width: 900px;
}

.section-sub {
  font-size: 18px;
  color: var(--ink-2);
  max-width: 640px;
  margin-bottom: 64px;
  line-height: 1.6;
}

/* ========================================
   Animations
   ======================================== */

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); box-shadow: 0 0 0 0 rgba(255, 214, 10, 0.6); }
  50% { opacity: 0.6; transform: scale(0.9); box-shadow: 0 0 0 8px rgba(255, 214, 10, 0); }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-12px); }
}

/* ========================================
   Footer
   ======================================== */

footer {
  background: var(--bg-2);
  padding: 80px 48px 32px;
  border-top: 1px solid rgba(255,255,255,0.06);
  position: relative;
  z-index: 2;
}

.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 64px;
  padding-bottom: 56px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.footer-brand .logo { margin-bottom: 20px; }
.footer-brand p {
  color: var(--ink-2);
  font-size: 15px;
  max-width: 360px;
  line-height: 1.6;
}

.footer-col h4 {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-2);
  margin-bottom: 20px;
}

.footer-col ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.footer-col a {
  color: var(--ink);
  font-size: 15px;
  transition: color 0.2s ease;
}
.footer-col a:hover { color: var(--accent-2); }
.footer-col a.disabled {
  color: var(--ink-3);
  cursor: not-allowed;
  pointer-events: none;
  opacity: 0.5;
}

.footer-bottom {
  max-width: 1280px;
  margin: 32px auto 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-bottom p {
  color: var(--ink-2);
  font-size: 14px;
}

.footer-bottom .dev-credit {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink-2);
}

.footer-bottom .dev-credit a {
  color: var(--accent-2);
  font-weight: 600;
  transition: opacity 0.2s ease;
}
.footer-bottom .dev-credit a:hover { opacity: 0.7; }

.footer-legal {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}
.footer-legal a {
  color: var(--ink-2);
  font-size: 14px;
  transition: color 0.2s ease;
}
.footer-legal a:hover { color: var(--accent-2); }

/* ========================================
   Mobile menu toggle (hamburger)
   ======================================== */

.mobile-menu-btn {
  display: none;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.mobile-menu-btn:hover {
  border-color: rgba(255,255,255,0.3);
}

.mobile-menu-btn svg {
  width: 22px;
  height: 22px;
  display: block;
}

.mobile-menu-btn .close-icon { display: none; }
.mobile-menu-btn.active .menu-icon { display: none; }
.mobile-menu-btn.active .close-icon { display: block; }

/* Nav right side container (CTA + hamburger) */
.nav-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

/* ========================================
   Responsive — Header & Navigation
   ======================================== */

@media (max-width: 968px) {
  body > nav {
    padding: 14px 16px;
    gap: 12px;
  }

  .mobile-menu-btn { display: block; }

  /* Hide Subscribe button completely on mobile - keeps header clean */
  .nav-right .cta-btn { display: none; }

  /* Logo more compact on mobile */
  .logo {
    font-size: 17px;
    gap: 8px;
    min-width: 0;
    overflow: hidden;
  }

  .logo-mark {
    width: 30px;
    height: 30px;
    font-size: 12px;
    flex-shrink: 0;
  }

  .logo span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .nav-right {
    gap: 8px;
  }

  /* Mobile menu dropdown */
  nav ul {
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: rgba(10, 10, 15, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 20px 24px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
    transform: translateY(-100%);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 20px 40px rgba(0,0,0,0.4);
  }

  nav ul.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  nav ul li {
    border-bottom: 1px solid rgba(255,255,255,0.05);
  }

  nav ul li:last-child {
    border-bottom: none;
  }

  /* Subscribe item in mobile menu - no border, just spacing */
  nav ul li:has(.mobile-subscribe) {
    border-bottom: none;
    padding-top: 8px;
  }

  nav ul a {
    display: block;
    padding: 16px 0;
    font-size: 17px;
  }

  nav ul a.mobile-subscribe {
    padding: 14px 20px;
  }

  nav ul a::after { display: none; }

  section { padding: 80px 20px; }
  .footer-inner {
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 0 20px 56px;
  }
  .footer-brand { grid-column: 1 / -1; }
  footer { padding: 60px 0 32px; }
  .footer-bottom { padding: 24px 20px 0; }
}

/* Hide mobile subscribe button on desktop */
.mobile-subscribe { display: none; }

/* Mobile subscribe button (shown only inside mobile menu) */
@media (max-width: 968px) {
  .mobile-subscribe {
    display: block;
    margin-top: 16px;
    padding: 14px 20px !important;
    background: var(--accent);
    color: var(--ink) !important;
    text-align: center;
    border-radius: 100px;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    box-shadow: 0 8px 24px var(--glow);
    transition: all 0.3s ease;
  }
  .mobile-subscribe:hover {
    background: var(--accent-2);
    color: var(--bg) !important;
    transform: translateY(-2px);
  }
}

/* Smaller phones */
@media (max-width: 480px) {
  body > nav {
    padding: 12px 14px;
    gap: 8px;
  }

  .logo {
    font-size: 15px;
    gap: 6px;
  }

  .logo-mark {
    width: 28px;
    height: 28px;
    font-size: 11px;
  }

  .footer-inner { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; text-align: center; }
}

/* Ultra-compact for tiny phones */
@media (max-width: 360px) {
  .logo span .full-domain {
    display: none;
  }
  .logo span .short-domain {
    display: inline !important;
  }
}

/* ========================================
   Performance & motion
   ======================================== */

/* The feTurbulence noise layer + blend mode is GPU-costly on mobile —
   drop it on small screens where it's barely visible anyway. */
@media (max-width: 768px) {
  .noise { display: none; }
}

/* Respect users who prefer reduced motion: kill the heavy looping
   animations (float, marquee, pulse, parallax) and the noise blend. */
@media (prefers-reduced-motion: reduce) {
  .noise { display: none; }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ========================================
   Legal pages (privacy, terms)
   ======================================== */

.legal-hero {
  padding: 150px 48px 32px;
  position: relative;
  z-index: 2;
}

.legal-inner { max-width: 860px; margin: 0 auto; }

.legal-hero h1 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(40px, 6vw, 72px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  margin-bottom: 16px;
}

.legal-updated {
  font-family: 'JetBrains Mono', monospace;
  font-size: 13px;
  color: var(--ink-2);
}

.legal-body {
  max-width: 860px;
  margin: 0 auto;
  padding: 24px 48px 120px;
  position: relative;
  z-index: 2;
}

.legal-body h2 {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
  margin: 40px 0 14px;
}
.legal-body h2:first-child { margin-top: 0; }

.legal-body p,
.legal-body li {
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.7;
}
.legal-body p { margin-bottom: 16px; }

.legal-body ul {
  margin: 0 0 16px 22px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.legal-body a { color: var(--accent-2); }
.legal-body a:hover { text-decoration: underline; }
.legal-body strong { color: var(--ink); }

@media (max-width: 768px) {
  .legal-hero { padding: 110px 20px 24px; }
  .legal-body { padding: 16px 20px 80px; }
}

/* ========================================
   WebGL 3D hero background (Three.js) — shared
   ======================================== */

#hero3d {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}
#hero3d.ready { opacity: 1; }

/* Keep hero content above the 3D canvas on every page */
.hero-inner,
.about-hero-inner,
.biz-hero-inner,
.legal-inner {
  position: relative;
  z-index: 1;
}

/* On desktop, fade the 3D toward the left so the headline stays crisp */
@media (min-width: 969px) {
  #hero3d {
    -webkit-mask-image: linear-gradient(100deg, transparent 8%, rgba(0,0,0,0.35) 38%, #000 72%);
    mask-image: linear-gradient(100deg, transparent 8%, rgba(0,0,0,0.35) 38%, #000 72%);
  }
}
