/* ============================
   DevScope — mobile-first styles
   ============================ */

:root {
  --bg: #0a0e17;
  --bg-alt: #0d1220;
  --surface: #121729;
  --surface-2: #171d33;
  --border: #232a44;
  --text: #eef1fa;
  --text-dim: #9aa3bd;
  --text-faint: #6b7390;
  --accent: #6d5efc;
  --accent-2: #22c3a6;
  --accent-3: #f2a33c;
  --gradient: linear-gradient(135deg, #6d5efc 0%, #9b5cf6 50%, #22c3a6 100%);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --shadow: 0 20px 60px -20px rgba(0,0,0,0.6);
  --header-h: 76px;
  --container: 1200px;
  --ease: cubic-bezier(.22,1,.36,1);
}

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
  overflow-x: hidden;
}

h1, h2, h3 {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  line-height: 1.15;
  margin: 0 0 0.5em;
  letter-spacing: -0.02em;
}

p { margin: 0 0 1em; color: var(--text-dim); }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
img, svg { max-width: 100%; display: block; }
button { font: inherit; cursor: pointer; }

.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: 20px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 12px 18px;
  border-radius: 0 0 8px 0;
  z-index: 1000;
}
.skip-link:focus { left: 0; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  border: 1px solid transparent;
  min-height: 44px;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease);
  white-space: nowrap;
}
.btn[hidden] { display: none; }
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 24px -8px rgba(109,94,252,0.6);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(109,94,252,0.7); }
.btn-primary:active { transform: translateY(0); }
.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border);
}
.btn-ghost:hover { border-color: var(--accent); background: rgba(109,94,252,0.08); }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 100;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: rgba(10,14,23,0.7);
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.site-header.scrolled {
  border-bottom-color: var(--border);
  background: rgba(10,14,23,0.92);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.logo { display: inline-flex; align-items: center; }
.logo-mark {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
}

.footer-logo { display: inline-block; line-height: 0; }
.footer-logo img { width: 76px; height: auto; }

.nav-desktop { display: none; }
.nav-desktop ul { display: flex; gap: 28px; }
.nav-desktop a { font-size: 0.95rem; color: var(--text-dim); font-weight: 500; transition: color .2s; position: relative; }
.nav-desktop a:hover { color: var(--text); }

.nav-cta { display: none; }
.nav-actions { display: none; align-items: center; gap: 18px; }
.nav-signin {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 20px 9px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: border-color .2s var(--ease), background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease);
}
.nav-signin svg { width: 16px; height: 16px; flex-shrink: 0; }
.nav-signin:hover {
  border-color: var(--accent);
  background: rgba(109,94,252,0.1);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px -10px rgba(109,94,252,0.6);
}

.menu-toggle {
  width: 44px; height: 44px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  flex-shrink: 0;
}
.menu-toggle span {
  width: 18px; height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: min(320px, 85vw);
  background: rgba(10,14,23,0.98);
  backdrop-filter: blur(20px);
  border-right: 1px solid var(--border);
  transform: translateX(-100%);
  transition: transform .35s var(--ease);
  z-index: 99;
  overflow-y: auto;
  padding: calc(var(--header-h) + 32px) 24px 32px;
}
.mobile-nav.open { transform: translateX(0); }
.mobile-nav ul { display: flex; flex-direction: column; gap: 4px; margin-bottom: 24px; }
.mobile-nav a {
  display: block;
  padding: 14px 8px;
  font-size: 1.15rem;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}

.mobile-nav-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 98;
  opacity: 0;
  pointer-events: none;
  transition: opacity .3s var(--ease);
}
.mobile-nav-backdrop.open { opacity: 1; pointer-events: auto; }

body.nav-open { overflow: hidden; }

@media (max-width: 480px) {
  :root { --header-h: 64px; }
  .logo-mark { width: 40px; height: 40px; }
  .menu-toggle { width: 40px; height: 40px; }
  .mobile-nav { padding: calc(var(--header-h) + 24px) 20px 24px; }
  .mobile-nav a { font-size: 1.05rem; padding: 12px 8px; }
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 56px) 0 64px;
  overflow: hidden;
}
.hero-glow {
  position: absolute;
  top: -20%; left: 50%;
  transform: translateX(-50%);
  width: 900px; height: 900px;
  max-width: 200vw;
  background: radial-gradient(circle, rgba(109,94,252,0.35) 0%, rgba(34,195,166,0.12) 40%, transparent 70%);
  filter: blur(40px);
  pointer-events: none;
  z-index: 0;
}
.hero-inner { position: relative; z-index: 1; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-2);
  margin-bottom: 16px;
}
.eyebrow::before {
  content: '';
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 0 4px rgba(34,195,166,0.2);
}

.hero h1 {
  font-size: clamp(2rem, 7vw, 3.8rem);
  max-width: 18ch;
  margin-inline: auto;
}
.text-gradient {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: clamp(1rem, 2.4vw, 1.2rem);
  max-width: 56ch;
  margin: 20px auto 32px;
}

.hero-actions {
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  max-width: 320px;
  margin: 0 auto;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  max-width: 480px;
  margin: 56px auto 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}
.hero-stats dt {
  font-family: 'Space Grotesk', sans-serif;
  font-size: clamp(1.4rem, 4vw, 1.9rem);
  font-weight: 700;
  color: var(--text);
}
.hero-stats dd {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--text-faint);
}

/* ---------- Logo strip ---------- */
.logo-strip { padding: 32px 0; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.logo-strip-label { text-align: center; font-size: 0.8rem; color: var(--text-faint); margin-bottom: 16px; text-transform: uppercase; letter-spacing: 0.06em; }
.tech-marquee {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px 28px;
}
.tech-marquee li { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--text-faint); font-size: 0.95rem; }

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.6rem, 4.5vw, 2.4rem); }
.section-sub { font-size: 1.05rem; }

.grid { display: grid; gap: 20px; }

/* ---------- Cards / services ---------- */
.services-grid { grid-template-columns: 1fr; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  transition: transform .25s var(--ease), border-color .25s var(--ease), background .25s var(--ease);
}
.card:hover { transform: translateY(-4px); border-color: rgba(109,94,252,0.4); background: var(--surface-2); }
.card-icon {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(109,94,252,0.12);
  color: var(--accent);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card h3 { font-size: 1.15rem; }
.card p { font-size: 0.95rem; margin: 0; }

/* ---------- Why / feature list ---------- */
.why { background: var(--bg-alt); }
.why-grid { display: grid; gap: 48px; align-items: center; }
.feature-list { display: flex; flex-direction: column; gap: 20px; margin-top: 28px; }
.feature-list li { display: flex; gap: 14px; align-items: flex-start; }
.feature-check {
  flex-shrink: 0;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: rgba(34,195,166,0.15);
  color: var(--accent-2);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  margin-top: 2px;
}
.feature-list strong { display: block; margin-bottom: 2px; font-size: 1rem; }
.feature-list p { margin: 0; font-size: 0.92rem; }

.why-panel { display: flex; flex-direction: column; gap: 18px; }
.panel-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  box-shadow: var(--shadow);
}
.panel-card-1 { position: relative; }
.panel-card-2 { margin-left: 10%; max-width: 90%; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; margin-right: 6px; }
.dot-red { background: #f2635c; } .dot-yellow { background: #f2c33c; } .dot-green { background: #3cd67a; }
.panel-line { height: 8px; border-radius: 4px; background: linear-gradient(90deg, var(--border), var(--surface-2)); margin-top: 14px; }
.panel-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent-2);
  background: rgba(34,195,166,0.12);
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}

/* ---------- Process ---------- */
.steps { display: grid; grid-template-columns: 1fr; gap: 16px; }
.steps li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
  position: relative;
}
.step-num {
  display: inline-block;
  font-family: 'Space Grotesk', sans-serif;
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--accent);
  background: rgba(109,94,252,0.12);
  padding: 4px 10px;
  border-radius: 8px;
  margin-bottom: 14px;
}
.steps h3 { font-size: 1.1rem; }
.steps p { font-size: 0.92rem; margin: 0; }

/* ---------- Work ---------- */
.work-grid { grid-template-columns: 1fr; }
.work-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--surface);
  transition: transform .25s var(--ease), border-color .25s var(--ease);
}
.work-card:hover { transform: translateY(-4px); border-color: rgba(109,94,252,0.4); }
.work-thumb { height: 160px; }
.work-thumb-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f3f4fb;
  padding: 24px;
}
.work-thumb-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.work-body { padding: 20px; }
.tag { font-size: 0.75rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-2); }
.work-body h3 { margin: 8px 0 6px; font-size: 1.2rem; }
.work-body p { font-size: 0.92rem; margin: 0; }

/* ---------- Testimonials ---------- */
.testimonial-grid { grid-template-columns: 1fr; }
.testimonial {
  margin: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px;
}
.testimonial blockquote { margin: 0 0 20px; font-size: 1.02rem; color: var(--text); line-height: 1.55; }
.testimonial figcaption { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700;
  font-size: 0.85rem;
  flex-shrink: 0;
}
.testimonial figcaption strong { display: block; font-size: 0.92rem; }
.testimonial figcaption span { font-size: 0.82rem; color: var(--text-faint); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: var(--gradient);
  padding: 64px 0;
  text-align: center;
}
.cta-inner h2 { color: #fff; font-size: clamp(1.6rem, 5vw, 2.3rem); }
.cta-inner p { color: rgba(255,255,255,0.85); max-width: 46ch; margin: 0 auto 28px; }
.cta-banner .btn-primary { background: #fff; color: #221a5c; box-shadow: none; }
.cta-banner .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 30px -10px rgba(0,0,0,0.3); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; gap: 40px; }
.contact-info { display: flex; flex-direction: column; gap: 16px; margin-top: 28px; }
.contact-info li { display: flex; flex-direction: column; gap: 2px; font-size: 0.95rem; }
.contact-info strong { color: var(--text-faint); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.05em; }
.contact-info a { color: var(--text); font-weight: 600; }
.contact-info a:hover { color: var(--accent); }

.form { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.form[hidden] { display: none; }
.form-row { display: grid; grid-template-columns: 1fr; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field[hidden] { display: none; }
.field label { font-size: 0.85rem; font-weight: 600; color: var(--text-dim); }
.field input, .field select, .field textarea {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  color: var(--text);
  font: inherit;
  font-size: 0.95rem;
  min-height: 44px;
  transition: border-color .2s;
}
.field textarea { min-height: 110px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(109,94,252,0.2);
}
.form-note { min-height: 1.2em; font-size: 0.88rem; color: var(--accent-2); margin: 0; }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 56px 0 0; }
.footer-inner { display: grid; grid-template-columns: 1fr; gap: 36px; padding-bottom: 40px; }
.footer-brand p { font-size: 0.9rem; margin-top: 12px; max-width: 32ch; }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-faint); margin-bottom: 14px; }
.footer-col a { display: block; font-size: 0.92rem; color: var(--text-dim); padding: 6px 0; }
.footer-col a:hover { color: var(--text); }
.footer-bottom { border-top: 1px solid var(--border); padding: 20px 0; text-align: center; }
.footer-bottom p { margin: 0; font-size: 0.85rem; color: var(--text-faint); }

/* ---------- Back to top ---------- */
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
  z-index: 90;
}
.back-to-top.visible { opacity: 1; pointer-events: auto; transform: translateY(0); }
.back-to-top svg { width: 18px; height: 18px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* ============================
   Breakpoints
   ============================ */

@media (min-width: 480px) {
  .hero-actions { flex-direction: row; justify-content: center; max-width: none; }
  .form-row { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 640px) {
  .services-grid { grid-template-columns: repeat(2, 1fr); }
  .work-grid { grid-template-columns: repeat(2, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; }
}

@media (min-width: 860px) {
  .why-grid { grid-template-columns: 1.1fr 0.9fr; }
  .contact-grid { grid-template-columns: 0.9fr 1.1fr; }
}

@media (min-width: 900px) {
  .nav-desktop { display: block; }
  .nav-cta { display: inline-flex; }
  .nav-actions { display: flex; }
  .menu-toggle { display: none; }
  .mobile-nav { display: none; }

  .services-grid { grid-template-columns: repeat(3, 1fr); }
  .steps { grid-template-columns: repeat(5, 1fr); }
  .testimonial-grid { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
  .work-grid { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

  .hero-inner { text-align: left; }
  .hero h1 { margin-inline: 0; }
  .hero-sub { margin-inline: 0; }
  .hero-actions { justify-content: flex-start; }
  .hero-stats { margin-inline: 0; grid-template-columns: repeat(4, 1fr); }
  .eyebrow { justify-content: flex-start; }
}

@media (min-width: 1100px) {
  .hero h1 { max-width: 20ch; }
}
