/*
  PixelAndPen — Shared Stylesheet
  Palette: midnight-blue | Fonts: Space Grotesk + DM Sans
  Last updated: 2026-02-27
*/

/* ══════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════ */
:root {
  /* Colors */
  --c-primary:    #2563eb;
  --c-secondary:  #1e40af;
  --c-accent:     #f59e0b;
  --c-bg:         #0f172a;
  --c-surface:    #1e293b;
  --c-surface-2:  #263348;
  --c-text:       #f1f5f9;
  --c-text-sec:   #94a3b8;
  --c-border:     rgba(148, 163, 184, 0.12);
  --c-success:    #22c55e;
  --c-danger:     #ef4444;

  /* Typography */
  --f-display: 'Space Grotesk', sans-serif;
  --f-body:    'DM Sans', sans-serif;

  /* Spacing (4px grid) */
  --sp-xs:  4px;
  --sp-sm:  8px;
  --sp-md:  16px;
  --sp-lg:  24px;
  --sp-xl:  40px;
  --sp-2xl: 64px;
  --sp-3xl: 96px;
  --sp-4xl: 128px;

  /* Border radius */
  --r-sm:   4px;
  --r-md:   12px;
  --r-lg:   20px;
  --r-xl:   32px;
  --r-full: 9999px;

  /* Shadows */
  --shadow-card:    0 4px 24px rgba(0, 0, 0, 0.35);
  --shadow-glow:    0 0 48px rgba(37, 99, 235, 0.22);
  --shadow-glow-sm: 0 0 24px rgba(37, 99, 235, 0.16);
  --shadow-accent:  0 0 32px rgba(245, 158, 11, 0.2);

  /* Transitions */
  --t-fast:   0.15s ease;
  --t-base:   0.22s ease;
  --t-slow:   0.4s ease;
}


/* ══════════════════════════════════════
   RESET & BASE
══════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; font-size: 16px; overflow-x: clip; }

body {
  font-family: var(--f-body);
  background-color: var(--c-bg);
  color: var(--c-text);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Page fade-in on load */
body { animation: pageIn 0.38s ease both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Subtle noise grain overlay — adds depth to dark bg */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  opacity: 0.45;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.72' numOctaves='4' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='300' height='300' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 300px 300px;
}

img { max-width: 100%; display: block; }
a   { color: inherit; text-decoration: none; }
ul  { list-style: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }


/* ══════════════════════════════════════
   TYPOGRAPHY
══════════════════════════════════════ */
h1, h2, h3, h4 {
  font-family: var(--f-display);
  line-height: 1.1;
  letter-spacing: -0.02em;
}

/* Gradient text — used on hero titles */
.gradient-text {
  background: linear-gradient(130deg, #3b82f6 0%, #8b5cf6 45%, #f59e0b 100%);
  background-size: 220% 220%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradShift 5s ease infinite;
}
@keyframes gradShift {
  0%   { background-position: 0%   50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0%   50%; }
}


/* ══════════════════════════════════════
   UTILITIES
══════════════════════════════════════ */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--sp-xl);
}

section { padding: var(--sp-3xl) 0; position: relative; }

/* Horizontal rule between sections */
.section-divider::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--c-border), transparent);
}

/* Section label — "Our Process", "What we build", etc. */
.section-label {
  font-family: var(--f-display);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--c-accent);
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  margin-bottom: var(--sp-lg);
}
.section-label::before {
  content: '';
  display: inline-block;
  width: 22px;
  height: 2px;
  background: var(--c-accent);
  flex-shrink: 0;
}

/* Dark surface sections */
.bg-surface { background: var(--c-surface); }


/* ══════════════════════════════════════
   BUTTONS
══════════════════════════════════════ */
.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 700;
  padding: 14px 30px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--r-full);
  border: none;
  cursor: pointer;
  transition: background var(--t-base), transform var(--t-base), box-shadow var(--t-base);
}
.btn-primary:hover {
  background: #3b82f6;
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--f-display);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 13px 29px;
  background: transparent;
  color: var(--c-text);
  border-radius: var(--r-full);
  border: 1px solid var(--c-border);
  cursor: pointer;
  transition: border-color var(--t-base), background var(--t-base), transform var(--t-base);
}
.btn-secondary:hover {
  border-color: rgba(148, 163, 184, 0.4);
  background: rgba(255, 255, 255, 0.04);
  transform: translateY(-2px);
}

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-sm);
  font-family: var(--f-display);
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--c-primary);
  cursor: pointer;
  transition: gap var(--t-base);
}
.btn-ghost:hover { gap: var(--sp-md); }

.btn-fiverr {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-sm);
  font-family: var(--f-display);
  font-size: 0.93rem;
  font-weight: 700;
  padding: 13px 26px;
  background: #1dbf73;
  color: #fff;
  border-radius: var(--r-full);
  border: none;
  cursor: pointer;
  transition: background var(--t-base), transform var(--t-base);
}
.btn-fiverr:hover { background: #17a863; transform: translateY(-2px); }


/* ══════════════════════════════════════
   NAVIGATION
══════════════════════════════════════ */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 10001;
  padding: var(--sp-md) 0;
  transition: background 0.3s ease, backdrop-filter 0.3s ease, border-color 0.3s ease;
  border-bottom: 1px solid transparent;
}
.nav.scrolled {
  background: rgba(15, 23, 42, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-color: var(--c-border);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
}

.nav-logo {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  flex-shrink: 0;
  transition: opacity var(--t-base);
}
.nav-logo:hover { opacity: 0.8; }
.nav-logo span  { color: var(--c-primary); }

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--sp-xl);
}
.nav-links a {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--c-text-sec);
  transition: color var(--t-base);
  position: relative;
}
/* Underline indicator */
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px; left: 0;
  width: 0; height: 2px;
  background: var(--c-primary);
  border-radius: var(--r-full);
  transition: width 0.22s ease;
}
.nav-links a:hover         { color: var(--c-text); }
.nav-links a:hover::after  { width: 100%; }
.nav-links a.active        { color: var(--c-text); }
.nav-links a.active::after { width: 100%; }

.nav-cta {
  font-family: var(--f-display);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 20px;
  background: var(--c-primary);
  color: #fff;
  border-radius: var(--r-full);
  flex-shrink: 0;
  transition: background var(--t-base), transform var(--t-base);
}
.nav-cta:hover { background: #3b82f6; transform: translateY(-1px); }
/* Suppress underline on CTA */
.nav-cta::after { display: none !important; }

/* Hamburger button */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  padding: 4px;
  cursor: pointer;
  z-index: 10001;
}
.nav-hamburger span {
  display: block;
  width: 24px; height: 2px;
  background: var(--c-text);
  border-radius: var(--r-full);
  transition: transform 0.25s ease, opacity 0.2s ease;
  transform-origin: center;
}
.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Full-screen mobile menu overlay */
.nav-mobile {
  display: flex;
  position: fixed;
  inset: 0;
  height: 100vh;
  background: rgba(15, 23, 42, 0.97);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  z-index: 10000;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--sp-xl);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.22s ease, visibility 0.22s ease;
  pointer-events: none;
}
.nav-mobile.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.nav-mobile a {
  font-family: var(--f-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--c-text);
  transition: color var(--t-base);
}
.nav-mobile a:hover  { color: var(--c-text); }
.nav-mobile a.active { color: var(--c-primary); }
.nav-mobile .btn-primary { margin-top: var(--sp-md); font-size: 1rem; }


/* ══════════════════════════════════════
   PAGE HEADER (inner pages)
══════════════════════════════════════ */
.page-header {
  padding: calc(80px + var(--sp-3xl)) 0 var(--sp-3xl);
  position: relative;
  overflow: hidden;
  background: var(--c-surface);
  border-bottom: 1px solid var(--c-border);
}
/* Ambient glow */
.page-header::before {
  content: '';
  position: absolute;
  top: -180px; right: -180px;
  width: 560px; height: 560px;
  background: radial-gradient(circle, rgba(37, 99, 235, 0.14) 0%, transparent 68%);
  pointer-events: none;
}
.page-header::after {
  content: '';
  position: absolute;
  bottom: -60px; left: 80px;
  width: 3px; height: 120px;
  background: linear-gradient(to bottom, var(--c-primary), transparent);
  border-radius: var(--r-full);
}
.page-header .container { position: relative; z-index: 1; }
.page-header h1 {
  font-size: clamp(2.4rem, 5vw, 3.75rem);
  margin-bottom: var(--sp-md);
}
.page-header p {
  font-size: 1.1rem;
  color: var(--c-text-sec);
  max-width: 540px;
  line-height: 1.72;
}


/* ══════════════════════════════════════
   FAQ ACCORDION (shared across pages)
══════════════════════════════════════ */
.faq-list { display: flex; flex-direction: column; gap: var(--sp-sm); }

.faq-item {
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--c-surface);
  transition: border-color var(--t-base);
}
.faq-item.open { border-color: rgba(37, 99, 235, 0.3); }

.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--sp-md);
  padding: var(--sp-lg) var(--sp-xl);
  cursor: pointer;
  font-family: var(--f-display);
  font-size: 0.93rem;
  font-weight: 600;
  user-select: none;
  transition: color var(--t-base);
}
.faq-q:hover { color: var(--c-primary); }

.faq-toggle {
  width: 24px; height: 24px;
  background: var(--c-surface-2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  line-height: 1;
  flex-shrink: 0;
  pointer-events: none;
  transition: background var(--t-base), transform 0.25s ease;
}
.faq-item.open .faq-toggle { background: var(--c-primary); transform: rotate(45deg); }

.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.32s ease;
}
.faq-a-inner {
  padding: 0 var(--sp-xl) var(--sp-lg);
  font-size: 0.88rem;
  color: var(--c-text-sec);
  line-height: 1.72;
}


/* ══════════════════════════════════════
   FOOTER
══════════════════════════════════════ */
.footer {
  background: var(--c-bg);
  border-top: 1px solid var(--c-border);
  padding: var(--sp-3xl) 0 var(--sp-xl);
}

/* Small CTA strip above footer links */
.footer-cta-strip {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(124, 58, 237, 0.07));
  border: 1px solid rgba(37, 99, 235, 0.18);
  border-radius: var(--r-xl);
  padding: var(--sp-xl) var(--sp-2xl);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-xl);
  margin-bottom: var(--sp-2xl);
}
.footer-cta-strip p {
  font-family: var(--f-display);
  font-size: 1.1rem;
  font-weight: 700;
}
.footer-cta-strip span {
  display: block;
  font-size: 0.85rem;
  color: var(--c-text-sec);
  margin-top: 2px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--sp-3xl);
  margin-bottom: var(--sp-2xl);
}
.footer-logo {
  font-family: var(--f-display);
  font-weight: 800;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
  margin-bottom: var(--sp-md);
}
.footer-logo span { color: var(--c-primary); }

.footer-brand-p {
  font-size: 0.85rem;
  color: var(--c-text-sec);
  line-height: 1.65;
  max-width: 270px;
  margin-bottom: var(--sp-lg);
}

.footer-socials { display: flex; gap: var(--sp-sm); }
.f-social {
  width: 34px; height: 34px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  transition: background var(--t-base), border-color var(--t-base);
}
.f-social:hover { background: var(--c-primary); border-color: var(--c-primary); }

.footer-col h4 {
  font-family: var(--f-display);
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.11em;
  color: var(--c-text-sec);
  margin-bottom: var(--sp-lg);
}
.footer-col ul { display: flex; flex-direction: column; gap: 9px; }
.footer-col a {
  font-size: 0.85rem;
  color: var(--c-text-sec);
  transition: color var(--t-base);
}
.footer-col a:hover { color: var(--c-text); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-xl);
  border-top: 1px solid var(--c-border);
  font-size: 0.78rem;
  color: var(--c-text-sec);
}


/* ══════════════════════════════════════
   BACK TO TOP
══════════════════════════════════════ */
.back-to-top {
  position: fixed;
  bottom: var(--sp-xl);
  right: var(--sp-xl);
  width: 44px; height: 44px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--r-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  opacity: 0;
  transform: translateY(10px);
  transition: opacity 0.25s, transform 0.25s, background var(--t-base), border-color var(--t-base);
  z-index: 150;
}
.back-to-top.visible { opacity: 1; transform: translateY(0); }
.back-to-top:hover   { background: var(--c-primary); border-color: var(--c-primary); }


/* ══════════════════════════════════════
   SCROLL REVEAL ANIMATION
══════════════════════════════════════ */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }

/* Left-slide variant */
.reveal-left {
  opacity: 0;
  transform: translateX(-24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-left.visible { opacity: 1; transform: translateX(0); }

/* Right-slide variant */
.reveal-right {
  opacity: 0;
  transform: translateX(24px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}
.reveal-right.visible { opacity: 1; transform: translateX(0); }


/* ══════════════════════════════════════
   RESPONSIVE BREAKPOINTS
══════════════════════════════════════ */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--sp-2xl); }
}

@media (max-width: 768px) {
  .container  { padding: 0 var(--sp-lg); }
  section     { padding: var(--sp-2xl) 0; }

  /* Nav */
  .nav-links     { display: none; }
  .nav-cta       { display: none; }
  .nav-hamburger { display: flex; }

  /* Footer */
  .footer-cta-strip { flex-direction: column; text-align: center; }
  .footer-bottom    { flex-direction: column; gap: var(--sp-sm); text-align: center; }

  /* Page header */
  .page-header { padding: calc(72px + var(--sp-2xl)) 0 var(--sp-2xl); }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--sp-xl); }
  .back-to-top { bottom: var(--sp-lg); right: var(--sp-lg); }
}
